Файл: templates/backend/default/assets/plugins/jquery-harry-ploter/harry.min.js
Строк: 585
<?php
var harry=function(e){"use strict";var t,n,i,o,a,r,s,l,c,u,d,h,f,p,m,g=["#88a4d7","#d685c9","#86d685","#ffc34f","#93c2ea","#f28989","#f9eb8a"],v=function(e){var t;return e&&e.constructor==Array&&3==e.length?e:(t=/rgb(s*([0-9]{1,3})s*,s*([0-9]{1,3})s*,s*([0-9]{1,3})s*)/.exec(e))?[parseInt(t[1],10),parseInt(t[2],10),parseInt(t[3],10)]:(t=/rgb(s*([0-9]+(?:.[0-9]+)?)%s*,s*([0-9]+(?:.[0-9]+)?)%s*,s*([0-9]+(?:.[0-9]+)?)%s*)/.exec(e))?[2.55*parseFloat(t[1]),2.55*parseFloat(t[2]),2.55*parseFloat(t[3])]:(t=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(e))?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:(t=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(e))?[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]:[0,0,0]},b=function(e,t,n){var i,o=v(e);for("array"!=typeof t&&(t=[t,t,t]),i=0;3>i;++i)o[i]=Math.max(Math.min(o[i]+t[i],255),0);return void 0!=n?"rgba("+o.join(",")+","+n+")":"rgb("+o.join(",")+")"},T=function(e){var t=e.match(/d+px/i);return t?parseInt(t,10):(t=e.match(/[0-9.]+em/i))?Math.floor(16*parseFloat(t)):(t=e.match(/d+pt/i),t?Math.floor(1.3333*parseInt(t,10)):10)},y=function(e){var t=Math.floor(e).toString(),n=parseInt(t.substr(0,1),10),i=n*parseFloat("1E"+(t.length-1));return i==e?e:(n+1)*parseFloat("1E"+(t.length-1))},C=function(e,t){if("object"==typeof t)for(var n in t)e[n]=t[n];return e},E=function(e){if(e=e||window.event,"offsetX"in e)return{x:e.offsetX,y:e.offsetY};for(var t=e.target,n={x:e.pageX,y:e.pageY};t.offsetParent;)n.x-=t.offsetLeft,n.y-=t.offsetTop,t=t.offsetParent;return n},D=function(e,t,n){var i,o=document.createElement("canvas");if(o.setAttribute("width",t+"px"),o.setAttribute("height",n+"px"),e){if(i="string"==typeof e?document.getElementById(e):e,!i)return}else i=document.body;return i.appendChild(o),o},_=function(e,t,n){var i=T(t.font);if(e.pie)return i=t.x?2*i:n===!1?0:15,[i,i,i,i];var o=/l/i.test(t.ypos),a=/r/i.test(t.ypos),r=Math.floor(i/2),s=t.marks;return e.vertical?[t.y&&o?i+4:t.x?i:0,t.y?i:1,t.y&&a?i+4:t.x?i:1,t.x?4+t.xwidth:t.y?i:0]:[t.y?r:0,t.y&&a?4+t.ywidth:t.x?i:1,t.x?3+i+s:t.y?i:1,t.y&&o?4+t.ywidth:t.x?r:0]},I=function(e){return(e||"line").split(":")[0]},S=function(e){for(var t={},n=(e||"line").split(":");n.length;)t[n.pop()]=!0;return t},w=function(e,t){return t?Math.round(1e3*e/t)/10+"%":"0%"},O=function(e,t){var n,i="";if(e&&(i="function"==typeof e?e(t):e,t))for(n in t)i=i.replace("%"+n,t[n]);return i},R=function(e,t,n,i,o){var a,r;o||(o={}),i||(i=0),o.lines=O(t,n).split(/n|\n/),o.lh=T(e.font)+i,o.h=o.lines.length*o.lh,o.w=0;for(a in o.lines)(r=e.measureText(o.lines[a]).width+2*i)>o.w&&(o.w=r);return o},k=e.canvas?e.canvas.constructor==HTMLCanvasElement?e.canvas:document.getElementById(e.canvas):D(e.container,e.width||300,e.height||150),x=k.width,N=k.height,K=k.getContext("2d"),A=e.background,L=S(e.mode),M=I(e.mode),P=(e.fill||"s")[0].toLowerCase().replace(/[^nsvhrdl]/g,"s"),F=parseFloat(e.opacity)||1,B=void 0==e.linewidth?1:parseInt(e.linewidth,10),$=e.linejoin||"miter",H=void 0==e.barspace?"a":parseInt(e.barspace,10),z=parseInt(e.radiuspoint,10)||0,U=e.autoscale&&/top/i.test(e.autoscale),j=e.autoscale&&/bot/i.test(e.autoscale),W=C({color:"#a0a0a0",font:'normal 9px "Sans Serif"',marks:0,xwidth:0,ywidth:0,ypos:"right"},e.labels),V=e.mouseover===!1?!1:C({radius:5,linewidth:2*B,circle:"#888",font:'normal 10px "Sans Serif"',color:"#fff",bullet:"rgba(99,99,99,0.8)",axis:!1,text:"%v"},e.mouseover),G=[],q={n:!1},J=e.margins?!1:!0,X=e.margins||[0,0,0,0],Y=C({color:"#a0a0a0",linewidth:1,x:"lr",y:[0,25,50,75,100]},e.grid),Q=e.title?C({font:'bold 12px "Sans Serif"',color:"rgba(4,4,4,0.5)",z:"top"},e.title):!1,Z=e.legends===!1?!1:C({color:"#666",font:'10px "Sans Serif"',layout:"v"},e.legends),et=[],tt=0,nt=1,it=function(){var e,t,n,p,m;if(tt=et.length,i=o=!1,r=a=s=0,W.xwidth=0,K.font=W.font,tt){for(e=0;tt>e;e++)p=et[e],i=i===!1?p.min:Math.min(p.min,i),o=o===!1?p.max:Math.max(p.max,o),p.maxlab&&(W.xwidth=Math.max(W.xwidth,K.measureText(p.maxlab).width));if(U&&(o=y(o)),L.stack){for(e=0,n=et[0].len;n>e;++e){for(m=0,t=0;tt>t;++t)m+=et[t].val[e]||0;m>a&&(a=U?y(m):m)}r=j?a-i:a}else a=o,r=j?o-i:o;s=j?i:0,W.ywidth=K.measureText(a||"0").width}W.fontpx=T(W.font),"auto"==W.x&&(W.x=1,W.xauto=!0),/none|false/.test(Y.y)&&(Y.y=[]),J&&(X=_(L,W,V)),l=X[3],c=X[0],u=Math.max(x-X[1]-X[3],0),d=Math.max(N-X[0]-X[2],0),h=l+u,f=c+d},ot=function(e){var t,n,i,o=e.values||e,a=e.labels||[],r={val:[],lab:[],len:0,sum:0,avg:0,max:0,min:0xffffffffffff,tit:e.title||"dataset#"+(et.length+1),maxlab:"",col:e.color||g[et.length%g.length]};for(n in o)t=parseFloat(o[n]),isNaN(t)&&(t=null),r.val.push(t),i=a[n]||n,i.length>r.maxlab.length&&(r.maxlab=i),r.lab.push(i),r.sum+=t,t>r.max&&(r.max=t),t&&t<r.min&&(r.min=t);r.len=r.val.length,r.avg=r.len?r.sum/r.len:0,et.push(r)},at=function(e){if(e instanceof Array&&"object"==typeof e[0])for(var t=0,n=e.length;n>t;++t)ot(e[t]);else ot(e);it()},rt=function(e){var t;switch(P){case"s":t=b(e,0,F);break;case"l":t=b(e,21,F);break;case"d":t=b(e,-21,F);break;case"v":t=K.createLinearGradient(0,f,0,c),t.addColorStop(0,b(e,-48,F)),t.addColorStop(1,b(e,48,F));break;case"h":t=K.createLinearGradient(l,0,h,0),t.addColorStop(0,b(e,-48,F)),t.addColorStop(1,b(e,48,F));break;case"r":var n=l+u/2,i=c+d/2;t=K.createRadialGradient(n,i,0,n,i,d/2),t.addColorStop(0,b(e,-48,F)),t.addColorStop(1,b(e,48,F))}return t?K.fillStyle=t:!1},st=function(e){B&&(K.lineWidth=B,K.lineJoin=$,K.strokeStyle=e,K.stroke())},lt=function(e){K.closePath(),rt(e)&&K.fill(),st(e)},ct=function(e){if(e&&K.hasOwnProperty("shadowBlur")){var t=e.split(/[ ,;:-]/);K.shadowOffsetX=parseInt(t[0]||1,10),K.shadowOffsetY=parseInt(t[1]||1,10),K.shadowBlur=parseInt(t[2]||1,10),K.shadowColor=t[3]||"#000"}},ut=function(){K.hasOwnProperty("clearShadow")?K.clearShadow():K.hasOwnProperty("shadowBlur")&&(K.shadowOffsetX=0,K.shadowOffsetY=0,K.shadowBlur=0)},dt=function(){K.clearRect(-1,-1,x+1,N+1),A&&(K.fillStyle=A,K.fillRect(-1,-1,x+1,N+1))},ht=function(){Q&&(ct(Q.shadow),K.font=Q.font,K.textAlign="left",K.textBaseline="top",K.fillStyle=Q.color,K.fillText(Q.text,void 0==Q.x?X[3]+2:Q.x,void 0==Q.y?X[0]+2:Q.y),ut())},ft=function(){if(!L.pie&&Y.y){var e,t,n,i;for(K.lineWidth=Y.linewidth,K.strokeStyle=Y.color,e=0,t=Y.y.length;t>e;++e)K.beginPath(),L.vertical?(n=l+Math.round(u*Y.y[e]/100),K.moveTo(n,c),K.lineTo(n,f)):(i=f-Math.round(d*Y.y[e]/100),K.moveTo(l,i),K.lineTo(h,i)),K.stroke()}},pt=function(e){var t,n=e.length,i=Y.x,o=/a/i.test(i),a=/l/i.test(i),r=/r/i.test(i),s=parseInt(i,10);if(i)for(K.lineWidth=Y.linewidth,K.strokeStyle=Y.color,t=0;i&&n>t;++t)(o||s&&0==t%s||0==t&&a||t==n-1&&r)&&(K.beginPath(),L.vertical?(K.moveTo(l,e[t]),K.lineTo(h,e[t])):(K.moveTo(e[t],c),K.lineTo(e[t],f)),K.stroke())},mt=function(){if(tt&&W.y&&!L.pie){var e,t,n,i,o,a=10>r?100:100>r?10:1;if(ct(W.shadow),K.font=W.font,K.fillStyle=W.color,L.vertical)for(K.textAlign="center",e=0,t=W.y.length;t>e;++e)n=l+Math.round(u*W.y[e]/100),o=s+r*W.y[e]/100,o=Math.round(a*o)/a,/r/i.test(W.ypos)&&(i=f+1,K.textBaseline="top",K.fillText(o,n,i)),/l/i.test(W.ypos)&&(i=c-2,K.textBaseline="bottom",K.fillText(o,n,i));else for(K.textBaseline="middle",e=0,t=W.y.length;t>e;++e)i=f-Math.round(d*W.y[e]/100),o=s+r*W.y[e]/100,o=Math.round(a*o)/a,/r/i.test(W.ypos)&&(n=h+1,K.textAlign="left",K.fillText(o,n,i)),/l/i.test(W.ypos)&&(n=l-2,K.textAlign="right",K.fillText(o,n,i));ut()}},gt=function(e,t,n,i,o,a){if(K.save(),t=Math.round(t),n=Math.round(n),W.x&&0==e%W.x){var r=!0,s=et[0].lab[e]||e,l=0;K.font=W.font,W.xauto&&a&&(l=K.measureText(s).width,r=!("h"==a&&"center"==i&&p>t-l/2||"v"==a&&p>n)),r&&(ct(W.shadow),K.fillStyle=W.color,K.textAlign=i,K.textBaseline=o,K.fillText(s,t,n),ut(),p="center"==i?t+l/2:n+W.fontpx)}W.marks&&(K.lineWidth=1,K.beginPath(),K.moveTo(t,f),K.lineTo(t,f+W.marks),K.strokeStyle=W.color,K.stroke()),K.restore()},vt=function(){if(Z!==!1&&tt>1){K.save(),K.font=Z.font;var e,t,n,i,o,a,r=[],s="h"==Z.layout,l=0,c=0,u=3,d=T(Z.font)+u,h=tt,f=d-u,p=2*u+f,m=s?u+d:u+d*h,g=void 0!=Z.x?Z.x:X[3]+2,v=void 0!=Z.y?Z.y:X[0]+2+(Q&&!Q.x?2+T(Q.font):0);for(e=0;h>e;++e)t=K.measureText(et[e].tit).width,t>l&&(l=t),r.push(t),c+=t;for(t=s?(p+2*u)*h+c:3*u+f+l,K.lineWidth=1,(n=Z.background)&&(ct(Z.shadowbox),K.fillStyle=n,K.fillRect(g,v,t,m),ut()),(n=Z.border)&&(K.strokeStyle=n,K.strokeRect(g,v,t,m)),e=0,o=v+u,i=g+u;h>e;++e)a=et[e],ct(Z.shadow),K.fillStyle=a.col,K.fillRect(i,o,f,f),ut(),(n=Z.border2)&&(K.strokeStyle=n,K.strokeRect(i,o,f,f)),ct(Z.shadow),K.textAlign="left",K.textBaseline="top",K.fillStyle=Z.color,K.fillText(a.tit,i+u+f,o),ut(),s?i+=4*u+f+r[e]:o+=d;K.restore()}},bt=function(e,t){K.save(),K.font=V.font;var n,i,o,a,r,s,l,c,u,d,h,p=e.length,m=0,g=0,v=3,b=T(V.font),y=Math.floor(b/2),C=b+v,E=x,D=0,_=N,I=0,S=0;for(V.sort&&e.sort(function(e,t){return parseFloat(t.v)-parseFloat(e.v)}),i=0;p>i;i++)S+=e[i].v;for(i=0;p>i;i++)o=e[i],d={v:o.v,l:et[o.nds].lab[o.n],n:o.n,t:et[o.nds].tit,p:o.pct||w(o.v,S)},o=R(K,V.text,d,v,o),o.w&&(o.h2=Math.floor(o.h/2),o.w>g&&(g=o.w),m+=o.h,o.r++,E>o.x-o.r&&(E=o.x-o.r),D<o.x+o.r&&(D=o.x+o.r),_>o.y&&(_=o.y),I<o.y&&(I=o.y));if(p>1&&(g+=2*v+b),m){if(V.header&&(V.header.font&&(K.font=V.header.font),h=R(K,V.header.text,d,v),h.w>g&&(g=h.w),m+=h.h),m+=v,t?(a=E+(D-E)/2,s=a-g/2,s+g>x&&(s=x-1-g),1>s&&(s=1)):(s=D,s+g>=x&&(s=E-g),1>s&&(s=1)),s=Math.floor(s),c=s+g,r=_+m/2,l=r+m/2,l>f&&(l=f-1),l=Math.floor(l),u=l-m,K.beginPath(),K.moveTo(s,l),K.lineTo(c,l),K.lineTo(c,u),K.lineTo(s,u),K.closePath(),V.bullet&&(ct(V.shadowbox),K.strokStyle="",K.fillStyle=V.bullet,K.fill(),ut()),V.border&&(K.lineWidth=1,K.lineJoin="round",K.strokeStyle=V.border,K.stroke()),K.textAlign="left",K.textBaseline="top",r=u+v,h){for(a=s+v,ct(V.header.shadow),K.fillStyle=V.header.color||V.color,n=0;n<h.lines.length;++n,r+=h.lh)K.fillText(h.lines[n],a,r);ut(),K.font=V.font}for(i=0;p>i;i++){for(o=e[i],a=s+v,p>1&&(K.beginPath(),K.arc(a+y,r+y,y,0,2*Math.PI),K.fillStyle=et[o.nds].col,K.fill(),a+=b+v),ct(V.shadow),K.fillStyle=V.color,n=0;n<o.lines.length;++n,r+=C)K.fillText(o.lines[n],a,r);ut()}}K.restore()},Tt={line:function(){var e,t,n,i,o,a=tt,c=r?d/r:0,h="curve"==M,p=f+W.marks+2,m=function(e,t,n,i,o,a){for(var r,s,l,c,u,d,f=o;a>=f;)if(null===i[f])f++;else if(h){for(r=t[f],s=n[f],f++;a>=f&&null===i[f];)f++;f>a?e.lineTo(r,s):(l=(r+t[f])/2,c=(s+n[f])/2,u=(r+l)/2,d=(s+c)/2,e.quadraticCurveTo(r,s,u,d),u=(l+t[f])/2,d=(c+n[f])/2,e.quadraticCurveTo(l,c,u,d))}else e.lineTo(t[f],n[f]),f++};for(G=[];e=et[--a];)if((o=e.len)>1){var g,v,b=[],T=[];for(t=0;o>t;++t){if(i=0,L.stack)for(n=0;a>=n;n++)i+=et[n].val[t]-s;else i=e.val[t]-s;b.push(l+Math.round(t*(u/(o-1)))),T.push(f-Math.round(c*i*nt))}for(a+1==tt&&pt(b),G.push({x:b,y:T,v:et[a].val,nds:a}),t--,b.push(l+Math.round(t*(u/(o-1)))),T.push(f-Math.round(c*i)),g=0;null===e.val[g];)g++;for(v=o-1;null===e.val[v];)v--;if(v>=g&&rt(e.col)&&(K.beginPath(),K.moveTo(b[g],f),K.lineTo(b[g],T[g]),m(K,b,T,e.val,g,v),K.lineTo(b[v],f),K.closePath(),K.fill()),K.beginPath(),K.moveTo(b[g],T[g]),m(K,b,T,e.val,g,v),st(e.col),0==a)for(t=0;o>t;++t)gt(t,b[t],p,"center","top","h");if(z)for(K.fillStyle=e.col,t=0;o>t;++t)void 0!=e.val[t]&&(K.beginPath(),K.arc(b[t],T[t],z,0,2*Math.PI),K.closePath(),K.fill())}},curve:function(){Tt.line()},chart:function(){if(G=[],tt){var e,t,n,i,r,s,h,p,m,g,v=et[0].len,b="a"==H?tt>1?4:0:H,T=L.stack,y=L.vertical,C=T?1:tt,E=y?d:u,D=v&&tt?(E-b*(v-1))/v/C-1:0,_=y?u:d,I=f+W.marks+2,S=[],w=T?a?_/a:0:o?_/o:0;for(0>D&&(D=0),r=y?c:l,i=(y?d:u)/(v||1),e=0;v>=e;e++)S.push(Math.round(r+e*i));for(pt(S),t=0;tt>t;t++)G.push({x:[],y:[],v:[],nds:t});if(y)for(r=c,e=0;v>e;e++){for(gt(e,l-W.marks-2,r,"right","top","v"),p=l,t=0;tt>t;t++)n=et[t],m=T?p:l,p=m+Math.round(w*n.val[e]*nt),s=Math.round(r),h=Math.round(r+D),null!==n.val[e]&&(K.beginPath(),K.moveTo(m,s),K.lineTo(m,h),K.lineTo(p,h),K.lineTo(p,s),lt(n.col)),G[t].x.push(p),G[t].y.push(Math.floor(r+D/2)),G[t].v.push(n.val[e]),T||(r+=D+1);r+=T?D+1+b:b}else for(p=l,e=0;v>e;e++){for(gt(e,p+(D+1)*C/2,I,"center","top","h"),r=f,t=0;tt>t;t++)n=et[t],s=T?r:f,r=s-Math.round(w*n.val[e]*nt),m=Math.round(p),g=Math.round(p+D),null!==n.val[e]&&(K.beginPath(),K.moveTo(m,s),K.lineTo(m,r),K.lineTo(g,r),K.lineTo(g,s),lt(n.col)),G[t].x.push(Math.floor(p+D/2)),G[t].y.push(r),G[t].v.push(n.val[e]),T||(p+=D+1);p+=T?D+1+b:b}}},pie:function(){if(G=[],tt){var e,t=0,n=[],i=[],o=2*Math.PI,a=[],r=[];if(tt>1){var s=0;for(e=0;tt>e;e++)s+=et[e].sum;if(s)for(e=0,t=tt;tt>e;e++)n[e]=nt*et[e].sum/s*o,i[e]=et[e].col,a.push(et[e].sum),r.push(w(et[e].sum,s))}else{var h=et[0];if(h.sum)for(t=h.len,e=0;t>e;e++)n[e]=nt*h.val[e]/h.sum*o,i[e]=g[e%g.length],a.push(h.val[e]),r.push(w(h.val[e],h.sum))}var f,p,m,v,b,T,y=l+Math.round(u/2),C=c+Math.round(d/2),E=Math.min(d/2,u/2)-1,D=E+W.fontpx,_=1.5*Math.PI,I=q.n;for(q={r:E,x:y,y:C,n:I},e=0;t>e;e++)m=_+n[e],v=(_+m)/2,G.push({a:_%(2*Math.PI),n:e}),e===I?(f=y+10*Math.cos(v),p=C+10*Math.sin(v)):(f=y,p=C),K.beginPath(),K.moveTo(f,p),K.arc(f,p,E,_,m,!1),lt(i[e]),e===I?(b=f+D/2*Math.cos(v),T=p+D/2*Math.sin(v)):gt(a[e],f+D*Math.cos(v),p+D*Math.sin(v),"center","middle"),_=m;I!==!1&&bt([{x:b,y:T,r:0,v:a[I],pct:r[I],n:I,nds:tt>1?I:0}],!0),G.sort(function(e,t){return e.a-t.a})}}},yt={line:function(e,t){var n,i,o,a,r,s=!1,l=V.linewidth||1,c=[];if(G.length){for(n=0;n<G[0].x.length;++n)for(i=0;i<G.length;++i)if(o=G[i],void 0!=o.v[n]){r=L.vertical?Math.abs(t-o.y[n]):Math.abs(e-o.x[n]),(s===!1||a>r)&&(a=r,s=n);break}if(s!==!1){for(n=0;n<G.length;++n)if(o=G[n],void 0!=o.v[s]){if(V.border2&&(K.beginPath(),K.lineWidth=l+2,K.arc(o.x[s],o.y[s],V.radius,0,2*Math.PI),0==V.linewidth?(K.fillStyle=V.border2,K.fill()):(K.strokeStyle=V.border2,K.stroke())),K.beginPath(),K.lineWidth=l,K.arc(o.x[s],o.y[s],V.radius,0,2*Math.PI),0==V.linewidth?(K.fillStyle=V.circle,K.fill()):(K.strokeStyle=V.circle,K.stroke()),V.axis){var u,d=2;if(K.lineWidth=1,/x/i.test(V.axis)){for(u=o.y[s]+V.radius;f>u;)K.moveTo(o.x[s],u),u+=d,u>f&&(u=f),K.lineTo(o.x[s],u),u+=d;K.stroke()}if(/y/i.test(V.axis)){for(e=o.x[s]+V.radius;h>e;)K.moveTo(e,o.y[s]),e+=d,e>h&&(e=h),K.lineTo(e,o.y[s]),e+=d;K.stroke()}}c.push({x:o.x[s],y:o.y[s],r:l/2+1+V.radius,v:o.v[s],n:s,nds:o.nds})}bt(c)}}},chart:function(e,t){yt.line(e,t)},curve:function(e,t){yt.line(e,t)},pie:function(e,t){var n,i=Math.sqrt(Math.pow(e-q.x,2)+Math.pow(t-q.y,2)),o=0;if(i<=q.r){for(n=Math.PI-Math.atan2(q.y-t,e-q.x),n=(n+3*Math.PI)%(2*Math.PI);o<G.length&&n>G[o].a;)o++;--o<0&&(o=G.length-1),q.n=G[o].n,m(!0)}else q.n!==!1&&(q.n=!1,m(!0))}},Ct=function(){et=[],tt=0,it()},m=function(e){p=-1,dt(),ft(),mt(),Q&&"top"==Q.z?(Tt[M](),ht()):(ht(),Tt[M]()),vt(),e||(k.onmouseover=k.onmousemove=k.onmouseout=void 0,q.n=!1,V?(t=K.getImageData(0,0,x,N),n&&yt[M](n.x,n.y),k.onmouseover=function(e){n=E(e)},k.onmousemove=function(e){n&&(L.pie||K.putImageData(t,0,0),n=E(e),yt[M](n.x,n.y))},k.onmouseout=function(){n=void 0,K.putImageData(t,0,0)}):n=void 0)},Et=function(e){var t,n=100/6,i=1/(e*n);t=function(){m(),1>nt&&(nt+=i,nt>=1&&(nt=1),setTimeout(t,n))},nt=0,t()};return K.translate(.5,.5),e.datas?at(e.datas):it(),e.anim?Et(e.anim):m(),{canvas:k,data:et,clear:function(){return Ct(),this},load:function(e){return at(e),this},cls:function(){return this},draw:function(e){return e&&(M=I(e),L=S(e),it()),m(),this}}},plotter=harry;
?>