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
099c4102
authored
Oct 21, 2008
by
Dmitry Baranovskiy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added animateTo method plus some OO optimisation.
parent
217d0c22
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
414 additions
and
372 deletions
+414
-372
raphael-packed.js
+3
-3
raphael.js
+411
-369
No files found.
raphael-packed.js
View file @
099c4102
/*
/*
* Raphael 0.5.
5
b - JavaScript Vector Library
* Raphael 0.5.
6
b - JavaScript Vector Library
*
*
* Copyright (c) 2008 Dmitry Baranovskiy (raphaeljs.com)
* Copyright (c) 2008 Dmitry Baranovskiy (raphaeljs.com)
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
* 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 1H=(G(q){9 r=G(){J r.3b.2r(r,K)};r.4q="0.5.5b";r.18=q;9 C={};G 2c(a,b,c,d,e,f){7.m=[[a||1,b||0,0],[c||0,d||1,0],[e||0,f||0,1],]}C.1f=C.1i=C.1v=C.1x=G(x){J x};I(q=="2F"){2c.3x.2s=G(){J"4r:4s.4t.2c(4u="+7.m[0][0]+", 4v="+7.m[1][0]+", 4w="+7.m[0][1]+", 4x="+7.m[1][1]+", 4y="+7.m[2][0]+", 4z="+7.m[2][1]+", 4A=\'4B 4C\', 4D=\'4E\')"};9 s=G(j,l,m){9 g=17.1r("1o:1M"),2t=g.1a;2t.2d="2e";2t.1G=0;2t.1y=0;2t.U=m.U+"1z";2t.15=m.15+"1z";9 n=17.1r("1o:2f"),2u=n.1a;2u.U=m.U+"1z";2u.15=m.15+"1z";n.N="";I(j["3y"]){n.4F=j["3y"]}n.2G=7.2G;n.2H=7.2H;g.1b(n);m.1c.1b(g);9 p=1s v(n,g,m);t(p,j);I(j.1C){u(p,j.1C)}p.P=26;p.18="N";p.N=[];p.13={x:0,y:0,2n:0,2o:0,P:26};p.2g="";p.1D=G(){7.P=26;J 7};p.1E=G(){7.P=2I;J 7};p.3z=G(){7.2g="";9 a=7.N;7.N=[];1n(9 i=0,1j=a.1d;i<1j;i++){I(a[i].18!="3c"){7[a[i].18+"3A"].2r(7,a[i].1N)}1l{7.2h()}}J 7};p.1R=G(x,y){9 d=7.P?"m":"t";9 a=7.P?m.1f:m.1v;9 b=7.P?m.1i:m.1x;d+=Q.14(a(11(x,10)))+" "+Q.14(b(11(y,10)));7[0].N=7.2g+=d;7.13.x=(7.P?0:7.13.x)+Q.14(a(11(x,10)));7.13.y=(7.P?0:7.13.y)+Q.14(b(11(y,10)));7.13.P=7.P;7.N.1I({18:"3B",1N:[].2J.2K(K,0),20:7.P});J 7};p.1k=G(x,y){9 d=7.P?"l":"r";9 a=7.P?m.1f:m.1v;9 b=7.P?m.1i:m.1x;d+=Q.14(a(11(x,10)))+" "+Q.14(b(11(y,10)));7[0].N=7.2g+=d;7.13.x=(7.P?0:7.13.x)+Q.14(a(11(x,10)));7.13.y=(7.P?0:7.13.y)+Q.14(b(11(y,10)));7.13.P=7.P;7.N.1I({18:"3C",1N:[].2J.2K(K,0),20:7.P});J 7};p.3D=G(a,b,c,e,f,g){9 h=7.13.x,2L=7.13.y,x=(h-f)/2,y=(2L-g)/2,k=(c==e?-1:1)*Q.4G((a*a*b*b-a*a*y*y-b*b*x*x)/(a*a*y*y+b*b*x*x)),1S=k*a*y/b+(h+f)/2,1T=k*-b*x/a+(2L+g)/2,d=e?(7.P?"4H":"4I"):(7.P?"4J":"4K"),1f=7.P?m.1f:m.1v,1i=7.P?m.1i:m.1x,1G=Q.14(1S-a),1y=Q.14(1T-b);d+=[1G,1y,1G+a*2,1y+b*2,h,2L,Q.14(1f(11(f,10))),Q.14(1f(11(g,10)))].21(", ");7[0].N=7.2g+=d;7.13.x=(7.P?0:7.13.x)+Q.14(1f(11(f,10)));7.13.y=(7.P?0:7.13.y)+Q.14(1i(11(g,10)));7.13.P=7.P;7.N.1I({18:"3E",1N:[].2J.2K(K,0),20:7.P});J 7};p.3F=G(a,b,c){I(!c){J 7.1k(a,b)}1l{9 p={};p.1f=7.P?m.1f:m.1v;p.1i=7.P?m.1i:m.1x;9 x=Q.14(p.1f(Q.14(11(a,10)*1g)/1g));9 y=Q.14(p.1i(Q.14(11(b,10)*1g)/1g));9 w=Q.14(m.1v(Q.14(11(c,10)*1g)/1g));9 d=7.P?"c":"v";9 e=[7.13.x+w,7.13.y,x-w,y,x,y];d+=e.21(" ")+" ";7.13.x=(7.P?0:7.13.x)+e[4];7.13.y=(7.P?0:7.13.y)+e[5];7.13.2n=e[2];7.13.2o=e[3];7[0].N=7.2g+=d;7.N.1I({18:"3G",1N:[].2J.2K(K,0),20:7.P});J 7}};p.1p=G(){9 d=7.P?"c":"v";9 a=7.P?m.1f:m.1v;9 b=7.P?m.1i:m.1x;I(K.1d==6){7.13.x=(7.P?0:7.13.x)+Q.14(a(11(K[4],10)));7.13.y=(7.P?0:7.13.y)+Q.14(b(11(K[5],10)));7.13.2n=Q.14(a(11(K[2],10)));7.13.2o=Q.14(b(11(K[3],10)));d+=Q.14(a(11(K[0],10)))+" "+Q.14(b(11(K[1],10)))+" "+Q.14(a(11(K[2],10)))+" "+Q.14(b(11(K[3],10)))+" "+Q.14(a(11(K[4],10)))+" "+Q.14(b(11(K[5],10)))+" ";7.13.P=7.P}7[0].N=7.2g+=d;7.N.1I({18:"3H",1N:[].2J.2K(K,0),20:7.P});J 7};p.2v=G(r,a){9 R=.3I*r,22=7.P,o=7;I(22){7.1E();22=G(){o.1D()}}1l{22=G(){}}9 b={l:G(){J{u:G(){o.1p(-R,0,-r,-(r-R),-r,-r)},d:G(){o.1p(-R,0,-r,r-R,-r,r)}}},r:G(){J{u:G(){o.1p(R,0,r,-(r-R),r,-r)},d:G(){o.1p(R,0,r,r-R,r,r)}}},u:G(){J{r:G(){o.1p(0,-R,-(R-r),-r,r,-r)},l:G(){o.1p(0,-R,R-r,-r,-r,-r)}}},d:G(){J{r:G(){o.1p(0,R,-(R-r),r,r,r)},l:G(){o.1p(0,R,R-r,r,-r,r)}}}};b[a.2V(0)]()[a.2V(1)]();22();J o};p.2h=G(){7[0].N=(7.2g+="x e");J 7};I(1m l=="2i"){l=l.27(/([3J])/2W,",$1,").27(/([^,])\\-/2W,"$1,-");N=l.3d(",");9 i=1,1j=N.1d;3e(i<1j){2X(N[i]){19"M":p.1D().1R(N[++i],N[++i]);1h;19"m":p.1E().1R(N[++i],N[++i]);1h;19"C":p.1D().1p(N[++i],N[++i],N[++i],N[++i],N[++i],N[++i]);1h;19"c":p.1E().1p(N[++i],N[++i],N[++i],N[++i],N[++i],N[++i]);1h;19"L":p.1D().1k(N[++i],N[++i]);1h;19"l":p.1E().1k(N[++i],N[++i]);1h;19"H":p.1D().1k(N[++i],0);1h;19"h":p.1E().1k(N[++i],0);1h;19"V":p.1D().1k(0,N[++i]);1h;19"v":p.1E().1k(0,N[++i]);1h;19"Z":19"z":p.2h();1h}i++}}J p};9 t=G(o,a){o[0].O=o[0].O||{};1n(9 b 1w a){o[0].O[b]=a[b]}a["28-3K"]&&(o[0].1a.4L=a["28-3K"]);a["28-3L"]&&(o[0].1a.4M=a["28-3L"]);a["28"]&&(o[0].1a.28=a["28"]);a["28-2Y"]&&(o[0].1a.4N=a["28-2Y"]);I(1m a.1A!="1U"||1m a["1e-U"]!="1U"||1m a.1t!="1U"||1m a.1e!="1U"){o=o.2f||o[0];9 c=(o.2M("1t")&&o.2M("1t")[0])||17.1r("1o:1t");I("1t-1A"1w a||"1A"1w a){c.1A=((a["1t-1A"]+1||2)-1)*((a.1A+1||2)-1)}c.2a=(a.1t&&a.1t!="1J");I(c.2a&&a.1t){c.23=a.1t}I(a.1t=="1J"){c.2a=2I}o.1b(c);9 d=(o.2M("1e")&&o.2M("1e")[0])||17.1r("1o:1e");I((a.1e&&a.1e!="1J")||a["1e-U"]||a["1e-1A"]||a["1e-2N"]){d.2a=26}I(a.1e=="1J"||1m d.2a=="1U"){d.2a=2I}I(d.2a&&a.1e){d.23=a.1e}d.1A=((a["1e-1A"]+1||2)-1)*((a.1A+1||2)-1);d.4O=a["1e-4P"]||"3M";d.3N=a["1e-3N"]||8;d.4Q={4R:"4S",3O:"3O",14:"14"}[a["1e-4T"]||"3M"];I(a["1e-U"]){d.2Y=(11(a["1e-U"],10)||1)*12/16}I(a["1e-2N"]){9 e=a["1e-2N"].27(" ",",").3d(","),3f=[],3P=d.2Y;1n(9 i=0,1j=e.1d;i<1j;i++){9 f=e[i]/3P;I(!4U(f)){3f.1I(f)}};d.4V=3f.21(" ")}o.1b(d)}};9 u=G(o,a){o[0].O=o[0].O||{};o[0].O.1C=a;o=o.2f||o[0];9 b=o.2M("1t");I(b.1d){b=b[0]}1l{b=17.1r("1o:1t")}I(a.1q.1d){b.2a=26;b.18=(a.18.3g()=="4W")?"1C":"4X";I(1m a.1q[0].23!="1U"){b.23=a.1q[0].23||"#1B"}I(1m a.1q[0].1A!="1U"){b.1A=a.1q[0].1A}I(1m a.1q[a.1q.1d-1].1A!="1U"){b.4Y=a.1q[a.1q.1d-1].1A}I(1m a.1q[a.1q.1d-1].23!="1U"){b.4Z=a.1q[a.1q.1d-1].23||"#1B"}9 c="";1n(9 i=1,1j=a.1q.1d-1;i<1j;i++){c+=a.1q[i].2Z+" "+a.1q[i].23;I(i!=1j-1){c+=","}};I(c){b.50=c}I(a.1V){9 d=Q.14(Q.51((1F(a.1V[3],10)-1F(a.1V[1],10))/(1F(a.1V[2],10)-1F(a.1V[0],10)))*57.29)+52;b.53=d+54}I(a.18.3g()=="55"){b.56="0.5, 0.5";b.58="0, 0";b.59="1J"}}};9 v=G(g,k,l){9 m=0,5a=0,5c=0,5d=1;7[0]=g;7.X=0;7.Y=0;K.3h.5e="5f";7[0].O={};7.1u=k;7.2w=G(a){9 b=7.1u.1a,2x=7[0].1a;1n(9 i 1w a){7[0].O[i]=a[i]}9 c=7[0].O,x,y,w,h;2X(7.18){19"2O":x=c.1S-c.r;y=c.1T-c.r;w=h=c.r*2;1h;19"2P":x=c.1S-c.2j;y=c.1T-c.2k;w=c.2j*2;h=c.2k*2;1h;19"2b":19"2y":x=c.x;y=c.y;w=c.w;h=c.h;1h;19"1K":7.3i.v=["m",Q.14(c.x),", ",Q.14(c.y-2),"l",Q.14(c.x)+1,", ",Q.14(c.y-2)].21("");J;3j:J}9 d=l.U/2-w/2,1y=l.15/2-h/2;b.2d="2e";b.1G=x-d+"1z";b.1y=y-1y+"1z";7.X=x-d;7.Y=y-1y;7.W=w;7.H=h;b.U=l.U+"1z";b.15=l.15+"1z";2x.2d="2e";2x.1y=1y+"1z";2x.1G=d+"1z";2x.U=w+"1z";2x.15=h+"1z"};7.3Q=G(){7.1u.1a.30="1J";J 7};7.3R=G(){7.1u.1a.30="3S";J 7};7.3k=G(a){m+=a;7.1u.1a.5g=m;J 7};7.3l=G(x,y){7.X+=x;7.Y+=y;7.1u.1a.1G=7.X+"1z";7.1u.1a.1y=7.Y+"1z";J 7};7.3m=G(a,b,c,d,e,f){3n=1s 2c(a,b,c,d,e,f);7.1u.1a.3T=3n;J 7};7.3U=G(x,y){y=y||x;I(x!=0&&!(x==1&&y==1)){9 a=Q.14(x/Q.3V(x)),31=Q.14(y/Q.3V(y));I(a!=1||31!=1){7[0].1a.3T=1s 2c(a,0,0,31,0,0)}9 b=1F(7[0].1a.U,10)*x*a;9 c=1F(7[0].1a.15,10)*y*31;9 d=1F(7[0].1a.1G,10);9 e=1F(7[0].1a.1y,10);7[0].1a.1G=7.X=d+7.W/2-b/2;7[0].1a.1y=7.Y=e+7.H/2-c/2;7[0].1a.U=7.W=b;7[0].1a.15=7.H=c}J 7};7.2Q=G(){J{x:7.1u.5h,y:7.1u.5i,U:7.1u.5j,15:7.1u.5k}};7.3o=G(){7[0].1L.2l(7[0]);7.1u.1L.2l(7.1u);7.2f&&7.2f.1L.2l(7.2f)};7.32=G(){I(K.1d==1&&1m K[0]=="2i"){J 7[0].O[K[0]]}I(7[0].O&&K.1d==1&&K[0]3W 3X){9 a={};1n(9 i=0,1j=K[0].1d;i<1j;i++){a[K[0][i]]=7[0].O[K[0][i]]};J a}I(7[0].5l.3g()=="1M"){9 b=7[0].33;7[0].O=7[0].O||{};I(K.1d==2){7[0].O[K[0]]=K[1]}1l I(K.1d==1||1m K[0]=="2p"){1n(9 j 1w K[0]){7[0].O[j]=K[0][j]}}1n(9 i=0,1j=b.1d;i<1j;i++){7.32.2r(1s 5m(b[i],7[0],l),K)}}1l{9 c;I(K.1d==2){c={};c[K[0]]=K[1]}I(K.1d==1&&1m K[0]=="2p"){c=K[0]}I(c){t(7,c);7.2w(c);I(c.1C){u(7,c.1C)}I(c.1K&&7.18=="1K"){7[0].2i=c.1K}I(c.2R){7[0].2R=c.2R}}}J 7};7.3Y=G(){7.1u.1L.1b(7.1u);J 7};7.3Z=G(){I(7.1u.1L.1O!=7.1u){7.1u.1L.34(7.1u,7.1u.1L.1O)}J 7}};9 z=G(a,x,y,r){9 g=17.1r("1o:1M");9 o=17.1r("1o:40");g.1b(o);a.1c.1b(g);9 b=1s v(o,g,a);t(b,{1e:"#1B",1t:"1J"});b.2w({x:x-r,y:y-r,w:r*2,h:r*2});o.O.1S=x;o.O.1T=y;o.O.r=r;b.18="2O";J b};9 A=G(a,x,y,w,h,r){9 g=17.1r("1o:1M");9 o=17.1r(r?"1o:5n":"1o:2b");I(r){o.5o=r/(Q.2S(w,h))}g.1b(o);a.1c.1b(g);9 b=1s v(o,g,a);t(b,{1e:"#1B"});b.2w({x:x,y:y,w:w,h:h});o.O.x=x;o.O.y=y;o.O.w=w;o.O.h=h;o.O.r=r;b.18="2b";J b};9 B=G(a,x,y,b,c){9 g=17.1r("1o:1M");9 o=17.1r("1o:40");g.1b(o);a.1c.1b(g);9 d=1s v(o,g,a);t(d,{1e:"#1B"});d.2w({x:x-b,y:y-c,w:b*2,h:c*2});o.O.1S=x;o.O.1T=y;o.O.2j=b;o.O.2k=c;d.18="2P";J d};9 D=G(a,b,x,y,w,h){9 g=17.1r("1o:1M");9 o=17.1r("1o:2y");o.5p=b;g.1b(o);a.1c.1b(g);9 c=1s v(o,g,a);c.18="2y";c.2w({x:x,y:y,w:w,h:h});o.O.x=x;o.O.y=y;o.O.w=w;o.O.h=h;J c};9 E=G(a,x,y,b){9 g=17.1r("1o:1M"),2z=g.1a;9 c=17.1r("1o:2f"),2u=c.1a;9 d=17.1r("1o:N"),5q=d.1a;d.v=["m",Q.14(x),", ",Q.14(y-2),"l",Q.14(x)+1,", ",Q.14(y-2)].21("");d.5r=26;2u.U=a.U;2u.15=a.15;2z.2d="2e";2z.1G=0;2z.1y=0;2z.U=a.U;2z.15=a.15;9 o=17.1r("1o:3i");o.2i=b;o.2a=26;o.2G=a.2G;o.2H=a.2H;c.1b(o);c.1b(d);g.1b(c);a.1c.1b(g);9 e=1s v(o,g,a);e.2f=c;e.3i=d;e.18="1K";o.O.x=x;o.O.y=y;o.O.w=1;o.O.h=1;J e};9 F=G(a){9 b=17.1r("1o:1M"),2A=b.1a;2A.2d="2e";2A.1G=0;2A.1y=0;2A.U=a.U;2A.15=a.15;I(a.1c){a.1c.1b(b)}9 c=1s v(b,b,a);1n(9 f 1w a){I(f.2V(0)!="41"&&1m a[f]=="G"){c[f]=(G(f){J G(){9 e=a[f].2r(a,K);b.1b(e[0].1L);J e}})(f)}}c.18="1M";J c};r.3b=G(){9 d,U,15;I(1m K[0]=="2i"){d=17.42(K[0]);U=K[1];15=K[2]}I(1m K[0]=="2p"){d=K[0];U=K[1];15=K[2]}I(1m K[0]=="43"){d=1;x=K[0];y=K[1];U=K[2];15=K[3]}I(!d){44 1s 45("2F 46 47 48.");}I(!17.49["1o"]){17.49.5s("1o","5t:5u-5v-5w:35");17.5x().5y("1o\\\\:*","5z:4a(#3j#2F)")}9 c=17.1r("5A"),r=C.1c=17.1r("1o:1M"),24=c.1a,2T=r.1a;C.U=U;C.15=15;U=U||"5B";15=15||"5C";24.5D="2b(0 "+U+" "+15+" 0)";24.2d="2e";2T.U=U;2T.15=15;r.2G=(U=="1g%"?U:11(U))+" "+(15=="1g%"?15:11(15));r.2H="0 0";9 b=17.1r("1o:2b"),2U=b.1a;2U.1G=2U.1y=0;2U.U=2T.U;2U.15=2T.15;b.5E=b.5F="f";r.1b(b);c.1b(r);I(d==1){17.4b.1b(c);24.2d="2e";24.1G=x+"1z";24.1y=y+"1z";24.U=U;24.15=15;d={1a:{U:U,15:15}}}1l{24.U=d.1a.U=U;24.15=d.1a.15=15;I(d.1O){d.34(c,d.1O)}1l{d.1b(c)}}1n(9 e 1w C){d[e]=C[e]}d.3p=G(){9 a=[];1n(9 i=0,1j=r.33.1d;i<1j;i++){I(r.33[i]!=b){a.1I(r.33[i])}}1n(i=0,1j=a.1d;i<1j;i++){r.2l(a[i])}};J d}}I(q=="2B"){2c.3x.2s=G(){J"3m("+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 s=G(j,k,l){9 m=17.1W(l.1P,"N");m.T("1t","1J");I(j){1n(9 n 1w j){I(j.1C){u(m,j.1C,l)}1l{m.T(n,j[n])}}}I(l.1c){l.1c.1b(m)}9 p=1s v(m,l);1n(9 n 1w j){p.O[n]=j[n]}p.P=26;p.N=[];p.13={x:0,y:0,2n:0,2o:0};p.1D=G(){7.P=26;J 7};p.1E=G(){7.P=2I;J 7};p.3z=G(){7[0].T("d","5G 0");9 a=7.N;7.N=[];1n(9 i=0,1j=a.1d;i<1j;i++){I(a[i].18!="3c"){7[a[i].18+"3A"].2r(7,a[i].1N)}1l{7.2h()}}J 7};p.1R=G(x,y){9 d=7.P?"M":"m";9 a=7.P?l.1f:l.1v;9 b=7.P?l.1i:l.1x;d+=a(11(x,10))+" "+b(11(y,10))+" ";9 c=7[0].2q("d")||"";7[0].T("d",c+d);7.13.x=l.1f(11(x,10));7.13.y=l.1i(11(y,10));7.N.1I({18:"3B",1N:K,20:7.P});J 7};p.1k=G(x,y){9 d=7.P?"L":"l";9 a=7.P?l.1f:l.1v;9 b=7.P?l.1i:l.1x;d+=a(11(x,10))+" "+b(11(y,10))+" ";9 c=7[0].2q("d")||"";7[0].T("d",c+d);7.13.x=l.1f(11(x,10));7.13.y=l.1i(11(y,10));7.N.1I({18:"3C",1N:K,20:7.P});J 7};p.3D=G(a,b,c,e,x,y){9 d=7.P?"A":"a";9 f=7.P?l.1f:l.1v;9 g=7.P?l.1i:l.1x;d+=[l.1v(11(a,10)),l.1x(11(b,10)),0,c,e,f(11(x,10)),g(11(y,10))].21(" ");9 h=7[0].2q("d")||"";7[0].T("d",h+d);7.13.x=l.1f(11(x,10));7.13.y=l.1i(11(y,10));7.N.1I({18:"3E",1N:K,20:7.P});J 7};p.3F=G(a,b,c){I(!c){J 7.1k(a,b)}1l{9 p={};p.1f=7.P?l.1f:l.1v;p.1i=7.P?l.1i:l.1x;9 x=p.1f(Q.14(11(a,10)*1g)/1g);9 y=p.1i(Q.14(11(b,10)*1g)/1g);9 w=l.1v(Q.14(11(c,10)*1g)/1g);9 d=7.P?"C":"c";9 e=[7.13.x+w,7.13.y,x-w,y,x,y];1n(9 i=0,1j=e.1d;i<1j;i++){d+=e[i]+" "}7.13.x=e[4];7.13.y=e[5];7.13.2n=e[2];7.13.2o=e[3];9 f=7[0].2q("d")||"";7[0].T("d",f+d);7.N.1I({18:"3G",1N:K,20:7.P});J 7}};p.1p=G(){9 p={};p.1f=7.P?l.1f:l.1v;p.1i=7.P?l.1i:l.1x;I(K.1d==6){9 d=7.P?"C":"c";1n(9 i=0,1j=K.1d;i<1j;i++){d+=p[(i%2==0)?"1f":"1i"](Q.14(11(K[i],10)*1g)/1g)+" "}7.13.x=p.1f((11(K[4],10)*1g)/1g);7.13.y=p.1i((11(K[5],10)*1g)/1g);7.13.2n=p.1f((11(K[2],10)*1g)/1g);7.13.2o=p.1i((11(K[3],10)*1g)/1g)}1l{I(K.1d==4){9 d=7.P?"S":"s";1n(9 i=0,1j=K.1d;i<1j;i++){d+=p[i%2==0?"1f":"1i"]((11(K[i],10)*1g)/1g)+" "}}7.13.x=p.1f((11(K[2],10)*1g)/1g);7.13.y=p.1i((11(K[3],10)*1g)/1g);7.13.2n=p.1f((11(K[0],10)*1g)/1g);7.13.2o=p.1i((11(K[1],10)*1g)/1g)}9 a=7[0].2q("d")||"";7[0].T("d",a+d);7.N.1I({18:"3H",1N:K,20:7.P});J 7};p.2v=G(r,a){9 R=.3I*r,22=7.P,o=7;I(22){7.1E();22=G(){o.1D()}}1l{22=G(){}}9 b={l:G(){J{u:G(){o.1p(-R,0,-r,-(r-R),-r,-r)},d:G(){o.1p(-R,0,-r,r-R,-r,r)}}},r:G(){J{u:G(){o.1p(R,0,r,-(r-R),r,-r)},d:G(){o.1p(R,0,r,r-R,r,r)}}},u:G(){J{r:G(){o.1p(0,-R,-(R-r),-r,r,-r)},l:G(){o.1p(0,-R,R-r,-r,-r,-r)}}},d:G(){J{r:G(){o.1p(0,R,-(R-r),r,r,r)},l:G(){o.1p(0,R,R-r,r,-r,r)}}}};b[a[0]]()[a[1]]();22();J o};p.2h=G(){9 a=7[0].2q("d")||"";7[0].T("d",a+"Z ");7.N.1I({18:"3c"});J 7};I(1m k=="2i"){k=k.27(/([3J])/2W,",$1,").27(/([^,])\\-/2W,"$1,-");N=k.3d(",");9 i=1,1j=N.1d;3e(i<1j){2X(N[i]){19"M":p.1D().1R(N[++i],N[++i]);1h;19"m":p.1E().1R(N[++i],N[++i]);1h;19"C":p.1D().1p(N[++i],N[++i],N[++i],N[++i],N[++i],N[++i]);1h;19"c":p.1E().1p(N[++i],N[++i],N[++i],N[++i],N[++i],N[++i]);1h;19"s":p.1E().1p(N[++i],N[++i],N[++i],N[++i]);1h;19"S":p.1D().1p(N[++i],N[++i],N[++i],N[++i]);1h;19"L":p.1D().1k(N[++i],N[++i]);1h;19"l":p.1E().1k(N[++i],N[++i]);1h;19"H":p.1D().1k(N[++i],0);1h;19"h":p.1E().1k(N[++i],0);1h;19"V":p.1D().1k(0,N[++i]);1h;19"v":p.1E().1k(0,N[++i]);1h;19"z":p.2h();1h}i++}}J p};9 u=G(o,a,b){9 c=17.1W(b.1P,a.18+"5H");c.2R="5I-1C-"+b.4c++;I(a.1V&&a.1V.1d){c.T("5J",a.1V[0]);c.T("2L",a.1V[1]);c.T("5K",a.1V[2]);c.T("5L",a.1V[3])}b.36.1b(c);1n(9 i=0,1j=a.1q.1d;i<1j;i++){9 d=17.1W(b.1P,"3q");d.T("2Z",a.1q[i].2Z?a.1q[i].2Z:(i==0)?"0%":"1g%");d.T("3q-23",a.1q[i].23||"#5M");I(1m a.1q[i].1A!="1U"){d.T("3q-1A",a.1q[i].1A)}c.1b(d)};o.T("1t","4a(#"+c.2R+")")};9 v=G(g,h){9 X=0,Y=0,37={38:0,x:0,y:0},2C=1,2D=1,3n=5N;7[0]=g;7.O=7.O||{};7.1Q=[];7.3Q=G(){7[0].1a.30="1J";J 7};7.3R=G(){7[0].1a.30="3S";J 7};7.3k=G(a){9 b=7.2Q();37.38+=a;I(37.38){7.1Q[0]=("3k("+37.38+" "+(b.x+b.U/2)+" "+(b.y+b.15/2)+")")}1l{7.1Q[0]=""}7[0].T("39",7.1Q.21(" "));J 7};7.3l=G(x,y){X+=x;Y+=y;I(X&&Y){7.1Q[1]="3l("+X+","+Y+")"}1l{7.1Q[1]=""}7[0].T("39",7.1Q.21(" "));J 7};7.3U=G(x,y){y=y||x;I(x!=0&&!(x==1&&y==1)){2C*=x;2D*=y;I(!(2C==1&&2D==1)){9 a=7.2Q(),4d=a.x*(1-2C)+(a.U/2-a.U*2C/2),4e=a.y*(1-2D)+(a.15/2-a.15*2D/2);7.1Q[2]=1s 2c(2C,0,0,2D,4d,4e)}1l{7.1Q[2]=""}7[0].T("39",7.1Q.21(" "))}J 7};7.3m=G(a,b,c,d,e,f){7.1Q[3]=1s 2c(a,b,c,d,e,f);7[0].T("39",7.1Q.21(" "));J 7};7.3o=G(){7[0].1L.2l(7[0])};7.2Q=G(){J 7[0].2Q()};7.32=G(){I(K.1d==1&&1m K[0]=="2i"){J 7[0].2q(K[0])}I(K.1d==1&&K[0]3W 3X){9 a={};1n(9 j 1w K[0]){a[K[0][j]]=7.O[K[0][j]]}J a}I(K.1d==2){9 b=K[0],1X=K[1];7[b]=1X;7.O[b]=1X;2X(b){19"2j":19"1S":19"x":7[0].T(b,h.1f(1X));1h;19"2k":19"1T":19"y":7[0].T(b,h.1i(1X));1h;19"U":7[0].T(b,h.1v(1X));1h;19"15":7[0].T(b,h.1x(1X));1h;19"1C":u(7[0],d.1C,h);1h;19"1e-2N":7[0].T(b,1X.27(" ",","));1h;19"1K":I(7.18=="1K"){7[0].2l(7[0].1O);7[0].1b(17.3r(1X))}1h;3j:9 c=b.27(/(\\-.)/g,G(w){J w.2m(1).4f()});7[0].1a[c]=1X;7[0].T(b,1X);1h}}1l I(K.1d==1&&1m K[0]=="2p"){9 d=K[0];1n(9 e 1w d){7.O[e]=d[e];I(e=="1e-2N"){7[0].T(e,d[e].27(" ",","))}1l I(e=="1K"&&7.18=="1K"){7[0].2l(7[0].1O);7[0].1b(17.3r(d[e]))}1l{9 c=e.27(/(\\-.)/g,G(w){J w.2m(1).4f()});7[0].1a[c]=d[e];7[0].T(e,d[e])}}I(d.1C){7[0].O.1C=d.1C;u(7[0],d.1C,h)}}J 7};7.3Y=G(){7[0].1L.1b(7[0]);J 7};7.3Z=G(){I(7[0].1L.1O!=7[0]){7[0].1L.34(7[0],7[0].1L.1O)}J 7}};9 z=G(a,x,y,r){9 b=17.1W(a.1P,"2O");b.T("1S",a.1f(x));b.T("1T",a.1i(y));b.T("r",r);b.T("1t","1J");b.T("1e","#1B");b.O=b.O||{};b.O.1S=x;b.O.1T=y;b.O.r=r;b.O.1e="#1B";I(a.1c){a.1c.1b(b)}9 c=1s v(b,a);c.18="2O";J c};9 A=G(a,x,y,w,h,r){9 b=17.1W(a.1P,"2b");b.T("x",a.1f(x));b.T("y",a.1i(y));b.T("U",a.1v(w));b.T("15",a.1x(h));b.O=b.O||{};b.O.x=x;b.O.y=y;b.O.U=w;b.O.15=h;I(r){b.T("2j",r);b.T("2k",r);b.O.2j=b.O.2k=r}b.T("1t","1J");b.T("1e","#1B");b.O.1e="#1B";I(a.1c){a.1c.1b(b)}9 c=1s v(b,a);c.18="2b";J c};9 B=G(a,x,y,b,c){9 d=17.1W(a.1P,"2P");d.T("1S",a.1f(x));d.T("1T",a.1i(y));d.T("2j",a.1v(b));d.T("2k",a.1x(c));d.T("1t","1J");d.T("1e","#1B");d.O=d.O||{};d.O.1S=x;d.O.1T=y;d.O.2j=b;d.O.2k=c;d.O.1e="#1B";I(a.1c){a.1c.1b(d)}9 e=1s v(d,a);e.18="2P";J e};9 D=G(a,b,x,y,w,h){9 c=17.1W(a.1P,"2y");c.T("x",a.1f(x));c.T("y",a.1i(y));c.T("U",a.1v(w));c.T("15",a.1x(h));c.5O(a.3s,"5P",b);I(a.1c){a.1c.1b(c)}9 d=1s v(c,a);d.18="2y";J d};9 E=G(a,x,y,b){9 c=17.1W(a.1P,"1K");c.T("x",x);c.T("y",y);c.T("1K-5Q","5R");c.T("1t","#1B");c.O=c.O||{};c.O.x=x;c.O.y=y;c.O.1t="#1B";I(b){c.1b(17.3r(b))}I(a.1c){a.1c.1b(c)}9 d=1s v(c,a);d.18="1K";J d};9 F=G(a){9 b=17.1W(a.1P,"g");I(a.1c){a.1c.1b(b)}9 i=1s v(b,a);1n(9 f 1w a){I(f[0]!="41"&&1m a[f]=="G"){i[f]=(G(f){J G(){9 e=a[f].2r(a,K);b.1b(e[0]);J e}})(f)}}i.18="1M";J i};r.3b=G(){I(1m K[0]=="2i"){9 a=17.42(K[0]);9 b=K[1];9 c=K[2]}I(1m K[0]=="2p"){9 a=K[0];9 b=K[1];9 c=K[2]}I(1m K[0]=="43"){9 a=1,x=K[0],y=K[1],b=K[2],c=K[3]}I(!a){44 1s 45("2B 46 47 48.");}C.1c=17.1W(C.1P,"3a");C.1c.T("U",b||4g);C.U=b||4g;C.1c.T("15",c||4h);C.15=c||4h;I(a==1){17.4b.1b(C.1c);C.1c.1a.2d="2e";C.1c.1a.1G=x+"1z";C.1c.1a.1y=y+"1z"}1l{I(a.1O){a.34(C.1c,a.1O)}1l{a.1b(C.1c)}}a={1c:C.1c,3p:G(){3e(7.1c.1O){7.1c.2l(7.1c.1O)}7.36=17.1W(C.1P,"36");7.4c=0;7.1c.1b(7.36)}};1n(9 d 1w C){I(d!="5S"){a[d]=C[d]}}a.3p();J a};C.1P="4i://4j.4k.4l/5T/3a";C.3s="4i://4j.4k.4l/5U/3s"}I(q=="2F"||q=="2B"){C.2O=G(x,y,r){J z(7,x,y,r)};C.2b=G(x,y,w,h,r){J A(7,x,y,w,h,r)};C.2P=G(x,y,a,b){J B(7,x,y,a,b)};C.N=G(a,b){J s(a,b,7)};C.2y=G(a,x,y,w,h){J D(7,a,x,y,w,h)};C.1K=G(x,y,a){J E(7,x,y,a)};C.1M=G(){J F(7)};C.5V=G(x,y,w,h,r){I(r&&1F(r,10)){J 7.N({1e:"#1B"}).1R(x+r,y).1k(x+w-r,y).2v(r,"5W").1k(x+w,y+h-r).2v(r,"5X").1k(x+r,y+h).2v(r,"5Y").1k(x,y+r).2v(r,"5Z").2h()}J 7.N({1e:"#1B"}).1R(x,y).1k(x+w,y).1k(x+w,y+h).1k(x,y+h).2h()};C.60=G(x,y,w,h,a,b,c){c=c||"#1B";9 p=7.N({1e:c,"1e-U":1}).1R(x,y).1k(x+w,y).1k(x+w,y+h).1k(x,y+h).1k(x,y);1n(9 i=1;i<b;i++){p.1R(x,y+i*Q.14(h/b)).1k(x+w,y+i*Q.14(h/b))}1n(9 i=1;i<a;i++){p.1R(x+i*Q.14(w/a),y).1k(x+i*Q.14(w/a),y+h)}J p};C.61=G(a,b,c,d,w,h){9 e=(c-a)/w;9 f=(d-b)/h;7.1f=G(x){J a+x*e};7.1i=G(y){J b+y*f};7.1v=G(w){J w*e};7.1x=G(h){J h*f}};C.62=G(){7.1f=7.1i=7.1v=7.1x=G(x){J x}};C.63=G(){I(r.18=="2B"){9 a=C.2b(-C.U,-C.15,C.U*3,C.15*3).32({1e:"1J"});64(G(){a.3o()},0)}};J r}1l{J G(){}}})((!(3t.4m&&3t.4m.65==2))?"2F":"2B");1H.35=!(1H.3a=(1H.18=="2B"));I(1H.35&&3t.66){1H.18="67 68";1H.35=1H.3a=2I}1H.2s=G(){J"69 6a 6b "+7.18};1H.4n=G(a,c,d){I(1m a=="2p"&&"h"1w a&&"s"1w a&&"b"1w a){d=a.b;c=a.s;a=a.h}9 e,1Y,1Z;I(d==0){J{r:0,g:0,b:0,3u:"#1B"}}1l{9 i=Q.6c(a*6),f=(a*6)-i,p=d*(1-c),q=d*(1-(c*f)),t=d*(1-(c*(1-f)));[G(){e=d;1Y=t;1Z=p},G(){e=q;1Y=d;1Z=p},G(){e=p;1Y=d;1Z=t},G(){e=p;1Y=q;1Z=d},G(){e=t;1Y=p;1Z=d},G(){e=d;1Y=p;1Z=q},G(){e=d;1Y=t;1Z=p},][i]()}9 h={r:e,g:1Y,b:1Z};e*=2E;1Y*=2E;1Z*=2E;9 r=Q.14(e).2s(16);I(r.1d==1){r="0"+r}9 g=Q.14(1Y).2s(16);I(g.1d==1){g="0"+g}9 b=Q.14(1Z).2s(16);I(b.1d==1){b="0"+b}h.3u="#"+r+g+b;J h};1H.6d=G(a,b,c){I(1m a=="2p"&&"r"1w a&&"h"1w a&&"b"1w a){c=a.b;b=a.g;a=a.r}I(a.2V(0)=="#"){I(a.1d==4){c=1F(a.2m(3),16);b=1F(a.2m(2,3),16);a=1F(a.2m(1,2),16)}1l{c=1F(a.2m(5),16);b=1F(a.2m(3,5),16);a=1F(a.2m(1,3),16)}}I(a>1||b>1||c>1){a/=2E;b/=2E;c/=2E}9 d=Q.6e(a,b,c),2S=Q.2S(a,b,c),25,3v,4o=d;I(2S==d){J{h:0,s:0,b:d}}1l{9 e=(d-2S);3v=e/d;I(a==d){25=(b-c)/e}1l I(b==d){25=2+((c-a)/e)}1l{25=4+((a-b)/e)}25/=6;I(25<0){25+=1}I(25>1){25-=1}}J{h:25,s:3v,b:4o}};1H.4p=G(a){9 b=K.3h.3w=K.3h.3w||{h:0,s:1,b:a||.6f};9 c=7.4n(b.h,b.s,b.b);b.h+=.1;I(b.h>1){b.h=0;b.s-=.2;I(b.s<=0){b={h:0,s:1,b:b.b}}}J c.3u};1H.4p.6g=G(){7.3w=1U};'
,
62
,
389
,
'|||||||this||var|||||||||||||||||||||||||||||||||function||if|return|arguments|||path|attrs|isAbsolute|Math|||setAttribute|width|||||||parseFloat||last|round|height||document|type|case|style|appendChild|canvas|length|stroke|_getX|100|break|_getY|ii|lineTo|else|typeof|for|rvml|curveTo|dots|createElement|new|fill|Group|_getW|in|_getH|top|px|opacity|000|gradient|absolutely|relatively|parseInt|left|Raphael|push|none|text|parentNode|group|arg|firstChild|svgns|transformations|moveTo|cx|cy|undefined|vector|createElementNS|value|green|blue|pos|join|rollback|color|cs|hue|true|replace|font||on|rect|Matrix|position|absolute|shape|Path|andClose|string|rx|ry|removeChild|substring|bx|by|object|getAttribute|apply|toString|gl|ol|addRoundedCorner|setBox|os|image|gs|els|SVG|ScaleX|ScaleY|255|VML|coordsize|coordorigin|false|slice|call|y1|getElementsByTagName|dasharray|circle|ellipse|getBBox|id|min|rs|bs|charAt|ig|switch|weight|offset|display|diry|attr|childNodes|insertBefore|vml|defs|Rotation|deg|transform|svg|_create|end|split|while|dashesn|toLowerCase|callee|textpath|default|rotate|translate|matrix|tMatrix|remove|clear|stop|createTextNode|xlink|window|hex|saturation|start|prototype|class|redraw|To|move|line|arcTo|arc|cplineTo|cpline|curve|5522|mzlhvcsqta|family|size|miter|miterlimit|square|str|hide|show|block|filter|scale|abs|instanceof|Array|toFront|toBack|oval|_|getElementById|number|throw|Error|container|not|found|namespaces|url|body|gradients|dx|dy|toUpperCase|320|200|http|www|w3|org|SVGPreserveAspectRatio|hsb2rgb|brightness|getColor|version|progid|DXImageTransform|Microsoft|M11|M12|M21|M22|Dx|Dy|sizingmethod|auto|expand|filtertype|bilinear|className|sqrt|wa|wr|at|ar|fontFamily|fontSize|fontWeight|joinstyle|linejoin|endcap|butt|flat|linecap|isNaN|dashstyle|linear|gradientradial|opacity2|color2|colors|atan|180|angle|90|radial|focusposition||focussize|method|RotX||RotY|Scale|name|Element|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|safari|setTimeout|SVG_PRESERVEASPECTRATIO_XMINYMIN|CanvasRenderingContext2D|Canvas|only|Your|browser|supports|floor|rgb2hsb|max|75|reset'
.
split
(
'|'
),
0
,{}))
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(){N r.3h.2v(r,O)};r.4C="0.5.6b";r.1a=q;9 C={};I 2f(a,b,c,d,e,f){7.m=[[a||1,b||0,0],[c||0,d||1,0],[e||0,f||0,1],]}C.1g=C.1i=C.1x=C.1z=I(x){N x};J(q=="2N"){2f.1o.2w=I(){N"4D:4E.4F.2f(4G="+7.m[0][0]+", 4H="+7.m[1][0]+", 4I="+7.m[0][1]+", 4J="+7.m[1][1]+", 4K="+7.m[2][0]+", 4L="+7.m[2][1]+", 4M=\'4N 4O\', 4P=\'4Q\')"};9 t=I(j,l,m){9 g=19.1v("1q:1P"),2x=g.1j;2x.2g="2h";2x.1J=0;2x.1A=0;2x.11=m.11+"1B";2x.17=m.17+"1B";9 n=19.1v("1q:2i"),2y=n.1j;2y.11=m.11+"1B";2y.17=m.17+"1B";n.K="";J(j["3F"]){n.4R=j["3F"]}n.2O=7.2O;n.2P=7.2P;g.1b(n);m.1d.1b(g);9 p=1s z(n,g,m);u(p,j);J(j.1H){v(p,j.1H)}p.Q=2b;p.1a="K";p.K=[];p.13={x:0,y:0,2r:0,2s:0,Q:2b};p.2j="";p.1D=I(){7.Q=2b;N 7};p.1E=I(){7.Q=33;N 7};p.3G=I(){7.2j="";9 a=7.K;7.K=[];1p(9 i=0,1k=a.1e;i<1k;i++){J(a[i].1a!="3i"){7[a[i].1a+"3H"].2v(7,a[i].1Q)}1m{7.2k()}}N 7};p.1V=I(x,y){9 d=7.Q?"m":"t";9 a=7.Q?m.1g:m.1x;9 b=7.Q?m.1i:m.1z;d+=T.15(a(14(x,10)))+" "+T.15(b(14(y,10)));7[0].K=7.2j+=d;7.13.x=(7.Q?0:7.13.x)+T.15(a(14(x,10)));7.13.y=(7.Q?0:7.13.y)+T.15(b(14(y,10)));7.13.Q=7.Q;7.K.1M({1a:"3I",1Q:[].2Q.2z(O,0),22:7.Q});N 7};p.1l=I(x,y){9 d=7.Q?"l":"r";9 a=7.Q?m.1g:m.1x;9 b=7.Q?m.1i:m.1z;d+=T.15(a(14(x,10)))+" "+T.15(b(14(y,10)));7[0].K=7.2j+=d;7.13.x=(7.Q?0:7.13.x)+T.15(a(14(x,10)));7.13.y=(7.Q?0:7.13.y)+T.15(b(14(y,10)));7.13.Q=7.Q;7.K.1M({1a:"3J",1Q:[].2Q.2z(O,0),22:7.Q});N 7};p.2A=I(a,b,c,e,f,g){f=(7.Q?0:7.13.x)+f;g=(7.Q?0:7.13.y)+g;9 h=7.13.x,2R=7.13.y,x=(h-f)/2,y=(2R-g)/2,k=(c==e?-1:1)*T.4S((a*a*b*b-a*a*y*y-b*b*x*x)/(a*a*y*y+b*b*x*x)),1G=k*a*y/b+(h+f)/2,1K=k*-b*x/a+(2R+g)/2,d=e?(7.Q?"4T":"4U"):(7.Q?"4V":"4W"),1g=7.Q?m.1g:m.1x,1i=7.Q?m.1i:m.1z,1J=T.15(1G-a),1A=T.15(1K-b);d+=[1J,1A,1J+a*2,1A+b*2,h,2R,T.15(1g(14(f,10))),T.15(1g(14(g,10)))].23(", ");7[0].K=7.2j+=d;7.13.x=(7.Q?0:7.13.x)+T.15(1g(14(f,10)));7.13.y=(7.Q?0:7.13.y)+T.15(1i(14(g,10)));7.13.Q=7.Q;7.K.1M({1a:"3K",1Q:[].2Q.2z(O,0),22:7.Q});N 7};p.3L=I(a,b,c){J(!c){N 7.1l(a,b)}1m{9 p={};p.1g=7.Q?m.1g:m.1x;p.1i=7.Q?m.1i:m.1z;9 x=T.15(p.1g(T.15(14(a,10)*1h)/1h));9 y=T.15(p.1i(T.15(14(b,10)*1h)/1h));9 w=T.15(m.1x(T.15(14(c,10)*1h)/1h));9 d=7.Q?"c":"v";9 e=[7.13.x+w,7.13.y,x-w,y,x,y];d+=e.23(" ")+" ";7.13.x=(7.Q?0:7.13.x)+e[4];7.13.y=(7.Q?0:7.13.y)+e[5];7.13.2r=e[2];7.13.2s=e[3];7[0].K=7.2j+=d;7.K.1M({1a:"3M",1Q:[].2Q.2z(O,0),22:7.Q});N 7}};p.1r=I(){9 d=7.Q?"c":"v";9 a=7.Q?m.1g:m.1x;9 b=7.Q?m.1i:m.1z;J(O.1e==6){7.13.x=(7.Q?0:7.13.x)+T.15(a(14(O[4],10)));7.13.y=(7.Q?0:7.13.y)+T.15(b(14(O[5],10)));7.13.2r=T.15(a(14(O[2],10)));7.13.2s=T.15(b(14(O[3],10)));d+=T.15(a(14(O[0],10)))+" "+T.15(b(14(O[1],10)))+" "+T.15(a(14(O[2],10)))+" "+T.15(b(14(O[3],10)))+" "+T.15(a(14(O[4],10)))+" "+T.15(b(14(O[5],10)))+" ";7.13.Q=7.Q}7[0].K=7.2j+=d;7.K.1M({1a:"3N",1Q:[].2Q.2z(O,0),22:7.Q});N 7};p.2B=I(r,a){9 R=.3O*r,24=7.Q,o=7;J(24){7.1E();24=I(){o.1D()}}1m{24=I(){}}9 b={l:I(){N{u:I(){o.1r(-R,0,-r,-(r-R),-r,-r)},d:I(){o.1r(-R,0,-r,r-R,-r,r)}}},r:I(){N{u:I(){o.1r(R,0,r,-(r-R),r,-r)},d:I(){o.1r(R,0,r,r-R,r,r)}}},u:I(){N{r:I(){o.1r(0,-R,-(R-r),-r,r,-r)},l:I(){o.1r(0,-R,R-r,-r,-r,-r)}}},d:I(){N{r:I(){o.1r(0,R,-(R-r),r,r,r)},l:I(){o.1r(0,R,R-r,r,-r,r)}}}};b[a.34(0)]()[a.34(1)]();24();N o};p.2k=I(){7[0].K=(7.2j+="x e");N 7};J(1n l=="2l"){l=l.2c(/([3P])/35,",$1,").2c(/([^,])\\-/35,"$1,-");K=l.3j(",");9 i=1,1k=K.1e;3k(i<1k){36(K[i]){18"M":p.1D().1V(K[++i],K[++i]);1c;18"m":p.1E().1V(K[++i],K[++i]);1c;18"C":p.1D().1r(K[++i],K[++i],K[++i],K[++i],K[++i],K[++i]);1c;18"c":p.1E().1r(K[++i],K[++i],K[++i],K[++i],K[++i],K[++i]);1c;18"L":p.1D().1l(K[++i],K[++i]);1c;18"l":p.1E().1l(K[++i],K[++i]);1c;18"H":p.1D().1l(K[++i],0);1c;18"h":p.1E().1l(K[++i],0);1c;18"V":p.1D().1l(0,K[++i]);1c;18"v":p.1E().1l(0,K[++i]);1c;18"A":p.1D().2A(K[++i],K[++i],K[++i],K[++i],K[++i],K[++i]);1c;18"a":p.1E().2A(K[++i],K[++i],K[++i],K[++i],K[++i],K[++i]);1c;18"Z":18"z":p.2k();1c}i++}}N p};9 u=I(o,a){9 s=o[0].1j;o.P=o.P||{};1p(9 b 1t a){o.P[b]=a[b]}a["2d-3Q"]&&(s.4X=a["2d-3Q"]);a["2d-3R"]&&(s.4Y=a["2d-3R"]);a["2d"]&&(s.2d=a["2d"]);a["2d-37"]&&(s.4Z=a["2d-37"]);J(1n a.1C!="1W"||1n a["1f-11"]!="1W"||1n a.1y!="1W"||1n a.1f!="1W"){o=o.2i||o[0];9 c=(o.2S("1y")&&o.2S("1y")[0])||19.1v("1q:1y");J("1y-1C"1t a||"1C"1t a){c.1C=((a["1y-1C"]+1||2)-1)*((a.1C+1||2)-1)}c.2m=(a.1y&&a.1y!="1R");J(c.2m&&a.1y){c.25=a.1y}o.1b(c);9 d=(o.2S("1f")&&o.2S("1f")[0])||19.1v("1q:1f");J((a.1f&&a.1f!="1R")||a["1f-11"]||a["1f-1C"]||a["1f-2T"]){d.2m=2b}J(a.1f=="1R"||1n d.2m=="1W"){d.2m=33}J(d.2m&&a.1f){d.25=a.1f}d.1C=((a["1f-1C"]+1||2)-1)*((a.1C+1||2)-1);d.50=a["1f-51"]||"3S";d.3T=a["1f-3T"]||8;d.52={53:"54",3U:"3U",15:"15"}[a["1f-55"]||"3S"];J(a["1f-11"]){d.37=(14(a["1f-11"],10)||1)*12/16}J(a["1f-2T"]){9 e=a["1f-2T"].2c(" ",",").3j(","),3l=[],3V=d.37;1p(9 i=0,1k=e.1e;i<1k;i++){9 f=e[i]/3V;J(!56(f)){3l.1M(f)}};d.58=3l.23(" ")}o.1b(d)}};9 v=I(o,a){o.P=o.P||{};o.P.1H=a;o=o.2i||o[0];9 b=o.2S("1y");J(b.1e){b=b[0]}1m{b=19.1v("1q:1y")}J(a.1u.1e){b.2m=2b;b.1a=(a.1a.3m()=="59")?"1H":"5a";J(1n a.1u[0].25!="1W"){b.25=a.1u[0].25||"#1F"}J(1n a.1u[0].1C!="1W"){b.1C=a.1u[0].1C}J(1n a.1u[a.1u.1e-1].1C!="1W"){b.5b=a.1u[a.1u.1e-1].1C}J(1n a.1u[a.1u.1e-1].25!="1W"){b.5c=a.1u[a.1u.1e-1].25||"#1F"}9 c="";1p(9 i=1,1k=a.1u.1e-1;i<1k;i++){c+=a.1u[i].38+" "+a.1u[i].25;J(i!=1k-1){c+=","}};J(c){b.5d=c}J(a.1X){9 d=T.15(T.3W((1I(a.1X[3],10)-1I(a.1X[1],10))/(1I(a.1X[2],10)-1I(a.1X[0],10)))*57.29)+5e;b.5f=d+5g}J(a.1a.3m()=="5h"){b.5i="0.5, 0.5";b.5j="0, 0";b.5k="1R"}}};9 z=I(a,b,c){9 d=0,5l=0,5m=0,5n=1;7[0]=a;7.X=0;7.Y=0;7.P={};7.1w=b;7.26=c};z.1o.2C=I(a){9 b=7.1w.1j,2D=7[0].1j;1p(9 i 1t a){7.P[i]=a[i]}9 c=7.P,x,y,w,h;36(7.1a){18"2U":x=c.1G-c.r;y=c.1K-c.r;w=h=c.r*2;1c;18"2V":x=c.1G-c.2n;y=c.1K-c.2o;w=c.2n*2;h=c.2o*2;1c;18"2e":18"2E":x=c.x;y=c.y;w=c.w;h=c.h;1c;18"1N":7.3n.v=["m",T.15(c.x),", ",T.15(c.y-2),"l",T.15(c.x)+1,", ",T.15(c.y-2)].23("");N;3o:N}9 d=7.26.11/2-w/2,1A=7.26.17/2-h/2;b.2g="2h";b.1J=x-d+"1B";b.1A=y-1A+"1B";7.X=x-d;7.Y=y-1A;7.W=w;7.H=h;b.11=7.26.11+"1B";b.17=7.26.17+"1B";2D.2g="2h";2D.1A=1A+"1B";2D.1J=d+"1B";2D.11=w+"1B";2D.17=h+"1B"};z.1o.3X=I(){7.1w.1j.39="1R";N 7};z.1o.3Y=I(){7.1w.1j.39="3Z";N 7};z.1o.3p=I(a){2F+=a;7.1w.1j.5o=2F;N 7};z.1o.3q=I(x,y){7.X+=x;7.Y+=y;7.1w.1j.1J=7.X+"1B";7.1w.1j.1A=7.Y+"1B";N 7};z.1o.3r=I(a,b,c,d,e,f){3s=1s 2f(a,b,c,d,e,f);7.1w.1j.40=3s;N 7};z.1o.41=I(x,y){y=y||x;J(x!=0&&!(x==1&&y==1)){9 a=T.15(x/T.42(x)),3a=T.15(y/T.42(y)),s=7[0].1j;J(a!=1||3a!=1){s.40=1s 2f(a,0,0,3a,0,0)}9 b=1I(s.11,10)*x*a;9 c=1I(s.17,10)*y*3a;9 d=1I(s.1J,10);9 e=1I(s.1A,10);s.1J=7.X=d+7.W/2-b/2;s.1A=7.Y=e+7.H/2-c/2;s.11=7.W=b;s.17=7.H=c}N 7};z.1o.2W=I(){N{x:7.1w.5p,y:7.1w.5q,11:7.1w.5r,17:7.1w.5s}};z.1o.3t=I(){7[0].1O.2p(7[0]);7.1w.1O.2p(7.1w);7.2i&&7.2i.1O.2p(7.2i)};z.1o.2G=I(){J(O.1e==1&&1n O[0]=="2l"){N 7.P[O[0]]}J(7.P&&O.1e==1&&O[0]43 44){9 a={};1p(9 i=0,1k=O[0].1e;i<1k;i++){a[O[0][i]]=7.P[O[0][i]]};N a}J(7[0].5t.3m()=="1P"){9 b=7[0].3b;7.P=7.P||{};J(O.1e==2){7.P[O[0]]=O[1]}1m J(O.1e==1||1n O[0]=="2t"){1p(9 j 1t O[0]){7.P[j]=O[0][j]}}1p(9 i=0,1k=b.1e;i<1k;i++){7.2G.2v(1s 5u(b[i],7[0],7.26),O)}}1m{9 c;J(O.1e==2){c={};c[O[0]]=O[1]}J(O.1e==1&&1n O[0]=="2t"){c=O[0]}J(c){u(7,c);7.2C(c);J(c.1H){v(7,c.1H)}J(c.1N&&7.1a=="1N"){7[0].2l=c.1N}J(c.2X){7[0].2X=c.2X}}}N 7};z.1o.45=I(){7.1w.1O.1b(7.1w);N 7};z.1o.46=I(){J(7.1w.1O.1S!=7.1w){7.1w.1O.3c(7.1w,7.1w.1O.1S)}N 7};9 A=I(a,x,y,r){9 g=19.1v("1q:1P");9 o=19.1v("1q:47");g.1b(o);a.1d.1b(g);9 b=1s z(o,g,a);u(b,{1f:"#1F",1y:"1R"});b.2C({x:x-r,y:y-r,w:r*2,h:r*2});b.P.1G=x;b.P.1K=y;b.P.r=r;b.1a="2U";N b};9 B=I(a,x,y,w,h,r){9 g=19.1v("1q:1P");9 o=19.1v(r?"1q:5v":"1q:2e");J(r){o.5w=r/(T.2Y(w,h))}g.1b(o);a.1d.1b(g);9 b=1s z(o,g,a);u(b,{1f:"#1F"});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.1a="2e";N b};9 D=I(a,x,y,b,c){9 g=19.1v("1q:1P");9 o=19.1v("1q:47");g.1b(o);a.1d.1b(g);9 d=1s z(o,g,a);u(d,{1f:"#1F"});d.2C({x:x-b,y:y-c,w:b*2,h:c*2});d.P.1G=x;d.P.1K=y;d.P.2n=b;d.P.2o=c;d.1a="2V";N d};9 E=I(a,b,x,y,w,h){9 g=19.1v("1q:1P");9 o=19.1v("1q:2E");o.5x=b;g.1b(o);a.1d.1b(g);9 c=1s z(o,g,a);c.1a="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;N c};9 F=I(a,x,y,b){9 g=19.1v("1q:1P"),2H=g.1j;9 c=19.1v("1q:2i"),2y=c.1j;9 d=19.1v("1q:K"),5y=d.1j;d.v=["m",T.15(x),", ",T.15(y-2),"l",T.15(x)+1,", ",T.15(y-2)].23("");d.5z=2b;2y.11=a.11;2y.17=a.17;2H.2g="2h";2H.1J=0;2H.1A=0;2H.11=a.11;2H.17=a.17;9 o=19.1v("1q:3n");o.2l=b;o.2m=2b;o.2O=a.2O;o.2P=a.2P;c.1b(o);c.1b(d);g.1b(c);a.1d.1b(g);9 e=1s z(o,g,a);e.2i=c;e.3n=d;e.1a="1N";e.P.x=x;e.P.y=y;e.P.w=1;e.P.h=1;N e};9 G=I(a){9 b=19.1v("1q:1P"),2I=b.1j;2I.2g="2h";2I.1J=0;2I.1A=0;2I.11=a.11;2I.17=a.17;J(a.1d){a.1d.1b(b)}9 c=1s z(b,b,a);1p(9 f 1t a){J(f.34(0)!="48"&&1n a[f]=="I"){c[f]=(I(f){N I(){9 e=a[f].2v(a,O);b.1b(e[0].1O);N e}})(f)}}c.1a="1P";N c};r.3h=I(){9 d,11,17;J(1n O[0]=="2l"){d=19.49(O[0]);11=O[1];17=O[2]}J(1n O[0]=="2t"){d=O[0];11=O[1];17=O[2]}J(1n O[0]=="4a"){d=1;x=O[0];y=O[1];11=O[2];17=O[3]}J(!d){4b 1s 4c("2N 4d 4e 4f.");}J(!19.4g["1q"]){19.4g.5A("1q","5B:5C-5D-5E:26");19.5F().5G("1q\\\\:*","5H:4h(#3o#2N)")}9 c=19.1v("5I"),r=C.1d=19.1v("1q:1P"),27=c.1j,2Z=r.1j;C.11=11;C.17=17;11=11||"5J";17=17||"5K";27.5L="2e(0 "+11+" "+17+" 0)";27.2g="2h";2Z.11=11;2Z.17=17;r.2O=(11=="1h%"?11:14(11))+" "+(17=="1h%"?17:14(17));r.2P="0 0";9 b=19.1v("1q:2e"),30=b.1j;30.1J=30.1A=0;30.11=2Z.11;30.17=2Z.17;b.5M=b.5N="f";r.1b(b);c.1b(r);J(d==1){19.4i.1b(c);27.2g="2h";27.1J=x+"1B";27.1A=y+"1B";27.11=11;27.17=17;d={1j:{11:11,17:17}}}1m{27.11=d.1j.11=11;27.17=d.1j.17=17;J(d.1S){d.3c(c,d.1S)}1m{d.1b(c)}}1p(9 e 1t C){d[e]=C[e]}d.3u=I(){9 a=[];1p(9 i=0,1k=r.3b.1e;i<1k;i++){J(r.3b[i]!=b){a.1M(r.3b[i])}}1p(i=0,1k=a.1e;i<1k;i++){r.2p(a[i])}};N d}}J(q=="2J"){2f.1o.2w=I(){N"3r("+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=19.1Y(l.1T,"K");m.U("1y","1R");J(j){1p(9 n 1t j){J(j.1H){v(m,j.1H,l)}1m{m.U(n,j[n])}}}J(l.1d){l.1d.1b(m)}9 p=1s z(m,l);1p(9 n 1t j){p.P[n]=j[n]}p.Q=2b;p.K=[];p.13={x:0,y:0,2r:0,2s:0};p.1D=I(){7.Q=2b;N 7};p.1E=I(){7.Q=33;N 7};p.3G=I(){7[0].U("d","5O 0");9 a=7.K;7.K=[];1p(9 i=0,1k=a.1e;i<1k;i++){J(a[i].1a!="3i"){7[a[i].1a+"3H"].2v(7,a[i].1Q)}1m{7.2k()}}N 7};p.1V=I(x,y){9 d=7.Q?"M":"m";9 a=7.Q?l.1g:l.1x;9 b=7.Q?l.1i:l.1z;d+=a(14(x,10))+" "+b(14(y,10))+" ";9 c=7[0].2u("d")||"";7[0].U("d",c+d);7.13.x=l.1g(14(x,10));7.13.y=l.1i(14(y,10));7.K.1M({1a:"3I",1Q:O,22:7.Q});N 7};p.1l=I(x,y){9 d=7.Q?"L":"l";9 a=7.Q?l.1g:l.1x;9 b=7.Q?l.1i:l.1z;d+=a(14(x,10))+" "+b(14(y,10))+" ";9 c=7[0].2u("d")||"";7[0].U("d",c+d);7.13.x=l.1g(14(x,10));7.13.y=l.1i(14(y,10));7.K.1M({1a:"3J",1Q:O,22:7.Q});N 7};p.2A=I(a,b,c,e,x,y){9 d=7.Q?"A":"a";9 f=7.Q?l.1g:l.1x;9 g=7.Q?l.1i:l.1z;d+=[l.1x(14(a,10)),l.1z(14(b,10)),0,c,e,f(14(x,10)),g(14(y,10))].23(" ");9 h=7[0].2u("d")||"";7[0].U("d",h+d);7.13.x=l.1g(14(x,10));7.13.y=l.1i(14(y,10));7.K.1M({1a:"3K",1Q:O,22:7.Q});N 7};p.3L=I(a,b,c){J(!c){N 7.1l(a,b)}1m{9 p={};p.1g=7.Q?l.1g:l.1x;p.1i=7.Q?l.1i:l.1z;9 x=p.1g(T.15(14(a,10)*1h)/1h);9 y=p.1i(T.15(14(b,10)*1h)/1h);9 w=l.1x(T.15(14(c,10)*1h)/1h);9 d=7.Q?"C":"c";9 e=[7.13.x+w,7.13.y,x-w,y,x,y];1p(9 i=0,1k=e.1e;i<1k;i++){d+=e[i]+" "}7.13.x=e[4];7.13.y=e[5];7.13.2r=e[2];7.13.2s=e[3];9 f=7[0].2u("d")||"";7[0].U("d",f+d);7.K.1M({1a:"3M",1Q:O,22:7.Q});N 7}};p.1r=I(){9 p={};p.1g=7.Q?l.1g:l.1x;p.1i=7.Q?l.1i:l.1z;J(O.1e==6){9 d=7.Q?"C":"c";1p(9 i=0,1k=O.1e;i<1k;i++){d+=p[(i%2==0)?"1g":"1i"](T.15(14(O[i],10)*1h)/1h)+" "}7.13.x=p.1g((14(O[4],10)*1h)/1h);7.13.y=p.1i((14(O[5],10)*1h)/1h);7.13.2r=p.1g((14(O[2],10)*1h)/1h);7.13.2s=p.1i((14(O[3],10)*1h)/1h)}1m{J(O.1e==4){9 d=7.Q?"S":"s";1p(9 i=0,1k=O.1e;i<1k;i++){d+=p[i%2==0?"1g":"1i"]((14(O[i],10)*1h)/1h)+" "}}7.13.x=p.1g((14(O[2],10)*1h)/1h);7.13.y=p.1i((14(O[3],10)*1h)/1h);7.13.2r=p.1g((14(O[0],10)*1h)/1h);7.13.2s=p.1i((14(O[1],10)*1h)/1h)}9 a=7[0].2u("d")||"";7[0].U("d",a+d);7.K.1M({1a:"3N",1Q:O,22:7.Q});N 7};p.2B=I(r,a){9 R=.3O*r,24=7.Q,o=7;J(24){7.1E();24=I(){o.1D()}}1m{24=I(){}}9 b={l:I(){N{u:I(){o.1r(-R,0,-r,-(r-R),-r,-r)},d:I(){o.1r(-R,0,-r,r-R,-r,r)}}},r:I(){N{u:I(){o.1r(R,0,r,-(r-R),r,-r)},d:I(){o.1r(R,0,r,r-R,r,r)}}},u:I(){N{r:I(){o.1r(0,-R,-(R-r),-r,r,-r)},l:I(){o.1r(0,-R,R-r,-r,-r,-r)}}},d:I(){N{r:I(){o.1r(0,R,-(R-r),r,r,r)},l:I(){o.1r(0,R,R-r,r,-r,r)}}}};b[a[0]]()[a[1]]();24();N o};p.2k=I(){9 a=7[0].2u("d")||"";7[0].U("d",a+"Z ");7.K.1M({1a:"3i"});N 7};J(1n k=="2l"){k=k.2c(/([3P])/35,",$1,").2c(/([^,])\\-/35,"$1,-");K=k.3j(",");9 i=1,1k=K.1e;3k(i<1k){36(K[i]){18"M":p.1D().1V(K[++i],K[++i]);1c;18"m":p.1E().1V(K[++i],K[++i]);1c;18"C":p.1D().1r(K[++i],K[++i],K[++i],K[++i],K[++i],K[++i]);1c;18"c":p.1E().1r(K[++i],K[++i],K[++i],K[++i],K[++i],K[++i]);1c;18"s":p.1E().1r(K[++i],K[++i],K[++i],K[++i]);1c;18"S":p.1D().1r(K[++i],K[++i],K[++i],K[++i]);1c;18"L":p.1D().1l(K[++i],K[++i]);1c;18"l":p.1E().1l(K[++i],K[++i]);1c;18"H":p.1D().1l(K[++i],0);1c;18"h":p.1E().1l(K[++i],0);1c;18"V":p.1D().1l(0,K[++i]);1c;18"v":p.1E().1l(0,K[++i]);1c;18"A":p.1D().2A(K[++i],K[++i],K[++i],K[++i],K[++i],K[++i]);1c;18"a":p.1E().2A(K[++i],K[++i],K[++i],K[++i],K[++i],K[++i]);1c;18"z":p.2k();1c}i++}}N p};9 v=I(o,a,b){9 c=19.1Y(b.1T,a.1a+"5P");c.2X="5Q-1H-"+b.4j++;J(a.1X&&a.1X.1e){c.U("5R",a.1X[0]);c.U("2R",a.1X[1]);c.U("5S",a.1X[2]);c.U("5T",a.1X[3])}b.3d.1b(c);1p(9 i=0,1k=a.1u.1e;i<1k;i++){9 d=19.1Y(b.1T,"3v");d.U("38",a.1u[i].38?a.1u[i].38:(i==0)?"0%":"1h%");d.U("3v-25",a.1u[i].25||"#5U");J(1n a.1u[i].1C!="1W"){d.U("3v-1C",a.1u[i].1C)}c.1b(d)};o.U("1y","4h(#"+c.2X+")")};9 z=I(a,b){9 X=0,Y=0,2F={3e:0,x:0,y:0},2K=1,2L=1,3s=5V;7[0]=a;7.P=7.P||{};7.1U=[]};z.1o.3X=I(){7[0].1j.39="1R";N 7};z.1o.3Y=I(){7[0].1j.39="3Z";N 7};z.1o.3p=I(a){9 b=7.2W();2F.3e+=a;J(2F.3e){7.1U[0]=("3p("+2F.3e+" "+(b.x+b.11/2)+" "+(b.y+b.17/2)+")")}1m{7.1U[0]=""}7[0].U("3f",7.1U.23(" "));N 7};z.1o.3q=I(x,y){X+=x;Y+=y;J(X&&Y){7.1U[1]="3q("+X+","+Y+")"}1m{7.1U[1]=""}7[0].U("3f",7.1U.23(" "));N 7};z.1o.41=I(x,y){y=y||x;J(x!=0&&!(x==1&&y==1)){2K*=x;2L*=y;J(!(2K==1&&2L==1)){9 a=7.2W(),31=a.x*(1-2K)+(a.11/2-a.11*2K/2),4k=a.y*(1-2L)+(a.17/2-a.17*2L/2);7.1U[2]=1s 2f(2K,0,0,2L,31,4k)}1m{7.1U[2]=""}7[0].U("3f",7.1U.23(" "))}N 7};z.1o.3r=I(a,b,c,d,e,f){7.1U[3]=1s 2f(a,b,c,d,e,f);7[0].U("3f",7.1U.23(" "));N 7};z.1o.3t=I(){7[0].1O.2p(7[0])};z.1o.2W=I(){N 7[0].2W()};z.1o.2G=I(){J(O.1e==1&&1n O[0]=="2l"){N 7[0].2u(O[0])}J(O.1e==1&&O[0]43 44){9 a={};1p(9 j 1t O[0]){a[O[0][j]]=7.P[O[0][j]]}N a}J(O.1e==2){9 b=O[0],1Z=O[1];7[b]=1Z;7.P[b]=1Z;36(b){18"2n":18"1G":18"x":7[0].U(b,28.1g(1Z));1c;18"2o":18"1K":18"y":7[0].U(b,28.1i(1Z));1c;18"11":7[0].U(b,28.1x(1Z));1c;18"17":7[0].U(b,28.1z(1Z));1c;18"1H":v(7[0],d.1H,28);1c;18"1f-2T":7[0].U(b,1Z.2c(" ",","));1c;18"1N":J(7.1a=="1N"){7[0].2p(7[0].1S);7[0].1b(19.3w(1Z))}1c;3o:9 c=b.2c(/(\\-.)/g,I(w){N w.2q(1).4l()});7[0].1j[c]=1Z;7[0].U(b,1Z);1c}}1m J(O.1e==1&&1n O[0]=="2t"){9 d=O[0];1p(9 e 1t d){7.P[e]=d[e];J(e=="1f-2T"){7[0].U(e,d[e].2c(" ",","))}1m J(e=="1N"&&7.1a=="1N"){7[0].2p(7[0].1S);7[0].1b(19.3w(d[e]))}1m{9 c=e.2c(/(\\-.)/g,I(w){N w.2q(1).4l()});7[0].1j[c]=d[e];7[0].U(e,d[e])}}J(d.1H){7.P.1H=d.1H;v(7[0],d.1H,28)}}N 7};z.1o.45=I(){7[0].1O.1b(7[0]);N 7};z.1o.46=I(){J(7[0].1O.1S!=7[0]){7[0].1O.3c(7[0],7[0].1O.1S)}N 7};9 A=I(a,x,y,r){9 b=19.1Y(a.1T,"2U");b.U("1G",a.1g(x));b.U("1K",a.1i(y));b.U("r",r);b.U("1y","1R");b.U("1f","#1F");J(a.1d){a.1d.1b(b)}9 c=1s z(b,a);c.P=c.P||{};c.P.1G=x;c.P.1K=y;c.P.r=r;c.P.1f="#1F";c.1a="2U";N c};9 B=I(a,x,y,w,h,r){9 b=19.1Y(a.1T,"2e");b.U("x",a.1g(x));b.U("y",a.1i(y));b.U("11",a.1x(w));b.U("17",a.1z(h));J(r){b.U("2n",r);b.U("2o",r)}b.U("1y","1R");b.U("1f","#1F");J(a.1d){a.1d.1b(b)}9 c=1s z(b,a);c.P=c.P||{};c.P.x=x;c.P.y=y;c.P.11=w;c.P.17=h;c.P.1f="#1F";J(r){c.P.2n=c.P.2o=r}c.1a="2e";N c};9 D=I(a,x,y,b,c){9 d=19.1Y(a.1T,"2V");d.U("1G",a.1g(x));d.U("1K",a.1i(y));d.U("2n",a.1x(b));d.U("2o",a.1z(c));d.U("1y","1R");d.U("1f","#1F");J(a.1d){a.1d.1b(d)}9 e=1s z(d,a);e.P=e.P||{};e.P.1G=x;e.P.1K=y;e.P.2n=b;e.P.2o=c;e.P.1f="#1F";e.1a="2V";N e};9 E=I(a,b,x,y,w,h){9 c=19.1Y(a.1T,"2E");c.U("x",a.1g(x));c.U("y",a.1i(y));c.U("11",a.1x(w));c.U("17",a.1z(h));c.5W(a.3x,"5X",b);J(a.1d){a.1d.1b(c)}9 d=1s z(c,a);d.P=d.P||{};d.P.x=x;d.P.y=y;d.P.11=w;d.P.17=h;d.1a="2E";N d};9 F=I(a,x,y,b){9 c=19.1Y(a.1T,"1N");c.U("x",x);c.U("y",y);c.U("1N-5Y","5Z");c.U("1y","#1F");J(b){c.1b(19.3w(b))}J(a.1d){a.1d.1b(c)}9 d=1s z(c,a);d.P=d.P||{};d.P.x=x;d.P.y=y;d.P.1y="#1F";d.1a="1N";N d};9 G=I(a){9 b=19.1Y(a.1T,"g");J(a.1d){a.1d.1b(b)}9 i=1s z(b,a);1p(9 f 1t a){J(f[0]!="48"&&1n a[f]=="I"){i[f]=(I(f){N I(){9 e=a[f].2v(a,O);b.1b(e[0]);N e}})(f)}}i.1a="1P";N i};r.3h=I(){J(1n O[0]=="2l"){9 a=19.49(O[0]);9 b=O[1];9 c=O[2]}J(1n O[0]=="2t"){9 a=O[0];9 b=O[1];9 c=O[2]}J(1n O[0]=="4a"){9 a=1,x=O[0],y=O[1],b=O[2],c=O[3]}J(!a){4b 1s 4c("2J 4d 4e 4f.");}C.1d=19.1Y(C.1T,"28");C.1d.U("11",b||4m);C.11=b||4m;C.1d.U("17",c||4n);C.17=c||4n;J(a==1){19.4i.1b(C.1d);C.1d.1j.2g="2h";C.1d.1j.1J=x+"1B";C.1d.1j.1A=y+"1B"}1m{J(a.1S){a.3c(C.1d,a.1S)}1m{a.1b(C.1d)}}a={1d:C.1d,3u:I(){3k(7.1d.1S){7.1d.2p(7.1d.1S)}7.3d=19.1Y(C.1T,"3d");7.4j=0;7.1d.1b(7.3d)}};1p(9 d 1t C){J(d!="60"){a[d]=C[d]}}a.3u();N a};C.1T="4o://4p.4q.4r/61/28";C.3x="4o://4p.4q.4r/62/3x"}J(q=="2N"||q=="2J"){C.2U=I(x,y,r){N A(7,x,y,r)};C.2e=I(x,y,w,h,r){N B(7,x,y,w,h,r)};C.2V=I(x,y,a,b){N D(7,x,y,a,b)};C.K=I(a,b){N t(a,b,7)};C.2E=I(a,x,y,w,h){N E(7,a,x,y,w,h)};C.1N=I(x,y,a){N F(7,x,y,a)};C.1P=I(){N G(7)};C.63=I(x,y,w,h,r){J(r&&1I(r,10)){N 7.K({1f:"#1F"}).1V(x+r,y).1l(x+w-r,y).2B(r,"64").1l(x+w,y+h-r).2B(r,"65").1l(x+r,y+h).2B(r,"66").1l(x,y+r).2B(r,"67").2k()}N 7.K({1f:"#1F"}).1V(x,y).1l(x+w,y).1l(x+w,y+h).1l(x,y+h).2k()};C.68=I(x,y,w,h,a,b,c){c=c||"#1F";9 p=7.K({1f:c,"1f-11":1}).1V(x,y).1l(x+w,y).1l(x+w,y+h).1l(x,y+h).1l(x,y);1p(9 i=1;i<b;i++){p.1V(x,y+i*T.15(h/b)).1l(x+w,y+i*T.15(h/b))}1p(9 i=1;i<a;i++){p.1V(x+i*T.15(w/a),y).1l(x+i*T.15(w/a),y+h)}N p};C.69=I(a,b,c,d,w,h){9 e=(c-a)/w;9 f=(d-b)/h;7.1g=I(x){N a+x*e};7.1i=I(y){N b+y*f};7.1x=I(w){N w*e};7.1z=I(h){N h*f}};C.6a=I(){7.1g=7.1i=7.1x=7.1z=I(x){N x}};C.3y=I(){J(r.1a=="2J"){9 a=C.2e(-C.11,-C.17,C.11*3,C.17*3).2G({1f:"1R"});4s(I(){a.3t()},0)}};z.1o.6c=I(x,y,d,e){6d(7.4t);J("1G"1t 7.P||"x"1t 7.P){9 f=("1G"1t 7.P),X=7.P.1G||7.P.x,Y=7.P.1K||7.P.y;J(x==X&&y==Y){N 7}9 g=y-Y,31=x-X,3g=g/31,4u=Y-3g*X,4v=T.3W(7.3g);7.3z=7.6e*T.6f(4v);J(x<X){7.3z=-7.3z}9 h=1s 4w(),32=7;(I(){9 a=(1s 4w()).4x()-h.4x();J(a<d){9 b=X+a*31/d;9 c=b*3g+4u;32.2G(f?{1G:b,1K:c}:{x:b,y:c});32.4t=4s(O.3A,1);C.3y()}1m{32.2G(f?{1G:x,1K:y}:{x:x,y:y});C.3y();e&&e.2z(32)}})()}N 7};N r}1m{N I(){}}})((!(3B.4y&&3B.4y.6g==2))?"2N":"2J");1L.26=!(1L.28=(1L.1a=="2J"));J(1L.26&&3B.6h){1L.1a="6i 6j";1L.26=1L.28=33}1L.2w=I(){N"6k 6l 6m "+7.1a};1L.4z=I(a,c,d){J(1n a=="2t"&&"h"1t a&&"s"1t a&&"b"1t a){d=a.b;c=a.s;a=a.h}9 e,20,21;J(d==0){N{r:0,g:0,b:0,3C:"#1F"}}1m{9 i=T.6n(a*6),f=(a*6)-i,p=d*(1-c),q=d*(1-(c*f)),t=d*(1-(c*(1-f)));[I(){e=d;20=t;21=p},I(){e=q;20=d;21=p},I(){e=p;20=d;21=t},I(){e=p;20=q;21=d},I(){e=t;20=p;21=d},I(){e=d;20=p;21=q},I(){e=d;20=t;21=p},][i]()}9 h={r:e,g:20,b:21};e*=2M;20*=2M;21*=2M;9 r=T.15(e).2w(16);J(r.1e==1){r="0"+r}9 g=T.15(20).2w(16);J(g.1e==1){g="0"+g}9 b=T.15(21).2w(16);J(b.1e==1){b="0"+b}h.3C="#"+r+g+b;N h};1L.6o=I(a,b,c){J(1n a=="2t"&&"r"1t a&&"g"1t a&&"b"1t a){c=a.b;b=a.g;a=a.r}J(a.34(0)=="#"){J(a.1e==4){c=1I(a.2q(3),16);b=1I(a.2q(2,3),16);a=1I(a.2q(1,2),16)}1m{c=1I(a.2q(5),16);b=1I(a.2q(3,5),16);a=1I(a.2q(1,3),16)}}J(a>1||b>1||c>1){a/=2M;b/=2M;c/=2M}9 d=T.6p(a,b,c),2Y=T.2Y(a,b,c),2a,3D,4A=d;J(2Y==d){N{h:0,s:0,b:d}}1m{9 e=(d-2Y);3D=e/d;J(a==d){2a=(b-c)/e}1m J(b==d){2a=2+((c-a)/e)}1m{2a=4+((a-b)/e)}2a/=6;J(2a<0){2a+=1}J(2a>1){2a-=1}}N{h:2a,s:3D,b:4A}};1L.4B=I(a){9 b=O.3A.3E=O.3A.3E||{h:0,s:1,b:a||.6q};9 c=7.4z(b.h,b.s,b.b);b.h+=.6r;J(b.h>1){b.h=0;b.s-=.2;J(b.s<=0){b={h:0,s:1,b:b.b}}}N c.3C};1L.4B.6s=I(){7.3E=1W};'
,
62
,
401
,
'|||||||this||var|||||||||||||||||||||||||||||||||||function|if|path|||return|arguments|attrs|isAbsolute|||Math|setAttribute|||||||width||last|parseFloat|round||height|case|document|type|appendChild|break|canvas|length|stroke|_getX|100|_getY|style|ii|lineTo|else|typeof|prototype|for|rvml|curveTo|new|in|dots|createElement|Group|_getW|fill|_getH|top|px|opacity|absolutely|relatively|000|cx|gradient|parseInt|left|cy|Raphael|push|text|parentNode|group|arg|none|firstChild|svgns|transformations|moveTo|undefined|vector|createElementNS|value|green|blue|pos|join|rollback|color|vml|cs|svg||hue|true|replace|font|rect|Matrix|position|absolute|shape|Path|andClose|string|on|rx|ry|removeChild|substring|bx|by|object|getAttribute|apply|toString|gl|ol|call|arcTo|addRoundedCorner|setBox|os|image|Rotation|attr|gs|els|SVG|ScaleX|ScaleY|255|VML|coordsize|coordorigin|slice|y1|getElementsByTagName|dasharray|circle|ellipse|getBBox|id|min|rs|bs|dx|that|false|charAt|ig|switch|weight|offset|display|diry|childNodes|insertBefore|defs|deg|transform|coeff|_create|end|split|while|dashesn|toLowerCase|textpath|default|rotate|translate|matrix|tMatrix|remove|clear|stop|createTextNode|xlink|safari|xs|callee|window|hex|saturation|start|class|redraw|To|move|line|arc|cplineTo|cpline|curve|5522|mzlhvcsqta|family|size|miter|miterlimit|square|str|atan|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|progid|DXImageTransform|Microsoft|M11|M12|M21|M22|Dx|Dy|sizingmethod|auto|expand|filtertype|bilinear|className|sqrt|wa|wr|at|ar|fontFamily|fontSize|fontWeight|joinstyle|linejoin|endcap|butt|flat|linecap|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
,{}))
\ No newline at end of file
\ No newline at end of file
raphael.js
View file @
099c4102
/*
/*
* Raphael 0.5.
5
b - JavaScript Vector Library
* Raphael 0.5.
6
b - JavaScript Vector Library
*
*
* Copyright (c) 2008 Dmitry Baranovskiy (raphaeljs.com)
* Copyright (c) 2008 Dmitry Baranovskiy (raphaeljs.com)
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
...
@@ -8,7 +8,7 @@ var Raphael = (function (type) {
...
@@ -8,7 +8,7 @@ var Raphael = (function (type) {
var
r
=
function
()
{
var
r
=
function
()
{
return
r
.
_create
.
apply
(
r
,
arguments
);
return
r
.
_create
.
apply
(
r
,
arguments
);
};
};
r
.
version
=
"0.5.
5
b"
;
r
.
version
=
"0.5.
6
b"
;
r
.
type
=
type
;
r
.
type
=
type
;
var
C
=
{};
var
C
=
{};
function
Matrix
(
m11
,
m12
,
m21
,
m22
,
dx
,
dy
)
{
function
Matrix
(
m11
,
m12
,
m21
,
m22
,
dx
,
dy
)
{
...
@@ -103,6 +103,8 @@ var Raphael = (function (type) {
...
@@ -103,6 +103,8 @@ var Raphael = (function (type) {
p
.
arcTo
=
function
(
rx
,
ry
,
large_arc_flag
,
sweep_flag
,
x2
,
y2
)
{
p
.
arcTo
=
function
(
rx
,
ry
,
large_arc_flag
,
sweep_flag
,
x2
,
y2
)
{
// for more information of where this math came from visit:
// for more information of where this math came from visit:
// http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
// http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes
x2
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
x
)
+
x2
;
y2
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
y
)
+
y2
;
var
x1
=
this
.
last
.
x
,
var
x1
=
this
.
last
.
x
,
y1
=
this
.
last
.
y
,
y1
=
this
.
last
.
y
,
x
=
(
x1
-
x2
)
/
2
,
x
=
(
x1
-
x2
)
/
2
,
...
@@ -260,6 +262,12 @@ var Raphael = (function (type) {
...
@@ -260,6 +262,12 @@ var Raphael = (function (type) {
case
"v"
:
case
"v"
:
p
.
relatively
().
lineTo
(
0
,
path
[
++
i
]);
p
.
relatively
().
lineTo
(
0
,
path
[
++
i
]);
break
;
break
;
case
"A"
:
p
.
absolutely
().
arcTo
(
path
[
++
i
],
path
[
++
i
],
path
[
++
i
],
path
[
++
i
],
path
[
++
i
],
path
[
++
i
]);
break
;
case
"a"
:
p
.
relatively
().
arcTo
(
path
[
++
i
],
path
[
++
i
],
path
[
++
i
],
path
[
++
i
],
path
[
++
i
],
path
[
++
i
]);
break
;
case
"Z"
:
case
"Z"
:
case
"z"
:
case
"z"
:
p
.
andClose
();
p
.
andClose
();
...
@@ -271,14 +279,15 @@ var Raphael = (function (type) {
...
@@ -271,14 +279,15 @@ var Raphael = (function (type) {
return
p
;
return
p
;
};
};
var
setFillAndStroke
=
function
(
o
,
params
)
{
var
setFillAndStroke
=
function
(
o
,
params
)
{
o
[
0
].
attrs
=
o
[
0
].
attrs
||
{};
var
s
=
o
[
0
].
style
;
o
.
attrs
=
o
.
attrs
||
{};
for
(
var
par
in
params
)
{
for
(
var
par
in
params
)
{
o
[
0
]
.
attrs
[
par
]
=
params
[
par
];
o
.
attrs
[
par
]
=
params
[
par
];
}
}
params
[
"font-family"
]
&&
(
o
[
0
].
style
.
fontFamily
=
params
[
"font-family"
]);
params
[
"font-family"
]
&&
(
s
.
fontFamily
=
params
[
"font-family"
]);
params
[
"font-size"
]
&&
(
o
[
0
].
style
.
fontSize
=
params
[
"font-size"
]);
params
[
"font-size"
]
&&
(
s
.
fontSize
=
params
[
"font-size"
]);
params
[
"font"
]
&&
(
o
[
0
].
style
.
font
=
params
[
"font"
]);
params
[
"font"
]
&&
(
s
.
font
=
params
[
"font"
]);
params
[
"font-weight"
]
&&
(
o
[
0
].
style
.
fontWeight
=
params
[
"font-weight"
]);
params
[
"font-weight"
]
&&
(
s
.
fontWeight
=
params
[
"font-weight"
]);
if
(
typeof
params
.
opacity
!=
"undefined"
||
typeof
params
[
"stroke-width"
]
!=
"undefined"
||
typeof
params
.
fill
!=
"undefined"
||
typeof
params
.
stroke
!=
"undefined"
)
{
if
(
typeof
params
.
opacity
!=
"undefined"
||
typeof
params
[
"stroke-width"
]
!=
"undefined"
||
typeof
params
.
fill
!=
"undefined"
||
typeof
params
.
stroke
!=
"undefined"
)
{
o
=
o
.
shape
||
o
[
0
];
o
=
o
.
shape
||
o
[
0
];
var
fill
=
(
o
.
getElementsByTagName
(
"fill"
)
&&
o
.
getElementsByTagName
(
"fill"
)[
0
])
||
document
.
createElement
(
"rvml:fill"
);
var
fill
=
(
o
.
getElementsByTagName
(
"fill"
)
&&
o
.
getElementsByTagName
(
"fill"
)[
0
])
||
document
.
createElement
(
"rvml:fill"
);
...
@@ -289,9 +298,6 @@ var Raphael = (function (type) {
...
@@ -289,9 +298,6 @@ var Raphael = (function (type) {
if
(
fill
.
on
&&
params
.
fill
)
{
if
(
fill
.
on
&&
params
.
fill
)
{
fill
.
color
=
params
.
fill
;
fill
.
color
=
params
.
fill
;
}
}
if
(
params
.
fill
==
"none"
)
{
fill
.
on
=
false
;
}
o
.
appendChild
(
fill
);
o
.
appendChild
(
fill
);
var
stroke
=
(
o
.
getElementsByTagName
(
"stroke"
)
&&
o
.
getElementsByTagName
(
"stroke"
)[
0
])
||
document
.
createElement
(
"rvml:stroke"
);
var
stroke
=
(
o
.
getElementsByTagName
(
"stroke"
)
&&
o
.
getElementsByTagName
(
"stroke"
)[
0
])
||
document
.
createElement
(
"rvml:stroke"
);
if
((
params
.
stroke
&&
params
.
stroke
!=
"none"
)
||
params
[
"stroke-width"
]
||
params
[
"stroke-opacity"
]
||
params
[
"stroke-dasharray"
])
{
if
((
params
.
stroke
&&
params
.
stroke
!=
"none"
)
||
params
[
"stroke-width"
]
||
params
[
"stroke-opacity"
]
||
params
[
"stroke-dasharray"
])
{
...
@@ -326,8 +332,8 @@ var Raphael = (function (type) {
...
@@ -326,8 +332,8 @@ var Raphael = (function (type) {
}
}
};
};
var
addGrdientFill
=
function
(
o
,
gradient
)
{
var
addGrdientFill
=
function
(
o
,
gradient
)
{
o
[
0
].
attrs
=
o
[
0
]
.
attrs
||
{};
o
.
attrs
=
o
.
attrs
||
{};
o
[
0
]
.
attrs
.
gradient
=
gradient
;
o
.
attrs
.
gradient
=
gradient
;
o
=
o
.
shape
||
o
[
0
];
o
=
o
.
shape
||
o
[
0
];
var
fill
=
o
.
getElementsByTagName
(
"fill"
);
var
fill
=
o
.
getElementsByTagName
(
"fill"
);
if
(
fill
.
length
)
{
if
(
fill
.
length
)
{
...
@@ -379,175 +385,176 @@ var Raphael = (function (type) {
...
@@ -379,175 +385,176 @@ var Raphael = (function (type) {
this
[
0
]
=
node
;
this
[
0
]
=
node
;
this
.
X
=
0
;
this
.
X
=
0
;
this
.
Y
=
0
;
this
.
Y
=
0
;
arguments
.
callee
.
name
=
"Element"
;
this
.
attrs
=
{};
this
[
0
].
attrs
=
{};
this
.
Group
=
group
;
this
.
Group
=
group
;
this
.
setBox
=
function
(
params
)
{
this
.
vml
=
vml
;
var
gs
=
this
.
Group
.
style
,
};
os
=
this
[
0
].
style
;
Element
.
prototype
.
setBox
=
function
(
params
)
{
for
(
var
i
in
params
)
{
var
gs
=
this
.
Group
.
style
,
this
[
0
].
attrs
[
i
]
=
params
[
i
];
os
=
this
[
0
].
style
;
}
for
(
var
i
in
params
)
{
var
attr
=
this
[
0
].
attrs
,
x
,
y
,
w
,
h
;
this
.
attrs
[
i
]
=
params
[
i
];
switch
(
this
.
type
)
{
}
case
"circle"
:
var
attr
=
this
.
attrs
,
x
,
y
,
w
,
h
;
x
=
attr
.
cx
-
attr
.
r
;
switch
(
this
.
type
)
{
y
=
attr
.
cy
-
attr
.
r
;
case
"circle"
:
w
=
h
=
attr
.
r
*
2
;
x
=
attr
.
cx
-
attr
.
r
;
break
;
y
=
attr
.
cy
-
attr
.
r
;
case
"ellipse"
:
w
=
h
=
attr
.
r
*
2
;
x
=
attr
.
cx
-
attr
.
rx
;
break
;
y
=
attr
.
cy
-
attr
.
ry
;
case
"ellipse"
:
w
=
attr
.
rx
*
2
;
x
=
attr
.
cx
-
attr
.
rx
;
h
=
attr
.
ry
*
2
;
y
=
attr
.
cy
-
attr
.
ry
;
break
;
w
=
attr
.
rx
*
2
;
case
"rect"
:
h
=
attr
.
ry
*
2
;
case
"image"
:
break
;
x
=
attr
.
x
;
case
"rect"
:
y
=
attr
.
y
;
case
"image"
:
w
=
attr
.
w
;
x
=
attr
.
x
;
h
=
attr
.
h
;
y
=
attr
.
y
;
break
;
w
=
attr
.
w
;
case
"text"
:
h
=
attr
.
h
;
this
.
textpath
.
v
=
[
"m"
,
Math
.
round
(
attr
.
x
),
", "
,
Math
.
round
(
attr
.
y
-
2
),
"l"
,
Math
.
round
(
attr
.
x
)
+
1
,
", "
,
Math
.
round
(
attr
.
y
-
2
)].
join
(
""
);
break
;
return
;
case
"text"
:
default
:
this
.
textpath
.
v
=
[
"m"
,
Math
.
round
(
attr
.
x
),
", "
,
Math
.
round
(
attr
.
y
-
2
),
"l"
,
Math
.
round
(
attr
.
x
)
+
1
,
", "
,
Math
.
round
(
attr
.
y
-
2
)].
join
(
""
);
return
;
return
;
default
:
return
;
}
var
left
=
this
.
vml
.
width
/
2
-
w
/
2
,
top
=
this
.
vml
.
height
/
2
-
h
/
2
;
gs
.
position
=
"absolute"
;
gs
.
left
=
x
-
left
+
"px"
;
gs
.
top
=
y
-
top
+
"px"
;
this
.
X
=
x
-
left
;
this
.
Y
=
y
-
top
;
this
.
W
=
w
;
this
.
H
=
h
;
gs
.
width
=
this
.
vml
.
width
+
"px"
;
gs
.
height
=
this
.
vml
.
height
+
"px"
;
os
.
position
=
"absolute"
;
os
.
top
=
top
+
"px"
;
os
.
left
=
left
+
"px"
;
os
.
width
=
w
+
"px"
;
os
.
height
=
h
+
"px"
;
};
Element
.
prototype
.
hide
=
function
()
{
this
.
Group
.
style
.
display
=
"none"
;
return
this
;
};
Element
.
prototype
.
show
=
function
()
{
this
.
Group
.
style
.
display
=
"block"
;
return
this
;
};
Element
.
prototype
.
rotate
=
function
(
deg
)
{
Rotation
+=
deg
;
this
.
Group
.
style
.
rotation
=
Rotation
;
return
this
;
};
Element
.
prototype
.
translate
=
function
(
x
,
y
)
{
this
.
X
+=
x
;
this
.
Y
+=
y
;
this
.
Group
.
style
.
left
=
this
.
X
+
"px"
;
this
.
Group
.
style
.
top
=
this
.
Y
+
"px"
;
return
this
;
};
// depricated
Element
.
prototype
.
matrix
=
function
(
xx
,
xy
,
yx
,
yy
,
dx
,
dy
)
{
tMatrix
=
new
Matrix
(
xx
,
xy
,
yx
,
yy
,
dx
,
dy
);
this
.
Group
.
style
.
filter
=
tMatrix
;
return
this
;
};
Element
.
prototype
.
scale
=
function
(
x
,
y
)
{
y
=
y
||
x
;
if
(
x
!=
0
&&
!
(
x
==
1
&&
y
==
1
))
{
var
dirx
=
Math
.
round
(
x
/
Math
.
abs
(
x
)),
diry
=
Math
.
round
(
y
/
Math
.
abs
(
y
)),
s
=
this
[
0
].
style
;
if
(
dirx
!=
1
||
diry
!=
1
)
{
s
.
filter
=
new
Matrix
(
dirx
,
0
,
0
,
diry
,
0
,
0
);
}
}
var
left
=
vml
.
width
/
2
-
w
/
2
,
var
width
=
parseInt
(
s
.
width
,
10
)
*
x
*
dirx
;
top
=
vml
.
height
/
2
-
h
/
2
;
var
height
=
parseInt
(
s
.
height
,
10
)
*
y
*
diry
;
gs
.
position
=
"absolute"
;
var
left
=
parseInt
(
s
.
left
,
10
);
gs
.
left
=
x
-
left
+
"px"
;
var
top
=
parseInt
(
s
.
top
,
10
);
gs
.
top
=
y
-
top
+
"px"
;
s
.
left
=
this
.
X
=
left
+
this
.
W
/
2
-
width
/
2
;
this
.
X
=
x
-
left
;
s
.
top
=
this
.
Y
=
top
+
this
.
H
/
2
-
height
/
2
;
this
.
Y
=
y
-
top
;
s
.
width
=
this
.
W
=
width
;
this
.
W
=
w
;
s
.
height
=
this
.
H
=
height
;
this
.
H
=
h
;
}
gs
.
width
=
vml
.
width
+
"px"
;
return
this
;
gs
.
height
=
vml
.
height
+
"px"
;
};
os
.
position
=
"absolute"
;
Element
.
prototype
.
getBBox
=
function
()
{
os
.
top
=
top
+
"px"
;
return
{
os
.
left
=
left
+
"px"
;
x
:
this
.
Group
.
offsetLeft
,
os
.
width
=
w
+
"px"
;
y
:
this
.
Group
.
offsetTop
,
os
.
height
=
h
+
"px"
;
width
:
this
.
Group
.
offsetWidth
,
};
height
:
this
.
Group
.
offsetHeight
this
.
hide
=
function
()
{
this
.
Group
.
style
.
display
=
"none"
;
return
this
;
};
this
.
show
=
function
()
{
this
.
Group
.
style
.
display
=
"block"
;
return
this
;
};
this
.
rotate
=
function
(
deg
)
{
Rotation
+=
deg
;
this
.
Group
.
style
.
rotation
=
Rotation
;
return
this
;
};
this
.
translate
=
function
(
x
,
y
)
{
this
.
X
+=
x
;
this
.
Y
+=
y
;
this
.
Group
.
style
.
left
=
this
.
X
+
"px"
;
this
.
Group
.
style
.
top
=
this
.
Y
+
"px"
;
return
this
;
};
// depricated
this
.
matrix
=
function
(
xx
,
xy
,
yx
,
yy
,
dx
,
dy
)
{
tMatrix
=
new
Matrix
(
xx
,
xy
,
yx
,
yy
,
dx
,
dy
);
this
.
Group
.
style
.
filter
=
tMatrix
;
return
this
;
};
};
this
.
scale
=
function
(
x
,
y
)
{
};
y
=
y
||
x
;
Element
.
prototype
.
remove
=
function
()
{
if
(
x
!=
0
&&
!
(
x
==
1
&&
y
==
1
))
{
this
[
0
].
parentNode
.
removeChild
(
this
[
0
]);
var
dirx
=
Math
.
round
(
x
/
Math
.
abs
(
x
)),
this
.
Group
.
parentNode
.
removeChild
(
this
.
Group
);
diry
=
Math
.
round
(
y
/
Math
.
abs
(
y
));
this
.
shape
&&
this
.
shape
.
parentNode
.
removeChild
(
this
.
shape
);
if
(
dirx
!=
1
||
diry
!=
1
)
{
};
this
[
0
].
style
.
filter
=
new
Matrix
(
dirx
,
0
,
0
,
diry
,
0
,
0
);
Element
.
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
values
=
{};
for
(
var
i
=
0
,
ii
=
arguments
[
0
].
length
;
i
<
ii
;
i
++
)
{
values
[
arguments
[
0
][
i
]]
=
this
.
attrs
[
arguments
[
0
][
i
]];
};
return
values
;
}
if
(
this
[
0
].
tagName
.
toLowerCase
()
==
"group"
)
{
var
children
=
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
];
}
}
var
width
=
parseInt
(
this
[
0
].
style
.
width
,
10
)
*
x
*
dirx
;
var
height
=
parseInt
(
this
[
0
].
style
.
height
,
10
)
*
y
*
diry
;
var
left
=
parseInt
(
this
[
0
].
style
.
left
,
10
);
var
top
=
parseInt
(
this
[
0
].
style
.
top
,
10
);
this
[
0
].
style
.
left
=
this
.
X
=
left
+
this
.
W
/
2
-
width
/
2
;
this
[
0
].
style
.
top
=
this
.
Y
=
top
+
this
.
H
/
2
-
height
/
2
;
this
[
0
].
style
.
width
=
this
.
W
=
width
;
this
[
0
].
style
.
height
=
this
.
H
=
height
;
}
}
return
this
;
for
(
var
i
=
0
,
ii
=
children
.
length
;
i
<
ii
;
i
++
)
{
};
this
.
attr
.
apply
(
new
item
(
children
[
i
],
this
[
0
],
this
.
vml
),
arguments
);
this
.
getBBox
=
function
()
{
return
{
x
:
this
.
Group
.
offsetLeft
,
y
:
this
.
Group
.
offsetTop
,
width
:
this
.
Group
.
offsetWidth
,
height
:
this
.
Group
.
offsetHeight
};
};
this
.
remove
=
function
()
{
this
[
0
].
parentNode
.
removeChild
(
this
[
0
]);
this
.
Group
.
parentNode
.
removeChild
(
this
.
Group
);
this
.
shape
&&
this
.
shape
.
parentNode
.
removeChild
(
this
.
shape
);
};
this
.
attr
=
function
()
{
if
(
arguments
.
length
==
1
&&
typeof
arguments
[
0
]
==
"string"
)
{
return
this
[
0
].
attrs
[
arguments
[
0
]];
}
}
if
(
this
[
0
].
attrs
&&
arguments
.
length
==
1
&&
arguments
[
0
]
instanceof
Array
)
{
}
else
{
var
values
=
{};
var
params
;
for
(
var
i
=
0
,
ii
=
arguments
[
0
].
length
;
i
<
ii
;
i
++
)
{
if
(
arguments
.
length
==
2
)
{
values
[
arguments
[
0
][
i
]]
=
this
[
0
].
attrs
[
arguments
[
0
][
i
]];
params
=
{};
};
params
[
arguments
[
0
]]
=
arguments
[
1
];
return
values
;
}
}
if
(
this
[
0
].
tagName
.
toLowerCase
()
==
"group"
)
{
if
(
arguments
.
length
==
1
&&
typeof
arguments
[
0
]
==
"object"
)
{
var
children
=
this
[
0
].
childNodes
;
params
=
arguments
[
0
];
this
[
0
].
attrs
=
this
[
0
].
attrs
||
{};
}
if
(
arguments
.
length
==
2
)
{
if
(
params
)
{
this
[
0
].
attrs
[
arguments
[
0
]]
=
arguments
[
1
];
setFillAndStroke
(
this
,
params
);
}
else
if
(
arguments
.
length
==
1
||
typeof
arguments
[
0
]
==
"object"
)
{
this
.
setBox
(
params
);
for
(
var
j
in
arguments
[
0
])
{
if
(
params
.
gradient
)
{
this
[
0
].
attrs
[
j
]
=
arguments
[
0
][
j
];
addGrdientFill
(
this
,
params
.
gradient
);
}
}
for
(
var
i
=
0
,
ii
=
children
.
length
;
i
<
ii
;
i
++
)
{
this
.
attr
.
apply
(
new
item
(
children
[
i
],
this
[
0
],
vml
),
arguments
);
}
}
else
{
var
params
;
if
(
arguments
.
length
==
2
)
{
params
=
{};
params
[
arguments
[
0
]]
=
arguments
[
1
];
}
}
if
(
arguments
.
length
==
1
&&
typeof
arguments
[
0
]
==
"objec
t"
)
{
if
(
params
.
text
&&
this
.
type
==
"tex
t"
)
{
params
=
arguments
[
0
]
;
this
[
0
].
string
=
params
.
text
;
}
}
if
(
params
)
{
if
(
params
.
id
)
{
setFillAndStroke
(
this
,
params
);
this
[
0
].
id
=
params
.
id
;
this
.
setBox
(
params
);
if
(
params
.
gradient
)
{
addGrdientFill
(
this
,
params
.
gradient
);
}
if
(
params
.
text
&&
this
.
type
==
"text"
)
{
this
[
0
].
string
=
params
.
text
;
}
if
(
params
.
id
)
{
this
[
0
].
id
=
params
.
id
;
}
}
}
}
}
return
this
;
}
}
;
return
this
;
this
.
toFront
=
function
()
{
};
this
.
Group
.
parentNode
.
appendChild
(
this
.
Group
);
Element
.
prototype
.
toFront
=
function
()
{
return
this
;
this
.
Group
.
parentNode
.
appendChild
(
this
.
Group
)
;
}
;
return
this
;
this
.
toBack
=
function
()
{
};
if
(
this
.
Group
.
parentNode
.
firstChild
!=
this
.
Group
)
{
Element
.
prototype
.
toBack
=
function
(
)
{
this
.
Group
.
parentNode
.
insertBefore
(
this
.
Group
,
this
.
Group
.
parentNode
.
firstChild
);
if
(
this
.
Group
.
parentNode
.
firstChild
!=
this
.
Group
)
{
}
this
.
Group
.
parentNode
.
insertBefore
(
this
.
Group
,
this
.
Group
.
parentNode
.
firstChild
);
return
this
;
}
}
;
return
this
;
};
};
var
theCircle
=
function
(
vml
,
x
,
y
,
r
)
{
var
theCircle
=
function
(
vml
,
x
,
y
,
r
)
{
var
g
=
document
.
createElement
(
"rvml:group"
);
var
g
=
document
.
createElement
(
"rvml:group"
);
...
@@ -557,9 +564,9 @@ var Raphael = (function (type) {
...
@@ -557,9 +564,9 @@ var Raphael = (function (type) {
var
res
=
new
Element
(
o
,
g
,
vml
);
var
res
=
new
Element
(
o
,
g
,
vml
);
setFillAndStroke
(
res
,
{
stroke
:
"#000"
,
fill
:
"none"
});
setFillAndStroke
(
res
,
{
stroke
:
"#000"
,
fill
:
"none"
});
res
.
setBox
({
x
:
x
-
r
,
y
:
y
-
r
,
w
:
r
*
2
,
h
:
r
*
2
});
res
.
setBox
({
x
:
x
-
r
,
y
:
y
-
r
,
w
:
r
*
2
,
h
:
r
*
2
});
o
.
attrs
.
cx
=
x
;
res
.
attrs
.
cx
=
x
;
o
.
attrs
.
cy
=
y
;
res
.
attrs
.
cy
=
y
;
o
.
attrs
.
r
=
r
;
res
.
attrs
.
r
=
r
;
res
.
type
=
"circle"
;
res
.
type
=
"circle"
;
return
res
;
return
res
;
};
};
...
@@ -574,11 +581,11 @@ var Raphael = (function (type) {
...
@@ -574,11 +581,11 @@ var Raphael = (function (type) {
var
res
=
new
Element
(
o
,
g
,
vml
);
var
res
=
new
Element
(
o
,
g
,
vml
);
setFillAndStroke
(
res
,
{
stroke
:
"#000"
});
setFillAndStroke
(
res
,
{
stroke
:
"#000"
});
res
.
setBox
({
x
:
x
,
y
:
y
,
w
:
w
,
h
:
h
});
res
.
setBox
({
x
:
x
,
y
:
y
,
w
:
w
,
h
:
h
});
o
.
attrs
.
x
=
x
;
res
.
attrs
.
x
=
x
;
o
.
attrs
.
y
=
y
;
res
.
attrs
.
y
=
y
;
o
.
attrs
.
w
=
w
;
res
.
attrs
.
w
=
w
;
o
.
attrs
.
h
=
h
;
res
.
attrs
.
h
=
h
;
o
.
attrs
.
r
=
r
;
res
.
attrs
.
r
=
r
;
res
.
type
=
"rect"
;
res
.
type
=
"rect"
;
return
res
;
return
res
;
};
};
...
@@ -590,10 +597,10 @@ var Raphael = (function (type) {
...
@@ -590,10 +597,10 @@ var Raphael = (function (type) {
var
res
=
new
Element
(
o
,
g
,
vml
);
var
res
=
new
Element
(
o
,
g
,
vml
);
setFillAndStroke
(
res
,
{
stroke
:
"#000"
});
setFillAndStroke
(
res
,
{
stroke
:
"#000"
});
res
.
setBox
({
x
:
x
-
rx
,
y
:
y
-
ry
,
w
:
rx
*
2
,
h
:
ry
*
2
});
res
.
setBox
({
x
:
x
-
rx
,
y
:
y
-
ry
,
w
:
rx
*
2
,
h
:
ry
*
2
});
o
.
attrs
.
cx
=
x
;
res
.
attrs
.
cx
=
x
;
o
.
attrs
.
cy
=
y
;
res
.
attrs
.
cy
=
y
;
o
.
attrs
.
rx
=
rx
;
res
.
attrs
.
rx
=
rx
;
o
.
attrs
.
ry
=
ry
;
res
.
attrs
.
ry
=
ry
;
res
.
type
=
"ellipse"
;
res
.
type
=
"ellipse"
;
return
res
;
return
res
;
};
};
...
@@ -606,10 +613,10 @@ var Raphael = (function (type) {
...
@@ -606,10 +613,10 @@ var Raphael = (function (type) {
var
res
=
new
Element
(
o
,
g
,
vml
);
var
res
=
new
Element
(
o
,
g
,
vml
);
res
.
type
=
"image"
;
res
.
type
=
"image"
;
res
.
setBox
({
x
:
x
,
y
:
y
,
w
:
w
,
h
:
h
});
res
.
setBox
({
x
:
x
,
y
:
y
,
w
:
w
,
h
:
h
});
o
.
attrs
.
x
=
x
;
res
.
attrs
.
x
=
x
;
o
.
attrs
.
y
=
y
;
res
.
attrs
.
y
=
y
;
o
.
attrs
.
w
=
w
;
res
.
attrs
.
w
=
w
;
o
.
attrs
.
h
=
h
;
res
.
attrs
.
h
=
h
;
return
res
;
return
res
;
};
};
var
theText
=
function
(
vml
,
x
,
y
,
text
)
{
var
theText
=
function
(
vml
,
x
,
y
,
text
)
{
...
@@ -639,10 +646,10 @@ var Raphael = (function (type) {
...
@@ -639,10 +646,10 @@ var Raphael = (function (type) {
res
.
shape
=
el
;
res
.
shape
=
el
;
res
.
textpath
=
path
;
res
.
textpath
=
path
;
res
.
type
=
"text"
;
res
.
type
=
"text"
;
o
.
attrs
.
x
=
x
;
res
.
attrs
.
x
=
x
;
o
.
attrs
.
y
=
y
;
res
.
attrs
.
y
=
y
;
o
.
attrs
.
w
=
1
;
res
.
attrs
.
w
=
1
;
o
.
attrs
.
h
=
1
;
res
.
attrs
.
h
=
1
;
return
res
;
return
res
;
};
};
var
theGroup
=
function
(
vml
)
{
var
theGroup
=
function
(
vml
)
{
...
@@ -1003,6 +1010,12 @@ var Raphael = (function (type) {
...
@@ -1003,6 +1010,12 @@ var Raphael = (function (type) {
case
"v"
:
case
"v"
:
p
.
relatively
().
lineTo
(
0
,
path
[
++
i
]);
p
.
relatively
().
lineTo
(
0
,
path
[
++
i
]);
break
;
break
;
case
"A"
:
p
.
absolutely
().
arcTo
(
path
[
++
i
],
path
[
++
i
],
path
[
++
i
],
path
[
++
i
],
path
[
++
i
],
path
[
++
i
]);
break
;
case
"a"
:
p
.
relatively
().
arcTo
(
path
[
++
i
],
path
[
++
i
],
path
[
++
i
],
path
[
++
i
],
path
[
++
i
],
path
[
++
i
]);
break
;
case
"z"
:
case
"z"
:
p
.
andClose
();
p
.
andClose
();
break
;
break
;
...
@@ -1043,169 +1056,154 @@ var Raphael = (function (type) {
...
@@ -1043,169 +1056,154 @@ var Raphael = (function (type) {
this
[
0
]
=
node
;
this
[
0
]
=
node
;
this
.
attrs
=
this
.
attrs
||
{};
this
.
attrs
=
this
.
attrs
||
{};
this
.
transformations
=
[];
// rotate, translate, scale, matrix
this
.
transformations
=
[];
// rotate, translate, scale, matrix
this
.
hide
=
function
()
{
};
this
[
0
].
style
.
display
=
"none"
;
Element
.
prototype
.
hide
=
function
()
{
return
this
;
this
[
0
].
style
.
display
=
"none"
;
};
return
this
;
this
.
show
=
function
()
{
};
this
[
0
].
style
.
display
=
"block"
;
Element
.
prototype
.
show
=
function
()
{
return
this
;
this
[
0
].
style
.
display
=
"block"
;
};
return
this
;
this
.
rotate
=
function
(
deg
)
{
};
var
bbox
=
this
.
getBBox
();
Element
.
prototype
.
rotate
=
function
(
deg
)
{
Rotation
.
deg
+=
deg
;
var
bbox
=
this
.
getBBox
();
if
(
Rotation
.
deg
)
{
Rotation
.
deg
+=
deg
;
this
.
transformations
[
0
]
=
(
"rotate("
+
Rotation
.
deg
+
" "
+
(
bbox
.
x
+
bbox
.
width
/
2
)
+
" "
+
(
bbox
.
y
+
bbox
.
height
/
2
)
+
")"
);
if
(
Rotation
.
deg
)
{
}
else
{
this
.
transformations
[
0
]
=
(
"rotate("
+
Rotation
.
deg
+
" "
+
(
bbox
.
x
+
bbox
.
width
/
2
)
+
" "
+
(
bbox
.
y
+
bbox
.
height
/
2
)
+
")"
);
this
.
transformations
[
0
]
=
""
;
}
else
{
}
this
.
transformations
[
0
]
=
""
;
this
[
0
].
setAttribute
(
"transform"
,
this
.
transformations
.
join
(
" "
));
}
return
this
;
this
[
0
].
setAttribute
(
"transform"
,
this
.
transformations
.
join
(
" "
));
};
return
this
;
this
.
translate
=
function
(
x
,
y
)
{
};
X
+=
x
;
Element
.
prototype
.
translate
=
function
(
x
,
y
)
{
Y
+=
y
;
X
+=
x
;
if
(
X
&&
Y
)
{
Y
+=
y
;
this
.
transformations
[
1
]
=
"translate("
+
X
+
","
+
Y
+
")"
;
if
(
X
&&
Y
)
{
this
.
transformations
[
1
]
=
"translate("
+
X
+
","
+
Y
+
")"
;
}
else
{
this
.
transformations
[
1
]
=
""
;
}
this
[
0
].
setAttribute
(
"transform"
,
this
.
transformations
.
join
(
" "
));
return
this
;
};
Element
.
prototype
.
scale
=
function
(
x
,
y
)
{
y
=
y
||
x
;
if
(
x
!=
0
&&
!
(
x
==
1
&&
y
==
1
))
{
ScaleX
*=
x
;
ScaleY
*=
y
;
if
(
!
(
ScaleX
==
1
&&
ScaleY
==
1
))
{
var
bbox
=
this
.
getBBox
(),
dx
=
bbox
.
x
*
(
1
-
ScaleX
)
+
(
bbox
.
width
/
2
-
bbox
.
width
*
ScaleX
/
2
),
dy
=
bbox
.
y
*
(
1
-
ScaleY
)
+
(
bbox
.
height
/
2
-
bbox
.
height
*
ScaleY
/
2
);
this
.
transformations
[
2
]
=
new
Matrix
(
ScaleX
,
0
,
0
,
ScaleY
,
dx
,
dy
);
}
else
{
}
else
{
this
.
transformations
[
1
]
=
""
;
this
.
transformations
[
2
]
=
""
;
}
}
this
[
0
].
setAttribute
(
"transform"
,
this
.
transformations
.
join
(
" "
));
this
[
0
].
setAttribute
(
"transform"
,
this
.
transformations
.
join
(
" "
));
return
this
;
}
};
return
this
;
this
.
scale
=
function
(
x
,
y
)
{
};
y
=
y
||
x
;
// depricated
if
(
x
!=
0
&&
!
(
x
==
1
&&
y
==
1
))
{
Element
.
prototype
.
matrix
=
function
(
xx
,
xy
,
yx
,
yy
,
dx
,
dy
)
{
ScaleX
*=
x
;
this
.
transformations
[
3
]
=
new
Matrix
(
xx
,
xy
,
yx
,
yy
,
dx
,
dy
);
ScaleY
*=
y
;
this
[
0
].
setAttribute
(
"transform"
,
this
.
transformations
.
join
(
" "
));
if
(
!
(
ScaleX
==
1
&&
ScaleY
==
1
))
{
return
this
;
var
bbox
=
this
.
getBBox
(),
};
dx
=
bbox
.
x
*
(
1
-
ScaleX
)
+
(
bbox
.
width
/
2
-
bbox
.
width
*
ScaleX
/
2
),
Element
.
prototype
.
remove
=
function
()
{
dy
=
bbox
.
y
*
(
1
-
ScaleY
)
+
(
bbox
.
height
/
2
-
bbox
.
height
*
ScaleY
/
2
);
this
[
0
].
parentNode
.
removeChild
(
this
[
0
]);
this
.
transformations
[
2
]
=
new
Matrix
(
ScaleX
,
0
,
0
,
ScaleY
,
dx
,
dy
);
};
}
else
{
Element
.
prototype
.
getBBox
=
function
()
{
this
.
transformations
[
2
]
=
""
;
return
this
[
0
].
getBBox
();
}
};
this
[
0
].
setAttribute
(
"transform"
,
this
.
transformations
.
join
(
" "
));
Element
.
prototype
.
attr
=
function
()
{
}
if
(
arguments
.
length
==
1
&&
typeof
arguments
[
0
]
==
"string"
)
{
return
this
;
return
this
[
0
].
getAttribute
(
arguments
[
0
]);
};
}
// depricated
if
(
arguments
.
length
==
1
&&
arguments
[
0
]
instanceof
Array
)
{
this
.
matrix
=
function
(
xx
,
xy
,
yx
,
yy
,
dx
,
dy
)
{
var
values
=
{};
this
.
transformations
[
3
]
=
new
Matrix
(
xx
,
xy
,
yx
,
yy
,
dx
,
dy
);
for
(
var
j
in
arguments
[
0
])
{
this
[
0
].
setAttribute
(
"transform"
,
this
.
transformations
.
join
(
" "
));
values
[
arguments
[
0
][
j
]]
=
this
.
attrs
[
arguments
[
0
][
j
]];
return
this
;
};
this
.
remove
=
function
()
{
this
[
0
].
parentNode
.
removeChild
(
this
[
0
]);
};
this
.
getBBox
=
function
()
{
return
this
[
0
].
getBBox
();
};
this
.
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
values
=
{};
for
(
var
j
in
arguments
[
0
])
{
values
[
arguments
[
0
][
j
]]
=
this
.
attrs
[
arguments
[
0
][
j
]];
}
return
values
;
}
}
if
(
arguments
.
length
==
2
)
{
return
values
;
var
att
=
arguments
[
0
],
}
value
=
arguments
[
1
];
if
(
arguments
.
length
==
2
)
{
this
[
att
]
=
value
;
var
att
=
arguments
[
0
],
this
.
attrs
[
att
]
=
value
;
value
=
arguments
[
1
];
switch
(
att
)
{
this
[
att
]
=
value
;
case
"rx"
:
this
.
attrs
[
att
]
=
value
;
case
"cx"
:
switch
(
att
)
{
case
"x"
:
case
"rx"
:
this
[
0
].
setAttribute
(
att
,
svg
.
_getX
(
value
));
case
"cx"
:
break
;
case
"x"
:
case
"ry"
:
this
[
0
].
setAttribute
(
att
,
svg
.
_getX
(
value
));
case
"cy"
:
break
;
case
"y"
:
case
"ry"
:
this
[
0
].
setAttribute
(
att
,
svg
.
_getY
(
value
));
case
"cy"
:
break
;
case
"y"
:
case
"width"
:
this
[
0
].
setAttribute
(
att
,
svg
.
_getY
(
value
));
this
[
0
].
setAttribute
(
att
,
svg
.
_getW
(
value
));
break
;
break
;
case
"width"
:
case
"height"
:
this
[
0
].
setAttribute
(
att
,
svg
.
_getW
(
value
));
this
[
0
].
setAttribute
(
att
,
svg
.
_getH
(
value
));
break
;
break
;
case
"height"
:
case
"gradient"
:
this
[
0
].
setAttribute
(
att
,
svg
.
_getH
(
value
));
addGrdientFill
(
this
[
0
],
params
.
gradient
,
svg
);
break
;
break
;
case
"gradient"
:
case
"stroke-dasharray"
:
addGrdientFill
(
this
[
0
],
params
.
gradient
,
svg
);
this
[
0
].
setAttribute
(
att
,
value
.
replace
(
" "
,
","
));
break
;
break
;
case
"stroke-dasharray"
:
case
"text"
:
this
[
0
].
setAttribute
(
att
,
value
.
replace
(
" "
,
","
));
if
(
this
.
type
==
"text"
)
{
break
;
this
[
0
].
removeChild
(
this
[
0
].
firstChild
);
case
"text"
:
this
[
0
].
appendChild
(
document
.
createTextNode
(
value
));
if
(
this
.
type
==
"text"
)
{
}
break
;
default
:
var
cssrule
=
att
.
replace
(
/
(\-
.
)
/g
,
function
(
w
)
{
return
w
.
substring
(
1
).
toUpperCase
();
});
this
[
0
].
style
[
cssrule
]
=
value
;
// Need following line for Firefox
this
[
0
].
setAttribute
(
att
,
value
);
break
;
}
}
else
if
(
arguments
.
length
==
1
&&
typeof
arguments
[
0
]
==
"object"
)
{
var
params
=
arguments
[
0
];
for
(
var
attr
in
params
)
{
this
.
attrs
[
attr
]
=
params
[
attr
];
if
(
attr
==
"stroke-dasharray"
)
{
this
[
0
].
setAttribute
(
attr
,
params
[
attr
].
replace
(
" "
,
","
));
}
else
if
(
attr
==
"text"
&&
this
.
type
==
"text"
)
{
this
[
0
].
removeChild
(
this
[
0
].
firstChild
);
this
[
0
].
removeChild
(
this
[
0
].
firstChild
);
this
[
0
].
appendChild
(
document
.
createTextNode
(
params
[
attr
]));
this
[
0
].
appendChild
(
document
.
createTextNode
(
value
));
}
else
{
var
cssrule
=
attr
.
replace
(
/
(\-
.
)
/g
,
function
(
w
)
{
return
w
.
substring
(
1
).
toUpperCase
();
});
this
[
0
].
style
[
cssrule
]
=
params
[
attr
];
// Need following line for Firefox
this
[
0
].
setAttribute
(
attr
,
params
[
attr
]);
}
}
}
break
;
if
(
params
.
gradient
)
{
default
:
this
[
0
].
attrs
.
gradient
=
params
.
gradient
;
var
cssrule
=
att
.
replace
(
/
(\-
.
)
/g
,
function
(
w
)
{
addGrdientFill
(
this
[
0
],
params
.
gradient
,
svg
);
return
w
.
substring
(
1
).
toUpperCase
();
});
this
[
0
].
style
[
cssrule
]
=
value
;
// Need following line for Firefox
this
[
0
].
setAttribute
(
att
,
value
);
break
;
}
}
else
if
(
arguments
.
length
==
1
&&
typeof
arguments
[
0
]
==
"object"
)
{
var
params
=
arguments
[
0
];
for
(
var
attr
in
params
)
{
this
.
attrs
[
attr
]
=
params
[
attr
];
if
(
attr
==
"stroke-dasharray"
)
{
this
[
0
].
setAttribute
(
attr
,
params
[
attr
].
replace
(
" "
,
","
));
}
else
if
(
attr
==
"text"
&&
this
.
type
==
"text"
)
{
this
[
0
].
removeChild
(
this
[
0
].
firstChild
);
this
[
0
].
appendChild
(
document
.
createTextNode
(
params
[
attr
]));
}
else
{
var
cssrule
=
attr
.
replace
(
/
(\-
.
)
/g
,
function
(
w
)
{
return
w
.
substring
(
1
).
toUpperCase
();
});
this
[
0
].
style
[
cssrule
]
=
params
[
attr
];
// Need following line for Firefox
this
[
0
].
setAttribute
(
attr
,
params
[
attr
]);
}
}
}
}
return
this
;
if
(
params
.
gradient
)
{
};
this
.
attrs
.
gradient
=
params
.
gradient
;
this
.
toFront
=
function
()
{
addGrdientFill
(
this
[
0
],
params
.
gradient
,
svg
);
this
[
0
].
parentNode
.
appendChild
(
this
[
0
]);
return
this
;
};
this
.
toBack
=
function
()
{
if
(
this
[
0
].
parentNode
.
firstChild
!=
this
[
0
])
{
this
[
0
].
parentNode
.
insertBefore
(
this
[
0
],
this
[
0
].
parentNode
.
firstChild
);
}
}
return
this
;
}
};
return
this
;
// this.animateTo = function (x, y, ms, callback) {
};
// if ("cx" in node.attrs || "x" in node.attrs) {
Element
.
prototype
.
toFront
=
function
()
{
// var X = node.attrs.cx || node.attrs.x;
this
[
0
].
parentNode
.
appendChild
(
this
[
0
]);
// var Y = node.attrs.cy || node.attrs.y;
return
this
;
// var dy = y - Y;
};
// var dx = x - X;
Element
.
prototype
.
toBack
=
function
()
{
// var coeff = dy / dx;
if
(
this
[
0
].
parentNode
.
firstChild
!=
this
[
0
])
{
// var plus = Y - coeff * X;
this
[
0
].
parentNode
.
insertBefore
(
this
[
0
],
this
[
0
].
parentNode
.
firstChild
);
// var alpha = Math.atan(this.coeff);
}
// this.xs = this.step * Math.cos(alpha);
return
this
;
// if (x < X) {
// this.xs = -this.xs;
// }
// }
// };
};
};
var
theCircle
=
function
(
svg
,
x
,
y
,
r
)
{
var
theCircle
=
function
(
svg
,
x
,
y
,
r
)
{
var
el
=
document
.
createElementNS
(
svg
.
svgns
,
"circle"
);
var
el
=
document
.
createElementNS
(
svg
.
svgns
,
"circle"
);
...
@@ -1214,15 +1212,15 @@ var Raphael = (function (type) {
...
@@ -1214,15 +1212,15 @@ var Raphael = (function (type) {
el
.
setAttribute
(
"r"
,
r
);
el
.
setAttribute
(
"r"
,
r
);
el
.
setAttribute
(
"fill"
,
"none"
);
el
.
setAttribute
(
"fill"
,
"none"
);
el
.
setAttribute
(
"stroke"
,
"#000"
);
el
.
setAttribute
(
"stroke"
,
"#000"
);
el
.
attrs
=
el
.
attrs
||
{};
el
.
attrs
.
cx
=
x
;
el
.
attrs
.
cy
=
y
;
el
.
attrs
.
r
=
r
;
el
.
attrs
.
stroke
=
"#000"
;
if
(
svg
.
canvas
)
{
if
(
svg
.
canvas
)
{
svg
.
canvas
.
appendChild
(
el
);
svg
.
canvas
.
appendChild
(
el
);
}
}
var
res
=
new
Element
(
el
,
svg
);
var
res
=
new
Element
(
el
,
svg
);
res
.
attrs
=
res
.
attrs
||
{};
res
.
attrs
.
cx
=
x
;
res
.
attrs
.
cy
=
y
;
res
.
attrs
.
r
=
r
;
res
.
attrs
.
stroke
=
"#000"
;
res
.
type
=
"circle"
;
res
.
type
=
"circle"
;
return
res
;
return
res
;
};
};
...
@@ -1232,23 +1230,25 @@ var Raphael = (function (type) {
...
@@ -1232,23 +1230,25 @@ var Raphael = (function (type) {
el
.
setAttribute
(
"y"
,
svg
.
_getY
(
y
));
el
.
setAttribute
(
"y"
,
svg
.
_getY
(
y
));
el
.
setAttribute
(
"width"
,
svg
.
_getW
(
w
));
el
.
setAttribute
(
"width"
,
svg
.
_getW
(
w
));
el
.
setAttribute
(
"height"
,
svg
.
_getH
(
h
));
el
.
setAttribute
(
"height"
,
svg
.
_getH
(
h
));
el
.
attrs
=
el
.
attrs
||
{};
el
.
attrs
.
x
=
x
;
el
.
attrs
.
y
=
y
;
el
.
attrs
.
width
=
w
;
el
.
attrs
.
height
=
h
;
if
(
r
)
{
if
(
r
)
{
el
.
setAttribute
(
"rx"
,
r
);
el
.
setAttribute
(
"rx"
,
r
);
el
.
setAttribute
(
"ry"
,
r
);
el
.
setAttribute
(
"ry"
,
r
);
el
.
attrs
.
rx
=
el
.
attrs
.
ry
=
r
;
}
}
el
.
setAttribute
(
"fill"
,
"none"
);
el
.
setAttribute
(
"fill"
,
"none"
);
el
.
setAttribute
(
"stroke"
,
"#000"
);
el
.
setAttribute
(
"stroke"
,
"#000"
);
el
.
attrs
.
stroke
=
"#000"
;
if
(
svg
.
canvas
)
{
if
(
svg
.
canvas
)
{
svg
.
canvas
.
appendChild
(
el
);
svg
.
canvas
.
appendChild
(
el
);
}
}
var
res
=
new
Element
(
el
,
svg
);
var
res
=
new
Element
(
el
,
svg
);
res
.
attrs
=
res
.
attrs
||
{};
res
.
attrs
.
x
=
x
;
res
.
attrs
.
y
=
y
;
res
.
attrs
.
width
=
w
;
res
.
attrs
.
height
=
h
;
res
.
attrs
.
stroke
=
"#000"
;
if
(
r
)
{
res
.
attrs
.
rx
=
res
.
attrs
.
ry
=
r
;
}
res
.
type
=
"rect"
;
res
.
type
=
"rect"
;
return
res
;
return
res
;
};
};
...
@@ -1260,16 +1260,16 @@ var Raphael = (function (type) {
...
@@ -1260,16 +1260,16 @@ var Raphael = (function (type) {
el
.
setAttribute
(
"ry"
,
svg
.
_getH
(
ry
));
el
.
setAttribute
(
"ry"
,
svg
.
_getH
(
ry
));
el
.
setAttribute
(
"fill"
,
"none"
);
el
.
setAttribute
(
"fill"
,
"none"
);
el
.
setAttribute
(
"stroke"
,
"#000"
);
el
.
setAttribute
(
"stroke"
,
"#000"
);
el
.
attrs
=
el
.
attrs
||
{};
el
.
attrs
.
cx
=
x
;
el
.
attrs
.
cy
=
y
;
el
.
attrs
.
rx
=
rx
;
el
.
attrs
.
ry
=
ry
;
el
.
attrs
.
stroke
=
"#000"
;
if
(
svg
.
canvas
)
{
if
(
svg
.
canvas
)
{
svg
.
canvas
.
appendChild
(
el
);
svg
.
canvas
.
appendChild
(
el
);
}
}
var
res
=
new
Element
(
el
,
svg
);
var
res
=
new
Element
(
el
,
svg
);
res
.
attrs
=
res
.
attrs
||
{};
res
.
attrs
.
cx
=
x
;
res
.
attrs
.
cy
=
y
;
res
.
attrs
.
rx
=
rx
;
res
.
attrs
.
ry
=
ry
;
res
.
attrs
.
stroke
=
"#000"
;
res
.
type
=
"ellipse"
;
res
.
type
=
"ellipse"
;
return
res
;
return
res
;
};
};
...
@@ -1284,6 +1284,11 @@ var Raphael = (function (type) {
...
@@ -1284,6 +1284,11 @@ var Raphael = (function (type) {
svg
.
canvas
.
appendChild
(
el
);
svg
.
canvas
.
appendChild
(
el
);
}
}
var
res
=
new
Element
(
el
,
svg
);
var
res
=
new
Element
(
el
,
svg
);
res
.
attrs
=
res
.
attrs
||
{};
res
.
attrs
.
x
=
x
;
res
.
attrs
.
y
=
y
;
res
.
attrs
.
width
=
w
;
res
.
attrs
.
height
=
h
;
res
.
type
=
"image"
;
res
.
type
=
"image"
;
return
res
;
return
res
;
};
};
...
@@ -1293,10 +1298,6 @@ var Raphael = (function (type) {
...
@@ -1293,10 +1298,6 @@ var Raphael = (function (type) {
el
.
setAttribute
(
"y"
,
y
);
el
.
setAttribute
(
"y"
,
y
);
el
.
setAttribute
(
"text-anchor"
,
"middle"
);
el
.
setAttribute
(
"text-anchor"
,
"middle"
);
el
.
setAttribute
(
"fill"
,
"#000"
);
el
.
setAttribute
(
"fill"
,
"#000"
);
el
.
attrs
=
el
.
attrs
||
{};
el
.
attrs
.
x
=
x
;
el
.
attrs
.
y
=
y
;
el
.
attrs
.
fill
=
"#000"
;
if
(
text
)
{
if
(
text
)
{
el
.
appendChild
(
document
.
createTextNode
(
text
));
el
.
appendChild
(
document
.
createTextNode
(
text
));
}
}
...
@@ -1304,6 +1305,10 @@ var Raphael = (function (type) {
...
@@ -1304,6 +1305,10 @@ var Raphael = (function (type) {
svg
.
canvas
.
appendChild
(
el
);
svg
.
canvas
.
appendChild
(
el
);
}
}
var
res
=
new
Element
(
el
,
svg
);
var
res
=
new
Element
(
el
,
svg
);
res
.
attrs
=
res
.
attrs
||
{};
res
.
attrs
.
x
=
x
;
res
.
attrs
.
y
=
y
;
res
.
attrs
.
fill
=
"#000"
;
res
.
type
=
"text"
;
res
.
type
=
"text"
;
return
res
;
return
res
;
};
};
...
@@ -1454,6 +1459,43 @@ var Raphael = (function (type) {
...
@@ -1454,6 +1459,43 @@ var Raphael = (function (type) {
setTimeout
(
function
()
{
rect
.
remove
();},
0
);
setTimeout
(
function
()
{
rect
.
remove
();},
0
);
}
}
};
};
Element
.
prototype
.
animateTo
=
function
(
x
,
y
,
ms
,
callback
)
{
clearTimeout
(
this
.
animation_in_progress
);
if
(
"cx"
in
this
.
attrs
||
"x"
in
this
.
attrs
)
{
var
is_round
=
(
"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
dy
=
y
-
Y
,
dx
=
x
-
X
,
coeff
=
dy
/
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
start
=
new
Date
(),
that
=
this
;
(
function
()
{
var
time
=
(
new
Date
()).
getTime
()
-
start
.
getTime
();
if
(
time
<
ms
)
{
var
x1
=
X
+
time
*
dx
/
ms
;
var
y1
=
x1
*
coeff
+
plus
;
that
.
attr
(
is_round
?
{
cx
:
x1
,
cy
:
y1
}
:
{
x
:
x1
,
y
:
y1
});
that
.
animation_in_progress
=
setTimeout
(
arguments
.
callee
,
1
);
C
.
safari
();
}
else
{
that
.
attr
(
is_round
?
{
cx
:
x
,
cy
:
y
}
:
{
x
:
x
,
y
:
y
});
C
.
safari
();
callback
&&
callback
.
call
(
that
);
}
})();
}
return
this
;
};
return
r
;
return
r
;
}
else
{
}
else
{
...
@@ -1518,7 +1560,7 @@ Raphael.hsb2rgb = function (hue, saturation, brightness) {
...
@@ -1518,7 +1560,7 @@ Raphael.hsb2rgb = function (hue, saturation, brightness) {
return
rgb
;
return
rgb
;
};
};
Raphael
.
rgb2hsb
=
function
(
red
,
green
,
blue
)
{
Raphael
.
rgb2hsb
=
function
(
red
,
green
,
blue
)
{
if
(
typeof
red
==
"object"
&&
"r"
in
red
&&
"
h
"
in
red
&&
"b"
in
red
)
{
if
(
typeof
red
==
"object"
&&
"r"
in
red
&&
"
g
"
in
red
&&
"b"
in
red
)
{
blue
=
red
.
b
;
blue
=
red
.
b
;
green
=
red
.
g
;
green
=
red
.
g
;
red
=
red
.
r
;
red
=
red
.
r
;
...
@@ -1569,7 +1611,7 @@ Raphael.rgb2hsb = function (red, green, blue) {
...
@@ -1569,7 +1611,7 @@ Raphael.rgb2hsb = function (red, green, blue) {
Raphael
.
getColor
=
function
(
value
)
{
Raphael
.
getColor
=
function
(
value
)
{
var
start
=
arguments
.
callee
.
start
=
arguments
.
callee
.
start
||
{
h
:
0
,
s
:
1
,
b
:
value
||
.
75
};
var
start
=
arguments
.
callee
.
start
=
arguments
.
callee
.
start
||
{
h
:
0
,
s
:
1
,
b
:
value
||
.
75
};
var
rgb
=
this
.
hsb2rgb
(
start
.
h
,
start
.
s
,
start
.
b
);
var
rgb
=
this
.
hsb2rgb
(
start
.
h
,
start
.
s
,
start
.
b
);
start
.
h
+=
.
1
;
start
.
h
+=
.
075
;
if
(
start
.
h
>
1
)
{
if
(
start
.
h
>
1
)
{
start
.
h
=
0
;
start
.
h
=
0
;
start
.
s
-=
.
2
;
start
.
s
-=
.
2
;
...
...
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