(function(n){var o="0.4.2",e="hasOwnProperty",f=/[\.\/]/,s="*",h=function(){},c=function(n,t){return n-t},r,i,u={n:{}},t=function(n,f){var o,p;n=String(n);var k=u,w=i,v=Array.prototype.slice.call(arguments,2),s=t.listeners(n),a=0,e,l=[],y={},h=[],b=r;for(r=n,i=0,o=0,p=s.length;o
=1e3&&delete f[e.shift()],e.push(u),f[u]=n[v](t,o),i?i(f[u]):f[u])}return r}function oi(){return this.hex}function br(n,t){for(var i,f=[],r=0,u=n.length;u-2*!t>r;r+=2)i=[{x:+n[r-2],y:+n[r-1]},{x:+n[r],y:+n[r+1]},{x:+n[r+2],y:+n[r+3]},{x:+n[r+4],y:+n[r+5]}],t?r?u-4==r?i[3]={x:+n[0],y:+n[1]}:u-2==r&&(i[2]={x:+n[0],y:+n[1]},i[3]={x:+n[2],y:+n[3]}):i[0]={x:+n[u-2],y:+n[u-1]}:u-4==r?i[3]=i[2]:r||(i[0]={x:+n[r],y:+n[r+1]}),f.push(["C",(-i[0].x+6*i[1].x+i[2].x)/6,(-i[0].y+6*i[1].y+i[2].y)/6,(i[1].x+6*i[2].x-i[3].x)/6,(i[1].y+6*i[2].y-i[3].y)/6,i[2].x,i[2].y]);return f}function kr(n,t,i,r,u){var f=-3*t+9*i-9*r+3*u,e=n*f+6*t-12*i+6*r;return n*e-3*t+3*i}function vt(n,t,i,r,f,e,o,s,h){var c;h==null&&(h=1);h=h>1?1:h<0?0:h;var l=h/2,w=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],b=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],a=0;for(c=0;c<12;c++){var v=l*w[c]+l,y=kr(v,n,i,f,o),p=kr(v,t,r,e,s),k=y*y+p*p;a+=b[c]*u.sqrt(k)}return l*a}function lf(n,t,i,r,u,f,e,o,s){if(!(s<0)&&!(vt(n,t,i,r,u,f,e,o).01;)l/=2,h+=(co(u,e))&&!(o(t,r)o(f,s))){var p=(n*r-t*i)*(u-e)-(n-i)*(u*s-f*e),w=(n*r-t*i)*(f-s)-(t-r)*(u*s-f*e),a=(n-i)*(f-s)-(t-r)*(u-e);if(a){var v=p/a,y=w/a,h=+v.toFixed(2),c=+y.toFixed(2);if(!(h<+l(n,i).toFixed(2))&&!(h>+o(n,i).toFixed(2))&&!(h<+l(u,e).toFixed(2))&&!(h>+o(u,e).toFixed(2))&&!(c<+l(t,r).toFixed(2))&&!(c>+o(t,r).toFixed(2))&&!(c<+l(f,s).toFixed(2))&&!(c>+o(f,s).toFixed(2)))return{x:v,y:y}}}}function di(n,t,r){var ut=i.bezierBBox(n),ft=i.bezierBBox(t),u,h,c,d,g;if(!i.isBBoxIntersect(ut,ft))return r?0:[];var et=vt.apply(0,n),ot=vt.apply(0,t),p=o(~~(et/5),1),w=o(~~(ot/5),1),nt=[],tt=[],rt={},it=r?0:[];for(u=0;u=0&&d<=1.001&&g>=0&&g<=1.001&&(r?it++:it.push({x:f.x,y:f.y,t1:l(d,1),t2:l(g,1)}))}}return it}function gi(n,t,r){var e,o,s,h,b,k,d,g,c,l,y,p,nt,a,w,tt,v,u,f,it;for(n=i._path2curve(n),t=i._path2curve(t),y=r?0:[],p=0,nt=n.length;pu)return u;while(rf?r=i:u=i;i=(u-r)/2+r}return i}var e=3*t,o=3*(r-t)-e,h=1-e-o,s=3*i,c=3*(u-i)-s,a=1-s-c;return v(n,1/(200*f))}function ft(n,t){var i=[],u={},r;if(this.ms=t,this.times=1,n){for(r in n)n[a](r)&&(u[h(r)]=n[r],i.push(h(r)));i.sort(tf)}this.anim=u;this.top=i[i.length-1];this.percents=i}function kt(n,r,u,e,o,c){var nt,v,et,l,at,dt,ii,tt,vt,gt,yt,d,rt,st,ct,ni,ft,lt;u=h(u);var it,ot,pt,ti,bt,kt,w=n.ms,y={},g={},k={};if(e){for(v=0,et=f.length;ve*n.top){u=n.percents[v];bt=n.percents[v-1]||0;w=w/n.top*(u-bt);ti=n.percents[v+1];it=n.anim[u];break}else e&&r.attr(n.anim[n.percents[v]]);if(it){if(ot)ot.initstatus=e,ot.start=new Date-ot.ms*e;else{for(l in it)if(it[a](l)&&(wi[a](l)||r.paper.customAttributes[a](l))){y[l]=r.attr(l);y[l]==null&&(y[l]=bu[l]);g[l]=it[l];switch(wi[l]){case p:k[l]=(g[l]-y[l])/w;break;case"colour":y[l]=i.getRGB(y[l]);at=i.getRGB(g[l]);k[l]={r:(at.r-y[l].r)/w,g:(at.g-y[l].g)/w,b:(at.b-y[l].b)/w};break;case"path":for(dt=wt(y[l],g[l]),ii=dt[1],y[l]=dt[0],k[l]=[],v=0,et=y[l].length;v',fi=ui.firstChild,fi.style.behavior="url(#default#VML)",!(fi&&typeof fi.adj=="object"))return i.type=d;ui=null}i.svg=!(i.vml=i.type=="VML");i._Paper=hr;i.fn=c=hr.prototype=i.prototype;i._id=0;i._oid=0;i.is=function(n,t){return(t=ni.call(t),t=="finite")?!pu[a](+n):t=="array"?n instanceof Array:t=="null"&&n===null||t==typeof n&&n!==null||t=="object"&&n===Object(n)||t=="array"&&Array.isArray&&Array.isArray(n)||vu.call(n).slice(8,-1).toLowerCase()==t};i.angle=function(n,t,r,f,e,o){if(e==null){var s=n-r,h=t-f;return!s&&!h?0:(180+u.atan2(-h,-s)*180/k+360)%360}return i.angle(n,t,e,o)-i.angle(r,f,e,o)};i.rad=function(n){return n%360*k/180};i.deg=function(n){return n*180/k%360};i.snapTo=function(n,t,r){var f,u;if(r=i.is(r,"finite")?r:10,i.is(n,tt)){for(f=n.length;f--;)if(y(n[f]-t)<=r)return n[f]}else{if(n=+n,u=t%n,un-r)return t-u+n}return t};ff=i.createUUID=function(n,t){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(n,t).toUpperCase()}}(/[xy]/g,function(n){var t=u.random()*16|0,i=n=="x"?t:t&3|8;return i.toString(16)});i.setWindow=function(n){t("raphael.setWindow",i,r.win,n);r.win=n;r.doc=r.win.document;i._engine.initWin&&i._engine.initWin(r.win)};var ei=function(n){var e,u,f,o,t;if(i.vml){e=/^\s+|\s+$/g;try{f=new ActiveXObject("htmlfile");f.write("");f.close();u=f.body}catch(s){u=createPopup().document.body}o=u.createTextRange();ei=it(function(n){try{u.style.color=b(n).replace(e,d);var t=o.queryCommandValue("ForeColor");return t=(t&255)<<16|t&65280|(t&16711680)>>>16,"#"+("000000"+t.toString(16)).slice(-6)}catch(i){return"none"}})}else t=r.doc.createElement("i"),t.title="Raphaël Colour Picker",t.style.display="none",r.doc.body.appendChild(t),ei=it(function(n){return t.style.color=n,r.doc.defaultView.getComputedStyle(t,d).getPropertyValue("color")});return ei(n)},ef=function(){return"hsb("+[this.h,this.s,this.b]+")"},sf=function(){return"hsl("+[this.h,this.s,this.l]+")"},yr=function(){return this.hex},pr=function(n,t,r){if(t==null&&i.is(n,"object")&&"r"in n&&"g"in n&&"b"in n&&(r=n.b,t=n.g,n=n.r),t==null&&i.is(n,ti)){var u=i.getRGB(n);n=u.r;t=u.g;r=u.b}return(n>1||t>1||r>1)&&(n/=255,t/=255,r/=255),[n,t,r]},wr=function(n,t,r,u){n*=255;t*=255;r*=255;var f={r:n,g:t,b:r,hex:i.rgb(n,t,r),toString:yr};return i.is(u,"finite")&&(f.opacity=u),f};i.color=function(n){var t;return i.is(n,"object")&&"h"in n&&"s"in n&&"b"in n?(t=i.hsb2rgb(n),n.r=t.r,n.g=t.g,n.b=t.b,n.hex=t.hex):i.is(n,"object")&&"h"in n&&"s"in n&&"l"in n?(t=i.hsl2rgb(n),n.r=t.r,n.g=t.g,n.b=t.b,n.hex=t.hex):(i.is(n,"string")&&(n=i.getRGB(n)),i.is(n,"object")&&"r"in n&&"g"in n&&"b"in n?(t=i.rgb2hsl(n),n.h=t.h,n.s=t.s,n.l=t.l,t=i.rgb2hsb(n),n.v=t.b):(n={hex:"none"},n.r=n.g=n.b=n.h=n.s=n.v=n.l=-1)),n.toString=yr,n};i.hsb2rgb=function(n,t,i,r){this.is(n,"object")&&"h"in n&&"s"in n&&"b"in n&&(i=n.b,t=n.s,n=n.h,r=n.o);n*=360;var e,o,s,f,u;return n=n%360/60,u=i*t,f=u*(1-y(n%2-1)),e=o=s=i-u,n=~~n,e+=[u,f,0,0,f,u][n],o+=[f,u,u,f,0,0][n],s+=[0,0,f,u,u,f][n],wr(e,o,s,r)};i.hsl2rgb=function(n,t,i,r){this.is(n,"object")&&"h"in n&&"s"in n&&"l"in n&&(i=n.l,t=n.s,n=n.h);(n>1||t>1||i>1)&&(n/=360,t/=100,i/=100);n*=360;var e,o,s,f,u;return n=n%360/60,u=2*t*(i<.5?i:1-i),f=u*(1-y(n%2-1)),e=o=s=i-u/2,n=~~n,e+=[u,f,0,0,f,u][n],o+=[f,u,u,f,0,0][n],s+=[0,0,f,u,u,f][n],wr(e,o,s,r)};i.rgb2hsb=function(n,t,i){i=pr(n,t,i);n=i[0];t=i[1];i=i[2];var f,e,u,r;return u=o(n,t,i),r=u-l(n,t,i),f=r==0?null:u==n?(t-i)/r:u==t?(i-n)/r+2:(n-t)/r+4,f=(f+360)%6/6,e=r==0?0:r/u,{h:f,s:e,b:u,toString:ef}};i.rgb2hsl=function(n,t,i){i=pr(n,t,i);n=i[0];t=i[1];i=i[2];var e,h,u,f,s,r;return f=o(n,t,i),s=l(n,t,i),r=f-s,e=r==0?null:f==n?(t-i)/r:f==t?(i-n)/r+2:(n-t)/r+4,e=(e+360)%6/6,u=(f+s)/2,h=r==0?0:u<.5?r/(2*u):r/(2-2*u),{h:e,s:h,l:u,toString:sf}};i._path2string=function(){return this.join(",").replace(du,"$1")};cf=i._preload=function(n,t){var i=r.doc.createElement("img");i.style.cssText="position:absolute;left:-9999em;top:-9999em";i.onload=function(){t.call(this);this.onload=null;r.doc.body.removeChild(this)};i.onerror=function(){r.doc.body.removeChild(this)};r.doc.body.appendChild(i);i.src=n};i.getRGB=it(function(n){if(!n||!!((n=b(n)).indexOf("-")+1))return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:oi};if(n=="none")return{r:-1,g:-1,b:-1,hex:"none",toString:oi};ku[a](n.toLowerCase().substring(0,2))||n.charAt()=="#"||(n=ei(n));var u,f,e,o,s,t,r=n.match(yu);return r?(r[2]&&(e=st(r[2].substring(5),16),f=st(r[2].substring(3,5),16),u=st(r[2].substring(1,3),16)),r[3]&&(e=st((s=r[3].charAt(3))+s,16),f=st((s=r[3].charAt(2))+s,16),u=st((s=r[3].charAt(1))+s,16)),r[4]&&(t=r[4][ut](bi),u=h(t[0]),t[0].slice(-1)=="%"&&(u*=2.55),f=h(t[1]),t[1].slice(-1)=="%"&&(f*=2.55),e=h(t[2]),t[2].slice(-1)=="%"&&(e*=2.55),r[1].toLowerCase().slice(0,4)=="rgba"&&(o=h(t[3])),t[3]&&t[3].slice(-1)=="%"&&(o/=100)),r[5])?(t=r[5][ut](bi),u=h(t[0]),t[0].slice(-1)=="%"&&(u*=2.55),f=h(t[1]),t[1].slice(-1)=="%"&&(f*=2.55),e=h(t[2]),t[2].slice(-1)=="%"&&(e*=2.55),(t[0].slice(-3)=="deg"||t[0].slice(-1)=="°")&&(u/=360),r[1].toLowerCase().slice(0,4)=="hsba"&&(o=h(t[3])),t[3]&&t[3].slice(-1)=="%"&&(o/=100),i.hsb2rgb(u,f,e,o)):r[6]?(t=r[6][ut](bi),u=h(t[0]),t[0].slice(-1)=="%"&&(u*=2.55),f=h(t[1]),t[1].slice(-1)=="%"&&(f*=2.55),e=h(t[2]),t[2].slice(-1)=="%"&&(e*=2.55),(t[0].slice(-3)=="deg"||t[0].slice(-1)=="°")&&(u/=360),r[1].toLowerCase().slice(0,4)=="hsla"&&(o=h(t[3])),t[3]&&t[3].slice(-1)=="%"&&(o/=100),i.hsl2rgb(u,f,e,o)):(r={r:u,g:f,b:e,toString:oi},r.hex="#"+(16777216|e|f<<8|u<<16).toString(16).slice(1),i.is(o,"finite")&&(r.opacity=o),r):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:oi}},i);i.hsb=it(function(n,t,r){return i.hsb2rgb(n,t,r).hex});i.hsl=it(function(n,t,r){return i.hsl2rgb(n,t,r).hex});i.rgb=it(function(n,t,i){return"#"+(16777216|i|t<<8|n<<16).toString(16).slice(1)});i.getColor=function(n){var t=this.getColor.start=this.getColor.start||{h:0,s:1,b:n||.75},i=this.hsb2rgb(t.h,t.s,t.b);return t.h+=.075,t.h>1&&(t.h=0,t.s-=.2,t.s<=0&&(this.getColor.start={h:0,s:1,b:t.b})),i.hex};i.getColor.reset=function(){delete this.start};i.parsePathString=function(n){var r,u,t;return n?(r=et(n),r.arr)?rt(r.arr):(u={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},t=[],i.is(n,tt)&&i.is(n[0],tt)&&(t=rt(n)),t.length||b(n).replace(gu,function(n,i,r){var f=[],e=i.toLowerCase();if(r.replace(ar,function(n,t){t&&f.push(+t)}),e=="m"&&f.length>2&&(t.push([i][s](f.splice(0,2))),e="l",i=i=="m"?"l":"L"),e=="r")t.push([i][s](f));else while(f.length>=u[e])if(t.push([i][s](f.splice(0,u[e]))),!u[e])break}),t.toString=i._path2string,r.arr=rt(t),t):null};i.parseTransformString=it(function(n){if(!n)return null;var t=[];return i.is(n,tt)&&i.is(n[0],tt)&&(t=rt(n)),t.length||b(n).replace(nf,function(n,i,r){var u=[],f=ni.call(i);r.replace(ar,function(n,t){t&&u.push(+t)});t.push([i][s](u))}),t.toString=i._path2string,t});et=function(n){var t=et.ps=et.ps||{};return t[n]?t[n].sleep=100:t[n]={sleep:100},setTimeout(function(){for(var i in t)t[a](i)&&i!=n&&(t[i].sleep--,t[i].sleep||delete t[i])}),t[n]};i.findDotsAtSegment=function(n,t,i,r,f,e,o,s,h){var c=1-h,w=nt(c,3),b=nt(c,2),l=h*h,d=l*h,tt=w*n+b*3*h*i+c*3*h*h*f+d*o,it=w*t+b*3*h*r+c*3*h*h*e+d*s,a=n+2*h*(i-n)+l*(f-2*i+n),v=t+2*h*(r-t)+l*(e-2*r+t),y=i+2*h*(f-i)+l*(o-2*f+i),p=r+2*h*(e-r)+l*(s-2*e+r),rt=c*n+h*i,ut=c*t+h*r,ft=c*f+h*o,et=c*e+h*s,g=90-u.atan2(a-y,v-p)*180/k;return(a>y||v=n.x&&t<=n.x2&&i>=n.y&&i<=n.y2};i.isBBoxIntersect=function(n,t){var r=i.isPointInsideBBox;return r(t,n.x,n.y)||r(t,n.x2,n.y)||r(t,n.x,n.y2)||r(t,n.x2,n.y2)||r(n,t.x,t.y)||r(n,t.x2,t.y)||r(n,t.x,t.y2)||r(n,t.x2,t.y2)||(n.xt.x||t.xn.x)&&(n.yt.y||t.yn.y)};i.pathIntersection=function(n,t){return gi(n,t)};i.pathIntersectionNumber=function(n,t){return gi(n,t,1)};i.isPointInsidePath=function(n,t,r){var u=i.pathBBox(n);return i.isPointInsideBBox(u,t,r)&&gi(n,[["M",t,r],["H",u.x2+10]],1)%2==1};i._removedFactory=function(n){return function(){t("raphael.log",null,"Raphaël: you are calling to method “"+n+"” of removed object",n)}};var nr=i.pathBBox=function(n){var c=et(n),h,p,u;if(c.bbox)return pt(c.bbox);if(!n)return{x:0,y:0,width:0,height:0,x2:0,y2:0};n=wt(n);var f=0,e=0,i=[],r=[],t;for(h=0,p=n.length;h1&&(tt=u.sqrt(tt),i=tt*i,r=tt*r);var ht=i*i,ct=r*r,vt=(e==o?-1:1)*u.sqrt(y((ht*ct-ht*d*d-ct*b*b)/(ht*d*d+ct*b*b))),rt=vt*i*d/r+(n+h)/2,ft=vt*-r*b/i+(t+c)/2,v=u.asin(((t-ft)/r).toFixed(9)),a=u.asin(((c-ft)/r).toFixed(9));v=n