From 6e9e3b34db898afcca58a2f9648c0793c4eb30af Mon Sep 17 00:00:00 2001 From: Rohit Boggarapu Date: Tue, 2 Sep 2014 18:53:07 +0530 Subject: [PATCH] Update package.json version and recompile package files for release/1.1.11 --- package.json | 2 +- package/raphael-fusioncharts.js | 54 ++++++++++++++++++++------------- package/raphael-min.js | 10 +++--- package/raphael.js | 54 ++++++++++++++++++++------------- 4 files changed, 72 insertions(+), 48 deletions(-) diff --git a/package.json b/package.json index b20f1dc..42175df 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "redraphael", "filename": "raphael", - "version": "1.1.10", + "version": "1.1.11", "rversion": "2.1.0", "description": "RedRaphael", "scripts": { diff --git a/package/raphael-fusioncharts.js b/package/raphael-fusioncharts.js index 68a1239..11ecaa0 100644 --- a/package/raphael-fusioncharts.js +++ b/package/raphael-fusioncharts.js @@ -16,7 +16,7 @@ window.FusionCharts && window.FusionCharts.register('module', ['private', 'vendo /**! - * RedRaphael 1.1.10 - JavaScript Vector Library + * RedRaphael 1.1.11 - JavaScript Vector Library * Copyright (c) 2012-2013 FusionCharts Technologies * * Raphael 2.1.0 @@ -531,6 +531,10 @@ window.FusionCharts && window.FusionCharts.register('module', ['private', 'vendo objectToStr = "[object Object]", arraySlice = Array.prototype.slice, arraySplice = Array.prototype.splice, + hasPrototypeBug = (function () { + var a = function () {}; + return a.hasOwnProperty("prototype"); + }()), g = { doc: document, win: window @@ -1077,26 +1081,7 @@ window.FusionCharts && window.FusionCharts.register('module', ['private', 'vendo (type == "array" && Array.isArray && Array.isArray(o)) || objectToString.call(o).slice(8, -1).toLowerCase() == type; }, - /*\ - * Raphael.clone - [ method ] - ** - * Returns a recursively cloned version of an object. - \*/ - clone = R.clone = function (obj) { - if (Object(obj) !== obj) { - return obj; - } - var res = new obj.constructor; - for (var key in obj) - if (obj[has](key)) { - res[key] = clone(obj[key]); - } - return res; - }, - - /*\ * Raphael.createUUID [ method ] ** @@ -1110,7 +1095,34 @@ window.FusionCharts && window.FusionCharts.register('module', ['private', 'vendo var r = math.random() * 16 | 0, v = c == "x" ? r : (r & 3 | 8); return v.toString(16); - }); + }), + /*\ + * Raphael.clone + [ method ] + ** + * Returns a recursively cloned version of an object. + \*/ + clone = R.clone = hasPrototypeBug ? function (obj) { + if (Object(obj) !== obj) { + return obj; + } + var res = new obj.constructor; + for (var key in obj) + if (key !== "prototype" && obj[has](key)) { + res[key] = clone(obj[key]); + } + return res; + } : function (obj) { + if (Object(obj) !== obj) { + return obj; + } + var res = new obj.constructor; + for (var key in obj) + if (obj[has](key)) { + res[key] = clone(obj[key]); + } + return res; + }; R._g = g; diff --git a/package/raphael-min.js b/package/raphael-min.js index bbaeb33..787ecd0 100644 --- a/package/raphael-min.js +++ b/package/raphael-min.js @@ -1,5 +1,5 @@ /**! - * RedRaphael 1.1.10 - JavaScript Vector Library + * RedRaphael 1.1.11 - JavaScript Vector Library * Copyright (c) 2012-2013 FusionCharts Technologies * * Raphael 2.1.0 @@ -8,8 +8,8 @@ * * Licensed under the MIT license. */ -!function(a){var b,c,d="0.4.2",e="hasOwnProperty",f=/[\.\/]/,g="*",h=function(){},i=function(a,b){return a-b},j={n:{}},k=function(a,d){a=String(a);var e,f=c,g=Array.prototype.slice.call(arguments,2),h=k.listeners(a),j=0,l=[],m={},n=[],o=b;b=a,c=0;for(var p=0,q=h.length;q>p;p++)"zIndex"in h[p]&&(l.push(h[p].zIndex),h[p].zIndex<0&&(m[h[p].zIndex]=h[p]));for(l.sort(i);l[j]<0;)if(e=m[l[j++]],n.push(e.apply(d,g)),c)return c=f,n;for(p=0;q>p;p++)if(e=h[p],"zIndex"in e)if(e.zIndex==l[j]){if(n.push(e.apply(d,g)),c)break;do if(j++,e=m[l[j]],e&&n.push(e.apply(d,g)),c)break;while(e)}else m[e.zIndex]=e;else if(n.push(e.apply(d,g)),c)break;return c=f,b=o,n.length?n:null};k._events=j,k.listeners=function(a){var b,c,d,e,h,i,k,l,m=a.split(f),n=j,o=[n],p=[];for(e=0,h=m.length;h>e;e++){for(l=[],i=0,k=o.length;k>i;i++)for(n=o[i].n,c=[n[m[e]],n[g]],d=2;d--;)b=c[d],b&&(l.push(b),p=p.concat(b.f||[]));o=l}return p},k.on=function(a,b){if(a=String(a),"function"!=typeof b)return function(){};for(var c=a.split(f),d=j,e=0,g=c.length;g>e;e++)d=d.n,d=d.hasOwnProperty(c[e])&&d[c[e]]||(d[c[e]]={n:{}});for(d.f=d.f||[],e=0,g=d.f.length;g>e;e++)if(d.f[e]==b)return h;return d.f.push(b),function(a){+a==+a&&(b.zIndex=+a)}},k.f=function(a){var b=[].slice.call(arguments,1);return function(){k.apply(null,[a,null].concat(b).concat([].slice.call(arguments,0)))}},k.stop=function(){c=1},k.nt=function(a){return a?new RegExp("(?:\\.|\\/|^)"+a+"(?:\\.|\\/|$)").test(b):b},k.nts=function(){return b.split(f)},k.off=k.unbind=function(a,b){if(!a)return void(k._events=j={n:{}});var c,d,h,i,l,m,n,o=a.split(f),p=[j];for(i=0,l=o.length;l>i;i++)for(m=0;mi;i++)for(c=p[i];c.n;){if(b){if(c.f){for(m=0,n=c.f.length;n>m;m++)if(c.f[m]==b){c.f.splice(m,1);break}!c.f.length&&delete c.f}for(d in c.n)if(c.n[e](d)&&c.n[d].f){var q=c.n[d].f;for(m=0,n=q.length;n>m;m++)if(q[m]==b){q.splice(m,1);break}!q.length&&delete c.n[d].f}}else{delete c.f;for(d in c.n)c.n[e](d)&&c.n[d].f&&delete c.n[d].f}c=c.n}},k.once=function(a,b){var c=function(){return k.unbind(a,c),b.apply(this,arguments)};return k.on(a,c)},k.version=d,k.toString=function(){return"You are running Eve "+d},"undefined"!=typeof module&&module.exports?module.exports=k:"undefined"!=typeof define?define("eve",[],function(){return k}):a.eve=k}(this),function(a,b){"function"==typeof define&&define.amd?define(["eve"],function(c){return b(a,c)}):b(a,a.eve)}(this,function(a,b){function c(a){var d,e;return c._url="",c.is(a,"function")?s?a():b.on("raphael.DOMload",a):c.is(a,D)?c._engine.create[z](c,a.splice(0,3+c.is(a[0],B))).add(a):(d=Array.prototype.slice.call(arguments,0),c.is(d[d.length-1],"function")?(e=d.pop(),s?e.call(c._engine.create[z](c,d)):b.on("raphael.DOMload",function(){e.call(c._engine.create[z](c,d))})):c._engine.create[z](c,arguments))}function d(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return a.push(a.splice(c,1)[0])}function e(){return this.hex}function f(a,b){for(var c=[],d=0,e=a.length;e-2*!b>d;d+=2){var f=[{x:+a[d-2],y:+a[d-1]},{x:+a[d],y:+a[d+1]},{x:+a[d+2],y:+a[d+3]},{x:+a[d+4],y:+a[d+5]}];b?d?e-4==d?f[3]={x:+a[0],y:+a[1]}:e-2==d&&(f[2]={x:+a[0],y:+a[1]},f[3]={x:+a[2],y:+a[3]}):f[0]={x:+a[e-2],y:+a[e-1]}:e-4==d?f[3]=f[2]:d||(f[0]={x:+a[d],y:+a[d+1]}),c.push(["C",(-f[0].x+6*f[1].x+f[2].x)/6,(-f[0].y+6*f[1].y+f[2].y)/6,(f[1].x+6*f[2].x-f[3].x)/6,(f[1].y+6*f[2].y-f[3].y)/6,f[2].x,f[2].y])}return c}function g(a,b,c,d,e){var f=-3*b+9*c-9*d+3*e,g=a*f+6*b-12*c+6*d;return a*g-3*b+3*c}function h(a,b,c,d,e,f,h,i,j){null==j&&(j=1),j=j>1?1:0>j?0:j;for(var k=j/2,l=12,m=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],n=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],o=0,p=0;l>p;p++){var q=k*m[p]+k,r=g(q,a,c,e,h),s=g(q,b,d,f,i),t=r*r+s*s;o+=n[p]*hb(t)}return k*o}function i(a,b,c,d,e,f,g,i,j){if(!(0>j||h(a,b,c,d,e,f,g,i)o;)m/=2,n+=(j>k?1:-1)*m,k=h(a,b,c,d,e,f,g,i,n);return n}}function j(a,b,c,d,e,f,g,h){if(!(bb(a,c)bb(e,g)||bb(b,d)bb(f,h))){var i=(a*d-b*c)*(e-g)-(a-c)*(e*h-f*g),j=(a*d-b*c)*(f-h)-(b-d)*(e*h-f*g),k=(a-c)*(f-h)-(b-d)*(e-g);if(k){var l=i/k,m=j/k,n=+l.toFixed(2),o=+m.toFixed(2);if(!(n<+cb(a,c).toFixed(2)||n>+bb(a,c).toFixed(2)||n<+cb(e,g).toFixed(2)||n>+bb(e,g).toFixed(2)||o<+cb(b,d).toFixed(2)||o>+bb(b,d).toFixed(2)||o<+cb(f,h).toFixed(2)||o>+bb(f,h).toFixed(2)))return{x:l,y:m}}}}function k(a,b,d){var e=c.bezierBBox(a),f=c.bezierBBox(b);if(!c.isBBoxIntersect(e,f))return d?0:[];for(var g=h.apply(0,a),i=h.apply(0,b),k=bb(~~(g/5),1),l=bb(~~(i/5),1),m=[],n=[],o={},p=d?0:[],q=0;k+1>q;q++){var r=c.findDotsAtSegment.apply(c,a.concat(q/k));m.push({x:r.x,y:r.y,t:q/k})}for(q=0;l+1>q;q++)r=c.findDotsAtSegment.apply(c,b.concat(q/l)),n.push({x:r.x,y:r.y,t:q/l});for(q=0;k>q;q++)for(var s=0;l>s;s++){var t=m[q],u=m[q+1],v=n[s],w=n[s+1],x=db(u.x-t.x)<.001?"y":"x",y=db(w.x-v.x)<.001?"y":"x",z=j(t.x,t.y,u.x,u.y,v.x,v.y,w.x,w.y);if(z){if(o[z.x.toFixed(4)]==z.y.toFixed(4))continue;o[z.x.toFixed(4)]=z.y.toFixed(4);var A=t.t+db((z[x]-t[x])/(u[x]-t[x]))*(u.t-t.t),B=v.t+db((z[y]-v[y])/(w[y]-v[y]))*(w.t-v.t);A>=0&&1.001>=A&&B>=0&&1.001>=B&&(d?p++:p.push({x:z.x,y:z.y,t1:cb(A,1),t2:cb(B,1)}))}}return p}function l(a,b,d){a=c._path2curve(a),b=c._path2curve(b);for(var e,f,g,h,i,j,l,m,n,o,p=d?0:[],q=0,r=a.length;r>q;q++){var s=a[q];if("M"==s[0])e=i=s[1],f=j=s[2];else{"C"==s[0]?(n=[e,f].concat(s.slice(1)),e=n[6],f=n[7]):(n=[e,f,e,f,i,j,i,j],e=i,f=j);for(var t=0,u=b.length;u>t;t++){var v=b[t];if("M"==v[0])g=l=v[1],h=m=v[2];else{"C"==v[0]?(o=[g,h].concat(v.slice(1)),g=o[6],h=o[7]):(o=[g,h,g,h,l,m,l,m],g=l,h=m);var w=k(n,o,d);if(d)p+=w;else{for(var x=0,y=w.length;y>x;x++)w[x].segment1=q,w[x].segment2=t,w[x].bez1=n,w[x].bez2=o;p=p.concat(w)}}}}}return p}function m(a,b,c,d,e,f){null!=a?(this.a=+a,this.b=+b,this.c=+c,this.d=+d,this.e=+e,this.f=+f):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function n(){return this.x+v+this.y+v+this.width+" × "+this.height}function o(a,b,c,d,e,f){function g(a){return((l*a+k)*a+j)*a}function h(a,b){var c=i(a,b);return((o*c+n)*c+m)*c}function i(a,b){var c,d,e,f,h,i;for(e=a,i=0;8>i;i++){if(f=g(e)-a,db(f)e)return c;if(e>d)return d;for(;d>c;){if(f=g(e),db(f-a)f?c=e:d=e,e=(d-c)/2+c}return e}var j=3*b,k=3*(d-b)-j,l=1-j-k,m=3*c,n=3*(e-c)-m,o=1-m-n;return h(a,1/(200*f))}function p(a,b){var c=[],d={};if(this.ms=b,this.times=1,a){for(var e in a)a[w](e)&&(d[$(e)]=a[e],c.push($(e)));c.sort(Db)}this.anim=d,this.top=c[c.length-1],this.percents=c}function q(a,d,e,f,g,h){e=$(e);var i,j,k,l,n,p,q=a.ms,r={},s={},t={};if(f)for(v=0,x=Ic.length;x>v;v++){var u=Ic[v];if(u.el.id==d.id&&u.anim==a){u.percent!=e?(Ic.splice(v,1),k=1):j=u,d.attr(u.totalOrigin);break}}else f=+s;for(var v=0,x=a.percents.length;x>v;v++){if(a.percents[v]==e||a.percents[v]>f*a.top){e=a.percents[v],n=a.percents[v-1]||0,q=q/a.top*(e-n),l=a.percents[v+1],i=a.anim[e];break}f&&d.attr(a.anim[a.percents[v]])}if(i){if(j)j.initstatus=f,j.start=new Date-j.ms*f;else{for(var y in i)if(i[w](y)&&(Bb[w](y)||d.ca[y]))switch(r[y]=d.attr(y),null==r[y]&&(r[y]=Ab[y]),s[y]=i[y],Bb[y]){case B:t[y]=(s[y]-r[y])/q;break;case"colour":r[y]=c.getRGB(r[y]);var z=c.getRGB(s[y]);t[y]={r:(z.r-r[y].r)/q,g:(z.g-r[y].g)/q,b:(z.b-r[y].b)/q};break;case"path":var C=gc(r[y],s[y]),D=C[1];for(r[y]=C[0],t[y]=[],v=0,x=r[y].length;x>v;v++){t[y][v]=[0];for(var E=1,F=r[y][v].length;F>E;E++)t[y][v][E]=(D[v][E]-r[y][v][E])/q}break;case"transform":var H=d._,I=lc(H[y],s[y]);if(I)for(r[y]=I.from,s[y]=I.to,t[y]=[],t[y].real=!0,v=0,x=r[y].length;x>v;v++)for(t[y][v]=[r[y][v][0]],E=1,F=r[y][v].length;F>E;E++)t[y][v][E]=(s[y][v][E]-r[y][v][E])/q;else{var J=d.matrix||new m,K={_:{transform:H.transform},getBBox:function(){return d.getBBox(1)}};r[y]=[J.a,J.b,J.c,J.d,J.e,J.f],jc(K,s[y]),s[y]=K._.transform,t[y]=[(K.matrix.a-J.a)/q,(K.matrix.b-J.b)/q,(K.matrix.c-J.c)/q,(K.matrix.d-J.d)/q,(K.matrix.e-J.e)/q,(K.matrix.f-J.f)/q]}break;case"csv":var L=Z(i[y])[G](pb),M=Z(r[y])[G](pb);if("clip-rect"==y)for(r[y]=M,t[y]=[],v=M.length;v--;)t[y][v]=(L[v]-r[y][v])/q;s[y]=L;break;default:for(L=[][A](i[y]),M=[][A](r[y]),t[y]=[],v=d.ca[y].length;v--;)t[y][v]=((L[v]||0)-(M[v]||0))/q}var N=i.easing,O=c.easing_formulas[N];if(!O)if(O=Z(N).match(sb),O&&5==O.length){var P=O;O=function(a){return o(a,+P[1],+P[2],+P[3],+P[4],q)}}else O=Fb;if(p=i.start||a.start||+new Date,u={anim:a,percent:e,timestamp:p,start:p+(a.del||0),status:0,initstatus:f||0,stop:!1,ms:q,easing:O,from:r,diff:t,to:s,el:d,callback:i.callback,prev:n,next:l,repeat:h||a.times,origin:d.attr(),totalOrigin:g},Ic.push(u),f&&!j&&!k&&(u.stop=!0,u.start=new Date-q*f,1==Ic.length))return Kc();k&&(u.start=new Date-u.ms*f),1==Ic.length&&Jc(Kc)}b("raphael.anim.start."+d.id,d,a)}}function r(a){for(var b=0;be;e++)for(i=a[e],f=1,h=i.length;h>f;f+=2)c=b.x(i[f],i[f+1]),d=b.y(i[f],i[f+1]),i[f]=c,i[f+1]=d;return a},Kb=(c.pick=function(){for(var a,b=0,c=arguments.length;c>b;b+=1)if(a=arguments[b],a||a===!1||0===a)return a;return t},c._lastArgIfGroup=function(a,b){var d=a.length-1,e=a[d];return e&&e.constructor===c.el.constructor&&"group"===e.type?(b&&(a[d]=void 0,delete a[d],N.call(a,d,1)),e):void 0}),Lb=c._serializeArgs=function(a){var b,d,e,f,g=a[0];if(c.is(g,"object")&&!c.is(g,"array")&&"group"!==g.type)for(d=g,g.path&&(b=g.path,b&&!c.is(b,C)&&!c.is(b[0],D)&&(b+=u)),e=1,f=arguments.length;f>e;e+=2)d[arguments[e]]||(d[arguments[e]]=arguments[e+1]);else for(d={},e=1,f=arguments.length;f>e;e+=2)d[arguments[e]]=a[(e-1)/2]||arguments[e+1];return d},Mb=c.merge=function(a,b,c,d,e){var f,g,h,i,j;if(e?(d.push(a),e.push(b)):(d=[a],e=[b]),b instanceof Array)for(f=0;f',Pb=Qb.firstChild,Pb.style.behavior="url(#default#VML)",!Pb||typeof Pb.adj!=E)return c.type=u;Qb=null}c.svg=!((c.vml="VML"==c.type)||(c.canvas="CANVAS"==c.type)),c._Paper=U,c._id=0,c._oid=0,c.angle=function(a,b,d,e,f,g){if(null==f){var h=a-d,i=b-e;return h||i?(180+ab.atan2(-i,-h)*lb+360)%360:0}return c.angle(a,b,f,g)-c.angle(d,e,f,g)},c.rad=function(a){return a%360*kb},c.deg=function(a){return a*lb%360},c.snapTo=function(a,b,c){var d,e;if(Nb(c,F)||(c=10),Nb(a,D)){for(e=a.length;e--;)if(db(a[e]-b)<=c)return a[e]}else{if(a=+a,d=b%a,c>d)return b-d;if(d>a-c)return b-d+a}return b},c.setWindow=function(a){b("raphael.setWindow",c,O.win,a),R=O.win=a,Q=O.doc=O.win.document,c._engine.initWin&&c._engine.initWin(O.win)};var Rb=function(a){if(c.vml){var b,d=/^\s+|\s+$/g;try{var e=new ActiveXObject("htmlfile");e.write(""),e.close(),b=e.body}catch(f){b=createPopup().document.body}var g=b.createTextRange();Rb=Xb(function(a){try{b.style.color=Z(a).replace(d,u);var c=g.queryCommandValue("ForeColor");return c=(255&c)<<16|65280&c|(16711680&c)>>>16,"#"+("000000"+c.toString(16)).slice(-6)}catch(e){return H}})}else{var h=O.doc.createElement("i");h.title="Raphaël Colour Picker",h.style.display=H,O.doc.body.appendChild(h),Rb=Xb(function(a){return h.style.color=a,O.doc.defaultView.getComputedStyle(h,u).getPropertyValue("color")})}return Rb(a)},Sb=function(){return"hsb("+[this.h,this.s,this.b]+")"},Tb=function(){return"hsl("+[this.h,this.s,this.l]+")"},Ub=function(){return this.hex},Vb=function(a,b,d){if(null==b&&Nb(a,E)&&"r"in a&&"g"in a&&"b"in a&&(d=a.b,b=a.g,a=a.r),null==b&&Nb(a,C)){var e=c.getRGB(a);a=e.r,b=e.g,d=e.b}return(a>1||b>1||d>1)&&(a/=255,b/=255,d/=255),[a,b,d]},Wb=function(a,b,d,e){var f={r:a*=255,g:b*=255,b:d*=255,hex:c.rgb(a,b,d),toString:Ub};return Nb(e,"finite")&&(f.opacity=e),f};c.color=function(a){var b;return c.is(a,E)&&"h"in a&&"s"in a&&"b"in a?(b=c.hsb2rgb(a),a.r=b.r,a.g=b.g,a.b=b.b,a.hex=b.hex):c.is(a,E)&&"h"in a&&"s"in a&&"l"in a?(b=c.hsl2rgb(a),a.r=b.r,a.g=b.g,a.b=b.b,a.hex=b.hex):(c.is(a,"string")&&(a=c.getRGB(a)),c.is(a,E)&&"r"in a&&"g"in a&&"b"in a?(b=c.rgb2hsl(a),a.h=b.h,a.s=b.s,a.l=b.l,b=c.rgb2hsb(a),a.v=b.b):(a={hex:H},a.r=a.g=a.b=a.h=a.s=a.v=a.l=-1)),a.toString=Ub,a},c.hsb2rgb=function(a,b,c,d){this.is(a,E)&&"h"in a&&"s"in a&&"b"in a&&(c=a.b,b=a.s,a=a.h,d=a.o),a*=360;var e,f,g,h,i;return a=a%360/60,i=c*b,h=i*(1-db(a%2-1)),e=f=g=c-i,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],Wb(e,f,g,d)},c.hsl2rgb=function(a,b,c,d){this.is(a,E)&&"h"in a&&"s"in a&&"l"in a&&(c=a.l,b=a.s,a=a.h),(a>1||b>1||c>1)&&(a/=360,b/=100,c/=100),a*=360;var e,f,g,h,i;return a=a%360/60,i=2*b*(.5>c?c:1-c),h=i*(1-db(a%2-1)),e=f=g=c-i/2,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],Wb(e,f,g,d)},c.rgb2hsb=function(a,b,c){c=Vb(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g;return f=bb(a,b,c),g=f-cb(a,b,c),d=0==g?null:f==a?(b-c)/g:f==b?(c-a)/g+2:(a-b)/g+4,d=(d+360)%6*60/360,e=0==g?0:g/f,{h:d,s:e,b:f,toString:Sb}},c.rgb2hsl=function(a,b,c){c=Vb(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g,h,i;return g=bb(a,b,c),h=cb(a,b,c),i=g-h,d=0==i?null:g==a?(b-c)/i:g==b?(c-a)/i+2:(a-b)/i+4,d=(d+360)%6*60/360,f=(g+h)/2,e=0==i?0:.5>f?i/(2*f):i/(2-2*f),{h:d,s:e,l:f,toString:Tb}},c._path2string=function(){return this.join(",").replace(ub,"$1")};{var Xb=c._cacher=function(a,b,c){function e(){var f=M.call(arguments,0),g=f.join("␀"),h=e.cache=e.cache||{},i=e.count=e.count||[];return h[w](g)?(d(i,g),c?c(h[g]):h[g]):(i.length>=1e3&&delete h[i.shift()],i.push(g),h[g]=a[z](b,f),c?c(h[g]):h[g])}return e};c._preload=function(a,b){var c=Q.createElement("img");c.style.cssText="position:absolute;left:-9999em;top:-9999em",c.onload=function(){b.call(this),this.onload=null,Q.body.removeChild(this)},c.onerror=function(){Q.body.removeChild(this)},Q.body.appendChild(c),c.src=a}}c.getRGB=Xb(function(a){var b,d,f,g,h,i,j;return a&&Nb(a,"object")&&"opacity"in a&&(b=a.opacity),!a||(a=Z(a)).indexOf("-")+1?{r:-1,g:-1,b:-1,hex:H,error:1,toString:e}:a==H?{r:-1,g:-1,b:-1,hex:H,toString:e}:(!(zb[w](a.toLowerCase().substring(0,2))||"#"===a.charAt())&&(a=Rb(a)),(j=a.match(rb))?(j[2]&&(g=_(j[2].substring(5),16),f=_(j[2].substring(3,5),16),d=_(j[2].substring(1,3),16)),j[3]&&(g=_((h=j[3].charAt(3))+h,16),f=_((h=j[3].charAt(2))+h,16),d=_((h=j[3].charAt(1))+h,16)),j[4]&&(i=j[4][G](tb),d=$(i[0]),"%"==i[0].slice(-1)&&(d*=2.55),f=$(i[1]),"%"==i[1].slice(-1)&&(f*=2.55),g=$(i[2]),"%"==i[2].slice(-1)&&(g*=2.55),"rgba"==j[1].toLowerCase().slice(0,4)&&(b=$(i[3])),i[3]&&"%"==i[3].slice(-1)&&(b/=100)),j[5]?(i=j[5][G](tb),d=$(i[0]),"%"==i[0].slice(-1)&&(d*=2.55),f=$(i[1]),"%"==i[1].slice(-1)&&(f*=2.55),g=$(i[2]),"%"==i[2].slice(-1)&&(g*=2.55),("deg"==i[0].slice(-3)||"°"==i[0].slice(-1))&&(d/=360),"hsba"==j[1].toLowerCase().slice(0,4)&&(b=$(i[3])),i[3]&&"%"==i[3].slice(-1)&&(b/=100),c.hsb2rgb(d,f,g,b)):j[6]?(i=j[6][G](tb),d=$(i[0]),"%"==i[0].slice(-1)&&(d*=2.55),f=$(i[1]),"%"==i[1].slice(-1)&&(f*=2.55),g=$(i[2]),"%"==i[2].slice(-1)&&(g*=2.55),("deg"==i[0].slice(-3)||"°"==i[0].slice(-1))&&(d/=360),"hsla"==j[1].toLowerCase().slice(0,4)&&(b=$(i[3])),i[3]&&"%"==i[3].slice(-1)&&(b/=100),c.hsl2rgb(d,f,g,b)):(j={r:d,g:f,b:g,toString:e},j.hex="#"+(16777216|g|f<<8|d<<16).toString(16).slice(1),c.is(b,"finite")&&(j.opacity=b),j)):{r:-1,g:-1,b:-1,hex:H,error:1,toString:e})},c),c.tintshade=Xb(function(a,b){var d,f=c.getRGB(a),g=255;return 0>b&&(b*=-1,g=0),b>1&&(b=1),d=0===b?f:{r:g-(g-f.r)*b,g:g-(g-f.g)*b,b:g-(g-f.b)*b,toString:e},d.hex=c.rgb(d.r,d.g,d.b),f.error&&(d.error=f.error),"opacity"in f?(d.rgba="rgba("+[d.r,d.g,d.b,f.opacity].join(",")+")",d.opacity=f.opacity):d.rgba="rgb("+[d.r,d.g,d.b].join(",")+")",d},c),c.hsb=Xb(function(a,b,d){return c.hsb2rgb(a,b,d).hex}),c.hsl=Xb(function(a,b,d){return c.hsl2rgb(a,b,d).hex}),c.rgb=Xb(function(a,b,c){return"#"+(16777216|c|b<<8|a<<16).toString(16).slice(1)}),c.getColor=function(a){var b=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||.75},c=this.hsb2rgb(b.h,b.s,b.b);return b.h+=.075,b.h>1&&(b.h=0,b.s-=.2,b.s<=0&&(this.getColor.start={h:0,s:1,b:b.b})),c.hex},c.getColor.reset=function(){delete this.start},c.parsePathString=function(a){if(!a)return null;var b=Yb(a);if(b.arr)return $b(b.arr);var d={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},e=[];return c.is(a,D)&&c.is(a[0],D)&&(e=$b(a)),e.length||Z(a).replace(vb,function(a,b,c){var f=[],g=b.toLowerCase();if(c.replace(xb,function(a,b){b&&f.push(+b)}),"m"==g&&f.length>2&&(e.push([b][A](f.splice(0,2))),g="l",b="m"==b?"l":"L"),"r"==g)e.push([b][A](f));else for(;f.length>=d[g]&&(e.push([b][A](f.splice(0,d[g]))),d[g]););}),e.toString=c._path2string,b.arr=$b(e),e},c.parseTransformString=Xb(function(a){if(!a)return null;var b=[];return c.is(a,D)&&c.is(a[0],D)&&(b=$b(a)),b.length||Z(a).replace(wb,function(a,c,d){{var e=[];mb.call(c)}d.replace(xb,function(a,b){b&&e.push(+b)}),b.push([c][A](e))}),b.toString=c._path2string,b});var Yb=function(a){var b=Yb.ps=Yb.ps||{};return b[a]?b[a].sleep=100:b[a]={sleep:100},setTimeout(function(){for(var c in b)b[w](c)&&c!=a&&(b[c].sleep--,!b[c].sleep&&delete b[c])}),b[a]};c.findDotsAtSegment=function(a,b,c,d,e,f,g,h,i){var j=1-i,k=eb(j,3),l=eb(j,2),m=i*i,n=m*i,o=k*a+3*l*i*c+3*j*i*i*e+n*g,p=k*b+3*l*i*d+3*j*i*i*f+n*h,q=a+2*i*(c-a)+m*(e-2*c+a),r=b+2*i*(d-b)+m*(f-2*d+b),s=c+2*i*(e-c)+m*(g-2*e+c),t=d+2*i*(f-d)+m*(h-2*f+d),u=j*a+i*c,v=j*b+i*d,w=j*e+i*g,x=j*f+i*h,y=90-180*ab.atan2(q-s,r-t)/jb;return(q>s||t>r)&&(y+=180),{x:o,y:p,m:{x:q,y:r},n:{x:s,y:t},start:{x:u,y:v},end:{x:w,y:x},alpha:y}},c.bezierBBox=function(a,b,d,e,f,g,h,i){c.is(a,"array")||(a=[a,b,d,e,f,g,h,i]);var j=fc.apply(null,a);return{x:j.min.x,y:j.min.y,x2:j.max.x,y2:j.max.y,width:j.max.x-j.min.x,height:j.max.y-j.min.y}},c.isPointInsideBBox=function(a,b,c){return b>=a.x&&b<=a.x2&&c>=a.y&&c<=a.y2},c.isBBoxIntersect=function(a,b){var d=c.isPointInsideBBox;return d(b,a.x,a.y)||d(b,a.x2,a.y)||d(b,a.x,a.y2)||d(b,a.x2,a.y2)||d(a,b.x,b.y)||d(a,b.x2,b.y)||d(a,b.x,b.y2)||d(a,b.x2,b.y2)||(a.xb.x||b.xa.x)&&(a.yb.y||b.ya.y)},c.pathIntersection=function(a,b){return l(a,b)},c.pathIntersectionNumber=function(a,b){return l(a,b,1)},c.isPointInsidePath=function(a,b,d){var e=c.pathBBox(a);return c.isPointInsideBBox(e,b,d)&&(l(a,[["M",b,d],["H",e.x2+10]],1)%2==1||l(a,[["M",b,d],["V",e.y2+10]],1)%2==1)},c._removedFactory=function(a){return function(){b("raphael.log",null,"Raphaël: you are calling to method “"+a+"” of removed object",a)}};var Zb=c.pathBBox=function(a){var b=Yb(a);if(b.bbox)return b.bbox;if(!a)return{x:0,y:0,width:0,height:0,x2:0,y2:0};a=gc(a);for(var c,d=0,e=0,f=[],g=[],h=0,i=a.length;i>h;h++)if(c=a[h],"M"==c[0])d=c[1],e=c[2],f.push(d),g.push(e);else{var j=fc(d,e,c[1],c[2],c[3],c[4],c[5],c[6]);f=f[A](j.min.x,j.max.x),g=g[A](j.min.y,j.max.y),d=c[5],e=c[6]}var k=cb[z](0,f),l=cb[z](0,g),m=bb[z](0,f),n=bb[z](0,g),o={x:k,y:l,x2:m,y2:n,width:m-k,height:n-l};return b.bbox=Ob(o),o},$b=function(a){var b=Ob(a);return b.toString=c._path2string,b},_b=c._pathToRelative=function(a){var b=Yb(a);if(b.rel)return $b(b.rel);c.is(a,D)&&c.is(a&&a[0],D)||(a=c.parsePathString(a));var d=[],e=0,f=0,g=0,h=0,i=0;"M"==a[0][0]&&(e=a[0][1],f=a[0][2],g=e,h=f,i++,d.push(["M",e,f]));for(var j=i,k=a.length;k>j;j++){var l=d[j]=[],m=a[j];if(m[0]!=mb.call(m[0]))switch(l[0]=mb.call(m[0]),l[0]){case"a":l[1]=m[1],l[2]=m[2],l[3]=m[3],l[4]=m[4],l[5]=m[5],l[6]=+(m[6]-e).toFixed(3),l[7]=+(m[7]-f).toFixed(3);break;case"v":l[1]=+(m[1]-f).toFixed(3);break;case"m":g=m[1],h=m[2];default:for(var n=1,o=m.length;o>n;n++)l[n]=+(m[n]-(n%2?e:f)).toFixed(3)}else{l=d[j]=[],"m"==m[0]&&(g=m[1]+e,h=m[2]+f);for(var p=0,q=m.length;q>p;p++)d[j][p]=m[p]}var r=d[j].length;switch(d[j][0]){case"z":e=g,f=h;break;case"h":e+=+d[j][r-1];break;case"v":f+=+d[j][r-1];break;default:e+=+d[j][r-2],f+=+d[j][r-1]}}return d.toString=c._path2string,b.rel=$b(d),d},ac=c._pathToAbsolute=function(a){var b,d=Yb(a);if(d.abs)return $b(d.abs);if(c.is(a,D)&&c.is(a&&a[0],D)||(a=c.parsePathString(a)),!a||!a.length)return b=["M",0,0],b.toString=c._path2string,b;var e=0,g=0,h=0,i=0,j=0;b=[],"M"==a[0][0]&&(e=+a[0][1],g=+a[0][2],h=e,i=g,j++,b[0]=["M",e,g]);for(var k,l,m=3==a.length&&"M"==a[0][0]&&"R"==a[1][0].toUpperCase()&&"Z"==a[2][0].toUpperCase(),n=j,o=a.length;o>n;n++){if(b.push(k=[]),l=a[n],l[0]!=nb.call(l[0]))switch(k[0]=nb.call(l[0]),k[0]){case"A":k[1]=l[1],k[2]=l[2],k[3]=l[3],k[4]=l[4],k[5]=l[5],k[6]=+(l[6]+e),k[7]=+(l[7]+g);break;case"V":k[1]=+l[1]+g;break;case"H":k[1]=+l[1]+e;break;case"R":for(var p=[e,g][A](l.slice(1)),q=2,r=p.length;r>q;q++)p[q]=+p[q]+e,p[++q]=+p[q]+g;b.pop(),b=b[A](f(p,m));break;case"M":h=+l[1]+e,i=+l[2]+g;default:for(q=1,r=l.length;r>q;q++)k[q]=+l[q]+(q%2?e:g)}else if("R"==l[0])p=[e,g][A](l.slice(1)),b.pop(),b=b[A](f(p,m)),k=["R"][A](l.slice(-2));else for(var s=0,t=l.length;t>s;s++)k[s]=l[s];switch(k[0]){case"Z":e=h,g=i;break;case"H":e=k[1];break;case"V":g=k[1];break;case"M":h=k[k.length-2],i=k[k.length-1];default:e=k[k.length-2],g=k[k.length-1]}}return b.toString=c._path2string,d.abs=$b(b),b},bc=function(a,b,c,d){return[a,b,c,d,c,d]},cc=function(a,b,c,d,e,f){var g=1/3,h=2/3;return[g*a+h*c,g*b+h*d,g*e+h*c,g*f+h*d,e,f]},dc=function(a,b,c,d,e,f,g,h,i,j){var k,l=120*jb/180,m=kb*(+e||0),n=[],o=Xb(function(a,b,c){var d=a*fb(c)-b*gb(c),e=a*gb(c)+b*fb(c);return{x:d,y:e}});if(j)x=j[0],y=j[1],v=j[2],w=j[3];else{k=o(a,b,-m),a=k.x,b=k.y,k=o(h,i,-m),h=k.x,i=k.y;var p=(fb(kb*e),gb(kb*e),(a-h)/2),q=(b-i)/2,r=p*p/(c*c)+q*q/(d*d);r>1&&(r=hb(r),c=r*c,d=r*d);var s=c*c,t=d*d,u=(f==g?-1:1)*hb(db((s*t-s*q*q-t*p*p)/(s*q*q+t*p*p))),v=u*c*q/d+(a+h)/2,w=u*-d*p/c+(b+i)/2,x=ab.asin(((b-w)/d).toFixed(9)),y=ab.asin(((i-w)/d).toFixed(9));x=v>a?jb-x:x,y=v>h?jb-y:y,0>x&&(x=2*jb+x),0>y&&(y=2*jb+y),g&&x>y&&(x-=2*jb),!g&&y>x&&(y-=2*jb)}var z=y-x;if(db(z)>l){var B=y,C=h,D=i;y=x+l*(g&&y>x?1:-1),h=v+c*fb(y),i=w+d*gb(y),n=dc(h,i,c,d,e,0,g,C,D,[y,B,v,w])}z=y-x;var E=fb(x),F=gb(x),H=fb(y),I=gb(y),J=ab.tan(z/4),K=4/3*c*J,L=4/3*d*J,M=[a,b],N=[a+K*F,b-L*E],O=[h+K*I,i-L*H],P=[h,i];if(N[0]=2*M[0]-N[0],N[1]=2*M[1]-N[1],j)return[N,O,P][A](n);n=[N,O,P][A](n).join()[G](",");for(var Q=[],R=0,S=n.length;S>R;R++)Q[R]=R%2?o(n[R-1],n[R],m).y:o(n[R],n[R+1],m).x;return Q},ec=function(a,b,c,d,e,f,g,h,i){var j=1-i;return{x:eb(j,3)*a+3*eb(j,2)*i*c+3*j*i*i*e+eb(i,3)*g,y:eb(j,3)*b+3*eb(j,2)*i*d+3*j*i*i*f+eb(i,3)*h}},fc=Xb(function(a,b,c,d,e,f,g,h){var i,j=e-2*c+a-(g-2*e+c),k=2*(c-a)-2*(e-c),l=a-c,m=(-k+hb(k*k-4*j*l))/2/j,n=(-k-hb(k*k-4*j*l))/2/j,o=[b,h],p=[a,g];return db(m)>"1e12"&&(m=.5),db(n)>"1e12"&&(n=.5),m>0&&1>m&&(i=ec(a,b,c,d,e,f,g,h,m),p.push(i.x),o.push(i.y)),n>0&&1>n&&(i=ec(a,b,c,d,e,f,g,h,n),p.push(i.x),o.push(i.y)),j=f-2*d+b-(h-2*f+d),k=2*(d-b)-2*(f-d),l=b-d,m=(-k+hb(k*k-4*j*l))/2/j,n=(-k-hb(k*k-4*j*l))/2/j,db(m)>"1e12"&&(m=.5),db(n)>"1e12"&&(n=.5),m>0&&1>m&&(i=ec(a,b,c,d,e,f,g,h,m),p.push(i.x),o.push(i.y)),n>0&&1>n&&(i=ec(a,b,c,d,e,f,g,h,n),p.push(i.x),o.push(i.y)),{min:{x:cb[z](0,p),y:cb[z](0,o)},max:{x:bb[z](0,p),y:bb[z](0,o)}}}),gc=c._path2curve=Xb(function(a,b){var c=!b&&Yb(a);if(!b&&c.curve)return $b(c.curve);for(var d=ac(a),e=b&&ac(b),f={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},g={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},h=(function(a,b){var c,d;if(!a)return["C",b.x,b.y,b.x,b.y,b.x,b.y];switch(!(a[0]in{T:1,Q:1})&&(b.qx=b.qy=null),a[0]){case"M":b.X=a[1],b.Y=a[2];break;case"A":a=["C"][A](dc[z](0,[b.x,b.y][A](a.slice(1))));break;case"S":c=b.x+(b.x-(b.bx||b.x)),d=b.y+(b.y-(b.by||b.y)),a=["C",c,d][A](a.slice(1));break;case"T":b.qx=b.x+(b.x-(b.qx||b.x)),b.qy=b.y+(b.y-(b.qy||b.y)),a=["C"][A](cc(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case"Q":b.qx=a[1],b.qy=a[2],a=["C"][A](cc(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"][A](bc(b.x,b.y,a[1],a[2]));break;case"H":a=["C"][A](bc(b.x,b.y,a[1],b.y));break;case"V":a=["C"][A](bc(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"][A](bc(b.x,b.y,b.X,b.Y))}return a}),i=function(a,b){if(a[b].length>7){a[b].shift();for(var c=a[b];c.length;)a.splice(b++,0,["C"][A](c.splice(0,6)));a.splice(b,1),l=bb(d.length,e&&e.length||0)}},j=function(a,b,c,f,g){a&&b&&"M"==a[g][0]&&"M"!=b[g][0]&&(b.splice(g,0,["M",f.x,f.y]),c.bx=0,c.by=0,c.x=a[g][1],c.y=a[g][2],l=bb(d.length,e&&e.length||0))},k=0,l=bb(d.length,e&&e.length||0);l>k;k++){d[k]=h(d[k],f),i(d,k),e&&(e[k]=h(e[k],g)),e&&i(e,k),j(d,e,f,g,k),j(e,d,g,f,k);var m=d[k],n=e&&e[k],o=m.length,p=e&&n.length;f.x=m[o-2],f.y=m[o-1],f.bx=$(m[o-4])||f.x,f.by=$(m[o-3])||f.y,g.bx=e&&($(n[p-4])||g.x),g.by=e&&($(n[p-3])||g.y),g.x=e&&n[p-2],g.y=e&&n[p-1]}return e||(c.curve=$b(d)),e?[d,e]:d},null,$b),hc=(c._parseDots=Xb(function(a){for(var b=[],d=0,e=a.length;e>d;d++){var f={},g=a[d].match(/^([^:]*):?([\d\.]*)/);if(f.color=c.getRGB(g[1]),f.color.error)return null;f.opacity=f.color.opacity,f.color=f.color.hex,g[2]&&(f.offset=g[2]+"%"),b.push(f)}for(d=1,e=b.length-1;e>d;d++)if(!b[d].offset){for(var h=$(b[d-1].offset||0),i=0,j=d+1;e>j;j++)if(b[j].offset){i=b[j].offset;break}i||(i=100,j=e),i=$(i);for(var k=(i-h)/(j-d+1);j>d;d++)h+=k,b[d].offset=h+"%"}return b}),c._tear=function(a,b){a==b.top&&(b.top=a.prev),a==b.bottom&&(b.bottom=a.next),a.next&&(a.next.prev=a.prev),a.prev&&(a.prev.next=a.next)}),ic=(c._tofront=function(a,b){return b.top===a?!1:(hc(a,b),a.next=null,a.prev=b.top,b.top.next=a,b.top=a,!0)},c._toback=function(a,b){return b.bottom===a?!1:(hc(a,b),a.next=b.bottom,a.prev=null,b.bottom.prev=a,b.bottom=a,!0)},c._insertafter=function(a,b,c,d){hc(a,c),a.parent=d,b===d.top&&(d.top=a),b.next&&(b.next.prev=a),a.next=b.next,a.prev=b,b.next=a -},c._insertbefore=function(a,b,c,d){hc(a,c),a.parent=d,b===d.bottom&&(d.bottom=a),b.prev&&(b.prev.next=a),a.prev=b.prev,b.prev=a,a.next=b},c.toMatrix=function(a,b){var c=Zb(a),d={_:{transform:u},getBBox:function(){return c}};return jc(d,b),d.matrix}),jc=(c.transformPath=function(a,b){return Jb(a,ic(a,b))},c._extractTransform=function(a,b){if(null==b)return a._.transform;b=Z(b).replace(/\.{3}|\u2026/g,a._.transform||u);var d=c.parseTransformString(b),e=0,f=0,g=0,h=1,i=1,j=a._,k=new m;if(j.transform=d||[],d)for(var l=0,n=d.length;n>l;l++){var o,p,q,r,s,t=d[l],v=t.length,w=Z(t[0]).toLowerCase(),x=t[0]!=w,y=x?k.invert():0;"t"==w&&3==v?x?(o=y.x(0,0),p=y.y(0,0),q=y.x(t[1],t[2]),r=y.y(t[1],t[2]),k.translate(q-o,r-p)):k.translate(t[1],t[2]):"r"==w?2==v?(s=s||a.getBBox(1),k.rotate(t[1],s.x+s.width/2,s.y+s.height/2),e+=t[1]):4==v&&(x?(q=y.x(t[2],t[3]),r=y.y(t[2],t[3]),k.rotate(t[1],q,r)):k.rotate(t[1],t[2],t[3]),e+=t[1]):"s"==w?2==v||3==v?(s=s||a.getBBox(1),k.scale(t[1],t[v-1],s.x+s.width/2,s.y+s.height/2),h*=t[1],i*=t[v-1]):5==v&&(x?(q=y.x(t[3],t[4]),r=y.y(t[3],t[4]),k.scale(t[1],t[2],q,r)):k.scale(t[1],t[2],t[3],t[4]),h*=t[1],i*=t[2]):"m"==w&&7==v&&k.add(t[1],t[2],t[3],t[4],t[5],t[6]),j.dirtyT=1,a.matrix=k}a.matrix=k,j.sx=h,j.sy=i,j.deg=e,j.dx=f=k.e,j.dy=g=k.f,1==h&&1==i&&!e&&j.bbox?(j.bbox.x+=+f,j.bbox.y+=+g):j.dirtyT=1}),kc=function(a){var b=a[0];switch(b.toLowerCase()){case"t":return[b,0,0];case"m":return[b,1,0,0,1,0,0];case"r":return 4==a.length?[b,0,a[2],a[3]]:[b,0];case"s":return 5==a.length?[b,1,1,a[3],a[4]]:3==a.length?[b,1,1]:[b,1]}},lc=c._equaliseTransform=function(a,b){b=Z(b).replace(/\.{3}|\u2026/g,a),a=c.parseTransformString(a)||[],b=c.parseTransformString(b)||[];for(var d,e,f,g,h=bb(a.length,b.length),i=[],j=[],k=0;h>k;k++){if(f=a[k]||kc(b[k]),g=b[k]||kc(f),f[0]!=g[0]||"r"==f[0].toLowerCase()&&(f[2]!=g[2]||f[3]!=g[3])||"s"==f[0].toLowerCase()&&(f[3]!=g[3]||f[4]!=g[4]))return;for(i[k]=[],j[k]=[],d=0,e=bb(f.length,g.length);e>d;d++)d in f&&(i[k][d]=f[d]),d in g&&(j[k][d]=g[d])}return{from:i,to:j}};c._getContainer=function(a,b,d,e){var f;return f=null!=e||c.is(a,E)?a:O.doc.getElementById(a),null!=f?f.tagName?null==b?{container:f,width:f.style.pixelWidth||f.offsetWidth,height:f.style.pixelHeight||f.offsetHeight}:{container:f,width:b,height:d}:{container:1,x:a,y:b,width:d,height:e}:void 0},c.pathToRelative=_b,c._engine={},c.path2curve=gc,c.matrix=function(a,b,c,d,e,f){return new m(a,b,c,d,e,f)},function(a){function b(a){return a[0]*a[0]+a[1]*a[1]}function d(a){var c=hb(b(a));a[0]&&(a[0]/=c),a[1]&&(a[1]/=c)}a.add=function(a,b,c,d,e,f){var g,h,i,j,k=[[],[],[]],l=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],n=[[a,c,e],[b,d,f],[0,0,1]];for(a&&a instanceof m&&(n=[[a.a,a.c,a.e],[a.b,a.d,a.f],[0,0,1]]),g=0;3>g;g++)for(h=0;3>h;h++){for(j=0,i=0;3>i;i++)j+=l[g][i]*n[i][h];k[g][h]=j}this.a=k[0][0],this.b=k[1][0],this.c=k[0][1],this.d=k[1][1],this.e=k[0][2],this.f=k[1][2]},a.invert=function(){var a=this,b=a.a*a.d-a.b*a.c;return new m(a.d/b,-a.b/b,-a.c/b,a.a/b,(a.c*a.f-a.d*a.e)/b,(a.b*a.e-a.a*a.f)/b)},a.clone=function(){return new m(this.a,this.b,this.c,this.d,this.e,this.f)},a.translate=function(a,b){this.add(1,0,0,1,a,b)},a.scale=function(a,b,c,d){null==b&&(b=a),(c||d)&&this.add(1,0,0,1,c,d),this.add(a,0,0,b,0,0),(c||d)&&this.add(1,0,0,1,-c,-d)},a.rotate=function(a,b,d){a=c.rad(a),b=b||0,d=d||0;var e=+fb(a).toFixed(9),f=+gb(a).toFixed(9);this.add(e,f,-f,e,b,d),this.add(1,0,0,1,-b,-d)},a.x=function(a,b){return a*this.a+b*this.c+this.e},a.y=function(a,b){return a*this.b+b*this.d+this.f},a.get=function(a){return+this[Z.fromCharCode(97+a)].toFixed(4)},a.toString=function(){return c.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},a.toMatrixString=function(){return"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")"},a.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},a.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},a.split=function(){var a={};a.dx=this.e,a.dy=this.f;var e=[[this.a,this.c],[this.b,this.d]];a.scalex=hb(b(e[0])),d(e[0]),a.shear=e[0][0]*e[1][0]+e[0][1]*e[1][1],e[1]=[e[1][0]-e[0][0]*a.shear,e[1][1]-e[0][1]*a.shear],a.scaley=hb(b(e[1])),d(e[1]),a.shear/=a.scaley;var f=-e[0][1],g=e[1][1];return 0>g?(a.rotate=c.deg(ab.acos(g)),0>f&&(a.rotate=360-a.rotate)):a.rotate=c.deg(ab.asin(f)),a.isSimple=!(+a.shear.toFixed(9)||a.scalex.toFixed(9)!=a.scaley.toFixed(9)&&a.rotate),a.isSuperSimple=!+a.shear.toFixed(9)&&a.scalex.toFixed(9)==a.scaley.toFixed(9)&&!a.rotate,a.noRotation=!+a.shear.toFixed(9)&&!a.rotate,a},a.toTransformString=function(a){var b=a||this[G]();return b.isSimple?(b.scalex=+b.scalex.toFixed(4),b.scaley=+b.scaley.toFixed(4),b.rotate=+b.rotate.toFixed(4),(b.dx||b.dy?"t"+[b.dx,b.dy]:u)+(1!=b.scalex||1!=b.scaley?"s"+[b.scalex,b.scaley,0,0]:u)+(b.rotate?"r"+[b.rotate,0,0]:u)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(m.prototype);var mc=navigator.userAgent.match(/Version\/(.*?)\s/)||navigator.userAgent.match(/Chrome\/(\d+)/);V.safari="Apple Computer, Inc."==navigator.vendor&&(mc&&mc[1]<4||"iP"==navigator.platform.slice(0,2))||"Google Inc."==navigator.vendor&&mc&&mc[1]<8?function(){var a=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});return setTimeout(function(){a.remove()}),!0}:Eb;for(var nc=function(){this.returnValue=!1},oc=function(){return this.originalEvent.preventDefault()},pc=function(){this.cancelBubble=!0},qc=function(){return this.originalEvent.stopPropagation()},rc=c.addEvent=function(){return O.doc.addEventListener?function(a,b,c,d){var e=S&&Y[b]?Y[b]:b,f=function(e){var f=O.doc.documentElement.scrollTop||O.doc.body.scrollTop,g=O.doc.documentElement.scrollLeft||O.doc.body.scrollLeft;if(S&&Y[w](b))for(var h=0,i=e.targetTouches&&e.targetTouches.length;i>h;h++)if(e.targetTouches[h].target==a){var j=e;e=e.targetTouches[h],e.originalEvent=j,e.preventDefault=oc,e.stopPropagation=qc;break}return c.call(d,e,e.clientX+g,e.clientY+f)};return a.addEventListener(e,f,!1),function(){return a.removeEventListener(e,f,!1),!0}}:O.doc.attachEvent?function(a,b,c,d){var e=function(a){a=a||O.win.event;var b=O.doc.documentElement.scrollTop||O.doc.body.scrollTop,e=O.doc.documentElement.scrollLeft||O.doc.body.scrollLeft,f=a.clientX+e,g=a.clientY+b;return a.preventDefault=a.preventDefault||nc,a.stopPropagation=a.stopPropagation||pc,c.call(d,a,f,g)};a.attachEvent("on"+b,e);var f=function(){return a.detachEvent("on"+b,e),!0};return f}:void 0}(),sc=[],tc=function(a){for(var d,e=a.clientX,f=a.clientY,g=O.doc.documentElement.scrollTop||O.doc.body.scrollTop,h=O.doc.documentElement.scrollLeft||O.doc.body.scrollLeft,i=sc.length;i--;){if(d=sc[i],S){for(var j,k=a.touches.length;k--;)if(j=a.touches[k],j.identifier==d.el._drag.id){e=j.clientX,f=j.clientY,(a.originalEvent?a.originalEvent:a).preventDefault();break}}else a.preventDefault();if(!d.el.removed){var l,m=c._engine.getNode(d.el),n=m.nextSibling,o=m.parentNode,p=m.style.display;O.win.opera&&o.removeChild(m),m.style.display="none",l=d.el.paper.getElementByPoint(e,f),m.style.display=p,O.win.opera&&(n?o.insertBefore(m,n):o.appendChild(m)),l&&b("raphael.drag.over."+d.el.id,d.el,l),e+=h,f+=g,b("raphael.drag.move."+d.el.id,d.move_scope||d.el,e-d.el._drag.x,f-d.el._drag.y,e,f,a)}}},uc=function(a){c.unmousemove(tc).unmouseup(uc);for(var d,e=sc.length;e--;)d=sc[e],d.el._drag={},b("raphael.drag.end."+d.el.id,d.end_scope||d.start_scope||d.move_scope||d.el,a);sc=[]},vc=c.el={},wc=X.length;wc--;)!function(a){c[a]=vc[a]=function(b,d){return c.is(b,"function")&&(this.events=this.events||[],this.events.push({name:a,f:b,unbind:rc(this.shape||this.node||O.doc,a,b,d||this)})),this},c["un"+a]=vc["un"+a]=function(b){for(var c=this.events||[],d=c.length;d--;)if(c[d].name==a&&c[d].f==b)return c[d].unbind(),c.splice(d,1),!c.length&&delete this.events,this;return this}}(X[wc]);vc.data=function(a,d){var e=Cb[this.id]=Cb[this.id]||{};if(1==arguments.length){if(c.is(a,E)){for(var f in a)a[w](f)&&this.data(f,a[f]);return this}return b("raphael.data.get."+this.id,this,e[a],a),e[a]}return e[a]=d,b("raphael.data.set."+this.id,this,d,a),this},vc.removeData=function(a){return null==a?delete Cb[this.id]:Cb[this.id]&&delete Cb[this.id][a],this},vc.getData=function(){return Ob(Cb[this.id]||{})};var xc=[],yc=function(){this.untrack=rc(O.doc,"mouseup",zc,this)},zc=function(){return this.untrack(),this.untrack=null,this.fn&&this.fn.apply(this.scope||this.el,arguments)};vc.mouseup=function(a,b,d){return d?(xc.push(d={el:this,fn:a,scope:b}),d.unbind=rc(this.shape||this.node||O.doc,"mousedown",yc,d),this):c.mouseup.apply(this,arguments)},vc.unmouseup=function(a){for(var b,d=xc.length;d--;)xc[d].el===this&&xc[d].fn===a&&(b=xc[d],b.unbind(),b.untrack&&b.untrack(),xc.splice(d,1));return b?this:c.unmouseup.apply(this,arguments)},vc.hover=function(a,b,c,d){return this.mouseover(a,c).mouseout(b,d||c)},vc.unhover=function(a,b){return this.unmouseover(a).unmouseout(b)};var Ac=[];vc.drag=function(a,d,e,f,g,h){function i(i){(i.originalEvent||i).preventDefault();var j=O.doc.documentElement.scrollTop||O.doc.body.scrollTop,k=O.doc.documentElement.scrollLeft||O.doc.body.scrollLeft;this._drag.x=i.clientX+k,this._drag.y=i.clientY+j,this._drag.id=i.identifier,!sc.length&&c.mousemove(tc).mouseup(uc),sc.push({el:this,move_scope:f,start_scope:g,end_scope:h}),d&&b.on("raphael.drag.start."+this.id,d),a&&b.on("raphael.drag.move."+this.id,a),e&&b.on("raphael.drag.end."+this.id,e),b("raphael.drag.start."+this.id,g||f||this,i.clientX+k,i.clientY+j,i)}return this._drag={},Ac.push({el:this,start:i}),this.mousedown(i),this},vc.onDragOver=function(a){a?b.on("raphael.drag.over."+this.id,a):b.unbind("raphael.drag.over."+this.id)},vc.undrag=function(){for(var a=Ac.length;a--;)Ac[a].el==this&&(this.unmousedown(Ac[a].start),Ac.splice(a,1),b.unbind("raphael.drag.*."+this.id));!Ac.length&&c.unmousemove(tc).unmouseup(uc),delete this._drag},vc.follow=function(a,b,d){return a.removed||a.constructor!==c.el.constructor?this:(a.followers.push({el:this,stalk:d={before:"insertBefore",after:"insertAfter"}[d],cb:b}),d&&this[d](a),this)},vc.unfollow=function(a){if(a.removed||a.constructor!==c.el.constructor)return this;for(var b=0,d=a.followers.length;d>b;b++)if(a.followers[b].el===this){a.followers.splice(b,1);break}return this},V.hide=function(){var a=this;return a.canvas.style.visibility="hidden",a},V.show=function(){var a=this;return a.canvas.style.visibility=u,a},V.group=function(){var a=this,b=arguments,d=Kb(b,!0),e=c._engine.group(a,b[0],d);return a.__set__&&a.__set__.push(e),a._elementsById[e.id]=e},V.circle=function(){var a=this,b=arguments,d=Kb(b,!0),e=Lb(b,"cx",0,"cy",0,"r",0,"fill",H,"stroke",I),f=c._engine.circle(a,e,d);return a.__set__&&a.__set__.push(f),a._elementsById[f.id]=f},V.rect=function(){var a=this,b=arguments,d=Kb(b,!0),e=Lb(b,"x",0,"y",0,"width",0,"height",0,"r",0,"fill",H,"stroke",I),f=c._engine.rect(a,e,d);return a.__set__&&a.__set__.push(f),a._elementsById[f.id]=f},V.ellipse=function(){var a=this,b=arguments,d=Kb(b,!0),e=Lb(b,"x",0,"y",0,"rx",0,"ry",0,"fill",H,"stroke",I),f=c._engine.ellipse(this,e,d);return a.__set__&&a.__set__.push(f),a._elementsById[f.id]=f},V.path=function(){var a=this,b=arguments,d=Kb(b,!0),e=Lb(b,"path",u,"fill",H,"stroke",I),f=c._engine.path(a,e,d);return a.__set__&&a.__set__.push(f),a._elementsById[f.id]=f},V.image=function(){var a=this,b=arguments,d=Kb(b,!0),e=Lb(b,"src","about:blank","x",0,"y",0,"width",0,"height",0);return out=c._engine.image(a,e,d),a.__set__&&a.__set__.push(out),a._elementsById[out.id]=out},V.text=function(){var a=this,b=arguments,d=Kb(b,!0),e=Lb(b,"x",0,"y",0,"text",u,"stroke",H,"fill",I,"text-anchor","middle","vertical-align","middle"),f=c._engine.text(a,e,d);return a.__set__&&a.__set__.push(f),a._elementsById[f.id]=f},V.set=function(a){!c.is(a,"array")&&(a=N.call(arguments,0,arguments.length));var b=new Mc(a);return this.__set__&&this.__set__.push(b),b},V.setStart=function(a){this.__set__=a||this.set()},V.setFinish=function(){var a=this.__set__;return delete this.__set__,a},V.setSize=function(a,b){return c._engine.setSize.call(this,a,b)},V.setViewBox=function(a,b,d,e,f){return c._engine.setViewBox.call(this,a,b,d,e,f)},V.top=V.bottom=null,V.raphael=c;var Bc=function(a){var b=a.getBoundingClientRect(),c=a.ownerDocument,d=c.body,e=c.documentElement,f=e.clientTop||d.clientTop||0,g=e.clientLeft||d.clientLeft||0,h=b.top+(O.win.pageYOffset||e.scrollTop||d.scrollTop)-f,i=b.left+(O.win.pageXOffset||e.scrollLeft||d.scrollLeft)-g;return{y:h,x:i}};V.getElementByPoint=function(a,b){var c=this,d=c.canvas,e=O.doc.elementFromPoint(a,b);if(O.win.opera&&"svg"==e.tagName){var f=Bc(d),g=d.createSVGRect();g.x=a-f.x,g.y=b-f.y,g.width=g.height=1;var h=d.getIntersectionList(g,null);h.length&&(e=h[h.length-1])}if(!e)return null;for(;e.parentNode&&e!=d.parentNode&&!e.raphael;)e=e.parentNode;return e==c.canvas.parentNode&&(e=d),e=e&&e.raphael?c.getById(e.raphaelid):null},V.getElementsByBBox=function(a){var b=this.set();return this.forEach(function(d){c.isBBoxIntersect(d.getBBox(),a)&&b.push(d)}),b},V.getById=function(a){return this._elementsById[a]||null},V.forEach=function(a,b){for(var c=this.bottom;c;){if(a.call(b,c)===!1)return this;c=c.next}return this},V.getElementsByPoint=function(a,b){var c=this.set();return this.forEach(function(d){d.isPointInside(a,b)&&c.push(d)}),c},vc.isPointInside=function(a,b){var d,e=this.realPath=this.realPath||Ib[this.type](this);return c.isPointInsidePath((d=this.attr("transform"))&&d.length&&c.transformPath(e,d)||e,a,b)},vc.getBBox=function(a){if(this.removed)return{};var b=this._;return a?((b.dirty||!b.bboxwt)&&(this.realPath=Ib[this.type](this),b.bboxwt=Zb(this.realPath),b.bboxwt.toString=n,b.dirty=0),b.bboxwt):((b.dirty||b.dirtyT||!b.bbox)&&((b.dirty||!this.realPath)&&(b.bboxwt=0,this.realPath=Ib[this.type](this)),b.bbox=Zb(Jb(this.realPath,this.matrix)),b.bbox.toString=n,b.dirty=b.dirtyT=0),b.bbox)},vc.clone=function(){if(this.removed)return null;var a=this,b=a.paper[a.type]().attr(a.attr());return a.__set__&&a.__set__.push(b),b},vc.glow=function(a){if("text"==this.type)return null;a=a||{};var b={width:(a.width||10)+(+this.attr("stroke-width")||1),fill:a.fill||!1,opacity:a.opacity||.5,offsetx:a.offsetx||0,offsety:a.offsety||0,color:a.color||"#000"},c=b.width/2,d=this.paper,e=d.set(),f=this.realPath||Ib[this.type](this);f=this.matrix?Jb(f,this.matrix):f;for(var g=1;c+1>g;g++)e.push(d.path(f).attr({stroke:b.color,fill:b.fill?b.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(b.width/c*g).toFixed(3),opacity:+(b.opacity/c).toFixed(3)}));return e.insertBefore(this).translate(b.offsetx,b.offsety)};var Cc=function(a,b,d,e,f,g,j,k,l){return null==l?h(a,b,d,e,f,g,j,k):c.findDotsAtSegment(a,b,d,e,f,g,j,k,i(a,b,d,e,f,g,j,k,l))},Dc=function(a,b){return function(d,e,f){d=gc(d);for(var g,h,i,j,k,l="",m={},n=0,o=0,p=d.length;p>o;o++){if(i=d[o],"M"==i[0])g=+i[1],h=+i[2];else{if(j=Cc(g,h,i[1],i[2],i[3],i[4],i[5],i[6]),n+j>e){if(b&&!m.start){if(k=Cc(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n),l+=["C"+k.start.x,k.start.y,k.m.x,k.m.y,k.x,k.y],f)return l;m.start=l,l=["M"+k.x,k.y+"C"+k.n.x,k.n.y,k.end.x,k.end.y,i[5],i[6]].join(),n+=j,g=+i[5],h=+i[6];continue}if(!a&&!b)return k=Cc(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n),{x:k.x,y:k.y,alpha:k.alpha}}n+=j,g=+i[5],h=+i[6]}l+=i.shift()+i}return m.end=l,k=a?n:b?m:c.findDotsAtSegment(g,h,i[0],i[1],i[2],i[3],i[4],i[5],1),k.alpha&&(k={x:k.x,y:k.y,alpha:k.alpha}),k}},Ec=Dc(1),Fc=Dc(),Gc=Dc(0,1);c.getTotalLength=Ec,c.getPointAtLength=Fc,c.getSubpath=function(a,b,c){if(this.getTotalLength(a)-c<1e-6)return Gc(a,b).end;var d=Gc(a,c,1);return b?Gc(d,b).end:d},vc.getTotalLength=function(){return"path"==this.type?this.node.getTotalLength?this.node.getTotalLength():Ec(this.attrs.path):void 0},vc.getPointAtLength=function(a){return"path"==this.type?Fc(this.attrs.path,a):void 0},vc.getSubpath=function(a,b){return"path"==this.type?c.getSubpath(this.attrs.path,a,b):void 0};var Hc=c.easing_formulas={linear:function(a){return a},"<":function(a){return eb(a,1.7)},">":function(a){return eb(a,.48)},"<>":function(a){var b=.48-a/1.04,c=hb(.1734+b*b),d=c-b,e=eb(db(d),1/3)*(0>d?-1:1),f=-c-b,g=eb(db(f),1/3)*(0>f?-1:1),h=e+g+.5;return 3*(1-h)*h*h+h*h*h},backIn:function(a){var b=1.70158;return a*a*((b+1)*a-b)},backOut:function(a){a-=1;var b=1.70158;return a*a*((b+1)*a+b)+1},elastic:function(a){return a==!!a?a:eb(2,-10*a)*gb(2*(a-.075)*jb/.3)+1},bounce:function(a){var b,c=7.5625,d=2.75;return 1/d>a?b=c*a*a:2/d>a?(a-=1.5/d,b=c*a*a+.75):2.5/d>a?(a-=2.25/d,b=c*a*a+.9375):(a-=2.625/d,b=c*a*a+.984375),b}};Hc.easeIn=Hc["ease-in"]=Hc["<"],Hc.easeOut=Hc["ease-out"]=Hc[">"],Hc.easeInOut=Hc["ease-in-out"]=Hc["<>"],Hc["back-in"]=Hc.backIn,Hc["back-out"]=Hc.backOut;var Ic=[],Jc=a.requestAnimationFrame||a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame||a.msRequestAnimationFrame||function(a){setTimeout(a,16)},Kc=function(){for(var a=+new Date,d=0;dh))if(i>h){var r=j(h/i);for(var s in k)if(k[w](s)){switch(Bb[s]){case B:f=+k[s]+r*i*l[s];break;case"colour":f="rgb("+[Lc(ib(k[s].r+r*i*l[s].r)),Lc(ib(k[s].g+r*i*l[s].g)),Lc(ib(k[s].b+r*i*l[s].b))].join(",")+")";break;case"path":f=[];for(var t=0,u=k[s].length;u>t;t++){f[t]=[k[s][t][0]];for(var x=1,y=k[s][t].length;y>x;x++)f[t][x]=(+k[s][t][x]+r*i*l[s][t][x]).toFixed(4);f[t]=f[t].join(v)}f=f.join(v);break;case"transform":if(l[s].real)for(f=[],t=0,u=k[s].length;u>t;t++)for(f[t]=[k[s][t][0]],x=1,y=k[s][t].length;y>x;x++)f[t][x]=k[s][t][x]+r*i*l[s][t][x];else{var z=function(a){return+k[s][a]+r*i*l[s][a]};f=[["m",z(0),z(1),z(2),z(3),z(4),z(5)]]}break;case"csv":if("clip-rect"==s)for(f=[],t=4;t--;)f[t]=+k[s][t]+r*i*l[s][t];break;default:var C=[][A](k[s]);for(f=[],t=n.ca[s].length;t--;)f[t]=+C[t]+r*i*l[s][t]}o[s]=f}n.attr(o),function(a,c,d){setTimeout(function(){b("raphael.anim.frame."+a,c,d)})}(n.id,n,e.anim)}else{if(function(a,d,e){setTimeout(function(){b("raphael.anim.frame."+d.id,d,e),b("raphael.anim.finish."+d.id,d,e),c.is(a,"function")&&a.call(d)})}(e.callback,n,e.anim),n.attr(m),Ic.splice(d--,1),e.repeat>1&&!e.next){for(g in m)m[w](g)&&(p[g]=e.totalOrigin[g]);e.el.attr(p),q(e.anim,e.el,e.anim.percents[0],null,e.totalOrigin,e.repeat-1)}e.next&&!e.stop&&q(e.anim,e.el,e.next,null,e.totalOrigin,e.repeat)}}}c.svg&&n&&n.paper&&n.paper.safari(),Ic.length&&Jc(Kc)},Lc=function(a){return a>255?255:0>a?0:a};vc.animateWith=function(a,b,d,e,f,g){var h=this;if(h.removed)return g&&g.call(h),h;var i=d instanceof p?d:c.animation(d,e,f,g);q(i,h,i.percents[0],null,h.attr());for(var j=0,k=Ic.length;k>j;j++)if(Ic[j].anim==b&&Ic[j].el==a){Ic[k-1].start=Ic[j].start;break}return h},vc.onAnimation=function(a){return a?b.on("raphael.anim.frame."+this.id,a):b.unbind("raphael.anim.frame."+this.id),this},p.prototype.delay=function(a){var b=new p(this.anim,this.ms);return b.times=this.times,b.del=+a||0,b},p.prototype.repeat=function(a){var b=new p(this.anim,this.ms);return b.del=this.del,b.times=ab.floor(bb(a,0))||1,b},c.animation=function(a,b,d,e){if(a instanceof p)return a;(c.is(d,"function")||!d)&&(e=e||d||null,d=null),a=Object(a),b=+b||0;var f,g,h={};for(g in a)a[w](g)&&$(g)!=g&&$(g)+"%"!=g&&(f=!0,h[g]=a[g]);return f?(d&&(h.easing=d),e&&(h.callback=e),new p({100:h},b)):new p(a,b)},vc.animate=function(a,b,d,e){var f=this;if(f.removed)return e&&e.call(f),f;var g=a instanceof p?a:c.animation(a,b,d,e);return q(g,f,g.percents[0],null,f.attr()),f},vc.setTime=function(a,b){return a&&null!=b&&this.status(a,cb(b,a.ms)/a.ms),this},vc.status=function(a,b){var c,d,e=[],f=0;if(null!=b)return q(a,this,-1,cb(b,1)),this;for(c=Ic.length;c>f;f++)if(d=Ic[f],d.el.id==this.id&&(!a||d.anim==a)){if(a)return d.status;e.push({anim:d.anim,status:d.status})}return a?0:e},vc.pause=function(a){for(var c=0;cb;b++)(a=h[b]).stalk&&a.el[a.stalk](e);return e},vc.toBack=function(){if(this.removed)return this;var a,b,d,e=this,f=c._engine.getNode(e),g=e.parent,h=e.followers;for(c._toback(e,g)&&g.canvas.insertBefore(f,g.canvas.firstChild),b=0,d=h.length;d>b;b++)(a=h[b]).stalk&&a.el[a.stalk](e);return e},vc.insertAfter=function(a){if(this.removed)return this;var b,d,e,f=this,g=c._engine.getNode(f),h=c._engine.getLastNode(a),i=a.parent.canvas,j=f.followers;for(h.nextSibling?i.insertBefore(g,h.nextSibling):i.appendChild(g),c._insertafter(f,a,f.parent,a.parent),d=0,e=j.length;e>d;d++)(b=j[d]).stalk&&b.el[b.stalk](a);return f},vc.insertBefore=function(a){if(this.removed)return this;var b,d,e,f=this,g=c._engine.getNode(f),h=c._engine.getNode(a),i=f.followers;for(a.parent.canvas.insertBefore(g,h),c._insertbefore(f,a,f.parent,a.parent),f.parent=a.parent,d=0,e=i.length;e>d;d++)(b=i[d]).stalk&&b.el[b.stalk](a);return this},vc.appendChild=function(a){if(this.removed||"group"!==this.type)return this;var b,d,e,f,g=this,h=g.followers;if(a.parent===g)return a.toFront(),g;for(d=c._engine.getNode(a),c._tear(a,a.parent),g.canvas.appendChild(d),a.parent=g,!g.bottom&&(g.bottom=a),a.prev=g.top,a.next=null,g.top&&(g.top.next=a),g.top=a,e=0,f=h.length;f>e;e++)(b=h[e]).stalk&&b.el[b.stalk](a);return g},vc.removeChild=function(a){if(this.removed||"group"!==this.type||a.parent!==this)return this;var b=this,d=c._engine.getNode(a),e=b.paper;return c._tear(a,b),e.canvas.appendChild(d),b.parent=e,!e.bottom&&(e.bottom=b),b.prev=e.top,e.top&&(e.top.next=b),e.top=b,b.next=null,b};var Mc=function(a){if(this.items=[],this.length=0,this.type="set",a)for(var b=0,c=a.length;c>b;b++)!a[b]||a[b].constructor!=vc.constructor&&a[b].constructor!=Mc||(this[this.items.length]=this.items[this.items.length]=a[b],this.length++)},Nc=Mc.prototype;Nc.push=function(){for(var a,b,c=0,d=arguments.length;d>c;c++)a=arguments[c],!a||a.constructor!=vc.constructor&&a.constructor!=Mc||(b=this.items.length,this[b]=this.items[b]=a,this.length++);return this},Nc.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},Nc.forEach=function(a,b){for(var c=0,d=this.items.length;d>c;c++)if(a.call(b,this.items[c],c)===!1)return this;return this};for(var Oc in vc)vc[w](Oc)&&(Nc[Oc]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a][z](c,b)})}}(Oc));Nc.attr=function(a,b){if(a&&c.is(a,D)&&c.is(a[0],E))for(var d=0,e=a.length;e>d;d++)this.items[d].attr(a[d]);else for(var f=0,g=this.items.length;g>f;f++)this.items[f].attr(a,b);return this},Nc.clear=function(){for(;this.length;)this.pop()},Nc.splice=function(a,b){a=0>a?bb(this.length+a,0):a,b=bb(0,cb(this.length-a,isNaN(b)&&this.length||b));var c,d=[],e=[],f=[];for(c=2;cc;c++)e.push(this[a+c]);for(;cc?f[c]:d[c-g];for(c=this.items.length=this.length-=b-g;this[c];)delete this[c++];return new Mc(e)},Nc.exclude=function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]==a)return this.splice(b,1),!0},Nc.animate=function(a,b,d,e){(c.is(d,"function")||!d)&&(e=d||null);var f,g,h=this.items.length,i=h,j=this;if(!h)return this;e&&(g=function(){!--h&&e.call(j)}),d=c.is(d,C)?d:g;var k=c.animation(a,b,d,g);for(f=this.items[--i].animate(k);i--;)this.items[i]&&!this.items[i].removed&&this.items[i].animateWith(f,k,k);return this},Nc.insertAfter=function(a){for(var b=this.items.length;b--;)this.items[b].insertAfter(a);return this},Nc.getBBox=function(){for(var a=[],b=[],c=[],d=[],e=this.items.length;e--;)if(!this.items[e].removed){var f=this.items[e].getBBox();a.push(f.x),b.push(f.y),c.push(f.x+f.width),d.push(f.y+f.height)}return a=cb[z](0,a),b=cb[z](0,b),c=bb[z](0,c),d=bb[z](0,d),{x:a,y:b,x2:c,y2:d,width:c-a,height:d-b}},Nc.clone=function(a){a=new Mc;for(var b=0,c=this.items.length;c>b;b++)a.push(this.items[b].clone());return a},Nc.toString=function(){return"Raphaël‘s set"},Nc.glow=function(a){var b=this.paper.set();return this.forEach(function(c){var d=c.glow(a);null!=d&&d.forEach(function(a){b.push(a)})}),b},c.registerFont=function(a){if(!a.face)return a;this.fonts=this.fonts||{};var b={w:a.w,face:{},glyphs:{}},c=a.face["font-family"];for(var d in a.face)a.face[w](d)&&(b.face[d]=a.face[d]);if(this.fonts[c]?this.fonts[c].push(b):this.fonts[c]=[b],!a.svg){b.face["units-per-em"]=_(a.face["units-per-em"],10);for(var e in a.glyphs)if(a.glyphs[w](e)){var f=a.glyphs[e];if(b.glyphs[e]={w:f.w,k:{},d:f.d&&"M"+f.d.replace(/[mlcxtrv]/g,function(a){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[a]||"M"})+"z"},f.k)for(var g in f.k)f[w](g)&&(b.glyphs[e].k[g]=f.k[g])}}return a},V.getFont=function(a,b,d,e){if(e=e||"normal",d=d||"normal",b=+b||{normal:400,bold:700,lighter:300,bolder:800}[b]||400,c.fonts){var f=c.fonts[a];if(!f){var g=new RegExp("(^|\\s)"+a.replace(/[^\w\d\s+!~.:_-]/g,u)+"(\\s|$)","i");for(var h in c.fonts)if(c.fonts[w](h)&&g.test(h)){f=c.fonts[h];break}}var i;if(f)for(var j=0,k=f.length;k>j&&(i=f[j],i.face["font-weight"]!=b||i.face["font-style"]!=d&&i.face["font-style"]||i.face["font-stretch"]!=e);j++);return i}},V.print=function(a,b,d,e,f,g,h){g=g||"middle",h=bb(cb(h||0,1),-1);var i,j=Z(d)[G](u),k=0,l=0,m=u;if(c.is(e,d)&&(e=this.getFont(e)),e){i=(f||16)/e.face["units-per-em"];for(var n=e.face.bbox[G](pb),o=+n[0],p=n[3]-n[1],q=0,r=+n[1]+("baseline"==g?p+ +e.face.descent:p/2),s=0,t=j.length;t>s;s++){if("\n"==j[s])k=0,w=0,l=0,q+=p;else{var v=l&&e.glyphs[j[s-1]]||{},w=e.glyphs[j[s]];k+=l?(v.w||e.w)+(v.k&&v.k[j[s]]||0)+e.w*h:0,l=1}w&&w.d&&(m+=c.transformPath(w.d,["t",k*i,q*i,"s",i,i,o,r,"t",(a-o)/i,(b-r)/i]))}}return this.path(m).attr({fill:"#000",stroke:"none"})},V.add=function(a){if(c.is(a,"array"))for(var b,d=this.set(),e=0,f=a.length;f>e;e++)b=a[e]||{},W[w](b.type)&&d.push(this[b.type]().attr(b));return d},c.format=function(a,b){var d=c.is(b,D)?[0][A](b):arguments;return a&&c.is(a,C)&&d.length-1&&(a=a.replace(qb,function(a,b){return null==d[++b]?u:d[b]})),a||u},c.fullfill=function(){var a=/\{([^\}]+)\}/g,b=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,c=function(a,c,d){var e=d;return c.replace(b,function(a,b,c,d,f){b=b||d,e&&(b in e&&(e=e[b]),"function"==typeof e&&f&&(e=e()))}),e=(null==e||e==d?a:e)+""};return function(b,d){return String(b).replace(a,function(a,b){return c(a,b,d)})}}(),c.ninja=function(){return P.was?O.win.Raphael=P.is:delete Raphael,c};var Pc=c.vml&&.5||0;return c.crispBound=Xb(function(a,b,c,d,e){var f,g={};return a=a||0,b=b||0,c=c||0,d=d||0,e=e||0,f=e%2/2+Pc,g.x=ib(a+f)-f,g.y=ib(b+f)-f,g.width=ib(a+c+f)-f-g.x,g.height=ib(b+d+f)-f-g.y,g["stroke-width"]=e,0===g.width&&0!==c&&(g.width=1),0===g.height&&0!==d&&(g.height=1),g},c),vc.crisp=function(){var a,b=this,d=b.attrs,e=b.attr(["x","y","width","height","stroke-width"]);e=c.crispBound(e.x,e.y,e.width,e.height,e["stroke-width"]);for(a in e)d[a]===e[a]&&delete e[a];return b.attr(e)},c.st=Nc,c.define=function(a,b,d,e,f,g){var h,i;if(c.is(a,D))for(h=0,i=a.length;i>h;h++)c.define(a[h]);else{if(c.is(a,E))return void c.define(a.name,a[a.name],a.ca,a.fn,a.e,a.data);if(a&&!c.fn[a])return c.fn[a]=function(){var g,h=arguments,i=b.apply(this,h);if(e&&c.is(e,E))for(g in e)i[g]=e[g];if(f&&c.is(f,E))for(g in f)i[g]&&i[g](f[g]);if(d){if(c.is(d,"function"))i.ca[a]=d;else for(g in d)i.ca[g]=d[g];i.ca[a]&&(c._lastArgIfGroup(h,!0),i.attr(a,M.call(h)))}return i},d&&(c.fn[a].ca=d),e&&(c.fn[a].fn=e),f&&(c.fn[a].e=f),g&&(c.fn[a].data=g),c.fn[a]}},function(a,b,d){function e(){/in/.test(a.readyState)?setTimeout(e,9):c.eve("raphael.DOMload")}null==a.readyState&&a.addEventListener&&(a.addEventListener(b,d=function(){a.removeEventListener(b,d,!1),a.readyState="complete"},!1),a.readyState="loading"),e()}(document,"DOMContentLoaded"),b.on("raphael.DOMload",function(){s=!0}),function(){if(c.svg){var a="hasOwnProperty",b=String,d=parseFloat,e=parseInt,f=Math,g=f.max,h=f.abs,i=f.pow,j=f.sqrt,k=/[, ]+/,l=!(!/AppleWebKit/.test(c._g.win.navigator.userAgent)||/Chrome/.test(c._g.win.navigator.userAgent)&&!(c._g.win.navigator.appVersion.match(/Chrome\/(\d+)\./)[1]<29)),m=c.eve,n="",o=" ",p="http://www.w3.org/1999/xlink",q={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},r={};c.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version},c._url=n;var s=function(a,b){var c=a.gradient;if(c){if(c===b)return;c.refCount--,c.refCount||c.parentNode.removeChild(c),delete a.gradient}b&&(a.gradient=b,b.refCount++)},t=c._createNode=function(d,e){if(e){"string"==typeof d&&(d=t(d));for(var f in e)e[a](f)&&("xlink:"==f.substring(0,6)?d.setAttributeNS(p,f.substring(6),b(e[f])):d.setAttribute(f,b(e[f])))}else d=c._g.doc.createElementNS("http://www.w3.org/2000/svg",d);return d},u={userSpaceOnUse:"userSpaceOnUse",objectBoundingBox:"objectBoundingBox"},v={pad:"pad",redlect:"reflect",repeat:"repeat"},w=function(a,e){if(!a.paper||!a.paper.defs)return 0;var k,l,m,o,p,q="linear",r=a.paper,w=(r.id+"-"+e).replace(/[\(\)\s%:,\xb0#]/g,"_"),x=.5,y=.5,z=a.node,A=z.style,B=c._g.doc.getElementById(w);if(!B){if(e=b(e).replace(c._radial_gradient,function(a,b){q="radial",b=b&&b.split(",")||[],o=b[5],p=b[6];var c,e,f=b[0],g=b[1],h=b[2],r=b[3],s=b[4],t=f&&g;return h&&(k=/\%/.test(h)?h:d(h)),o===u.userSpaceOnUse?(t&&(x=f,y=g),r&&s&&(l=r,m=s,t||(x=l,y=m)),n):(t&&(x=d(f),y=d(g),c=2*(y>.5)-1,(e=i(x-.5,2))+i(y-.5,2)>.25&&.25>e&&(y=j(.25-e)*c+.5)&&.5!==y&&(y=y.toFixed(5)-1e-5*c)),r&&s&&(l=d(r),m=d(s),c=2*(m>.5)-1,(e=i(l-.5,2))+i(m-.5,2)>.25&&.25>e&&(m=j(.25-e)*c+.5)&&.5!==m&&(m=m.toFixed(5)-1e-5*c),t||(x=l,y=m)),n)}),e=e.split(/\s*\-\s*/),"linear"==q){var C,D,E=e.shift(),F=E.match(/\((.*)\)/);if(F=F&&F[1]&&F[1].split(/\s*\,\s*/),E=-d(E),isNaN(E))return null;F&&F.length?(F[0]in u?(o=F.shift(),F[0]in v&&(p=F.shift())):(F[4]&&(o=F[4]),F[5]&&(p=F[5])),C=[F[0]||"0%",F[1]||"0%",F[2]||"100%",F[3]||"0%"]):(C=[0,0,f.cos(c.rad(E)),f.sin(c.rad(E))],D=1/(g(h(C[2]),h(C[3]))||1),C[2]*=D,C[3]*=D,C[2]<0&&(C[0]=-C[2],C[2]=0),C[3]<0&&(C[1]=-C[3],C[3]=0))}var G=c._parseDots(e);if(!G)return null;B=t(q+"Gradient",{id:w}),B.refCount=0,o in u&&B.setAttribute("gradientUnits",b(o)),p in v&&B.setAttribute("spreadMethod",b(p)),"radial"===q?(void 0!==k&&B.setAttribute("r",b(k)),void 0!==l&&void 0!==m&&(B.setAttribute("cx",b(l)),B.setAttribute("cy",b(m))),B.setAttribute("fx",b(x)),B.setAttribute("fy",b(y))):t(B,{x1:C[0],y1:C[1],x2:C[2],y2:C[3]});for(var H=0,I=G.length;I>H;H++)B.appendChild(t("stop",{offset:G[H].offset?G[H].offset:H?"100%":"0%","stop-color":G[H].color||"#fff","stop-opacity":void 0===G[H].opacity?1:G[H].opacity}));r.defs.appendChild(B)}return s(a,B),t(z,{fill:"url('"+c._url+"#"+w+"')",opacity:1,"fill-opacity":1}),A.fill=n,A.opacity=1,A.fillOpacity=1,1 -},x=function(a){var b=a.getBBox(1);t(a.pattern,{patternTransform:a.matrix.invert()+" translate("+b.x+","+b.y+")"})},y=function(d,e,f){if("path"==d.type){for(var g,h,i,j,k,l=b(e).toLowerCase().split("-"),m=d.paper,o=f?"end":"start",p=d.node,s=d.attrs,u=s["stroke-width"],v=l.length,w="classic",x=3,y=3,z=5;v--;)switch(l[v]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":w=l[v];break;case"wide":y=5;break;case"narrow":y=2;break;case"long":x=5;break;case"short":x=2}if("open"==w?(x+=2,y+=2,z+=2,i=1,j=f?4:1,k={fill:"none",stroke:s.stroke}):(j=i=x/2,k={fill:s.stroke,stroke:"none"}),d._.arrows?f?(d._.arrows.endPath&&r[d._.arrows.endPath]--,d._.arrows.endMarker&&r[d._.arrows.endMarker]--):(d._.arrows.startPath&&r[d._.arrows.startPath]--,d._.arrows.startMarker&&r[d._.arrows.startMarker]--):d._.arrows={},"none"!=w){var A="raphael-marker-"+w,B="raphael-marker-"+o+w+x+y+"-obj"+d.id;c._g.doc.getElementById(A)?r[A]++:(m.defs.appendChild(t(t("path"),{"stroke-linecap":"round",d:q[w],id:A})),r[A]=1);var C,D=c._g.doc.getElementById(B);D?(r[B]++,C=D.getElementsByTagName("use")[0]):(D=t(t("marker"),{id:B,markerHeight:y,markerWidth:x,orient:"auto",refX:j,refY:y/2}),C=t(t("use"),{"xlink:href":"#"+A,transform:(f?"rotate(180 "+x/2+" "+y/2+") ":n)+"scale("+x/z+","+y/z+")","stroke-width":(1/((x/z+y/z)/2)).toFixed(4)}),D.appendChild(C),m.defs.appendChild(D),r[B]=1),t(C,k);var E=i*("diamond"!=w&&"oval"!=w);f?(g=d._.arrows.startdx*u||0,h=c.getTotalLength(s.path)-E*u):(g=E*u,h=c.getTotalLength(s.path)-(d._.arrows.enddx*u||0)),k={},k["marker-"+o]="url('"+c._url+"#"+B+"')",(h||g)&&(k.d=Raphael.getSubpath(s.path,g,h)),t(p,k),d._.arrows[o+"Path"]=A,d._.arrows[o+"Marker"]=B,d._.arrows[o+"dx"]=E,d._.arrows[o+"Type"]=w,d._.arrows[o+"String"]=e}else f?(g=d._.arrows.startdx*u||0,h=c.getTotalLength(s.path)-g):(g=0,h=c.getTotalLength(s.path)-(d._.arrows.enddx*u||0)),d._.arrows[o+"Path"]&&t(p,{d:Raphael.getSubpath(s.path,g,h)}),delete d._.arrows[o+"Path"],delete d._.arrows[o+"Marker"],delete d._.arrows[o+"dx"],delete d._.arrows[o+"Type"],delete d._.arrows[o+"String"];for(k in r)if(r[a](k)&&!r[k]){var F=c._g.doc.getElementById(k);F&&F.parentNode.removeChild(F)}}},z={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},A=function(a,d,e){var f=z[b(d).toLowerCase()];if(d=f||void 0!==d&&[].concat(d)){var g,h=a.attrs["stroke-width"]||"1",i={round:h,square:h,butt:0}[a.attrs["stroke-linecap"]||e["stroke-linecap"]]||0,j=g=d.length;if(f)for(;g--;)d[g]=d[g]*h+(g%2?1:-1)*i;else for(g=0;j>g;g+=2)d[g]-=i,d[g+1]&&(d[g+1]+=i),d[g]<=0&&(d[g]=.1);c.is(d,"array")&&t(a.node,{"stroke-dasharray":d.join(",")})}},B=function(a,b){for(var c in b)m("raphael.attr."+c+"."+a.id,a,b[c],c),a.ca[c]&&a.attr(c,b[c])},C=c._setFillAndStroke=function(d,f){if(d.paper.canvas){var i=d.node,j=d.attrs,m=d.paper,o=i.style,q=o.visibility;o.visibility="hidden";for(var r in f)if(f[a](r)){if(!c._availableAttrs[a](r))continue;var u=f[r];switch(j[r]=u,r){case"blur":d.blur(u);break;case"href":case"title":case"target":var v=i.parentNode;if("a"!=v.tagName.toLowerCase()){if(u==n)break;var z=t("a");z.raphael=!0,z.raphaelid=i.raphaelid,v.insertBefore(z,i),z.appendChild(i),v=z}"target"==r?v.setAttributeNS(p,"show","blank"==u?"new":u):v.setAttributeNS(p,r,u),i.titleNode=v;break;case"cursor":o.cursor=u;break;case"transform":d.transform(u);break;case"rotation":c.is(u,"array")?d.rotate.apply(d,u):d.rotate(u);break;case"arrow-start":y(d,u);break;case"arrow-end":y(d,u,1);break;case"clip-path":var B=!0;case"clip-rect":var C=!B&&b(u).split(k);if(d._.clipispath=!!B,B||4==C.length){d.clip&&d.clip.parentNode.parentNode.removeChild(d.clip.parentNode);var D=t("clipPath"),F=t(B?"path":"rect");D.id=c.createUUID(),t(F,B?{d:u?j["clip-path"]=c._pathToAbsolute(u):c._availableAttrs.path,fill:"none"}:{x:C[0],y:C[1],width:C[2],height:C[3],transform:d.matrix.invert()}),D.appendChild(F),m.defs.appendChild(D),t(i,{"clip-path":"url('"+c._url+"#"+D.id+"')"}),d.clip=F}if(!u){var G=i.getAttribute("clip-path");if(G){var H=c._g.doc.getElementById(G.replace(/(^url\(#|\)$)/g,n));H&&H.parentNode.removeChild(H),t(i,{"clip-path":n}),delete d.clip}}break;case"path":"path"==d.type&&(t(i,{d:u?j.path=c._pathToAbsolute(u):c._availableAttrs.path}),d._.dirty=1,d._.arrows&&("startString"in d._.arrows&&y(d,d._.arrows.startString),"endString"in d._.arrows&&y(d,d._.arrows.endString,1)));break;case"width":if(i.setAttribute(r,u),d._.dirty=1,!j.fx)break;r="x",u=j.x;case"x":j.fx&&(u=-j.x-(j.width||0));case"rx":if("rx"==r&&"rect"==d.type)break;case"cx":i.setAttribute(r,u),d.pattern&&x(d),d._.dirty=1;break;case"height":if(i.setAttribute(r,u),d._.dirty=1,!j.fy)break;r="y",u=j.y;case"y":j.fy&&(u=-j.y-(j.height||0));case"ry":if("ry"==r&&"rect"==d.type)break;case"cy":i.setAttribute(r,u),d.pattern&&x(d),d._.dirty=1;break;case"r":"rect"==d.type?t(i,{rx:u,ry:u}):i.setAttribute(r,u),d._.dirty=1;break;case"src":"image"==d.type&&i.setAttributeNS(p,"href",u);break;case"stroke-width":(1!=d._.sx||1!=d._.sy)&&(u/=g(h(d._.sx),h(d._.sy))||1),m._vbSize&&(u*=m._vbSize),l&&0===u&&(u=1e-6),i.setAttribute(r,u),j["stroke-dasharray"]&&A(d,j["stroke-dasharray"],f),d._.arrows&&("startString"in d._.arrows&&y(d,d._.arrows.startString),"endString"in d._.arrows&&y(d,d._.arrows.endString,1));break;case"stroke-dasharray":A(d,u,f);break;case"fill":var I=b(u).match(c._ISURL);if(I){D=t("pattern");var J=t("image");D.id=c.createUUID(),t(D,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),t(J,{x:0,y:0,"xlink:href":I[1]}),D.appendChild(J),function(a){c._preload(I[1],function(){var b=this.offsetWidth,c=this.offsetHeight;t(a,{width:b,height:c}),t(J,{width:b,height:c}),m.safari()})}(D),m.defs.appendChild(D),o.fill="url('"+c._url+"#"+D.id+"')",t(i,{fill:o.fill}),d.pattern=D,d.pattern&&x(d);break}var K=c.getRGB(u);if(K.error){if(("circle"==d.type||"ellipse"==d.type||"r"!=b(u).charAt())&&w(d,u)){if("opacity"in j||"fill-opacity"in j){var L=c._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g,n));if(L){var M=L.getElementsByTagName("stop");t(M[M.length-1],{"stop-opacity":("opacity"in j?j.opacity:1)*("fill-opacity"in j?j["fill-opacity"]:1)})}}j.gradient=u,j.fill="none",o.fill=n;break}}else delete f.gradient,delete j.gradient,!c.is(j.opacity,"undefined")&&c.is(f.opacity,"undefined")&&t(i,{opacity:j.opacity}),!c.is(j["fill-opacity"],"undefined")&&c.is(f["fill-opacity"],"undefined")&&t(i,{"fill-opacity":j["fill-opacity"]}),d.gradient&&s(d);K[a]("opacity")?(t(i,{"fill-opacity":o.fillOpacity=K.opacity>1?K.opacity/100:K.opacity}),d._.fillOpacityDirty=!0):d._.fillOpacityDirty&&c.is(j["fill-opacity"],"undefined")&&c.is(f["fill-opacity"],"undefined")&&(i.removeAttribute("fill-opacity"),o.fillOpacity=n,delete d._.fillOpacityDirty);case"stroke":K=c.getRGB(u),i.setAttribute(r,K.hex),o[r]=K.hex,"stroke"==r&&(K[a]("opacity")?(t(i,{"stroke-opacity":o.strokeOpacity=K.opacity>1?K.opacity/100:K.opacity}),d._.strokeOpacityDirty=!0):d._.strokeOpacityDirty&&c.is(j["stroke-opacity"],"undefined")&&c.is(f["stroke-opacity"],"undefined")&&(i.removeAttribute("stroke-opacity"),o.strokeOpacity=n,delete d._.strokeOpacityDirty),d._.arrows&&("startString"in d._.arrows&&y(d,d._.arrows.startString),"endString"in d._.arrows&&y(d,d._.arrows.endString,1)));break;case"gradient":("circle"==d.type||"ellipse"==d.type||"r"!=b(u).charAt())&&w(d,u);break;case"line-height":case"vertical-align":break;case"visibility":"hidden"===u?d.hide():d.show();break;case"opacity":j.gradient&&!j[a]("stroke-opacity")&&t(i,{"stroke-opacity":u>1?u/100:u});case"fill-opacity":if(j.gradient){L=c._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g,n)),L&&(M=L.getElementsByTagName("stop"),t(M[M.length-1],{"stop-opacity":u}));break}default:"font-size"==r&&(u=e(u,10)+"px");var N=r.replace(/(\-.)/g,function(a){return a.substring(1).toUpperCase()});o[N]=u,d._.dirty=1,i.setAttribute(r,u)}}"text"===d.type&&E(d,f),o.visibility=q}},D=1.2,E=function(e,f){if("text"==e.type&&(f[a]("text")||f[a]("font")||f[a]("font-size")||f[a]("x")||f[a]("y")||f[a]("line-height")||f[a]("vertical-align"))){var g=e.attrs,h=e.node,i=h.firstChild&&c._g.doc.defaultView.getComputedStyle(h.firstChild,n),j=i?d(c._g.doc.defaultView.getComputedStyle(h.firstChild,n).getPropertyValue("font-size")):10,k=d(f["line-height"]||g["line-height"])||j*D,l=g[a]("vertical-align")?g["vertical-align"]:"middle";if(isNaN(k)&&(k=j*D),c.is(f.text,"array")&&(f.text=f.text.join("
")),l="top"===l?-.5:"bottom"===l?.5:0,f[a]("text")&&(f.text!==g.text||e._textdirty)){for(g.text=f.text;h.firstChild;)h.removeChild(h.firstChild);for(var m,o=b(f.text).split(/\n|/gi),p=[],q=0,r=o.length;r>q;q++)m=t("tspan"),q?t(m,{dy:k,x:g.x}):t(m,{dy:k*o.length*l,x:g.x}),o[q]||(m.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o[q]=" "),m.appendChild(c._g.doc.createTextNode(o[q])),h.appendChild(m),p[q]=m;e._textdirty=!1}else for(p=h.getElementsByTagName("tspan"),q=0,r=p.length;r>q;q++)q?t(p[q],{dy:k,x:g.x}):t(p[0],{dy:k*p.length*l,x:g.x});t(h,{x:g.x,y:g.y}),e._.dirty=1;var s=e._getBBox(),u=g.y-(s.y+s.height/2);if(s.isCalculated)switch(g["vertical-align"]){case"top":u=.75*s.height;break;case"bottom":u=-(.25*s.height);break;default:u=g.y-(s.y+.25*s.height)}u&&c.is(u,"finite")&&p[0]&&t(p[0],{dy:u})}},F=function(a,b,d){var e=this,f=d||b;f.canvas&&f.canvas.appendChild(a),e.node=e[0]=a,a.raphael=!0,a.raphaelid=e.id=c._oid++,e.matrix=c.matrix(),e.realPath=null,e.attrs=e.attrs||{},e.followers=e.followers||[],e.paper=b,e.ca=e.customAttributes=e.customAttributes||new b._CustomAttributes,e._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},e.parent=f,!f.bottom&&(f.bottom=e),e.prev=f.top,f.top&&(f.top.next=e),f.top=e,e.next=null},G=c.el;F.prototype=G,G.constructor=F,c._engine.getNode=function(a){var b=a.node||a[0].node;return b.titleNode||b},c._engine.getLastNode=function(a){var b=a.node||a[a.length-1].node;return b.titleNode||b},G.rotate=function(a,c,e){var f,g=this;return g.removed?g:(a=b(a).split(k),a.length-1&&(c=d(a[1]),e=d(a[2])),a=d(a[0]),null==e&&(c=e),(null==c||null==e)&&(f=g.getBBox(1),c=f.x+f.width/2,e=f.y+f.height/2),g.transform(g._.transform.concat([["r",a,c,e]])),g)},G.scale=function(a,c,e,f){var g,h=this;return h.removed?h:(a=b(a).split(k),a.length-1&&(c=d(a[1]),e=d(a[2]),f=d(a[3])),a=d(a[0]),null==c&&(c=a),null==f&&(e=f),(null==e||null==f)&&(g=h.getBBox(1)),e=null==e?g.x+g.width/2:e,f=null==f?g.y+g.height/2:f,h.transform(h._.transform.concat([["s",a,c,e,f]])),h)},G.translate=function(a,c){var e=this;return e.removed?e:(a=b(a).split(k),a.length-1&&(c=d(a[1])),a=d(a[0])||0,c=+c||0,e.transform(e._.transform.concat([["t",a,c]])),e)},G.transform=function(b){var d,e=this,f=e._;return null==b?f.transform:(c._extractTransform(e,b),e.clip&&!f.clipispath&&t(e.clip,{transform:e.matrix.invert()}),e.pattern&&x(e),e.node&&t(e.node,{transform:e.matrix}),(1!=f.sx||1!=f.sy)&&(d=e.attrs[a]("stroke-width")?e.attrs["stroke-width"]:1,e.attr({"stroke-width":d})),e)},G.hide=function(){var a=this;return!a.removed&&a.paper.safari(a.node.style.display="none"),a},G.show=function(){var a=this;return!a.removed&&a.paper.safari(a.node.style.display=n),a},G.remove=function(){if(!this.removed&&this.parent.canvas){var a,b=this,d=c._engine.getNode(b),e=b.paper,f=e.defs;for(e.__set__&&e.__set__.exclude(b),m.unbind("raphael.*.*."+b.id),b.gradient&&f&&s(b);a=b.followers.pop();)a.el.remove();for(;a=b.bottom;)a.remove();if(b._drag&&b.undrag(),b.events)for(;a=b.events.pop();)a.unbind();b.parent.canvas.removeChild(d),b.removeData(),delete e._elementsById[b.id],c._tear(b,b.parent);for(a in b)b[a]="function"==typeof b[a]?c._removedFactory(a):null;b.removed=!0}},G._getBBox=function(){var a,b,c=this,d=c.node,e={},f=c.attrs;"none"===d.style.display&&(c.show(),b=!0);try{e=d.getBBox(),"text"==c.type&&(void 0===e.x&&(e.isCalculated=!0,a=f["text-anchor"],e.x=(f.x||0)-e.width*("start"===a?0:"middle"===a?.5:1)),void 0===e.y&&(e.isCalculated=!0,a=f["vertical-align"],e.y=(f.y||0)-e.height*("bottom"===a?1:"middle"===a?.5:0)))}catch(g){}finally{e=e||{}}return b&&c.hide(),e},G.attr=function(b,d){if(this.removed)return this;if(null==b){var e={};for(var f in this.attrs)this.attrs[a](f)&&(e[f]=this.attrs[f]);return e.gradient&&"none"==e.fill&&(e.fill=e.gradient)&&delete e.gradient,e.transform=this._.transform,e.visibility="none"===this.node.style.display?"hidden":"visible",e}if(null==d&&c.is(b,"string")){if("fill"==b&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("transform"==b)return this._.transform;if("visibility"==b)return"none"===this.node.style.display?"hidden":"visible";for(var g=b.split(k),h={},i=0,j=g.length;j>i;i++)b=g[i],h[b]=b in this.attrs?this.attrs[b]:c.is(this.ca[b],"function")?this.ca[b].def:c._availableAttrs[b];return j-1?h:h[g[0]]}if(null==d&&c.is(b,"array")){for(h={},i=0,j=b.length;j>i;i++)h[b[i]]=this.attr(b[i]);return h}if(null!=d){var l={};l[b]=d}else null!=b&&c.is(b,"object")&&(l=b);for(var n in l)m("raphael.attr."+n+"."+this.id,this,l[n],n);var o={};for(n in this.ca)if(this.ca[n]&&l[a](n)&&c.is(this.ca[n],"function")&&!this.ca["_invoked"+n]){this.ca["_invoked"+n]=!0;var p=this.ca[n].apply(this,[].concat(l[n]));delete this.ca["_invoked"+n];for(var q in p)p[a](q)&&(l[q]=p[q]);this.attrs[n]=l[n],p===!1&&(o[n]=l[n],delete l[n])}C(this,l);var r;for(i=0,j=this.followers.length;j>i;i++)r=this.followers[i],r.cb&&!r.cb.call(r.el,l,this)||r.el.attr(l);for(q in o)l[q]=o[q];return this},G.blur=function(a){var b=this;if(0!==+a){var d=t("filter"),e=t("feGaussianBlur");b.attrs.blur=a,d.id=c.createUUID(),t(e,{stdDeviation:+a||1.5}),d.appendChild(e),b.paper.defs.appendChild(d),b._blur=d,t(b.node,{filter:"url('"+c._url+"#"+d.id+"')"})}else b._blur&&(b._blur.parentNode.removeChild(b._blur),delete b._blur,delete b.attrs.blur),b.node.removeAttribute("filter")},G.on=function(a,b){if(this.removed)return this;var d=b;return c.supportsTouch&&(a=c._touchMap[a]||"click"===a&&"touchstart"||a,d=function(a){a.preventDefault(),b()}),this.node["on"+a]=d,this},c._engine.path=function(a,b,c){var d=t("path"),e=new F(d,a,c);return e.type="path",C(e,b),B(e,b),e},c._engine.group=function(a,b,c){var d=t("g"),e=new F(d,a,c);return e.type="group",e.canvas=e.node,e.top=e.bottom=null,e._id=b||n,b&&d.setAttribute("class","raphael-group-"+e.id+"-"+b),e},c._engine.circle=function(a,b,c){var d=t("circle"),e=new F(d,a,c);return e.type="circle",C(e,b),B(e,b),e},c._engine.rect=function(a,b,c){var d=t("rect"),e=new F(d,a,c);return e.type="rect",b.rx=b.ry=b.r,C(e,b),B(e,b),e},c._engine.ellipse=function(a,b,c){var d=t("ellipse"),e=new F(d,a,c);return e.type="ellipse",C(e,b),B(e,b),e},c._engine.image=function(a,b,c){var d=t("image"),e=(b.src,new F(d,a,c));return e.type="image",d.setAttribute("preserveAspectRatio","none"),C(e,b),B(e,b),e},c._engine.text=function(a,b,c){var d=t("text"),e=new F(d,a,c);return e.type="text",e._textdirty=!0,C(e,b),B(e,b),e},c._engine.setSize=function(a,b){return this.width=a||this.width,this.height=b||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},c._engine.create=function(){var a=c._getContainer.apply(0,arguments),b=a&&a.container,d=a.x,e=a.y,f=a.width,g=a.height;if(!b)throw new Error("SVG container not found.");var h,i=t("svg"),j="overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;-moz-user-select:-moz-none;-khtml-user-select:none;-ms-user-select:none;user-select:none;-o-user-select:none;cursor:default;";return d=d||0,e=e||0,f=f||512,g=g||342,t(i,{height:g,version:1.1,width:f,xmlns:"http://www.w3.org/2000/svg"}),1==b?(i.style.cssText=j+"position:absolute;left:"+d+"px;top:"+e+"px",c._g.doc.body.appendChild(i),h=1):(i.style.cssText=j+"position:relative",b.firstChild?b.insertBefore(i,b.firstChild):b.appendChild(i)),b=new c._Paper,b.width=f,b.height=g,b.canvas=i,t(i,{id:"raphael-paper-"+b.id}),b.clear(),b._left=b._top=0,h&&(b.renderfix=function(){}),b.renderfix(),b},c._engine.setViewBox=function(a,b,c,d,e){m("raphael.setViewBox",this,this._viewBox,[a,b,c,d,e]);var f,h,i=g(c/this.width,d/this.height),j=this.top,k=e?"meet":"xMinYMin";for(null==a?(this._vbSize&&(i=1),delete this._vbSize,f="0 0 "+this.width+o+this.height):(this._vbSize=i,f=a+o+b+o+c+o+d),t(this.canvas,{viewBox:f,preserveAspectRatio:k});i&&j;)h="stroke-width"in j.attrs?j.attrs["stroke-width"]:1,j.attr({"stroke-width":h}),j._.dirty=1,j._.dirtyT=1,j=j.prev;return this._viewBox=[a,b,c,d,!!e],this},c.prototype.renderfix=function(){var a,b=this.canvas,c=b.style;try{a=b.getScreenCTM()||b.createSVGMatrix()}catch(d){a=b.createSVGMatrix()}var e=-a.e%1,f=-a.f%1;(e||f)&&(e&&(this._left=(this._left+e)%1,c.left=this._left+"px"),f&&(this._top=(this._top+f)%1,c.top=this._top+"px"))},c.prototype._desc=function(a){var b=this.desc;if(b)for(;b.firstChild;)b.removeChild(b.firstChild);else this.desc=b=t("desc"),this.canvas.appendChild(b);b.appendChild(c._g.doc.createTextNode(c.is(a,"string")?a:"Created with Red Raphaël "+c.version))},c.prototype.clear=function(){var a;for(m("raphael.clear",this);a=this.bottom;)a.remove();for(a=this.canvas;a.firstChild;)a.removeChild(a.firstChild);this.bottom=this.top=null,a.appendChild(this.desc=t("desc")),a.appendChild(this.defs=t("defs"))},c.prototype.remove=function(){var a;for(m("raphael.remove",this);a=this.bottom;)a.remove();this.defs&&this.defs.parentNode.removeChild(this.defs),this.desc&&this.desc.parentNode.removeChild(this.desc),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(a in this)this[a]="function"==typeof this[a]?c._removedFactory(a):null;this.removed=!0};var H=c.st;for(var I in G)G[a](I)&&!H[a](I)&&(H[I]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(I))}}(),function(){if(c.vml){var a="hasOwnProperty",b=String,d=parseFloat,e=Math,f=e.round,g=e.max,h=e.min,i=e.sqrt,j=e.abs,k="fill",l=/[, ]+/,m=c.eve,n=" progid:DXImageTransform.Microsoft",o=" ",p="",q={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},r=/([clmz]),?([^clmz]*)/gi,s=/ progid:\S+Blur\([^\)]+\)/g,t=/-?[^,\s-]+/g,u="position:absolute;left:0;top:0;width:1px;height:1px",v=21600,w={path:1,rect:1,image:1},z={circle:1,ellipse:1},A=function(a){var d=/[ahqstv]/gi,e=c._pathToAbsolute;if(b(a).match(d)&&(e=c._path2curve),d=/[clmz]/g,e==c._pathToAbsolute&&!b(a).match(d)){var g=b(a).replace(r,function(a,b,c){var d=[],e="m"==b.toLowerCase(),g=q[b];return c.replace(t,function(a){e&&2==d.length&&(g+=d+q["m"==b?"l":"L"],d=[]),d.push(f(a*v))}),g+d});return g||"m0,0"}var h,i,j=e(a);g=[];for(var k=0,l=j.length;l>k;k++){h=j[k],i=j[k][0].toLowerCase(),"z"==i&&(i="x");for(var m=1,n=h.length;n>m;m++)i+=f(h[m]*v)+(m!=n-1?",":p);g.push(i)}return g.length?g.join(o):"m0,0"},B=function(a,b,d){var e=c.matrix();return e.rotate(-a,.5,.5),{dx:e.x(b,d),dy:e.y(b,d)}},C=function(a,b,c,d,e,f){var g=a._,h=a.matrix,i=g.fillpos,l=a.node,m=l.style,n=1,p="",q=v/b,r=v/c;if(m.visibility="hidden",b&&c){if(l.coordsize=j(q)+o+j(r),m.rotation=f*(0>b*c?-1:1),f){var s=B(f,d,e);d=s.dx,e=s.dy}if(0>b&&(p+="x"),0>c&&(p+=" y")&&(n=-1),m.flip=p,l.coordorigin=d*-q+o+e*-r,i||g.fillsize){var t=l.getElementsByTagName(k);t=t&&t[0],t&&(l.removeChild(t),i&&(s=B(f,h.x(i[0],i[1]),h.y(i[0],i[1])),t.position=s.dx*n+o+s.dy*n),g.fillsize&&(t.size=g.fillsize[0]*j(b)+o+g.fillsize[1]*j(c)),l.appendChild(t))}m.visibility="visible"}};c._url=p,c.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var D=function(a,c,d){for(var e=b(c).toLowerCase().split("-"),f=d?"end":"start",g=e.length,h="classic",i="medium",j="medium";g--;)switch(e[g]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":h=e[g];break;case"wide":case"narrow":j=e[g];break;case"long":case"short":i=e[g]}var k=a.node.getElementsByTagName("stroke")[0];k[f+"arrow"]=h,k[f+"arrowlength"]=i,k[f+"arrowwidth"]=j},E=function(a,b){for(var c in b)m("raphael.attr."+c+"."+a.id,a,b[c],c),a.ca[c]&&a.attr(c,b[c])},F=c._setFillAndStroke=function(e,i){if(e.paper.canvas){e.attrs=e.attrs||{};var j=e.node,m=e.attrs,n=j.style,q=w[e.type]&&(i.x!=m.x||i.y!=m.y||i.width!=m.width||i.height!=m.height||i.cx!=m.cx||i.cy!=m.cy||i.rx!=m.rx||i.ry!=m.ry||i.r!=m.r),r=z[e.type]&&(m.cx!=i.cx||m.cy!=i.cy||m.r!=i.r||m.rx!=i.rx||m.ry!=i.ry),s="group"===e.type,t=e;for(var u in i)i[a](u)&&(m[u]=i[u]);if(q&&(m.path=c._getPath[e.type](e),e._.dirty=1),i.href&&(j.href=i.href),i.title&&(j.title=i.title),i.target&&(j.target=i.target),i.cursor&&(n.cursor=i.cursor),"blur"in i&&e.blur(i.blur),(i.path&&"path"==e.type||q)&&(j.path=A(~b(m.path).toLowerCase().indexOf("r")?c._pathToAbsolute(m.path):m.path),"image"==e.type&&(e._.fillpos=[m.x,m.y],e._.fillsize=[m.width,m.height],C(e,1,1,0,0,0))),"transform"in i&&e.transform(i.transform),"rotation"in i){var x=i.rotation;c.is(x,"array")?e.rotate.apply(e,x):e.rotate(x)}if("visibility"in i&&("hidden"===i.visibility?e.hide():e.show()),r){var y=+m.cx,B=+m.cy,E=+m.rx||+m.r||0,F=+m.ry||+m.r||0;j.path=c.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",f((y-E)*v),f((B-F)*v),f((y+E)*v),f((B+F)*v),f(y*v))}if("clip-rect"in i){var H=b(i["clip-rect"]).split(l);if(4==H.length){H[0]=+H[0],H[1]=+H[1],H[2]=+H[2]+H[0],H[3]=+H[3]+H[1];var I,K=s?j:j.clipRect||c._g.doc.createElement("div"),L=K.style;s?(e.clip=H.slice(),I=e.matrix.offset(),I=[d(I[0]),d(I[1])],H[0]-=I[0],H[1]-=I[1],H[2]-=I[0],H[3]-=I[1],L.width="10800px",L.height="10800px"):j.clipRect||(L.top="0",L.left="0",L.width=e.paper.width+"px",L.height=e.paper.height+"px",j.parentNode.insertBefore(K,j),K.appendChild(j),K.raphael=!0,K.raphaelid=j.raphaelid,j.clipRect=K),L.position="absolute",L.clip=c.format("rect({1}px {2}px {3}px {0}px)",H)}i["clip-rect"]||(s&&e.clip?(j.style.clip="rect(auto auto auto auto)",delete e.clip):j.clipRect&&(j.clipRect.style.clip="rect(auto auto auto auto)"))}if(e.textpath){var M=e.textpath.style;i.font&&(M.font=i.font),i["font-family"]&&(M.fontFamily='"'+i["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,p)+'"'),i["font-size"]&&(M.fontSize=i["font-size"]),i["font-weight"]&&(M.fontWeight=i["font-weight"]),i["font-style"]&&(M.fontStyle=i["font-style"])}if("arrow-start"in i&&D(t,i["arrow-start"]),"arrow-end"in i&&D(t,i["arrow-end"],1),null!=i.opacity||null!=i["stroke-width"]||null!=i.fill||null!=i.src||null!=i.stroke||null!=i["stroke-width"]||null!=i["stroke-opacity"]||null!=i["fill-opacity"]||null!=i["stroke-dasharray"]||null!=i["stroke-miterlimit"]||null!=i["stroke-linejoin"]||null!=i["stroke-linecap"]){var N=j.getElementsByTagName(k),O=!1,P=-1;if(N=N&&N[0],!N&&(O=N=J(k)),"image"==e.type&&i.src&&(N.src=i.src),i.fill&&(N.on=!0),(null==N.on||"none"==i.fill||null===i.fill)&&(N.on=!1),N.on&&i.fill){var Q=b(i.fill).match(c._ISURL);if(Q){N.parentNode==j&&j.removeChild(N),N.rotate=!0,N.src=Q[1],N.type="tile";var R=e.getBBox(1);N.position=R.x+o+R.y,e._.fillpos=[R.x,R.y],c._preload(Q[1],function(){e._.fillsize=[this.offsetWidth,this.offsetHeight]})}else{var S=c.getRGB(i.fill);N.color=S.hex,N.src=p,N.type="solid",S.error&&(t.type in{circle:1,ellipse:1}||"r"!=b(i.fill).charAt())&&G(t,i.fill,N)?(m.fill="none",m.gradient=i.fill,N.rotate=!1):"opacity"in S&&!("fill-opacity"in i)&&(P=S.opacity)}}if(-1!==P||"fill-opacity"in i||"opacity"in i){var T=((+m["fill-opacity"]+1||2)-1)*((+m.opacity+1||2)-1)*((+P+1||2)-1);T=h(g(T,0),1),N.opacity=T,N.src&&(N.color="none")}j.appendChild(N);var U=j.getElementsByTagName("stroke")&&j.getElementsByTagName("stroke")[0],V=!1;!U&&(V=U=J("stroke")),(i.stroke&&"none"!=i.stroke||i["stroke-width"]||null!=i["stroke-opacity"]||i["stroke-dasharray"]||i["stroke-miterlimit"]||i["stroke-linejoin"]||i["stroke-linecap"])&&(U.on=!0),("none"==i.stroke||null===i.stroke||null==U.on||0==i.stroke||0==i["stroke-width"])&&(U.on=!1);var W=c.getRGB("stroke"in i?i.stroke:m.stroke);U.on&&i.stroke&&(U.color=W.hex),T=((+m["stroke-opacity"]+1||2)-1)*((+m.opacity+1||2)-1)*((+W.opacity+1||2)-1);var X=.75*(d(i["stroke-width"])||1);if(T=h(g(T,0),1),null==i["stroke-width"]&&(X=m["stroke-width"]),i["stroke-width"]&&(U.weight=X),X&&1>X&&(T*=X)&&(U.weight=1),U.opacity=T,i["stroke-linejoin"]&&(U.joinstyle=i["stroke-linejoin"])||V&&(V.joinstyle="miter"),U.miterlimit=i["stroke-miterlimit"]||8,i["stroke-linecap"]&&(U.endcap="butt"==i["stroke-linecap"]?"flat":"square"==i["stroke-linecap"]?"square":"round"),i["stroke-dasharray"]){var Y={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};U.dashstyle=Y[a](i["stroke-dasharray"])?Y[i["stroke-dasharray"]]:i["stroke-dasharray"].join&&i["stroke-dasharray"].join(" ")||p}V&&j.appendChild(U)}if("text"==t.type){t.paper.canvas.style.display=p;var Z=t.paper.span,$=100,_=m.font&&m.font.match(/\d+(?:\.\d*)?(?=px)/),ab=m["line-height"]&&(m["line-height"]+p).match(/\d+(?:\.\d*)?(?=px)/);n=Z.style,m.font&&(n.font=m.font),m["font-family"]&&(n.fontFamily=m["font-family"]),m["font-weight"]&&(n.fontWeight=m["font-weight"]),m["font-style"]&&(n.fontStyle=m["font-style"]),_=d(m["font-size"]||_&&_[0])||10,n.fontSize=_*$+"px",ab=d(m["line-height"]||ab&&ab[0])||12,m["line-height"]&&(n.lineHeight=ab*$+"px"),c.is(i.text,"array")&&(i.text=t.textpath.string=i.text.join("\n").replace(//gi,"\n")),t.textpath.string&&(Z.innerHTML=b(t.textpath.string).replace(/"));var bb=Z.getBoundingClientRect();t.W=m.w=(bb.right-bb.left)/$,t.H=m.h=(bb.bottom-bb.top)/$,t.X=m.x,t.Y=m.y;switch(m["vertical-align"]){case"top":t.bby=t.H/2;break;case"bottom":t.bby=-t.H/2;break;default:t.bby=0}("x"in i||"y"in i||void 0!==t.bby)&&(t.path.v=c.format("m{0},{1}l{2},{1}",f(m.x*v),f((m.y+(t.bby||0))*v),f(m.x*v)+1));for(var cb=["x","y","text","font","font-family","font-weight","font-style","font-size","line-height"],db=0,eb=cb.length;eb>db;db++)if(cb[db]in i){t._.dirty=1;break}switch(m["text-anchor"]){case"start":t.textpath.style["v-text-align"]="left",t.bbx=t.W/2;break;case"end":t.textpath.style["v-text-align"]="right",t.bbx=-t.W/2;break;default:t.textpath.style["v-text-align"]="center",t.bbx=0}t.textpath.style["v-text-kern"]=!0}}},G=function(a,e,f){a.attrs=a.attrs||{};var g=(a.attrs,Math.pow),h="linear",j=".5 .5";if(a.attrs.gradient=e,e=b(e).replace(c._radial_gradient,function(a,b){h="radial",b=b&&b.split(",")||[];{var c=(b[0],b[1],b[2],b[3]),e=b[4];b[5]}return c&&e&&(c=d(c),e=d(e),g(c-.5,2)+g(e-.5,2)>.25&&(e=i(.25-g(c-.5,2))*(2*(e>.5)-1)+.5),j=c+o+e),p}),e=e.split(/\s*\-\s*/),"linear"==h){var k=e.shift();if(k=-d(k),isNaN(k))return null}var l=c._parseDots(e);if(!l)return null;if(a=a.shape||a.node,l.length){f.parentNode==a&&a.removeChild(f),f.on=!0,f.method="none",f.color=l[0].color,f.color2=l[l.length-1].color;for(var m=[],n=1,q=void 0===l[0].opacity?1:l[0].opacity,r=0,s=l.length;s>r;r++)l[r].offset&&m.push(l[r].offset+o+l[r].color),void 0!==l[r].opacity&&(n=l[r].opacity);f.colors=m.length?m.join():"0% "+f.color,f.opacity=n,f["o:opacity2"]=q,"radial"==h?(f.type="gradientTitle",f.focus="100%",f.focussize="0 0",f.focusposition=j,f.angle=0):(f.type="gradient",f.angle=(270-k)%360),a.appendChild(f)}return 1},H=function(a,b,d){var e,f=this,g=d||b;g.canvas&&g.canvas.appendChild(a),e=J("skew"),e.on=!0,a.appendChild(e),f.skew=e,f.node=f[0]=a,a.raphael=!0,a.raphaelid=f.id=c._oid++,f.X=0,f.Y=0,f.attrs=f.attrs||{},f.followers=f.followers||[],f.paper=b,f.ca=f.customAttributes=f.customAttributes||new b._CustomAttributes,f.matrix=c.matrix(),f._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},f.parent=g,!g.bottom&&(g.bottom=f),f.prev=g.top,g.top&&(g.top.next=f),g.top=f,f.next=null},I=c.el;H.prototype=I,I.constructor=H,I.transform=function(a){if(null==a)return this._.transform;var d,e=this.paper._viewBoxShift,f=e?"s"+[e.scale,e.scale]+"-1-1t"+[e.dx,e.dy]:p;e&&(d=a=b(a).replace(/\.{3}|\u2026/g,this._.transform||p)),c._extractTransform(this,f+a);var g,h=this.matrix.clone(),i=this.skew,j=this.node,k=~b(this.attrs.fill).indexOf("-"),l=!b(this.attrs.fill).indexOf("url(");if(h.translate(-.5,-.5),l||k||"image"==this.type)if(i.matrix="1 0 0 1",i.offset="0 0",g=h.split(),k&&g.noRotation||!g.isSimple){j.style.filter=h.toFilter();var m=this.getBBox(),n=this.getBBox(1),q=m.x2&&n.x2&&"x2"||"x",r=m.y2&&n.y2&&"y2"||"y",s=m[q]-n[q],t=m[r]-n[r];j.coordorigin=s*-v+o+t*-v,C(this,1,1,s,t,0)}else j.style.filter=p,C(this,g.scalex,g.scaley,g.dx,g.dy,g.rotate);else j.style.filter=p,i.matrix=b(h),i.offset=h.offset();return d&&(this._.transform=d),this},I.rotate=function(a,c,e){if(this.removed)return this;if(null!=a){if(a=b(a).split(l),a.length-1&&(c=d(a[1]),e=d(a[2])),a=d(a[0]),null==e&&(c=e),null==c||null==e){var f=this.getBBox(1);c=f.x+f.width/2,e=f.y+f.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",a,c,e]])),this}},I.translate=function(a,c){return this.removed?this:(a=b(a).split(l),a.length-1&&(c=d(a[1])),a=d(a[0])||0,c=+c||0,this._.bbox&&(this._.bbox.x+=a,this._.bbox.y+=c),this.transform(this._.transform.concat([["t",a,c]])),this)},I.scale=function(a,c,e,f){if(this.removed)return this;if(a=b(a).split(l),a.length-1&&(c=d(a[1]),e=d(a[2]),f=d(a[3]),isNaN(e)&&(e=null),isNaN(f)&&(f=null)),a=d(a[0]),null==c&&(c=a),null==f&&(e=f),null==e||null==f)var g=this.getBBox(1);return e=null==e?g.x+g.width/2:e,f=null==f?g.y+g.height/2:f,this.transform(this._.transform.concat([["s",a,c,e,f]])),this._.dirtyT=1,this},I.hide=function(){var a=this;return!a.removed&&(a.node.style.display="none"),a},I.show=function(){var a=this;return!a.removed&&(a.node.style.display=p),a},I._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y+(this.bby||0)-this.H/2,width:this.W,height:this.H}},I.remove=function(){if(!this.removed&&this.parent.canvas){var a,b=this,d=c._engine.getNode(b),e=b.paper,f=b.shape;for(e.__set__&&e.__set__.exclude(b),m.unbind("raphael.*.*."+b.id),f&&f.parentNode.removeChild(f),d.parentNode&&d.parentNode.removeChild(d);a=b.followers.pop();)a.el.remove();for(;a=b.bottom;)a.remove();if(b._drag&&b.undrag(),b.events)for(;a=b.events.pop();)a.unbind();b.removeData(),delete e._elementsById[b.id],c._tear(b,b.parent);for(var a in b)b[a]="function"==typeof b[a]?c._removedFactory(a):null;b.removed=!0}},I.attr=function(b,d){if(this.removed)return this;if(null==b){var e={};for(var f in this.attrs)this.attrs[a](f)&&(e[f]=this.attrs[f]);return e.gradient&&"none"==e.fill&&(e.fill=e.gradient)&&delete e.gradient,e.transform=this._.transform,e.visibility="none"===this.node.style.display?"hidden":"visible",e}if(null==d&&c.is(b,"string")){if(b==k&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("visibility"==b)return"none"===this.node.style.display?"hidden":"visible";for(var g=b.split(l),h={},i=0,j=g.length;j>i;i++)b=g[i],h[b]=b in this.attrs?this.attrs[b]:c.is(this.ca[b],"function")?this.ca[b].def:c._availableAttrs[b];return j-1?h:h[g[0]]}if(this.attrs&&null==d&&c.is(b,"array")){for(h={},i=0,j=b.length;j>i;i++)h[b[i]]=this.attr(b[i]);return h}var n;null!=d&&(n={},n[b]=d),null==d&&c.is(b,"object")&&(n=b);for(var o in n)m("raphael.attr."+o+"."+this.id,this,n[o],o);if(n){var p={};for(o in this.ca)if(this.ca[o]&&n[a](o)&&c.is(this.ca[o],"function")&&!this.ca["_invoked"+o]){this.ca["_invoked"+o]=!0;var q=this.ca[o].apply(this,[].concat(n[o]));delete this.ca["_invoked"+o];for(var r in q)q[a](r)&&(n[r]=q[r]);this.attrs[o]=n[o],q===!1&&(p[o]=n[o],delete n[o])}"text"in n&&"text"==this.type&&(c.is(n.text,"array")&&(n.text=n.text.join("\n")),this.textpath.string=n.text.replace(//gi,"\n")),F(this,n);var s;for(i=0,j=this.followers.length;j>i;i++)s=this.followers[i],s.cb&&!s.cb.call(s.el,n,this)||s.el.attr(n);for(var r in p)n[r]=p[r]}return this},I.blur=function(a){var b=this.node.runtimeStyle,d=b.filter;return d=d.replace(s,p),0!==+a?(this.attrs.blur=a,b.filter=d+o+n+".Blur(pixelradius="+(+a||1.5)+")",b.margin=c.format("-{0}px 0 0 -{0}px",f(+a||1.5))):(b.filter=d,b.margin=0,delete this.attrs.blur),this +!function(a){var b,c,d="0.4.2",e="hasOwnProperty",f=/[\.\/]/,g="*",h=function(){},i=function(a,b){return a-b},j={n:{}},k=function(a,d){a=String(a);var e,f=c,g=Array.prototype.slice.call(arguments,2),h=k.listeners(a),j=0,l=[],m={},n=[],o=b;b=a,c=0;for(var p=0,q=h.length;q>p;p++)"zIndex"in h[p]&&(l.push(h[p].zIndex),h[p].zIndex<0&&(m[h[p].zIndex]=h[p]));for(l.sort(i);l[j]<0;)if(e=m[l[j++]],n.push(e.apply(d,g)),c)return c=f,n;for(p=0;q>p;p++)if(e=h[p],"zIndex"in e)if(e.zIndex==l[j]){if(n.push(e.apply(d,g)),c)break;do if(j++,e=m[l[j]],e&&n.push(e.apply(d,g)),c)break;while(e)}else m[e.zIndex]=e;else if(n.push(e.apply(d,g)),c)break;return c=f,b=o,n.length?n:null};k._events=j,k.listeners=function(a){var b,c,d,e,h,i,k,l,m=a.split(f),n=j,o=[n],p=[];for(e=0,h=m.length;h>e;e++){for(l=[],i=0,k=o.length;k>i;i++)for(n=o[i].n,c=[n[m[e]],n[g]],d=2;d--;)b=c[d],b&&(l.push(b),p=p.concat(b.f||[]));o=l}return p},k.on=function(a,b){if(a=String(a),"function"!=typeof b)return function(){};for(var c=a.split(f),d=j,e=0,g=c.length;g>e;e++)d=d.n,d=d.hasOwnProperty(c[e])&&d[c[e]]||(d[c[e]]={n:{}});for(d.f=d.f||[],e=0,g=d.f.length;g>e;e++)if(d.f[e]==b)return h;return d.f.push(b),function(a){+a==+a&&(b.zIndex=+a)}},k.f=function(a){var b=[].slice.call(arguments,1);return function(){k.apply(null,[a,null].concat(b).concat([].slice.call(arguments,0)))}},k.stop=function(){c=1},k.nt=function(a){return a?new RegExp("(?:\\.|\\/|^)"+a+"(?:\\.|\\/|$)").test(b):b},k.nts=function(){return b.split(f)},k.off=k.unbind=function(a,b){if(!a)return void(k._events=j={n:{}});var c,d,h,i,l,m,n,o=a.split(f),p=[j];for(i=0,l=o.length;l>i;i++)for(m=0;mi;i++)for(c=p[i];c.n;){if(b){if(c.f){for(m=0,n=c.f.length;n>m;m++)if(c.f[m]==b){c.f.splice(m,1);break}!c.f.length&&delete c.f}for(d in c.n)if(c.n[e](d)&&c.n[d].f){var q=c.n[d].f;for(m=0,n=q.length;n>m;m++)if(q[m]==b){q.splice(m,1);break}!q.length&&delete c.n[d].f}}else{delete c.f;for(d in c.n)c.n[e](d)&&c.n[d].f&&delete c.n[d].f}c=c.n}},k.once=function(a,b){var c=function(){return k.unbind(a,c),b.apply(this,arguments)};return k.on(a,c)},k.version=d,k.toString=function(){return"You are running Eve "+d},"undefined"!=typeof module&&module.exports?module.exports=k:"undefined"!=typeof define?define("eve",[],function(){return k}):a.eve=k}(this),function(a,b){"function"==typeof define&&define.amd?define(["eve"],function(c){return b(a,c)}):b(a,a.eve)}(this,function(a,b){function c(a){var d,e;return c._url="",c.is(a,"function")?s?a():b.on("raphael.DOMload",a):c.is(a,D)?c._engine.create[z](c,a.splice(0,3+c.is(a[0],B))).add(a):(d=Array.prototype.slice.call(arguments,0),c.is(d[d.length-1],"function")?(e=d.pop(),s?e.call(c._engine.create[z](c,d)):b.on("raphael.DOMload",function(){e.call(c._engine.create[z](c,d))})):c._engine.create[z](c,arguments))}function d(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return a.push(a.splice(c,1)[0])}function e(){return this.hex}function f(a,b){for(var c=[],d=0,e=a.length;e-2*!b>d;d+=2){var f=[{x:+a[d-2],y:+a[d-1]},{x:+a[d],y:+a[d+1]},{x:+a[d+2],y:+a[d+3]},{x:+a[d+4],y:+a[d+5]}];b?d?e-4==d?f[3]={x:+a[0],y:+a[1]}:e-2==d&&(f[2]={x:+a[0],y:+a[1]},f[3]={x:+a[2],y:+a[3]}):f[0]={x:+a[e-2],y:+a[e-1]}:e-4==d?f[3]=f[2]:d||(f[0]={x:+a[d],y:+a[d+1]}),c.push(["C",(-f[0].x+6*f[1].x+f[2].x)/6,(-f[0].y+6*f[1].y+f[2].y)/6,(f[1].x+6*f[2].x-f[3].x)/6,(f[1].y+6*f[2].y-f[3].y)/6,f[2].x,f[2].y])}return c}function g(a,b,c,d,e){var f=-3*b+9*c-9*d+3*e,g=a*f+6*b-12*c+6*d;return a*g-3*b+3*c}function h(a,b,c,d,e,f,h,i,j){null==j&&(j=1),j=j>1?1:0>j?0:j;for(var k=j/2,l=12,m=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],n=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],o=0,p=0;l>p;p++){var q=k*m[p]+k,r=g(q,a,c,e,h),s=g(q,b,d,f,i),t=r*r+s*s;o+=n[p]*ib(t)}return k*o}function i(a,b,c,d,e,f,g,i,j){if(!(0>j||h(a,b,c,d,e,f,g,i)o;)m/=2,n+=(j>k?1:-1)*m,k=h(a,b,c,d,e,f,g,i,n);return n}}function j(a,b,c,d,e,f,g,h){if(!(cb(a,c)cb(e,g)||cb(b,d)cb(f,h))){var i=(a*d-b*c)*(e-g)-(a-c)*(e*h-f*g),j=(a*d-b*c)*(f-h)-(b-d)*(e*h-f*g),k=(a-c)*(f-h)-(b-d)*(e-g);if(k){var l=i/k,m=j/k,n=+l.toFixed(2),o=+m.toFixed(2);if(!(n<+db(a,c).toFixed(2)||n>+cb(a,c).toFixed(2)||n<+db(e,g).toFixed(2)||n>+cb(e,g).toFixed(2)||o<+db(b,d).toFixed(2)||o>+cb(b,d).toFixed(2)||o<+db(f,h).toFixed(2)||o>+cb(f,h).toFixed(2)))return{x:l,y:m}}}}function k(a,b,d){var e=c.bezierBBox(a),f=c.bezierBBox(b);if(!c.isBBoxIntersect(e,f))return d?0:[];for(var g=h.apply(0,a),i=h.apply(0,b),k=cb(~~(g/5),1),l=cb(~~(i/5),1),m=[],n=[],o={},p=d?0:[],q=0;k+1>q;q++){var r=c.findDotsAtSegment.apply(c,a.concat(q/k));m.push({x:r.x,y:r.y,t:q/k})}for(q=0;l+1>q;q++)r=c.findDotsAtSegment.apply(c,b.concat(q/l)),n.push({x:r.x,y:r.y,t:q/l});for(q=0;k>q;q++)for(var s=0;l>s;s++){var t=m[q],u=m[q+1],v=n[s],w=n[s+1],x=eb(u.x-t.x)<.001?"y":"x",y=eb(w.x-v.x)<.001?"y":"x",z=j(t.x,t.y,u.x,u.y,v.x,v.y,w.x,w.y);if(z){if(o[z.x.toFixed(4)]==z.y.toFixed(4))continue;o[z.x.toFixed(4)]=z.y.toFixed(4);var A=t.t+eb((z[x]-t[x])/(u[x]-t[x]))*(u.t-t.t),B=v.t+eb((z[y]-v[y])/(w[y]-v[y]))*(w.t-v.t);A>=0&&1.001>=A&&B>=0&&1.001>=B&&(d?p++:p.push({x:z.x,y:z.y,t1:db(A,1),t2:db(B,1)}))}}return p}function l(a,b,d){a=c._path2curve(a),b=c._path2curve(b);for(var e,f,g,h,i,j,l,m,n,o,p=d?0:[],q=0,r=a.length;r>q;q++){var s=a[q];if("M"==s[0])e=i=s[1],f=j=s[2];else{"C"==s[0]?(n=[e,f].concat(s.slice(1)),e=n[6],f=n[7]):(n=[e,f,e,f,i,j,i,j],e=i,f=j);for(var t=0,u=b.length;u>t;t++){var v=b[t];if("M"==v[0])g=l=v[1],h=m=v[2];else{"C"==v[0]?(o=[g,h].concat(v.slice(1)),g=o[6],h=o[7]):(o=[g,h,g,h,l,m,l,m],g=l,h=m);var w=k(n,o,d);if(d)p+=w;else{for(var x=0,y=w.length;y>x;x++)w[x].segment1=q,w[x].segment2=t,w[x].bez1=n,w[x].bez2=o;p=p.concat(w)}}}}}return p}function m(a,b,c,d,e,f){null!=a?(this.a=+a,this.b=+b,this.c=+c,this.d=+d,this.e=+e,this.f=+f):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function n(){return this.x+v+this.y+v+this.width+" × "+this.height}function o(a,b,c,d,e,f){function g(a){return((l*a+k)*a+j)*a}function h(a,b){var c=i(a,b);return((o*c+n)*c+m)*c}function i(a,b){var c,d,e,f,h,i;for(e=a,i=0;8>i;i++){if(f=g(e)-a,eb(f)e)return c;if(e>d)return d;for(;d>c;){if(f=g(e),eb(f-a)f?c=e:d=e,e=(d-c)/2+c}return e}var j=3*b,k=3*(d-b)-j,l=1-j-k,m=3*c,n=3*(e-c)-m,o=1-m-n;return h(a,1/(200*f))}function p(a,b){var c=[],d={};if(this.ms=b,this.times=1,a){for(var e in a)a[w](e)&&(d[_(e)]=a[e],c.push(_(e)));c.sort(Eb)}this.anim=d,this.top=c[c.length-1],this.percents=c}function q(a,d,e,f,g,h){e=_(e);var i,j,k,l,n,p,q=a.ms,r={},s={},t={};if(f)for(v=0,x=Jc.length;x>v;v++){var u=Jc[v];if(u.el.id==d.id&&u.anim==a){u.percent!=e?(Jc.splice(v,1),k=1):j=u,d.attr(u.totalOrigin);break}}else f=+s;for(var v=0,x=a.percents.length;x>v;v++){if(a.percents[v]==e||a.percents[v]>f*a.top){e=a.percents[v],n=a.percents[v-1]||0,q=q/a.top*(e-n),l=a.percents[v+1],i=a.anim[e];break}f&&d.attr(a.anim[a.percents[v]])}if(i){if(j)j.initstatus=f,j.start=new Date-j.ms*f;else{for(var y in i)if(i[w](y)&&(Cb[w](y)||d.ca[y]))switch(r[y]=d.attr(y),null==r[y]&&(r[y]=Bb[y]),s[y]=i[y],Cb[y]){case B:t[y]=(s[y]-r[y])/q;break;case"colour":r[y]=c.getRGB(r[y]);var z=c.getRGB(s[y]);t[y]={r:(z.r-r[y].r)/q,g:(z.g-r[y].g)/q,b:(z.b-r[y].b)/q};break;case"path":var C=hc(r[y],s[y]),D=C[1];for(r[y]=C[0],t[y]=[],v=0,x=r[y].length;x>v;v++){t[y][v]=[0];for(var E=1,F=r[y][v].length;F>E;E++)t[y][v][E]=(D[v][E]-r[y][v][E])/q}break;case"transform":var H=d._,I=mc(H[y],s[y]);if(I)for(r[y]=I.from,s[y]=I.to,t[y]=[],t[y].real=!0,v=0,x=r[y].length;x>v;v++)for(t[y][v]=[r[y][v][0]],E=1,F=r[y][v].length;F>E;E++)t[y][v][E]=(s[y][v][E]-r[y][v][E])/q;else{var J=d.matrix||new m,K={_:{transform:H.transform},getBBox:function(){return d.getBBox(1)}};r[y]=[J.a,J.b,J.c,J.d,J.e,J.f],kc(K,s[y]),s[y]=K._.transform,t[y]=[(K.matrix.a-J.a)/q,(K.matrix.b-J.b)/q,(K.matrix.c-J.c)/q,(K.matrix.d-J.d)/q,(K.matrix.e-J.e)/q,(K.matrix.f-J.f)/q]}break;case"csv":var L=$(i[y])[G](qb),M=$(r[y])[G](qb);if("clip-rect"==y)for(r[y]=M,t[y]=[],v=M.length;v--;)t[y][v]=(L[v]-r[y][v])/q;s[y]=L;break;default:for(L=[][A](i[y]),M=[][A](r[y]),t[y]=[],v=d.ca[y].length;v--;)t[y][v]=((L[v]||0)-(M[v]||0))/q}var N=i.easing,O=c.easing_formulas[N];if(!O)if(O=$(N).match(tb),O&&5==O.length){var P=O;O=function(a){return o(a,+P[1],+P[2],+P[3],+P[4],q)}}else O=Gb;if(p=i.start||a.start||+new Date,u={anim:a,percent:e,timestamp:p,start:p+(a.del||0),status:0,initstatus:f||0,stop:!1,ms:q,easing:O,from:r,diff:t,to:s,el:d,callback:i.callback,prev:n,next:l,repeat:h||a.times,origin:d.attr(),totalOrigin:g},Jc.push(u),f&&!j&&!k&&(u.stop=!0,u.start=new Date-q*f,1==Jc.length))return Lc();k&&(u.start=new Date-u.ms*f),1==Jc.length&&Kc(Lc)}b("raphael.anim.start."+d.id,d,a)}}function r(a){for(var b=0;be;e++)for(i=a[e],f=1,h=i.length;h>f;f+=2)c=b.x(i[f],i[f+1]),d=b.y(i[f],i[f+1]),i[f]=c,i[f+1]=d;return a},Lb=(c.pick=function(){for(var a,b=0,c=arguments.length;c>b;b+=1)if(a=arguments[b],a||a===!1||0===a)return a;return t},c._lastArgIfGroup=function(a,b){var d=a.length-1,e=a[d];return e&&e.constructor===c.el.constructor&&"group"===e.type?(b&&(a[d]=void 0,delete a[d],N.call(a,d,1)),e):void 0}),Mb=c._serializeArgs=function(a){var b,d,e,f,g=a[0];if(c.is(g,"object")&&!c.is(g,"array")&&"group"!==g.type)for(d=g,g.path&&(b=g.path,b&&!c.is(b,C)&&!c.is(b[0],D)&&(b+=u)),e=1,f=arguments.length;f>e;e+=2)d[arguments[e]]||(d[arguments[e]]=arguments[e+1]);else for(d={},e=1,f=arguments.length;f>e;e+=2)d[arguments[e]]=a[(e-1)/2]||arguments[e+1];return d},Nb=c.merge=function(a,b,c,d,e){var f,g,h,i,j;if(e?(d.push(a),e.push(b)):(d=[a],e=[b]),b instanceof Array)for(f=0;f',Qb=Rb.firstChild,Qb.style.behavior="url(#default#VML)",!Qb||typeof Qb.adj!=E)return c.type=u;Rb=null}c.svg=!((c.vml="VML"==c.type)||(c.canvas="CANVAS"==c.type)),c._Paper=V,c._id=0,c._oid=0,c.angle=function(a,b,d,e,f,g){if(null==f){var h=a-d,i=b-e;return h||i?(180+bb.atan2(-i,-h)*mb+360)%360:0}return c.angle(a,b,f,g)-c.angle(d,e,f,g)},c.rad=function(a){return a%360*lb},c.deg=function(a){return a*mb%360},c.snapTo=function(a,b,c){var d,e;if(Ob(c,F)||(c=10),Ob(a,D)){for(e=a.length;e--;)if(eb(a[e]-b)<=c)return a[e]}else{if(a=+a,d=b%a,c>d)return b-d;if(d>a-c)return b-d+a}return b},c.setWindow=function(a){b("raphael.setWindow",c,P.win,a),S=P.win=a,R=P.doc=P.win.document,c._engine.initWin&&c._engine.initWin(P.win)};var Sb=function(a){if(c.vml){var b,d=/^\s+|\s+$/g;try{var e=new ActiveXObject("htmlfile");e.write(""),e.close(),b=e.body}catch(f){b=createPopup().document.body}var g=b.createTextRange();Sb=Yb(function(a){try{b.style.color=$(a).replace(d,u);var c=g.queryCommandValue("ForeColor");return c=(255&c)<<16|65280&c|(16711680&c)>>>16,"#"+("000000"+c.toString(16)).slice(-6)}catch(e){return H}})}else{var h=P.doc.createElement("i");h.title="Raphaël Colour Picker",h.style.display=H,P.doc.body.appendChild(h),Sb=Yb(function(a){return h.style.color=a,P.doc.defaultView.getComputedStyle(h,u).getPropertyValue("color")})}return Sb(a)},Tb=function(){return"hsb("+[this.h,this.s,this.b]+")"},Ub=function(){return"hsl("+[this.h,this.s,this.l]+")"},Vb=function(){return this.hex},Wb=function(a,b,d){if(null==b&&Ob(a,E)&&"r"in a&&"g"in a&&"b"in a&&(d=a.b,b=a.g,a=a.r),null==b&&Ob(a,C)){var e=c.getRGB(a);a=e.r,b=e.g,d=e.b}return(a>1||b>1||d>1)&&(a/=255,b/=255,d/=255),[a,b,d]},Xb=function(a,b,d,e){var f={r:a*=255,g:b*=255,b:d*=255,hex:c.rgb(a,b,d),toString:Vb};return Ob(e,"finite")&&(f.opacity=e),f};c.color=function(a){var b;return c.is(a,E)&&"h"in a&&"s"in a&&"b"in a?(b=c.hsb2rgb(a),a.r=b.r,a.g=b.g,a.b=b.b,a.hex=b.hex):c.is(a,E)&&"h"in a&&"s"in a&&"l"in a?(b=c.hsl2rgb(a),a.r=b.r,a.g=b.g,a.b=b.b,a.hex=b.hex):(c.is(a,"string")&&(a=c.getRGB(a)),c.is(a,E)&&"r"in a&&"g"in a&&"b"in a?(b=c.rgb2hsl(a),a.h=b.h,a.s=b.s,a.l=b.l,b=c.rgb2hsb(a),a.v=b.b):(a={hex:H},a.r=a.g=a.b=a.h=a.s=a.v=a.l=-1)),a.toString=Vb,a},c.hsb2rgb=function(a,b,c,d){this.is(a,E)&&"h"in a&&"s"in a&&"b"in a&&(c=a.b,b=a.s,a=a.h,d=a.o),a*=360;var e,f,g,h,i;return a=a%360/60,i=c*b,h=i*(1-eb(a%2-1)),e=f=g=c-i,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],Xb(e,f,g,d)},c.hsl2rgb=function(a,b,c,d){this.is(a,E)&&"h"in a&&"s"in a&&"l"in a&&(c=a.l,b=a.s,a=a.h),(a>1||b>1||c>1)&&(a/=360,b/=100,c/=100),a*=360;var e,f,g,h,i;return a=a%360/60,i=2*b*(.5>c?c:1-c),h=i*(1-eb(a%2-1)),e=f=g=c-i/2,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],Xb(e,f,g,d)},c.rgb2hsb=function(a,b,c){c=Wb(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g;return f=cb(a,b,c),g=f-db(a,b,c),d=0==g?null:f==a?(b-c)/g:f==b?(c-a)/g+2:(a-b)/g+4,d=(d+360)%6*60/360,e=0==g?0:g/f,{h:d,s:e,b:f,toString:Tb}},c.rgb2hsl=function(a,b,c){c=Wb(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g,h,i;return g=cb(a,b,c),h=db(a,b,c),i=g-h,d=0==i?null:g==a?(b-c)/i:g==b?(c-a)/i+2:(a-b)/i+4,d=(d+360)%6*60/360,f=(g+h)/2,e=0==i?0:.5>f?i/(2*f):i/(2-2*f),{h:d,s:e,l:f,toString:Ub}},c._path2string=function(){return this.join(",").replace(vb,"$1")};{var Yb=c._cacher=function(a,b,c){function e(){var f=M.call(arguments,0),g=f.join("␀"),h=e.cache=e.cache||{},i=e.count=e.count||[];return h[w](g)?(d(i,g),c?c(h[g]):h[g]):(i.length>=1e3&&delete h[i.shift()],i.push(g),h[g]=a[z](b,f),c?c(h[g]):h[g])}return e};c._preload=function(a,b){var c=R.createElement("img");c.style.cssText="position:absolute;left:-9999em;top:-9999em",c.onload=function(){b.call(this),this.onload=null,R.body.removeChild(this)},c.onerror=function(){R.body.removeChild(this)},R.body.appendChild(c),c.src=a}}c.getRGB=Yb(function(a){var b,d,f,g,h,i,j;return a&&Ob(a,"object")&&"opacity"in a&&(b=a.opacity),!a||(a=$(a)).indexOf("-")+1?{r:-1,g:-1,b:-1,hex:H,error:1,toString:e}:a==H?{r:-1,g:-1,b:-1,hex:H,toString:e}:(!(Ab[w](a.toLowerCase().substring(0,2))||"#"===a.charAt())&&(a=Sb(a)),(j=a.match(sb))?(j[2]&&(g=ab(j[2].substring(5),16),f=ab(j[2].substring(3,5),16),d=ab(j[2].substring(1,3),16)),j[3]&&(g=ab((h=j[3].charAt(3))+h,16),f=ab((h=j[3].charAt(2))+h,16),d=ab((h=j[3].charAt(1))+h,16)),j[4]&&(i=j[4][G](ub),d=_(i[0]),"%"==i[0].slice(-1)&&(d*=2.55),f=_(i[1]),"%"==i[1].slice(-1)&&(f*=2.55),g=_(i[2]),"%"==i[2].slice(-1)&&(g*=2.55),"rgba"==j[1].toLowerCase().slice(0,4)&&(b=_(i[3])),i[3]&&"%"==i[3].slice(-1)&&(b/=100)),j[5]?(i=j[5][G](ub),d=_(i[0]),"%"==i[0].slice(-1)&&(d*=2.55),f=_(i[1]),"%"==i[1].slice(-1)&&(f*=2.55),g=_(i[2]),"%"==i[2].slice(-1)&&(g*=2.55),("deg"==i[0].slice(-3)||"°"==i[0].slice(-1))&&(d/=360),"hsba"==j[1].toLowerCase().slice(0,4)&&(b=_(i[3])),i[3]&&"%"==i[3].slice(-1)&&(b/=100),c.hsb2rgb(d,f,g,b)):j[6]?(i=j[6][G](ub),d=_(i[0]),"%"==i[0].slice(-1)&&(d*=2.55),f=_(i[1]),"%"==i[1].slice(-1)&&(f*=2.55),g=_(i[2]),"%"==i[2].slice(-1)&&(g*=2.55),("deg"==i[0].slice(-3)||"°"==i[0].slice(-1))&&(d/=360),"hsla"==j[1].toLowerCase().slice(0,4)&&(b=_(i[3])),i[3]&&"%"==i[3].slice(-1)&&(b/=100),c.hsl2rgb(d,f,g,b)):(j={r:d,g:f,b:g,toString:e},j.hex="#"+(16777216|g|f<<8|d<<16).toString(16).slice(1),c.is(b,"finite")&&(j.opacity=b),j)):{r:-1,g:-1,b:-1,hex:H,error:1,toString:e})},c),c.tintshade=Yb(function(a,b){var d,f=c.getRGB(a),g=255;return 0>b&&(b*=-1,g=0),b>1&&(b=1),d=0===b?f:{r:g-(g-f.r)*b,g:g-(g-f.g)*b,b:g-(g-f.b)*b,toString:e},d.hex=c.rgb(d.r,d.g,d.b),f.error&&(d.error=f.error),"opacity"in f?(d.rgba="rgba("+[d.r,d.g,d.b,f.opacity].join(",")+")",d.opacity=f.opacity):d.rgba="rgb("+[d.r,d.g,d.b].join(",")+")",d},c),c.hsb=Yb(function(a,b,d){return c.hsb2rgb(a,b,d).hex}),c.hsl=Yb(function(a,b,d){return c.hsl2rgb(a,b,d).hex}),c.rgb=Yb(function(a,b,c){return"#"+(16777216|c|b<<8|a<<16).toString(16).slice(1)}),c.getColor=function(a){var b=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||.75},c=this.hsb2rgb(b.h,b.s,b.b);return b.h+=.075,b.h>1&&(b.h=0,b.s-=.2,b.s<=0&&(this.getColor.start={h:0,s:1,b:b.b})),c.hex},c.getColor.reset=function(){delete this.start},c.parsePathString=function(a){if(!a)return null;var b=Zb(a);if(b.arr)return _b(b.arr);var d={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},e=[];return c.is(a,D)&&c.is(a[0],D)&&(e=_b(a)),e.length||$(a).replace(wb,function(a,b,c){var f=[],g=b.toLowerCase();if(c.replace(yb,function(a,b){b&&f.push(+b)}),"m"==g&&f.length>2&&(e.push([b][A](f.splice(0,2))),g="l",b="m"==b?"l":"L"),"r"==g)e.push([b][A](f));else for(;f.length>=d[g]&&(e.push([b][A](f.splice(0,d[g]))),d[g]););}),e.toString=c._path2string,b.arr=_b(e),e},c.parseTransformString=Yb(function(a){if(!a)return null;var b=[];return c.is(a,D)&&c.is(a[0],D)&&(b=_b(a)),b.length||$(a).replace(xb,function(a,c,d){{var e=[];nb.call(c)}d.replace(yb,function(a,b){b&&e.push(+b)}),b.push([c][A](e))}),b.toString=c._path2string,b});var Zb=function(a){var b=Zb.ps=Zb.ps||{};return b[a]?b[a].sleep=100:b[a]={sleep:100},setTimeout(function(){for(var c in b)b[w](c)&&c!=a&&(b[c].sleep--,!b[c].sleep&&delete b[c])}),b[a]};c.findDotsAtSegment=function(a,b,c,d,e,f,g,h,i){var j=1-i,k=fb(j,3),l=fb(j,2),m=i*i,n=m*i,o=k*a+3*l*i*c+3*j*i*i*e+n*g,p=k*b+3*l*i*d+3*j*i*i*f+n*h,q=a+2*i*(c-a)+m*(e-2*c+a),r=b+2*i*(d-b)+m*(f-2*d+b),s=c+2*i*(e-c)+m*(g-2*e+c),t=d+2*i*(f-d)+m*(h-2*f+d),u=j*a+i*c,v=j*b+i*d,w=j*e+i*g,x=j*f+i*h,y=90-180*bb.atan2(q-s,r-t)/kb;return(q>s||t>r)&&(y+=180),{x:o,y:p,m:{x:q,y:r},n:{x:s,y:t},start:{x:u,y:v},end:{x:w,y:x},alpha:y}},c.bezierBBox=function(a,b,d,e,f,g,h,i){c.is(a,"array")||(a=[a,b,d,e,f,g,h,i]);var j=gc.apply(null,a);return{x:j.min.x,y:j.min.y,x2:j.max.x,y2:j.max.y,width:j.max.x-j.min.x,height:j.max.y-j.min.y}},c.isPointInsideBBox=function(a,b,c){return b>=a.x&&b<=a.x2&&c>=a.y&&c<=a.y2},c.isBBoxIntersect=function(a,b){var d=c.isPointInsideBBox;return d(b,a.x,a.y)||d(b,a.x2,a.y)||d(b,a.x,a.y2)||d(b,a.x2,a.y2)||d(a,b.x,b.y)||d(a,b.x2,b.y)||d(a,b.x,b.y2)||d(a,b.x2,b.y2)||(a.xb.x||b.xa.x)&&(a.yb.y||b.ya.y)},c.pathIntersection=function(a,b){return l(a,b)},c.pathIntersectionNumber=function(a,b){return l(a,b,1)},c.isPointInsidePath=function(a,b,d){var e=c.pathBBox(a);return c.isPointInsideBBox(e,b,d)&&(l(a,[["M",b,d],["H",e.x2+10]],1)%2==1||l(a,[["M",b,d],["V",e.y2+10]],1)%2==1)},c._removedFactory=function(a){return function(){b("raphael.log",null,"Raphaël: you are calling to method “"+a+"” of removed object",a)}};var $b=c.pathBBox=function(a){var b=Zb(a);if(b.bbox)return b.bbox;if(!a)return{x:0,y:0,width:0,height:0,x2:0,y2:0};a=hc(a);for(var c,d=0,e=0,f=[],g=[],h=0,i=a.length;i>h;h++)if(c=a[h],"M"==c[0])d=c[1],e=c[2],f.push(d),g.push(e);else{var j=gc(d,e,c[1],c[2],c[3],c[4],c[5],c[6]);f=f[A](j.min.x,j.max.x),g=g[A](j.min.y,j.max.y),d=c[5],e=c[6]}var k=db[z](0,f),l=db[z](0,g),m=cb[z](0,f),n=cb[z](0,g),o={x:k,y:l,x2:m,y2:n,width:m-k,height:n-l};return b.bbox=Pb(o),o},_b=function(a){var b=Pb(a);return b.toString=c._path2string,b},ac=c._pathToRelative=function(a){var b=Zb(a);if(b.rel)return _b(b.rel);c.is(a,D)&&c.is(a&&a[0],D)||(a=c.parsePathString(a));var d=[],e=0,f=0,g=0,h=0,i=0;"M"==a[0][0]&&(e=a[0][1],f=a[0][2],g=e,h=f,i++,d.push(["M",e,f]));for(var j=i,k=a.length;k>j;j++){var l=d[j]=[],m=a[j];if(m[0]!=nb.call(m[0]))switch(l[0]=nb.call(m[0]),l[0]){case"a":l[1]=m[1],l[2]=m[2],l[3]=m[3],l[4]=m[4],l[5]=m[5],l[6]=+(m[6]-e).toFixed(3),l[7]=+(m[7]-f).toFixed(3);break;case"v":l[1]=+(m[1]-f).toFixed(3);break;case"m":g=m[1],h=m[2];default:for(var n=1,o=m.length;o>n;n++)l[n]=+(m[n]-(n%2?e:f)).toFixed(3)}else{l=d[j]=[],"m"==m[0]&&(g=m[1]+e,h=m[2]+f);for(var p=0,q=m.length;q>p;p++)d[j][p]=m[p]}var r=d[j].length;switch(d[j][0]){case"z":e=g,f=h;break;case"h":e+=+d[j][r-1];break;case"v":f+=+d[j][r-1];break;default:e+=+d[j][r-2],f+=+d[j][r-1]}}return d.toString=c._path2string,b.rel=_b(d),d},bc=c._pathToAbsolute=function(a){var b,d=Zb(a);if(d.abs)return _b(d.abs);if(c.is(a,D)&&c.is(a&&a[0],D)||(a=c.parsePathString(a)),!a||!a.length)return b=["M",0,0],b.toString=c._path2string,b;var e=0,g=0,h=0,i=0,j=0;b=[],"M"==a[0][0]&&(e=+a[0][1],g=+a[0][2],h=e,i=g,j++,b[0]=["M",e,g]);for(var k,l,m=3==a.length&&"M"==a[0][0]&&"R"==a[1][0].toUpperCase()&&"Z"==a[2][0].toUpperCase(),n=j,o=a.length;o>n;n++){if(b.push(k=[]),l=a[n],l[0]!=ob.call(l[0]))switch(k[0]=ob.call(l[0]),k[0]){case"A":k[1]=l[1],k[2]=l[2],k[3]=l[3],k[4]=l[4],k[5]=l[5],k[6]=+(l[6]+e),k[7]=+(l[7]+g);break;case"V":k[1]=+l[1]+g;break;case"H":k[1]=+l[1]+e;break;case"R":for(var p=[e,g][A](l.slice(1)),q=2,r=p.length;r>q;q++)p[q]=+p[q]+e,p[++q]=+p[q]+g;b.pop(),b=b[A](f(p,m));break;case"M":h=+l[1]+e,i=+l[2]+g;default:for(q=1,r=l.length;r>q;q++)k[q]=+l[q]+(q%2?e:g)}else if("R"==l[0])p=[e,g][A](l.slice(1)),b.pop(),b=b[A](f(p,m)),k=["R"][A](l.slice(-2));else for(var s=0,t=l.length;t>s;s++)k[s]=l[s];switch(k[0]){case"Z":e=h,g=i;break;case"H":e=k[1];break;case"V":g=k[1];break;case"M":h=k[k.length-2],i=k[k.length-1];default:e=k[k.length-2],g=k[k.length-1]}}return b.toString=c._path2string,d.abs=_b(b),b},cc=function(a,b,c,d){return[a,b,c,d,c,d]},dc=function(a,b,c,d,e,f){var g=1/3,h=2/3;return[g*a+h*c,g*b+h*d,g*e+h*c,g*f+h*d,e,f]},ec=function(a,b,c,d,e,f,g,h,i,j){var k,l=120*kb/180,m=lb*(+e||0),n=[],o=Yb(function(a,b,c){var d=a*gb(c)-b*hb(c),e=a*hb(c)+b*gb(c);return{x:d,y:e}});if(j)x=j[0],y=j[1],v=j[2],w=j[3];else{k=o(a,b,-m),a=k.x,b=k.y,k=o(h,i,-m),h=k.x,i=k.y;var p=(gb(lb*e),hb(lb*e),(a-h)/2),q=(b-i)/2,r=p*p/(c*c)+q*q/(d*d);r>1&&(r=ib(r),c=r*c,d=r*d);var s=c*c,t=d*d,u=(f==g?-1:1)*ib(eb((s*t-s*q*q-t*p*p)/(s*q*q+t*p*p))),v=u*c*q/d+(a+h)/2,w=u*-d*p/c+(b+i)/2,x=bb.asin(((b-w)/d).toFixed(9)),y=bb.asin(((i-w)/d).toFixed(9));x=v>a?kb-x:x,y=v>h?kb-y:y,0>x&&(x=2*kb+x),0>y&&(y=2*kb+y),g&&x>y&&(x-=2*kb),!g&&y>x&&(y-=2*kb)}var z=y-x;if(eb(z)>l){var B=y,C=h,D=i;y=x+l*(g&&y>x?1:-1),h=v+c*gb(y),i=w+d*hb(y),n=ec(h,i,c,d,e,0,g,C,D,[y,B,v,w])}z=y-x;var E=gb(x),F=hb(x),H=gb(y),I=hb(y),J=bb.tan(z/4),K=4/3*c*J,L=4/3*d*J,M=[a,b],N=[a+K*F,b-L*E],O=[h+K*I,i-L*H],P=[h,i];if(N[0]=2*M[0]-N[0],N[1]=2*M[1]-N[1],j)return[N,O,P][A](n);n=[N,O,P][A](n).join()[G](",");for(var Q=[],R=0,S=n.length;S>R;R++)Q[R]=R%2?o(n[R-1],n[R],m).y:o(n[R],n[R+1],m).x;return Q},fc=function(a,b,c,d,e,f,g,h,i){var j=1-i;return{x:fb(j,3)*a+3*fb(j,2)*i*c+3*j*i*i*e+fb(i,3)*g,y:fb(j,3)*b+3*fb(j,2)*i*d+3*j*i*i*f+fb(i,3)*h}},gc=Yb(function(a,b,c,d,e,f,g,h){var i,j=e-2*c+a-(g-2*e+c),k=2*(c-a)-2*(e-c),l=a-c,m=(-k+ib(k*k-4*j*l))/2/j,n=(-k-ib(k*k-4*j*l))/2/j,o=[b,h],p=[a,g];return eb(m)>"1e12"&&(m=.5),eb(n)>"1e12"&&(n=.5),m>0&&1>m&&(i=fc(a,b,c,d,e,f,g,h,m),p.push(i.x),o.push(i.y)),n>0&&1>n&&(i=fc(a,b,c,d,e,f,g,h,n),p.push(i.x),o.push(i.y)),j=f-2*d+b-(h-2*f+d),k=2*(d-b)-2*(f-d),l=b-d,m=(-k+ib(k*k-4*j*l))/2/j,n=(-k-ib(k*k-4*j*l))/2/j,eb(m)>"1e12"&&(m=.5),eb(n)>"1e12"&&(n=.5),m>0&&1>m&&(i=fc(a,b,c,d,e,f,g,h,m),p.push(i.x),o.push(i.y)),n>0&&1>n&&(i=fc(a,b,c,d,e,f,g,h,n),p.push(i.x),o.push(i.y)),{min:{x:db[z](0,p),y:db[z](0,o)},max:{x:cb[z](0,p),y:cb[z](0,o)}}}),hc=c._path2curve=Yb(function(a,b){var c=!b&&Zb(a);if(!b&&c.curve)return _b(c.curve);for(var d=bc(a),e=b&&bc(b),f={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},g={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},h=(function(a,b){var c,d;if(!a)return["C",b.x,b.y,b.x,b.y,b.x,b.y];switch(!(a[0]in{T:1,Q:1})&&(b.qx=b.qy=null),a[0]){case"M":b.X=a[1],b.Y=a[2];break;case"A":a=["C"][A](ec[z](0,[b.x,b.y][A](a.slice(1))));break;case"S":c=b.x+(b.x-(b.bx||b.x)),d=b.y+(b.y-(b.by||b.y)),a=["C",c,d][A](a.slice(1));break;case"T":b.qx=b.x+(b.x-(b.qx||b.x)),b.qy=b.y+(b.y-(b.qy||b.y)),a=["C"][A](dc(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case"Q":b.qx=a[1],b.qy=a[2],a=["C"][A](dc(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"][A](cc(b.x,b.y,a[1],a[2]));break;case"H":a=["C"][A](cc(b.x,b.y,a[1],b.y));break;case"V":a=["C"][A](cc(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"][A](cc(b.x,b.y,b.X,b.Y))}return a}),i=function(a,b){if(a[b].length>7){a[b].shift();for(var c=a[b];c.length;)a.splice(b++,0,["C"][A](c.splice(0,6)));a.splice(b,1),l=cb(d.length,e&&e.length||0)}},j=function(a,b,c,f,g){a&&b&&"M"==a[g][0]&&"M"!=b[g][0]&&(b.splice(g,0,["M",f.x,f.y]),c.bx=0,c.by=0,c.x=a[g][1],c.y=a[g][2],l=cb(d.length,e&&e.length||0))},k=0,l=cb(d.length,e&&e.length||0);l>k;k++){d[k]=h(d[k],f),i(d,k),e&&(e[k]=h(e[k],g)),e&&i(e,k),j(d,e,f,g,k),j(e,d,g,f,k);var m=d[k],n=e&&e[k],o=m.length,p=e&&n.length;f.x=m[o-2],f.y=m[o-1],f.bx=_(m[o-4])||f.x,f.by=_(m[o-3])||f.y,g.bx=e&&(_(n[p-4])||g.x),g.by=e&&(_(n[p-3])||g.y),g.x=e&&n[p-2],g.y=e&&n[p-1]}return e||(c.curve=_b(d)),e?[d,e]:d},null,_b),ic=(c._parseDots=Yb(function(a){for(var b=[],d=0,e=a.length;e>d;d++){var f={},g=a[d].match(/^([^:]*):?([\d\.]*)/);if(f.color=c.getRGB(g[1]),f.color.error)return null;f.opacity=f.color.opacity,f.color=f.color.hex,g[2]&&(f.offset=g[2]+"%"),b.push(f)}for(d=1,e=b.length-1;e>d;d++)if(!b[d].offset){for(var h=_(b[d-1].offset||0),i=0,j=d+1;e>j;j++)if(b[j].offset){i=b[j].offset;break}i||(i=100,j=e),i=_(i);for(var k=(i-h)/(j-d+1);j>d;d++)h+=k,b[d].offset=h+"%"}return b}),c._tear=function(a,b){a==b.top&&(b.top=a.prev),a==b.bottom&&(b.bottom=a.next),a.next&&(a.next.prev=a.prev),a.prev&&(a.prev.next=a.next)}),jc=(c._tofront=function(a,b){return b.top===a?!1:(ic(a,b),a.next=null,a.prev=b.top,b.top.next=a,b.top=a,!0) +},c._toback=function(a,b){return b.bottom===a?!1:(ic(a,b),a.next=b.bottom,a.prev=null,b.bottom.prev=a,b.bottom=a,!0)},c._insertafter=function(a,b,c,d){ic(a,c),a.parent=d,b===d.top&&(d.top=a),b.next&&(b.next.prev=a),a.next=b.next,a.prev=b,b.next=a},c._insertbefore=function(a,b,c,d){ic(a,c),a.parent=d,b===d.bottom&&(d.bottom=a),b.prev&&(b.prev.next=a),a.prev=b.prev,b.prev=a,a.next=b},c.toMatrix=function(a,b){var c=$b(a),d={_:{transform:u},getBBox:function(){return c}};return kc(d,b),d.matrix}),kc=(c.transformPath=function(a,b){return Kb(a,jc(a,b))},c._extractTransform=function(a,b){if(null==b)return a._.transform;b=$(b).replace(/\.{3}|\u2026/g,a._.transform||u);var d=c.parseTransformString(b),e=0,f=0,g=0,h=1,i=1,j=a._,k=new m;if(j.transform=d||[],d)for(var l=0,n=d.length;n>l;l++){var o,p,q,r,s,t=d[l],v=t.length,w=$(t[0]).toLowerCase(),x=t[0]!=w,y=x?k.invert():0;"t"==w&&3==v?x?(o=y.x(0,0),p=y.y(0,0),q=y.x(t[1],t[2]),r=y.y(t[1],t[2]),k.translate(q-o,r-p)):k.translate(t[1],t[2]):"r"==w?2==v?(s=s||a.getBBox(1),k.rotate(t[1],s.x+s.width/2,s.y+s.height/2),e+=t[1]):4==v&&(x?(q=y.x(t[2],t[3]),r=y.y(t[2],t[3]),k.rotate(t[1],q,r)):k.rotate(t[1],t[2],t[3]),e+=t[1]):"s"==w?2==v||3==v?(s=s||a.getBBox(1),k.scale(t[1],t[v-1],s.x+s.width/2,s.y+s.height/2),h*=t[1],i*=t[v-1]):5==v&&(x?(q=y.x(t[3],t[4]),r=y.y(t[3],t[4]),k.scale(t[1],t[2],q,r)):k.scale(t[1],t[2],t[3],t[4]),h*=t[1],i*=t[2]):"m"==w&&7==v&&k.add(t[1],t[2],t[3],t[4],t[5],t[6]),j.dirtyT=1,a.matrix=k}a.matrix=k,j.sx=h,j.sy=i,j.deg=e,j.dx=f=k.e,j.dy=g=k.f,1==h&&1==i&&!e&&j.bbox?(j.bbox.x+=+f,j.bbox.y+=+g):j.dirtyT=1}),lc=function(a){var b=a[0];switch(b.toLowerCase()){case"t":return[b,0,0];case"m":return[b,1,0,0,1,0,0];case"r":return 4==a.length?[b,0,a[2],a[3]]:[b,0];case"s":return 5==a.length?[b,1,1,a[3],a[4]]:3==a.length?[b,1,1]:[b,1]}},mc=c._equaliseTransform=function(a,b){b=$(b).replace(/\.{3}|\u2026/g,a),a=c.parseTransformString(a)||[],b=c.parseTransformString(b)||[];for(var d,e,f,g,h=cb(a.length,b.length),i=[],j=[],k=0;h>k;k++){if(f=a[k]||lc(b[k]),g=b[k]||lc(f),f[0]!=g[0]||"r"==f[0].toLowerCase()&&(f[2]!=g[2]||f[3]!=g[3])||"s"==f[0].toLowerCase()&&(f[3]!=g[3]||f[4]!=g[4]))return;for(i[k]=[],j[k]=[],d=0,e=cb(f.length,g.length);e>d;d++)d in f&&(i[k][d]=f[d]),d in g&&(j[k][d]=g[d])}return{from:i,to:j}};c._getContainer=function(a,b,d,e){var f;return f=null!=e||c.is(a,E)?a:P.doc.getElementById(a),null!=f?f.tagName?null==b?{container:f,width:f.style.pixelWidth||f.offsetWidth,height:f.style.pixelHeight||f.offsetHeight}:{container:f,width:b,height:d}:{container:1,x:a,y:b,width:d,height:e}:void 0},c.pathToRelative=ac,c._engine={},c.path2curve=hc,c.matrix=function(a,b,c,d,e,f){return new m(a,b,c,d,e,f)},function(a){function b(a){return a[0]*a[0]+a[1]*a[1]}function d(a){var c=ib(b(a));a[0]&&(a[0]/=c),a[1]&&(a[1]/=c)}a.add=function(a,b,c,d,e,f){var g,h,i,j,k=[[],[],[]],l=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],n=[[a,c,e],[b,d,f],[0,0,1]];for(a&&a instanceof m&&(n=[[a.a,a.c,a.e],[a.b,a.d,a.f],[0,0,1]]),g=0;3>g;g++)for(h=0;3>h;h++){for(j=0,i=0;3>i;i++)j+=l[g][i]*n[i][h];k[g][h]=j}this.a=k[0][0],this.b=k[1][0],this.c=k[0][1],this.d=k[1][1],this.e=k[0][2],this.f=k[1][2]},a.invert=function(){var a=this,b=a.a*a.d-a.b*a.c;return new m(a.d/b,-a.b/b,-a.c/b,a.a/b,(a.c*a.f-a.d*a.e)/b,(a.b*a.e-a.a*a.f)/b)},a.clone=function(){return new m(this.a,this.b,this.c,this.d,this.e,this.f)},a.translate=function(a,b){this.add(1,0,0,1,a,b)},a.scale=function(a,b,c,d){null==b&&(b=a),(c||d)&&this.add(1,0,0,1,c,d),this.add(a,0,0,b,0,0),(c||d)&&this.add(1,0,0,1,-c,-d)},a.rotate=function(a,b,d){a=c.rad(a),b=b||0,d=d||0;var e=+gb(a).toFixed(9),f=+hb(a).toFixed(9);this.add(e,f,-f,e,b,d),this.add(1,0,0,1,-b,-d)},a.x=function(a,b){return a*this.a+b*this.c+this.e},a.y=function(a,b){return a*this.b+b*this.d+this.f},a.get=function(a){return+this[$.fromCharCode(97+a)].toFixed(4)},a.toString=function(){return c.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},a.toMatrixString=function(){return"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")"},a.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},a.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},a.split=function(){var a={};a.dx=this.e,a.dy=this.f;var e=[[this.a,this.c],[this.b,this.d]];a.scalex=ib(b(e[0])),d(e[0]),a.shear=e[0][0]*e[1][0]+e[0][1]*e[1][1],e[1]=[e[1][0]-e[0][0]*a.shear,e[1][1]-e[0][1]*a.shear],a.scaley=ib(b(e[1])),d(e[1]),a.shear/=a.scaley;var f=-e[0][1],g=e[1][1];return 0>g?(a.rotate=c.deg(bb.acos(g)),0>f&&(a.rotate=360-a.rotate)):a.rotate=c.deg(bb.asin(f)),a.isSimple=!(+a.shear.toFixed(9)||a.scalex.toFixed(9)!=a.scaley.toFixed(9)&&a.rotate),a.isSuperSimple=!+a.shear.toFixed(9)&&a.scalex.toFixed(9)==a.scaley.toFixed(9)&&!a.rotate,a.noRotation=!+a.shear.toFixed(9)&&!a.rotate,a},a.toTransformString=function(a){var b=a||this[G]();return b.isSimple?(b.scalex=+b.scalex.toFixed(4),b.scaley=+b.scaley.toFixed(4),b.rotate=+b.rotate.toFixed(4),(b.dx||b.dy?"t"+[b.dx,b.dy]:u)+(1!=b.scalex||1!=b.scaley?"s"+[b.scalex,b.scaley,0,0]:u)+(b.rotate?"r"+[b.rotate,0,0]:u)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(m.prototype);var nc=navigator.userAgent.match(/Version\/(.*?)\s/)||navigator.userAgent.match(/Chrome\/(\d+)/);W.safari="Apple Computer, Inc."==navigator.vendor&&(nc&&nc[1]<4||"iP"==navigator.platform.slice(0,2))||"Google Inc."==navigator.vendor&&nc&&nc[1]<8?function(){var a=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});return setTimeout(function(){a.remove()}),!0}:Fb;for(var oc=function(){this.returnValue=!1},pc=function(){return this.originalEvent.preventDefault()},qc=function(){this.cancelBubble=!0},rc=function(){return this.originalEvent.stopPropagation()},sc=c.addEvent=function(){return P.doc.addEventListener?function(a,b,c,d){var e=T&&Z[b]?Z[b]:b,f=function(e){var f=P.doc.documentElement.scrollTop||P.doc.body.scrollTop,g=P.doc.documentElement.scrollLeft||P.doc.body.scrollLeft;if(T&&Z[w](b))for(var h=0,i=e.targetTouches&&e.targetTouches.length;i>h;h++)if(e.targetTouches[h].target==a){var j=e;e=e.targetTouches[h],e.originalEvent=j,e.preventDefault=pc,e.stopPropagation=rc;break}return c.call(d,e,e.clientX+g,e.clientY+f)};return a.addEventListener(e,f,!1),function(){return a.removeEventListener(e,f,!1),!0}}:P.doc.attachEvent?function(a,b,c,d){var e=function(a){a=a||P.win.event;var b=P.doc.documentElement.scrollTop||P.doc.body.scrollTop,e=P.doc.documentElement.scrollLeft||P.doc.body.scrollLeft,f=a.clientX+e,g=a.clientY+b;return a.preventDefault=a.preventDefault||oc,a.stopPropagation=a.stopPropagation||qc,c.call(d,a,f,g)};a.attachEvent("on"+b,e);var f=function(){return a.detachEvent("on"+b,e),!0};return f}:void 0}(),tc=[],uc=function(a){for(var d,e=a.clientX,f=a.clientY,g=P.doc.documentElement.scrollTop||P.doc.body.scrollTop,h=P.doc.documentElement.scrollLeft||P.doc.body.scrollLeft,i=tc.length;i--;){if(d=tc[i],T){for(var j,k=a.touches.length;k--;)if(j=a.touches[k],j.identifier==d.el._drag.id){e=j.clientX,f=j.clientY,(a.originalEvent?a.originalEvent:a).preventDefault();break}}else a.preventDefault();if(!d.el.removed){var l,m=c._engine.getNode(d.el),n=m.nextSibling,o=m.parentNode,p=m.style.display;P.win.opera&&o.removeChild(m),m.style.display="none",l=d.el.paper.getElementByPoint(e,f),m.style.display=p,P.win.opera&&(n?o.insertBefore(m,n):o.appendChild(m)),l&&b("raphael.drag.over."+d.el.id,d.el,l),e+=h,f+=g,b("raphael.drag.move."+d.el.id,d.move_scope||d.el,e-d.el._drag.x,f-d.el._drag.y,e,f,a)}}},vc=function(a){c.unmousemove(uc).unmouseup(vc);for(var d,e=tc.length;e--;)d=tc[e],d.el._drag={},b("raphael.drag.end."+d.el.id,d.end_scope||d.start_scope||d.move_scope||d.el,a);tc=[]},wc=c.el={},xc=Y.length;xc--;)!function(a){c[a]=wc[a]=function(b,d){return c.is(b,"function")&&(this.events=this.events||[],this.events.push({name:a,f:b,unbind:sc(this.shape||this.node||P.doc,a,b,d||this)})),this},c["un"+a]=wc["un"+a]=function(b){for(var c=this.events||[],d=c.length;d--;)if(c[d].name==a&&c[d].f==b)return c[d].unbind(),c.splice(d,1),!c.length&&delete this.events,this;return this}}(Y[xc]);wc.data=function(a,d){var e=Db[this.id]=Db[this.id]||{};if(1==arguments.length){if(c.is(a,E)){for(var f in a)a[w](f)&&this.data(f,a[f]);return this}return b("raphael.data.get."+this.id,this,e[a],a),e[a]}return e[a]=d,b("raphael.data.set."+this.id,this,d,a),this},wc.removeData=function(a){return null==a?delete Db[this.id]:Db[this.id]&&delete Db[this.id][a],this},wc.getData=function(){return Pb(Db[this.id]||{})};var yc=[],zc=function(){this.untrack=sc(P.doc,"mouseup",Ac,this)},Ac=function(){return this.untrack(),this.untrack=null,this.fn&&this.fn.apply(this.scope||this.el,arguments)};wc.mouseup=function(a,b,d){return d?(yc.push(d={el:this,fn:a,scope:b}),d.unbind=sc(this.shape||this.node||P.doc,"mousedown",zc,d),this):c.mouseup.apply(this,arguments)},wc.unmouseup=function(a){for(var b,d=yc.length;d--;)yc[d].el===this&&yc[d].fn===a&&(b=yc[d],b.unbind(),b.untrack&&b.untrack(),yc.splice(d,1));return b?this:c.unmouseup.apply(this,arguments)},wc.hover=function(a,b,c,d){return this.mouseover(a,c).mouseout(b,d||c)},wc.unhover=function(a,b){return this.unmouseover(a).unmouseout(b)};var Bc=[];wc.drag=function(a,d,e,f,g,h){function i(i){(i.originalEvent||i).preventDefault();var j=P.doc.documentElement.scrollTop||P.doc.body.scrollTop,k=P.doc.documentElement.scrollLeft||P.doc.body.scrollLeft;this._drag.x=i.clientX+k,this._drag.y=i.clientY+j,this._drag.id=i.identifier,!tc.length&&c.mousemove(uc).mouseup(vc),tc.push({el:this,move_scope:f,start_scope:g,end_scope:h}),d&&b.on("raphael.drag.start."+this.id,d),a&&b.on("raphael.drag.move."+this.id,a),e&&b.on("raphael.drag.end."+this.id,e),b("raphael.drag.start."+this.id,g||f||this,i.clientX+k,i.clientY+j,i)}return this._drag={},Bc.push({el:this,start:i}),this.mousedown(i),this},wc.onDragOver=function(a){a?b.on("raphael.drag.over."+this.id,a):b.unbind("raphael.drag.over."+this.id)},wc.undrag=function(){for(var a=Bc.length;a--;)Bc[a].el==this&&(this.unmousedown(Bc[a].start),Bc.splice(a,1),b.unbind("raphael.drag.*."+this.id));!Bc.length&&c.unmousemove(uc).unmouseup(vc),delete this._drag},wc.follow=function(a,b,d){return a.removed||a.constructor!==c.el.constructor?this:(a.followers.push({el:this,stalk:d={before:"insertBefore",after:"insertAfter"}[d],cb:b}),d&&this[d](a),this)},wc.unfollow=function(a){if(a.removed||a.constructor!==c.el.constructor)return this;for(var b=0,d=a.followers.length;d>b;b++)if(a.followers[b].el===this){a.followers.splice(b,1);break}return this},W.hide=function(){var a=this;return a.canvas.style.visibility="hidden",a},W.show=function(){var a=this;return a.canvas.style.visibility=u,a},W.group=function(){var a=this,b=arguments,d=Lb(b,!0),e=c._engine.group(a,b[0],d);return a.__set__&&a.__set__.push(e),a._elementsById[e.id]=e},W.circle=function(){var a=this,b=arguments,d=Lb(b,!0),e=Mb(b,"cx",0,"cy",0,"r",0,"fill",H,"stroke",I),f=c._engine.circle(a,e,d);return a.__set__&&a.__set__.push(f),a._elementsById[f.id]=f},W.rect=function(){var a=this,b=arguments,d=Lb(b,!0),e=Mb(b,"x",0,"y",0,"width",0,"height",0,"r",0,"fill",H,"stroke",I),f=c._engine.rect(a,e,d);return a.__set__&&a.__set__.push(f),a._elementsById[f.id]=f},W.ellipse=function(){var a=this,b=arguments,d=Lb(b,!0),e=Mb(b,"x",0,"y",0,"rx",0,"ry",0,"fill",H,"stroke",I),f=c._engine.ellipse(this,e,d);return a.__set__&&a.__set__.push(f),a._elementsById[f.id]=f},W.path=function(){var a=this,b=arguments,d=Lb(b,!0),e=Mb(b,"path",u,"fill",H,"stroke",I),f=c._engine.path(a,e,d);return a.__set__&&a.__set__.push(f),a._elementsById[f.id]=f},W.image=function(){var a=this,b=arguments,d=Lb(b,!0),e=Mb(b,"src","about:blank","x",0,"y",0,"width",0,"height",0);return out=c._engine.image(a,e,d),a.__set__&&a.__set__.push(out),a._elementsById[out.id]=out},W.text=function(){var a=this,b=arguments,d=Lb(b,!0),e=Mb(b,"x",0,"y",0,"text",u,"stroke",H,"fill",I,"text-anchor","middle","vertical-align","middle"),f=c._engine.text(a,e,d);return a.__set__&&a.__set__.push(f),a._elementsById[f.id]=f},W.set=function(a){!c.is(a,"array")&&(a=N.call(arguments,0,arguments.length));var b=new Nc(a);return this.__set__&&this.__set__.push(b),b},W.setStart=function(a){this.__set__=a||this.set()},W.setFinish=function(){var a=this.__set__;return delete this.__set__,a},W.setSize=function(a,b){return c._engine.setSize.call(this,a,b)},W.setViewBox=function(a,b,d,e,f){return c._engine.setViewBox.call(this,a,b,d,e,f)},W.top=W.bottom=null,W.raphael=c;var Cc=function(a){var b=a.getBoundingClientRect(),c=a.ownerDocument,d=c.body,e=c.documentElement,f=e.clientTop||d.clientTop||0,g=e.clientLeft||d.clientLeft||0,h=b.top+(P.win.pageYOffset||e.scrollTop||d.scrollTop)-f,i=b.left+(P.win.pageXOffset||e.scrollLeft||d.scrollLeft)-g;return{y:h,x:i}};W.getElementByPoint=function(a,b){var c=this,d=c.canvas,e=P.doc.elementFromPoint(a,b);if(P.win.opera&&"svg"==e.tagName){var f=Cc(d),g=d.createSVGRect();g.x=a-f.x,g.y=b-f.y,g.width=g.height=1;var h=d.getIntersectionList(g,null);h.length&&(e=h[h.length-1])}if(!e)return null;for(;e.parentNode&&e!=d.parentNode&&!e.raphael;)e=e.parentNode;return e==c.canvas.parentNode&&(e=d),e=e&&e.raphael?c.getById(e.raphaelid):null},W.getElementsByBBox=function(a){var b=this.set();return this.forEach(function(d){c.isBBoxIntersect(d.getBBox(),a)&&b.push(d)}),b},W.getById=function(a){return this._elementsById[a]||null},W.forEach=function(a,b){for(var c=this.bottom;c;){if(a.call(b,c)===!1)return this;c=c.next}return this},W.getElementsByPoint=function(a,b){var c=this.set();return this.forEach(function(d){d.isPointInside(a,b)&&c.push(d)}),c},wc.isPointInside=function(a,b){var d,e=this.realPath=this.realPath||Jb[this.type](this);return c.isPointInsidePath((d=this.attr("transform"))&&d.length&&c.transformPath(e,d)||e,a,b)},wc.getBBox=function(a){if(this.removed)return{};var b=this._;return a?((b.dirty||!b.bboxwt)&&(this.realPath=Jb[this.type](this),b.bboxwt=$b(this.realPath),b.bboxwt.toString=n,b.dirty=0),b.bboxwt):((b.dirty||b.dirtyT||!b.bbox)&&((b.dirty||!this.realPath)&&(b.bboxwt=0,this.realPath=Jb[this.type](this)),b.bbox=$b(Kb(this.realPath,this.matrix)),b.bbox.toString=n,b.dirty=b.dirtyT=0),b.bbox)},wc.clone=function(){if(this.removed)return null;var a=this,b=a.paper[a.type]().attr(a.attr());return a.__set__&&a.__set__.push(b),b},wc.glow=function(a){if("text"==this.type)return null;a=a||{};var b={width:(a.width||10)+(+this.attr("stroke-width")||1),fill:a.fill||!1,opacity:a.opacity||.5,offsetx:a.offsetx||0,offsety:a.offsety||0,color:a.color||"#000"},c=b.width/2,d=this.paper,e=d.set(),f=this.realPath||Jb[this.type](this);f=this.matrix?Kb(f,this.matrix):f;for(var g=1;c+1>g;g++)e.push(d.path(f).attr({stroke:b.color,fill:b.fill?b.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(b.width/c*g).toFixed(3),opacity:+(b.opacity/c).toFixed(3)}));return e.insertBefore(this).translate(b.offsetx,b.offsety)};var Dc=function(a,b,d,e,f,g,j,k,l){return null==l?h(a,b,d,e,f,g,j,k):c.findDotsAtSegment(a,b,d,e,f,g,j,k,i(a,b,d,e,f,g,j,k,l))},Ec=function(a,b){return function(d,e,f){d=hc(d);for(var g,h,i,j,k,l="",m={},n=0,o=0,p=d.length;p>o;o++){if(i=d[o],"M"==i[0])g=+i[1],h=+i[2];else{if(j=Dc(g,h,i[1],i[2],i[3],i[4],i[5],i[6]),n+j>e){if(b&&!m.start){if(k=Dc(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n),l+=["C"+k.start.x,k.start.y,k.m.x,k.m.y,k.x,k.y],f)return l;m.start=l,l=["M"+k.x,k.y+"C"+k.n.x,k.n.y,k.end.x,k.end.y,i[5],i[6]].join(),n+=j,g=+i[5],h=+i[6];continue}if(!a&&!b)return k=Dc(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n),{x:k.x,y:k.y,alpha:k.alpha}}n+=j,g=+i[5],h=+i[6]}l+=i.shift()+i}return m.end=l,k=a?n:b?m:c.findDotsAtSegment(g,h,i[0],i[1],i[2],i[3],i[4],i[5],1),k.alpha&&(k={x:k.x,y:k.y,alpha:k.alpha}),k}},Fc=Ec(1),Gc=Ec(),Hc=Ec(0,1);c.getTotalLength=Fc,c.getPointAtLength=Gc,c.getSubpath=function(a,b,c){if(this.getTotalLength(a)-c<1e-6)return Hc(a,b).end;var d=Hc(a,c,1);return b?Hc(d,b).end:d},wc.getTotalLength=function(){return"path"==this.type?this.node.getTotalLength?this.node.getTotalLength():Fc(this.attrs.path):void 0},wc.getPointAtLength=function(a){return"path"==this.type?Gc(this.attrs.path,a):void 0},wc.getSubpath=function(a,b){return"path"==this.type?c.getSubpath(this.attrs.path,a,b):void 0};var Ic=c.easing_formulas={linear:function(a){return a},"<":function(a){return fb(a,1.7)},">":function(a){return fb(a,.48)},"<>":function(a){var b=.48-a/1.04,c=ib(.1734+b*b),d=c-b,e=fb(eb(d),1/3)*(0>d?-1:1),f=-c-b,g=fb(eb(f),1/3)*(0>f?-1:1),h=e+g+.5;return 3*(1-h)*h*h+h*h*h},backIn:function(a){var b=1.70158;return a*a*((b+1)*a-b)},backOut:function(a){a-=1;var b=1.70158;return a*a*((b+1)*a+b)+1},elastic:function(a){return a==!!a?a:fb(2,-10*a)*hb(2*(a-.075)*kb/.3)+1},bounce:function(a){var b,c=7.5625,d=2.75;return 1/d>a?b=c*a*a:2/d>a?(a-=1.5/d,b=c*a*a+.75):2.5/d>a?(a-=2.25/d,b=c*a*a+.9375):(a-=2.625/d,b=c*a*a+.984375),b}};Ic.easeIn=Ic["ease-in"]=Ic["<"],Ic.easeOut=Ic["ease-out"]=Ic[">"],Ic.easeInOut=Ic["ease-in-out"]=Ic["<>"],Ic["back-in"]=Ic.backIn,Ic["back-out"]=Ic.backOut;var Jc=[],Kc=a.requestAnimationFrame||a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame||a.msRequestAnimationFrame||function(a){setTimeout(a,16)},Lc=function(){for(var a=+new Date,d=0;dh))if(i>h){var r=j(h/i);for(var s in k)if(k[w](s)){switch(Cb[s]){case B:f=+k[s]+r*i*l[s];break;case"colour":f="rgb("+[Mc(jb(k[s].r+r*i*l[s].r)),Mc(jb(k[s].g+r*i*l[s].g)),Mc(jb(k[s].b+r*i*l[s].b))].join(",")+")";break;case"path":f=[];for(var t=0,u=k[s].length;u>t;t++){f[t]=[k[s][t][0]];for(var x=1,y=k[s][t].length;y>x;x++)f[t][x]=(+k[s][t][x]+r*i*l[s][t][x]).toFixed(4);f[t]=f[t].join(v)}f=f.join(v);break;case"transform":if(l[s].real)for(f=[],t=0,u=k[s].length;u>t;t++)for(f[t]=[k[s][t][0]],x=1,y=k[s][t].length;y>x;x++)f[t][x]=k[s][t][x]+r*i*l[s][t][x];else{var z=function(a){return+k[s][a]+r*i*l[s][a]};f=[["m",z(0),z(1),z(2),z(3),z(4),z(5)]]}break;case"csv":if("clip-rect"==s)for(f=[],t=4;t--;)f[t]=+k[s][t]+r*i*l[s][t];break;default:var C=[][A](k[s]);for(f=[],t=n.ca[s].length;t--;)f[t]=+C[t]+r*i*l[s][t]}o[s]=f}n.attr(o),function(a,c,d){setTimeout(function(){b("raphael.anim.frame."+a,c,d)})}(n.id,n,e.anim)}else{if(function(a,d,e){setTimeout(function(){b("raphael.anim.frame."+d.id,d,e),b("raphael.anim.finish."+d.id,d,e),c.is(a,"function")&&a.call(d)})}(e.callback,n,e.anim),n.attr(m),Jc.splice(d--,1),e.repeat>1&&!e.next){for(g in m)m[w](g)&&(p[g]=e.totalOrigin[g]);e.el.attr(p),q(e.anim,e.el,e.anim.percents[0],null,e.totalOrigin,e.repeat-1)}e.next&&!e.stop&&q(e.anim,e.el,e.next,null,e.totalOrigin,e.repeat)}}}c.svg&&n&&n.paper&&n.paper.safari(),Jc.length&&Kc(Lc)},Mc=function(a){return a>255?255:0>a?0:a};wc.animateWith=function(a,b,d,e,f,g){var h=this;if(h.removed)return g&&g.call(h),h;var i=d instanceof p?d:c.animation(d,e,f,g);q(i,h,i.percents[0],null,h.attr());for(var j=0,k=Jc.length;k>j;j++)if(Jc[j].anim==b&&Jc[j].el==a){Jc[k-1].start=Jc[j].start;break}return h},wc.onAnimation=function(a){return a?b.on("raphael.anim.frame."+this.id,a):b.unbind("raphael.anim.frame."+this.id),this},p.prototype.delay=function(a){var b=new p(this.anim,this.ms);return b.times=this.times,b.del=+a||0,b},p.prototype.repeat=function(a){var b=new p(this.anim,this.ms);return b.del=this.del,b.times=bb.floor(cb(a,0))||1,b},c.animation=function(a,b,d,e){if(a instanceof p)return a;(c.is(d,"function")||!d)&&(e=e||d||null,d=null),a=Object(a),b=+b||0;var f,g,h={};for(g in a)a[w](g)&&_(g)!=g&&_(g)+"%"!=g&&(f=!0,h[g]=a[g]);return f?(d&&(h.easing=d),e&&(h.callback=e),new p({100:h},b)):new p(a,b)},wc.animate=function(a,b,d,e){var f=this;if(f.removed)return e&&e.call(f),f;var g=a instanceof p?a:c.animation(a,b,d,e);return q(g,f,g.percents[0],null,f.attr()),f},wc.setTime=function(a,b){return a&&null!=b&&this.status(a,db(b,a.ms)/a.ms),this},wc.status=function(a,b){var c,d,e=[],f=0;if(null!=b)return q(a,this,-1,db(b,1)),this;for(c=Jc.length;c>f;f++)if(d=Jc[f],d.el.id==this.id&&(!a||d.anim==a)){if(a)return d.status;e.push({anim:d.anim,status:d.status})}return a?0:e},wc.pause=function(a){for(var c=0;cb;b++)(a=h[b]).stalk&&a.el[a.stalk](e);return e},wc.toBack=function(){if(this.removed)return this;var a,b,d,e=this,f=c._engine.getNode(e),g=e.parent,h=e.followers;for(c._toback(e,g)&&g.canvas.insertBefore(f,g.canvas.firstChild),b=0,d=h.length;d>b;b++)(a=h[b]).stalk&&a.el[a.stalk](e);return e},wc.insertAfter=function(a){if(this.removed)return this;var b,d,e,f=this,g=c._engine.getNode(f),h=c._engine.getLastNode(a),i=a.parent.canvas,j=f.followers;for(h.nextSibling?i.insertBefore(g,h.nextSibling):i.appendChild(g),c._insertafter(f,a,f.parent,a.parent),d=0,e=j.length;e>d;d++)(b=j[d]).stalk&&b.el[b.stalk](a);return f},wc.insertBefore=function(a){if(this.removed)return this;var b,d,e,f=this,g=c._engine.getNode(f),h=c._engine.getNode(a),i=f.followers;for(a.parent.canvas.insertBefore(g,h),c._insertbefore(f,a,f.parent,a.parent),f.parent=a.parent,d=0,e=i.length;e>d;d++)(b=i[d]).stalk&&b.el[b.stalk](a);return this},wc.appendChild=function(a){if(this.removed||"group"!==this.type)return this;var b,d,e,f,g=this,h=g.followers;if(a.parent===g)return a.toFront(),g;for(d=c._engine.getNode(a),c._tear(a,a.parent),g.canvas.appendChild(d),a.parent=g,!g.bottom&&(g.bottom=a),a.prev=g.top,a.next=null,g.top&&(g.top.next=a),g.top=a,e=0,f=h.length;f>e;e++)(b=h[e]).stalk&&b.el[b.stalk](a);return g},wc.removeChild=function(a){if(this.removed||"group"!==this.type||a.parent!==this)return this;var b=this,d=c._engine.getNode(a),e=b.paper;return c._tear(a,b),e.canvas.appendChild(d),b.parent=e,!e.bottom&&(e.bottom=b),b.prev=e.top,e.top&&(e.top.next=b),e.top=b,b.next=null,b};var Nc=function(a){if(this.items=[],this.length=0,this.type="set",a)for(var b=0,c=a.length;c>b;b++)!a[b]||a[b].constructor!=wc.constructor&&a[b].constructor!=Nc||(this[this.items.length]=this.items[this.items.length]=a[b],this.length++)},Oc=Nc.prototype;Oc.push=function(){for(var a,b,c=0,d=arguments.length;d>c;c++)a=arguments[c],!a||a.constructor!=wc.constructor&&a.constructor!=Nc||(b=this.items.length,this[b]=this.items[b]=a,this.length++);return this},Oc.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},Oc.forEach=function(a,b){for(var c=0,d=this.items.length;d>c;c++)if(a.call(b,this.items[c],c)===!1)return this;return this};for(var Pc in wc)wc[w](Pc)&&(Oc[Pc]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a][z](c,b)})}}(Pc));Oc.attr=function(a,b){if(a&&c.is(a,D)&&c.is(a[0],E))for(var d=0,e=a.length;e>d;d++)this.items[d].attr(a[d]);else for(var f=0,g=this.items.length;g>f;f++)this.items[f].attr(a,b);return this},Oc.clear=function(){for(;this.length;)this.pop()},Oc.splice=function(a,b){a=0>a?cb(this.length+a,0):a,b=cb(0,db(this.length-a,isNaN(b)&&this.length||b));var c,d=[],e=[],f=[];for(c=2;cc;c++)e.push(this[a+c]);for(;cc?f[c]:d[c-g];for(c=this.items.length=this.length-=b-g;this[c];)delete this[c++];return new Nc(e)},Oc.exclude=function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]==a)return this.splice(b,1),!0},Oc.animate=function(a,b,d,e){(c.is(d,"function")||!d)&&(e=d||null);var f,g,h=this.items.length,i=h,j=this;if(!h)return this;e&&(g=function(){!--h&&e.call(j)}),d=c.is(d,C)?d:g;var k=c.animation(a,b,d,g);for(f=this.items[--i].animate(k);i--;)this.items[i]&&!this.items[i].removed&&this.items[i].animateWith(f,k,k);return this},Oc.insertAfter=function(a){for(var b=this.items.length;b--;)this.items[b].insertAfter(a);return this},Oc.getBBox=function(){for(var a=[],b=[],c=[],d=[],e=this.items.length;e--;)if(!this.items[e].removed){var f=this.items[e].getBBox();a.push(f.x),b.push(f.y),c.push(f.x+f.width),d.push(f.y+f.height)}return a=db[z](0,a),b=db[z](0,b),c=cb[z](0,c),d=cb[z](0,d),{x:a,y:b,x2:c,y2:d,width:c-a,height:d-b}},Oc.clone=function(a){a=new Nc;for(var b=0,c=this.items.length;c>b;b++)a.push(this.items[b].clone());return a},Oc.toString=function(){return"Raphaël‘s set"},Oc.glow=function(a){var b=this.paper.set();return this.forEach(function(c){var d=c.glow(a);null!=d&&d.forEach(function(a){b.push(a)})}),b},c.registerFont=function(a){if(!a.face)return a;this.fonts=this.fonts||{};var b={w:a.w,face:{},glyphs:{}},c=a.face["font-family"];for(var d in a.face)a.face[w](d)&&(b.face[d]=a.face[d]);if(this.fonts[c]?this.fonts[c].push(b):this.fonts[c]=[b],!a.svg){b.face["units-per-em"]=ab(a.face["units-per-em"],10);for(var e in a.glyphs)if(a.glyphs[w](e)){var f=a.glyphs[e];if(b.glyphs[e]={w:f.w,k:{},d:f.d&&"M"+f.d.replace(/[mlcxtrv]/g,function(a){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[a]||"M"})+"z"},f.k)for(var g in f.k)f[w](g)&&(b.glyphs[e].k[g]=f.k[g])}}return a},W.getFont=function(a,b,d,e){if(e=e||"normal",d=d||"normal",b=+b||{normal:400,bold:700,lighter:300,bolder:800}[b]||400,c.fonts){var f=c.fonts[a];if(!f){var g=new RegExp("(^|\\s)"+a.replace(/[^\w\d\s+!~.:_-]/g,u)+"(\\s|$)","i");for(var h in c.fonts)if(c.fonts[w](h)&&g.test(h)){f=c.fonts[h];break}}var i;if(f)for(var j=0,k=f.length;k>j&&(i=f[j],i.face["font-weight"]!=b||i.face["font-style"]!=d&&i.face["font-style"]||i.face["font-stretch"]!=e);j++);return i}},W.print=function(a,b,d,e,f,g,h){g=g||"middle",h=cb(db(h||0,1),-1);var i,j=$(d)[G](u),k=0,l=0,m=u;if(c.is(e,d)&&(e=this.getFont(e)),e){i=(f||16)/e.face["units-per-em"];for(var n=e.face.bbox[G](qb),o=+n[0],p=n[3]-n[1],q=0,r=+n[1]+("baseline"==g?p+ +e.face.descent:p/2),s=0,t=j.length;t>s;s++){if("\n"==j[s])k=0,w=0,l=0,q+=p;else{var v=l&&e.glyphs[j[s-1]]||{},w=e.glyphs[j[s]];k+=l?(v.w||e.w)+(v.k&&v.k[j[s]]||0)+e.w*h:0,l=1}w&&w.d&&(m+=c.transformPath(w.d,["t",k*i,q*i,"s",i,i,o,r,"t",(a-o)/i,(b-r)/i]))}}return this.path(m).attr({fill:"#000",stroke:"none"})},W.add=function(a){if(c.is(a,"array"))for(var b,d=this.set(),e=0,f=a.length;f>e;e++)b=a[e]||{},X[w](b.type)&&d.push(this[b.type]().attr(b));return d},c.format=function(a,b){var d=c.is(b,D)?[0][A](b):arguments;return a&&c.is(a,C)&&d.length-1&&(a=a.replace(rb,function(a,b){return null==d[++b]?u:d[b]})),a||u},c.fullfill=function(){var a=/\{([^\}]+)\}/g,b=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,c=function(a,c,d){var e=d;return c.replace(b,function(a,b,c,d,f){b=b||d,e&&(b in e&&(e=e[b]),"function"==typeof e&&f&&(e=e()))}),e=(null==e||e==d?a:e)+""};return function(b,d){return String(b).replace(a,function(a,b){return c(a,b,d)})}}(),c.ninja=function(){return Q.was?P.win.Raphael=Q.is:delete Raphael,c};var Qc=c.vml&&.5||0;return c.crispBound=Yb(function(a,b,c,d,e){var f,g={};return a=a||0,b=b||0,c=c||0,d=d||0,e=e||0,f=e%2/2+Qc,g.x=jb(a+f)-f,g.y=jb(b+f)-f,g.width=jb(a+c+f)-f-g.x,g.height=jb(b+d+f)-f-g.y,g["stroke-width"]=e,0===g.width&&0!==c&&(g.width=1),0===g.height&&0!==d&&(g.height=1),g},c),wc.crisp=function(){var a,b=this,d=b.attrs,e=b.attr(["x","y","width","height","stroke-width"]);e=c.crispBound(e.x,e.y,e.width,e.height,e["stroke-width"]);for(a in e)d[a]===e[a]&&delete e[a];return b.attr(e)},c.st=Oc,c.define=function(a,b,d,e,f,g){var h,i;if(c.is(a,D))for(h=0,i=a.length;i>h;h++)c.define(a[h]);else{if(c.is(a,E))return void c.define(a.name,a[a.name],a.ca,a.fn,a.e,a.data);if(a&&!c.fn[a])return c.fn[a]=function(){var g,h=arguments,i=b.apply(this,h);if(e&&c.is(e,E))for(g in e)i[g]=e[g];if(f&&c.is(f,E))for(g in f)i[g]&&i[g](f[g]);if(d){if(c.is(d,"function"))i.ca[a]=d;else for(g in d)i.ca[g]=d[g];i.ca[a]&&(c._lastArgIfGroup(h,!0),i.attr(a,M.call(h)))}return i},d&&(c.fn[a].ca=d),e&&(c.fn[a].fn=e),f&&(c.fn[a].e=f),g&&(c.fn[a].data=g),c.fn[a]}},function(a,b,d){function e(){/in/.test(a.readyState)?setTimeout(e,9):c.eve("raphael.DOMload")}null==a.readyState&&a.addEventListener&&(a.addEventListener(b,d=function(){a.removeEventListener(b,d,!1),a.readyState="complete"},!1),a.readyState="loading"),e()}(document,"DOMContentLoaded"),b.on("raphael.DOMload",function(){s=!0}),function(){if(c.svg){var a="hasOwnProperty",b=String,d=parseFloat,e=parseInt,f=Math,g=f.max,h=f.abs,i=f.pow,j=f.sqrt,k=/[, ]+/,l=!(!/AppleWebKit/.test(c._g.win.navigator.userAgent)||/Chrome/.test(c._g.win.navigator.userAgent)&&!(c._g.win.navigator.appVersion.match(/Chrome\/(\d+)\./)[1]<29)),m=c.eve,n="",o=" ",p="http://www.w3.org/1999/xlink",q={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},r={};c.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version},c._url=n;var s=function(a,b){var c=a.gradient;if(c){if(c===b)return;c.refCount--,c.refCount||c.parentNode.removeChild(c),delete a.gradient}b&&(a.gradient=b,b.refCount++)},t=c._createNode=function(d,e){if(e){"string"==typeof d&&(d=t(d));for(var f in e)e[a](f)&&("xlink:"==f.substring(0,6)?d.setAttributeNS(p,f.substring(6),b(e[f])):d.setAttribute(f,b(e[f])))}else d=c._g.doc.createElementNS("http://www.w3.org/2000/svg",d);return d},u={userSpaceOnUse:"userSpaceOnUse",objectBoundingBox:"objectBoundingBox"},v={pad:"pad",redlect:"reflect",repeat:"repeat"},w=function(a,e){if(!a.paper||!a.paper.defs)return 0;var k,l,m,o,p,q="linear",r=a.paper,w=(r.id+"-"+e).replace(/[\(\)\s%:,\xb0#]/g,"_"),x=.5,y=.5,z=a.node,A=z.style,B=c._g.doc.getElementById(w);if(!B){if(e=b(e).replace(c._radial_gradient,function(a,b){q="radial",b=b&&b.split(",")||[],o=b[5],p=b[6];var c,e,f=b[0],g=b[1],h=b[2],r=b[3],s=b[4],t=f&&g;return h&&(k=/\%/.test(h)?h:d(h)),o===u.userSpaceOnUse?(t&&(x=f,y=g),r&&s&&(l=r,m=s,t||(x=l,y=m)),n):(t&&(x=d(f),y=d(g),c=2*(y>.5)-1,(e=i(x-.5,2))+i(y-.5,2)>.25&&.25>e&&(y=j(.25-e)*c+.5)&&.5!==y&&(y=y.toFixed(5)-1e-5*c)),r&&s&&(l=d(r),m=d(s),c=2*(m>.5)-1,(e=i(l-.5,2))+i(m-.5,2)>.25&&.25>e&&(m=j(.25-e)*c+.5)&&.5!==m&&(m=m.toFixed(5)-1e-5*c),t||(x=l,y=m)),n)}),e=e.split(/\s*\-\s*/),"linear"==q){var C,D,E=e.shift(),F=E.match(/\((.*)\)/);if(F=F&&F[1]&&F[1].split(/\s*\,\s*/),E=-d(E),isNaN(E))return null;F&&F.length?(F[0]in u?(o=F.shift(),F[0]in v&&(p=F.shift())):(F[4]&&(o=F[4]),F[5]&&(p=F[5])),C=[F[0]||"0%",F[1]||"0%",F[2]||"100%",F[3]||"0%"]):(C=[0,0,f.cos(c.rad(E)),f.sin(c.rad(E))],D=1/(g(h(C[2]),h(C[3]))||1),C[2]*=D,C[3]*=D,C[2]<0&&(C[0]=-C[2],C[2]=0),C[3]<0&&(C[1]=-C[3],C[3]=0))}var G=c._parseDots(e);if(!G)return null;B=t(q+"Gradient",{id:w}),B.refCount=0,o in u&&B.setAttribute("gradientUnits",b(o)),p in v&&B.setAttribute("spreadMethod",b(p)),"radial"===q?(void 0!==k&&B.setAttribute("r",b(k)),void 0!==l&&void 0!==m&&(B.setAttribute("cx",b(l)),B.setAttribute("cy",b(m))),B.setAttribute("fx",b(x)),B.setAttribute("fy",b(y))):t(B,{x1:C[0],y1:C[1],x2:C[2],y2:C[3]});for(var H=0,I=G.length;I>H;H++)B.appendChild(t("stop",{offset:G[H].offset?G[H].offset:H?"100%":"0%","stop-color":G[H].color||"#fff","stop-opacity":void 0===G[H].opacity?1:G[H].opacity})); +r.defs.appendChild(B)}return s(a,B),t(z,{fill:"url('"+c._url+"#"+w+"')",opacity:1,"fill-opacity":1}),A.fill=n,A.opacity=1,A.fillOpacity=1,1},x=function(a){var b=a.getBBox(1);t(a.pattern,{patternTransform:a.matrix.invert()+" translate("+b.x+","+b.y+")"})},y=function(d,e,f){if("path"==d.type){for(var g,h,i,j,k,l=b(e).toLowerCase().split("-"),m=d.paper,o=f?"end":"start",p=d.node,s=d.attrs,u=s["stroke-width"],v=l.length,w="classic",x=3,y=3,z=5;v--;)switch(l[v]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":w=l[v];break;case"wide":y=5;break;case"narrow":y=2;break;case"long":x=5;break;case"short":x=2}if("open"==w?(x+=2,y+=2,z+=2,i=1,j=f?4:1,k={fill:"none",stroke:s.stroke}):(j=i=x/2,k={fill:s.stroke,stroke:"none"}),d._.arrows?f?(d._.arrows.endPath&&r[d._.arrows.endPath]--,d._.arrows.endMarker&&r[d._.arrows.endMarker]--):(d._.arrows.startPath&&r[d._.arrows.startPath]--,d._.arrows.startMarker&&r[d._.arrows.startMarker]--):d._.arrows={},"none"!=w){var A="raphael-marker-"+w,B="raphael-marker-"+o+w+x+y+"-obj"+d.id;c._g.doc.getElementById(A)?r[A]++:(m.defs.appendChild(t(t("path"),{"stroke-linecap":"round",d:q[w],id:A})),r[A]=1);var C,D=c._g.doc.getElementById(B);D?(r[B]++,C=D.getElementsByTagName("use")[0]):(D=t(t("marker"),{id:B,markerHeight:y,markerWidth:x,orient:"auto",refX:j,refY:y/2}),C=t(t("use"),{"xlink:href":"#"+A,transform:(f?"rotate(180 "+x/2+" "+y/2+") ":n)+"scale("+x/z+","+y/z+")","stroke-width":(1/((x/z+y/z)/2)).toFixed(4)}),D.appendChild(C),m.defs.appendChild(D),r[B]=1),t(C,k);var E=i*("diamond"!=w&&"oval"!=w);f?(g=d._.arrows.startdx*u||0,h=c.getTotalLength(s.path)-E*u):(g=E*u,h=c.getTotalLength(s.path)-(d._.arrows.enddx*u||0)),k={},k["marker-"+o]="url('"+c._url+"#"+B+"')",(h||g)&&(k.d=Raphael.getSubpath(s.path,g,h)),t(p,k),d._.arrows[o+"Path"]=A,d._.arrows[o+"Marker"]=B,d._.arrows[o+"dx"]=E,d._.arrows[o+"Type"]=w,d._.arrows[o+"String"]=e}else f?(g=d._.arrows.startdx*u||0,h=c.getTotalLength(s.path)-g):(g=0,h=c.getTotalLength(s.path)-(d._.arrows.enddx*u||0)),d._.arrows[o+"Path"]&&t(p,{d:Raphael.getSubpath(s.path,g,h)}),delete d._.arrows[o+"Path"],delete d._.arrows[o+"Marker"],delete d._.arrows[o+"dx"],delete d._.arrows[o+"Type"],delete d._.arrows[o+"String"];for(k in r)if(r[a](k)&&!r[k]){var F=c._g.doc.getElementById(k);F&&F.parentNode.removeChild(F)}}},z={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},A=function(a,d,e){var f=z[b(d).toLowerCase()];if(d=f||void 0!==d&&[].concat(d)){var g,h=a.attrs["stroke-width"]||"1",i={round:h,square:h,butt:0}[a.attrs["stroke-linecap"]||e["stroke-linecap"]]||0,j=g=d.length;if(f)for(;g--;)d[g]=d[g]*h+(g%2?1:-1)*i;else for(g=0;j>g;g+=2)d[g]-=i,d[g+1]&&(d[g+1]+=i),d[g]<=0&&(d[g]=.1);c.is(d,"array")&&t(a.node,{"stroke-dasharray":d.join(",")})}},B=function(a,b){for(var c in b)m("raphael.attr."+c+"."+a.id,a,b[c],c),a.ca[c]&&a.attr(c,b[c])},C=c._setFillAndStroke=function(d,f){if(d.paper.canvas){var i=d.node,j=d.attrs,m=d.paper,o=i.style,q=o.visibility;o.visibility="hidden";for(var r in f)if(f[a](r)){if(!c._availableAttrs[a](r))continue;var u=f[r];switch(j[r]=u,r){case"blur":d.blur(u);break;case"href":case"title":case"target":var v=i.parentNode;if("a"!=v.tagName.toLowerCase()){if(u==n)break;var z=t("a");z.raphael=!0,z.raphaelid=i.raphaelid,v.insertBefore(z,i),z.appendChild(i),v=z}"target"==r?v.setAttributeNS(p,"show","blank"==u?"new":u):v.setAttributeNS(p,r,u),i.titleNode=v;break;case"cursor":o.cursor=u;break;case"transform":d.transform(u);break;case"rotation":c.is(u,"array")?d.rotate.apply(d,u):d.rotate(u);break;case"arrow-start":y(d,u);break;case"arrow-end":y(d,u,1);break;case"clip-path":var B=!0;case"clip-rect":var C=!B&&b(u).split(k);if(d._.clipispath=!!B,B||4==C.length){d.clip&&d.clip.parentNode.parentNode.removeChild(d.clip.parentNode);var D=t("clipPath"),F=t(B?"path":"rect");D.id=c.createUUID(),t(F,B?{d:u?j["clip-path"]=c._pathToAbsolute(u):c._availableAttrs.path,fill:"none"}:{x:C[0],y:C[1],width:C[2],height:C[3],transform:d.matrix.invert()}),D.appendChild(F),m.defs.appendChild(D),t(i,{"clip-path":"url('"+c._url+"#"+D.id+"')"}),d.clip=F}if(!u){var G=i.getAttribute("clip-path");if(G){var H=c._g.doc.getElementById(G.replace(/(^url\(#|\)$)/g,n));H&&H.parentNode.removeChild(H),t(i,{"clip-path":n}),delete d.clip}}break;case"path":"path"==d.type&&(t(i,{d:u?j.path=c._pathToAbsolute(u):c._availableAttrs.path}),d._.dirty=1,d._.arrows&&("startString"in d._.arrows&&y(d,d._.arrows.startString),"endString"in d._.arrows&&y(d,d._.arrows.endString,1)));break;case"width":if(i.setAttribute(r,u),d._.dirty=1,!j.fx)break;r="x",u=j.x;case"x":j.fx&&(u=-j.x-(j.width||0));case"rx":if("rx"==r&&"rect"==d.type)break;case"cx":i.setAttribute(r,u),d.pattern&&x(d),d._.dirty=1;break;case"height":if(i.setAttribute(r,u),d._.dirty=1,!j.fy)break;r="y",u=j.y;case"y":j.fy&&(u=-j.y-(j.height||0));case"ry":if("ry"==r&&"rect"==d.type)break;case"cy":i.setAttribute(r,u),d.pattern&&x(d),d._.dirty=1;break;case"r":"rect"==d.type?t(i,{rx:u,ry:u}):i.setAttribute(r,u),d._.dirty=1;break;case"src":"image"==d.type&&i.setAttributeNS(p,"href",u);break;case"stroke-width":(1!=d._.sx||1!=d._.sy)&&(u/=g(h(d._.sx),h(d._.sy))||1),m._vbSize&&(u*=m._vbSize),l&&0===u&&(u=1e-6),i.setAttribute(r,u),j["stroke-dasharray"]&&A(d,j["stroke-dasharray"],f),d._.arrows&&("startString"in d._.arrows&&y(d,d._.arrows.startString),"endString"in d._.arrows&&y(d,d._.arrows.endString,1));break;case"stroke-dasharray":A(d,u,f);break;case"fill":var I=b(u).match(c._ISURL);if(I){D=t("pattern");var J=t("image");D.id=c.createUUID(),t(D,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),t(J,{x:0,y:0,"xlink:href":I[1]}),D.appendChild(J),function(a){c._preload(I[1],function(){var b=this.offsetWidth,c=this.offsetHeight;t(a,{width:b,height:c}),t(J,{width:b,height:c}),m.safari()})}(D),m.defs.appendChild(D),o.fill="url('"+c._url+"#"+D.id+"')",t(i,{fill:o.fill}),d.pattern=D,d.pattern&&x(d);break}var K=c.getRGB(u);if(K.error){if(("circle"==d.type||"ellipse"==d.type||"r"!=b(u).charAt())&&w(d,u)){if("opacity"in j||"fill-opacity"in j){var L=c._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g,n));if(L){var M=L.getElementsByTagName("stop");t(M[M.length-1],{"stop-opacity":("opacity"in j?j.opacity:1)*("fill-opacity"in j?j["fill-opacity"]:1)})}}j.gradient=u,j.fill="none",o.fill=n;break}}else delete f.gradient,delete j.gradient,!c.is(j.opacity,"undefined")&&c.is(f.opacity,"undefined")&&t(i,{opacity:j.opacity}),!c.is(j["fill-opacity"],"undefined")&&c.is(f["fill-opacity"],"undefined")&&t(i,{"fill-opacity":j["fill-opacity"]}),d.gradient&&s(d);K[a]("opacity")?(t(i,{"fill-opacity":o.fillOpacity=K.opacity>1?K.opacity/100:K.opacity}),d._.fillOpacityDirty=!0):d._.fillOpacityDirty&&c.is(j["fill-opacity"],"undefined")&&c.is(f["fill-opacity"],"undefined")&&(i.removeAttribute("fill-opacity"),o.fillOpacity=n,delete d._.fillOpacityDirty);case"stroke":K=c.getRGB(u),i.setAttribute(r,K.hex),o[r]=K.hex,"stroke"==r&&(K[a]("opacity")?(t(i,{"stroke-opacity":o.strokeOpacity=K.opacity>1?K.opacity/100:K.opacity}),d._.strokeOpacityDirty=!0):d._.strokeOpacityDirty&&c.is(j["stroke-opacity"],"undefined")&&c.is(f["stroke-opacity"],"undefined")&&(i.removeAttribute("stroke-opacity"),o.strokeOpacity=n,delete d._.strokeOpacityDirty),d._.arrows&&("startString"in d._.arrows&&y(d,d._.arrows.startString),"endString"in d._.arrows&&y(d,d._.arrows.endString,1)));break;case"gradient":("circle"==d.type||"ellipse"==d.type||"r"!=b(u).charAt())&&w(d,u);break;case"line-height":case"vertical-align":break;case"visibility":"hidden"===u?d.hide():d.show();break;case"opacity":j.gradient&&!j[a]("stroke-opacity")&&t(i,{"stroke-opacity":u>1?u/100:u});case"fill-opacity":if(j.gradient){L=c._g.doc.getElementById(i.getAttribute("fill").replace(/^url\(#|\)$/g,n)),L&&(M=L.getElementsByTagName("stop"),t(M[M.length-1],{"stop-opacity":u}));break}default:"font-size"==r&&(u=e(u,10)+"px");var N=r.replace(/(\-.)/g,function(a){return a.substring(1).toUpperCase()});o[N]=u,d._.dirty=1,i.setAttribute(r,u)}}"text"===d.type&&E(d,f),o.visibility=q}},D=1.2,E=function(e,f){if("text"==e.type&&(f[a]("text")||f[a]("font")||f[a]("font-size")||f[a]("x")||f[a]("y")||f[a]("line-height")||f[a]("vertical-align"))){var g=e.attrs,h=e.node,i=h.firstChild&&c._g.doc.defaultView.getComputedStyle(h.firstChild,n),j=i?d(c._g.doc.defaultView.getComputedStyle(h.firstChild,n).getPropertyValue("font-size")):10,k=d(f["line-height"]||g["line-height"])||j*D,l=g[a]("vertical-align")?g["vertical-align"]:"middle";if(isNaN(k)&&(k=j*D),c.is(f.text,"array")&&(f.text=f.text.join("
")),l="top"===l?-.5:"bottom"===l?.5:0,f[a]("text")&&(f.text!==g.text||e._textdirty)){for(g.text=f.text;h.firstChild;)h.removeChild(h.firstChild);for(var m,o=b(f.text).split(/\n|/gi),p=[],q=0,r=o.length;r>q;q++)m=t("tspan"),q?t(m,{dy:k,x:g.x}):t(m,{dy:k*o.length*l,x:g.x}),o[q]||(m.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o[q]=" "),m.appendChild(c._g.doc.createTextNode(o[q])),h.appendChild(m),p[q]=m;e._textdirty=!1}else for(p=h.getElementsByTagName("tspan"),q=0,r=p.length;r>q;q++)q?t(p[q],{dy:k,x:g.x}):t(p[0],{dy:k*p.length*l,x:g.x});t(h,{x:g.x,y:g.y}),e._.dirty=1;var s=e._getBBox(),u=g.y-(s.y+s.height/2);if(s.isCalculated)switch(g["vertical-align"]){case"top":u=.75*s.height;break;case"bottom":u=-(.25*s.height);break;default:u=g.y-(s.y+.25*s.height)}u&&c.is(u,"finite")&&p[0]&&t(p[0],{dy:u})}},F=function(a,b,d){var e=this,f=d||b;f.canvas&&f.canvas.appendChild(a),e.node=e[0]=a,a.raphael=!0,a.raphaelid=e.id=c._oid++,e.matrix=c.matrix(),e.realPath=null,e.attrs=e.attrs||{},e.followers=e.followers||[],e.paper=b,e.ca=e.customAttributes=e.customAttributes||new b._CustomAttributes,e._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},e.parent=f,!f.bottom&&(f.bottom=e),e.prev=f.top,f.top&&(f.top.next=e),f.top=e,e.next=null},G=c.el;F.prototype=G,G.constructor=F,c._engine.getNode=function(a){var b=a.node||a[0].node;return b.titleNode||b},c._engine.getLastNode=function(a){var b=a.node||a[a.length-1].node;return b.titleNode||b},G.rotate=function(a,c,e){var f,g=this;return g.removed?g:(a=b(a).split(k),a.length-1&&(c=d(a[1]),e=d(a[2])),a=d(a[0]),null==e&&(c=e),(null==c||null==e)&&(f=g.getBBox(1),c=f.x+f.width/2,e=f.y+f.height/2),g.transform(g._.transform.concat([["r",a,c,e]])),g)},G.scale=function(a,c,e,f){var g,h=this;return h.removed?h:(a=b(a).split(k),a.length-1&&(c=d(a[1]),e=d(a[2]),f=d(a[3])),a=d(a[0]),null==c&&(c=a),null==f&&(e=f),(null==e||null==f)&&(g=h.getBBox(1)),e=null==e?g.x+g.width/2:e,f=null==f?g.y+g.height/2:f,h.transform(h._.transform.concat([["s",a,c,e,f]])),h)},G.translate=function(a,c){var e=this;return e.removed?e:(a=b(a).split(k),a.length-1&&(c=d(a[1])),a=d(a[0])||0,c=+c||0,e.transform(e._.transform.concat([["t",a,c]])),e)},G.transform=function(b){var d,e=this,f=e._;return null==b?f.transform:(c._extractTransform(e,b),e.clip&&!f.clipispath&&t(e.clip,{transform:e.matrix.invert()}),e.pattern&&x(e),e.node&&t(e.node,{transform:e.matrix}),(1!=f.sx||1!=f.sy)&&(d=e.attrs[a]("stroke-width")?e.attrs["stroke-width"]:1,e.attr({"stroke-width":d})),e)},G.hide=function(){var a=this;return!a.removed&&a.paper.safari(a.node.style.display="none"),a},G.show=function(){var a=this;return!a.removed&&a.paper.safari(a.node.style.display=n),a},G.remove=function(){if(!this.removed&&this.parent.canvas){var a,b=this,d=c._engine.getNode(b),e=b.paper,f=e.defs;for(e.__set__&&e.__set__.exclude(b),m.unbind("raphael.*.*."+b.id),b.gradient&&f&&s(b);a=b.followers.pop();)a.el.remove();for(;a=b.bottom;)a.remove();if(b._drag&&b.undrag(),b.events)for(;a=b.events.pop();)a.unbind();b.parent.canvas.removeChild(d),b.removeData(),delete e._elementsById[b.id],c._tear(b,b.parent);for(a in b)b[a]="function"==typeof b[a]?c._removedFactory(a):null;b.removed=!0}},G._getBBox=function(){var a,b,c=this,d=c.node,e={},f=c.attrs;"none"===d.style.display&&(c.show(),b=!0);try{e=d.getBBox(),"text"==c.type&&(void 0===e.x&&(e.isCalculated=!0,a=f["text-anchor"],e.x=(f.x||0)-e.width*("start"===a?0:"middle"===a?.5:1)),void 0===e.y&&(e.isCalculated=!0,a=f["vertical-align"],e.y=(f.y||0)-e.height*("bottom"===a?1:"middle"===a?.5:0)))}catch(g){}finally{e=e||{}}return b&&c.hide(),e},G.attr=function(b,d){if(this.removed)return this;if(null==b){var e={};for(var f in this.attrs)this.attrs[a](f)&&(e[f]=this.attrs[f]);return e.gradient&&"none"==e.fill&&(e.fill=e.gradient)&&delete e.gradient,e.transform=this._.transform,e.visibility="none"===this.node.style.display?"hidden":"visible",e}if(null==d&&c.is(b,"string")){if("fill"==b&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("transform"==b)return this._.transform;if("visibility"==b)return"none"===this.node.style.display?"hidden":"visible";for(var g=b.split(k),h={},i=0,j=g.length;j>i;i++)b=g[i],h[b]=b in this.attrs?this.attrs[b]:c.is(this.ca[b],"function")?this.ca[b].def:c._availableAttrs[b];return j-1?h:h[g[0]]}if(null==d&&c.is(b,"array")){for(h={},i=0,j=b.length;j>i;i++)h[b[i]]=this.attr(b[i]);return h}if(null!=d){var l={};l[b]=d}else null!=b&&c.is(b,"object")&&(l=b);for(var n in l)m("raphael.attr."+n+"."+this.id,this,l[n],n);var o={};for(n in this.ca)if(this.ca[n]&&l[a](n)&&c.is(this.ca[n],"function")&&!this.ca["_invoked"+n]){this.ca["_invoked"+n]=!0;var p=this.ca[n].apply(this,[].concat(l[n]));delete this.ca["_invoked"+n];for(var q in p)p[a](q)&&(l[q]=p[q]);this.attrs[n]=l[n],p===!1&&(o[n]=l[n],delete l[n])}C(this,l);var r;for(i=0,j=this.followers.length;j>i;i++)r=this.followers[i],r.cb&&!r.cb.call(r.el,l,this)||r.el.attr(l);for(q in o)l[q]=o[q];return this},G.blur=function(a){var b=this;if(0!==+a){var d=t("filter"),e=t("feGaussianBlur");b.attrs.blur=a,d.id=c.createUUID(),t(e,{stdDeviation:+a||1.5}),d.appendChild(e),b.paper.defs.appendChild(d),b._blur=d,t(b.node,{filter:"url('"+c._url+"#"+d.id+"')"})}else b._blur&&(b._blur.parentNode.removeChild(b._blur),delete b._blur,delete b.attrs.blur),b.node.removeAttribute("filter")},G.on=function(a,b){if(this.removed)return this;var d=b;return c.supportsTouch&&(a=c._touchMap[a]||"click"===a&&"touchstart"||a,d=function(a){a.preventDefault(),b()}),this.node["on"+a]=d,this},c._engine.path=function(a,b,c){var d=t("path"),e=new F(d,a,c);return e.type="path",C(e,b),B(e,b),e},c._engine.group=function(a,b,c){var d=t("g"),e=new F(d,a,c);return e.type="group",e.canvas=e.node,e.top=e.bottom=null,e._id=b||n,b&&d.setAttribute("class","raphael-group-"+e.id+"-"+b),e},c._engine.circle=function(a,b,c){var d=t("circle"),e=new F(d,a,c);return e.type="circle",C(e,b),B(e,b),e},c._engine.rect=function(a,b,c){var d=t("rect"),e=new F(d,a,c);return e.type="rect",b.rx=b.ry=b.r,C(e,b),B(e,b),e},c._engine.ellipse=function(a,b,c){var d=t("ellipse"),e=new F(d,a,c);return e.type="ellipse",C(e,b),B(e,b),e},c._engine.image=function(a,b,c){var d=t("image"),e=(b.src,new F(d,a,c));return e.type="image",d.setAttribute("preserveAspectRatio","none"),C(e,b),B(e,b),e},c._engine.text=function(a,b,c){var d=t("text"),e=new F(d,a,c);return e.type="text",e._textdirty=!0,C(e,b),B(e,b),e},c._engine.setSize=function(a,b){return this.width=a||this.width,this.height=b||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},c._engine.create=function(){var a=c._getContainer.apply(0,arguments),b=a&&a.container,d=a.x,e=a.y,f=a.width,g=a.height;if(!b)throw new Error("SVG container not found.");var h,i=t("svg"),j="overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;-moz-user-select:-moz-none;-khtml-user-select:none;-ms-user-select:none;user-select:none;-o-user-select:none;cursor:default;";return d=d||0,e=e||0,f=f||512,g=g||342,t(i,{height:g,version:1.1,width:f,xmlns:"http://www.w3.org/2000/svg"}),1==b?(i.style.cssText=j+"position:absolute;left:"+d+"px;top:"+e+"px",c._g.doc.body.appendChild(i),h=1):(i.style.cssText=j+"position:relative",b.firstChild?b.insertBefore(i,b.firstChild):b.appendChild(i)),b=new c._Paper,b.width=f,b.height=g,b.canvas=i,t(i,{id:"raphael-paper-"+b.id}),b.clear(),b._left=b._top=0,h&&(b.renderfix=function(){}),b.renderfix(),b},c._engine.setViewBox=function(a,b,c,d,e){m("raphael.setViewBox",this,this._viewBox,[a,b,c,d,e]);var f,h,i=g(c/this.width,d/this.height),j=this.top,k=e?"meet":"xMinYMin";for(null==a?(this._vbSize&&(i=1),delete this._vbSize,f="0 0 "+this.width+o+this.height):(this._vbSize=i,f=a+o+b+o+c+o+d),t(this.canvas,{viewBox:f,preserveAspectRatio:k});i&&j;)h="stroke-width"in j.attrs?j.attrs["stroke-width"]:1,j.attr({"stroke-width":h}),j._.dirty=1,j._.dirtyT=1,j=j.prev;return this._viewBox=[a,b,c,d,!!e],this},c.prototype.renderfix=function(){var a,b=this.canvas,c=b.style;try{a=b.getScreenCTM()||b.createSVGMatrix()}catch(d){a=b.createSVGMatrix()}var e=-a.e%1,f=-a.f%1;(e||f)&&(e&&(this._left=(this._left+e)%1,c.left=this._left+"px"),f&&(this._top=(this._top+f)%1,c.top=this._top+"px"))},c.prototype._desc=function(a){var b=this.desc;if(b)for(;b.firstChild;)b.removeChild(b.firstChild);else this.desc=b=t("desc"),this.canvas.appendChild(b);b.appendChild(c._g.doc.createTextNode(c.is(a,"string")?a:"Created with Red Raphaël "+c.version))},c.prototype.clear=function(){var a;for(m("raphael.clear",this);a=this.bottom;)a.remove();for(a=this.canvas;a.firstChild;)a.removeChild(a.firstChild);this.bottom=this.top=null,a.appendChild(this.desc=t("desc")),a.appendChild(this.defs=t("defs"))},c.prototype.remove=function(){var a;for(m("raphael.remove",this);a=this.bottom;)a.remove();this.defs&&this.defs.parentNode.removeChild(this.defs),this.desc&&this.desc.parentNode.removeChild(this.desc),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(a in this)this[a]="function"==typeof this[a]?c._removedFactory(a):null;this.removed=!0};var H=c.st;for(var I in G)G[a](I)&&!H[a](I)&&(H[I]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(I))}}(),function(){if(c.vml){var a="hasOwnProperty",b=String,d=parseFloat,e=Math,f=e.round,g=e.max,h=e.min,i=e.sqrt,j=e.abs,k="fill",l=/[, ]+/,m=c.eve,n=" progid:DXImageTransform.Microsoft",o=" ",p="",q={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},r=/([clmz]),?([^clmz]*)/gi,s=/ progid:\S+Blur\([^\)]+\)/g,t=/-?[^,\s-]+/g,u="position:absolute;left:0;top:0;width:1px;height:1px",v=21600,w={path:1,rect:1,image:1},z={circle:1,ellipse:1},A=function(a){var d=/[ahqstv]/gi,e=c._pathToAbsolute;if(b(a).match(d)&&(e=c._path2curve),d=/[clmz]/g,e==c._pathToAbsolute&&!b(a).match(d)){var g=b(a).replace(r,function(a,b,c){var d=[],e="m"==b.toLowerCase(),g=q[b];return c.replace(t,function(a){e&&2==d.length&&(g+=d+q["m"==b?"l":"L"],d=[]),d.push(f(a*v))}),g+d});return g||"m0,0"}var h,i,j=e(a);g=[];for(var k=0,l=j.length;l>k;k++){h=j[k],i=j[k][0].toLowerCase(),"z"==i&&(i="x");for(var m=1,n=h.length;n>m;m++)i+=f(h[m]*v)+(m!=n-1?",":p);g.push(i)}return g.length?g.join(o):"m0,0"},B=function(a,b,d){var e=c.matrix();return e.rotate(-a,.5,.5),{dx:e.x(b,d),dy:e.y(b,d)}},C=function(a,b,c,d,e,f){var g=a._,h=a.matrix,i=g.fillpos,l=a.node,m=l.style,n=1,p="",q=v/b,r=v/c;if(m.visibility="hidden",b&&c){if(l.coordsize=j(q)+o+j(r),m.rotation=f*(0>b*c?-1:1),f){var s=B(f,d,e);d=s.dx,e=s.dy}if(0>b&&(p+="x"),0>c&&(p+=" y")&&(n=-1),m.flip=p,l.coordorigin=d*-q+o+e*-r,i||g.fillsize){var t=l.getElementsByTagName(k);t=t&&t[0],t&&(l.removeChild(t),i&&(s=B(f,h.x(i[0],i[1]),h.y(i[0],i[1])),t.position=s.dx*n+o+s.dy*n),g.fillsize&&(t.size=g.fillsize[0]*j(b)+o+g.fillsize[1]*j(c)),l.appendChild(t))}m.visibility="visible"}};c._url=p,c.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var D=function(a,c,d){for(var e=b(c).toLowerCase().split("-"),f=d?"end":"start",g=e.length,h="classic",i="medium",j="medium";g--;)switch(e[g]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":h=e[g];break;case"wide":case"narrow":j=e[g];break;case"long":case"short":i=e[g]}var k=a.node.getElementsByTagName("stroke")[0];k[f+"arrow"]=h,k[f+"arrowlength"]=i,k[f+"arrowwidth"]=j},E=function(a,b){for(var c in b)m("raphael.attr."+c+"."+a.id,a,b[c],c),a.ca[c]&&a.attr(c,b[c])},F=c._setFillAndStroke=function(e,i){if(e.paper.canvas){e.attrs=e.attrs||{};var j=e.node,m=e.attrs,n=j.style,q=w[e.type]&&(i.x!=m.x||i.y!=m.y||i.width!=m.width||i.height!=m.height||i.cx!=m.cx||i.cy!=m.cy||i.rx!=m.rx||i.ry!=m.ry||i.r!=m.r),r=z[e.type]&&(m.cx!=i.cx||m.cy!=i.cy||m.r!=i.r||m.rx!=i.rx||m.ry!=i.ry),s="group"===e.type,t=e;for(var u in i)i[a](u)&&(m[u]=i[u]);if(q&&(m.path=c._getPath[e.type](e),e._.dirty=1),i.href&&(j.href=i.href),i.title&&(j.title=i.title),i.target&&(j.target=i.target),i.cursor&&(n.cursor=i.cursor),"blur"in i&&e.blur(i.blur),(i.path&&"path"==e.type||q)&&(j.path=A(~b(m.path).toLowerCase().indexOf("r")?c._pathToAbsolute(m.path):m.path),"image"==e.type&&(e._.fillpos=[m.x,m.y],e._.fillsize=[m.width,m.height],C(e,1,1,0,0,0))),"transform"in i&&e.transform(i.transform),"rotation"in i){var x=i.rotation;c.is(x,"array")?e.rotate.apply(e,x):e.rotate(x)}if("visibility"in i&&("hidden"===i.visibility?e.hide():e.show()),r){var y=+m.cx,B=+m.cy,E=+m.rx||+m.r||0,F=+m.ry||+m.r||0;j.path=c.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",f((y-E)*v),f((B-F)*v),f((y+E)*v),f((B+F)*v),f(y*v))}if("clip-rect"in i){var H=b(i["clip-rect"]).split(l);if(4==H.length){H[0]=+H[0],H[1]=+H[1],H[2]=+H[2]+H[0],H[3]=+H[3]+H[1];var I,K=s?j:j.clipRect||c._g.doc.createElement("div"),L=K.style;s?(e.clip=H.slice(),I=e.matrix.offset(),I=[d(I[0]),d(I[1])],H[0]-=I[0],H[1]-=I[1],H[2]-=I[0],H[3]-=I[1],L.width="10800px",L.height="10800px"):j.clipRect||(L.top="0",L.left="0",L.width=e.paper.width+"px",L.height=e.paper.height+"px",j.parentNode.insertBefore(K,j),K.appendChild(j),K.raphael=!0,K.raphaelid=j.raphaelid,j.clipRect=K),L.position="absolute",L.clip=c.format("rect({1}px {2}px {3}px {0}px)",H)}i["clip-rect"]||(s&&e.clip?(j.style.clip="rect(auto auto auto auto)",delete e.clip):j.clipRect&&(j.clipRect.style.clip="rect(auto auto auto auto)"))}if(e.textpath){var M=e.textpath.style;i.font&&(M.font=i.font),i["font-family"]&&(M.fontFamily='"'+i["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,p)+'"'),i["font-size"]&&(M.fontSize=i["font-size"]),i["font-weight"]&&(M.fontWeight=i["font-weight"]),i["font-style"]&&(M.fontStyle=i["font-style"])}if("arrow-start"in i&&D(t,i["arrow-start"]),"arrow-end"in i&&D(t,i["arrow-end"],1),null!=i.opacity||null!=i["stroke-width"]||null!=i.fill||null!=i.src||null!=i.stroke||null!=i["stroke-width"]||null!=i["stroke-opacity"]||null!=i["fill-opacity"]||null!=i["stroke-dasharray"]||null!=i["stroke-miterlimit"]||null!=i["stroke-linejoin"]||null!=i["stroke-linecap"]){var N=j.getElementsByTagName(k),O=!1,P=-1;if(N=N&&N[0],!N&&(O=N=J(k)),"image"==e.type&&i.src&&(N.src=i.src),i.fill&&(N.on=!0),(null==N.on||"none"==i.fill||null===i.fill)&&(N.on=!1),N.on&&i.fill){var Q=b(i.fill).match(c._ISURL);if(Q){N.parentNode==j&&j.removeChild(N),N.rotate=!0,N.src=Q[1],N.type="tile";var R=e.getBBox(1);N.position=R.x+o+R.y,e._.fillpos=[R.x,R.y],c._preload(Q[1],function(){e._.fillsize=[this.offsetWidth,this.offsetHeight]})}else{var S=c.getRGB(i.fill);N.color=S.hex,N.src=p,N.type="solid",S.error&&(t.type in{circle:1,ellipse:1}||"r"!=b(i.fill).charAt())&&G(t,i.fill,N)?(m.fill="none",m.gradient=i.fill,N.rotate=!1):"opacity"in S&&!("fill-opacity"in i)&&(P=S.opacity)}}if(-1!==P||"fill-opacity"in i||"opacity"in i){var T=((+m["fill-opacity"]+1||2)-1)*((+m.opacity+1||2)-1)*((+P+1||2)-1);T=h(g(T,0),1),N.opacity=T,N.src&&(N.color="none")}j.appendChild(N);var U=j.getElementsByTagName("stroke")&&j.getElementsByTagName("stroke")[0],V=!1;!U&&(V=U=J("stroke")),(i.stroke&&"none"!=i.stroke||i["stroke-width"]||null!=i["stroke-opacity"]||i["stroke-dasharray"]||i["stroke-miterlimit"]||i["stroke-linejoin"]||i["stroke-linecap"])&&(U.on=!0),("none"==i.stroke||null===i.stroke||null==U.on||0==i.stroke||0==i["stroke-width"])&&(U.on=!1);var W=c.getRGB("stroke"in i?i.stroke:m.stroke);U.on&&i.stroke&&(U.color=W.hex),T=((+m["stroke-opacity"]+1||2)-1)*((+m.opacity+1||2)-1)*((+W.opacity+1||2)-1);var X=.75*(d(i["stroke-width"])||1);if(T=h(g(T,0),1),null==i["stroke-width"]&&(X=m["stroke-width"]),i["stroke-width"]&&(U.weight=X),X&&1>X&&(T*=X)&&(U.weight=1),U.opacity=T,i["stroke-linejoin"]&&(U.joinstyle=i["stroke-linejoin"])||V&&(V.joinstyle="miter"),U.miterlimit=i["stroke-miterlimit"]||8,i["stroke-linecap"]&&(U.endcap="butt"==i["stroke-linecap"]?"flat":"square"==i["stroke-linecap"]?"square":"round"),i["stroke-dasharray"]){var Y={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};U.dashstyle=Y[a](i["stroke-dasharray"])?Y[i["stroke-dasharray"]]:i["stroke-dasharray"].join&&i["stroke-dasharray"].join(" ")||p}V&&j.appendChild(U)}if("text"==t.type){t.paper.canvas.style.display=p;var Z=t.paper.span,$=100,_=m.font&&m.font.match(/\d+(?:\.\d*)?(?=px)/),ab=m["line-height"]&&(m["line-height"]+p).match(/\d+(?:\.\d*)?(?=px)/);n=Z.style,m.font&&(n.font=m.font),m["font-family"]&&(n.fontFamily=m["font-family"]),m["font-weight"]&&(n.fontWeight=m["font-weight"]),m["font-style"]&&(n.fontStyle=m["font-style"]),_=d(m["font-size"]||_&&_[0])||10,n.fontSize=_*$+"px",ab=d(m["line-height"]||ab&&ab[0])||12,m["line-height"]&&(n.lineHeight=ab*$+"px"),c.is(i.text,"array")&&(i.text=t.textpath.string=i.text.join("\n").replace(//gi,"\n")),t.textpath.string&&(Z.innerHTML=b(t.textpath.string).replace(/"));var bb=Z.getBoundingClientRect();t.W=m.w=(bb.right-bb.left)/$,t.H=m.h=(bb.bottom-bb.top)/$,t.X=m.x,t.Y=m.y;switch(m["vertical-align"]){case"top":t.bby=t.H/2;break;case"bottom":t.bby=-t.H/2;break;default:t.bby=0}("x"in i||"y"in i||void 0!==t.bby)&&(t.path.v=c.format("m{0},{1}l{2},{1}",f(m.x*v),f((m.y+(t.bby||0))*v),f(m.x*v)+1));for(var cb=["x","y","text","font","font-family","font-weight","font-style","font-size","line-height"],db=0,eb=cb.length;eb>db;db++)if(cb[db]in i){t._.dirty=1;break}switch(m["text-anchor"]){case"start":t.textpath.style["v-text-align"]="left",t.bbx=t.W/2;break;case"end":t.textpath.style["v-text-align"]="right",t.bbx=-t.W/2;break;default:t.textpath.style["v-text-align"]="center",t.bbx=0}t.textpath.style["v-text-kern"]=!0}}},G=function(a,e,f){a.attrs=a.attrs||{};var g=(a.attrs,Math.pow),h="linear",j=".5 .5";if(a.attrs.gradient=e,e=b(e).replace(c._radial_gradient,function(a,b){h="radial",b=b&&b.split(",")||[];{var c=(b[0],b[1],b[2],b[3]),e=b[4];b[5]}return c&&e&&(c=d(c),e=d(e),g(c-.5,2)+g(e-.5,2)>.25&&(e=i(.25-g(c-.5,2))*(2*(e>.5)-1)+.5),j=c+o+e),p}),e=e.split(/\s*\-\s*/),"linear"==h){var k=e.shift();if(k=-d(k),isNaN(k))return null}var l=c._parseDots(e);if(!l)return null;if(a=a.shape||a.node,l.length){f.parentNode==a&&a.removeChild(f),f.on=!0,f.method="none",f.color=l[0].color,f.color2=l[l.length-1].color;for(var m=[],n=1,q=void 0===l[0].opacity?1:l[0].opacity,r=0,s=l.length;s>r;r++)l[r].offset&&m.push(l[r].offset+o+l[r].color),void 0!==l[r].opacity&&(n=l[r].opacity);f.colors=m.length?m.join():"0% "+f.color,f.opacity=n,f["o:opacity2"]=q,"radial"==h?(f.type="gradientTitle",f.focus="100%",f.focussize="0 0",f.focusposition=j,f.angle=0):(f.type="gradient",f.angle=(270-k)%360),a.appendChild(f)}return 1},H=function(a,b,d){var e,f=this,g=d||b;g.canvas&&g.canvas.appendChild(a),e=J("skew"),e.on=!0,a.appendChild(e),f.skew=e,f.node=f[0]=a,a.raphael=!0,a.raphaelid=f.id=c._oid++,f.X=0,f.Y=0,f.attrs=f.attrs||{},f.followers=f.followers||[],f.paper=b,f.ca=f.customAttributes=f.customAttributes||new b._CustomAttributes,f.matrix=c.matrix(),f._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},f.parent=g,!g.bottom&&(g.bottom=f),f.prev=g.top,g.top&&(g.top.next=f),g.top=f,f.next=null},I=c.el;H.prototype=I,I.constructor=H,I.transform=function(a){if(null==a)return this._.transform;var d,e=this.paper._viewBoxShift,f=e?"s"+[e.scale,e.scale]+"-1-1t"+[e.dx,e.dy]:p;e&&(d=a=b(a).replace(/\.{3}|\u2026/g,this._.transform||p)),c._extractTransform(this,f+a);var g,h=this.matrix.clone(),i=this.skew,j=this.node,k=~b(this.attrs.fill).indexOf("-"),l=!b(this.attrs.fill).indexOf("url(");if(h.translate(-.5,-.5),l||k||"image"==this.type)if(i.matrix="1 0 0 1",i.offset="0 0",g=h.split(),k&&g.noRotation||!g.isSimple){j.style.filter=h.toFilter();var m=this.getBBox(),n=this.getBBox(1),q=m.x2&&n.x2&&"x2"||"x",r=m.y2&&n.y2&&"y2"||"y",s=m[q]-n[q],t=m[r]-n[r];j.coordorigin=s*-v+o+t*-v,C(this,1,1,s,t,0)}else j.style.filter=p,C(this,g.scalex,g.scaley,g.dx,g.dy,g.rotate);else j.style.filter=p,i.matrix=b(h),i.offset=h.offset();return d&&(this._.transform=d),this},I.rotate=function(a,c,e){if(this.removed)return this;if(null!=a){if(a=b(a).split(l),a.length-1&&(c=d(a[1]),e=d(a[2])),a=d(a[0]),null==e&&(c=e),null==c||null==e){var f=this.getBBox(1);c=f.x+f.width/2,e=f.y+f.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",a,c,e]])),this}},I.translate=function(a,c){return this.removed?this:(a=b(a).split(l),a.length-1&&(c=d(a[1])),a=d(a[0])||0,c=+c||0,this._.bbox&&(this._.bbox.x+=a,this._.bbox.y+=c),this.transform(this._.transform.concat([["t",a,c]])),this)},I.scale=function(a,c,e,f){if(this.removed)return this;if(a=b(a).split(l),a.length-1&&(c=d(a[1]),e=d(a[2]),f=d(a[3]),isNaN(e)&&(e=null),isNaN(f)&&(f=null)),a=d(a[0]),null==c&&(c=a),null==f&&(e=f),null==e||null==f)var g=this.getBBox(1);return e=null==e?g.x+g.width/2:e,f=null==f?g.y+g.height/2:f,this.transform(this._.transform.concat([["s",a,c,e,f]])),this._.dirtyT=1,this},I.hide=function(){var a=this;return!a.removed&&(a.node.style.display="none"),a},I.show=function(){var a=this;return!a.removed&&(a.node.style.display=p),a},I._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y+(this.bby||0)-this.H/2,width:this.W,height:this.H}},I.remove=function(){if(!this.removed&&this.parent.canvas){var a,b=this,d=c._engine.getNode(b),e=b.paper,f=b.shape;for(e.__set__&&e.__set__.exclude(b),m.unbind("raphael.*.*."+b.id),f&&f.parentNode.removeChild(f),d.parentNode&&d.parentNode.removeChild(d);a=b.followers.pop();)a.el.remove();for(;a=b.bottom;)a.remove();if(b._drag&&b.undrag(),b.events)for(;a=b.events.pop();)a.unbind();b.removeData(),delete e._elementsById[b.id],c._tear(b,b.parent);for(var a in b)b[a]="function"==typeof b[a]?c._removedFactory(a):null;b.removed=!0}},I.attr=function(b,d){if(this.removed)return this;if(null==b){var e={};for(var f in this.attrs)this.attrs[a](f)&&(e[f]=this.attrs[f]);return e.gradient&&"none"==e.fill&&(e.fill=e.gradient)&&delete e.gradient,e.transform=this._.transform,e.visibility="none"===this.node.style.display?"hidden":"visible",e}if(null==d&&c.is(b,"string")){if(b==k&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("visibility"==b)return"none"===this.node.style.display?"hidden":"visible";for(var g=b.split(l),h={},i=0,j=g.length;j>i;i++)b=g[i],h[b]=b in this.attrs?this.attrs[b]:c.is(this.ca[b],"function")?this.ca[b].def:c._availableAttrs[b];return j-1?h:h[g[0]]}if(this.attrs&&null==d&&c.is(b,"array")){for(h={},i=0,j=b.length;j>i;i++)h[b[i]]=this.attr(b[i]);return h}var n;null!=d&&(n={},n[b]=d),null==d&&c.is(b,"object")&&(n=b);for(var o in n)m("raphael.attr."+o+"."+this.id,this,n[o],o);if(n){var p={};for(o in this.ca)if(this.ca[o]&&n[a](o)&&c.is(this.ca[o],"function")&&!this.ca["_invoked"+o]){this.ca["_invoked"+o]=!0;var q=this.ca[o].apply(this,[].concat(n[o]));delete this.ca["_invoked"+o];for(var r in q)q[a](r)&&(n[r]=q[r]);this.attrs[o]=n[o],q===!1&&(p[o]=n[o],delete n[o])}"text"in n&&"text"==this.type&&(c.is(n.text,"array")&&(n.text=n.text.join("\n")),this.textpath.string=n.text.replace(//gi,"\n")),F(this,n);var s;for(i=0,j=this.followers.length;j>i;i++)s=this.followers[i],s.cb&&!s.cb.call(s.el,n,this)||s.el.attr(n);for(var r in p)n[r]=p[r]}return this},I.blur=function(a){var b=this.node.runtimeStyle,d=b.filter;return d=d.replace(s,p),0!==+a?(this.attrs.blur=a,b.filter=d+o+n+".Blur(pixelradius="+(+a||1.5)+")",b.margin=c.format("-{0}px 0 0 -{0}px",f(+a||1.5))):(b.filter=d,b.margin=0,delete this.attrs.blur),this },I.on=function(a,b){return this.removed?this:(this.node["on"+a]=function(){var a=c._g.win.event;a.target=a.srcElement,b(a)},this)},c._engine.getNode=function(a){var b=a.node||a[0].node;return b.clipRect||b},c._engine.getLastNode=function(a){var b=a.node||a[a.length-1].node;return b.clipRect||b},c._engine.group=function(a,b,d){var e=c._g.doc.createElement("div"),f=new H(e,a,d);return e.style.cssText=u,f._id=b||p,b&&(e.className="raphael-group-"+f.id+"-"+b),(d||a).canvas.appendChild(e),f.type="group",f.canvas=f.node,f.transform=c._engine.group.transform,f.top=null,f.bottom=null,f},c._engine.group.transform=function(a){if(null==a)return this._.transform;var e,f,g,h,i,j=this,k=j.node.style,l=j.clip,m=j.paper._viewBoxShift,n=m?"s"+[m.scale,m.scale]+"-1-1t"+[m.dx,m.dy]:p;return m&&(e=a=b(a).replace(/\.{3}|\u2026/g,j._.transform||p)),c._extractTransform(j,n+a),f=j.matrix,g=f.offset(),h=d(g[0])||0,i=d(g[1])||0,k.left=h+"px",k.top=i+"px",k.zoom=(j._.tzoom=f.get(0))+p,l&&(k.clip=c.format("rect({1}px {2}px {3}px {0}px)",[l[0]-h,l[1]-i,l[2]-h,l[3]-i])),j},c._engine.path=function(a,b,c){var d=J("shape");d.style.cssText=u,d.coordsize=v+o+v,d.coordorigin=a.coordorigin;var e=new H(d,a,c);return e.type=b.type||"path",e.path=[],e.Path=p,b.type&&delete b.type,F(e,b),E(e,b),e},c._engine.rect=function(a,b,d){var e=c._rectPath(b.x,b.y,b.w,b.h,b.r);b.path=e,b.type="rect";var f=a.path(b,d),g=f.attrs;return f.X=g.x,f.Y=g.y,f.W=g.width,f.H=g.height,g.path=e,f},c._engine.ellipse=function(a,b,c){b.type="ellipse";var d=a.path(b,c),e=d.attrs;return d.X=e.x-e.rx,d.Y=e.y-e.ry,d.W=2*e.rx,d.H=2*e.ry,d},c._engine.circle=function(a,b,c){b.type="circle";var d=a.path(b,c),e=d.attrs;return d.X=e.x-e.r,d.Y=e.y-e.r,d.W=d.H=2*e.r,d},c._engine.image=function(a,b,d){var e=c._rectPath(b.x,b.y,b.w,b.h);b.path=e,b.type="image",b.stroke="none";var f=a.path(b,d),g=f.attrs,h=f.node,i=h.getElementsByTagName(k)[0];return g.src=b.src,f.X=g.x=b.x,f.Y=g.y=b.y,f.W=g.width=b.w,f.H=g.height=b.h,i.parentNode==h&&h.removeChild(i),i.rotate=!0,i.src=g.src,i.type="tile",f._.fillpos=[g.x,g.y],f._.fillsize=[g.w,g.h],h.appendChild(i),C(f,1,1,0,0,0),f},c._engine.text=function(a,d,e){var g=J("shape"),h=J("path"),i=J("textpath");x=d.x||0,y=d.y||0,text=d.text,h.v=c.format("m{0},{1}l{2},{1}",f(d.x*v),f(d.y*v),f(d.x*v)+1),h.textpathok=!0,i.string=b(d.text).replace(//gi,"\n"),i.on=!0,g.style.cssText=u,g.coordsize=v+o+v,g.coordorigin="0 0";var j=new H(g,a,e);return j.shape=g,j.path=h,j.textpath=i,j.type="text",j.attrs.text=b(d.text||p),j.attrs.x=d.x,j.attrs.y=d.y,j.attrs.w=1,j.attrs.h=1,F(j,d),E(j,d),g.appendChild(i),g.appendChild(h),j},c._engine.setSize=function(a,b){var d=this.canvas.style;return this.width=a,this.height=b,a==+a&&(a+="px"),b==+b&&(b+="px"),d.width=a,d.height=b,d.clip="rect(0 "+a+" "+b+" 0)",this._viewBox&&c._engine.setViewBox.apply(this,this._viewBox),this},c._engine.setViewBox=function(a,b,c,d,e){m("raphael.setViewBox",this,this._viewBox,[a,b,c,d,e]);var f,h,i=this.width,j=this.height,k=1/g(c/i,d/j);return e&&(f=j/d,h=i/c,i>c*f&&(a-=(i-c*f)/2/f),j>d*h&&(b-=(j-d*h)/2/h)),this._viewBox=[a,b,c,d,!!e],this._viewBoxShift={dx:-a,dy:-b,scale:k},this.forEach(function(a){a.transform("...")}),this};var J;c._engine.initWin=function(a){var d=a.document;d.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!d.namespaces.rvml&&d.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),J=c._createNode=function(a,c){var e,f=d.createElement("');for(e in c)f[e]=b(c[e]);return f}}catch(e){J=c._createNode=function(a,c){var e,f=d.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">');for(e in c)f[e]=b(c[e]);return f}}},c._engine.initWin(c._g.win),c._engine.create=function(){var a=c._getContainer.apply(0,arguments),b=a.container,d=a.height,e=a.width,f=a.x,g=a.y;if(!b)throw new Error("VML container not found.");var h=new c._Paper,i=h.canvas=c._g.doc.createElement("div"),j=i.style;return f=f||0,g=g||0,e=e||512,d=d||342,h.width=e,h.height=d,e==+e&&(e+="px"),d==+d&&(d+="px"),h.coordsize=1e3*v+o+1e3*v,h.coordorigin="0 0",i.id="raphael-paper-"+h.id,h.span=c._g.doc.createElement("span"),h.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",i.appendChild(h.span),j.cssText=c.format("top:0;left:0;width:{0};height:{1};display:inline-block;cursor:default;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",e,d),1==b?(c._g.doc.body.appendChild(i),j.left=f+"px",j.top=g+"px",j.position="absolute"):b.firstChild?b.insertBefore(i,b.firstChild):b.appendChild(i),h.renderfix=function(){},h},c.prototype.clear=function(){var a;for(m("raphael.clear",this);a=this.bottom;)a.remove();this.canvas.innerHTML=p,this.span=c._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},c.prototype.remove=function(){var a;for(m("raphael.remove",this);a=this.bottom;)a.remove();this.canvas.parentNode.removeChild(this.canvas);for(a in this)this[a]="function"==typeof this[a]?c._removedFactory(a):null;return!0};var K=c.st;for(var L in I)I[a](L)&&!K[a](L)&&(K[L]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(L))}}(),function(){if(c.canvas){var a,b,d,e=c._g.win,f=c._g.doc,g=c._g,h="string",i="px",j=/[, ]+/,k=e.String,l=e.parseInt,m=e.parseFloat,n=e.Math,o=n.max,p=n.min,q=n.PI,r=(n.floor,c.eve),s=c.fn,t=c.el,u=c.st,v=c.clone,w=q/180,x="hasOwnProperty",y=" ",z="ontouchstart"in e||navigator.msMaxTouchPoints>0,A=("click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel".split(y),!1),B=[],C=[],D=function(a){for(var b,c=a.clientX,d=a.clientY,e=g.doc.documentElement.scrollTop||g.doc.body.scrollTop,f=g.doc.documentElement.scrollLeft||g.doc.body.scrollLeft,h=C.length;h--;){if(b=C[h],z){for(var i,j=a.touches.length;j--;)if(i=a.touches[j],i.identifier==b.el._drag.id){c=i.clientX,d=i.clientY,(a.originalEvent?a.originalEvent:a).preventDefault();break}}else a.preventDefault();c+=f,d+=e,r("raphael.drag.move."+b.el.id,b.move_scope||b.el,c-b.el._drag.x,d-b.el._drag.y,c,d,a)}},E=function(a){c.unmousemove(D).unmouseup(E);for(var b,d=C.length;d--;)b=C[d],b.el._drag={},r("raphael.drag.end."+b.el.id,b.end_scope||b.start_scope||b.move_scope||b.el,a);C=[]};if(c.canvas){a=c._createNode=function(b,c){if(c){typeof b===h&&(b=a(b));for(var d in c)c.hasOwnProperty(d)&&b.setAttribute(d,k(c[d]))}else b=f.createElement(b);return b},c._getConnectedNodes=function(){return{above:[],below:[]}},c._getTargetNode=function(a){a[0],a[1]},c._containerEventHandler=function(a){if(a=a||e.event,!A){var b=a.offsetX,d=a.offsetY;a.type,c._getTargetNode([b,d])}},b=function(a){this.type="basic",this.owner=a,this._rElement=null,this.mouseInteractions=!1,this.matrix=null,this.outlinePath=null,this.conf={}},b.prototype={constructor:b,render:function(){var a=this;return a.draw(),a.setBBox(),a},draw:function(){var a,b=this,c=b.context,d=b._rElement,e=d.matrix,f=b.isClipped,g=b.validateAttrs();d.attrs=g,c.save(),c.fillStyle=g.fill,c.strokeStyle=g.stroke,c.lineWidth=g["stroke-width"],(a=g["clip-rect"])&&(a=a.split(" "),c.rect(a[0],a[1],a[2],a[3]),c.clip(),f=b.isClipped=!0),b.applyTransform(e),b.paint(),c.restore()},paint:function(){},redraw:function(){this.COMInstance.redraw(this)},clear:function(){var a=this,b=a.context,c=a._bbox;c&&b.clearRect(c.x,c.y,c.width,c.height)},addMouseInteractivity:function(){var b,c=this,d=c._rElement.attrs,e=c._bbox,f=c.owner.wrapper._map,g="circle"===c.type?"circle":"rect",h="circle"===g?[d.cx,d.cy,d.r].join(","):[e.x,e.y,e.x2,e.y2].join(",");b=a("area",{shape:g,coords:h}),f.firstChild?f.insertBefore(b,f.firstChild):f.appendChild(b),c._mouseArea=b,c.eventListeners={}},updateMapAreaCoords:function(){var a=this,b=a._mouseArea,c=a._bbox;if(b)if(a instanceof K){var d=c.width/2;b.setAttribute("coords",[c.x+d,c.y+d,d].join(","))}else b.setAttribute("coords",[c.x,c.y,c.x2,c.y2].join(","))},applyTransform:function(a){var b,c=this,d=c.context;a&&(b=a.split(),d.translate(b.dx,b.dy),!b.noRotation&&d.rotate(w*b.rotate),d.scale(b.scalex,b.scaley))},setBBox:function(){var a=this,b=a._rElement,d=b.matrix,e=a.owner,f=e.getTransformMatrix&&e.getTransformMatrix();f&&(f=f.clone(),f.add(d),d=f),a.outlinePath?a._bbox=c.pathBBox(c.transformPath(a.outlinePath,d.toTransformString()).toString()):a.setShapeBBox(d),a._mouseArea&&a.updateMapAreaCoords()},getBBox:function(){return this._bbox},drawPath:function(a){var b=this,c=b.context,d=(a&&a.length||0,PathParser);for(d.reset(),d.setTokens(a),null!=c&&c.beginPath();!d.isEnd();)switch(d.nextCommand(),d.command){case"M":case"m":var e=d.getAsCurrentPoint();for(d.addMarker(e),null!=c&&c.moveTo(e.x,e.y),d.start=d.current;!d.isCommandOrEnd();){var e=d.getAsCurrentPoint();d.addMarker(e,d.start),null!=c&&c.lineTo(e.x,e.y)}break;case"L":case"l":for(;!d.isCommandOrEnd();){var f=d.current,e=d.getAsCurrentPoint();d.addMarker(e,f),null!=c&&c.lineTo(e.x,e.y)}break;case"H":case"h":for(;!d.isCommandOrEnd();){var g=new Point((d.isRelativeCommand()?d.current.x:0)+d.getScalar(),d.current.y);d.addMarker(g,d.current),d.current=g,null!=c&&c.lineTo(d.current.x,d.current.y)}break;case"V":case"v":for(;!d.isCommandOrEnd();){var g=new Point(d.current.x,(d.isRelativeCommand()?d.current.y:0)+d.getScalar());d.addMarker(g,d.current),d.current=g,null!=c&&c.lineTo(d.current.x,d.current.y)}break;case"C":case"c":for(;!d.isCommandOrEnd();){var h=d.current,i=d.getPoint(),j=d.getAsControlPoint(),k=d.getAsCurrentPoint();d.addMarker(k,j,i),null!=c&&c.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"S":case"s":for(;!d.isCommandOrEnd();){var h=d.current,i=d.getReflectedControlPoint(),j=d.getAsControlPoint(),k=d.getAsCurrentPoint();d.addMarker(k,j,i),null!=c&&c.bezierCurveTo(i.x,i.y,j.x,j.y,k.x,k.y)}break;case"Q":case"q":for(;!d.isCommandOrEnd();){var h=d.current,j=d.getAsControlPoint(),k=d.getAsCurrentPoint();d.addMarker(k,j,j),null!=c&&c.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"T":case"t":for(;!d.isCommandOrEnd();){var h=d.current,j=d.getReflectedControlPoint();d.control=j;var k=d.getAsCurrentPoint();d.addMarker(k,j,j),null!=c&&c.quadraticCurveTo(j.x,j.y,k.x,k.y)}break;case"A":case"a":for(;!d.isCommandOrEnd();){var h=d.current,l=d.getScalar(),m=d.getScalar(),n=d.getScalar()*(Math.PI/180),o=d.getScalar(),p=d.getScalar(),k=d.getAsCurrentPoint(),q=new Point(Math.cos(n)*(h.x-k.x)/2+Math.sin(n)*(h.y-k.y)/2,-Math.sin(n)*(h.x-k.x)/2+Math.cos(n)*(h.y-k.y)/2),r=Math.pow(q.x,2)/Math.pow(l,2)+Math.pow(q.y,2)/Math.pow(m,2);r>1&&(l*=Math.sqrt(r),m*=Math.sqrt(r));var s=(o==p?-1:1)*Math.sqrt((Math.pow(l,2)*Math.pow(m,2)-Math.pow(l,2)*Math.pow(q.y,2)-Math.pow(m,2)*Math.pow(q.x,2))/(Math.pow(l,2)*Math.pow(q.y,2)+Math.pow(m,2)*Math.pow(q.x,2)));isNaN(s)&&(s=0);var t=new Point(s*l*q.y/m,s*-m*q.x/l),u=new Point((h.x+k.x)/2+Math.cos(n)*t.x-Math.sin(n)*t.y,(h.y+k.y)/2+Math.sin(n)*t.x+Math.cos(n)*t.y),v=function(a){return Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2))},w=function(a,b){return(a[0]*b[0]+a[1]*b[1])/(v(a)*v(b))},x=function(a,b){return(a[0]*b[1]=1&&(B=0);var C=1-p?1:-1,D=y+C*(B/2),E=new Point(u.x+l*Math.cos(D),u.y+m*Math.sin(D));if(d.addMarkerAngle(E,D-C*Math.PI/2),d.addMarkerAngle(k,D-C*Math.PI),null!=c){var w=l>m?l:m,F=l>m?1:l/m,G=l>m?m/l:1;c.translate(u.x,u.y),c.rotate(n),c.scale(F,G),c.arc(0,0,w,y,y+B,1-p),c.scale(1/F,1/G),c.rotate(-n),c.translate(-u.x,-u.y)}}break;case"Z":case"z":null!=c&&c.closePath(),d.current=d.start}return b.outlinePath=a,b},addEventListener:function(){var a,b,d=this,e=arguments,f=e&&e[0],g=e&&e[1];if(d._mouseArea||d.addMouseInteractivity(),a=d._mouseArea,"string"==typeof f&&"function"==typeof g)if(d._path)if("mouseover"===f||"mouseout"===f||"mousemove"===f){if(!d._mousemoveAdded){var h=function(a){var b=!1,d=!0,e=!1;return function(f){var g=f.layerX,h=f.layerY;e=!1,c.isPointInsidePath(a._transformPath,g,h)?(b=!0,d&&(d=!1,e=!0)):(d=!0,b&&(b=!1,e=!0)),d&&e&&a.eventListeners.mouseout&&a.eventListeners.mouseout.apply(this,arguments),b&&(e&&a.eventListeners.mouseover&&a.eventListeners.mouseover.apply(this,arguments),a.eventListeners.mousemove&&a.eventListeners.mousemove.apply(this,arguments))}}(d);a.addEventListener("mousemove",h,!1),d._mousemoveAdded=!0}d.eventListeners[f]=g}else{var b=function(a,b){return function(d){c.isPointInsidePath(a._path,d.layerX,d.layerY)&&b.apply(this,arguments)}}(d,g);a.addEventListener(f,b,!1)}else a.addEventListener(f,g,!1)},removeEventListener:function(){var a,b=this,c=arguments,d=c&&c[0],e=c&&c[1];b._mouseArea&&(a=b._mouseArea,"string"==typeof d&&"function"==typeof e&&a.removeEventListener(d,e))},attachEvent:function(){},detachEvent:function(){},validateAttrs:function(a){var b,c,d=this,e=v(d._rElement.attrs);if(null===a){if(d._isValid)return e;d._isValid=!0}a=a||e;for(b in a)switch(c=a[b],b){default:continue}return a},attrs:function(){}};var F=function(a){this.node=a,this.next=null,this.prev=null},G=function(){this.top=null,this.bottom=null};G.prototype={constructor:G,add:function(a){a=new F(a),this.bottom||(this.bottom=a),this.top&&(this.top.next=a),a.next=null,a.prev=this.top,this.top=a},addList:function(a){this.bottom||(this.bottom=a.bottom),this.top&&(this.top.next=a.bottom,a.bottom.prev=this.top),this.top=a.top},toFront:function(a){return this.top===a?!1:(this.bottom===a&&(this.bottom=a.next),a.prev&&(a.prev.next=a.next),a.next&&(a.next.prev=a.prev),this.top.next=a,a.prev=this.top,a.next=null,void(this.top=a))},toBack:function(a){return this.bottom===a?!1:(this.top===a&&(this.top=a.prev),a.prev&&(a.prev.next=a.next),a.next&&(a.next.prev=a.prev),this.bottom.prev=a,a.prev=null,a.next=this.bottom,void(this.bottom=a))},insertBefore:function(){},insertAfter:function(){},each:function(a,b){for(var c=this.bottom;c;)a.apply(c.node,b),c=c.next},iterate:function(a,b){for(var c=this.bottom,d=!0;c&&(d=a.apply(c.node,b),d!==!1);)c=c.next},dispose:function(){this.each(function(){this.node.dispose&&this.node.dispose()}),this.top=null,this.bottom=null}};var H=function(a,b){this.items=new G,this.owner=a,this.element=null,b?this.element=b:this.init()};H.prototype={constructor:H,appendChild:function(){var a=this,b=a.owner.wrapper,c=this.element;b._image?b.insertBefore(c,b._image):b.appendChild(c)},insertBefore:function(){},insertAfter:function(){},init:function(){this.element=a("canvas"),a(this.element,{width:this.owner.wrapper.offsetWidth,height:this.owner.wrapper.offsetHeight}),this.element.style.cssText="position:absolute;left:0;top:0;",this.appendChild()},getCanvas:function(){return this.element},getContext:function(){return this.element.getContext("2d")},addToLayer:function(a){this.items.add(a)},mergeWithLayerOnTop:function(a){this.items.addList(a.items),a.dispose(!0)},mergeWithLayerOnBottom:function(a){a.items.addList(this.items),this.items=a.items,a.dispose(!0)},dispose:function(a){a||this.items.each(function(){this.dispose()}),this.items=null,this.owner=null,this.element.parentNode.removeChild(this.element),this.element=null}};var I=function(a,b,c){this.nodeItems=new G,this.collectionItems=new G,this.layerItems=new G,this.owner=this.parent=a,this.layerOnTop=null,this.currentLayer=null,this.baseLayer=null,b?(this.wrapper=b,this.currentLayer=this.baseLayer=new H(this,c)):this.init()};I.prototype={constructor:I,init:function(){var b=this,c=b.parent,d=c.wrapper._image,e=a("div");e.style.cssText="width:100%;height:100%;position:absolute;left:0;top:0;",e._map=c.wrapper._map,d?c.wrapper.insertBefore(e,d):c.wrapper.appendChild(e),b.wrapper=e,b.currentLayer=b.baseLayer=new H(b)},getCurrentContext:function(){return this.currentLayer.getContext()},setLayerOnTop:function(a){this.layerOnTop=a},getCurrentCanvas:function(){return this.currentLayer.getCanvas()},addNode:function(a){this.nodeItems.add(a),"group"===a.type?this.addCollection(a):this.currentLayer.addToLayer(a)},addCollection:function(a){a=a||new I(this),this.collectionItems.add(a),this.currentLayer=new H(this),this.layerItems.add(this.currentLayer),a.setLayerOnTop(this.currentLayer)},dispose:function(){this.nodeItems.dispose(),this.collectionItems.dispose(),this.layerItems.dispose(),this.owner=this.parent=null,this.ownerLayer=null,this.currentLayer=null,this.baseLayer=null}};var J=function(a,c,d,e){var f=this,g=new I(null,c,a);f.width=d,f.height=e,f.createNode=function(a,c){c=c||g;var d,e=c.nodeItems,f=c.currentLayer,h=f.getCanvas();switch(a){case"rect":d=new RectFauxNode(c);break;case"circle":d=new K(c);break;case"path":d=new L(c);break;case"text":d=new M(c);break;case"group":d=new N(c),c.addCollection(d);break;default:d=new b(h)}return d.COMInstance=this,e.add(d),f.addToLayer(d),d},f.redraw=function(a){var b,c,d;if("group"===a.type)b=a.nodeItems,a.render();else for(d=a.layer,b=d.items,c=b.bottom,d.element.width=d.element.width;c;)fNode=c.node,"group"!==fNode.type&&fNode.render(),c=c.next},f.insertBefore=function(){},f.insertAfter=function(){},f.removeNode=function(){},f.refreshNode=function(){},f.refreshAll=function(){}};Point=function(a,b){this.x=a,this.y=b},Point.prototype.angleTo=function(a){return Math.atan2(a.y-this.y,a.x-this.x)},Point.prototype.applyTransform=function(a){var b=this.x*a[0]+this.y*a[2]+a[4],c=this.x*a[1]+this.y*a[3]+a[5];this.x=b,this.y=c},PathParser=new function(){this.tokens=null,this.setTokens=function(a){this.tokens="string"==typeof a?a.split(" "):a},this.reset=function(){this.i=-1,this.command="",this.previousCommand="",this.start=new Point(0,0),this.control=new Point(0,0),this.current=new Point(0,0),this.points=[],this.angles=[]},this.isEnd=function(){return this.i>=this.tokens.length-1},this.isCommandOrEnd=function(){return this.isEnd()?!0:null!=this.tokens[this.i+1].toString().match(/^[A-Za-z]$/)},this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0}return!1},this.getToken=function(){return this.i++,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var a=new Point(this.getScalar(),this.getScalar());return this.makeAbsolute(a)},this.getAsControlPoint=function(){var a=this.getPoint();return this.control=a,a},this.getAsCurrentPoint=function(){var a=this.getPoint();return this.current=a,a},this.getReflectedControlPoint=function(){if("c"!=this.previousCommand.toLowerCase()&&"s"!=this.previousCommand.toLowerCase()&&"q"!=this.previousCommand.toLowerCase()&&"t"!=this.previousCommand.toLowerCase())return this.current;var a=new Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y);return a},this.makeAbsolute=function(a){return this.isRelativeCommand()&&(a.x+=this.current.x,a.y+=this.current.y),a},this.addMarker=function(a,b,c){null!=c&&this.angles.length>0&&null==this.angles[this.angles.length-1]&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(c)),this.addMarkerAngle(a,null==b?null:b.angleTo(a))},this.addMarkerAngle=function(a,b){this.points.push(a),this.angles.push(b)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var a=0;ah&&(a.r=h),0>c&&(a.r=0);break;case"width":case"height":0>c&&(a[b]=0);break;default:continue}return a},setShapeBBox:function(a){var b=this,c=b._rElement,d=c.attrs,e=a.get(0),f=a.get(3),g=a.get(4),h=a.get(5),i=d["stroke-width"];b._bbox={x:d.x*e+g-i,y:d.y*f+h-i,width:d.width*e+2*i,height:d.height*f+2*i},b._bbox.x2=b._bbox.x+b._bbox.width,b._bbox.y2=b._bbox.y+b._bbox.height,b.X=b._bbox.x,b.Y=b._bbox.y,b.W=b._bbox.width,b.H=b._bbox.height}});var K=function(a){this.type="circle",this._isValid=!1,this.parent=this.owner=a,this.context=a.getCurrentContext(),this.layer=a.currentLayer},L=function(a){this.type="path",this._isValid=!1,this.parent=this.owner=a,this.context=a.getCurrentContext(),this.layer=a.currentLayer},M=function(a){this.type="text",this._isValid=!1,this.parent=this.owner=a,this.context=a.getCurrentContext(),this.layer=a.currentLayer},N=function(a){this.type="group",this.nodeItems=new G,this.collectionItems=new G,this.layerItems=new G,this.owner=this.parent=a,this.layerOnTop=a.currentLayer,this.currentLayer=null,this.baseLayer=null,this.init()};K.prototype=c.extend(new b,{constructor:K,paint:function(){var a=this,b=a.context,c=a.validateAttrs(),d=c.cx,e=c.cy,f=c.r,g=f||c.rx,h=f||c.ry;if(c.r){if(a.drawPath(["M",d+f,e,"A",g,h,0,1,0,d-f,e,"A",g,h,0,1,0,d+f,e,"Z"]),c["stroke-width"]){var i=void 0===c["stroke-opacity"]?c.opacity:c["stroke-opacity"];void 0!==i&&(b.globalAlpha=i),b.stroke()}var j=void 0===c["fill-opacity"]?c.opacity:c["fill-opacity"];void 0!==j&&(b.globalAlpha=j),b.fill()}},setShapeBBox:function(a){var b=this,c=b._rElement,d=c.attrs,e=a.get(0),f=a.get(3),g=a.get(4),h=a.get(5),i=d["stroke-width"];b._bbox={x:g+(d.cx-d.r)*e-i,y:h+(d.cy-d.r)*f-i,width:2*(i+d.r*e),height:2*(d.r*f+i)},b._bbox.x2=b._bbox.x+b._bbox.width,b._bbox.y2=b._bbox.y+b._bbox.height,b.X=b._bbox.x,b.Y=b._bbox.y,b.W=b._bbox.width,b.H=b._bbox.height}}),L.prototype=c.extend(new b,{constructor:L,paint:function(){var a=this,b=a._rElement,d=b.attrs,e=b.attr("path"),f=b.matrix,g=a.context;a.drawPath(e),a._transformPath=c.transformPath(e,f.toTransformString());var h=void 0===d["stroke-opacity"]?d.opacity:d["stroke-opacity"];void 0!==h&&(g.globalAlpha=h),g.stroke();var i=void 0===d["fill-opacity"]?d.opacity:d["fill-opacity"];void 0!==i&&(g.globalAlpha=i),g.fill()}}),M.prototype=c.extend(new b,{constructor:M,paint:function(){var a=this,b=a._rElement,c=b.attr(),d=c.text,e=c.stroke,f=c["vertical-align"],g=c["text-anchor"],h=c.x,i=c.y,j=(b.matrix,a.context),m=c["font-size"]||10,n=c["line-height"]||1.2*l(m,10),q=["normal",m,c.font];if(j.fillStyle=e,j.font=q.join(" "),d){var r,s,t,u,v=k(d).split(/\n|/gi),w=v.length*n,x=-1/0,y=1/0;r="top"===f?i+n:"middle"===f?i-w/2+n/2:i-w+n;for(var z=0,A=v.length;A>z;z+=1)d=v[z],u=r+n*z,s=j.measureText(d).width,t="start"===g?h:"middle"===g?h-s/2:h-s,x=o(x,s),y=p(y,t),j.fillText(d,t,u);b._textdirty=!1}a.outlinePath=["M",y,r-n/1.4,"H",y+x,"V",r-n+w,"H",y,"V",r-n/1.4]}}),N.prototype=c.extend(c.extend(new b,I.prototype),{constructor:N,draw:function(){this.layerItems.each(function(){this.element.width=this.element.width}),b.prototype.draw.apply(this,arguments)},render:function(){var a=this;return a.draw(),a.setBBox(),a},paint:function(){var a=this,b=a.nodeList,c=a._rElement,d=(a.canvas,c.attrs),e=b.bottom;for(void 0!==d.opacity&&this.layerItems.each(function(){this.getContext().globalAlpha=d.opacity});e;)e.render(),e=e.next},setBBox:function(){},addMouseInteractivity:function(){},applyTransform:function(a){var c=this,d=c.parent,e=d.getTransformMatrix&&d.getTransformMatrix();e?(c.matrixApplied=e.clone(),c.matrixApplied.add(a.a,a.b,a.c,a.d,a.e,a.f)):c.matrixApplied=a,this.layerItems.each(function(){b.prototype.applyTransform.apply(this,[c.matrixApplied])})},getTransformMatrix:function(){return this.matrixApplied}}),d=function(a,b,d){var e=this,f=d||b;e.node=e[0]=a,a.raphael=!0,a.raphaelid=e.id=c._oid++,a._rElement=e,e.X=0,e.Y=0,e.attrs=e.attrs||{},e.styles=e.styles||{},e.followers=e.followers||[],e.paper=b,e.com=f.com,e.ca=e.customAttributes=e.customAttributes||new b._CustomAttributes,e.matrix=c.matrix(),e._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0},e.parent=f,!f.bottom&&(f.bottom=e),e.prev=f.top||null,f.top&&(f.top.next=e),f.top=e,e.next=null},d.prototype=t,t.constructor=d;var O=function(a,b){{var d,e=S(a),f=c._getConnectedNodes(e),g=a.attrs;f.above,f.below}for(d in b)g[d]=b[d];e.redraw()},P=function(a,b){var d,e,f=(a.attrs,a.node),g={},h=!1,i=!1,j=!1;for(d in b)if(b[x](d)){if(!c._availableAttrs[x](d))continue;switch(e=b[d],d){case"fill-opacity":case"opacity":case"stroke-opcaity":case"stroke":case"fill":g[d]=e,h=!0;break;case"stroke-width":case"cx":case"cy":case"x":case"y":g[d]=e,i=!0;break;case"width":case"height":g[d]=e,j=!0;break;case"clip-rect":g[d]=e,h=!0;break;case"font-size":case"font":case"vertical-align":case"text-anchor":g[d]=e,h=!0;default:continue}}R(a,b,g),g=f.validateAttrs(g),(h||i||j)&&O(a,g,i,j)},Q=1.2,R=function(a,b,c){if("text"==a.type&&(b[x]("text")||b[x]("font")||b[x]("font-size")||b[x]("x")||b[x]("y")||b[x]("line-height")||b[x]("vertical-align"))){var d=a.attr(),e=b["font-size"]||d["font-size"]||10,f=m(b["line-height"]||d["line-height"])||l(e,10)*Q,g=b["vertical-align"]||d["vertical-align"]||"middle";isNaN(f)&&(f=e*Q),c["font-size"]=l(e,10)+"px",c.font=b.font||d.font||"Verdana",c["vertical-align"]=g,c.x=b.x||d.x||0,c.y=b.y||d.y||0,c["line-height"]=l(f,10),c["text-anchor"]=b["text-anchor"]||d["text-anchor"]||"middle"}};c._engine.initWin=function(a){a=a,f=a.document},c._engine.setSize=function(a,b){var c=this,d=c.canvas.style;return d.width=(c.width=+a||c.width)+i,d.height=(c.height=+b||c.height)+i,c},c._engine.create=function(){var b,d,e,g,h,i,j=c._getContainer.apply(0,arguments)||{},k=j.container,l=j.x,m=j.y,n=j.width,o=j.height;if(!k)throw new Error("Canvas container not found.");return h=new c._Paper,h.canvas=b=a("div"),l=l||0,m=m||0,h.width=n=n||512,h.height=o=o||342,h.left=h.top=0,1==k?(b.style.cssText=d+c.format(";width:100%;height:100%;position:absolute;left:{0}px;top:{1}px;",[l,m]),f.body.appendChild(b)):(b.style.cssText=d+";width:100%;height:100%;position:absolute",k.firstChild?k.insertBefore(b,k.firstChild):k.appendChild(b)),d="overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-user-select:none;-moz-user-select:-moz-none;-khtml-user-select:none;-ms-user-select:none;user-select:none;-o-user-select:none;cursor:default;"+c.format("width:{0}px;height:{1}px;",[n,o]),i=a("canvas"),i.style.cssText="position:absolute;left:0;top:0",i.setAttribute("width",h.width),i.setAttribute("height",h.height),h.com=new J(i,b,h.width,h.height),b.appendChild(i),e=a("img"),e.src="image1.png",e.style.cssText="opacity: 0;z-index: 100;background: transparent;position: absolute;left: 0;top: 0;width: "+n+"px;height: "+o+"px",b.appendChild(e),g=a("map"),g.setAttribute("name","mousemap"),g.setAttribute("id","mousemap"),b.appendChild(g),e.setAttribute("usemap","#mousemap"),b._image=e,b._map=g,h};var S=c._engine.getNode=function(a){return a.node||a[0].node};c._engine.getLastNode=function(a){return a.node||a[a.length-1].node},c._engine.rect=function(a,b,c,e,f,g,h){var i=a.com.createNode("rect",h&&h.node),j=new d(i,a,h),k=j.attrs;return k.x=b,k.y=c,k.width=e,k.height=f,k.fill="#fff",k.stroke="#000",k["stroke-width"]=1,k.r=g||0,k.rx=g||0,k.ry=g||0,j.type="rect",i.render(),j},c._engine.circle=function(a,b,c,e,f){var g=a.com.createNode("circle",f&&f.node),h=new d(g,a,f),i=h.attrs;return i.cx=b,i.cy=c,i.r=e,i.fill="none",i.stroke="#000",i["stroke-width"]=1,h.type="circle",g.render(),h},c._engine.ellipse=function(a,c,e,f,g,h){var i=new b,j=new d(i,a,h);return j.type="ellipse",j},c._engine.image=function(a,c,e,f,g,h,i){var j=new b,k=new d(j,a,i);return k.type="image",k},c._engine.text=function(a,b,c,e,f){var g=a.com.createNode("text",f&&f.node),h=new d(g,a,f),i=h.attrs;return i.x=b,i.y=c,i.text=e,i.fill="none",i.stroke="#000",i.font="Verdana",i["font-size"]="12px",i["vertical-align"]="middle",i["text-anchor"]="middle",h.type="text",g.render(),h},c._engine.path=function(a,b,c){var e=b.com.createNode("path",c&&c.node),f=new d(e,b,c),g=f.attrs;return g.path=a,g.fill="#fff",g.stroke="#000",g["stroke-width"]=1,f.type="path",e.render(),f},c._engine.group=function(a,b,c){var e=a.com.createNode("group",c&&c.node),f=new d(e,a,c),g=e.wrapper;return b&&g.setAttribute("class",["red",b].join("-")),f.canvas=g,f.type="group",f},t._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y+(this.bby||0)-this.H/2,width:this.W,height:this.H}},t.toFront=function(){if(this.removed)return this;var a,b,d,e=this,f=e.node,g=e.parent,h=f.owner,i=e.followers;for(c._tofront(e,g)&&("group"===t.type?g.canvas.appendChild(f):h.nodeList.tofront(f)),b=0,d=i.length;d>b;b++)(a=i[b]).stalk&&a.el[a.stalk](e);return e},t.toBack=function(){if(this.removed)return this;var a,b,d,e=this,f=e.node,g=e.parent,h=f.owner,i=e.followers;for(c._toback(e,g)&&("group"===t.type?g.canvas.appendChild(f):h.nodeList.toback(f)),b=0,d=i.length;d>b;b++)(a=i[b]).stalk&&a.el[a.stalk](e);return e},t.insertAfter=function(a){if(this.removed)return this;var b,d,e,f=this,g=f.node,h=a.node,i=h.owner,j=f.followers;for(h.next?i.nodeList.insertBefore(g,h.next):i.appendChild(g),c._insertafter(f,a,f.parent,a.parent),d=0,e=j.length;e>d;d++)(b=j[d]).stalk&&b.el[b.stalk](a);return f},t.insertBefore=function(a){if(this.removed)return this;var b,d,e,f=this,g=f.node,h=a.node,i=h.owner,j=f.followers;for(h?i.nodeList.insertBefore(g,h):i.appendChild(g),c._insertafter(f,a,f.parent,a.parent),d=0,e=j.length;e>d;d++)(b=j[d]).stalk&&b.el[b.stalk](a);return f},t.appendChild=function(){return this},t.removeChild=function(){return this},t.attr=function(a,b){if(this.removed)return this;var d,e,f,g,h,i,k,l,m,n,o,p=this,q=p.attrs,s=p.ca;if(null==a){g={};for(h in q)q.hasOwnProperty(h)&&(g[h]=q[h]);return g.gradient&&"none"==g.fill&&(g.fill=g.gradient)&&delete g.gradient,g.transform=p._.transform,g}if(null==b&&c.is(a,"string")){if("fill"==a&&"none"==q.fill&&q.gradient)return q.gradient;if("transform"==a)return p._.transform;for(d=a.split(j),i={},o=0,n=d.length;n>o;o++)a=d[o],i[a]=a in q?q[a]:c.is(s[a],"function")?s[a].def:c._availableAttrs[a];return n-1?i:i[d[0]]}if(null==b&&c.is(a,"array")){for(i={},o=0,n=a.length;n>o;o++)i[a[o]]=p.attr(a[o]);return i}null!=b?(e={},e[a]=b):null!=a&&c.is(a,"object")&&(e=a);for(h in e)r("raphael.attr."+h+"."+p.id,p,e[h],h);l={};for(h in s)if(s[h]&&e.hasOwnProperty(h)&&c.is(s[h],"function")&&!s["_invoked"+h]){s["_invoked"+h]=!0,f=s[h].apply(p,[].concat(e[h])),delete s["_invoked"+h];for(k in f)f.hasOwnProperty(k)&&(e[k]=f[k]);q[h]=e[h],f===!1&&(l[h]=e[h],delete e[h])}for(P(this,e),o=0,n=p.followers.length;n>o;o++)m=p.followers[o],m.cb&&!m.cb.call(m.el,e,p)||m.el.attr(e);for(k in l)e[k]=l[k];return this},t.drag=function(a,b,d,e,f,h){function i(i){(i.originalEvent||i).preventDefault();var j=g.doc.documentElement.scrollTop||g.doc.body.scrollTop,k=g.doc.documentElement.scrollLeft||g.doc.body.scrollLeft;this._drag.x=i.clientX+k,this._drag.y=i.clientY+j,this._drag.id=i.identifier,!C.length&&c.mousemove(D).mouseup(E),C.push({el:this,move_scope:e,start_scope:f,end_scope:h}),b&&r.on("raphael.drag.start."+this.id,b),a&&r.on("raphael.drag.move."+this.id,a),d&&r.on("raphael.drag.end."+this.id,d),r("raphael.drag.start."+this.id,f||e||this,i.clientX+k,i.clientY+j,i)}return this._drag={},B.push({el:this,start:i}),this.mousedown(i),this -},t.undrag=function(){for(var a=B.length;a--;)B[a].el==this&&(this.unmousedown(B[a].start),B.splice(a,1),r.unbind("raphael.drag.*."+this.id));!B.length&&c.unmousemove(D).unmouseup(E)},t.rotate=function(a,b,c){var d,e=this;return e.removed?e:(a=k(a).split(j),a.length-1&&(b=m(a[1]),c=m(a[2])),a=m(a[0]),null==c&&(b=c),(null==b||null==c)&&(d=e.getBBox(1),b=d.x+d.width/2,c=d.y+d.height/2),e.transform(e._.transform.concat([["r",a,b,c]])),e)},t.scale=function(a,b,c,d){var e,f=this;return f.removed?f:(a=k(a).split(j),a.length-1&&(b=m(a[1]),c=m(a[2]),d=m(a[3])),a=m(a[0]),null==b&&(b=a),null==d&&(c=d),(null==c||null==d)&&(e=f.getBBox(1)),c=null==c?e.x+e.width/2:c,d=null==d?e.y+e.height/2:d,f.transform(f._.transform.concat([["s",a,b,c,d]])),f)},t.translate=function(a,b){var c=this;return c.removed?c:(a=k(a).split(j),a.length-1&&(b=m(a[1])),a=m(a[0])||0,b=+b||0,c.transform(c._.transform.concat([["t",a,b]])),c)},t.transform=function(a){var b,d=this,e=d._;return null===a?e.transform:(c._extractTransform(d,a),(1!=e.sx||1!=e.sy)&&(b=d.attrs[x]("stroke-width")?d.attrs["stroke-width"]:1,d.attr({"stroke-width":b})),d.node&&d.node.redraw(),d)},t.hide=function(){return this},t.show=function(){return this},t.blur=function(){return this},t.on=function(a,b){var c=this,d=c.listeners;d||(d=c.listeners={}),d[a]||(d[a]=[]),d[a].push(b)},t.remove=function(){return this},s.clear=function(){return r("raphael.clear",this),this},s.remove=function(){if(!this.removed){var a,b=this,d=b.canvas,e=d.parentNode;r("raphael.remove",b),e.removeChild(d);for(a in b)b[a]="function"==typeof b[a]?c._removedFactory(a):null;this.removed=!0}},c.toString=function(){return"Your browser supports canvas.\nYou are running RedRaphael "+c.version};for(var T in t)t.hasOwnProperty(T)&&!u.hasOwnProperty(T)&&(u[T]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(T))}}}(),P.was?O.win.Raphael=c:Raphael=c,c}); \ No newline at end of file +},t.undrag=function(){for(var a=B.length;a--;)B[a].el==this&&(this.unmousedown(B[a].start),B.splice(a,1),r.unbind("raphael.drag.*."+this.id));!B.length&&c.unmousemove(D).unmouseup(E)},t.rotate=function(a,b,c){var d,e=this;return e.removed?e:(a=k(a).split(j),a.length-1&&(b=m(a[1]),c=m(a[2])),a=m(a[0]),null==c&&(b=c),(null==b||null==c)&&(d=e.getBBox(1),b=d.x+d.width/2,c=d.y+d.height/2),e.transform(e._.transform.concat([["r",a,b,c]])),e)},t.scale=function(a,b,c,d){var e,f=this;return f.removed?f:(a=k(a).split(j),a.length-1&&(b=m(a[1]),c=m(a[2]),d=m(a[3])),a=m(a[0]),null==b&&(b=a),null==d&&(c=d),(null==c||null==d)&&(e=f.getBBox(1)),c=null==c?e.x+e.width/2:c,d=null==d?e.y+e.height/2:d,f.transform(f._.transform.concat([["s",a,b,c,d]])),f)},t.translate=function(a,b){var c=this;return c.removed?c:(a=k(a).split(j),a.length-1&&(b=m(a[1])),a=m(a[0])||0,b=+b||0,c.transform(c._.transform.concat([["t",a,b]])),c)},t.transform=function(a){var b,d=this,e=d._;return null===a?e.transform:(c._extractTransform(d,a),(1!=e.sx||1!=e.sy)&&(b=d.attrs[x]("stroke-width")?d.attrs["stroke-width"]:1,d.attr({"stroke-width":b})),d.node&&d.node.redraw(),d)},t.hide=function(){return this},t.show=function(){return this},t.blur=function(){return this},t.on=function(a,b){var c=this,d=c.listeners;d||(d=c.listeners={}),d[a]||(d[a]=[]),d[a].push(b)},t.remove=function(){return this},s.clear=function(){return r("raphael.clear",this),this},s.remove=function(){if(!this.removed){var a,b=this,d=b.canvas,e=d.parentNode;r("raphael.remove",b),e.removeChild(d);for(a in b)b[a]="function"==typeof b[a]?c._removedFactory(a):null;this.removed=!0}},c.toString=function(){return"Your browser supports canvas.\nYou are running RedRaphael "+c.version};for(var T in t)t.hasOwnProperty(T)&&!u.hasOwnProperty(T)&&(u[T]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(T))}}}(),Q.was?P.win.Raphael=c:Raphael=c,c}); \ No newline at end of file diff --git a/package/raphael.js b/package/raphael.js index 358699b..8e92103 100644 --- a/package/raphael.js +++ b/package/raphael.js @@ -1,5 +1,5 @@ /**! - * RedRaphael 1.1.10 - JavaScript Vector Library + * RedRaphael 1.1.11 - JavaScript Vector Library * Copyright (c) 2012-2013 FusionCharts Technologies * * Raphael 2.1.0 @@ -514,6 +514,10 @@ objectToStr = "[object Object]", arraySlice = Array.prototype.slice, arraySplice = Array.prototype.splice, + hasPrototypeBug = (function () { + var a = function () {}; + return a.hasOwnProperty("prototype"); + }()), g = { doc: document, win: window @@ -1060,26 +1064,7 @@ (type == "array" && Array.isArray && Array.isArray(o)) || objectToString.call(o).slice(8, -1).toLowerCase() == type; }, - /*\ - * Raphael.clone - [ method ] - ** - * Returns a recursively cloned version of an object. - \*/ - clone = R.clone = function (obj) { - if (Object(obj) !== obj) { - return obj; - } - var res = new obj.constructor; - for (var key in obj) - if (obj[has](key)) { - res[key] = clone(obj[key]); - } - return res; - }, - - /*\ * Raphael.createUUID [ method ] ** @@ -1093,7 +1078,34 @@ var r = math.random() * 16 | 0, v = c == "x" ? r : (r & 3 | 8); return v.toString(16); - }); + }), + /*\ + * Raphael.clone + [ method ] + ** + * Returns a recursively cloned version of an object. + \*/ + clone = R.clone = hasPrototypeBug ? function (obj) { + if (Object(obj) !== obj) { + return obj; + } + var res = new obj.constructor; + for (var key in obj) + if (key !== "prototype" && obj[has](key)) { + res[key] = clone(obj[key]); + } + return res; + } : function (obj) { + if (Object(obj) !== obj) { + return obj; + } + var res = new obj.constructor; + for (var key in obj) + if (obj[has](key)) { + res[key] = clone(obj[key]); + } + return res; + }; R._g = g;