Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
殷洪(管理员)
/
raphael
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Registry
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6b5bc48c
authored
Dec 18, 2008
by
Dmitry Baranovskiy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code styling changes
parent
3e2a2449
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
raphael-packed.js
+1
-1
raphael.js
+2
-2
No files found.
raphael-packed.js
View file @
6b5bc48c
...
...
@@ -4,4 +4,4 @@
* Copyright (c) 2008 Dmitry Baranovskiy (raphaeljs.com)
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
*/
eval
(
function
(
p
,
a
,
c
,
k
,
e
,
r
){
e
=
function
(
c
){
return
(
c
<
a
?
''
:
e
(
parseInt
(
c
/
a
)))
+
((
c
=
c
%
a
)
>
35
?
String
.
fromCharCode
(
c
+
29
):
c
.
toString
(
36
))};
if
(
!
''
.
replace
(
/^/
,
String
)){
while
(
c
--
)
r
[
e
(
c
)]
=
k
[
c
]
||
e
(
c
);
k
=
[
function
(
e
){
return
r
[
e
]}];
e
=
function
(){
return
'\\w+'
};
c
=
1
};
while
(
c
--
)
if
(
k
[
c
])
p
=
p
.
replace
(
new
RegExp
(
'\\b'
+
e
(
c
)
+
'\\b'
,
'g'
),
k
[
c
]);
return
p
}(
'9 1L=(I(q){9 r=I(){J r.3k.2v(r,N)};r.4F="0.5.4G";r.19=q;9 C={};I 2g(a,b,c,d,e,f){7.m=[[a||1,b||0,0],[c||0,d||1,0],[e||0,f||0,1],]}C.1e=C.1g=C.1w=C.1y=I(x){J x};K(q=="2K"){2g.1p.2w=I(){J"4H:4I.4J.2g(4K="+7.m[0][0]+", 4L="+7.m[1][0]+", 4M="+7.m[0][1]+", 4N="+7.m[1][1]+", 4O="+7.m[2][0]+", 4P="+7.m[2][1]+", 4Q=\'4R 4S\', 4T=\'4U\')"};9 t=I(j,l,m){9 g=17.1u("1m:1N"),2x=g.1h;2x.2h="2i";2x.1H=0;2x.1z=0;2x.11=m.11+"1A";2x.14=m.14+"1A";9 n=17.1u("1m:2j"),2y=n.1h;2y.11=m.11+"1A";2y.14=m.14+"1A";n.1a="";K(j["3F"]){n.4V=j["3F"]}n.2L=7.2L;n.2M=7.2M;g.1b(n);m.18.1b(g);9 p=1n z(n,g,m);u(p,j);K(j.1I){v(p,j.1I)}p.Q=20;p.19="1a";p.1a=[];p.O={x:0,y:0,2o:0,2p:0,Q:20};p.2k="";p.2z=I(){7.Q=20;J 7};p.36=I(){7.Q=2N;J 7};p.3G=I(){7.2k="";9 a=7.1a;7.1a=[];1l(9 i=0,1i=a.1c;i<1i;i++){K(a[i].19!="3l"){7[a[i].19+"3H"].2v(7,a[i].1O)}1j{7.2q()}}J 7};p.2b=I(x,y){9 d=7.Q?"m":"t";9 a=7.Q?m.1e:m.1w;9 b=7.Q?m.1g:m.1y;d+=T.15(a(13(x,10)))+" "+T.15(b(13(y,10)));7[0].1a=7.2k+=d;7.O.x=(7.Q?0:7.O.x)+a(13(x,10));7.O.y=(7.Q?0:7.O.y)+b(13(y,10));7.O.Q=7.Q;7.1a.1M({19:"3I",1O:[].2O.2A(N,0),21:7.Q});J 7};p.1o=I(x,y){9 d=7.Q?"l":"r";9 a=7.Q?m.1e:m.1w;9 b=7.Q?m.1g:m.1y;d+=T.15(a(13(x,10)))+" "+T.15(b(13(y,10)));7[0].1a=7.2k+=d;7.O.x=(7.Q?0:7.O.x)+a(13(x,10));7.O.y=(7.Q?0:7.O.y)+b(13(y,10));7.O.Q=7.Q;7.1a.1M({19:"3J",1O:[].2O.2A(N,0),21:7.Q});J 7};p.37=I(a,b,c,e,f,g){f=(7.Q?0:7.O.x)+f;g=(7.Q?0:7.O.y)+g;9 h=7.O.x,2P=7.O.y,x=(h-f)/2,y=(2P-g)/2,k=(c==e?-1:1)*T.4W((a*a*b*b-a*a*y*y-b*b*x*x)/(a*a*y*y+b*b*x*x)),1E=k*a*y/b+(h+f)/2,1J=k*-b*x/a+(2P+g)/2,d=e?(7.Q?"4X":"4Y"):(7.Q?"4Z":"50"),1e=7.Q?m.1e:m.1w,1g=7.Q?m.1g:m.1y,1H=T.15(1E-a),1z=T.15(1J-b);d+=[1H,1z,T.15(1H+a*2),T.15(1z+b*2),T.15(h),T.15(2P),T.15(1e(13(f,10))),T.15(1e(13(g,10)))].22(", ");7[0].1a=7.2k+=d;7.O.x=(7.Q?0:7.O.x)+1e(13(f,10));7.O.y=(7.Q?0:7.O.y)+1g(13(g,10));7.O.Q=7.Q;7.1a.1M({19:"3K",1O:[].2O.2A(N,0),21:7.Q});J 7};p.3L=I(a,b,c){K(!c){J 7.1o(a,b)}1j{9 p={};p.1e=7.Q?m.1e:m.1w;p.1g=7.Q?m.1g:m.1y;9 x=T.15(p.1e(T.15(13(a,10)*1f)/1f));9 y=T.15(p.1g(T.15(13(b,10)*1f)/1f));9 w=T.15(m.1w(T.15(13(c,10)*1f)/1f));9 d=7.Q?"c":"v";9 e=[T.15(7.O.x)+w,T.15(7.O.y),x-w,y,x,y];d+=e.22(" ")+" ";7.O.x=(7.Q?0:7.O.x)+e[4];7.O.y=(7.Q?0:7.O.y)+e[5];7.O.2o=e[2];7.O.2p=e[3];7[0].1a=7.2k+=d;7.1a.1M({19:"3M",1O:[].2O.2A(N,0),21:7.Q});J 7}};p.1q=I(){9 d=7.Q?"c":"v";9 a=7.Q?m.1e:m.1w;9 b=7.Q?m.1g:m.1y;K(N.1c==6){7.O.x=(7.Q?0:7.O.x)+a(13(N[4],10));7.O.y=(7.Q?0:7.O.y)+b(13(N[5],10));7.O.2o=T.15(a(13(N[2],10)));7.O.2p=T.15(b(13(N[3],10)));d+=T.15(a(13(N[0],10)))+" "+T.15(b(13(N[1],10)))+" "+T.15(a(13(N[2],10)))+" "+T.15(b(13(N[3],10)))+" "+T.15(a(13(N[4],10)))+" "+T.15(b(13(N[5],10)))+" ";7.O.Q=7.Q}7[0].1a=7.2k+=d;7.1a.1M({19:"3N",1O:[].2O.2A(N,0),21:7.Q});J 7};p.2B=I(r,a){9 R=.3O*r,23=7.Q,o=7;K(23){7.36();23=I(){o.2z()}}1j{23=I(){}}9 b={l:I(){J{u:I(){o.1q(-R,0,-r,-(r-R),-r,-r)},d:I(){o.1q(-R,0,-r,r-R,-r,r)}}},r:I(){J{u:I(){o.1q(R,0,r,-(r-R),r,-r)},d:I(){o.1q(R,0,r,r-R,r,r)}}},u:I(){J{r:I(){o.1q(0,-R,-(R-r),-r,r,-r)},l:I(){o.1q(0,-R,R-r,-r,-r,-r)}}},d:I(){J{r:I(){o.1q(0,R,-(R-r),r,r,r)},l:I(){o.1q(0,R,R-r,r,-r,r)}}}};b[a.38(0)]()[a.38(1)]();23();J o};p.2q=I(){7[0].1a=(7.2k+="x e");J 7};K(1k l=="2c"){l=l.2d(/([3P])/39,",$1,").2d(/([^,])\\-/39,"$1,-");1a=l.3m(",");9 i=1,1i=1a.1c;p.2z();3n(i<1i){K(C.2Q[1a[i]]){i=C.2Q[1a[i]](p,1a,i)}i++}}J p};9 u=I(o,a){9 s=o[0].1h;o.P=o.P||{};1l(9 b 1r a){o.P[b]=a[b]}a["2e-3Q"]&&(s.51=a["2e-3Q"]);a["2e-3R"]&&(s.52=a["2e-3R"]);a["2e"]&&(s.2e=a["2e"]);a["2e-3a"]&&(s.53=a["2e-3a"]);K(1k a.1B!="1s"||1k a["1d-11"]!="1s"||1k a.1x!="1s"||1k a.1d!="1s"){o=o.2j||o[0];9 c=(o.2R("1x")&&o.2R("1x")[0])||17.1u("1m:1x");K("1x-1B"1r a||"1B"1r a){c.1B=((a["1x-1B"]+1||2)-1)*((a.1B+1||2)-1)}K(a.1x){c.24=20}K(c.24==1s||a.1x=="1P"){c.24=2N}K(c.24&&a.1x){c.25=a.1x}o.1b(c);9 d=(o.2R("1d")&&o.2R("1d")[0])||17.1u("1m:1d");K((a.1d&&a.1d!="1P")||a["1d-11"]||a["1d-1B"]||a["1d-2S"]){d.24=20}K(a.1d=="1P"||1k d.24=="1s"){d.24=2N}K(d.24&&a.1d){d.25=a.1d}d.1B=((a["1d-1B"]+1||2)-1)*((a.1B+1||2)-1);a["1d-3S"]&&(d.54=a["1d-3S"]||"3T");d.3U=a["1d-3U"]||8;a["1d-3V"]&&(d.55={56:"58",3W:"3W",15:"15"}[a["1d-3V"]]||"3T");a["1d-11"]&&(d.3a=(13(a["1d-11"],10)||1)*12/16);K(a["1d-2S"]){9 e=a["1d-2S"].2d(" ",",").3m(","),3o=[],3X=d.3a;1l(9 i=0,1i=e.1c;i<1i;i++){9 f=e[i]/3X;K(!59(f)){3o.1M(f)}};d.5a=3o.22(" ")}o.1b(d)}};9 v=I(o,a){o.P=o.P||{};o.P.1I=a;o=o.2j||o[0];9 b=o.2R("1x");K(b.1c){b=b[0]}1j{b=17.1u("1m:1x")}K(a.1t.1c){b.24=20;b.19=(a.19.3p()=="5b")?"1I":"5c";K(1k a.1t[0].25!="1s"){b.25=a.1t[0].25||"#1C"}K(1k a.1t[0].1B!="1s"){b.1B=a.1t[0].1B}K(1k a.1t[a.1t.1c-1].1B!="1s"){b.5d=a.1t[a.1t.1c-1].1B}K(1k a.1t[a.1t.1c-1].25!="1s"){b.5e=a.1t[a.1t.1c-1].25||"#1C"}9 c="";1l(9 i=1,1i=a.1t.1c-1;i<1i;i++){c+=a.1t[i].3b+" "+a.1t[i].25;K(i!=1i-1){c+=","}};K(c){b.5f=c}K(a.1U){9 d=T.15(T.3Y((1G(a.1U[3],10)-1G(a.1U[1],10))/(1G(a.1U[2],10)-1G(a.1U[0],10)))*57.29)+5g;b.5h=d+5i}K(a.19.3p()=="5j"){b.5k="0.5, 0.5";b.5l="0, 0";b.5m="1P"}}};9 z=I(b,c,d){9 e=0,5n=0,5o=0,5p=1;7[0]=b;7.X=0;7.Y=0;7.P={};7.1v=c;7.26=d;7.3q=I(a){K(a==1s){J e}e+=a;7.1v.1h.5q=e;J 7}};z.1p.2C=I(a){9 b=7.1v.1h,2D=7[0].1h;1l(9 i 1r a){7.P[i]=a[i]}9 c=7.P,x,y,w,h;3Z(7.19){1F"2T":x=c.1E-c.r;y=c.1J-c.r;w=h=c.r*2;1V;1F"2U":x=c.1E-c.2l;y=c.1J-c.2m;w=c.2l*2;h=c.2m*2;1V;1F"2f":1F"2E":x=c.x;y=c.y;w=c.w;h=c.h;1V;1F"1K":7.3r.v=["m",T.15(c.x),", ",T.15(c.y-2),"l",T.15(c.x)+1,", ",T.15(c.y-2)].22("");J;3s:J}9 d=7.26.11/2-w/2,1z=7.26.14/2-h/2;b.2h="2i";b.1H=x-d+"1A";b.1z=y-1z+"1A";7.X=x-d;7.Y=y-1z;7.W=w;7.H=h;b.11=7.26.11+"1A";b.14=7.26.14+"1A";2D.2h="2i";2D.1z=1z+"1A";2D.1H=d+"1A";2D.11=w+"1A";2D.14=h+"1A"};z.1p.40=I(){7.1v.1h.3c="1P";J 7};z.1p.41=I(){7.1v.1h.3c="42";J 7};z.1p.3t=I(x,y){K(x==1s&&y==1s){J{x:7.X,y:7.Y}}7.X+=x;7.Y+=y;7.1v.1h.1H=7.X+"1A";7.1v.1h.1z=7.Y+"1A";J 7};z.1p.3u=I(a,b,c,d,e,f){3v=1n 2g(a,b,c,d,e,f);7.1v.1h.43=3v;J 7};z.1p.44=I(x,y){K(x==1s&&y==1s){J}y=y||x;K(x!=0&&!(x==1&&y==1)){9 a=T.15(x/T.45(x)),3d=T.15(y/T.45(y)),s=7[0].1h;K(a!=1||3d!=1){s.43=1n 2g(a,0,0,3d,0,0)}9 b=1G(s.11,10)*x*a;9 c=1G(s.14,10)*y*3d;9 d=1G(s.1H,10);9 e=1G(s.1z,10);s.1H=7.X=d+7.W/2-b/2;s.1z=7.Y=e+7.H/2-c/2;s.11=7.W=b;s.14=7.H=c}J 7};z.1p.2V=I(){J{x:7.1v.5r,y:7.1v.5s,11:7.1v.5t,14:7.1v.5u}};z.1p.2W=I(){7[0].1D.27(7[0]);7.1v.1D.27(7.1v);7.2j&&7.2j.1D.27(7.2j)};z.1p.2F=I(){K(N.1c==1&&1k N[0]=="2c"){J 7.P[N[0]]}K(7.P&&N.1c==1&&N[0]46 47){9 a={};1l(9 i=0,1i=N[0].1c;i<1i;i++){a[N[0][i]]=7.P[N[0][i]]};J a}K(7[0].5v.3p()=="1N"){9 b=7[0].2X;7.P=7.P||{};K(N.1c==2){7.P[N[0]]=N[1]}1j K(N.1c==1||1k N[0]=="2r"){1l(9 j 1r N[0]){7.P[j]=N[0][j]}}1l(9 i=0,1i=b.1c;i<1i;i++){7.2F.2v(1n 5w(b[i],7[0],7.26),N)}}1j{9 c;K(N.1c==2){c={};c[N[0]]=N[1]}K(N.1c==1&&1k N[0]=="2r"){c=N[0]}K(c){u(7,c);7.2C(c);K(c.1I){v(7,c.1I)}K(c.1K&&7.19=="1K"){7[0].2c=c.1K}K(c.2Y){7[0].2Y=c.2Y}}}J 7};z.1p.48=I(){7.1v.1D.1b(7.1v);J 7};z.1p.49=I(){K(7.1v.1D.1Q!=7.1v){7.1v.1D.3e(7.1v,7.1v.1D.1Q)}J 7};9 A=I(a,x,y,r){9 g=17.1u("1m:1N");9 o=17.1u("1m:4a");g.1b(o);a.18.1b(g);9 b=1n z(o,g,a);u(b,{1d:"#1C",1x:"1P"});b.2C({x:x-r,y:y-r,w:r*2,h:r*2});b.P.1E=x;b.P.1J=y;b.P.r=r;b.19="2T";J b};9 B=I(a,x,y,w,h,r){9 g=17.1u("1m:1N");9 o=17.1u(r?"1m:5x":"1m:2f");K(r){o.5y=r/(T.2Z(w,h))}g.1b(o);a.18.1b(g);9 b=1n z(o,g,a);u(b,{1d:"#1C"});b.2C({x:x,y:y,w:w,h:h});b.P.x=x;b.P.y=y;b.P.w=w;b.P.h=h;b.P.r=r;b.19="2f";J b};9 D=I(a,x,y,b,c){9 g=17.1u("1m:1N");9 o=17.1u("1m:4a");g.1b(o);a.18.1b(g);9 d=1n z(o,g,a);u(d,{1d:"#1C"});d.2C({x:x-b,y:y-c,w:b*2,h:c*2});d.P.1E=x;d.P.1J=y;d.P.2l=b;d.P.2m=c;d.19="2U";J d};9 E=I(a,b,x,y,w,h){9 g=17.1u("1m:1N");9 o=17.1u("1m:2E");o.5z=b;g.1b(o);a.18.1b(g);9 c=1n z(o,g,a);c.19="2E";c.2C({x:x,y:y,w:w,h:h});c.P.x=x;c.P.y=y;c.P.w=w;c.P.h=h;J c};9 F=I(a,x,y,b){9 g=17.1u("1m:1N"),2G=g.1h;9 c=17.1u("1m:2j"),2y=c.1h;9 d=17.1u("1m:1a"),5A=d.1h;d.v=["m",T.15(x),", ",T.15(y-2),"l",T.15(x)+1,", ",T.15(y-2)].22("");d.5B=20;2y.11=a.11;2y.14=a.14;2G.2h="2i";2G.1H=0;2G.1z=0;2G.11=a.11;2G.14=a.14;9 o=17.1u("1m:3r");o.2c=b;o.24=20;o.2L=a.2L;o.2M=a.2M;c.1b(o);c.1b(d);g.1b(c);a.18.1b(g);9 e=1n z(o,g,a);e.2j=c;e.3r=d;e.19="1K";e.P.x=x;e.P.y=y;e.P.w=1;e.P.h=1;J e};9 G=I(a){9 b=17.1u("1m:1N"),2H=b.1h;2H.2h="2i";2H.1H=0;2H.1z=0;2H.11=a.11;2H.14=a.14;K(a.18){a.18.1b(b)}9 c=1n z(b,b,a);1l(9 f 1r a){K(f.38(0)!="4b"&&1k a[f]=="I"){c[f]=(I(f){J I(){9 e=a[f].2v(a,N);b.1b(e[0].1D);J e}})(f)}}c.19="1N";J c};r.3k=I(){9 d,11,14;K(1k N[0]=="2c"){d=17.4c(N[0]);11=N[1];14=N[2]}K(1k N[0]=="2r"){d=N[0];11=N[1];14=N[2]}K(1k N[0]=="4d"){d=1;x=N[0];y=N[1];11=N[2];14=N[3]}K(!d){4e 1n 4f("2K 4g 4h 4i.");}K(!17.4j["1m"]){17.4j.5C("1m","5D:5E-5F-5G:26");17.5H().5I("1m\\\\:*","5J:4k(#3s#2K)")}9 c=17.1u("5K"),r=C.18=17.1u("1m:1N"),28=c.1h,30=r.1h;C.11=11;C.14=14;11=11||"5L";14=14||"5M";28.5N="2f(0 "+11+" "+14+" 0)";28.2h="2i";30.11=11;30.14=14;r.2L=(11=="1f%"?11:13(11))+" "+(14=="1f%"?14:13(14));r.2M="0 0";9 b=17.1u("1m:2f"),31=b.1h;31.1H=31.1z=0;31.11=30.11;31.14=30.14;b.5O=b.5P="f";r.1b(b);c.1b(r);K(d==1){17.4l.1b(c);28.2h="2i";28.1H=x+"1A";28.1z=y+"1A";28.11=11;28.14=14;d={1h:{11:11,14:14}}}1j{28.11=d.1h.11=11;28.14=d.1h.14=14;K(d.1Q){d.3e(c,d.1Q)}1j{d.1b(c)}}1l(9 e 1r C){d[e]=C[e]}d.3w=I(){9 a=[];1l(9 i=0,1i=r.2X.1c;i<1i;i++){K(r.2X[i]!=b){a.1M(r.2X[i])}}1l(i=0,1i=a.1c;i<1i;i++){r.27(a[i])}};J d};C.2W=I(){C.18.1D.1D.27(C.18.1D)}}K(q=="2I"){2g.1p.2w=I(){J"3u("+7.m[0][0]+", "+7.m[1][0]+", "+7.m[0][1]+", "+7.m[1][1]+", "+7.m[2][0]+", "+7.m[2][1]+")"};9 t=I(j,k,l){9 m=17.1W(l.1R,"1a");m.U("1x","1P");K(j){1l(9 n 1r j){K(j.1I){v(m,j.1I,l)}1j{m.U(n,j[n])}}}K(l.18){l.18.1b(m)}9 p=1n z(m,l);1l(9 n 1r j){p.P[n]=j[n]}p.Q=20;p.1a=[];p.O={x:0,y:0,2o:0,2p:0};p.2z=I(){7.Q=20;J 7};p.36=I(){7.Q=2N;J 7};p.3G=I(){7[0].U("d","5Q 0");9 a=7.1a;7.1a=[];1l(9 i=0,1i=a.1c;i<1i;i++){K(a[i].19!="3l"){7[a[i].19+"3H"].2v(7,a[i].1O)}1j{7.2q()}}J 7};p.2b=I(x,y){9 d=7.Q?"M":"m";9 a=7.Q?l.1e:l.1w;9 b=7.Q?l.1g:l.1y;d+=a(13(x,10))+" "+b(13(y,10))+" ";9 c=7[0].2s("d")||"";7[0].U("d",c+d);7.O.x=(7.Q?0:7.O.x)+l.1e(13(x,10));7.O.y=(7.Q?0:7.O.y)+l.1g(13(y,10));7.1a.1M({19:"3I",1O:N,21:7.Q});J 7};p.1o=I(x,y){7.O.x=(7.Q?0:7.O.x)+l.1e(13(x,10));7.O.y=(7.Q?0:7.O.y)+l.1g(13(y,10));9 d=7.Q?"L":"l";9 a=7.Q?l.1e:l.1w;9 b=7.Q?l.1g:l.1y;d+=a(13(x,10))+" "+b(13(y,10))+" ";9 c=7[0].2s("d")||"";7[0].U("d",c+d);7.1a.1M({19:"3J",1O:N,21:7.Q});J 7};p.37=I(a,b,c,e,x,y){9 d=7.Q?"A":"a";9 f=7.Q?l.1e:l.1w;9 g=7.Q?l.1g:l.1y;d+=[l.1w(13(a,10)),l.1y(13(b,10)),0,c,e,f(13(x,10)),g(13(y,10))].22(" ");9 h=7[0].2s("d")||"";7[0].U("d",h+d);7.O.x=l.1e(13(x,10));7.O.y=l.1g(13(y,10));7.1a.1M({19:"3K",1O:N,21:7.Q});J 7};p.3L=I(a,b,c){K(!c){J 7.1o(a,b)}1j{9 p={};p.1e=7.Q?l.1e:l.1w;p.1g=7.Q?l.1g:l.1y;9 x=p.1e(T.15(13(a,10)*1f)/1f);9 y=p.1g(T.15(13(b,10)*1f)/1f);9 w=l.1w(T.15(13(c,10)*1f)/1f);9 d=7.Q?"C":"c";9 e=[7.O.x+w,7.O.y,x-w,y,x,y];1l(9 i=0,1i=e.1c;i<1i;i++){d+=e[i]+" "}7.O.x=(7.Q?0:7.O.x)+e[4];7.O.y=(7.Q?0:7.O.y)+e[5];7.O.2o=e[2];7.O.2p=e[3];9 f=7[0].2s("d")||"";7[0].U("d",f+d);7.1a.1M({19:"3M",1O:N,21:7.Q});J 7}};p.1q=I(){9 p={};p.1e=7.Q?l.1e:l.1w;p.1g=7.Q?l.1g:l.1y;K(N.1c==6){9 d=7.Q?"C":"c";1l(9 i=0,1i=N.1c;i<1i;i++){d+=p[(i%2==0)?"1e":"1g"](T.15(13(N[i],10)*1f)/1f)+" "}7.O.x=(7.Q?0:7.O.x)+p.1e((13(N[4],10)*1f)/1f);7.O.y=(7.Q?0:7.O.y)+p.1g((13(N[5],10)*1f)/1f);7.O.2o=p.1e((13(N[2],10)*1f)/1f);7.O.2p=p.1g((13(N[3],10)*1f)/1f)}1j{K(N.1c==4){9 d=7.Q?"S":"s";1l(9 i=0,1i=N.1c;i<1i;i++){d+=p[i%2==0?"1e":"1g"]((13(N[i],10)*1f)/1f)+" "}}7.O.x=(7.Q?0:7.O.x)+p.1e((13(N[2],10)*1f)/1f);7.O.y=(7.Q?0:7.O.y)+p.1g((13(N[3],10)*1f)/1f);7.O.2o=p.1e((13(N[0],10)*1f)/1f);7.O.2p=p.1g((13(N[1],10)*1f)/1f)}9 a=7[0].2s("d")||"";7[0].U("d",a+d);7.1a.1M({19:"3N",1O:N,21:7.Q});J 7};p.2B=I(r,a){9 R=.3O*r,23=7.Q,o=7;K(23){7.36();23=I(){o.2z()}}1j{23=I(){}}9 b={l:I(){J{u:I(){o.1q(-R,0,-r,-(r-R),-r,-r)},d:I(){o.1q(-R,0,-r,r-R,-r,r)}}},r:I(){J{u:I(){o.1q(R,0,r,-(r-R),r,-r)},d:I(){o.1q(R,0,r,r-R,r,r)}}},u:I(){J{r:I(){o.1q(0,-R,-(R-r),-r,r,-r)},l:I(){o.1q(0,-R,R-r,-r,-r,-r)}}},d:I(){J{r:I(){o.1q(0,R,-(R-r),r,r,r)},l:I(){o.1q(0,R,R-r,r,-r,r)}}}};b[a[0]]()[a[1]]();23();J o};p.2q=I(){9 a=7[0].2s("d")||"";7[0].U("d",a+"Z ");7.1a.1M({19:"3l"});J 7};K(1k k=="2c"){k=k.2d(/([3P])/39,",$1,").2d(/([^,])\\-/39,"$1,-");1a=k.3m(",");9 i=1,1i=1a.1c;p.2z();3n(i<1i){K(C.2Q[1a[i]]){i=C.2Q[1a[i]](p,1a,i)}i++}}J p};9 v=I(o,a,b){9 c=17.1W(b.1R,a.19+"5R");c.2Y="5S-1I-"+b.4m++;K(a.1U&&a.1U.1c){c.U("5T",a.1U[0]);c.U("2P",a.1U[1]);c.U("5U",a.1U[2]);c.U("5V",a.1U[3])}b.3f.1b(c);1l(9 i=0,1i=a.1t.1c;i<1i;i++){9 d=17.1W(b.1R,"3x");d.U("3b",a.1t[i].3b?a.1t[i].3b:(i==0)?"0%":"1f%");d.U("3x-25",a.1t[i].25||"#5W");K(1k a.1t[i].1B!="1s"){d.U("3x-1B",a.1t[i].1B)}c.1b(d)};o.U("1x","4k(#"+c.2Y+")")};9 z=I(c,d){9 X=0,Y=0,32={33:0,x:0,y:0},2t=1,2u=1,3v=5X;7[0]=c;7.1X=d;7.P=7.P||{};7.1S=[];7.3q=I(a){K(a==1s){J 32.33}9 b=7.2V();32.33+=a;K(32.33){7.1S[0]=("3q("+32.33+" "+(b.x+b.11/2)+" "+(b.y+b.14/2)+")")}1j{7.1S[0]=""}7[0].U("3g",7.1S.22(" "));J 7};7.3t=I(x,y){K(x==1s&&y==1s){J{x:X,y:Y}}X+=x;Y+=y;K(X&&Y){7.1S[1]="3t("+X+","+Y+")"}1j{7.1S[1]=""}7[0].U("3g",7.1S.22(" "));J 7};7.44=I(x,y){K(x==1s&&y==1s){J{x:2t,y:2u}}y=y||x;K(x!=0&&!(x==1&&y==1)){2t*=x;2u*=y;K(!(2t==1&&2u==1)){9 a=7.2V(),34=a.x*(1-2t)+(a.11/2-a.11*2t/2),4n=a.y*(1-2u)+(a.14/2-a.14*2u/2);7.1S[2]=1n 2g(2t,0,0,2u,34,4n)}1j{7.1S[2]=""}7[0].U("3g",7.1S.22(" "))}J 7}};z.1p.40=I(){7[0].1h.3c="1P";J 7};z.1p.41=I(){7[0].1h.3c="42";J 7};z.1p.3u=I(a,b,c,d,e,f){7.1S[3]=1n 2g(a,b,c,d,e,f);7[0].U("3g",7.1S.22(" "));J 7};z.1p.2W=I(){7[0].1D.27(7[0])};z.1p.2V=I(){J 7[0].2V()};z.1p.2F=I(){K(N.1c==1&&1k N[0]=="2c"){J 7[0].2s(N[0])}K(N.1c==1&&N[0]46 47){9 a={};1l(9 j 1r N[0]){a[N[0][j]]=7.P[N[0][j]]}J a}K(N.1c==2){9 b=N[0],1T=N[1];7[b]=1T;7.P[b]=1T;3Z(b){1F"2l":1F"1E":1F"x":7[0].U(b,7.1X.1e(1T));1V;1F"2m":1F"1J":1F"y":7[0].U(b,7.1X.1g(1T));1V;1F"11":7[0].U(b,7.1X.1w(1T));1V;1F"14":7[0].U(b,7.1X.1y(1T));1V;1F"1I":v(7[0],1T,7.1X);1V;1F"1d-2S":7[0].U(b,1T.2d(" ",","));1V;1F"1K":K(7.19=="1K"){7[0].27(7[0].1Q);7[0].1b(17.3y(1T))}1V;3s:9 c=b.2d(/(\\-.)/g,I(w){J w.2n(1).4o()});7[0].1h[c]=1T;7[0].U(b,1T);1V}}1j K(N.1c==1&&1k N[0]=="2r"){9 d=N[0];1l(9 e 1r d){7.P[e]=d[e];K(e=="1d-2S"){7[0].U(e,d[e].2d(" ",","))}1j K(e=="1K"&&7.19=="1K"){7[0].2X.1c&&7[0].27(7[0].1Q);7[0].1b(17.3y(d.1K))}1j{9 c=e.2d(/(\\-.)/g,I(w){J w.2n(1).4o()});7[0].1h[c]=d[e];7[0].U(e,d[e])}}K(d.1I){7.P.1I=d.1I;v(7[0],d.1I,7.1X)}}J 7};z.1p.48=I(){7[0].1D.1b(7[0]);J 7};z.1p.49=I(){K(7[0].1D.1Q!=7[0]){7[0].1D.3e(7[0],7[0].1D.1Q)}J 7};9 A=I(a,x,y,r){9 b=17.1W(a.1R,"2T");b.U("1E",a.1e(x));b.U("1J",a.1g(y));b.U("r",r);b.U("1x","1P");b.U("1d","#1C");K(a.18){a.18.1b(b)}9 c=1n z(b,a);c.P=c.P||{};c.P.1E=x;c.P.1J=y;c.P.r=r;c.P.1d="#1C";c.19="2T";J c};9 B=I(a,x,y,w,h,r){9 b=17.1W(a.1R,"2f");b.U("x",a.1e(x));b.U("y",a.1g(y));b.U("11",a.1w(w));b.U("14",a.1y(h));K(r){b.U("2l",r);b.U("2m",r)}b.U("1x","1P");b.U("1d","#1C");K(a.18){a.18.1b(b)}9 c=1n z(b,a);c.P=c.P||{};c.P.x=x;c.P.y=y;c.P.11=w;c.P.14=h;c.P.1d="#1C";K(r){c.P.2l=c.P.2m=r}c.19="2f";J c};9 D=I(a,x,y,b,c){9 d=17.1W(a.1R,"2U");d.U("1E",a.1e(x));d.U("1J",a.1g(y));d.U("2l",a.1w(b));d.U("2m",a.1y(c));d.U("1x","1P");d.U("1d","#1C");K(a.18){a.18.1b(d)}9 e=1n z(d,a);e.P=e.P||{};e.P.1E=x;e.P.1J=y;e.P.2l=b;e.P.2m=c;e.P.1d="#1C";e.19="2U";J e};9 E=I(a,b,x,y,w,h){9 c=17.1W(a.1R,"2E");c.U("x",a.1e(x));c.U("y",a.1g(y));c.U("11",a.1w(w));c.U("14",a.1y(h));c.5Y(a.3z,"5Z",b);K(a.18){a.18.1b(c)}9 d=1n z(c,a);d.P=d.P||{};d.P.x=x;d.P.y=y;d.P.11=w;d.P.14=h;d.19="2E";J d};9 F=I(a,x,y,b){9 c=17.1W(a.1R,"1K");c.U("x",x);c.U("y",y);c.U("1K-60","61");c.U("1x","#1C");K(b){c.1b(17.3y(b))}K(a.18){a.18.1b(c)}9 d=1n z(c,a);d.P=d.P||{};d.P.x=x;d.P.y=y;d.P.1x="#1C";d.19="1K";J d};9 G=I(a){9 b=17.1W(a.1R,"g");K(a.18){a.18.1b(b)}9 i=1n z(b,a);1l(9 f 1r a){K(f[0]!="4b"&&1k a[f]=="I"){i[f]=(I(f){J I(){9 e=a[f].2v(a,N);b.1b(e[0]);J e}})(f)}}i.19="1N";J i};r.3k=I(){K(1k N[0]=="2c"){9 a=17.4c(N[0]);9 b=N[1];9 c=N[2]}K(1k N[0]=="2r"){9 a=N[0];9 b=N[1];9 c=N[2]}K(1k N[0]=="4d"){9 a=1,x=N[0],y=N[1],b=N[2],c=N[3]}K(!a){4e 1n 4f("2I 4g 4h 4i.");}C.18=17.1W(C.1R,"1X");C.18.U("11",b||4p);C.11=b||4p;C.18.U("14",c||4q);C.14=c||4q;K(a==1){17.4l.1b(C.18);C.18.1h.2h="2i";C.18.1h.1H=x+"1A";C.18.1h.1z=y+"1A"}1j{K(a.1Q){a.3e(C.18,a.1Q)}1j{a.1b(C.18)}}a={18:C.18,3w:I(){3n(7.18.1Q){7.18.27(7.18.1Q)}7.3f=17.1W(C.1R,"3f");7.4m=0;7.18.1b(7.3f)}};1l(9 d 1r C){K(d!="62"){a[d]=C[d]}}a.3w();J a};C.2W=I(){C.18.1D.27(C.18)};C.1R="4r://4s.4t.4u/63/1X";C.3z="4r://4s.4t.4u/64/3z"}K(q=="2K"||q=="2I"){C.2T=I(x,y,r){J A(7,x,y,r)};C.2f=I(x,y,w,h,r){J B(7,x,y,w,h,r)};C.2U=I(x,y,a,b){J D(7,x,y,a,b)};C.1a=I(a,b){J t(a,b,7)};C.2E=I(a,x,y,w,h){J E(7,a,x,y,w,h)};C.1K=I(x,y,a){J F(7,x,y,a)};C.1N=I(){J G(7)};C.65=I(x,y,w,h,r){K(r&&1G(r,10)){J 7.1a({1d:"#1C"}).2b(x+r,y).1o(x+w-r,y).2B(r,"66").1o(x+w,y+h-r).2B(r,"67").1o(x+r,y+h).2B(r,"68").1o(x,y+r).2B(r,"69").2q()}J 7.1a({1d:"#1C"}).2b(x,y).1o(x+w,y).1o(x+w,y+h).1o(x,y+h).2q()};C.6a=I(x,y,w,h,a,b,c){c=c||"#1C";9 p=7.1a({1d:c,"1d-11":1}).2b(x,y).1o(x+w,y).1o(x+w,y+h).1o(x,y+h).1o(x,y);1l(9 i=1;i<b;i++){p.2b(x,y+i*T.15(h/b)).1o(x+w,y+i*T.15(h/b))}1l(9 i=1;i<a;i++){p.2b(x+i*T.15(w/a),y).1o(x+i*T.15(w/a),y+h)}J p};C.6b=I(a,b,c,d,w,h){9 e=(c-a)/w;9 f=(d-b)/h;7.1e=I(x){J a+x*e};7.1g=I(y){J b+y*f};7.1w=I(w){J w*e};7.1y=I(h){J h*f}};C.6c=I(){7.1e=7.1g=7.1w=7.1y=I(x){J x}};C.3A=I(){K(r.19=="2I"){9 a=C.2f(-C.11,-C.14,C.11*3,C.14*3).2F({1d:"1P"});4v(I(){a.2W()},0)}};z.1p.6d=I(x,y,d,e){6e(7.4w);K("1E"1r 7.P||"x"1r 7.P){9 f=("1E"1r 7.P),X=7.P.1E||7.P.x,Y=7.P.1J||7.P.y;K(x==X&&y==Y){J 7}9 g=y-Y,34=x-X,3h=g/34,4x=Y-3h*X,4y=T.3Y(7.3h);7.3B=7.6f*T.6g(4y);K(x<X){7.3B=-7.3B}9 h=1n 4z(),35=7;(I(){9 a=(1n 4z()).4A()-h.4A();K(a<d){9 b=X+a*34/d;9 c=b*3h+4x;35.2F(f?{1E:b,1J:c}:{x:b,y:c});35.4w=4v(N.3i,1);C.3A()}1j{35.2F(f?{1E:x,1J:y}:{x:x,y:y});C.3A();e&&e.2A(35)}})()}J 7};C.2Q={M:I(p,a,i){p.2b(a[++i]*1,a[++i]*1);J i},m:I(p,a,i){p.2b(p.O.x+a[++i]*1,p.O.y+a[++i]*1);J i},C:I(p,a,i){p.1q(a[++i]*1,a[++i]*1,a[++i]*1,a[++i]*1,a[++i]*1,a[++i]*1);J i},c:I(p,a,i){p.1q(p.O.x+a[++i]*1,p.O.y+a[++i]*1,p.O.x+a[++i]*1,p.O.y+a[++i]*1,p.O.x+a[++i]*1,p.O.y+a[++i]*1);J i},S:I(p,a,i){p.1q(a[++i]*1,a[++i]*1,a[++i]*1,a[++i]*1);J i},s:I(p,a,i){p.1q(p.O.x+a[++i]*1,p.O.y+a[++i]*1,p.O.x+a[++i]*1,p.O.y+a[++i]*1);J i},L:I(p,a,i){p.1o(a[++i]*1,a[++i]*1);J i},l:I(p,a,i){p.1o(p.O.x+a[++i]*1,p.O.y+a[++i]*1);J i},H:I(p,a,i){p.1o(a[++i]*1,p.O.y);J i},h:I(p,a,i){p.1o(p.O.x+a[++i]*1,p.O.y);J i},V:I(p,a,i){p.1o(p.O.x,a[++i]*1);J i},v:I(p,a,i){p.1o(p.O.x,p.O.y+a[++i]*1);J i},A:I(p,a,i){p.37(a[++i]*1,a[++i]*1,a[i+=2],a[++i]*1,a[++i]*1,a[++i]*1,a[++i]*1);J i},a:I(p,a,i){p.37(p.O.x+a[++i]*1,p.O.y+a[++i]*1,a[i+=2]*1,a[++i]*1,a[++i]*1,p.O.x+a[++i]*1,p.O.y+a[++i]*1);J i},z:I(p,a,i){p.2q();J i}};J r}1j{J I(){}}})((!(3C.4B&&3C.4B.6h==2))?"2K":"2I");1L.26=!(1L.1X=(1L.19=="2I"));K(1L.26&&3C.6i){1L.19="6j 6k";1L.26=1L.1X=2N}1L.2w=I(){J"6l 6m 6n "+7.19};1L.4C=I(a,c,d){K(1k a=="2r"&&"h"1r a&&"s"1r a&&"b"1r a){d=a.b;c=a.s;a=a.h}9 e,1Y,1Z;K(d==0){J{r:0,g:0,b:0,3D:"#1C"}}1j{9 i=T.6o(a*6),f=(a*6)-i,p=d*(1-c),q=d*(1-(c*f)),t=d*(1-(c*(1-f)));[I(){e=d;1Y=t;1Z=p},I(){e=q;1Y=d;1Z=p},I(){e=p;1Y=d;1Z=t},I(){e=p;1Y=q;1Z=d},I(){e=t;1Y=p;1Z=d},I(){e=d;1Y=p;1Z=q},I(){e=d;1Y=t;1Z=p},][i]()}9 h={r:e,g:1Y,b:1Z};e*=2J;1Y*=2J;1Z*=2J;9 r=T.15(e).2w(16);K(r.1c==1){r="0"+r}9 g=T.15(1Y).2w(16);K(g.1c==1){g="0"+g}9 b=T.15(1Z).2w(16);K(b.1c==1){b="0"+b}h.3D="#"+r+g+b;J h};1L.6p=I(a,b,c){K(1k a=="2r"&&"r"1r a&&"g"1r a&&"b"1r a){c=a.b;b=a.g;a=a.r}K(1k a=="2c"&&a.38(0)=="#"){K(a.1c==4){c=1G(a.2n(3),16);b=1G(a.2n(2,3),16);a=1G(a.2n(1,2),16)}1j{c=1G(a.2n(5),16);b=1G(a.2n(3,5),16);a=1G(a.2n(1,3),16)}}K(a>1||b>1||c>1){a/=2J;b/=2J;c/=2J}9 d=T.6q(a,b,c),2Z=T.2Z(a,b,c),2a,3E,4D=d;K(2Z==d){J{h:0,s:0,b:d}}1j{9 e=(d-2Z);3E=e/d;K(a==d){2a=(b-c)/e}1j K(b==d){2a=2+((c-a)/e)}1j{2a=4+((a-b)/e)}2a/=6;K(2a<0){2a+=1}K(2a>1){2a-=1}}J{h:2a,s:3E,b:4D}};1L.4E=I(a){9 b=N.3i.3j=N.3i.3j||{h:0,s:1,b:a||.6r};9 c=7.4C(b.h,b.s,b.b);b.h+=.6s;K(b.h>1){b.h=0;b.s-=.2;K(b.s<=0){N.3i.3j={h:0,s:1,b:b.b}}}J c.3D};1L.4E.6t=I(){7.3j=1s};'
,
62
,
402
,
'|||||||this||var|||||||||||||||||||||||||||||||||||function|return|if|||arguments|last|attrs|isAbsolute|||Math|setAttribute|||||||width||parseFloat|height|round||document|canvas|type|path|appendChild|length|stroke|_getX|100|_getY|style|ii|else|typeof|for|rvml|new|lineTo|prototype|curveTo|in|undefined|dots|createElement|Group|_getW|fill|_getH|top|px|opacity|000|parentNode|cx|case|parseInt|left|gradient|cy|text|Raphael|push|group|arg|none|firstChild|svgns|transformations|value|vector|break|createElementNS|svg|green|blue|true|pos|join|rollback|on|color|vml|removeChild|cs||hue|moveTo|string|replace|font|rect|Matrix|position|absolute|shape|Path|rx|ry|substring|bx|by|andClose|object|getAttribute|ScaleX|ScaleY|apply|toString|gl|ol|absolutely|call|addRoundedCorner|setBox|os|image|attr|gs|els|SVG|255|VML|coordsize|coordorigin|false|slice|y1|pathfinder|getElementsByTagName|dasharray|circle|ellipse|getBBox|remove|childNodes|id|min|rs|bs|Rotation|deg|dx|that|relatively|arcTo|charAt|ig|weight|offset|display|diry|insertBefore|defs|transform|coeff|callee|start|_create|end|split|while|dashesn|toLowerCase|rotate|textpath|default|translate|matrix|tMatrix|clear|stop|createTextNode|xlink|safari|xs|window|hex|saturation|class|redraw|To|move|line|arc|cplineTo|cpline|curve|5522|mzlhvcsqta|family|size|linejoin|miter|miterlimit|linecap|square|str|atan|switch|hide|show|block|filter|scale|abs|instanceof|Array|toFront|toBack|oval|_|getElementById|number|throw|Error|container|not|found|namespaces|url|body|gradients|dy|toUpperCase|320|200|http|www|w3|org|setTimeout|animation_in_progress|plus|alpha|Date|getTime|SVGPreserveAspectRatio|hsb2rgb|brightness|getColor|version|9b|progid|DXImageTransform|Microsoft|M11|M12|M21|M22|Dx|Dy|sizingmethod|auto|expand|filtertype|bilinear|className|sqrt|wa|wr|at|ar|fontFamily|fontSize|fontWeight|joinstyle|endcap|butt||flat|isNaN|dashstyle|linear|gradientradial|opacity2|color2|colors|180|angle|90|radial|focusposition|focussize|method|RotX|RotY|Scale|rotation|offsetLeft|offsetTop|offsetWidth|offsetHeight|tagName|item|roundrect|arcsize|src|ps|textpathok|add|urn|schemas|microsoft|com|createStyleSheet|addRule|behavior|div|320px|200px|clip|filled|stroked|M0|Gradient|raphael|x1|x2|y2|fff|null|setAttributeNS|href|anchor|middle|create|2000|1999|linerect|rd|dl|lu|ur|drawGrid|setGrid|clearGrid|animateTo|clearTimeout|step|cos|SVG_PRESERVEASPECTRATIO_XMINYMIN|CanvasRenderingContext2D|Canvas|only|Your|browser|supports|floor|rgb2hsb|max|75|075|reset'
.
split
(
'|'
),
0
,{}))
var
Raphael
=
(
function
(
q
){
var
r
=
function
(){
return
r
.
_create
.
apply
(
r
,
arguments
)};
r
.
version
=
"0.5.10"
;
r
.
type
=
q
;
var
C
=
{};
function
Matrix
(
a
,
b
,
c
,
d
,
e
,
f
){
this
.
m
=
[[
a
||
1
,
b
||
0
,
0
],[
c
||
0
,
d
||
1
,
0
],[
e
||
0
,
f
||
0
,
1
]]}
C
.
_getX
=
C
.
_getY
=
C
.
_getW
=
C
.
_getH
=
function
(
x
){
return
x
};
if
(
q
==
"VML"
){
Matrix
.
prototype
.
toString
=
function
(){
return
"progid:DXImageTransform.Microsoft.Matrix(M11="
+
this
.
m
[
0
][
0
]
+
", M12="
+
this
.
m
[
1
][
0
]
+
", M21="
+
this
.
m
[
0
][
1
]
+
", M22="
+
this
.
m
[
1
][
1
]
+
", Dx="
+
this
.
m
[
2
][
0
]
+
", Dy="
+
this
.
m
[
2
][
1
]
+
", sizingmethod='auto expand', filtertype='bilinear')"
};
var
t
=
function
(
j
,
l
,
m
){
var
g
=
document
.
createElement
(
"rvml:group"
),
gl
=
g
.
style
;
gl
.
position
=
"absolute"
;
gl
.
left
=
0
;
gl
.
top
=
0
;
gl
.
width
=
m
.
width
+
"px"
;
gl
.
height
=
m
.
height
+
"px"
;
var
n
=
document
.
createElement
(
"rvml:shape"
),
ol
=
n
.
style
;
ol
.
width
=
m
.
width
+
"px"
;
ol
.
height
=
m
.
height
+
"px"
;
n
.
path
=
""
;
if
(
j
[
"class"
]){
n
.
className
=
j
[
"class"
]}
n
.
coordsize
=
this
.
coordsize
;
n
.
coordorigin
=
this
.
coordorigin
;
g
.
appendChild
(
n
);
m
.
canvas
.
appendChild
(
g
);
var
p
=
new
z
(
n
,
g
,
m
);
u
(
p
,
j
);
if
(
j
.
gradient
){
v
(
p
,
j
.
gradient
)}
p
.
isAbsolute
=
true
;
p
.
type
=
"path"
;
p
.
path
=
[];
p
.
last
=
{
x
:
0
,
y
:
0
,
bx
:
0
,
by
:
0
,
isAbsolute
:
true
};
p
.
Path
=
""
;
p
.
absolutely
=
function
(){
this
.
isAbsolute
=
true
;
return
this
};
p
.
relatively
=
function
(){
this
.
isAbsolute
=
false
;
return
this
};
p
.
redraw
=
function
(){
this
.
Path
=
""
;
var
a
=
this
.
path
;
this
.
path
=
[];
for
(
var
i
=
0
,
ii
=
a
.
length
;
i
<
ii
;
i
++
){
if
(
a
[
i
].
type
!=
"end"
){
this
[
a
[
i
].
type
+
"To"
].
apply
(
this
,
a
[
i
].
arg
)}
else
{
this
.
andClose
()}}
return
this
};
p
.
moveTo
=
function
(
x
,
y
){
var
d
=
this
.
isAbsolute
?
"m"
:
"t"
;
var
a
=
this
.
isAbsolute
?
m
.
_getX
:
m
.
_getW
;
var
b
=
this
.
isAbsolute
?
m
.
_getY
:
m
.
_getH
;
d
+=
Math
.
round
(
a
(
parseFloat
(
x
,
10
)))
+
" "
+
Math
.
round
(
b
(
parseFloat
(
y
,
10
)));
this
[
0
].
path
=
this
.
Path
+=
d
;
this
.
last
.
x
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
x
)
+
a
(
parseFloat
(
x
,
10
));
this
.
last
.
y
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
y
)
+
b
(
parseFloat
(
y
,
10
));
this
.
last
.
isAbsolute
=
this
.
isAbsolute
;
this
.
path
.
push
({
type
:
"move"
,
arg
:[].
slice
.
call
(
arguments
,
0
),
pos
:
this
.
isAbsolute
});
return
this
};
p
.
lineTo
=
function
(
x
,
y
){
var
d
=
this
.
isAbsolute
?
"l"
:
"r"
;
var
a
=
this
.
isAbsolute
?
m
.
_getX
:
m
.
_getW
;
var
b
=
this
.
isAbsolute
?
m
.
_getY
:
m
.
_getH
;
d
+=
Math
.
round
(
a
(
parseFloat
(
x
,
10
)))
+
" "
+
Math
.
round
(
b
(
parseFloat
(
y
,
10
)));
this
[
0
].
path
=
this
.
Path
+=
d
;
this
.
last
.
x
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
x
)
+
a
(
parseFloat
(
x
,
10
));
this
.
last
.
y
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
y
)
+
b
(
parseFloat
(
y
,
10
));
this
.
last
.
isAbsolute
=
this
.
isAbsolute
;
this
.
path
.
push
({
type
:
"line"
,
arg
:[].
slice
.
call
(
arguments
,
0
),
pos
:
this
.
isAbsolute
});
return
this
};
p
.
arcTo
=
function
(
a
,
b
,
c
,
e
,
f
,
g
){
f
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
x
)
+
f
;
g
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
y
)
+
g
;
var
h
=
this
.
last
.
x
,
y1
=
this
.
last
.
y
,
x
=
(
h
-
f
)
/
2
,
y
=
(
y1
-
g
)
/
2
,
k
=
(
c
==
e
?
-
1
:
1
)
*
Math
.
sqrt
((
a
*
a
*
b
*
b
-
a
*
a
*
y
*
y
-
b
*
b
*
x
*
x
)
/
(
a
*
a
*
y
*
y
+
b
*
b
*
x
*
x
)),
cx
=
k
*
a
*
y
/
b
+
(
h
+
f
)
/
2
,
cy
=
k
*-
b
*
x
/
a
+
(
y1
+
g
)
/
2
,
d
=
e
?(
this
.
isAbsolute
?
"wa"
:
"wr"
):(
this
.
isAbsolute
?
"at"
:
"ar"
),
_getX
=
this
.
isAbsolute
?
m
.
_getX
:
m
.
_getW
,
_getY
=
this
.
isAbsolute
?
m
.
_getY
:
m
.
_getH
,
left
=
Math
.
round
(
cx
-
a
),
top
=
Math
.
round
(
cy
-
b
);
d
+=
[
left
,
top
,
Math
.
round
(
left
+
a
*
2
),
Math
.
round
(
top
+
b
*
2
),
Math
.
round
(
h
),
Math
.
round
(
y1
),
Math
.
round
(
_getX
(
parseFloat
(
f
,
10
))),
Math
.
round
(
_getX
(
parseFloat
(
g
,
10
)))].
join
(
", "
);
this
[
0
].
path
=
this
.
Path
+=
d
;
this
.
last
.
x
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
x
)
+
_getX
(
parseFloat
(
f
,
10
));
this
.
last
.
y
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
y
)
+
_getY
(
parseFloat
(
g
,
10
));
this
.
last
.
isAbsolute
=
this
.
isAbsolute
;
this
.
path
.
push
({
type
:
"arc"
,
arg
:[].
slice
.
call
(
arguments
,
0
),
pos
:
this
.
isAbsolute
});
return
this
};
p
.
cplineTo
=
function
(
a
,
b
,
c
){
if
(
!
c
){
return
this
.
lineTo
(
a
,
b
)}
else
{
var
p
=
{};
p
.
_getX
=
this
.
isAbsolute
?
m
.
_getX
:
m
.
_getW
;
p
.
_getY
=
this
.
isAbsolute
?
m
.
_getY
:
m
.
_getH
;
var
x
=
Math
.
round
(
p
.
_getX
(
Math
.
round
(
parseFloat
(
a
,
10
)
*
100
)
/
100
));
var
y
=
Math
.
round
(
p
.
_getY
(
Math
.
round
(
parseFloat
(
b
,
10
)
*
100
)
/
100
));
var
w
=
Math
.
round
(
m
.
_getW
(
Math
.
round
(
parseFloat
(
c
,
10
)
*
100
)
/
100
));
var
d
=
this
.
isAbsolute
?
"c"
:
"v"
;
var
e
=
[
Math
.
round
(
this
.
last
.
x
)
+
w
,
Math
.
round
(
this
.
last
.
y
),
x
-
w
,
y
,
x
,
y
];
d
+=
e
.
join
(
" "
)
+
" "
;
this
.
last
.
x
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
x
)
+
e
[
4
];
this
.
last
.
y
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
y
)
+
e
[
5
];
this
.
last
.
bx
=
e
[
2
];
this
.
last
.
by
=
e
[
3
];
this
[
0
].
path
=
this
.
Path
+=
d
;
this
.
path
.
push
({
type
:
"cpline"
,
arg
:[].
slice
.
call
(
arguments
,
0
),
pos
:
this
.
isAbsolute
});
return
this
}};
p
.
curveTo
=
function
(){
var
d
=
this
.
isAbsolute
?
"c"
:
"v"
;
var
a
=
this
.
isAbsolute
?
m
.
_getX
:
m
.
_getW
;
var
b
=
this
.
isAbsolute
?
m
.
_getY
:
m
.
_getH
;
if
(
arguments
.
length
==
6
){
this
.
last
.
bx
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
x
)
+
a
(
parseFloat
(
arguments
[
2
],
10
));
this
.
last
.
by
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
y
)
+
b
(
parseFloat
(
arguments
[
3
],
10
));
this
.
last
.
x
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
x
)
+
a
(
parseFloat
(
arguments
[
4
],
10
));
this
.
last
.
y
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
y
)
+
b
(
parseFloat
(
arguments
[
5
],
10
));
d
+=
Math
.
round
(
a
(
parseFloat
(
arguments
[
0
],
10
)))
+
" "
+
Math
.
round
(
b
(
parseFloat
(
arguments
[
1
],
10
)))
+
" "
+
Math
.
round
(
a
(
parseFloat
(
arguments
[
2
],
10
)))
+
" "
+
Math
.
round
(
b
(
parseFloat
(
arguments
[
3
],
10
)))
+
" "
+
Math
.
round
(
a
(
parseFloat
(
arguments
[
4
],
10
)))
+
" "
+
Math
.
round
(
b
(
parseFloat
(
arguments
[
5
],
10
)))
+
" "
;
this
.
last
.
isAbsolute
=
this
.
isAbsolute
}
if
(
arguments
.
length
==
4
){
var
c
=
this
.
last
.
x
*
2
-
this
.
last
.
bx
;
var
e
=
this
.
last
.
y
*
2
-
this
.
last
.
by
;
this
.
last
.
bx
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
x
)
+
a
(
parseFloat
(
arguments
[
0
],
10
));
this
.
last
.
by
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
y
)
+
b
(
parseFloat
(
arguments
[
1
],
10
));
this
.
last
.
x
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
x
)
+
a
(
parseFloat
(
arguments
[
2
],
10
));
this
.
last
.
y
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
y
)
+
b
(
parseFloat
(
arguments
[
3
],
10
));
d
+=
[
Math
.
round
(
c
),
Math
.
round
(
e
),
Math
.
round
(
a
(
parseFloat
(
arguments
[
0
],
10
))),
Math
.
round
(
b
(
parseFloat
(
arguments
[
1
],
10
))),
Math
.
round
(
a
(
parseFloat
(
arguments
[
2
],
10
))),
Math
.
round
(
b
(
parseFloat
(
arguments
[
3
],
10
)))].
join
(
" "
)}
this
[
0
].
path
=
this
.
Path
+=
d
;
this
.
path
.
push
({
type
:
"curve"
,
arg
:[].
slice
.
call
(
arguments
,
0
),
pos
:
this
.
isAbsolute
});
return
this
};
p
.
addRoundedCorner
=
function
(
r
,
a
){
var
R
=
.
5522
*
r
,
rollback
=
this
.
isAbsolute
,
o
=
this
;
if
(
rollback
){
this
.
relatively
();
rollback
=
function
(){
o
.
absolutely
()}}
else
{
rollback
=
function
(){}}
var
b
=
{
l
:
function
(){
return
{
u
:
function
(){
o
.
curveTo
(
-
R
,
0
,
-
r
,
-
(
r
-
R
),
-
r
,
-
r
)},
d
:
function
(){
o
.
curveTo
(
-
R
,
0
,
-
r
,
r
-
R
,
-
r
,
r
)}}},
r
:
function
(){
return
{
u
:
function
(){
o
.
curveTo
(
R
,
0
,
r
,
-
(
r
-
R
),
r
,
-
r
)},
d
:
function
(){
o
.
curveTo
(
R
,
0
,
r
,
r
-
R
,
r
,
r
)}}},
u
:
function
(){
return
{
r
:
function
(){
o
.
curveTo
(
0
,
-
R
,
-
(
R
-
r
),
-
r
,
r
,
-
r
)},
l
:
function
(){
o
.
curveTo
(
0
,
-
R
,
R
-
r
,
-
r
,
-
r
,
-
r
)}}},
d
:
function
(){
return
{
r
:
function
(){
o
.
curveTo
(
0
,
R
,
-
(
R
-
r
),
r
,
r
,
r
)},
l
:
function
(){
o
.
curveTo
(
0
,
R
,
R
-
r
,
r
,
-
r
,
r
)}}}};
b
[
a
.
charAt
(
0
)]()[
a
.
charAt
(
1
)]();
rollback
();
return
o
};
p
.
andClose
=
function
(){
this
[
0
].
path
=
(
this
.
Path
+=
"x e"
);
return
this
};
if
(
typeof
l
==
"string"
){
p
.
absolutely
();
C
.
pathfinder
(
p
,
l
)}
return
p
};
var
u
=
function
(
o
,
a
){
var
s
=
o
[
0
].
style
;
o
.
attrs
=
o
.
attrs
||
{};
for
(
var
b
in
a
){
o
.
attrs
[
b
]
=
a
[
b
]}
a
[
"font-family"
]
&&
(
s
.
fontFamily
=
a
[
"font-family"
]);
a
[
"font-size"
]
&&
(
s
.
fontSize
=
a
[
"font-size"
]);
a
[
"font"
]
&&
(
s
.
font
=
a
[
"font"
]);
a
[
"font-weight"
]
&&
(
s
.
fontWeight
=
a
[
"font-weight"
]);
if
(
typeof
a
.
opacity
!=
"undefined"
||
typeof
a
[
"stroke-width"
]
!=
"undefined"
||
typeof
a
.
fill
!=
"undefined"
||
typeof
a
.
stroke
!=
"undefined"
){
o
=
o
.
shape
||
o
[
0
];
var
c
=
(
o
.
getElementsByTagName
(
"fill"
)
&&
o
.
getElementsByTagName
(
"fill"
)[
0
])
||
document
.
createElement
(
"rvml:fill"
);
if
(
"fill-opacity"
in
a
||
"opacity"
in
a
){
c
.
opacity
=
((
a
[
"fill-opacity"
]
+
1
||
2
)
-
1
)
*
((
a
.
opacity
+
1
||
2
)
-
1
)}
if
(
a
.
fill
){
c
.
on
=
true
}
if
(
c
.
on
==
undefined
||
a
.
fill
==
"none"
){
c
.
on
=
false
}
if
(
c
.
on
&&
a
.
fill
){
c
.
color
=
a
.
fill
}
o
.
appendChild
(
c
);
var
d
=
(
o
.
getElementsByTagName
(
"stroke"
)
&&
o
.
getElementsByTagName
(
"stroke"
)[
0
])
||
document
.
createElement
(
"rvml:stroke"
);
if
((
a
.
stroke
&&
a
.
stroke
!=
"none"
)
||
a
[
"stroke-width"
]
||
a
[
"stroke-opacity"
]
||
a
[
"stroke-dasharray"
]){
d
.
on
=
true
}
if
(
a
.
stroke
==
"none"
||
typeof
d
.
on
==
"undefined"
){
d
.
on
=
false
}
if
(
d
.
on
&&
a
.
stroke
){
d
.
color
=
a
.
stroke
}
d
.
opacity
=
((
a
[
"stroke-opacity"
]
+
1
||
2
)
-
1
)
*
((
a
.
opacity
+
1
||
2
)
-
1
);
a
[
"stroke-linejoin"
]
&&
(
d
.
joinstyle
=
a
[
"stroke-linejoin"
]
||
"miter"
);
d
.
miterlimit
=
a
[
"stroke-miterlimit"
]
||
8
;
a
[
"stroke-linecap"
]
&&
(
d
.
endcap
=
{
butt
:
"flat"
,
square
:
"square"
,
round
:
"round"
}[
a
[
"stroke-linecap"
]]
||
"miter"
);
a
[
"stroke-width"
]
&&
(
d
.
weight
=
(
parseFloat
(
a
[
"stroke-width"
],
10
)
||
1
)
*
12
/
16
);
if
(
a
[
"stroke-dasharray"
]){
var
e
=
a
[
"stroke-dasharray"
].
replace
(
" "
,
","
).
split
(
","
),
dashesn
=
[],
str
=
d
.
weight
;
for
(
var
i
=
0
,
ii
=
e
.
length
;
i
<
ii
;
i
++
){
var
f
=
e
[
i
]
/
str
;
if
(
!
isNaN
(
f
)){
dashesn
.
push
(
f
)}};
d
.
dashstyle
=
dashesn
.
join
(
" "
)}
o
.
appendChild
(
d
)}};
var
v
=
function
(
o
,
a
){
o
.
attrs
=
o
.
attrs
||
{};
o
.
attrs
.
gradient
=
a
;
o
=
o
.
shape
||
o
[
0
];
var
b
=
o
.
getElementsByTagName
(
"fill"
);
if
(
b
.
length
){
b
=
b
[
0
]}
else
{
b
=
document
.
createElement
(
"rvml:fill"
)}
if
(
a
.
dots
.
length
){
b
.
on
=
true
;
b
.
type
=
(
a
.
type
.
toLowerCase
()
==
"linear"
)?
"gradient"
:
"gradientradial"
;
if
(
typeof
a
.
dots
[
0
].
color
!=
"undefined"
){
b
.
color
=
a
.
dots
[
0
].
color
||
"#000"
}
if
(
typeof
a
.
dots
[
0
].
opacity
!=
"undefined"
){
b
.
opacity
=
a
.
dots
[
0
].
opacity
}
if
(
typeof
a
.
dots
[
a
.
dots
.
length
-
1
].
opacity
!=
"undefined"
){
b
.
opacity2
=
a
.
dots
[
a
.
dots
.
length
-
1
].
opacity
}
if
(
typeof
a
.
dots
[
a
.
dots
.
length
-
1
].
color
!=
"undefined"
){
b
.
color2
=
a
.
dots
[
a
.
dots
.
length
-
1
].
color
||
"#000"
}
var
c
=
""
;
for
(
var
i
=
1
,
ii
=
a
.
dots
.
length
-
1
;
i
<
ii
;
i
++
){
c
+=
a
.
dots
[
i
].
offset
+
" "
+
a
.
dots
[
i
].
color
;
if
(
i
!=
ii
-
1
){
c
+=
","
}};
if
(
c
){
b
.
colors
=
c
}
if
(
a
.
vector
){
var
d
=
Math
.
round
(
Math
.
atan
((
parseInt
(
a
.
vector
[
3
],
10
)
-
parseInt
(
a
.
vector
[
1
],
10
))
/
(
parseInt
(
a
.
vector
[
2
],
10
)
-
parseInt
(
a
.
vector
[
0
],
10
)))
*
57.29
)
+
180
;
b
.
angle
=
d
+
90
}
if
(
a
.
type
.
toLowerCase
()
==
"radial"
){
b
.
focusposition
=
"0.5, 0.5"
;
b
.
focussize
=
"0, 0"
;
b
.
method
=
"none"
}}};
var
z
=
function
(
b
,
c
,
d
){
var
e
=
0
,
RotX
=
0
,
RotY
=
0
,
Scale
=
1
;
this
[
0
]
=
b
;
this
.
node
=
b
;
this
.
X
=
0
;
this
.
Y
=
0
;
this
.
attrs
=
{};
this
.
Group
=
c
;
this
.
vml
=
d
;
this
.
rotate
=
function
(
a
){
if
(
a
==
undefined
){
return
e
}
e
+=
a
;
this
.
Group
.
style
.
rotation
=
e
;
return
this
}};
z
.
prototype
.
setBox
=
function
(
a
){
var
b
=
this
.
Group
.
style
,
os
=
this
[
0
].
style
;
for
(
var
i
in
a
){
this
.
attrs
[
i
]
=
a
[
i
]}
var
c
=
this
.
attrs
,
x
,
y
,
w
,
h
;
switch
(
this
.
type
){
case
"circle"
:
x
=
c
.
cx
-
c
.
r
;
y
=
c
.
cy
-
c
.
r
;
w
=
h
=
c
.
r
*
2
;
break
;
case
"ellipse"
:
x
=
c
.
cx
-
c
.
rx
;
y
=
c
.
cy
-
c
.
ry
;
w
=
c
.
rx
*
2
;
h
=
c
.
ry
*
2
;
break
;
case
"rect"
:
case
"image"
:
x
=
c
.
x
;
y
=
c
.
y
;
w
=
c
.
w
;
h
=
c
.
h
;
break
;
case
"text"
:
this
.
textpath
.
v
=
[
"m"
,
Math
.
round
(
c
.
x
),
", "
,
Math
.
round
(
c
.
y
-
2
),
"l"
,
Math
.
round
(
c
.
x
)
+
1
,
", "
,
Math
.
round
(
c
.
y
-
2
)].
join
(
""
);
return
;
default
:
return
}
var
d
=
this
.
vml
.
width
/
2
-
w
/
2
,
top
=
this
.
vml
.
height
/
2
-
h
/
2
;
b
.
position
=
"absolute"
;
b
.
left
=
x
-
d
+
"px"
;
b
.
top
=
y
-
top
+
"px"
;
this
.
X
=
x
-
d
;
this
.
Y
=
y
-
top
;
this
.
W
=
w
;
this
.
H
=
h
;
b
.
width
=
this
.
vml
.
width
+
"px"
;
b
.
height
=
this
.
vml
.
height
+
"px"
;
os
.
position
=
"absolute"
;
os
.
top
=
top
+
"px"
;
os
.
left
=
d
+
"px"
;
os
.
width
=
w
+
"px"
;
os
.
height
=
h
+
"px"
};
z
.
prototype
.
hide
=
function
(){
this
.
Group
.
style
.
display
=
"none"
;
return
this
};
z
.
prototype
.
show
=
function
(){
this
.
Group
.
style
.
display
=
"block"
;
return
this
};
z
.
prototype
.
translate
=
function
(
x
,
y
){
if
(
x
==
undefined
&&
y
==
undefined
){
return
{
x
:
this
.
X
,
y
:
this
.
Y
}}
this
.
X
+=
x
;
this
.
Y
+=
y
;
this
.
Group
.
style
.
left
=
this
.
X
+
"px"
;
this
.
Group
.
style
.
top
=
this
.
Y
+
"px"
;
return
this
};
z
.
prototype
.
matrix
=
function
(
a
,
b
,
c
,
d
,
e
,
f
){
tMatrix
=
new
Matrix
(
a
,
b
,
c
,
d
,
e
,
f
);
this
.
Group
.
style
.
filter
=
tMatrix
;
return
this
};
z
.
prototype
.
scale
=
function
(
x
,
y
){
if
(
x
==
undefined
&&
y
==
undefined
){
return
}
y
=
y
||
x
;
if
(
x
!=
0
&&!
(
x
==
1
&&
y
==
1
)){
var
a
=
Math
.
round
(
x
/
Math
.
abs
(
x
)),
diry
=
Math
.
round
(
y
/
Math
.
abs
(
y
)),
s
=
this
[
0
].
style
;
if
(
a
!=
1
||
diry
!=
1
){
s
.
filter
=
new
Matrix
(
a
,
0
,
0
,
diry
,
0
,
0
)}
var
b
=
parseInt
(
s
.
width
,
10
)
*
x
*
a
;
var
c
=
parseInt
(
s
.
height
,
10
)
*
y
*
diry
;
var
d
=
parseInt
(
s
.
left
,
10
);
var
e
=
parseInt
(
s
.
top
,
10
);
s
.
left
=
this
.
X
=
d
+
this
.
W
/
2
-
b
/
2
;
s
.
top
=
this
.
Y
=
e
+
this
.
H
/
2
-
c
/
2
;
s
.
width
=
this
.
W
=
b
;
s
.
height
=
this
.
H
=
c
}
return
this
};
z
.
prototype
.
getBBox
=
function
(){
return
{
x
:
this
.
Group
.
offsetLeft
,
y
:
this
.
Group
.
offsetTop
,
width
:
this
.
Group
.
offsetWidth
,
height
:
this
.
Group
.
offsetHeight
}};
z
.
prototype
.
remove
=
function
(){
this
[
0
].
parentNode
.
removeChild
(
this
[
0
]);
this
.
Group
.
parentNode
.
removeChild
(
this
.
Group
);
this
.
shape
&&
this
.
shape
.
parentNode
.
removeChild
(
this
.
shape
)};
z
.
prototype
.
attr
=
function
(){
if
(
arguments
.
length
==
1
&&
typeof
arguments
[
0
]
==
"string"
){
return
this
.
attrs
[
arguments
[
0
]]}
if
(
this
.
attrs
&&
arguments
.
length
==
1
&&
arguments
[
0
]
instanceof
Array
){
var
a
=
{};
for
(
var
i
=
0
,
ii
=
arguments
[
0
].
length
;
i
<
ii
;
i
++
){
a
[
arguments
[
0
][
i
]]
=
this
.
attrs
[
arguments
[
0
][
i
]]};
return
a
}
if
(
this
[
0
].
tagName
.
toLowerCase
()
==
"group"
){
var
b
=
this
[
0
].
childNodes
;
this
.
attrs
=
this
.
attrs
||
{};
if
(
arguments
.
length
==
2
){
this
.
attrs
[
arguments
[
0
]]
=
arguments
[
1
]}
else
if
(
arguments
.
length
==
1
||
typeof
arguments
[
0
]
==
"object"
){
for
(
var
j
in
arguments
[
0
]){
this
.
attrs
[
j
]
=
arguments
[
0
][
j
]}}
for
(
var
i
=
0
,
ii
=
b
.
length
;
i
<
ii
;
i
++
){
this
.
attr
.
apply
(
new
item
(
b
[
i
],
this
[
0
],
this
.
vml
),
arguments
)}}
else
{
var
c
;
if
(
arguments
.
length
==
2
){
c
=
{};
c
[
arguments
[
0
]]
=
arguments
[
1
]}
if
(
arguments
.
length
==
1
&&
typeof
arguments
[
0
]
==
"object"
){
c
=
arguments
[
0
]}
if
(
c
){
u
(
this
,
c
);
this
.
setBox
(
c
);
if
(
c
.
gradient
){
v
(
this
,
c
.
gradient
)}
if
(
c
.
text
&&
this
.
type
==
"text"
){
this
[
0
].
string
=
c
.
text
}
if
(
c
.
id
){
this
[
0
].
id
=
c
.
id
}}}
return
this
};
z
.
prototype
.
toFront
=
function
(){
this
.
Group
.
parentNode
.
appendChild
(
this
.
Group
);
return
this
};
z
.
prototype
.
toBack
=
function
(){
if
(
this
.
Group
.
parentNode
.
firstChild
!=
this
.
Group
){
this
.
Group
.
parentNode
.
insertBefore
(
this
.
Group
,
this
.
Group
.
parentNode
.
firstChild
)}
return
this
};
var
A
=
function
(
a
,
x
,
y
,
r
){
var
g
=
document
.
createElement
(
"rvml:group"
);
var
o
=
document
.
createElement
(
"rvml:oval"
);
g
.
appendChild
(
o
);
a
.
canvas
.
appendChild
(
g
);
var
b
=
new
z
(
o
,
g
,
a
);
u
(
b
,{
stroke
:
"#000"
,
fill
:
"none"
});
b
.
setBox
({
x
:
x
-
r
,
y
:
y
-
r
,
w
:
r
*
2
,
h
:
r
*
2
});
b
.
attrs
.
cx
=
x
;
b
.
attrs
.
cy
=
y
;
b
.
attrs
.
r
=
r
;
b
.
type
=
"circle"
;
return
b
};
var
B
=
function
(
a
,
x
,
y
,
w
,
h
,
r
){
var
g
=
document
.
createElement
(
"rvml:group"
);
var
o
=
document
.
createElement
(
r
?
"rvml:roundrect"
:
"rvml:rect"
);
if
(
r
){
o
.
arcsize
=
r
/
(
Math
.
min
(
w
,
h
))}
g
.
appendChild
(
o
);
a
.
canvas
.
appendChild
(
g
);
var
b
=
new
z
(
o
,
g
,
a
);
u
(
b
,{
stroke
:
"#000"
});
b
.
setBox
({
x
:
x
,
y
:
y
,
w
:
w
,
h
:
h
});
b
.
attrs
.
x
=
x
;
b
.
attrs
.
y
=
y
;
b
.
attrs
.
w
=
w
;
b
.
attrs
.
h
=
h
;
b
.
attrs
.
r
=
r
;
b
.
type
=
"rect"
;
return
b
};
var
D
=
function
(
a
,
x
,
y
,
b
,
c
){
var
g
=
document
.
createElement
(
"rvml:group"
);
var
o
=
document
.
createElement
(
"rvml:oval"
);
g
.
appendChild
(
o
);
a
.
canvas
.
appendChild
(
g
);
var
d
=
new
z
(
o
,
g
,
a
);
u
(
d
,{
stroke
:
"#000"
});
d
.
setBox
({
x
:
x
-
b
,
y
:
y
-
c
,
w
:
b
*
2
,
h
:
c
*
2
});
d
.
attrs
.
cx
=
x
;
d
.
attrs
.
cy
=
y
;
d
.
attrs
.
rx
=
b
;
d
.
attrs
.
ry
=
c
;
d
.
type
=
"ellipse"
;
return
d
};
var
E
=
function
(
a
,
b
,
x
,
y
,
w
,
h
){
var
g
=
document
.
createElement
(
"rvml:group"
);
var
o
=
document
.
createElement
(
"rvml:image"
);
o
.
src
=
b
;
g
.
appendChild
(
o
);
a
.
canvas
.
appendChild
(
g
);
var
c
=
new
z
(
o
,
g
,
a
);
c
.
type
=
"image"
;
c
.
setBox
({
x
:
x
,
y
:
y
,
w
:
w
,
h
:
h
});
c
.
attrs
.
x
=
x
;
c
.
attrs
.
y
=
y
;
c
.
attrs
.
w
=
w
;
c
.
attrs
.
h
=
h
;
return
c
};
var
F
=
function
(
a
,
x
,
y
,
b
){
var
g
=
document
.
createElement
(
"rvml:group"
),
gs
=
g
.
style
;
var
c
=
document
.
createElement
(
"rvml:shape"
),
ol
=
c
.
style
;
var
d
=
document
.
createElement
(
"rvml:path"
),
ps
=
d
.
style
;
d
.
v
=
[
"m"
,
Math
.
round
(
x
),
", "
,
Math
.
round
(
y
-
2
),
"l"
,
Math
.
round
(
x
)
+
1
,
", "
,
Math
.
round
(
y
-
2
)].
join
(
""
);
d
.
textpathok
=
true
;
ol
.
width
=
a
.
width
;
ol
.
height
=
a
.
height
;
gs
.
position
=
"absolute"
;
gs
.
left
=
0
;
gs
.
top
=
0
;
gs
.
width
=
a
.
width
;
gs
.
height
=
a
.
height
;
var
o
=
document
.
createElement
(
"rvml:textpath"
);
o
.
string
=
b
;
o
.
on
=
true
;
o
.
coordsize
=
a
.
coordsize
;
o
.
coordorigin
=
a
.
coordorigin
;
c
.
appendChild
(
o
);
c
.
appendChild
(
d
);
g
.
appendChild
(
c
);
a
.
canvas
.
appendChild
(
g
);
var
e
=
new
z
(
o
,
g
,
a
);
e
.
shape
=
c
;
e
.
textpath
=
d
;
e
.
type
=
"text"
;
e
.
attrs
.
x
=
x
;
e
.
attrs
.
y
=
y
;
e
.
attrs
.
w
=
1
;
e
.
attrs
.
h
=
1
;
return
e
};
var
G
=
function
(
a
){
var
b
=
document
.
createElement
(
"rvml:group"
),
els
=
b
.
style
;
els
.
position
=
"absolute"
;
els
.
left
=
0
;
els
.
top
=
0
;
els
.
width
=
a
.
width
;
els
.
height
=
a
.
height
;
if
(
a
.
canvas
){
a
.
canvas
.
appendChild
(
b
)}
var
c
=
new
z
(
b
,
b
,
a
);
for
(
var
f
in
a
){
if
(
f
.
charAt
(
0
)
!=
"_"
&&
typeof
a
[
f
]
==
"function"
){
c
[
f
]
=
(
function
(
f
){
return
function
(){
var
e
=
a
[
f
].
apply
(
a
,
arguments
);
b
.
appendChild
(
e
[
0
].
parentNode
);
return
e
}})(
f
)}}
c
.
type
=
"group"
;
return
c
};
r
.
_create
=
function
(){
var
d
,
width
,
height
;
if
(
typeof
arguments
[
0
]
==
"string"
){
d
=
document
.
getElementById
(
arguments
[
0
]);
width
=
arguments
[
1
];
height
=
arguments
[
2
]}
if
(
typeof
arguments
[
0
]
==
"object"
){
d
=
arguments
[
0
];
width
=
arguments
[
1
];
height
=
arguments
[
2
]}
if
(
typeof
arguments
[
0
]
==
"number"
){
d
=
1
;
x
=
arguments
[
0
];
y
=
arguments
[
1
];
width
=
arguments
[
2
];
height
=
arguments
[
3
]}
if
(
!
d
){
throw
new
Error
(
"VML container not found."
);}
if
(
!
document
.
namespaces
[
"rvml"
]){
document
.
namespaces
.
add
(
"rvml"
,
"urn:schemas-microsoft-com:vml"
);
document
.
createStyleSheet
().
addRule
(
"rvml\\:*"
,
"behavior:url(#default#VML)"
)}
var
c
=
document
.
createElement
(
"div"
),
r
=
C
.
canvas
=
document
.
createElement
(
"rvml:group"
),
cs
=
c
.
style
,
rs
=
r
.
style
;
C
.
width
=
width
;
C
.
height
=
height
;
width
=
width
||
"320px"
;
height
=
height
||
"200px"
;
cs
.
clip
=
"rect(0 "
+
width
+
" "
+
height
+
" 0)"
;
cs
.
position
=
"absolute"
;
rs
.
width
=
width
;
rs
.
height
=
height
;
r
.
coordsize
=
(
width
==
"100%"
?
width
:
parseFloat
(
width
))
+
" "
+
(
height
==
"100%"
?
height
:
parseFloat
(
height
));
r
.
coordorigin
=
"0 0"
;
var
b
=
document
.
createElement
(
"rvml:rect"
),
bs
=
b
.
style
;
bs
.
left
=
bs
.
top
=
0
;
bs
.
width
=
rs
.
width
;
bs
.
height
=
rs
.
height
;
b
.
filled
=
b
.
stroked
=
"f"
;
r
.
appendChild
(
b
);
c
.
appendChild
(
r
);
if
(
d
==
1
){
document
.
body
.
appendChild
(
c
);
cs
.
position
=
"absolute"
;
cs
.
left
=
x
+
"px"
;
cs
.
top
=
y
+
"px"
;
cs
.
width
=
width
;
cs
.
height
=
height
;
d
=
{
style
:{
width
:
width
,
height
:
height
}}}
else
{
cs
.
width
=
d
.
style
.
width
=
width
;
cs
.
height
=
d
.
style
.
height
=
height
;
if
(
d
.
firstChild
){
d
.
insertBefore
(
c
,
d
.
firstChild
)}
else
{
d
.
appendChild
(
c
)}}
for
(
var
e
in
C
){
d
[
e
]
=
C
[
e
]}
d
.
clear
=
function
(){
var
a
=
[];
for
(
var
i
=
0
,
ii
=
r
.
childNodes
.
length
;
i
<
ii
;
i
++
){
if
(
r
.
childNodes
[
i
]
!=
b
){
a
.
push
(
r
.
childNodes
[
i
])}}
for
(
i
=
0
,
ii
=
a
.
length
;
i
<
ii
;
i
++
){
r
.
removeChild
(
a
[
i
])}};
return
d
};
C
.
remove
=
function
(){
C
.
canvas
.
parentNode
.
parentNode
.
removeChild
(
C
.
canvas
.
parentNode
)}}
if
(
q
==
"SVG"
){
Matrix
.
prototype
.
toString
=
function
(){
return
"matrix("
+
this
.
m
[
0
][
0
]
+
", "
+
this
.
m
[
1
][
0
]
+
", "
+
this
.
m
[
0
][
1
]
+
", "
+
this
.
m
[
1
][
1
]
+
", "
+
this
.
m
[
2
][
0
]
+
", "
+
this
.
m
[
2
][
1
]
+
")"
};
var
t
=
function
(
j
,
k
,
l
){
var
m
=
document
.
createElementNS
(
l
.
svgns
,
"path"
);
m
.
setAttribute
(
"fill"
,
"none"
);
if
(
j
){
for
(
var
n
in
j
){
if
(
j
.
gradient
){
v
(
m
,
j
.
gradient
,
l
)}
else
{
m
.
setAttribute
(
n
,
j
[
n
])}}}
if
(
l
.
canvas
){
l
.
canvas
.
appendChild
(
m
)}
var
p
=
new
z
(
m
,
l
);
for
(
var
n
in
j
){
p
.
attrs
[
n
]
=
j
[
n
]}
p
.
isAbsolute
=
true
;
p
.
path
=
[];
p
.
last
=
{
x
:
0
,
y
:
0
,
bx
:
0
,
by
:
0
};
p
.
absolutely
=
function
(){
this
.
isAbsolute
=
true
;
return
this
};
p
.
relatively
=
function
(){
this
.
isAbsolute
=
false
;
return
this
};
p
.
redraw
=
function
(){
this
[
0
].
setAttribute
(
"d"
,
"M0 0"
);
var
a
=
this
.
path
;
this
.
path
=
[];
for
(
var
i
=
0
,
ii
=
a
.
length
;
i
<
ii
;
i
++
){
if
(
a
[
i
].
type
!=
"end"
){
this
[
a
[
i
].
type
+
"To"
].
apply
(
this
,
a
[
i
].
arg
)}
else
{
this
.
andClose
()}}
return
this
};
p
.
moveTo
=
function
(
x
,
y
){
var
d
=
this
.
isAbsolute
?
"M"
:
"m"
;
var
a
=
this
.
isAbsolute
?
l
.
_getX
:
l
.
_getW
;
var
b
=
this
.
isAbsolute
?
l
.
_getY
:
l
.
_getH
;
d
+=
a
(
parseFloat
(
x
,
10
))
+
" "
+
b
(
parseFloat
(
y
,
10
))
+
" "
;
var
c
=
this
[
0
].
getAttribute
(
"d"
)
||
""
;
this
[
0
].
setAttribute
(
"d"
,
c
+
d
);
this
.
last
.
x
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
x
)
+
l
.
_getX
(
parseFloat
(
x
,
10
));
this
.
last
.
y
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
y
)
+
l
.
_getY
(
parseFloat
(
y
,
10
));
this
.
path
.
push
({
type
:
"move"
,
arg
:
arguments
,
pos
:
this
.
isAbsolute
});
return
this
};
p
.
lineTo
=
function
(
x
,
y
){
this
.
last
.
x
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
x
)
+
l
.
_getX
(
parseFloat
(
x
,
10
));
this
.
last
.
y
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
y
)
+
l
.
_getY
(
parseFloat
(
y
,
10
));
var
d
=
this
.
isAbsolute
?
"L"
:
"l"
;
var
a
=
this
.
isAbsolute
?
l
.
_getX
:
l
.
_getW
;
var
b
=
this
.
isAbsolute
?
l
.
_getY
:
l
.
_getH
;
d
+=
a
(
parseFloat
(
x
,
10
))
+
" "
+
b
(
parseFloat
(
y
,
10
))
+
" "
;
var
c
=
this
[
0
].
getAttribute
(
"d"
)
||
""
;
this
[
0
].
setAttribute
(
"d"
,
c
+
d
);
this
.
path
.
push
({
type
:
"line"
,
arg
:
arguments
,
pos
:
this
.
isAbsolute
});
return
this
};
p
.
arcTo
=
function
(
a
,
b
,
c
,
e
,
x
,
y
){
var
d
=
this
.
isAbsolute
?
"A"
:
"a"
;
var
f
=
this
.
isAbsolute
?
l
.
_getX
:
l
.
_getW
;
var
g
=
this
.
isAbsolute
?
l
.
_getY
:
l
.
_getH
;
d
+=
[
l
.
_getW
(
parseFloat
(
a
,
10
)),
l
.
_getH
(
parseFloat
(
b
,
10
)),
0
,
c
,
e
,
f
(
parseFloat
(
x
,
10
)),
g
(
parseFloat
(
y
,
10
))].
join
(
" "
);
var
h
=
this
[
0
].
getAttribute
(
"d"
)
||
""
;
this
[
0
].
setAttribute
(
"d"
,
h
+
d
);
this
.
last
.
x
=
l
.
_getX
(
parseFloat
(
x
,
10
));
this
.
last
.
y
=
l
.
_getY
(
parseFloat
(
y
,
10
));
this
.
path
.
push
({
type
:
"arc"
,
arg
:
arguments
,
pos
:
this
.
isAbsolute
});
return
this
};
p
.
cplineTo
=
function
(
a
,
b
,
c
){
if
(
!
c
){
return
this
.
lineTo
(
a
,
b
)}
else
{
var
p
=
{};
p
.
_getX
=
this
.
isAbsolute
?
l
.
_getX
:
l
.
_getW
;
p
.
_getY
=
this
.
isAbsolute
?
l
.
_getY
:
l
.
_getH
;
var
x
=
p
.
_getX
(
Math
.
round
(
parseFloat
(
a
,
10
)
*
100
)
/
100
);
var
y
=
p
.
_getY
(
Math
.
round
(
parseFloat
(
b
,
10
)
*
100
)
/
100
);
var
w
=
l
.
_getW
(
Math
.
round
(
parseFloat
(
c
,
10
)
*
100
)
/
100
);
var
d
=
this
.
isAbsolute
?
"C"
:
"c"
;
var
e
=
[
this
.
last
.
x
+
w
,
this
.
last
.
y
,
x
-
w
,
y
,
x
,
y
];
for
(
var
i
=
0
,
ii
=
e
.
length
;
i
<
ii
;
i
++
){
d
+=
e
[
i
]
+
" "
}
this
.
last
.
x
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
x
)
+
e
[
4
];
this
.
last
.
y
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
y
)
+
e
[
5
];
this
.
last
.
bx
=
e
[
2
];
this
.
last
.
by
=
e
[
3
];
var
f
=
this
[
0
].
getAttribute
(
"d"
)
||
""
;
this
[
0
].
setAttribute
(
"d"
,
f
+
d
);
this
.
path
.
push
({
type
:
"cpline"
,
arg
:
arguments
,
pos
:
this
.
isAbsolute
});
return
this
}};
p
.
curveTo
=
function
(){
var
p
=
{};
p
.
_getX
=
this
.
isAbsolute
?
l
.
_getX
:
l
.
_getW
;
p
.
_getY
=
this
.
isAbsolute
?
l
.
_getY
:
l
.
_getH
;
if
(
arguments
.
length
==
6
){
var
d
=
this
.
isAbsolute
?
"C"
:
"c"
;
for
(
var
i
=
0
,
ii
=
arguments
.
length
;
i
<
ii
;
i
++
){
d
+=
p
[(
i
%
2
==
0
)?
"_getX"
:
"_getY"
](
Math
.
round
(
parseFloat
(
arguments
[
i
],
10
)
*
100
)
/
100
)
+
" "
}
this
.
last
.
x
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
x
)
+
p
.
_getX
((
parseFloat
(
arguments
[
4
],
10
)
*
100
)
/
100
);
this
.
last
.
y
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
y
)
+
p
.
_getY
((
parseFloat
(
arguments
[
5
],
10
)
*
100
)
/
100
);
this
.
last
.
bx
=
p
.
_getX
((
parseFloat
(
arguments
[
2
],
10
)
*
100
)
/
100
);
this
.
last
.
by
=
p
.
_getY
((
parseFloat
(
arguments
[
3
],
10
)
*
100
)
/
100
)}
else
{
if
(
arguments
.
length
==
4
){
var
d
=
this
.
isAbsolute
?
"S"
:
"s"
;
for
(
var
i
=
0
,
ii
=
arguments
.
length
;
i
<
ii
;
i
++
){
d
+=
p
[
i
%
2
==
0
?
"_getX"
:
"_getY"
]((
parseFloat
(
arguments
[
i
],
10
)
*
100
)
/
100
)
+
" "
}}
this
.
last
.
x
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
x
)
+
p
.
_getX
((
parseFloat
(
arguments
[
2
],
10
)
*
100
)
/
100
);
this
.
last
.
y
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
y
)
+
p
.
_getY
((
parseFloat
(
arguments
[
3
],
10
)
*
100
)
/
100
);
this
.
last
.
bx
=
p
.
_getX
((
parseFloat
(
arguments
[
0
],
10
)
*
100
)
/
100
);
this
.
last
.
by
=
p
.
_getY
((
parseFloat
(
arguments
[
1
],
10
)
*
100
)
/
100
)}
var
a
=
this
[
0
].
getAttribute
(
"d"
)
||
""
;
this
[
0
].
setAttribute
(
"d"
,
a
+
d
);
this
.
path
.
push
({
type
:
"curve"
,
arg
:
arguments
,
pos
:
this
.
isAbsolute
});
return
this
};
p
.
addRoundedCorner
=
function
(
r
,
a
){
var
R
=
.
5522
*
r
,
rollback
=
this
.
isAbsolute
,
o
=
this
;
if
(
rollback
){
this
.
relatively
();
rollback
=
function
(){
o
.
absolutely
()}}
else
{
rollback
=
function
(){}}
var
b
=
{
l
:
function
(){
return
{
u
:
function
(){
o
.
curveTo
(
-
R
,
0
,
-
r
,
-
(
r
-
R
),
-
r
,
-
r
)},
d
:
function
(){
o
.
curveTo
(
-
R
,
0
,
-
r
,
r
-
R
,
-
r
,
r
)}}},
r
:
function
(){
return
{
u
:
function
(){
o
.
curveTo
(
R
,
0
,
r
,
-
(
r
-
R
),
r
,
-
r
)},
d
:
function
(){
o
.
curveTo
(
R
,
0
,
r
,
r
-
R
,
r
,
r
)}}},
u
:
function
(){
return
{
r
:
function
(){
o
.
curveTo
(
0
,
-
R
,
-
(
R
-
r
),
-
r
,
r
,
-
r
)},
l
:
function
(){
o
.
curveTo
(
0
,
-
R
,
R
-
r
,
-
r
,
-
r
,
-
r
)}}},
d
:
function
(){
return
{
r
:
function
(){
o
.
curveTo
(
0
,
R
,
-
(
R
-
r
),
r
,
r
,
r
)},
l
:
function
(){
o
.
curveTo
(
0
,
R
,
R
-
r
,
r
,
-
r
,
r
)}}}};
b
[
a
[
0
]]()[
a
[
1
]]();
rollback
();
return
o
};
p
.
andClose
=
function
(){
var
a
=
this
[
0
].
getAttribute
(
"d"
)
||
""
;
this
[
0
].
setAttribute
(
"d"
,
a
+
"Z "
);
this
.
path
.
push
({
type
:
"end"
});
return
this
};
if
(
typeof
k
==
"string"
){
p
.
absolutely
();
C
.
pathfinder
(
p
,
k
)}
return
p
};
var
v
=
function
(
o
,
a
,
b
){
var
c
=
document
.
createElementNS
(
b
.
svgns
,
a
.
type
+
"Gradient"
);
c
.
id
=
"raphael-gradient-"
+
b
.
gradients
++
;
if
(
a
.
vector
&&
a
.
vector
.
length
){
c
.
setAttribute
(
"x1"
,
a
.
vector
[
0
]);
c
.
setAttribute
(
"y1"
,
a
.
vector
[
1
]);
c
.
setAttribute
(
"x2"
,
a
.
vector
[
2
]);
c
.
setAttribute
(
"y2"
,
a
.
vector
[
3
])}
b
.
defs
.
appendChild
(
c
);
for
(
var
i
=
0
,
ii
=
a
.
dots
.
length
;
i
<
ii
;
i
++
){
var
d
=
document
.
createElementNS
(
b
.
svgns
,
"stop"
);
d
.
setAttribute
(
"offset"
,
a
.
dots
[
i
].
offset
?
a
.
dots
[
i
].
offset
:(
i
==
0
)?
"0%"
:
"100%"
);
d
.
setAttribute
(
"stop-color"
,
a
.
dots
[
i
].
color
||
"#fff"
);
if
(
typeof
a
.
dots
[
i
].
opacity
!=
"undefined"
){
d
.
setAttribute
(
"stop-opacity"
,
a
.
dots
[
i
].
opacity
)}
c
.
appendChild
(
d
)};
o
.
setAttribute
(
"fill"
,
"url(#"
+
c
.
id
+
")"
)};
var
z
=
function
(
c
,
d
){
var
X
=
0
,
Y
=
0
,
Rotation
=
{
deg
:
0
,
x
:
0
,
y
:
0
},
ScaleX
=
1
,
ScaleY
=
1
,
tMatrix
=
null
;
this
[
0
]
=
c
;
this
.
node
=
c
;
this
.
svg
=
d
;
this
.
attrs
=
this
.
attrs
||
{};
this
.
transformations
=
[];
this
.
rotate
=
function
(
a
){
if
(
a
==
undefined
){
return
Rotation
.
deg
}
var
b
=
this
.
getBBox
();
Rotation
.
deg
+=
a
;
if
(
Rotation
.
deg
){
this
.
transformations
[
0
]
=
(
"rotate("
+
Rotation
.
deg
+
" "
+
(
b
.
x
+
b
.
width
/
2
)
+
" "
+
(
b
.
y
+
b
.
height
/
2
)
+
")"
)}
else
{
this
.
transformations
[
0
]
=
""
}
this
[
0
].
setAttribute
(
"transform"
,
this
.
transformations
.
join
(
" "
));
return
this
};
this
.
translate
=
function
(
x
,
y
){
if
(
x
==
undefined
&&
y
==
undefined
){
return
{
x
:
X
,
y
:
Y
}}
X
+=
x
;
Y
+=
y
;
if
(
X
&&
Y
){
this
.
transformations
[
1
]
=
"translate("
+
X
+
","
+
Y
+
")"
}
else
{
this
.
transformations
[
1
]
=
""
}
this
[
0
].
setAttribute
(
"transform"
,
this
.
transformations
.
join
(
" "
));
return
this
};
this
.
scale
=
function
(
x
,
y
){
if
(
x
==
undefined
&&
y
==
undefined
){
return
{
x
:
ScaleX
,
y
:
ScaleY
}}
y
=
y
||
x
;
if
(
x
!=
0
&&!
(
x
==
1
&&
y
==
1
)){
ScaleX
*=
x
;
ScaleY
*=
y
;
if
(
!
(
ScaleX
==
1
&&
ScaleY
==
1
)){
var
a
=
this
.
getBBox
(),
dx
=
a
.
x
*
(
1
-
ScaleX
)
+
(
a
.
width
/
2
-
a
.
width
*
ScaleX
/
2
),
dy
=
a
.
y
*
(
1
-
ScaleY
)
+
(
a
.
height
/
2
-
a
.
height
*
ScaleY
/
2
);
this
.
transformations
[
2
]
=
new
Matrix
(
ScaleX
,
0
,
0
,
ScaleY
,
dx
,
dy
)}
else
{
this
.
transformations
[
2
]
=
""
}
this
[
0
].
setAttribute
(
"transform"
,
this
.
transformations
.
join
(
" "
))}
return
this
}};
z
.
prototype
.
hide
=
function
(){
this
[
0
].
style
.
display
=
"none"
;
return
this
};
z
.
prototype
.
show
=
function
(){
this
[
0
].
style
.
display
=
"block"
;
return
this
};
z
.
prototype
.
matrix
=
function
(
a
,
b
,
c
,
d
,
e
,
f
){
this
.
transformations
[
3
]
=
new
Matrix
(
a
,
b
,
c
,
d
,
e
,
f
);
this
[
0
].
setAttribute
(
"transform"
,
this
.
transformations
.
join
(
" "
));
return
this
};
z
.
prototype
.
remove
=
function
(){
this
[
0
].
parentNode
.
removeChild
(
this
[
0
])};
z
.
prototype
.
getBBox
=
function
(){
return
this
[
0
].
getBBox
()};
z
.
prototype
.
attr
=
function
(){
if
(
arguments
.
length
==
1
&&
typeof
arguments
[
0
]
==
"string"
){
return
this
[
0
].
getAttribute
(
arguments
[
0
])}
if
(
arguments
.
length
==
1
&&
arguments
[
0
]
instanceof
Array
){
var
a
=
{};
for
(
var
j
in
arguments
[
0
]){
a
[
arguments
[
0
][
j
]]
=
this
.
attrs
[
arguments
[
0
][
j
]]}
return
a
}
if
(
arguments
.
length
==
2
){
var
b
=
arguments
[
0
],
value
=
arguments
[
1
];
this
[
b
]
=
value
;
this
.
attrs
[
b
]
=
value
;
switch
(
b
){
case
"rx"
:
case
"cx"
:
case
"x"
:
this
[
0
].
setAttribute
(
b
,
this
.
svg
.
_getX
(
value
));
break
;
case
"ry"
:
case
"cy"
:
case
"y"
:
this
[
0
].
setAttribute
(
b
,
this
.
svg
.
_getY
(
value
));
break
;
case
"width"
:
this
[
0
].
setAttribute
(
b
,
this
.
svg
.
_getW
(
value
));
break
;
case
"height"
:
this
[
0
].
setAttribute
(
b
,
this
.
svg
.
_getH
(
value
));
break
;
case
"gradient"
:
v
(
this
[
0
],
value
,
this
.
svg
);
break
;
case
"stroke-dasharray"
:
this
[
0
].
setAttribute
(
b
,
value
.
replace
(
" "
,
","
));
break
;
case
"text"
:
if
(
this
.
type
==
"text"
){
this
[
0
].
removeChild
(
this
[
0
].
firstChild
);
this
[
0
].
appendChild
(
document
.
createTextNode
(
value
))}
break
;
default
:
var
c
=
b
.
replace
(
/
(\-
.
)
/g
,
function
(
w
){
return
w
.
substring
(
1
).
toUpperCase
()});
this
[
0
].
style
[
c
]
=
value
;
this
[
0
].
setAttribute
(
b
,
value
);
break
}}
else
if
(
arguments
.
length
==
1
&&
typeof
arguments
[
0
]
==
"object"
){
var
d
=
arguments
[
0
];
for
(
var
e
in
d
){
this
.
attrs
[
e
]
=
d
[
e
];
if
(
e
==
"stroke-dasharray"
){
this
[
0
].
setAttribute
(
e
,
d
[
e
].
replace
(
" "
,
","
))}
else
if
(
e
==
"text"
&&
this
.
type
==
"text"
){
this
[
0
].
childNodes
.
length
&&
this
[
0
].
removeChild
(
this
[
0
].
firstChild
);
this
[
0
].
appendChild
(
document
.
createTextNode
(
d
.
text
))}
else
{
var
c
=
e
.
replace
(
/
(\-
.
)
/g
,
function
(
w
){
return
w
.
substring
(
1
).
toUpperCase
()});
this
[
0
].
style
[
c
]
=
d
[
e
];
this
[
0
].
setAttribute
(
e
,
d
[
e
])}}
if
(
d
.
gradient
){
this
.
attrs
.
gradient
=
d
.
gradient
;
v
(
this
[
0
],
d
.
gradient
,
this
.
svg
)}}
return
this
};
z
.
prototype
.
toFront
=
function
(){
this
[
0
].
parentNode
.
appendChild
(
this
[
0
]);
return
this
};
z
.
prototype
.
toBack
=
function
(){
if
(
this
[
0
].
parentNode
.
firstChild
!=
this
[
0
]){
this
[
0
].
parentNode
.
insertBefore
(
this
[
0
],
this
[
0
].
parentNode
.
firstChild
)}
return
this
};
var
A
=
function
(
a
,
x
,
y
,
r
){
var
b
=
document
.
createElementNS
(
a
.
svgns
,
"circle"
);
b
.
setAttribute
(
"cx"
,
a
.
_getX
(
x
));
b
.
setAttribute
(
"cy"
,
a
.
_getY
(
y
));
b
.
setAttribute
(
"r"
,
r
);
b
.
setAttribute
(
"fill"
,
"none"
);
b
.
setAttribute
(
"stroke"
,
"#000"
);
if
(
a
.
canvas
){
a
.
canvas
.
appendChild
(
b
)}
var
c
=
new
z
(
b
,
a
);
c
.
attrs
=
c
.
attrs
||
{};
c
.
attrs
.
cx
=
x
;
c
.
attrs
.
cy
=
y
;
c
.
attrs
.
r
=
r
;
c
.
attrs
.
stroke
=
"#000"
;
c
.
type
=
"circle"
;
return
c
};
var
B
=
function
(
a
,
x
,
y
,
w
,
h
,
r
){
var
b
=
document
.
createElementNS
(
a
.
svgns
,
"rect"
);
b
.
setAttribute
(
"x"
,
a
.
_getX
(
x
));
b
.
setAttribute
(
"y"
,
a
.
_getY
(
y
));
b
.
setAttribute
(
"width"
,
a
.
_getW
(
w
));
b
.
setAttribute
(
"height"
,
a
.
_getH
(
h
));
if
(
r
){
b
.
setAttribute
(
"rx"
,
r
);
b
.
setAttribute
(
"ry"
,
r
)}
b
.
setAttribute
(
"fill"
,
"none"
);
b
.
setAttribute
(
"stroke"
,
"#000"
);
if
(
a
.
canvas
){
a
.
canvas
.
appendChild
(
b
)}
var
c
=
new
z
(
b
,
a
);
c
.
attrs
=
c
.
attrs
||
{};
c
.
attrs
.
x
=
x
;
c
.
attrs
.
y
=
y
;
c
.
attrs
.
width
=
w
;
c
.
attrs
.
height
=
h
;
c
.
attrs
.
stroke
=
"#000"
;
if
(
r
){
c
.
attrs
.
rx
=
c
.
attrs
.
ry
=
r
}
c
.
type
=
"rect"
;
return
c
};
var
D
=
function
(
a
,
x
,
y
,
b
,
c
){
var
d
=
document
.
createElementNS
(
a
.
svgns
,
"ellipse"
);
d
.
setAttribute
(
"cx"
,
a
.
_getX
(
x
));
d
.
setAttribute
(
"cy"
,
a
.
_getY
(
y
));
d
.
setAttribute
(
"rx"
,
a
.
_getW
(
b
));
d
.
setAttribute
(
"ry"
,
a
.
_getH
(
c
));
d
.
setAttribute
(
"fill"
,
"none"
);
d
.
setAttribute
(
"stroke"
,
"#000"
);
if
(
a
.
canvas
){
a
.
canvas
.
appendChild
(
d
)}
var
e
=
new
z
(
d
,
a
);
e
.
attrs
=
e
.
attrs
||
{};
e
.
attrs
.
cx
=
x
;
e
.
attrs
.
cy
=
y
;
e
.
attrs
.
rx
=
b
;
e
.
attrs
.
ry
=
c
;
e
.
attrs
.
stroke
=
"#000"
;
e
.
type
=
"ellipse"
;
return
e
};
var
E
=
function
(
a
,
b
,
x
,
y
,
w
,
h
){
var
c
=
document
.
createElementNS
(
a
.
svgns
,
"image"
);
c
.
setAttribute
(
"x"
,
a
.
_getX
(
x
));
c
.
setAttribute
(
"y"
,
a
.
_getY
(
y
));
c
.
setAttribute
(
"width"
,
a
.
_getW
(
w
));
c
.
setAttribute
(
"height"
,
a
.
_getH
(
h
));
c
.
setAttributeNS
(
a
.
xlink
,
"href"
,
b
);
if
(
a
.
canvas
){
a
.
canvas
.
appendChild
(
c
)}
var
d
=
new
z
(
c
,
a
);
d
.
attrs
=
d
.
attrs
||
{};
d
.
attrs
.
x
=
x
;
d
.
attrs
.
y
=
y
;
d
.
attrs
.
width
=
w
;
d
.
attrs
.
height
=
h
;
d
.
type
=
"image"
;
return
d
};
var
F
=
function
(
a
,
x
,
y
,
b
){
var
c
=
document
.
createElementNS
(
a
.
svgns
,
"text"
);
c
.
setAttribute
(
"x"
,
x
);
c
.
setAttribute
(
"y"
,
y
);
c
.
setAttribute
(
"text-anchor"
,
"middle"
);
c
.
setAttribute
(
"fill"
,
"#000"
);
if
(
b
){
c
.
appendChild
(
document
.
createTextNode
(
b
))}
if
(
a
.
canvas
){
a
.
canvas
.
appendChild
(
c
)}
var
d
=
new
z
(
c
,
a
);
d
.
attrs
=
d
.
attrs
||
{};
d
.
attrs
.
x
=
x
;
d
.
attrs
.
y
=
y
;
d
.
attrs
.
fill
=
"#000"
;
d
.
type
=
"text"
;
return
d
};
var
G
=
function
(
a
){
var
b
=
document
.
createElementNS
(
a
.
svgns
,
"g"
);
if
(
a
.
canvas
){
a
.
canvas
.
appendChild
(
b
)}
var
i
=
new
z
(
b
,
a
);
for
(
var
f
in
a
){
if
(
f
[
0
]
!=
"_"
&&
typeof
a
[
f
]
==
"function"
){
i
[
f
]
=
(
function
(
f
){
return
function
(){
var
e
=
a
[
f
].
apply
(
a
,
arguments
);
b
.
appendChild
(
e
[
0
]);
return
e
}})(
f
)}}
i
.
type
=
"group"
;
return
i
};
r
.
_create
=
function
(){
if
(
typeof
arguments
[
0
]
==
"string"
){
var
a
=
document
.
getElementById
(
arguments
[
0
]);
var
b
=
arguments
[
1
];
var
c
=
arguments
[
2
]}
if
(
typeof
arguments
[
0
]
==
"object"
){
var
a
=
arguments
[
0
];
var
b
=
arguments
[
1
];
var
c
=
arguments
[
2
]}
if
(
typeof
arguments
[
0
]
==
"number"
){
var
a
=
1
,
x
=
arguments
[
0
],
y
=
arguments
[
1
],
b
=
arguments
[
2
],
c
=
arguments
[
3
]}
if
(
!
a
){
throw
new
Error
(
"SVG container not found."
);}
C
.
canvas
=
document
.
createElementNS
(
C
.
svgns
,
"svg"
);
C
.
canvas
.
setAttribute
(
"width"
,
b
||
320
);
C
.
width
=
b
||
320
;
C
.
canvas
.
setAttribute
(
"height"
,
c
||
200
);
C
.
height
=
c
||
200
;
if
(
a
==
1
){
document
.
body
.
appendChild
(
C
.
canvas
);
C
.
canvas
.
style
.
position
=
"absolute"
;
C
.
canvas
.
style
.
left
=
x
+
"px"
;
C
.
canvas
.
style
.
top
=
y
+
"px"
}
else
{
if
(
a
.
firstChild
){
a
.
insertBefore
(
C
.
canvas
,
a
.
firstChild
)}
else
{
a
.
appendChild
(
C
.
canvas
)}}
a
=
{
canvas
:
C
.
canvas
,
clear
:
function
(){
while
(
this
.
canvas
.
firstChild
){
this
.
canvas
.
removeChild
(
this
.
canvas
.
firstChild
)}
this
.
defs
=
document
.
createElementNS
(
C
.
svgns
,
"defs"
);
this
.
gradients
=
0
;
this
.
canvas
.
appendChild
(
this
.
defs
)}};
for
(
var
d
in
C
){
if
(
d
!=
"create"
){
a
[
d
]
=
C
[
d
]}}
a
.
clear
();
return
a
};
C
.
remove
=
function
(){
C
.
canvas
.
parentNode
.
removeChild
(
C
.
canvas
)};
C
.
svgns
=
"http://www.w3.org/2000/svg"
;
C
.
xlink
=
"http://www.w3.org/1999/xlink"
}
if
(
q
==
"VML"
||
q
==
"SVG"
){
C
.
circle
=
function
(
x
,
y
,
r
){
return
A
(
this
,
x
,
y
,
r
)};
C
.
rect
=
function
(
x
,
y
,
w
,
h
,
r
){
return
B
(
this
,
x
,
y
,
w
,
h
,
r
)};
C
.
ellipse
=
function
(
x
,
y
,
a
,
b
){
return
D
(
this
,
x
,
y
,
a
,
b
)};
C
.
path
=
function
(
a
,
b
){
return
t
(
a
,
b
,
this
)};
C
.
image
=
function
(
a
,
x
,
y
,
w
,
h
){
return
E
(
this
,
a
,
x
,
y
,
w
,
h
)};
C
.
text
=
function
(
x
,
y
,
a
){
return
F
(
this
,
x
,
y
,
a
)};
C
.
group
=
function
(){
return
G
(
this
)};
C
.
linerect
=
function
(
x
,
y
,
w
,
h
,
r
){
if
(
r
&&
parseInt
(
r
,
10
)){
return
this
.
path
({
stroke
:
"#000"
}).
moveTo
(
x
+
r
,
y
).
lineTo
(
x
+
w
-
r
,
y
).
addRoundedCorner
(
r
,
"rd"
).
lineTo
(
x
+
w
,
y
+
h
-
r
).
addRoundedCorner
(
r
,
"dl"
).
lineTo
(
x
+
r
,
y
+
h
).
addRoundedCorner
(
r
,
"lu"
).
lineTo
(
x
,
y
+
r
).
addRoundedCorner
(
r
,
"ur"
).
andClose
()}
return
this
.
path
({
stroke
:
"#000"
}).
moveTo
(
x
,
y
).
lineTo
(
x
+
w
,
y
).
lineTo
(
x
+
w
,
y
+
h
).
lineTo
(
x
,
y
+
h
).
andClose
()};
C
.
drawGrid
=
function
(
x
,
y
,
w
,
h
,
a
,
b
,
c
){
c
=
c
||
"#000"
;
var
p
=
this
.
path
({
stroke
:
c
,
"stroke-width"
:
1
}).
moveTo
(
x
,
y
).
lineTo
(
x
+
w
,
y
).
lineTo
(
x
+
w
,
y
+
h
).
lineTo
(
x
,
y
+
h
).
lineTo
(
x
,
y
);
for
(
var
i
=
1
;
i
<
b
;
i
++
){
p
.
moveTo
(
x
,
y
+
i
*
Math
.
round
(
h
/
b
)).
lineTo
(
x
+
w
,
y
+
i
*
Math
.
round
(
h
/
b
))}
for
(
var
i
=
1
;
i
<
a
;
i
++
){
p
.
moveTo
(
x
+
i
*
Math
.
round
(
w
/
a
),
y
).
lineTo
(
x
+
i
*
Math
.
round
(
w
/
a
),
y
+
h
)}
return
p
};
C
.
setGrid
=
function
(
a
,
b
,
c
,
d
,
w
,
h
){
var
e
=
(
c
-
a
)
/
w
;
var
f
=
(
d
-
b
)
/
h
;
this
.
_getX
=
function
(
x
){
return
a
+
x
*
e
};
this
.
_getY
=
function
(
y
){
return
b
+
y
*
f
};
this
.
_getW
=
function
(
w
){
return
w
*
e
};
this
.
_getH
=
function
(
h
){
return
h
*
f
}};
C
.
clearGrid
=
function
(){
this
.
_getX
=
this
.
_getY
=
this
.
_getW
=
this
.
_getH
=
function
(
x
){
return
x
}};
C
.
safari
=
function
(){
if
(
r
.
type
==
"SVG"
){
var
a
=
C
.
rect
(
-
C
.
width
,
-
C
.
height
,
C
.
width
*
3
,
C
.
height
*
3
).
attr
({
stroke
:
"none"
});
setTimeout
(
function
(){
a
.
remove
()},
0
)}};
z
.
prototype
.
animateTo
=
function
(
x
,
y
,
d
,
e
){
clearTimeout
(
this
.
animation_in_progress
);
if
(
"cx"
in
this
.
attrs
||
"x"
in
this
.
attrs
){
var
f
=
(
"cx"
in
this
.
attrs
),
X
=
this
.
attrs
.
cx
||
this
.
attrs
.
x
,
Y
=
this
.
attrs
.
cy
||
this
.
attrs
.
y
;
if
(
x
==
X
&&
y
==
Y
){
return
this
}
var
g
=
y
-
Y
,
dx
=
x
-
X
,
coeff
=
g
/
dx
,
plus
=
Y
-
coeff
*
X
,
alpha
=
Math
.
atan
(
this
.
coeff
);
this
.
xs
=
this
.
step
*
Math
.
cos
(
alpha
);
if
(
x
<
X
){
this
.
xs
=-
this
.
xs
}
var
h
=
new
Date
(),
that
=
this
;(
function
(){
var
a
=
(
new
Date
()).
getTime
()
-
h
.
getTime
();
if
(
a
<
d
){
var
b
=
X
+
a
*
dx
/
d
;
var
c
=
b
*
coeff
+
plus
;
that
.
attr
(
f
?{
cx
:
b
,
cy
:
c
}:{
x
:
b
,
y
:
c
});
that
.
animation_in_progress
=
setTimeout
(
arguments
.
callee
,
1
);
C
.
safari
()}
else
{
that
.
attr
(
f
?{
cx
:
x
,
cy
:
y
}:{
x
:
x
,
y
:
y
});
C
.
safari
();
e
&&
e
.
call
(
that
)}})()}
return
this
};
C
.
pathfinder
=
function
(
p
,
g
){
var
h
=
{
M
:
function
(
x
,
y
){
this
.
moveTo
(
x
,
y
)},
m
:
function
(
x
,
y
){
this
.
moveTo
(
this
.
last
.
x
+
x
,
this
.
last
.
y
+
y
)},
C
:
function
(
a
,
b
,
c
,
d
,
e
,
f
){
this
.
curveTo
(
a
,
b
,
c
,
d
,
e
,
f
)},
c
:
function
(
a
,
b
,
c
,
d
,
e
,
f
){
this
.
curveTo
(
this
.
last
.
x
+
a
,
this
.
last
.
y
+
b
,
this
.
last
.
x
+
c
,
this
.
last
.
y
+
d
,
this
.
last
.
x
+
e
,
this
.
last
.
y
+
f
)},
S
:
function
(
a
,
b
,
c
,
d
){
p
.
curveTo
(
a
,
b
,
c
,
d
)},
s
:
function
(
a
,
b
,
c
,
d
){
this
.
curveTo
(
this
.
last
.
x
+
a
,
this
.
last
.
y
+
b
,
this
.
last
.
x
+
c
,
this
.
last
.
y
+
d
)},
L
:
function
(
x
,
y
){
p
.
lineTo
(
x
,
y
)},
l
:
function
(
x
,
y
){
this
.
lineTo
(
this
.
last
.
x
+
x
,
this
.
last
.
y
+
y
)},
H
:
function
(
x
){
this
.
lineTo
(
x
,
this
.
last
.
y
)},
h
:
function
(
x
){
this
.
lineTo
(
this
.
last
.
x
+
x
,
this
.
last
.
y
)},
V
:
function
(
y
){
this
.
lineTo
(
this
.
last
.
x
,
y
)},
v
:
function
(
y
){
this
.
lineTo
(
this
.
last
.
x
,
this
.
last
.
y
+
y
)},
A
:
function
(
a
,
b
,
c
,
d
,
e
,
x
,
y
){
this
.
arcTo
(
a
,
b
,
d
,
e
,
x
,
y
)},
a
:
function
(
a
,
b
,
c
,
d
,
e
,
x
,
y
){
this
.
arcTo
(
this
.
last
.
x
+
a
,
this
.
last
.
y
+
b
,
d
,
sweethisflag
,
this
.
last
.
x
+
x
,
this
.
last
.
y
+
y
)},
z
:
function
(){
this
.
andClose
()}};
g
.
replace
(
/
([
mzlhvcsqta
])\s
*
((
-
?\d
*
\.?\d
*
\s
*,
?\s
*
)
+
)
/ig
,
function
(
a
,
b
,
c
){
var
d
=
[];
c
.
replace
(
/
(
-
?\d
*
\.?\d
*
)\s
*,
?\s
*/ig
,
function
(
a
,
b
){
b
&&
d
.
push
(
+
b
)});
while
(
d
.
length
>=
h
[
b
].
length
){
h
[
b
].
apply
(
p
,
d
.
splice
(
0
,
h
[
b
].
length
));
if
(
!
h
[
b
].
length
){
break
}}})};
return
r
}
else
{
return
function
(){}}})((
!
(
window
.
SVGPreserveAspectRatio
&&
window
.
SVGPreserveAspectRatio
.
SVG_PRESERVEASPECTRATIO_XMINYMIN
==
2
))?
"VML"
:
"SVG"
);
Raphael
.
vml
=!
(
Raphael
.
svg
=
(
Raphael
.
type
==
"SVG"
));
if
(
Raphael
.
vml
&&
window
.
CanvasRenderingContext2D
){
Raphael
.
type
=
"Canvas only"
;
Raphael
.
vml
=
Raphael
.
svg
=
false
}
Raphael
.
toString
=
function
(){
return
"Your browser supports "
+
this
.
type
+
".\nYou are running "
+
unescape
(
"Rapha%EBl%20"
)
+
this
.
version
};
Raphael
.
hsb2rgb
=
function
(
a
,
c
,
d
){
if
(
typeof
a
==
"object"
&&
"h"
in
a
&&
"s"
in
a
&&
"b"
in
a
){
d
=
a
.
b
;
c
=
a
.
s
;
a
=
a
.
h
}
var
e
,
green
,
blue
;
if
(
d
==
0
){
return
{
r
:
0
,
g
:
0
,
b
:
0
,
hex
:
"#000"
}}
else
{
var
i
=
Math
.
floor
(
a
*
6
),
f
=
(
a
*
6
)
-
i
,
p
=
d
*
(
1
-
c
),
q
=
d
*
(
1
-
(
c
*
f
)),
t
=
d
*
(
1
-
(
c
*
(
1
-
f
)));[
function
(){
e
=
d
;
green
=
t
;
blue
=
p
},
function
(){
e
=
q
;
green
=
d
;
blue
=
p
},
function
(){
e
=
p
;
green
=
d
;
blue
=
t
},
function
(){
e
=
p
;
green
=
q
;
blue
=
d
},
function
(){
e
=
t
;
green
=
p
;
blue
=
d
},
function
(){
e
=
d
;
green
=
p
;
blue
=
q
},
function
(){
e
=
d
;
green
=
t
;
blue
=
p
}][
i
]()}
var
h
=
{
r
:
e
,
g
:
green
,
b
:
blue
};
e
*=
255
;
green
*=
255
;
blue
*=
255
;
var
r
=
Math
.
round
(
e
).
toString
(
16
);
if
(
r
.
length
==
1
){
r
=
"0"
+
r
}
var
g
=
Math
.
round
(
green
).
toString
(
16
);
if
(
g
.
length
==
1
){
g
=
"0"
+
g
}
var
b
=
Math
.
round
(
blue
).
toString
(
16
);
if
(
b
.
length
==
1
){
b
=
"0"
+
b
}
h
.
hex
=
"#"
+
r
+
g
+
b
;
return
h
};
Raphael
.
rgb2hsb
=
function
(
a
,
b
,
c
){
if
(
typeof
a
==
"object"
&&
"r"
in
a
&&
"g"
in
a
&&
"b"
in
a
){
c
=
a
.
b
;
b
=
a
.
g
;
a
=
a
.
r
}
if
(
typeof
a
==
"string"
&&
a
.
charAt
(
0
)
==
"#"
){
if
(
a
.
length
==
4
){
c
=
parseInt
(
a
.
substring
(
3
),
16
);
b
=
parseInt
(
a
.
substring
(
2
,
3
),
16
);
a
=
parseInt
(
a
.
substring
(
1
,
2
),
16
)}
else
{
c
=
parseInt
(
a
.
substring
(
5
),
16
);
b
=
parseInt
(
a
.
substring
(
3
,
5
),
16
);
a
=
parseInt
(
a
.
substring
(
1
,
3
),
16
)}}
if
(
a
>
1
||
b
>
1
||
c
>
1
){
a
/=
255
;
b
/=
255
;
c
/=
255
}
var
d
=
Math
.
max
(
a
,
b
,
c
),
min
=
Math
.
min
(
a
,
b
,
c
),
hue
,
saturation
,
brightness
=
d
;
if
(
min
==
d
){
return
{
h
:
0
,
s
:
0
,
b
:
d
}}
else
{
var
e
=
(
d
-
min
);
saturation
=
e
/
d
;
if
(
a
==
d
){
hue
=
(
b
-
c
)
/
e
}
else
if
(
b
==
d
){
hue
=
2
+
((
c
-
a
)
/
e
)}
else
{
hue
=
4
+
((
a
-
b
)
/
e
)}
hue
/=
6
;
if
(
hue
<
0
){
hue
+=
1
}
if
(
hue
>
1
){
hue
-=
1
}}
return
{
h
:
hue
,
s
:
saturation
,
b
:
brightness
}};
Raphael
.
getColor
=
function
(
a
){
var
b
=
arguments
.
callee
.
start
=
arguments
.
callee
.
start
||
{
h
:
0
,
s
:
1
,
b
:
a
||
.
75
};
var
c
=
this
.
hsb2rgb
(
b
.
h
,
b
.
s
,
b
.
b
);
b
.
h
+=
.
075
;
if
(
b
.
h
>
1
){
b
.
h
=
0
;
b
.
s
-=
.
2
;
if
(
b
.
s
<=
0
){
arguments
.
callee
.
start
=
{
h
:
0
,
s
:
1
,
b
:
b
.
b
}}}
return
c
.
hex
};
Raphael
.
getColor
.
reset
=
function
(){
this
.
start
=
undefined
};
raphael.js
View file @
6b5bc48c
...
...
@@ -15,7 +15,7 @@ var Raphael = (function (type) {
this
.
m
=
[
[
m11
||
1
,
m12
||
0
,
0
],
[
m21
||
0
,
m22
||
1
,
0
],
[
dx
||
0
,
dy
||
0
,
1
]
,
[
dx
||
0
,
dy
||
0
,
1
]
];
}
...
...
@@ -1547,7 +1547,7 @@ Raphael.hsb2rgb = function (hue, saturation, brightness) {
function
()
{
red
=
p
;
green
=
q
;
blue
=
brightness
;},
function
()
{
red
=
t
;
green
=
p
;
blue
=
brightness
;},
function
()
{
red
=
brightness
;
green
=
p
;
blue
=
q
;},
function
()
{
red
=
brightness
;
green
=
t
;
blue
=
p
;}
,
function
()
{
red
=
brightness
;
green
=
t
;
blue
=
p
;}
][
i
]();
}
var
rgb
=
{
r
:
red
,
g
:
green
,
b
:
blue
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment