version 0.6: new "animate" method. Old transform, scale and rotate rewritten. Added...
authorDmitry Baranovskiy <dbaranovskiy@Fresh-Air.sydney.atlassian.com>
Mon, 5 Jan 2009 01:42:53 +0000 (12:42 +1100)
committerDmitry Baranovskiy <dbaranovskiy@Fresh-Air.sydney.atlassian.com>
Mon, 5 Jan 2009 01:42:53 +0000 (12:42 +1100)
raphael-packed.js
raphael.js

index a1b2daa..cee5ade 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * Raphael 0.5.12 - JavaScript Vector Library
+ * Raphael 0.6 - JavaScript Vector Library
  *
  * Copyright (c) 2008 Dmitry Baranovskiy (http://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 1N=(I(q){9 r=I(){N r.3E.2v(r,K)};r.4y="0.5.12";r.18=q;9 C={};I 2m(a,b,c,d,e,f){7.m=[[a||1,b||0,0],[c||0,d||1,0],[e||0,f||0,1]]}C.1d=C.1f=C.1v=C.1z=I(x){N x};J(q=="2U"){2m.1r.2D=I(){N"6o:6n.6m.2m(6l="+7.m[0][0]+", 6k="+7.m[1][0]+", 6j="+7.m[0][1]+", 6i="+7.m[1][1]+", 6h="+7.m[2][0]+", 6f="+7.m[2][1]+", 6e=\'6d 6c\', 6b=\'6a\')"};9 t=I(j,l,m){9 g=17.1s("1k:1S"),2H=g.1g;2H.2h="2a";2H.1H=0;2H.1y=0;2H.11=m.11+"1A";2H.14=m.14+"1A";9 n=17.1s("1k:2l"),2E=n.1g;2E.11=m.11+"1A";2E.14=m.14+"1A";n.1h="";J(j["3Y"]){n.5O=j["3Y"]}n.34=7.34;n.36=7.36;g.1a(n);m.19.1a(g);9 p=1n z(n,g,m);u(p,j);J(j.2p){v(p,j.2p)}p.P=25;p.18="1h";p.1h=[];p.O={x:0,y:0,2f:0,2e:0,P:25};p.2j="";p.2z=I(){7.P=25;N 7};p.37=I(){7.P=2X;N 7};p.4a=I(){7.2j="";9 a=7.1h;7.1h=[];1p(9 i=0,1l=a.1b;i<1l;i++){J(a[i].18!="3I"){7[a[i].18+"40"].2v(7,a[i].1R)}1j{7.2q()}}N 7};p.2c=I(x,y){9 d=7.P?"m":"t";9 a=7.P?m.1d:m.1v;9 b=7.P?m.1f:m.1z;d+=13.15(a(U(x,10)))+" "+13.15(b(U(y,10)));7[0].1h=7.2j+=d;7.O.x=(7.P?0:7.O.x)+a(U(x,10));7.O.y=(7.P?0:7.O.y)+b(U(y,10));7.O.P=7.P;7.1h.1G({18:"3U",1R:[].2S.2F(K,0),23:7.P});N 7};p.1o=I(x,y){9 d=7.P?"l":"r";9 a=7.P?m.1d:m.1v;9 b=7.P?m.1f:m.1z;d+=13.15(a(U(x,10)))+" "+13.15(b(U(y,10)));7[0].1h=7.2j+=d;7.O.x=(7.P?0:7.O.x)+a(U(x,10));7.O.y=(7.P?0:7.O.y)+b(U(y,10));7.O.P=7.P;7.1h.1G({18:"41",1R:[].2S.2F(K,0),23:7.P});N 7};p.3g=I(a,b,c,e,f,g){f=(7.P?0:7.O.x)+f;g=(7.P?0:7.O.y)+g;9 h=7.O.x,2V=7.O.y,x=(h-f)/2,y=(2V-g)/2,k=(c==e?-1:1)*13.54((a*a*b*b-a*a*y*y-b*b*x*x)/(a*a*y*y+b*b*x*x)),1F=k*a*y/b+(h+f)/2,1K=k*-b*x/a+(2V+g)/2,d=e?(7.P?"51":"50"):(7.P?"4Z":"4Y"),1d=7.P?m.1d:m.1v,1f=7.P?m.1f:m.1z,1H=13.15(1F-a),1y=13.15(1K-b);d+=[1H,1y,13.15(1H+a*2),13.15(1y+b*2),13.15(h),13.15(2V),13.15(1d(U(f,10))),13.15(1d(U(g,10)))].1L(", ");7[0].1h=7.2j+=d;7.O.x=(7.P?0:7.O.x)+1d(U(f,10));7.O.y=(7.P?0:7.O.y)+1f(U(g,10));7.O.P=7.P;7.1h.1G({18:"4b",1R:[].2S.2F(K,0),23:7.P});N 7};p.4c=I(a,b,c){J(!c){N 7.1o(a,b)}1j{9 p={};p.1d=7.P?m.1d:m.1v;p.1f=7.P?m.1f:m.1z;9 x=13.15(p.1d(13.15(U(a,10)*1e)/1e));9 y=13.15(p.1f(13.15(U(b,10)*1e)/1e));9 w=13.15(m.1v(13.15(U(c,10)*1e)/1e));9 d=7.P?"c":"v";9 e=[13.15(7.O.x)+w,13.15(7.O.y),x-w,y,x,y];d+=e.1L(" ")+" ";7.O.x=(7.P?0:7.O.x)+e[4];7.O.y=(7.P?0:7.O.y)+e[5];7.O.2f=e[2];7.O.2e=e[3];7[0].1h=7.2j+=d;7.1h.1G({18:"4w",1R:[].2S.2F(K,0),23:7.P});N 7}};p.1q=I(){9 d=7.P?"c":"v";9 a=7.P?m.1d:m.1v;9 b=7.P?m.1f:m.1z;J(K.1b==6){7.O.2f=(7.P?0:7.O.x)+a(U(K[2],10));7.O.2e=(7.P?0:7.O.y)+b(U(K[3],10));7.O.x=(7.P?0:7.O.x)+a(U(K[4],10));7.O.y=(7.P?0:7.O.y)+b(U(K[5],10));d+=13.15(a(U(K[0],10)))+" "+13.15(b(U(K[1],10)))+" "+13.15(a(U(K[2],10)))+" "+13.15(b(U(K[3],10)))+" "+13.15(a(U(K[4],10)))+" "+13.15(b(U(K[5],10)))+" ";7.O.P=7.P}J(K.1b==4){9 c=7.O.x*2-7.O.2f;9 e=7.O.y*2-7.O.2e;7.O.2f=(7.P?0:7.O.x)+a(U(K[0],10));7.O.2e=(7.P?0:7.O.y)+b(U(K[1],10));7.O.x=(7.P?0:7.O.x)+a(U(K[2],10));7.O.y=(7.P?0:7.O.y)+b(U(K[3],10));d+=[13.15(c),13.15(e),13.15(a(U(K[0],10))),13.15(b(U(K[1],10))),13.15(a(U(K[2],10))),13.15(b(U(K[3],10)))].1L(" ")}7[0].1h=7.2j+=d;7.1h.1G({18:"4N",1R:[].2S.2F(K,0),23:7.P});N 7};p.2K=I(r,a){9 R=.4K*r,21=7.P,o=7;J(21){7.37();21=I(){o.2z()}}1j{21=I(){}}9 b={l:I(){N{u:I(){o.1q(-R,0,-r,-(r-R),-r,-r)},d:I(){o.1q(-R,0,-r,r-R,-r,r)}}},r:I(){N{u:I(){o.1q(R,0,r,-(r-R),r,-r)},d:I(){o.1q(R,0,r,r-R,r,r)}}},u:I(){N{r:I(){o.1q(0,-R,-(R-r),-r,r,-r)},l:I(){o.1q(0,-R,R-r,-r,-r,-r)}}},d:I(){N{r:I(){o.1q(0,R,-(R-r),r,r,r)},l:I(){o.1q(0,R,R-r,r,-r,r)}}}};b[a.3a(0)]()[a.3a(1)]();21();N o};p.2q=I(){7[0].1h=(7.2j+="x e");N 7};J(1i l=="2b"){p.2z();C.3L(p,l)}N p};9 u=I(o,a){9 s=o[0].1g;o.Q=o.Q||{};1p(9 b 1x a){o.Q[b]=a[b]}a["2g-4z"]&&(s.6s=a["2g-4z"]);a["2g-4x"]&&(s.4Q=a["2g-4x"]);a["2g"]&&(s.2g=a["2g"]);a["2g-3A"]&&(s.4R=a["2g-3A"]);J(1i a.1E!="1w"||1i a["1c-11"]!="1w"||1i a.1m!="1w"||1i a.1c!="1w"){o=o.2l||o[0];9 c=(o.30("1m")&&o.30("1m")[0])||17.1s("1k:1m");J("1m-1E"1x a||"1E"1x a){c.1E=((a["1m-1E"]+1||2)-1)*((a.1E+1||2)-1)}J(a.1m){c.28=25}J(c.28==1w||a.1m=="1Q"){c.28=2X}J(c.28&&a.1m){9 d=a.1m.4p(/^2B\\(([^\\)]+)\\)$/i);J(d){c.3o=d[1];c.18="4S"}1j{c.1Z=a.1m;c.3o="";c.18="4T"}}o.1a(c);9 e=(o.30("1c")&&o.30("1c")[0])||17.1s("1k:1c");J((a.1c&&a.1c!="1Q")||a["1c-11"]||a["1c-1E"]||a["1c-3m"]){e.28=25}J(a.1c=="1Q"||1i e.28=="1w"){e.28=2X}J(e.28&&a.1c){e.1Z=a.1c}e.1E=((a["1c-1E"]+1||2)-1)*((a.1E+1||2)-1);a["1c-4i"]&&(e.4U=a["1c-4i"]||"4g");e.4f=a["1c-4f"]||8;a["1c-3N"]&&(e.4V={3l:"4W",3x:"3x",15:"15"}[a["1c-3N"]]||"4g");a["1c-11"]&&(e.3A=(U(a["1c-11"],10)||1)*12/16);J(a["1c-3m"]){9 f={"-":"4X",".":"52","-.":"53","-..":"55",". ":"56","- ":"58","--":"59","- .":"5a","--.":"5b","--..":"5c"};e.5d=f[a["1c-3m"]]||""}o.1a(e)}};9 v=I(o,a){o.Q=o.Q||{};o.Q.2p=a;o=o.2l||o[0];9 b=o.30("1m");J(b.1b){b=b[0]}1j{b=17.1s("1k:1m")}J(a.1u.1b){b.28=25;b.5e="1Q";b.18=(a.18.3c()=="5f")?"2p":"5g";J(1i a.1u[0].1Z!="1w"){b.1Z=a.1u[0].1Z||"#1C"}J(1i a.1u[a.1u.1b-1].1Z!="1w"){b.5h=a.1u[a.1u.1b-1].1Z||"#1C"}9 c=[];1p(9 i=0,1l=a.1u.1b;i<1l;i++){J(a.1u[i].2R){c.1G(a.1u[i].2R+" "+a.1u[i].1Z)}};9 d=a.1u[0].1E||1;9 e=a.1u[a.1u.1b-1].1E||1;J(c){b.5i.5j=c.1L(",");e+=d;d=e-d;e-=d}b.T("1E",d);b.T("5k",e);J(a.1W){9 f=13.15(13.3V((U(a.1W[3],10)-U(a.1W[1],10))/(U(a.1W[2],10)-U(a.1W[0],10)))*57.29)||0;b.5l=5m-f}J(a.18.3c()=="5n"){b.5o="1e%";b.5p="0.5 0.5"}}};9 z=I(b,c,d){9 e=0,5q=0,5r=0,5s=1;7[0]=b;7.3D=b;7.X=0;7.Y=0;7.Q={};7.1t=c;7.27=d;7.3y=I(a){J(a==1w){N e}e+=a;7.1t.1g.5t=e;N 7}};z.1r.2y=I(a){9 b=7.1t.1g,2A=7[0].1g;1p(9 i 1x a){7.Q[i]=a[i]}9 c=7.Q,x,y,w,h;4j(7.18){1B"2Z":x=c.1F-c.r;y=c.1K-c.r;w=h=c.r*2;1M;1B"31":x=c.1F-c.2o;y=c.1K-c.2n;w=c.2o*2;h=c.2n*2;1M;1B"2d":1B"2s":x=c.x;y=c.y;w=c.w;h=c.h;1M;1B"1T":7.3v.v=["m",13.15(c.x),", ",13.15(c.y-2),"l",13.15(c.x)+1,", ",13.15(c.y-2)].1L("");N;3w:N}9 d=7.27.11/2-w/2,1y=7.27.14/2-h/2;b.2h="2a";b.1H=x-d+"1A";b.1y=y-1y+"1A";7.X=x-d;7.Y=y-1y;7.W=w;7.H=h;b.11=7.27.11+"1A";b.14=7.27.14+"1A";2A.2h="2a";2A.1y=1y+"1A";2A.1H=d+"1A";2A.11=w+"1A";2A.14=h+"1A"};z.1r.4v=I(){7.1t.1g.3i="1Q";N 7};z.1r.4B=I(){7.1t.1g.3i="4D";N 7};z.1r.3f=I(x,y){J(x==1w&&y==1w){N{x:7.X,y:7.Y}}7.X+=x;7.Y+=y;7.1t.1g.1H=7.X+"1A";7.1t.1g.1y=7.Y+"1A";N 7};z.1r.3H=I(a,b,c,d,e,f){3K=1n 2m(a,b,c,d,e,f);7.1t.1g.4E=3K;N 7};z.1r.4G=I(x,y){J(x==1w&&y==1w){N}y=y||x;J(x!=0&&!(x==1&&y==1)){9 a=13.15(x/13.4H(x)),39=13.15(y/13.4H(y)),s=7[0].1g;J(a!=1||39!=1){s.4E=1n 2m(a,0,0,39,0,0)}9 b=1Y(s.11,10)*x*a;9 c=1Y(s.14,10)*y*39;9 d=1Y(s.1H,10);9 e=1Y(s.1y,10);s.1H=7.X=d+7.W/2-b/2;s.1y=7.Y=e+7.H/2-c/2;s.11=7.W=b;s.14=7.H=c}N 7};z.1r.2L=I(){N{x:7.1t.5u,y:7.1t.5v,11:7.1t.3t,14:7.1t.3s}};z.1r.33=I(){7[0].1D.26(7[0]);7.1t.1D.26(7.1t);7.2l&&7.2l.1D.26(7.2l)};z.1r.2k=I(){J(K.1b==1&&1i K[0]=="2b"){N 7.Q[K[0]]}J(7.Q&&K.1b==1&&K[0]4n 4e){9 a={};1p(9 i=0,1l=K[0].1b;i<1l;i++){a[K[0][i]]=7.Q[K[0][i]]};N a}J(7[0].5w.3c()=="1S"){9 b=7[0].2W;7.Q=7.Q||{};J(K.1b==2){7.Q[K[0]]=K[1]}1j J(K.1b==1||1i K[0]=="2x"){1p(9 j 1x K[0]){7.Q[j]=K[0][j]}}1p(9 i=0,1l=b.1b;i<1l;i++){7.2k.2v(1n 5x(b[i],7[0],7.27),K)}}1j{9 c;J(K.1b==2){c={};c[K[0]]=K[1]}J(K.1b==1&&1i K[0]=="2x"){c=K[0]}J(c){u(7,c);7.2y(c);J(c.2p){v(7,c.2p)}J(c.1T&&7.18=="1T"){7[0].2b=c.1T}J(c.2i){7[0].2i=c.2i}}}N 7};z.1r.45=I(){7.1t.1D.1a(7.1t);N 7};z.1r.42=I(){J(7.1t.1D.1V!=7.1t){7.1t.1D.3e(7.1t,7.1t.1D.1V)}N 7};9 A=I(a,x,y,r){9 g=17.1s("1k:1S");9 o=17.1s("1k:3W");g.1a(o);a.19.1a(g);9 b=1n z(o,g,a);u(b,{1c:"#1C",1m:"1Q"});b.2y({x:x-r,y:y-r,w:r*2,h:r*2});b.Q.1F=x;b.Q.1K=y;b.Q.r=r;b.18="2Z";N b};9 B=I(a,x,y,w,h,r){9 g=17.1s("1k:1S");9 o=17.1s(r?"1k:5y":"1k:2d");J(r){o.5z=r/(13.2N(w,h))}g.1a(o);a.19.1a(g);9 b=1n z(o,g,a);u(b,{1c:"#1C"});b.2y({x:x,y:y,w:w,h:h});b.Q.x=x;b.Q.y=y;b.Q.w=w;b.Q.h=h;b.Q.r=r;b.18="2d";N b};9 D=I(a,x,y,b,c){9 g=17.1s("1k:1S");9 o=17.1s("1k:3W");g.1a(o);a.19.1a(g);9 d=1n z(o,g,a);u(d,{1c:"#1C"});d.2y({x:x-b,y:y-c,w:b*2,h:c*2});d.Q.1F=x;d.Q.1K=y;d.Q.2o=b;d.Q.2n=c;d.18="31";N d};9 E=I(a,b,x,y,w,h){9 g=17.1s("1k:1S");9 o=17.1s("1k:2s");o.3o=b;g.1a(o);a.19.1a(g);9 c=1n z(o,g,a);c.18="2s";c.2y({x:x,y:y,w:w,h:h});c.Q.x=x;c.Q.y=y;c.Q.w=w;c.Q.h=h;N c};9 F=I(a,x,y,b){9 g=17.1s("1k:1S"),2G=g.1g;9 c=17.1s("1k:2l"),2E=c.1g;9 d=17.1s("1k:1h"),5A=d.1g;d.v=["m",13.15(x),", ",13.15(y-2),"l",13.15(x)+1,", ",13.15(y-2)].1L("");d.5B=25;2E.11=a.11;2E.14=a.14;2G.2h="2a";2G.1H=0;2G.1y=0;2G.11=a.11;2G.14=a.14;9 o=17.1s("1k:3v");o.2b=b;o.28=25;o.34=a.34;o.36=a.36;c.1a(o);c.1a(d);g.1a(c);a.19.1a(g);9 e=1n z(o,g,a);e.2l=c;e.3v=d;e.18="1T";e.Q.x=x;e.Q.y=y;e.Q.w=1;e.Q.h=1;N e};9 G=I(a){9 b=17.1s("1k:1S"),2C=b.1g;2C.2h="2a";2C.1H=0;2C.1y=0;2C.11=a.11;2C.14=a.14;J(a.19){a.19.1a(b)}9 c=1n z(b,b,a);1p(9 f 1x a){J(f.3a(0)!="43"&&1i a[f]=="I"){c[f]=(I(f){N I(){9 e=a[f].2v(a,K);b.1a(e[0].1D);N e}})(f)}}c.18="1S";N c};r.3E=I(){9 d,11,14;J(1i K[0]=="2b"){d=17.44(K[0]);11=K[1];14=K[2]}J(1i K[0]=="2x"){d=K[0];11=K[1];14=K[2]}J(1i K[0]=="4d"){d=1;x=K[0];y=K[1];11=K[2];14=K[3]}J(!d){4O 1n 4q("2U 4s 4A 4F.");}J(!17.4M["1k"]){17.4M.5C("1k","5D:5E-5F-5G:27");17.5H().5I("1k\\\\:*","5J:2B(#3w#2U)")}9 c=17.1s("5K"),r=C.19=17.1s("1k:1S"),24=c.1g,2M=r.1g;C.11=11;C.14=14;11=11||"5L";14=14||"5M";24.5N="2d(0 "+11+" "+14+" 0)";24.2h="2a";2M.11=11;2M.14=14;r.34=(11=="1e%"?11:U(11))+" "+(14=="1e%"?14:U(14));r.36="0 0";9 b=17.1s("1k:2d"),2T=b.1g;2T.1H=2T.1y=0;2T.11=2M.11;2T.14=2M.14;b.5P=b.5Q="f";r.1a(b);c.1a(r);J(d==1){17.3d.1a(c);24.2h="2a";24.1H=x+"1A";24.1y=y+"1A";24.11=11;24.14=14;d={1g:{11:11,14:14}}}1j{24.11=d.1g.11=11;24.14=d.1g.14=14;J(d.1V){d.3e(c,d.1V)}1j{d.1a(c)}}1p(9 e 1x C){d[e]=C[e]}d.3J=I(){9 a=[];1p(9 i=0,1l=r.2W.1b;i<1l;i++){J(r.2W[i]!=b){a.1G(r.2W[i])}}1p(i=0,1l=a.1b;i<1l;i++){r.26(a[i])}};N d};C.33=I(){C.19.1D.1D.26(C.19.1D)}}J(q=="2J"){2m.1r.2D=I(){N"3H("+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.1O(l.1J,"1h");m.T("1m","1Q");J(l.19){l.19.1a(m)}9 p=1n z(m,l);J(j){u(p,j)}p.P=25;p.1h=[];p.O={x:0,y:0,2f:0,2e:0};p.2z=I(){7.P=25;N 7};p.37=I(){7.P=2X;N 7};p.4a=I(){7[0].T("d","5R 0");9 a=7.1h;7.1h=[];1p(9 i=0,1l=a.1b;i<1l;i++){J(a[i].18!="3I"){7[a[i].18+"40"].2v(7,a[i].1R)}1j{7.2q()}}N 7};p.2c=I(x,y){9 d=7.P?"M":"m";9 a=7.P?l.1d:l.1v;9 b=7.P?l.1f:l.1z;d+=a(U(x,10))+" "+b(U(y,10))+" ";9 c=7[0].2w("d")||"";7[0].T("d",c+d);7.O.x=(7.P?0:7.O.x)+l.1d(U(x,10));7.O.y=(7.P?0:7.O.y)+l.1f(U(y,10));7.1h.1G({18:"3U",1R:K,23:7.P});N 7};p.1o=I(x,y){7.O.x=(7.P?0:7.O.x)+l.1d(U(x,10));7.O.y=(7.P?0:7.O.y)+l.1f(U(y,10));9 d=7.P?"L":"l";9 a=7.P?l.1d:l.1v;9 b=7.P?l.1f:l.1z;d+=a(U(x,10))+" "+b(U(y,10))+" ";9 c=7[0].2w("d")||"";7[0].T("d",c+d);7.1h.1G({18:"41",1R:K,23:7.P});N 7};p.3g=I(a,b,c,e,x,y){9 d=7.P?"A":"a";9 f=7.P?l.1d:l.1v;9 g=7.P?l.1f:l.1z;d+=[l.1v(U(a,10)),l.1z(U(b,10)),0,c,e,f(U(x,10)),g(U(y,10))].1L(" ");9 h=7[0].2w("d")||"";7[0].T("d",h+d);7.O.x=l.1d(U(x,10));7.O.y=l.1f(U(y,10));7.1h.1G({18:"4b",1R:K,23:7.P});N 7};p.4c=I(a,b,c){J(!c){N 7.1o(a,b)}1j{9 p={};p.1d=7.P?l.1d:l.1v;p.1f=7.P?l.1f:l.1z;9 x=p.1d(13.15(U(a,10)*1e)/1e);9 y=p.1f(13.15(U(b,10)*1e)/1e);9 w=l.1v(13.15(U(c,10)*1e)/1e);9 d=7.P?"C":"c";9 e=[7.O.x+w,7.O.y,x-w,y,x,y];1p(9 i=0,1l=e.1b;i<1l;i++){d+=e[i]+" "}7.O.x=(7.P?0:7.O.x)+e[4];7.O.y=(7.P?0:7.O.y)+e[5];7.O.2f=e[2];7.O.2e=e[3];9 f=7[0].2w("d")||"";7[0].T("d",f+d);7.1h.1G({18:"4w",1R:K,23:7.P});N 7}};p.1q=I(){9 p={};p.1d=7.P?l.1d:l.1v;p.1f=7.P?l.1f:l.1z;J(K.1b==6){9 d=7.P?"C":"c";1p(9 i=0,1l=K.1b;i<1l;i++){d+=p[(i%2==0)?"1d":"1f"](13.15(U(K[i],10)*1e)/1e)+" "}7.O.x=(7.P?0:7.O.x)+p.1d((U(K[4],10)*1e)/1e);7.O.y=(7.P?0:7.O.y)+p.1f((U(K[5],10)*1e)/1e);7.O.2f=p.1d((U(K[2],10)*1e)/1e);7.O.2e=p.1f((U(K[3],10)*1e)/1e)}1j{J(K.1b==4){9 d=7.P?"S":"s";1p(9 i=0,1l=K.1b;i<1l;i++){d+=p[i%2==0?"1d":"1f"]((U(K[i],10)*1e)/1e)+" "}}7.O.x=(7.P?0:7.O.x)+p.1d((U(K[2],10)*1e)/1e);7.O.y=(7.P?0:7.O.y)+p.1f((U(K[3],10)*1e)/1e);7.O.2f=p.1d((U(K[0],10)*1e)/1e);7.O.2e=p.1f((U(K[1],10)*1e)/1e)}9 a=7[0].2w("d")||"";7[0].T("d",a+d);7.1h.1G({18:"4N",1R:K,23:7.P});N 7};p.2K=I(r,a){9 R=.4K*r,21=7.P,o=7;J(21){7.37();21=I(){o.2z()}}1j{21=I(){}}9 b={l:I(){N{u:I(){o.1q(-R,0,-r,-(r-R),-r,-r)},d:I(){o.1q(-R,0,-r,r-R,-r,r)}}},r:I(){N{u:I(){o.1q(R,0,r,-(r-R),r,-r)},d:I(){o.1q(R,0,r,r-R,r,r)}}},u:I(){N{r:I(){o.1q(0,-R,-(R-r),-r,r,-r)},l:I(){o.1q(0,-R,R-r,-r,-r,-r)}}},d:I(){N{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]]();21();N o};p.2q=I(){9 a=7[0].2w("d")||"";7[0].T("d",a+"Z ");7.1h.1G({18:"3I"});N 7};J(1i k=="2b"){p.2z();C.3L(p,k)}N p};9 v=I(o,a,b){9 c=17.1O(b.1J,a.18+"5S");c.2i="4L-2p-"+b.3z++;J(a.1W&&a.1W.1b){c.T("5T",a.1W[0]);c.T("2V",a.1W[1]);c.T("5U",a.1W[2]);c.T("5V",a.1W[3])}b.35.1a(c);1p(9 i=0,1l=a.1u.1b;i<1l;i++){9 d=17.1O(b.1J,"3p");d.T("2R",a.1u[i].2R?a.1u[i].2R:(i==0)?"0%":"1e%");d.T("3p-1Z",a.1u[i].1Z||"#5W");J(1i a.1u[i].1E!="1w"){d.T("3p-1E",a.1u[i].1E)}c.1a(d)};o.T("1m","2B(#"+c.2i+")")};9 H=I(o){J(o.32){9 a=o.3D.2L();o.32.T("5X","3f("+[a.x,a.y].1L(",")+")")}};9 u=I(o,a){9 b={"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]};1p(9 c 1x a){9 d=a[c];o.Q[c]=d;4j(c){1B"2o":1B"1F":1B"x":o[0].T(c,o.1I.1d(d));H(o);1M;1B"2n":1B"1K":1B"y":o[0].T(c,o.1I.1f(d));H(o);1M;1B"11":o[0].T(c,o.1I.1v(d));1M;1B"14":o[0].T(c,o.1I.1z(d));1M;1B"2p":v(o[0],d,o.1I);1M;1B"1c-3m":d=b[d.3c()];J(d){9 e=a["1c-11"]||o.2k("1c-11")||"1",3l={15:e,3x:e,3l:0}[o.2k("1c-3N")]||0,3r=[];1p(9 i=0,1l=d.1b;i<1l;i++){3r.1G(d[i]*e+((i%2)?1:-1)*3l)}d=3r.1L(",");o[0].T(c,d)}1M;1B"1T":J(o.18=="1T"){o[0].2W.1b&&o[0].26(o[0].1V);o[0].1a(17.4o(d))}1M;1B"1m":9 f=d.4p(/^2B\\(([^\\)]+)\\)$/i);J(f){9 g=17.1O(o.1I.1J,"32");9 h=17.1O(o.1I.1J,"2s");g.2i="4L-32-"+o.1I.3z++;g.T("x",0);g.T("y",0);g.T("5Y","5Z");h.T("x",0);h.T("y",0);h.4l(o.1I.3k,"49",f[1]);g.1a(h);9 j=17.1s("60");j.1g.2h="2a";j.1g.1y="-46";j.1g.1H="-46";j.61=I(){g.T("11",7.3t);g.T("14",7.3s);h.T("11",7.3t);h.T("14",7.3s);17.3d.26(7);C.3h()};17.3d.1a(j);j.3o=f[1];o.1I.35.1a(g);o[0].1g.1m="2B(#"+g.2i+")";o[0].T("1m","2B(#"+g.2i+")");o.32=g;H(o);1M}3w:9 k=c.3F(/(\\-.)/g,I(w){N w.2u(1).62()});o[0].1g[k]=d;o[0].T(c,d);1M}}};9 z=I(c,d){9 X=0,Y=0,2P={2O:0,x:0,y:0},2t=1,2r=1,3K=63;7[0]=c;7.3D=c;7.1I=d;7.Q=7.Q||{};7.1P=[];7.3y=I(a){J(a==1w){N 2P.2O}9 b=7.2L();2P.2O+=a;J(2P.2O){7.1P[0]=("3y("+2P.2O+" "+(b.x+b.11/2)+" "+(b.y+b.14/2)+")")}1j{7.1P[0]=""}7[0].T("3b",7.1P.1L(" "));N 7};7.3f=I(x,y){J(x==1w&&y==1w){N{x:X,y:Y}}X+=x;Y+=y;J(X||Y){7.1P[1]="3f("+X+","+Y+")"}1j{7.1P[1]=""}7[0].T("3b",7.1P.1L(" "));N 7};7.4G=I(x,y){J(x==1w&&y==1w){N{x:2t,y:2r}}y=y||x;J(x!=0&&!(x==1&&y==1)){2t*=x;2r*=y;J(!(2t==1&&2r==1)){9 a=7.2L(),2Q=a.x*(1-2t)+(a.11/2-a.11*2t/2),3Q=a.y*(1-2r)+(a.14/2-a.14*2r/2);7.1P[2]=1n 2m(2t,0,0,2r,2Q,3Q)}1j{7.1P[2]=""}7[0].T("3b",7.1P.1L(" "))}N 7}};z.1r.4v=I(){7[0].1g.3i="1Q";N 7};z.1r.4B=I(){7[0].1g.3i="4D";N 7};z.1r.3H=I(a,b,c,d,e,f){7.1P[3]=1n 2m(a,b,c,d,e,f);7[0].T("3b",7.1P.1L(" "));N 7};z.1r.33=I(){7[0].1D.26(7[0])};z.1r.2L=I(){N 7[0].2L()};z.1r.2k=I(){J(K.1b==1&&1i K[0]=="2b"){N 7[0].2w(K[0])}J(K.1b==1&&K[0]4n 4e){9 a={};1p(9 j 1x K[0]){a[K[0][j]]=7.Q[K[0][j]]}N a}J(K.1b==2){9 b={};b[K[0]]=K[1];u(7,b)}1j J(K.1b==1&&1i K[0]=="2x"){u(7,K[0])}N 7};z.1r.45=I(){7[0].1D.1a(7[0]);N 7};z.1r.42=I(){J(7[0].1D.1V!=7[0]){7[0].1D.3e(7[0],7[0].1D.1V)}N 7};9 A=I(a,x,y,r){9 b=17.1O(a.1J,"2Z");b.T("1F",a.1d(x));b.T("1K",a.1f(y));b.T("r",r);b.T("1m","1Q");b.T("1c","#1C");J(a.19){a.19.1a(b)}9 c=1n z(b,a);c.Q=c.Q||{};c.Q.1F=x;c.Q.1K=y;c.Q.r=r;c.Q.1c="#1C";c.18="2Z";N c};9 B=I(a,x,y,w,h,r){9 b=17.1O(a.1J,"2d");b.T("x",a.1d(x));b.T("y",a.1f(y));b.T("11",a.1v(w));b.T("14",a.1z(h));J(r){b.T("2o",r);b.T("2n",r)}b.T("1m","1Q");b.T("1c","#1C");J(a.19){a.19.1a(b)}9 c=1n z(b,a);c.Q=c.Q||{};c.Q.x=x;c.Q.y=y;c.Q.11=w;c.Q.14=h;c.Q.1c="#1C";J(r){c.Q.2o=c.Q.2n=r}c.18="2d";N c};9 D=I(a,x,y,b,c){9 d=17.1O(a.1J,"31");d.T("1F",a.1d(x));d.T("1K",a.1f(y));d.T("2o",a.1v(b));d.T("2n",a.1z(c));d.T("1m","1Q");d.T("1c","#1C");J(a.19){a.19.1a(d)}9 e=1n z(d,a);e.Q=e.Q||{};e.Q.1F=x;e.Q.1K=y;e.Q.2o=b;e.Q.2n=c;e.Q.1c="#1C";e.18="31";N e};9 E=I(a,b,x,y,w,h){9 c=17.1O(a.1J,"2s");c.T("x",a.1d(x));c.T("y",a.1f(y));c.T("11",a.1v(w));c.T("14",a.1z(h));c.4l(a.3k,"49",b);J(a.19){a.19.1a(c)}9 d=1n z(c,a);d.Q=d.Q||{};d.Q.x=x;d.Q.y=y;d.Q.11=w;d.Q.14=h;d.18="2s";N d};9 F=I(a,x,y,b){9 c=17.1O(a.1J,"1T");c.T("x",x);c.T("y",y);c.T("1T-64","65");c.T("1m","#1C");J(b){c.1a(17.4o(b))}J(a.19){a.19.1a(c)}9 d=1n z(c,a);d.Q=d.Q||{};d.Q.x=x;d.Q.y=y;d.Q.1m="#1C";d.18="1T";N d};9 G=I(a){9 b=17.1O(a.1J,"g");J(a.19){a.19.1a(b)}9 i=1n z(b,a);1p(9 f 1x a){J(f[0]!="43"&&1i a[f]=="I"){i[f]=(I(f){N I(){9 e=a[f].2v(a,K);b.1a(e[0]);N e}})(f)}}i.18="1S";N i};r.3E=I(){J(1i K[0]=="2b"){9 a=17.44(K[0]);9 b=K[1];9 c=K[2]}J(1i K[0]=="2x"){9 a=K[0];9 b=K[1];9 c=K[2]}J(1i K[0]=="4d"){9 a=1,x=K[0],y=K[1],b=K[2],c=K[3]}J(!a){4O 1n 4q("2J 4s 4A 4F.");}C.19=17.1O(C.1J,"1I");C.19.T("11",b||3O);C.11=b||3O;C.19.T("14",c||3P);C.14=c||3P;J(a==1){17.3d.1a(C.19);C.19.1g.2h="2a";C.19.1g.1H=x+"1A";C.19.1g.1y=y+"1A"}1j{J(a.1V){a.3e(C.19,a.1V)}1j{a.1a(C.19)}}a={19:C.19,3J:I(){3R(7.19.1V){7.19.26(7.19.1V)}7.35=17.1O(C.1J,"35");7.3z=0;7.19.1a(7.35)}};1p(9 d 1x C){J(d!="66"){a[d]=C[d]}}a.3J();N a};C.33=I(){C.19.1D.26(C.19)};C.1J="3S://3T.3X.3Z/67/1I";C.3k="3S://3T.3X.3Z/68/3k"}J(q=="2U"||q=="2J"){C.2Z=I(x,y,r){N A(7,x,y,r)};C.2d=I(x,y,w,h,r){N B(7,x,y,w,h,r)};C.31=I(x,y,a,b){N D(7,x,y,a,b)};C.1h=I(a,b){N t(a,b,7)};C.2s=I(a,x,y,w,h){N E(7,a,x,y,w,h)};C.1T=I(x,y,a){N F(7,x,y,a)};C.1S=I(){N G(7)};C.69=I(x,y,w,h,r){J(r&&1Y(r,10)){N 7.1h({1c:"#1C"}).2c(x+r,y).1o(x+w-r,y).2K(r,"6g").1o(x+w,y+h-r).2K(r,"6p").1o(x+r,y+h).2K(r,"6q").1o(x,y+r).2K(r,"6r").2q()}N 7.1h({1c:"#1C"}).2c(x,y).1o(x+w,y).1o(x+w,y+h).1o(x,y+h).2q()};C.4P=I(x,y,w,h,a,b,c){c=c||"#1C";9 p=7.1h({1c:c,"1c-11":1}).2c(x,y).1o(x+w,y).1o(x+w,y+h).1o(x,y+h).1o(x,y),3C=h/b,3B=w/a;1p(9 i=1;i<b;i++){p.2c(x,y+i*3C).1o(x+w,y+i*3C)}1p(9 i=1;i<a;i++){p.2c(x+i*3B,y).1o(x+i*3B,y+h)}N p};C.6t=I(a,b,c,d,w,h){9 e=(c-a)/w;9 f=(d-b)/h;7.1d=I(x){N a+x*e};7.1f=I(y){N b+y*f};7.1v=I(w){N w*e};7.1z=I(h){N h*f}};C.6u=I(){7.1d=7.1f=7.1v=7.1z=I(x){N x}};C.3h=I(){J(r.18=="2J"){9 a=C.2d(-C.11,-C.14,C.11*3,C.14*3).2k({1c:"1Q"});47(I(){a.33()},0)}};z.1r.6v=I(x,y,d,e){6w(7.48);J("1F"1x 7.Q||"x"1x 7.Q){9 f=("1F"1x 7.Q),X=7.Q.1F||7.Q.x,Y=7.Q.1K||7.Q.y;J(x==X&&y==Y){N 7}9 g=y-Y,2Q=x-X,3j=g/2Q,4h=Y-3j*X,4k=13.3V(7.3j);7.3u=7.6x*13.6y(4k);J(x<X){7.3u=-7.3u}9 h=1n 4m(),2Y=7;(I(){9 a=(1n 4m()).4r()-h.4r();J(a<d){9 b=X+a*2Q/d;9 c=b*3j+4h;2Y.2k(f?{1F:b,1K:c}:{x:b,y:c});2Y.48=47(K.3n,1);C.3h()}1j{2Y.2k(f?{1F:x,1K:y}:{x:x,y:y});C.3h();e&&e.2F(2Y)}})()}N 7};C.3L=I(p,g){9 h={M:I(x,y){7.2c(x,y)},m:I(x,y){7.2c(7.O.x+x,7.O.y+y)},C:I(a,b,c,d,e,f){7.1q(a,b,c,d,e,f)},c:I(a,b,c,d,e,f){7.1q(7.O.x+a,7.O.y+b,7.O.x+c,7.O.y+d,7.O.x+e,7.O.y+f)},S:I(a,b,c,d){p.1q(a,b,c,d)},s:I(a,b,c,d){7.1q(7.O.x+a,7.O.y+b,7.O.x+c,7.O.y+d)},L:I(x,y){p.1o(x,y)},l:I(x,y){7.1o(7.O.x+x,7.O.y+y)},H:I(x){7.1o(x,7.O.y)},h:I(x){7.1o(7.O.x+x,7.O.y)},V:I(y){7.1o(7.O.x,y)},v:I(y){7.1o(7.O.x,7.O.y+y)},A:I(a,b,c,d,e,x,y){7.3g(a,b,d,e,x,y)},a:I(a,b,c,d,e,x,y){7.3g(7.O.x+a,7.O.y+b,d,6z,7.O.x+x,7.O.y+y)},z:I(){7.2q()}};g.3F(/([6A])\\s*((-?\\d*\\.?\\d*\\s*,?\\s*)+)/4t,I(a,b,c){9 d=[];c.3F(/(-?\\d*\\.?\\d*)\\s*,?\\s*/4t,I(a,b){b&&d.1G(+b)});3R(d.1b>=h[b].1b){h[b].2v(p,d.6B(0,h[b].1b));J(!h[b].1b){1M}}})};N r}1j{N I(){}}})((!(3q.4u&&3q.4u.6C==2))?"2U":"2J");1N.27=!(1N.1I=(1N.18=="2J"));J(1N.27&&3q.6D){1N.18="6E 6F";1N.27=1N.1I=2X}1N.2D=I(){N"6G 6H 6I "+7.18+".\\6J 6K 6L "+6M("6N%6O%20")+7.4y};1N.4C=I(a,c,d){J(1i a=="2x"&&"h"1x a&&"s"1x a&&"b"1x a){d=a.b;c=a.s;a=a.h}9 e,1U,1X;J(d==0){N{r:0,g:0,b:0,3G:"#1C"}}1j{9 i=13.6P(a*6),f=(a*6)-i,p=d*(1-c),q=d*(1-(c*f)),t=d*(1-(c*(1-f)));[I(){e=d;1U=t;1X=p},I(){e=q;1U=d;1X=p},I(){e=p;1U=d;1X=t},I(){e=p;1U=q;1X=d},I(){e=t;1U=p;1X=d},I(){e=d;1U=p;1X=q},I(){e=d;1U=t;1X=p}][i]()}9 h={r:e,g:1U,b:1X};e*=2I;1U*=2I;1X*=2I;9 r=13.15(e).2D(16);J(r.1b==1){r="0"+r}9 g=13.15(1U).2D(16);J(g.1b==1){g="0"+g}9 b=13.15(1X).2D(16);J(b.1b==1){b="0"+b}h.3G="#"+r+g+b;N h};1N.6Q=I(a,b,c){J(1i a=="2x"&&"r"1x a&&"g"1x a&&"b"1x a){c=a.b;b=a.g;a=a.r}J(1i a=="2b"&&a.3a(0)=="#"){J(a.1b==4){c=1Y(a.2u(3),16);b=1Y(a.2u(2,3),16);a=1Y(a.2u(1,2),16)}1j{c=1Y(a.2u(5),16);b=1Y(a.2u(3,5),16);a=1Y(a.2u(1,3),16)}}J(a>1||b>1||c>1){a/=2I;b/=2I;c/=2I}9 d=13.6R(a,b,c),2N=13.2N(a,b,c),22,3M,4I=d;J(2N==d){N{h:0,s:0,b:d}}1j{9 e=(d-2N);3M=e/d;J(a==d){22=(b-c)/e}1j J(b==d){22=2+((c-a)/e)}1j{22=4+((a-b)/e)}22/=6;J(22<0){22+=1}J(22>1){22-=1}}N{h:22,s:3M,b:4I}};1N.4J=I(a){9 b=K.3n.38=K.3n.38||{h:0,s:1,b:a||.6S};9 c=7.4C(b.h,b.s,b.b);b.h+=.6T;J(b.h>1){b.h=0;b.s-=.2;J(b.s<=0){K.3n.38={h:0,s:1,b:b.b}}}N c.3G};1N.4J.6U=I(){7.38=1w};',62,429,'|||||||this||var|||||||||||||||||||||||||||||||||||function|if|arguments|||return|last|isAbsolute|attrs|||setAttribute|parseFloat|||||||width||Math|height|round||document|type|canvas|appendChild|length|stroke|_getX|100|_getY|style|path|typeof|else|rvml|ii|fill|new|lineTo|for|curveTo|prototype|createElement|Group|dots|_getW|undefined|in|top|_getH|px|case|000|parentNode|opacity|cx|push|left|svg|svgns|cy|join|break|Raphael|createElementNS|transformations|none|arg|group|text|green|firstChild|vector|blue|parseInt|color||rollback|hue|pos|cs|true|removeChild|vml|on||absolute|string|moveTo|rect|by|bx|font|position|id|Path|attr|shape|Matrix|ry|rx|gradient|andClose|ScaleY|image|ScaleX|substring|apply|getAttribute|object|setBox|absolutely|os|url|els|toString|ol|call|gs|gl|255|SVG|addRoundedCorner|getBBox|rs|min|deg|Rotation|dx|offset|slice|bs|VML|y1|childNodes|false|that|circle|getElementsByTagName|ellipse|pattern|remove|coordsize|defs|coordorigin|relatively|start|diry|charAt|transform|toLowerCase|body|insertBefore|translate|arcTo|safari|display|coeff|xlink|butt|dasharray|callee|src|stop|window|dashes|offsetHeight|offsetWidth|xs|textpath|default|square|rotate|gradients|weight|columnWidth|rowHeight|node|_create|replace|hex|matrix|end|clear|tMatrix|pathfinder|saturation|linecap|320|200|dy|while|http|www|move|atan|oval|w3|class|org|To|line|toBack|_|getElementById|toFront|9999em|setTimeout|animation_in_progress|href|redraw|arc|cplineTo|number|Array|miterlimit|miter|plus|linejoin|switch|alpha|setAttributeNS|Date|instanceof|createTextNode|match|Error|getTime|container|ig|SVGPreserveAspectRatio|hide|cpline|size|version|family|not|show|hsb2rgb|block|filter|found|scale|abs|brightness|getColor|5522|raphael|namespaces|curve|throw|drawGrid|fontSize|fontWeight|tile|solid|joinstyle|endcap|flat|shortdash|ar|at|wr|wa|shortdot|shortdashdot|sqrt|shortdashdotdot|dot||dash|longdash|dashdot|longdashdot|longdashdotdot|dashstyle|method|linear|gradientTitle|color2|colors|value|opacity2|angle|270|radial|focus|focusposition|RotX|RotY|Scale|rotation|offsetLeft|offsetTop|tagName|item|roundrect|arcsize|ps|textpathok|add|urn|schemas|microsoft|com|createStyleSheet|addRule|behavior|div|320px|200px|clip|className|filled|stroked|M0|Gradient|x1|x2|y2|fff|patternTransform|patternUnits|userSpaceOnUse|img|onload|toUpperCase|null|anchor|middle|create|2000|1999|linerect|bilinear|filtertype|expand|auto|sizingmethod|Dy|rd|Dx|M22|M21|M12|M11|Microsoft|DXImageTransform|progid|dl|lu|ur|fontFamily|setGrid|clearGrid|animateTo|clearTimeout|step|cos|sweethisflag|mzlhvcsqta|splice|SVG_PRESERVEASPECTRATIO_XMINYMIN|CanvasRenderingContext2D|Canvas|only|Your|browser|supports|nYou|are|running|unescape|Rapha|EBl|floor|rgb2hsb|max|75|075|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}('J 1s=(O(n){J r=O(){11 r.48.2B(r,P)};r.59="0.6";r.1n=n;J q={1u:0,1w:0,1t:"#4Y","1t-1B":1,21:\'6Z "4W"\',"21-4f":\'"4W"\',"21-3v":"16",2z:0,1b:0,1B:1,1d:"4g,0",r:0,2X:0,27:0,2e:0,2A:"1 1",1f:"#1M","1f-2O":"","1f-41":"3i","1f-4h":"3i","1f-4i":0,"1f-1B":1,"1f-17":1,2N:"0 0",17:0,x:0,y:0},3K={1u:"1L",1w:"1L",1t:"3U","1t-1B":"1L","21-3v":"1L",1b:"1L",1B:"1L",1d:"1d",r:"1L",2X:"1L",27:"1L",2e:"1L",2A:"42",1f:"3U","1f-1B":"1L","1f-17":"1L",2N:"42",17:"1L",x:"1L",y:"1L"},C={};K(n=="3o"){J u=O(i,j,l){J g=1h.1D("1y:2a"),38=g.1r;38.2w="2C";38.1Z=0;38.1C=0;38.17=l.17+"1H";38.1b=l.1b+"1H";J m=1h.1D("1y:2J"),3k=m.1r;3k.17=l.17+"1H";3k.1b=l.1b+"1H";m.1d="";K(i["4F"]){m.6b=i["4F"]}m.3m=9.3m;m.3A=9.3A;g.1j(m);l.1i.1j(g);J p=1G A(m,g,l);p.18=1W;p.1n="1d";p.1d=[];p.13={x:0,y:0,1S:0,1Q:0,18:1W};p.2D="";p.3h=O(){9.18=1W;11 9};p.3W=O(){9.18=31;11 9};p.2F=O(x,y){J d=9.18?"m":"t";d+=15.1c(19(x,10))+" "+15.1c(19(y,10));9.1T.1d=9.2D+=d;9.13.x=(9.18?0:9.13.x)+19(x,10);9.13.y=(9.18?0:9.13.y)+19(y,10);9.13.18=9.18;9.N.1d+=(9.18?"M":"m")+[x,y];11 9};p.1K=O(x,y){J d=9.18?"l":"r";d+=15.1c(19(x,10))+" "+15.1c(19(y,10));9[0].1d=9.2D+=d;9.13.x=(9.18?0:9.13.x)+19(x,10);9.13.y=(9.18?0:9.13.y)+19(y,10);9.13.18=9.18;9.N.1d+=(9.18?"L":"l")+[x,y];11 9};p.4e=O(a,b,c,e,f,g){f=(9.18?0:9.13.x)+f;g=(9.18?0:9.13.y)+g;J h=9.13.x,3p=9.13.y,x=(h-f)/2,y=(3p-g)/2,k=(c==e?-1:1)*15.5y(15.49(a*a*b*b-a*a*y*y-b*b*x*x)/(a*a*y*y+b*b*x*x)),1u=k*a*y/b+(h+f)/2,1w=k*-b*x/a+(3p+g)/2,d=e?(9.18?"5w":"5v"):(9.18?"5u":"5t"),1Z=15.1c(1u-a),1C=15.1c(1w-b);d+=[1Z,1C,15.1c(1Z+a*2),15.1c(1C+b*2),15.1c(h),15.1c(3p),15.1c(19(f,10)),15.1c(19(g,10))].1z(", ");9.1T.1d=9.2D+=d;9.13.x=(9.18?0:9.13.x)+19(f,10);9.13.y=(9.18?0:9.13.y)+19(g,10);9.13.18=9.18;9.N.1d+=(9.18?"A":"a")+[a,b,0,c,e,f,g];11 9};p.5d=O(a,b,c){K(!c){11 9.1K(a,b)}1k{J x=15.1c(15.1c(19(a,10)*2l)/2l),y=15.1c(15.1c(19(b,10)*2l)/2l),w=15.1c(15.1c(19(c,10)*2l)/2l),d=9.18?"c":"v",1p=[15.1c(9.13.x)+w,15.1c(9.13.y),x-w,y,x,y],5e=[9.13.x+c,9.13.y,a-c,b,a,b];d+=1p.1z(" ")+" ";9.13.x=(9.18?0:9.13.x)+1p[4];9.13.y=(9.18?0:9.13.y)+1p[5];9.13.1S=1p[2];9.13.1Q=1p[3];9.1T.1d=9.2D+=d;9.N.1d+=(9.18?"C":"c")+5e;11 9}};p.1J=O(){J d=9.18?"c":"v";K(P.14==6){9.13.1S=(9.18?0:9.13.x)+19(P[2],10);9.13.1Q=(9.18?0:9.13.y)+19(P[3],10);9.13.x=(9.18?0:9.13.x)+19(P[4],10);9.13.y=(9.18?0:9.13.y)+19(P[5],10);d+=[15.1c(19(P[0],10)),15.1c(19(P[1],10)),15.1c(19(P[2],10)),15.1c(19(P[3],10)),15.1c(19(P[4],10)),15.1c(19(P[5],10))].1z(" ")+" ";9.13.18=9.18;9.N.1d+=(9.18?"C":"c")+3g.1v.2s.2Z(P,0,P.14)}K(P.14==4){J a=9.13.x*2-9.13.1S;J b=9.13.y*2-9.13.1Q;9.13.1S=(9.18?0:9.13.x)+19(P[0],10);9.13.1Q=(9.18?0:9.13.y)+19(P[1],10);9.13.x=(9.18?0:9.13.x)+19(P[2],10);9.13.y=(9.18?0:9.13.y)+19(P[3],10);d+=[15.1c(a),15.1c(b),15.1c(19(P[0],10)),15.1c(19(P[1],10)),15.1c(19(P[2],10)),15.1c(19(P[3],10))].1z(" ")+" ";9.N.1d+=(9.18?"S":"s")+3g.1v.2s.2Z(P,0,P.14)}9.1T.1d=9.2D+=d;11 9};p.3M=O(){J d="5x";K(P.14==4){9.13.3b=(9.18?0:9.13.x)+19(P[0],10);9.13.3a=(9.18?0:9.13.y)+19(P[1],10);9.13.x=(9.18?0:9.13.x)+19(P[2],10);9.13.y=(9.18?0:9.13.y)+19(P[3],10);d+=[15.1c(9.13.3b),15.1c(9.13.3a),15.1c(9.13.x),15.1c(9.13.y)].1z(" ")+" ";9.13.18=9.18;9.N.1d+=(9.18?"Q":"q")+3g.1v.2s.2Z(P,0,P.14)}K(P.14==2){9.13.3b=9.13.x*2-9.13.3b;9.13.3a=9.13.y*2-9.13.3a;9.13.x=(9.18?0:9.13.x)+19(P[2],10);9.13.y=(9.18?0:9.13.y)+19(P[3],10);d+=[15.1c(9.13.3b),15.1c(9.13.3a),15.1c(9.13.x),15.1c(9.13.y)].1z(" ")+" ";9.N.1d+=(9.18?"T":"t")+3g.1v.2s.2Z(P,0,P.14)}9.1T.1d=9.2D+=d;9.1d.2f({1n:"5A",5B:[].5G.2Z(P,0),5H:9.18});11 9};p.35=O(r,a){J R=.4V*r,2q=9.18,o=9;K(2q){9.3W();2q=O(){o.3h()}}1k{2q=O(){}}J b={l:O(){11{u:O(){o.1J(-R,0,-r,-(r-R),-r,-r)},d:O(){o.1J(-R,0,-r,r-R,-r,r)}}},r:O(){11{u:O(){o.1J(R,0,r,-(r-R),r,-r)},d:O(){o.1J(R,0,r,r-R,r,r)}}},u:O(){11{r:O(){o.1J(0,-R,-(R-r),-r,r,-r)},l:O(){o.1J(0,-R,R-r,-r,-r,-r)}}},d:O(){11{r:O(){o.1J(0,R,-(R-r),r,r,r)},l:O(){o.1J(0,R,R-r,r,-r,r)}}}};b[a.3J(0)]()[a.3J(1)]();2q();11 o};p.3x=O(){9.1T.1d=(9.2D+="x e");9.N.1d+="z";11 9};K(1q j=="26"){p.3h();p.N.1d="";C.3q(p,j)}p.2E();v(p,i);K(i.2z){z(p,i.2z)}11 p};J v=O(o,a){J s=o[0].1r;o.N=o.N||{};1l(J b 1A a){o.N[b]=a[b]}K(a.1d&&o.1n=="1d"){o.2D="";o.1d=[];C.3q(o,a.1d)}K(a.2X!=5Q){o.1V.1r.2X=a.2X}K(a.2N){J c=a.2N.2u(/[, ]+/);o.2T(c[0],c[1])}K(a.2A){J c=a.2A.2u(/[, ]+/);o.2A(c[0],c[1])}a["21-4f"]&&(s.5U=a["21-4f"]);a["21-3v"]&&(s.5V=a["21-3v"]);a["21"]&&(s.21=a["21"]);a["21-43"]&&(s.5Z=a["21-43"]);K(1q a.1B!="1N"||1q a["1f-17"]!="1N"||1q a.1t!="1N"||1q a.1f!="1N"){o=o.2J||o[0];J d=(o.3w("1t")&&o.3w("1t")[0])||1h.1D("1y:1t");K("1t-1B"1A a||"1B"1A a){d.1B=((a["1t-1B"]+1||2)-1)*((a.1B+1||2)-1)}K(a.1t){d.2t=1W}K(d.2t==1N||a.1t=="22"){d.2t=31}K(d.2t&&a.1t){J e=a.1t.4s(/^3j\\(([^\\)]+)\\)$/i);K(e){d.3X=e[1];d.1n="62"}1k{d.2m=a.1t;d.3X="";d.1n="64"}}o.1j(d);J f=(o.3w("1f")&&o.3w("1f")[0])||1h.1D("1y:1f");K((a.1f&&a.1f!="22")||a["1f-17"]||a["1f-1B"]||a["1f-2O"]){f.2t=1W}K(a.1f=="22"||1q f.2t=="1N"){f.2t=31}K(f.2t&&a.1f){f.2m=a.1f}f.1B=((a["1f-1B"]+1||2)-1)*((a.1B+1||2)-1);a["1f-4h"]&&(f.65=a["1f-4h"]||"4E");f.4i=a["1f-4i"]||8;a["1f-41"]&&(f.6g={3i:"6h",4n:"4n",1c:"1c"}[a["1f-41"]]||"4E");a["1f-17"]&&(f.43=(19(a["1f-17"],10)||1)*12/16);K(a["1f-2O"]){J g={"-":"6i",".":"6y","-.":"6z","-..":"6B",". ":"6C","- ":"6D","--":"6F","- .":"6G","--.":"6H","--..":"6J"};f.6R=g[a["1f-2O"]]||""}o.1j(f)}};J z=O(o,a){o.N=o.N||{};o.N.2z=a;o=o.2J||o[0];J b=o.3w("1t");K(b.14){b=b[0]}1k{b=1h.1D("1y:1t")}K(a.1I.14){b.2t=1W;b.6Y="22";b.1n=(a.1n.2W()=="74")?"2z":"76";K(1q a.1I[0].2m!="1N"){b.2m=a.1I[0].2m||"#1M"}K(1q a.1I[a.1I.14-1].2m!="1N"){b.77=a.1I[a.1I.14-1].2m||"#1M"}J c=[];1l(J i=0,1o=a.1I.14;i<1o;i++){K(a.1I[i].3y){c.2f(a.1I[i].3y+" "+a.1I[i].2m)}};J d=a.1I[0].1B||1;J e=a.1I[a.1I.14-1].1B||1;K(c){b.7d.7e=c.1z(",");e+=d;d=e-d;e-=d}b.1a("1B",d);b.1a("7h",e);K(a.2k){J f=15.1c(15.7i((19(a.2k[3],10)-19(a.2k[1],10))/(19(a.2k[2],10)-19(a.2k[0],10)))*57.29)||0;b.7g=7a-f}K(a.1n.2W()=="78"){b.72="2l%";b.6X="0.5 0.5"}}};J A=O(a,b,c){J d=0,6c=0,63=0,60=1;9[0]=a;9.1T=a;9.X=0;9.Y=0;9.N={};9.1V=b;9.23=c;9.1m={34:0,2S:0,2j:0,2y:1,2I:1}};A.1v.3N=O(a,b){K(a==1N){11 9.1m.2j}K(b){9.1m.2j=a}1k{9.1m.2j+=a}9.1V.1r.2X=9.1m.2j;11 9};A.1v.2E=O(a){J b=9.1V.1r,2G=9[0].1r;1l(J i 1A a){9.N[i]=a[i]}J c=9.N,x,y,w,h;2d(9.1n){1e"32":x=c.1u-c.r;y=c.1w-c.r;w=h=c.r*2;1g;1e"2R":x=c.1u-c.27;y=c.1w-c.2e;w=c.27*2;h=c.2e*2;1g;1e"2g":1e"2x":x=c.x;y=c.y;w=c.17||0;h=c.1b||0;1g;1e"2c":9.4j.v=["m",15.1c(c.x),", ",15.1c(c.y-2),"l",15.1c(c.x)+1,", ",15.1c(c.y-2)].1z("");11;1e"1d":J d=1s.3E(9.N.1d),x=d.x;y=d.y;w=d.17;h=d.1b;1g;2M:x=0;y=0;w=9.23.17;h=9.23.1b;1g}K(9.1n=="1d"){J e=15.1c(9.23.17/2-w/2-x),1C=15.1c(9.23.1b/2-h/2-y);b.1Z=-e+"1H";b.1C=-1C+"1H";9.X=e;9.Y=1C;9.W=w;9.H=h;2G.1C=1C+"1H";2G.1Z=e+"1H"}1k{J e=9.23.17/2-w/2,1C=9.23.1b/2-h/2;b.2w="2C";b.1Z=x-e+"1H";b.1C=y-1C+"1H";9.X=x-e;9.Y=y-1C;9.W=w;9.H=h;b.17=9.23.17+"1H";b.1b=9.23.1b+"1H";2G.2w="2C";2G.1C=1C+"1H";2G.1Z=e+"1H";2G.17=w+"1H";2G.1b=h+"1H"}};A.1v.4z=O(){9.1V.1r.3F="22";11 9};A.1v.4A=O(){9.1V.1r.3F="4B";11 9};A.1v.2T=O(x,y){K(x==1N&&y==1N){11{x:9.1m.34,y:9.1m.2S}}9.1m.34+=+x;9.1m.2S+=+y;K(9.1n=="1d"){J a=9.N.1d;a=1s.3u(a);a[0][1]+=+x;a[0][2]+=+y;9.1p({1d:a.1z(" ")})}9.2E({x:9.1m.34,y:9.1m.2S});11 9};A.1v.3t=O(){11{x:9.X,y:9.Y,17:9.W,1b:9.H}};A.1v.3s=O(){9[0].1O.2v(9[0]);9.1V.1O.2v(9.1V);9.2J&&9.2J.1O.2v(9.2J)};A.1v.1p=O(){K(P.14==1&&1q P[0]=="26"){11 9.N[P[0]]}K(9.N&&P.14==1&&P[0]4G 3g){J a={};1l(J i=0,1o=P[0].14;i<1o;i++){a[P[0][i]]=9.N[P[0][i]]};11 a}K(9[0].5T.2W()=="2a"){J b=9[0].3n;9.N=9.N||{};K(P.14==2){9.N[P[0]]=P[1]}1k K(P.14==1||1q P[0]=="2Q"){1l(J j 1A P[0]){9.N[j]=P[0][j]}}1l(J i=0,1o=b.14;i<1o;i++){9.1p.2B(1G 5S(b[i],9[0],9.23),P)}}1k{J c;K(P.14==2){c={};c[P[0]]=P[1]}K(P.14==1&&1q P[0]=="2Q"){c=P[0]}K(c){v(9,c);9.2E(c);K(c.2z){z(9,c.2z)}K(c.2c&&9.1n=="2c"){9[0].26=c.2c}K(c.2H){9[0].2H=c.2H}}}11 9};A.1v.4K=O(){9.1V.1O.1j(9.1V);11 9};A.1v.4L=O(){K(9.1V.1O.2i!=9.1V){9.1V.1O.3H(9.1V,9.1V.1O.2i)}11 9};J B=O(a,x,y,r){J g=1h.1D("1y:2a");J o=1h.1D("1y:4N");g.1j(o);a.1i.1j(g);J b=1G A(o,g,a);v(b,{1f:"#1M",1t:"22"});b.2E({x:x-r,y:y-r,17:r*2,1b:r*2});b.N.1u=x;b.N.1w=y;b.N.r=r;b.1n="32";11 b};J D=O(a,x,y,w,h,r){J g=1h.1D("1y:2a");J o=1h.1D(r?"1y:5O":"1y:2g");K(r){o.5N=r/(15.30(w,h))}g.1j(o);a.1i.1j(g);J b=1G A(o,g,a);v(b,{1f:"#1M"});b.2E({x:x,y:y,17:w,1b:h});b.N.x=x;b.N.y=y;b.N.w=w;b.N.h=h;b.N.r=r;b.1n="2g";11 b};J E=O(a,x,y,b,c){J g=1h.1D("1y:2a");J o=1h.1D("1y:4N");g.1j(o);a.1i.1j(g);J d=1G A(o,g,a);v(d,{1f:"#1M"});d.2E({x:x-b,y:y-c,17:b*2,1b:c*2});d.N.1u=x;d.N.1w=y;d.N.27=b;d.N.2e=c;d.1n="2R";11 d};J F=O(a,b,x,y,w,h){J g=1h.1D("1y:2a");J o=1h.1D("1y:2x");o.3X=b;g.1j(o);a.1i.1j(g);J c=1G A(o,g,a);c.1n="2x";c.2E({x:x,y:y,17:w,1b:h});c.N.x=x;c.N.y=y;c.N.w=w;c.N.h=h;11 c};J G=O(a,x,y,b){J g=1h.1D("1y:2a"),39=g.1r;J c=1h.1D("1y:2J"),3k=c.1r;J d=1h.1D("1y:1d"),5K=d.1r;d.v=["m",15.1c(x),", ",15.1c(y-2),"l",15.1c(x)+1,", ",15.1c(y-2)].1z("");d.5I=1W;3k.17=a.17;3k.1b=a.1b;39.2w="2C";39.1Z=0;39.1C=0;39.17=a.17;39.1b=a.1b;J o=1h.1D("1y:4j");o.26=b;o.2t=1W;o.3m=a.3m;o.3A=a.3A;c.1j(o);c.1j(d);g.1j(c);a.1i.1j(g);J e=1G A(o,g,a);e.2J=c;e.4j=d;e.1n="2c";e.N.x=x;e.N.y=y;e.N.w=1;e.N.h=1;v(e,{1f:"22",1t:"#1M"});11 e};J H=O(a){J b=1h.1D("1y:2a"),36=b.1r;36.2w="2C";36.1Z=0;36.1C=0;36.17=a.17;36.1b=a.1b;K(a.1i){a.1i.1j(b)}J c=1G A(b,b,a);1l(J f 1A a){K(f.3J(0)!="1m"&&1q a[f]=="O"){c[f]=(O(f){11 O(){J e=a[f].2B(a,P);b.1j(e[0].1O);11 e}})(f)}}c.1n="2a";11 c};r.48=O(){J d,17,1b;K(1q P[0]=="26"){d=1h.4X(P[0]);17=P[1];1b=P[2]}K(1q P[0]=="2Q"){d=P[0];17=P[1];1b=P[2]}K(1q P[0]=="1L"){d=1;x=P[0];y=P[1];17=P[2];1b=P[3]}K(!d){52 1G 54("3o 56 58 5a.");}K(!1h.5b["1y"]){1h.5b.5s("1y","5r:5f-5l-5g:23");1h.5h().5i("1y\\\\:*","5j:3j(#2M#3o)")}J c=1h.1D("5k"),r=C.1i=1h.1D("1y:2a"),2o=c.1r,3D=r.1r;C.17=17;C.1b=1b;17=17||"5m";1b=1b||"5n";2o.5o="2g(0 "+17+" "+1b+" 0)";2o.2w="2C";3D.17=17;3D.1b=1b;r.3m=(17=="2l%"?17:19(17))+" "+(1b=="2l%"?1b:19(1b));r.3A="0 0";J b=1h.1D("1y:2g"),3C=b.1r;3C.1Z=3C.1C=0;3C.17=3D.17;3C.1b=3D.1b;b.5p=b.5q="f";r.1j(b);c.1j(r);K(d==1){1h.3V.1j(c);2o.2w="2C";2o.1Z=x+"1H";2o.1C=y+"1H";2o.17=17;2o.1b=1b;d={1r:{17:17,1b:1b}}}1k{2o.17=d.1r.17=17;2o.1b=d.1r.1b=1b;K(d.2i){d.3H(c,d.2i)}1k{d.1j(c)}}1l(J e 1A C){d[e]=C[e]}d.45=O(){J a=[];1l(J i=0,1o=r.3n.14;i<1o;i++){K(r.3n[i]!=b){a.2f(r.3n[i])}}1l(i=0,1o=a.14;i<1o;i++){r.2v(a[i])}};11 d};C.3s=O(){C.1i.1O.1O.2v(C.1i.1O)}}K(n=="3d"){J u=O(g,h,j){J k=1h.25(j.1Y,"1d");k.1a("1t","22");K(j.1i){j.1i.1j(k)}J p=1G A(k,j);p.18=1W;p.1n="1d";p.13={x:0,y:0,1S:0,1Q:0};p.3h=O(){9.18=1W;11 9};p.3W=O(){9.18=31;11 9};p.2F=O(x,y){J d=9.18?"M":"m";d+=19(x,10).1P(3)+" "+19(y,10).1P(3)+" ";J a=9[0].2P("d")||"";(a=="4g,0")&&(a="");9[0].1a("d",a+d);9.13.x=(9.18?0:9.13.x)+19(x,10);9.13.y=(9.18?0:9.13.y)+19(y,10);9.N.1d=a+d;11 9};p.1K=O(x,y){9.13.x=(9.18?0:9.13.x)+19(x,10);9.13.y=(9.18?0:9.13.y)+19(y,10);J d=9.18?"L":"l";d+=19(x,10).1P(3)+" "+19(y,10).1P(3)+" ";J a=9[0].2P("d")||"";9[0].1a("d",a+d);9.N.1d=a+d;11 9};p.4e=O(a,b,c,e,x,y){J d=9.18?"A":"a";d+=[19(a,10).1P(3),19(b,10).1P(3),0,c,e,19(x,10).1P(3),19(y,10).1P(3)].1z(" ");J f=9[0].2P("d")||"";9[0].1a("d",f+d);9.13.x=19(x,10);9.13.y=19(y,10);9.N.1d=f+d;11 9};p.5d=O(a,b,c){K(!c){11 9.1K(a,b)}1k{J p={};J x=19(a,10);J y=19(b,10);J w=19(c,10);J d=9.18?"C":"c";J e=[+9.13.x+w,+9.13.y,x-w,y,x,y];1l(J i=0,1o=e.14;i<1o;i++){d+=e[i].1P(3)+" "}9.13.x=(9.18?0:9.13.x)+e[4];9.13.y=(9.18?0:9.13.y)+e[5];9.13.1S=e[2];9.13.1Q=e[3];J f=9[0].2P("d")||"";9[0].1a("d",f+d);9.N.1d=f+d;11 9}};p.1J=O(){J p={},3Y=[0,1,2,3,"s",5,"c"];J d=3Y[P.14];K(9.18){d=d.33()}1l(J i=0,1o=P.14;i<1o;i++){d+=19(P[i],10).1P(3)+" "}9.13.x=(9.18?0:9.13.x)+19(P[P.14-2],10);9.13.y=(9.18?0:9.13.y)+19(P[P.14-1],10);9.13.1S=19(P[P.14-4],10);9.13.1Q=19(P[P.14-3],10);J a=9.1T.2P("d")||"";9.1T.1a("d",a+d);9.N.1d=a+d;11 9};p.3M=O(){J p={},3Y=[0,1,"t",3,"q"];J d=3Y[P.14];K(9.18){d=d.33()}1l(J i=0,1o=P.14;i<1o;i++){d+=19(P[i],10).1P(3)+" "}9.13.x=(9.18?0:9.13.x)+19(P[P.14-2],10);9.13.y=(9.18?0:9.13.y)+19(P[P.14-1],10);K(P.14!=2){9.13.3b=19(P[P.14-4],10);9.13.3a=19(P[P.14-3],10)}J a=9.1T.2P("d")||"";9.1T.1a("d",a+d);9.N.1d=a+d;11 9};p.35=O(r,a){J R=.4V*r,2q=9.18,o=9;K(2q){9.3W();2q=O(){o.3h()}}1k{2q=O(){}}J b={l:O(){11{u:O(){o.1J(-R,0,-r,-(r-R),-r,-r)},d:O(){o.1J(-R,0,-r,r-R,-r,r)}}},r:O(){11{u:O(){o.1J(R,0,r,-(r-R),r,-r)},d:O(){o.1J(R,0,r,r-R,r,r)}}},u:O(){11{r:O(){o.1J(0,-R,-(R-r),-r,r,-r)},l:O(){o.1J(0,-R,R-r,-r,-r,-r)}}},d:O(){11{r:O(){o.1J(0,R,-(R-r),r,r,r)},l:O(){o.1J(0,R,R-r,r,-r,r)}}}};b[a[0]]()[a[1]]();2q();11 o};p.3x=O(){J a=9[0].2P("d")||"";9[0].1a("d",a+"Z ");9.N.1d=a+"Z ";11 9};K(1q h=="26"){p.N.1d=h;p.3h();C.3q(p,h)}K(g){v(p,g)}11 p};J z=O(o,a,b){J c=1h.25(b.1Y,a.1n+"5z");c.2H="51-2z-"+b.4a++;K(a.2k&&a.2k.14){c.1a("5C",a.2k[0]);c.1a("3p",a.2k[1]);c.1a("5D",a.2k[2]);c.1a("5E",a.2k[3])}b.3l.1j(c);1l(J i=0,1o=a.1I.14;i<1o;i++){J d=1h.25(b.1Y,"3Z");d.1a("3y",a.1I[i].3y?a.1I[i].3y:(i==0)?"0%":"2l%");d.1a("3Z-2m",a.1I[i].2m||"#4Y");K(1q a.1I[i].1B!="1N"){d.1a("3Z-1B",a.1I[i].1B)}c.1j(d)};o.1a("1t","3j(#"+c.2H+")")};J I=O(o){K(o.3r){J a=o.1T.3t();o.3r.1a("5F","2T("+[a.x,a.y].1z(",")+")")}};J v=O(o,c){J d={"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},4b=O(o,a){a=d[a.2K().2W()];K(a){J b=o.N["1f-17"]||"1",3i={1c:b,4n:b,3i:0}[o.N["1f-41"]]||0,4d=[];1l(J i=0,1o=a.14;i<1o;i++){4d.2f(a[i]*b+((i%2)?1:-1)*3i)}a=4d.1z(",");o[0].1a("1f-2O",a)}};1l(J e 1A c){J f=c[e];o.N[e]=f;2d(e){1e"1d":K(o.1n=="1d"){o[0].1a("d","4g,0");C.3q(o,f)}1e"27":1e"1u":1e"x":o[0].1a(e,f);I(o);1g;1e"2e":1e"1w":1e"y":o[0].1a(e,f);I(o);1g;1e"17":o[0].1a(e,f);1g;1e"1b":o[0].1a(e,f);1g;1e"2z":z(o[0],f,o.2h);1g;1e"1f-17":o[0].1r.5J=f;o[0].1a(e,f);K(o.N["1f-2O"]){4b(o,o.N["1f-2O"])}1g;1e"1f-2O":4b(o,f);1g;1e"2c":K(o.1n=="2c"){o[0].3n.14&&o[0].2v(o[0].2i);o[0].1j(1h.4U(f))}1g;1e"2X":o.3N(f,1W);1g;1e"2N":J g=f.2u(/[, ]+/);o.2T(g[0],g[1]);1g;1e"2A":J g=f.2u(/[, ]+/);o.2A(g[0],g[1]);1g;1e"1t":J h=f.4s(/^3j\\(([^\\)]+)\\)$/i);K(h){J j=1h.25(o.2h.1Y,"3r");J k=1h.25(o.2h.1Y,"2x");j.2H="51-3r-"+o.2h.4a++;j.1a("x",0);j.1a("y",0);j.1a("5L","5M");k.1a("x",0);k.1a("y",0);k.4Q(o.2h.3T,"4P",h[1]);j.1j(k);J l=1h.1D("5P");l.1r.2w="2C";l.1r.1C="-4J";l.1r.1Z="-4J";l.5R=O(){j.1a("17",9.4I);j.1a("1b",9.4H);k.1a("17",9.4I);k.1a("1b",9.4H);1h.3V.2v(9);C.3c()};1h.3V.1j(l);l.3X=h[1];o.2h.3l.1j(j);o[0].1r.1t="3j(#"+j.2H+")";o[0].1a("1t","3j(#"+j.2H+")");o.3r=j;I(o);1g}2M:J m=e.4q(/(\\-.)/g,O(w){11 w.1U(1).33()});o[0].1r[m]=f;o[0].1a(e,f);1g}}};J A=O(a,b){J X=0,Y=0;9[0]=a;9.1T=a;9.2h=b;9.N=9.N||{};9.2n=[];9.1m={34:0,2S:0,2j:{37:0,x:0,y:0},2y:1,2I:1}};A.1v.2T=O(x,y){K(x==1N&&y==1N){11{x:9.1m.34,y:9.1m.2S}}9.1m.34+=+x;9.1m.2S+=+y;2d(9.1n){1e"32":1e"2R":9.1p({1u:9.N.1u+x,1w:9.N.1w+y});1g;1e"2g":1e"2x":1e"2c":9.1p({x:9.N.x+x,y:9.N.y+y});1g;1e"1d":J a=1s.3u(9.N.1d);a[0][1]+=+x;a[0][2]+=+y;9.1p({1d:a.1z(" ")});1g}11 9};A.1v.3N=O(a,b){K(a==1N){11 9.1m.2j.37}J c=9.3t();K(b){9.1m.2j.37=a}1k{9.1m.2j.37+=a}K(9.1m.2j.37){9.2n[0]=("3N("+9.1m.2j.37+" "+(c.x+c.17/2)+" "+(c.y+c.1b/2)+")")}1k{9.2n[0]=""}9[0].1a("4r",9.2n.1z(" "));11 9};A.1v.4z=O(){9[0].1r.3F="22";11 9};A.1v.4A=O(){9[0].1r.3F="4B";11 9};A.1v.3s=O(){9[0].1O.2v(9[0])};A.1v.3t=O(){11 9[0].3t()};A.1v.1p=O(){K(P.14==1&&1q P[0]=="26"){K(P[0]=="2N"){11 9.2T()}11 9.N[P[0]]}K(P.14==1&&P[0]4G 3g){J a={};1l(J j 1A P[0]){a[P[0][j]]=9.N[P[0][j]]}11 a}K(P.14==2){J b={};b[P[0]]=P[1];v(9,b)}1k K(P.14==1&&1q P[0]=="2Q"){v(9,P[0])}11 9};A.1v.4K=O(){9[0].1O.1j(9[0]);11 9};A.1v.4L=O(){K(9[0].1O.2i!=9[0]){9[0].1O.3H(9[0],9[0].1O.2i)}11 9};J B=O(a,x,y,r){J b=1h.25(a.1Y,"32");b.1a("1u",x);b.1a("1w",y);b.1a("r",r);b.1a("1t","22");b.1a("1f","#1M");K(a.1i){a.1i.1j(b)}J c=1G A(b,a);c.N=c.N||{};c.N.1u=x;c.N.1w=y;c.N.r=r;c.N.1f="#1M";c.1n="32";11 c};J D=O(a,x,y,w,h,r){J b=1h.25(a.1Y,"2g");b.1a("x",x);b.1a("y",y);b.1a("17",w);b.1a("1b",h);K(r){b.1a("27",r);b.1a("2e",r)}b.1a("1t","22");b.1a("1f","#1M");K(a.1i){a.1i.1j(b)}J c=1G A(b,a);c.N=c.N||{};c.N.x=x;c.N.y=y;c.N.17=w;c.N.1b=h;c.N.1f="#1M";K(r){c.N.27=c.N.2e=r}c.1n="2g";11 c};J E=O(a,x,y,b,c){J d=1h.25(a.1Y,"2R");d.1a("1u",x);d.1a("1w",y);d.1a("27",b);d.1a("2e",c);d.1a("1t","22");d.1a("1f","#1M");K(a.1i){a.1i.1j(d)}J e=1G A(d,a);e.N=e.N||{};e.N.1u=x;e.N.1w=y;e.N.27=b;e.N.2e=c;e.N.1f="#1M";e.1n="2R";11 e};J F=O(a,b,x,y,w,h){J c=1h.25(a.1Y,"2x");c.1a("x",x);c.1a("y",y);c.1a("17",w);c.1a("1b",h);c.1a("5W","22");c.4Q(a.3T,"4P",b);K(a.1i){a.1i.1j(c)}J d=1G A(c,a);d.N=d.N||{};d.N.x=x;d.N.y=y;d.N.17=w;d.N.1b=h;d.1n="2x";11 d};J G=O(a,x,y,b){J c=1h.25(a.1Y,"2c");c.1a("x",x);c.1a("y",y);c.1a("2c-5X","5Y");c.1a("1t","#1M");K(b){c.1j(1h.4U(b))}K(a.1i){a.1i.1j(c)}J d=1G A(c,a);d.N=d.N||{};d.N.x=x;d.N.y=y;d.N.1t="#1M";d.1n="2c";11 d};J H=O(a){J b=1h.25(a.1Y,"g");K(a.1i){a.1i.1j(b)}J i=1G A(b,a);1l(J f 1A a){K(f[0]!="1m"&&1q a[f]=="O"){i[f]=(O(f){11 O(){J e=a[f].2B(a,P);b.1j(e[0]);11 e}})(f)}}i.1n="2a";11 i};r.48=O(){K(1q P[0]=="26"){J a=1h.4X(P[0]);J b=P[1];J c=P[2]}K(1q P[0]=="2Q"){J a=P[0];J b=P[1];J c=P[2]}K(1q P[0]=="1L"){J a=1,x=P[0],y=P[1],b=P[2],c=P[3]}K(!a){52 1G 54("3d 56 58 5a.");}C.1i=1h.25(C.1Y,"2h");C.1i.1a("17",b||4D);C.17=b||4D;C.1i.1a("1b",c||4C);C.1b=c||4C;K(a==1){1h.3V.1j(C.1i);C.1i.1r.2w="2C";C.1i.1r.1Z=x+"1H";C.1i.1r.1C=y+"1H"}1k{K(a.2i){a.3H(C.1i,a.2i)}1k{a.1j(C.1i)}}a={1i:C.1i,45:O(){4v(9.1i.2i){9.1i.2v(9.1i.2i)}9.3l=1h.25(C.1Y,"3l");9.4a=0;9.1i.1j(9.3l)}};1l(J d 1A C){K(d!="61"){a[d]=C[d]}}a.45();11 a};C.3s=O(){C.1i.1O.2v(C.1i)};C.1Y="4u://4w.4x.4y/66/2h";C.3T="4u://4w.4x.4y/67/3T"}K(n=="3o"||n=="3d"){C.32=O(x,y,r){11 B(9,x,y,r)};C.2g=O(x,y,w,h,r){11 D(9,x,y,w,h,r)};C.2R=O(x,y,a,b){11 E(9,x,y,a,b)};C.1d=O(a,b){11 u(a,b,9)};C.2x=O(a,x,y,w,h){11 F(9,a,x,y,w,h)};C.2c=O(x,y,a){11 G(9,x,y,a)};C.2a=O(){11 H(9)};C.68=O(x,y,w,h,r){K(r&&1x(r,10)){11 9.1d({1f:"#1M"}).2F(x+r,y).1K(x+w-r,y).35(r,"69").1K(x+w,y+h-r).35(r,"6a").1K(x+r,y+h).35(r,"6d").1K(x,y+r).35(r,"6e").3x()}11 9.1d({1f:"#1M"}).2F(x,y).1K(x+w,y).1K(x+w,y+h).1K(x,y+h).3x()};C.6f=O(x,y,w,h,a,b,c){c=c||"#1M";J p=9.1d({1f:c,"1f-17":1}).2F(x,y).1K(x+w,y).1K(x+w,y+h).1K(x,y+h).1K(x,y),4p=h/b,4o=w/a;1l(J i=1;i<b;i++){p.2F(x,y+i*4p).1K(x+w,y+i*4p)}1l(J i=1;i<a;i++){p.2F(x+i*4o,y).1K(x+i*4o,y+h)}11 p};C.3c=O(){K(r.1n=="3d"){J a=C.2g(-C.17,-C.1b,C.17*3,C.1b*3).1p({1f:"22"});4m(O(){a.3s()},0)}};A.1v.3Z=O(){3G(9.3f)};A.1v.2A=O(x,y){K(x==1N&&y==1N){11{x:9.1m.2y,y:9.1m.2I}}y=y||x;J a,2V,1u,1w;K(x!=0&&!(x==1&&y==1)){J b=15.1c(x/15.49(x)),2b=15.1c(y/15.49(y)),s=9.1T.1r;a=9.1p("x");2V=9.1p("y");1u=9.1p("1u");1w=9.1p("1w");K(b!=1||2b!=1){K(9.2n){9.2n[2]="2A("+[b,2b]+")";9.1T.1a("4r",9.2n.1z(" "));a=(b<0)?-9.1p("x")-9.N.17*x*b/9.1m.2y:9.1p("x");2V=(2b<0)?-9.1p("y")-9.N.1b*y*2b/9.1m.2I:9.1p("y");1u=9.1p("1u")*b;1w=9.1p("1w")*2b}1k{s.4M="6j:6k.6l.6m(6n="+b+", 6o=0, 6p=0, 6q="+2b+", 6r=0, 6s=0, 6t=\'6u 6v\', 6w=\'6x\')"}}1k{K(9.2n){9.2n[2]="";9.1T.1a("4r",9.2n.1z(" "))}1k{s.4M=""}}2d(9.1n){1e"2g":1e"2x":9.1p({17:9.N.17*x*b/9.1m.2y,1b:9.N.1b*y*2b/9.1m.2I,x:a,y:2V});1g;1e"32":1e"2R":9.1p({27:9.N.27*x*b/9.1m.2y,2e:9.N.2e*y*2b/9.1m.2I,r:9.N.r*x*2b/9.1m.2y,1u:1u,1w:1w});1g;1e"1d":J c=1s.3u(1s.2Y(9.1p("1d"))),4l=1W,2U=1s.3E(9.N.1d),a=-2U.17*(x-1)/2,2V=-2U.1b*(y-1)/2;1l(J i=0,1o=c.14;i<1o;i++){K(c[i][0].33()=="M"&&4l){4O}1k{4l=31}K(c[i][0].33()=="A"){c[i][c[i].14-2]*=x*b;c[i][c[i].14-1]*=y*2b}1k{1l(J j=1,24=c[i].14;j<24;j++){c[i][j]*=(j%2)?x*b/9.1m.2y:y*2b/9.1m.2I}}}J d=1s.3E(c),a=2U.x+2U.17/2-d.x-d.17/2,2V=2U.y+2U.1b/2-d.y-d.1b/2;c=1s.3u(c);c[0][1]+=a;c[0][2]+=2V;9.1p({1d:c.1z(" ")})}}9.1m.2y=x;9.1m.2I=y;11 9};A.1v.6A=O(c,d,e){3G(9.3f);J f={},2L={},1R={},t={x:0,y:0};1l(J g 1A c){K(g 1A 3K){f[g]=9.1p(g);K(1q f[g]=="1N"){f[g]=q[g]}2L[g]=c[g];2d(3K[g]){1e"1L":1R[g]=(2L[g]-f[g])/d;1g;1e"3U":f[g]=1s.4k(f[g]);J h=1s.4k(2L[g]);1R[g]={r:(h.r-f[g].r)/d,g:(h.g-f[g].g)/d,b:(h.b-f[g].b)/d};1g;1e"1d":J k=1s.4R(f[g],2L[g]);f[g]=k[0];2L[g]=k[1];1R[g]=[];1l(J i=0,1o=f[g].14;i<1o;i++){1R[g][i]=[0];1l(J j=1,24=f[g][i].14;j<24;j++){1R[g][i][j]=(2L[g][i][j]-f[g][i][j])/d}}1g;1e"42":J l=c[g].2u(/[, ]+/);K(g=="2N"){f[g]=[0,0];1R[g]=[l[0]/d,l[1]/d]}1k{f[g]=f[g].2u(/[, ]+/);1R[g]=[(l[0]-f[g][0])/d,(l[1]-f[g][0])/d]}2L[g]=l}}}J m=1G 3I(),3L=0,28=9;(O(){J a=(1G 3I()).3P()-m.3P(),3R={},1X;K(a<d){1l(J b 1A f){2d(3K[b]){1e"1L":1X=+f[b]+a*1R[b];1g;1e"3U":1X="4t("+[15.1c(f[b].r+a*1R[b].r),15.1c(f[b].g+a*1R[b].g),15.1c(f[b].b+a*1R[b].b)].1z(",")+")";1g;1e"1d":1X=[];1l(J i=0,1o=f[b].14;i<1o;i++){1X[i]=[f[b][i][0]];1l(J j=1,24=f[b][i].14;j<24;j++){1X[i][j]=f[b][i][j]+a*1R[b][i][j]}1X[i]=1X[i].1z(" ")}1X=1X.1z(" ");1g;1e"42":K(b=="2N"){J x=1R[b][0]*(a-3L),y=1R[b][1]*(a-3L);t.x+=x;t.y+=y;1X=[x,y].1z(" ")}1k{1X=[+f[b][0]+a*1R[b][0],+f[b][1]+a*1R[b][1]].1z(" ")}1g}K(b=="21-3v"){3R[b]=1X+"1H"}1k{3R[b]=1X}}28.1p(3R);28.3f=4m(P.3B,0);C.3c()}1k{K(t.x||t.y){28.2T(-t.x,-t.y)}28.1p(c);3G(28.3f);C.3c();(1q e=="O")&&e.2Z(28)}3L=a})();11 9};A.1v.6E=O(x,y,d,e){3G(9.3f);K("1u"1A 9.N||"x"1A 9.N){J f=("1u"1A 9.N),X=9.N.1u||9.N.x,Y=9.N.1w||9.N.y;K(x==X&&y==Y){11 9}J g=y-Y,4S=x-X;J h=1G 3I(),28=9;(O(){J a=(1G 3I()).3P()-h.3P();K(a<d){J b=X+a*4S/d;J c=Y+a*g/d;28.1p(f?{1u:b,1w:c}:{x:b,y:c});28.3f=4m(P.3B,1);C.3c()}1k{28.1p(f?{1u:x,1w:y}:{x:x,y:y});C.3c();e&&e.2Z(28)}})()}11 9};C.3q=O(p,g){J h={M:O(x,y){9.2F(x,y)},C:O(a,b,c,d,e,f){9.1J(a,b,c,d,e,f)},Q:O(a,b,c,d){9.3M(a,b,c,d)},T:O(x,y){9.3M(x,y)},S:O(a,b,c,d){p.1J(a,b,c,d)},L:O(x,y){p.1K(x,y)},H:O(x){9.1K(x,9.13.y)},V:O(y){9.1K(9.13.x,y)},A:O(a,b,c,d,e,x,y){9.4e(a,b,d,e,x,y)},Z:O(){9.3x()}};g=1s.3z(g);1l(J i=0,1o=g.14;i<1o;i++){J b=g[i].6I();h[b].2B(p,g[i])}};11 r}1k{11 O(){}}})((!4T.6K)?"3o":"3d");1s.23=!(1s.2h=(1s.1n=="3d"));K(1s.23&&4T.6L){1s.1n="6M 6N";1s.23=1s.2h=31}1s.2K=O(){11"6O 6P 6Q "+9.1n+".\\6S 6T 6U "+6V("6W%70%20")+9.59};1s.3S=O(a,c,d){K(1q a=="2Q"&&"h"1A a&&"s"1A a&&"b"1A a){d=a.b;c=a.s;a=a.h}J e,1E,1F;K(d==0){11{r:0,g:0,b:0,3Q:"#1M"}}1k{J i=15.71(a*6),f=(a*6)-i,p=d*(1-c),q=d*(1-(c*f)),t=d*(1-(c*(1-f)));[O(){e=d;1E=t;1F=p},O(){e=q;1E=d;1F=p},O(){e=p;1E=d;1F=t},O(){e=p;1E=q;1F=d},O(){e=t;1E=p;1F=d},O(){e=d;1E=p;1F=q},O(){e=d;1E=t;1F=p}][i]()}J h={r:e,g:1E,b:1F};e*=3e;1E*=3e;1F*=3e;J r=15.1c(e).2K(16);K(r.14==1){r="0"+r}J g=15.1c(1E).2K(16);K(g.14==1){g="0"+g}J b=15.1c(1F).2K(16);K(b.14==1){b="0"+b}h.3Q="#"+r+g+b;11 h};1s.73=O(a,b,c){K(1q a=="2Q"&&"r"1A a&&"g"1A a&&"b"1A a){c=a.b;b=a.g;a=a.r}K(1q a=="26"&&a.3J(0)=="#"){K(a.14==4){c=1x(a.1U(3),16);b=1x(a.1U(2,3),16);a=1x(a.1U(1,2),16)}1k{c=1x(a.1U(5),16);b=1x(a.1U(3,5),16);a=1x(a.1U(1,3),16)}}K(a>1||b>1||c>1){a/=3e;b/=3e;c/=3e}J d=15.3O(a,b,c),30=15.30(a,b,c),2r,4c,4Z=d;K(30==d){11{h:0,s:0,b:d}}1k{J e=(d-30);4c=e/d;K(a==d){2r=(b-c)/e}1k K(b==d){2r=2+((c-a)/e)}1k{2r=4+((a-b)/e)}2r/=6;K(2r<0){2r+=1}K(2r>1){2r-=1}}11{h:2r,s:4c,b:4Z}};1s.4k=O(a){J c,1E,1F,d=a.4s(/^\\s*((#[a-f\\d]{6})|(#[a-f\\d]{3})|4t\\(\\s*(\\d+,\\s*\\d+,\\s*\\d+)\\s*\\)|4t\\(\\s*(\\d+%,\\s*\\d+%,\\s*\\d+%)\\s*\\)|50\\(\\s*(\\d+,\\s*\\d+,\\s*\\d+)\\s*\\)|50\\(\\s*(\\d+%,\\s*\\d+%,\\s*\\d+%)\\s*\\))\\s*$/i);K(d){K(d[2]){1F=1x(d[2].1U(5),16);1E=1x(d[2].1U(3,5),16);c=1x(d[2].1U(1,3),16)}K(d[3]){1F=1x(d[3].1U(3)+d[3].1U(3),16);1E=1x(d[3].1U(2,3)+d[3].1U(2,3),16);c=1x(d[3].1U(1,2)+d[3].1U(1,2),16)}K(d[4]){d=d[4].2u(/\\s*,\\s*/);c=1x(d[0],10);1E=1x(d[1],10);1F=1x(d[2],10)}K(d[5]){d=d[5].2u(/\\s*,\\s*/);c=1x(d[0],10)*2.55;1E=1x(d[1],10)*2.55;1F=1x(d[2],10)*2.55}K(d[6]){d=d[6].2u(/\\s*,\\s*/);c=1x(d[0],10);1E=1x(d[1],10);1F=1x(d[2],10);11 9.3S(c,1E,1F)}K(d[7]){d=d[7].2u(/\\s*,\\s*/);c=1x(d[0],10)*2.55;1E=1x(d[1],10)*2.55;1F=1x(d[2],10)*2.55;11 9.3S(c,1E,1F)}J d={r:c,g:1E,b:1F};J r=15.1c(c).2K(16);(r.14==1)&&(r="0"+r);J g=15.1c(1E).2K(16);(g.14==1)&&(g="0"+g);J b=15.1c(1F).2K(16);(b.14==1)&&(b="0"+b);d.3Q="#"+r+g+b;11 d}};1s.53=O(a){J b=P.3B.2p=P.3B.2p||{h:0,s:1,b:a||.75};J c=9.3S(b.h,b.s,b.b);b.h+=.79;K(b.h>1){b.h=0;b.s-=.2;K(b.s<=0){P.3B.2p={h:0,s:1,b:b.b}}}11 c.3Q};1s.53.7b=O(){9.2p=1N};1s.2Y=O(e){J f={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0};J g=[];e.4q(/([7c])\\s*((-?\\d*\\.?\\d*\\s*,?\\s*)+)/5c,O(a,b,c){J d=[],40=b.2W();c.4q(/(-?\\d*\\.?\\d*)\\s*,?\\s*/5c,O(a,b){b&&d.2f(+b)});4v(d.14>=f[40]){g.2f([b].7f(d.2s(0,f[40])));K(!f[40]){1g}}});11 g};1s.3E=O(a){J b=a;K(1q a=="26"){b=9.2Y(a)}b=9.3z(b);J x=[],y=[],14=0;1l(J i=0,1o=b.14;i<1o;i++){2d(b[i][0]){1e"Z":1g;1e"A":x.2f(b[i][b[i].14-2]);y.2f(b[i][b[i].14-1]);1g;2M:1l(J j=1,24=b[i].14;j<24;j++){K(j%2){x.2f(b[i][j])}1k{y.2f(b[i][j])}}}}J c=15.30.2B(15,x),47=15.30.2B(15,y);11{x:c,y:47,17:15.3O.2B(15,x)-c,1b:15.3O.2B(15,y)-47,X:x,Y:y}};1s.3u=O(a){J b=[];K(1q a=="26"){a=9.2Y(a)}J x=0,y=0,2p=0;K(a[0][0]=="M"){x=a[0][1];y=a[0][2];2p++;b.2f(a[0])}1l(J i=2p,1o=a.14;i<1o;i++){b[i]=[];K(a[i][0]!=a[i][0].2W()){b[i][0]=a[i][0].2W();2d(b[i][0]){1e"a":b[i][1]=a[i][1];b[i][2]=a[i][2];b[i][3]=0;b[i][4]=a[i][4];b[i][5]=a[i][5];b[i][6]=+(a[i][6]-x).1P(3);b[i][7]=+(a[i][7]-y).1P(3);1g;1e"v":b[i][1]=+(a[i][1]-y).1P(3);1g;2M:1l(J j=1,24=a[i].14;j<24;j++){b[i][j]=+(a[i][j]-((j%2)?x:y)).1P(3)}}}1k{b[i]=a[i]}2d(b[i][0]){1e"z":1g;1e"h":x+=b[i][b[i].14-1];1g;1e"v":y+=b[i][b[i].14-1];1g;2M:x+=b[i][b[i].14-2];y+=b[i][b[i].14-1]}}11 b};1s.3z=O(a){J b=[];K(1q a=="26"){a=9.2Y(a)}J x=0,y=0,2p=0;K(a[0][0]=="M"){x=+a[0][1];y=+a[0][2];2p++;b[0]=a[0]}1l(J i=2p,1o=a.14;i<1o;i++){b[i]=[];K(a[i][0]!=a[i][0].33()){b[i][0]=a[i][0].33();2d(b[i][0]){1e"A":b[i][1]=a[i][1];b[i][2]=a[i][2];b[i][3]=0;b[i][4]=a[i][4];b[i][5]=a[i][5];b[i][6]=+(a[i][6]+x).1P(3);b[i][7]=+(a[i][7]+y).1P(3);1g;1e"V":b[i][1]=+a[i][1]+y;1g;2M:1l(J j=1,24=a[i].14;j<24;j++){b[i][j]=+a[i][j]+((j%2)?x:y)}}}1k{b[i]=a[i]}2d(b[i][0]){1e"Z":1g;1e"H":x=b[i][1];1g;1e"V":y=b[i][1];1g;2M:x=b[i][b[i].14-2];y=b[i][b[i].14-1]}}11 b};1s.4R=O(e,f){J g=[9.3z(9.2Y(e)),9.3z(9.2Y(f))],N=[{x:0,y:0,1S:0,1Q:0,X:0,Y:0},{x:0,y:0,1S:0,1Q:0,X:0,Y:0}],46=O(a,d){K(!a){11["U"]}2d(a[0]){1e"M":d.X=a[1];d.Y=a[2];1g;1e"S":J b=d.x+(d.x-(d.1S||d.x));J c=d.y+(d.y-(d.1Q||d.y));a=["C",b,c,a[1],a[2],a[3],a[4]];1g;1e"T":J b=d.x+(d.x-(d.1S||d.x));J c=d.y+(d.y-(d.1Q||d.y));a=["Q",b,c,a[1],a[2]];1g;1e"H":a=["L",a[1],d.y];1g;1e"V":a=["L",d.x,a[1]];1g;1e"Z":a=["L",d.X,d.Y];1g}11 a},44=O(a,b,i){K(g[a][i][0]=="M"&&g[b][i][0]!="M"){g[b].2s(i,0,["M",N[b].x,N[b].y]);N[a].1S=g[a][i][g[a][i].14-4]||0;N[a].1Q=g[a][i][g[a][i].14-3]||0;N[a].x=g[a][i][g[a][i].14-2];N[a].y=g[a][i][g[a][i].14-1];11 1W}1k K(g[a][i][0]=="L"&&g[b][i][0]=="C"){g[a][i]=["C",N[a].x,N[a].y,g[a][i][1],g[a][i][2],g[a][i][1],g[a][i][2]]}1k K(g[a][i][0]=="L"&&g[b][i][0]=="Q"){g[a][i]=["Q",g[a][i][1],g[a][i][2],g[a][i][1],g[a][i][2]]}1k K(g[a][i][0]=="Q"&&g[b][i][0]=="C"){J x=g[b][i][g[b][i].14-2];J y=g[b][i][g[b][i].14-1];g[b].2s(i+1,0,["Q",x,y,x,y]);g[a].2s(i,0,["C",N[a].x,N[a].y,N[a].x,N[a].y,N[a].x,N[a].y]);i++;N[b].1S=g[b][i][g[b][i].14-4]||0;N[b].1Q=g[b][i][g[b][i].14-3]||0;N[b].x=g[b][i][g[b][i].14-2];N[b].y=g[b][i][g[b][i].14-1];11 1W}1k K(g[a][i][0]=="A"&&g[b][i][0]=="C"){J x=g[b][i][g[b][i].14-2];J y=g[b][i][g[b][i].14-1];g[b].2s(i+1,0,["A",0,0,g[a][i][3],g[a][i][4],g[a][i][5],x,y]);g[a].2s(i,0,["C",N[a].x,N[a].y,N[a].x,N[a].y,N[a].x,N[a].y]);i++;N[b].1S=g[b][i][g[b][i].14-4]||0;N[b].1Q=g[b][i][g[b][i].14-3]||0;N[b].x=g[b][i][g[b][i].14-2];N[b].y=g[b][i][g[b][i].14-1];11 1W}1k K(g[a][i][0]=="U"){g[a][i][0]=g[b][i][0];1l(J j=1,24=g[b][i].14;j<24;j++){g[a][i][j]=(j%2)?N[a].x:N[a].y}}11 31};1l(J i=0;i<15.3O(g[0].14,g[1].14);i++){g[0][i]=46(g[0][i],N[0]);g[1][i]=46(g[1][i],N[1]);K(g[0][i][0]!=g[1][i][0]&&(44(0,1,i)||44(1,0,i))){4O}N[0].1S=g[0][i][g[0][i].14-4]||0;N[0].1Q=g[0][i][g[0][i].14-3]||0;N[0].x=g[0][i][g[0][i].14-2];N[0].y=g[0][i][g[0][i].14-1];N[1].1S=g[1][i][g[1][i].14-4]||0;N[1].1Q=g[1][i][g[1][i].14-3]||0;N[1].x=g[1][i][g[1][i].14-2];N[1].y=g[1][i][g[1][i].14-1]}11 g};',62,453,'|||||||||this||||||||||||||||||||||||||||||||||||var|if|||attrs|function|arguments||||||||||||return||last|length|Math||width|isAbsolute|parseFloat|setAttribute|height|round|path|case|stroke|break|document|canvas|appendChild|else|for|_|type|ii|attr|typeof|style|Raphael|fill|cx|prototype|cy|parseInt|rvml|join|in|opacity|top|createElement|green|blue|new|px|dots|curveTo|lineTo|number|000|undefined|parentNode|toFixed|by|diff|bx|node|substring|Group|true|now|svgns|left||font|none|vml|jj|createElementNS|string|rx|that||group|diry|text|switch|ry|push|rect|svg|firstChild|rt|vector|100|color|transformations|cs|start|rollback|hue|splice|on|split|removeChild|position|image|sx|gradient|scale|apply|absolute|Path|setBox|moveTo|os|id|sy|shape|toString|to|default|translation|dasharray|getAttribute|object|ellipse|ty|translate|dim|dy|toLowerCase|rotation|parsePathString|call|min|false|circle|toUpperCase|tx|addRoundedCorner|els|deg|gl|gs|qy|qx|safari|SVG|255|animation_in_progress|Array|absolutely|butt|url|ol|defs|coordsize|childNodes|VML|y1|pathfinder|pattern|remove|getBBox|pathToRelative|size|getElementsByTagName|andClose|offset|pathToAbsolute|coordorigin|callee|bs|rs|pathDimensions|display|clearTimeout|insertBefore|Date|charAt|availableAnimAttrs|prev|qcurveTo|rotate|max|getTime|hex|set|hsb2rgb|xlink|colour|body|relatively|src|command|stop|name|linecap|csv|weight|edgeCases|clear|processPath|miny|_create|abs|gradients|addDashes|saturation|dashes|arcTo|family|M0|linejoin|miterlimit|textpath|getRGB|skip|setTimeout|square|columnWidth|rowHeight|replace|transform|match|rgb|http|while|www|w3|org|hide|show|block|200|320|miter|class|instanceof|offsetHeight|offsetWidth|9999em|toFront|toBack|filter|oval|continue|href|setAttributeNS|pathEqualiser|dx|window|createTextNode|5522|Arial|getElementById|fff|brightness|hsb|raphael|throw|getColor|Error||container||not|version|found|namespaces|ig|cplineTo|svgattr|schemas|com|createStyleSheet|addRule|behavior|div|microsoft|320px|200px|clip|filled|stroked|urn|add|ar|at|wr|wa|qb|sqrt|Gradient|qcurve|arg|x1|x2|y2|patternTransform|slice|pos|textpathok|strokeWidth|ps|patternUnits|userSpaceOnUse|arcsize|roundrect|img|null|onload|item|tagName|fontFamily|fontSize|preserveAspectRatio|anchor|middle|fontWeight|Scale|create|tile|RotY|solid|joinstyle|2000|1999|linerect|rd|dl|className|RotX|lu|ur|drawGrid|endcap|flat|shortdash|progid|DXImageTransform|Microsoft|Matrix|M11|M12|M21|M22|Dx|Dy|sizingmethod|auto|expand|filtertype|bilinear|shortdot|shortdashdot|animate|shortdashdotdot|dot|dash|animateTo|longdash|dashdot|longdashdot|shift|longdashdotdot|SVGAngle|CanvasRenderingContext2D|Canvas|only|Your|browser|supports|dashstyle|nYou|are|running|unescape|Rapha|focusposition|method|16px|EBl|floor|focus|rgb2hsb|linear||gradientTitle|color2|radial|075|270|reset|achlmqstvz|colors|value|concat|angle|opacity2|atan'.split('|'),0,{}))
index 7d48370..ae666cf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Raphael 0.5.12 - JavaScript Vector Library
+ * Raphael 0.6 - JavaScript Vector Library
  *
  * Copyright (c) 2008 Dmitry Baranovskiy (http://raphaeljs.com)
  * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
@@ -8,25 +8,13 @@ var Raphael = (function (type) {
         var r = function () {
             return r._create.apply(r, arguments);
         };
-        r.version = "0.5.12";
+        r.version = "0.6";
         r.type = type;
-        var C = {};
-        function Matrix(m11, m12, m21, m22, dx, dy) {
-            this.m = [
-                [m11 || 1, m12 || 0, 0],
-                [m21 || 0, m22 || 1, 0],
-                [dx || 0, dy || 0, 1]
-            ];
-        }
-
-        C._getX = C._getY = C._getW = C._getH = function (x) { return x; };
+        var availableAttrs = {cx: 0, cy: 0, fill: "#fff", "fill-opacity": 1, font: '16px "Arial"', "font-family": '"Arial"', "font-size": "16", gradient: 0, height: 0, opacity: 1, path: "M0,0", r: 0, rotation: 0, rx: 0, ry: 0, scale: "1 1", stroke: "#000", "stroke-dasharray": "", "stroke-linecap": "butt", "stroke-linejoin": "butt", "stroke-miterlimit": 0, "stroke-opacity": 1, "stroke-width": 1, translation: "0 0", width: 0, x: 0, y: 0},
+            availableAnimAttrs = {cx: "number", cy: "number", fill: "colour", "fill-opacity": "number", "font-size": "number", height: "number", opacity: "number", path: "path", r: "number", rotation: "number", rx: "number", ry: "number", scale: "csv", stroke: "colour", "stroke-opacity": "number", "stroke-width": "number", translation: "csv", width: "number", x: "number", y: "number"},
+            C = {};
 
         if (type == "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 thePath = function (params, pathString, VML) {
                 var g = document.createElement("rvml:group"), gl = g.style;
                 gl.position = "absolute";
@@ -46,10 +34,6 @@ var Raphael = (function (type) {
                 g.appendChild(el);
                 VML.canvas.appendChild(g);
                 var p = new Element(el, g, VML);
-                setFillAndStroke(p, params);
-                if (params.gradient) {
-                    addGrdientFill(p, params.gradient);
-                }
                 p.isAbsolute = true;
                 p.type = "path";
                 p.path = [];
@@ -63,41 +47,24 @@ var Raphael = (function (type) {
                     this.isAbsolute = false;
                     return this;
                 };
-                p.redraw = function () {
-                    this.Path = "";
-                    var oldPath = this.path;
-                    this.path = [];
-                    for (var i = 0, ii = oldPath.length; i < ii; i++) {
-                        if (oldPath[i].type != "end") {
-                            this[oldPath[i].type + "To"].apply(this, oldPath[i].arg);
-                        } else {
-                            this.andClose();
-                        }
-                    }
-                    return this;
-                };
                 p.moveTo = function (x, y) {
                     var d = this.isAbsolute?"m":"t";
-                    var _getX = this.isAbsolute ? VML._getX : VML._getW;
-                    var _getY = this.isAbsolute ? VML._getY : VML._getH;
-                    d += Math.round(_getX(parseFloat(x, 10))) + " " + Math.round(_getY(parseFloat(y, 10)));
-                    this[0].path = this.Path += d;
-                    this.last.x = (this.isAbsolute ? 0 : this.last.x) + _getX(parseFloat(x, 10));
-                    this.last.y = (this.isAbsolute ? 0 : this.last.y) + _getY(parseFloat(y, 10));
+                    d += Math.round(parseFloat(x, 10)) + " " + Math.round(parseFloat(y, 10));
+                    this.node.path = this.Path += d;
+                    this.last.x = (this.isAbsolute ? 0 : this.last.x) + parseFloat(x, 10);
+                    this.last.y = (this.isAbsolute ? 0 : this.last.y) + parseFloat(y, 10);
                     this.last.isAbsolute = this.isAbsolute;
-                    this.path.push({type: "move", arg: [].slice.call(arguments, 0), pos: this.isAbsolute});
+                    this.attrs.path += (this.isAbsolute ? "M" : "m") + [x, y];
                     return this;
                 };
                 p.lineTo = function (x, y) {
                     var d = this.isAbsolute?"l":"r";
-                    var _getX = this.isAbsolute ? VML._getX : VML._getW;
-                    var _getY = this.isAbsolute ? VML._getY : VML._getH;
-                    d += Math.round(_getX(parseFloat(x, 10))) + " " + Math.round(_getY(parseFloat(y, 10)));
+                    d += Math.round(parseFloat(x, 10)) + " " + Math.round(parseFloat(y, 10));
                     this[0].path = this.Path += d;
-                    this.last.x = (this.isAbsolute ? 0 : this.last.x) + _getX(parseFloat(x, 10));
-                    this.last.y = (this.isAbsolute ? 0 : this.last.y) + _getY(parseFloat(y, 10));
+                    this.last.x = (this.isAbsolute ? 0 : this.last.x) + parseFloat(x, 10);
+                    this.last.y = (this.isAbsolute ? 0 : this.last.y) + parseFloat(y, 10);
                     this.last.isAbsolute = this.isAbsolute;
-                    this.path.push({type: "line", arg: [].slice.call(arguments, 0), pos: this.isAbsolute});
+                    this.attrs.path += (this.isAbsolute ? "L" : "l") + [x, y];
                     return this;
                 };
                 p.arcTo = function (rx, ry, large_arc_flag, sweep_flag, x2, y2) {
@@ -110,76 +77,100 @@ var Raphael = (function (type) {
                         x = (x1 - x2) / 2,
                         y = (y1 - y2) / 2,
                         k = (large_arc_flag == sweep_flag ? -1 : 1) *
-                            Math.sqrt((rx * rx * ry * ry - rx * rx * y * y - ry * ry * x * x) / (rx * rx * y * y + ry * ry * x * x)),
+                            Math.sqrt(Math.abs(rx * rx * ry * ry - rx * rx * y * y - ry * ry * x * x) / (rx * rx * y * y + ry * ry * x * x)),
                         cx = k * rx * y / ry + (x1 + x2) / 2,
                         cy = k * -ry * x / rx + (y1 + y2) / 2,
-                        d = sweep_flag ? (this.isAbsolute?"wa":"wr") : (this.isAbsolute?"at":"ar"),
-                        _getX = this.isAbsolute ? VML._getX : VML._getW,
-                        _getY = this.isAbsolute ? VML._getY : VML._getH,
+                        d = sweep_flag ? (this.isAbsolute ? "wa" : "wr") : (this.isAbsolute ? "at" : "ar"),
                         left = Math.round(cx - rx),
                         top = Math.round(cy - ry);
-                    d += [left, top, Math.round(left + rx * 2), Math.round(top + ry * 2), Math.round(x1), Math.round(y1), Math.round(_getX(parseFloat(x2, 10))), Math.round(_getX(parseFloat(y2, 10)))].join(", ");
-                    this[0].path = this.Path += d;
-                    this.last.x = (this.isAbsolute ? 0 : this.last.x) + _getX(parseFloat(x2, 10));
-                    this.last.y = (this.isAbsolute ? 0 : this.last.y) + _getY(parseFloat(y2, 10));
+                    d += [left, top, Math.round(left + rx * 2), Math.round(top + ry * 2), Math.round(x1), Math.round(y1), Math.round(parseFloat(x2, 10)), Math.round(parseFloat(y2, 10))].join(", ");
+                    this.node.path = this.Path += d;
+                    this.last.x = (this.isAbsolute ? 0 : this.last.x) + parseFloat(x2, 10);
+                    this.last.y = (this.isAbsolute ? 0 : this.last.y) + parseFloat(y2, 10);
                     this.last.isAbsolute = this.isAbsolute;
-                    this.path.push({type: "arc", arg: [].slice.call(arguments, 0), pos: this.isAbsolute});
+                    this.attrs.path += (this.isAbsolute ? "A" : "a") + [rx, ry, 0, large_arc_flag, sweep_flag, x2, y2];
                     return this;
                 };
                 p.cplineTo = function (x1, y1, w1) {
                     if (!w1) {
                         return this.lineTo(x1, y1);
                     } else {
-                        var p = {};
-                        p._getX = this.isAbsolute ? VML._getX : VML._getW;
-                        p._getY = this.isAbsolute ? VML._getY : VML._getH;
-                        var x = Math.round(p._getX(Math.round(parseFloat(x1, 10) * 100) / 100));
-                        var y = Math.round(p._getY(Math.round(parseFloat(y1, 10) * 100) / 100));
-                        var w = Math.round(VML._getW(Math.round(parseFloat(w1, 10) * 100) / 100));
-                        var d = this.isAbsolute?"c":"v";
-                        var attr = [Math.round(this.last.x) + w, Math.round(this.last.y), x - w, y, x, y];
+                        var x = Math.round(Math.round(parseFloat(x1, 10) * 100) / 100),
+                            y = Math.round(Math.round(parseFloat(y1, 10) * 100) / 100),
+                            w = Math.round(Math.round(parseFloat(w1, 10) * 100) / 100),
+                            d = this.isAbsolute ? "c" : "v",
+                            attr = [Math.round(this.last.x) + w, Math.round(this.last.y), x - w, y, x, y],
+                            svgattr = [this.last.x + w1, this.last.y, x1 - w1, y1, x1, y1];
                         d += attr.join(" ") + " ";
                         this.last.x = (this.isAbsolute ? 0 : this.last.x) + attr[4];
                         this.last.y = (this.isAbsolute ? 0 : this.last.y) + attr[5];
                         this.last.bx = attr[2];
                         this.last.by = attr[3];
-                        this[0].path = this.Path += d;
-                        this.path.push({type: "cpline", arg: [].slice.call(arguments, 0), pos: this.isAbsolute});
+                        this.node.path = this.Path += d;
+                        this.attrs.path += (this.isAbsolute ? "C" : "c") + svgattr;
                         return this;
                     }
                 };
                 p.curveTo = function () {
-                    var d = this.isAbsolute?"c":"v";
-                    var _getX = this.isAbsolute ? VML._getX : VML._getW;
-                    var _getY = this.isAbsolute ? VML._getY : VML._getH;
+                    var d = this.isAbsolute ? "c" : "v";
                     if (arguments.length == 6) {
-                        this.last.bx = (this.isAbsolute ? 0 : this.last.x) + _getX(parseFloat(arguments[2], 10));
-                        this.last.by = (this.isAbsolute ? 0 : this.last.y) + _getY(parseFloat(arguments[3], 10));
-                        this.last.x = (this.isAbsolute ? 0 : this.last.x) + _getX(parseFloat(arguments[4], 10));
-                        this.last.y = (this.isAbsolute ? 0 : this.last.y) + _getY(parseFloat(arguments[5], 10));
-                        d += Math.round(_getX(parseFloat(arguments[0], 10))) + " " +
-                             Math.round(_getY(parseFloat(arguments[1], 10))) + " " +
-                             Math.round(_getX(parseFloat(arguments[2], 10))) + " " +
-                             Math.round(_getY(parseFloat(arguments[3], 10))) + " " +
-                             Math.round(_getX(parseFloat(arguments[4], 10))) + " " +
-                             Math.round(_getY(parseFloat(arguments[5], 10))) + " ";
+                        this.last.bx = (this.isAbsolute ? 0 : this.last.x) + parseFloat(arguments[2], 10);
+                        this.last.by = (this.isAbsolute ? 0 : this.last.y) + parseFloat(arguments[3], 10);
+                        this.last.x = (this.isAbsolute ? 0 : this.last.x) + parseFloat(arguments[4], 10);
+                        this.last.y = (this.isAbsolute ? 0 : this.last.y) + parseFloat(arguments[5], 10);
+                        d += [Math.round(parseFloat(arguments[0], 10)),
+                             Math.round(parseFloat(arguments[1], 10)),
+                             Math.round(parseFloat(arguments[2], 10)),
+                             Math.round(parseFloat(arguments[3], 10)),
+                             Math.round(parseFloat(arguments[4], 10)),
+                             Math.round(parseFloat(arguments[5], 10))].join(" ") + " ";
                         this.last.isAbsolute = this.isAbsolute;
+                        this.attrs.path += (this.isAbsolute ? "C" : "c") + Array.prototype.splice.call(arguments, 0, arguments.length);
                     }
                     if (arguments.length == 4) {
                         var bx = this.last.x * 2 - this.last.bx;
                         var by = this.last.y * 2 - this.last.by;
-                        this.last.bx = (this.isAbsolute ? 0 : this.last.x) + _getX(parseFloat(arguments[0], 10));
-                        this.last.by = (this.isAbsolute ? 0 : this.last.y) + _getY(parseFloat(arguments[1], 10));
-                        this.last.x = (this.isAbsolute ? 0 : this.last.x) + _getX(parseFloat(arguments[2], 10));
-                        this.last.y = (this.isAbsolute ? 0 : this.last.y) + _getY(parseFloat(arguments[3], 10));
+                        this.last.bx = (this.isAbsolute ? 0 : this.last.x) + parseFloat(arguments[0], 10);
+                        this.last.by = (this.isAbsolute ? 0 : this.last.y) + parseFloat(arguments[1], 10);
+                        this.last.x = (this.isAbsolute ? 0 : this.last.x) + parseFloat(arguments[2], 10);
+                        this.last.y = (this.isAbsolute ? 0 : this.last.y) + parseFloat(arguments[3], 10);
                         d += [Math.round(bx), Math.round(by),
-                             Math.round(_getX(parseFloat(arguments[0], 10))),
-                             Math.round(_getY(parseFloat(arguments[1], 10))),
-                             Math.round(_getX(parseFloat(arguments[2], 10))),
-                             Math.round(_getY(parseFloat(arguments[3], 10)))].join(" ");
+                             Math.round(parseFloat(arguments[0], 10)),
+                             Math.round(parseFloat(arguments[1], 10)),
+                             Math.round(parseFloat(arguments[2], 10)),
+                             Math.round(parseFloat(arguments[3], 10))].join(" ") + " ";
+                         this.attrs.path += (this.isAbsolute ? "S" : "s") + Array.prototype.splice.call(arguments, 0, arguments.length);
                     }
-                    this[0].path = this.Path += d;
-                    this.path.push({type: "curve", arg: [].slice.call(arguments, 0), pos: this.isAbsolute});
+                    this.node.path = this.Path += d;
+                    return this;
+                };
+                p.qcurveTo = function () {
+                    var d = "qb";
+                    if (arguments.length == 4) {
+                        this.last.qx = (this.isAbsolute ? 0 : this.last.x) + parseFloat(arguments[0], 10);
+                        this.last.qy = (this.isAbsolute ? 0 : this.last.y) + parseFloat(arguments[1], 10);
+                        this.last.x = (this.isAbsolute ? 0 : this.last.x) + parseFloat(arguments[2], 10);
+                        this.last.y = (this.isAbsolute ? 0 : this.last.y) + parseFloat(arguments[3], 10);
+                        d += [Math.round(this.last.qx),
+                             Math.round(this.last.qy),
+                             Math.round(this.last.x),
+                             Math.round(this.last.y)].join(" ") + " ";
+                        this.last.isAbsolute = this.isAbsolute;
+                        this.attrs.path += (this.isAbsolute ? "Q" : "q") + Array.prototype.splice.call(arguments, 0, arguments.length);
+                    }
+                    if (arguments.length == 2) {
+                        this.last.qx = this.last.x * 2 - this.last.qx;
+                        this.last.qy = this.last.y * 2 - this.last.qy;
+                        this.last.x = (this.isAbsolute ? 0 : this.last.x) + parseFloat(arguments[2], 10);
+                        this.last.y = (this.isAbsolute ? 0 : this.last.y) + parseFloat(arguments[3], 10);
+                        d += [Math.round(this.last.qx),
+                             Math.round(this.last.qy),
+                             Math.round(this.last.x),
+                             Math.round(this.last.y)].join(" ") + " ";
+                         this.attrs.path += (this.isAbsolute ? "T" : "t") + Array.prototype.splice.call(arguments, 0, arguments.length);
+                    }
+                    this.node.path = this.Path += d;
+                    this.path.push({type: "qcurve", arg: [].slice.call(arguments, 0), pos: this.isAbsolute});
                     return this;
                 };
                 p.addRoundedCorner = function (r, dir) {
@@ -239,13 +230,20 @@ var Raphael = (function (type) {
                     return o;
                 };
                 p.andClose = function () {
-                    this[0].path = (this.Path += "x e");
+                    this.node.path = (this.Path += "x e");
+                    this.attrs.path += "z";
                     return this;
                 };
                 if (typeof pathString == "string") {
                     p.absolutely();
+                    p.attrs.path = "";
                     C.pathfinder(p, pathString);
                 }
+                p.setBox();
+                setFillAndStroke(p, params);
+                if (params.gradient) {
+                    addGrdientFill(p, params.gradient);
+                }
                 return p;
             };
             var setFillAndStroke = function (o, params) {
@@ -254,6 +252,22 @@ var Raphael = (function (type) {
                 for (var par in params) {
                     o.attrs[par] = params[par];
                 }
+                if (params.path && o.type == "path") {
+                    o.Path = "";
+                    o.path = [];
+                    C.pathfinder(o, params.path);
+                }
+                if (params.rotation != null) {
+                    o.Group.style.rotation = params.rotation;
+                }
+                if (params.translation) {
+                    var xy = params.translation.split(/[, ]+/);
+                    o.translate(xy[0], xy[1]);
+                }
+                if (params.scale) {
+                    var xy = params.scale.split(/[, ]+/);
+                    o.scale(xy[0], xy[1]);
+                }
                 params["font-family"] && (s.fontFamily = params["font-family"]);
                 params["font-size"] && (s.fontSize = params["font-size"]);
                 params["font"] && (s.font = params["font"]);
@@ -373,15 +387,26 @@ var Raphael = (function (type) {
                 this.attrs = {};
                 this.Group = group;
                 this.vml = vml;
-                this.rotate = function (deg) {
-                    if (deg == undefined) {
-                        return Rotation;
-                    }
-                    Rotation += deg;
-                    this.Group.style.rotation = Rotation;
-                    return this;
+                this._ = {
+                    tx: 0,
+                    ty: 0,
+                    rt: 0,
+                    sx: 1,
+                    sy: 1
                 };
             };
+            Element.prototype.rotate = function (deg, isAbsolute) {
+                if (deg == undefined) {
+                    return this._.rt;
+                }
+                if (isAbsolute) {
+                    this._.rt = deg;
+                } else {
+                    this._.rt += deg;
+                }
+                this.Group.style.rotation = this._.rt;
+                return this;
+            };
             Element.prototype.setBox = function (params) {
                 var gs = this.Group.style,
                     os = this[0].style;
@@ -405,31 +430,55 @@ var Raphael = (function (type) {
                     case "image":
                         x = attr.x;
                         y = attr.y;
-                        w = attr.w;
-                        h = attr.h;
+                        w = attr.width || 0;
+                        h = attr.height || 0;
                         break;
                     case "text":
                         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;
+                    case "path":
+                        var dim = Raphael.pathDimensions(this.attrs.path),
+                        x = dim.x;
+                        y = dim.y;
+                        w = dim.width;
+                        h = dim.height;
+                        break;
                     default:
-                        return;
+                        x = 0;
+                        y = 0;
+                        w = this.vml.width;
+                        h = this.vml.height;
+                        break;
+                }
+                if (this.type == "path") {
+                    var left = Math.round(this.vml.width / 2 - w / 2 - x),
+                        top = Math.round(this.vml.height / 2 - h / 2 - y);
+                    gs.left = - left + "px";
+                    gs.top = - top + "px";
+                    this.X = left;
+                    this.Y = top;
+                    this.W = w;
+                    this.H = h;
+                    os.top = top + "px";
+                    os.left = left + "px";
+                } else {
+                    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";
                 }
-                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";
@@ -441,50 +490,26 @@ var Raphael = (function (type) {
             };
             Element.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;
-            };
-            // 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) {
-                if (x == undefined && y == undefined) {
-                    return ;
-                    // TODO
+                    return {x: this._.tx, y: this._.ty};
                 }
-                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 width = parseInt(s.width, 10) * x * dirx;
-                    var height = parseInt(s.height, 10) * y * diry;
-                    var left = parseInt(s.left, 10);
-                    var top = parseInt(s.top, 10);
-                    s.left = this.X = left + this.W / 2 - width / 2;
-                    s.top = this.Y = top + this.H / 2 - height / 2;
-                    s.width = this.W = width;
-                    s.height = this.H = height;
+                this._.tx += +x;
+                this._.ty += +y;
+                if (this.type == "path") {
+                    var path = this.attrs.path;
+                    path = Raphael.pathToRelative(path);
+                    path[0][1] += +x;
+                    path[0][2] += +y;
+                    this.attr({path: path.join(" ")});
                 }
+                this.setBox({x: this._.tx, y: this._.ty});
                 return this;
             };
             Element.prototype.getBBox = function () {
                 return {
-                    x: this.Group.offsetLeft,
-                    y: this.Group.offsetTop,
-                    width: this.Group.offsetWidth,
-                    height: this.Group.offsetHeight
+                    x: this.X,
+                    y: this.Y,
+                    width: this.W,
+                    height: this.H
                 };
             };
             Element.prototype.remove = function () {
@@ -558,7 +583,7 @@ var Raphael = (function (type) {
                 vml.canvas.appendChild(g);
                 var res = new Element(o, g, vml);
                 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, width: r * 2, height: r * 2});
                 res.attrs.cx = x;
                 res.attrs.cy = y;
                 res.attrs.r = r;
@@ -575,7 +600,7 @@ var Raphael = (function (type) {
                 vml.canvas.appendChild(g);
                 var res = new Element(o, g, vml);
                 setFillAndStroke(res, {stroke: "#000"});
-                res.setBox({x: x, y: y, w: w, h: h});
+                res.setBox({x: x, y: y, width: w, height: h});
                 res.attrs.x = x;
                 res.attrs.y = y;
                 res.attrs.w = w;
@@ -591,7 +616,7 @@ var Raphael = (function (type) {
                 vml.canvas.appendChild(g);
                 var res = new Element(o, g, vml);
                 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, width: rx * 2, height: ry * 2});
                 res.attrs.cx = x;
                 res.attrs.cy = y;
                 res.attrs.rx = rx;
@@ -607,7 +632,7 @@ var Raphael = (function (type) {
                 vml.canvas.appendChild(g);
                 var res = new Element(o, g, vml);
                 res.type = "image";
-                res.setBox({x: x, y: y, w: w, h: h});
+                res.setBox({x: x, y: y, width: w, height: h});
                 res.attrs.x = x;
                 res.attrs.y = y;
                 res.attrs.w = w;
@@ -645,6 +670,7 @@ var Raphael = (function (type) {
                 res.attrs.y = y;
                 res.attrs.w = 1;
                 res.attrs.h = 1;
+                setFillAndStroke(res, {stroke: "none", fill: "#000"});
                 return res;
             };
             var theGroup = function (vml) {
@@ -765,11 +791,6 @@ var Raphael = (function (type) {
             };
         }
         if (type == "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 thePath = function (params, pathString, SVG) {
                 var el = document.createElementNS(SVG.svgns, "path");
                 el.setAttribute("fill", "none");
@@ -777,11 +798,8 @@ var Raphael = (function (type) {
                     SVG.canvas.appendChild(el);
                 }
                 var p = new Element(el, SVG);
-                if (params) {
-                    setFillAndStroke(p, params);
-                }
                 p.isAbsolute = true;
-                p.path = [];
+                p.type = "path";
                 p.last = {x: 0, y: 0, bx: 0, by: 0};
                 p.absolutely = function () {
                     this.isAbsolute = true;
@@ -791,53 +809,35 @@ var Raphael = (function (type) {
                     this.isAbsolute = false;
                     return this;
                 };
-                p.redraw = function () {
-                    this[0].setAttribute("d", "M0 0");
-                    var oldPath = this.path;
-                    this.path = [];
-                    for (var i = 0, ii = oldPath.length; i < ii; i++) {
-                        if (oldPath[i].type != "end") {
-                            this[oldPath[i].type + "To"].apply(this, oldPath[i].arg);
-                        } else {
-                            this.andClose();
-                        }
-                    }
-                    return this;
-                };
                 p.moveTo = function (x, y) {
                     var d = this.isAbsolute?"M":"m";
-                    var _getX = this.isAbsolute ? SVG._getX : SVG._getW;
-                    var _getY = this.isAbsolute ? SVG._getY : SVG._getH;
-                    d += _getX(parseFloat(x, 10)) + " " + _getY(parseFloat(y, 10)) + " ";
+                    d += parseFloat(x, 10).toFixed(3) + " " + parseFloat(y, 10).toFixed(3) + " ";
                     var oldD = this[0].getAttribute("d") || "";
+                    (oldD == "M0,0") && (oldD = "");
                     this[0].setAttribute("d", oldD + d);
-                    this.last.x = (this.isAbsolute ? 0 : this.last.x) + SVG._getX(parseFloat(x, 10));
-                    this.last.y = (this.isAbsolute ? 0 : this.last.y) + SVG._getY(parseFloat(y, 10));
-                    this.path.push({type: "move", arg: arguments, pos: this.isAbsolute});
+                    this.last.x = (this.isAbsolute ? 0 : this.last.x) + parseFloat(x, 10);
+                    this.last.y = (this.isAbsolute ? 0 : this.last.y) + parseFloat(y, 10);
+                    this.attrs.path = oldD + d;
                     return this;
                 };
                 p.lineTo = function (x, y) {
-                    this.last.x = (this.isAbsolute ? 0 : this.last.x) + SVG._getX(parseFloat(x, 10));
-                    this.last.y = (this.isAbsolute ? 0 : this.last.y) + SVG._getY(parseFloat(y, 10));
+                    this.last.x = (this.isAbsolute ? 0 : this.last.x) + parseFloat(x, 10);
+                    this.last.y = (this.isAbsolute ? 0 : this.last.y) + parseFloat(y, 10);
                     var d = this.isAbsolute?"L":"l";
-                    var _getX = this.isAbsolute ? SVG._getX : SVG._getW;
-                    var _getY = this.isAbsolute ? SVG._getY : SVG._getH;
-                    d += _getX(parseFloat(x, 10)) + " " + _getY(parseFloat(y, 10)) + " ";
+                    d += parseFloat(x, 10).toFixed(3) + " " + parseFloat(y, 10).toFixed(3) + " ";
                     var oldD = this[0].getAttribute("d") || "";
                     this[0].setAttribute("d", oldD + d);
-                    this.path.push({type: "line", arg: arguments, pos: this.isAbsolute});
+                    this.attrs.path = oldD + d;
                     return this;
                 };
                 p.arcTo = function (rx, ry, large_arc_flag, sweep_flag, x, y) {
                     var d = this.isAbsolute ? "A" : "a";
-                    var _getX = this.isAbsolute ? SVG._getX : SVG._getW;
-                    var _getY = this.isAbsolute ? SVG._getY : SVG._getH;
-                    d += [SVG._getW(parseFloat(rx, 10)), SVG._getH(parseFloat(ry, 10)), 0, large_arc_flag, sweep_flag, _getX(parseFloat(x, 10)), _getY(parseFloat(y, 10))].join(" ");
+                    d += [parseFloat(rx, 10).toFixed(3), parseFloat(ry, 10).toFixed(3), 0, large_arc_flag, sweep_flag, parseFloat(x, 10).toFixed(3), parseFloat(y, 10).toFixed(3)].join(" ");
                     var oldD = this[0].getAttribute("d") || "";
                     this[0].setAttribute("d", oldD + d);
-                    this.last.x = SVG._getX(parseFloat(x, 10));
-                    this.last.y = SVG._getY(parseFloat(y, 10));
-                    this.path.push({type: "arc", arg: arguments, pos: this.isAbsolute});
+                    this.last.x = parseFloat(x, 10);
+                    this.last.y = parseFloat(y, 10);
+                    this.attrs.path = oldD + d;
                     return this;
                 };
                 p.cplineTo = function (x1, y1, w1) {
@@ -845,15 +845,13 @@ var Raphael = (function (type) {
                         return this.lineTo(x1, y1);
                     } else {
                         var p = {};
-                        p._getX = this.isAbsolute ? SVG._getX : SVG._getW;
-                        p._getY = this.isAbsolute ? SVG._getY : SVG._getH;
-                        var x = p._getX(Math.round(parseFloat(x1, 10) * 100) / 100);
-                        var y = p._getY(Math.round(parseFloat(y1, 10) * 100) / 100);
-                        var w = SVG._getW(Math.round(parseFloat(w1, 10) * 100) / 100);
+                        var x = parseFloat(x1, 10);
+                        var y = parseFloat(y1, 10);
+                        var w = parseFloat(w1, 10);
                         var d = this.isAbsolute?"C":"c";
-                        var attr = [this.last.x + w, this.last.y, x - w, y, x, y];
+                        var attr = [+this.last.x + w, +this.last.y, x - w, y, x, y];
                         for (var i = 0, ii = attr.length; i < ii; i++) {
-                            d += attr[i] + " ";
+                            d += attr[i].toFixed(3) + " ";
                         }
                         this.last.x = (this.isAbsolute ? 0 : this.last.x) + attr[4];
                         this.last.y = (this.isAbsolute ? 0 : this.last.y) + attr[5];
@@ -861,38 +859,50 @@ var Raphael = (function (type) {
                         this.last.by = attr[3];
                         var oldD = this[0].getAttribute("d") || "";
                         this[0].setAttribute("d", oldD + d);
-                        this.path.push({type: "cpline", arg: arguments, pos: this.isAbsolute});
+                        this.attrs.path = oldD + d;
                         return this;
                     }
                 };
                 p.curveTo = function () {
-                    var p = {};
-                    p._getX = this.isAbsolute ? SVG._getX : SVG._getW;
-                    p._getY = this.isAbsolute ? SVG._getY : SVG._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 p = {},
+                        command = [0, 1, 2, 3, "s", 5, "c"];
+                    
+                    var d = command[arguments.length];
+                    if (this.isAbsolute) {
+                        d = d.toUpperCase();
                     }
-                    var oldD = this[0].getAttribute("d") || "";
-                    this[0].setAttribute("d", oldD + d);
-                    this.path.push({type: "curve", arg: arguments, pos: this.isAbsolute});
+                    for (var i = 0, ii = arguments.length; i < ii; i++) {
+                        d += parseFloat(arguments[i], 10).toFixed(3) + " ";
+                    }
+                    this.last.x = (this.isAbsolute ? 0 : this.last.x) + parseFloat(arguments[arguments.length - 2], 10);
+                    this.last.y = (this.isAbsolute ? 0 : this.last.y) + parseFloat(arguments[arguments.length - 1], 10);
+                    this.last.bx = parseFloat(arguments[arguments.length - 4], 10);
+                    this.last.by = parseFloat(arguments[arguments.length - 3], 10);
+                    var oldD = this.node.getAttribute("d") || "";
+                    this.node.setAttribute("d", oldD + d);
+                    this.attrs.path = oldD + d;
+                    return this;
+                };
+                p.qcurveTo = function () {
+                    var p = {},
+                        command = [0, 1, "t", 3, "q"];
+                    
+                    var d = command[arguments.length];
+                    if (this.isAbsolute) {
+                        d = d.toUpperCase();
+                    }
+                    for (var i = 0, ii = arguments.length; i < ii; i++) {
+                        d += parseFloat(arguments[i], 10).toFixed(3) + " ";
+                    }
+                    this.last.x = (this.isAbsolute ? 0 : this.last.x) + parseFloat(arguments[arguments.length - 2], 10);
+                    this.last.y = (this.isAbsolute ? 0 : this.last.y) + parseFloat(arguments[arguments.length - 1], 10);
+                    if (arguments.length != 2) {
+                        this.last.qx = parseFloat(arguments[arguments.length - 4], 10);
+                        this.last.qy = parseFloat(arguments[arguments.length - 3], 10);
+                    }
+                    var oldD = this.node.getAttribute("d") || "";
+                    this.node.setAttribute("d", oldD + d);
+                    this.attrs.path = oldD + d;
                     return this;
                 };
                 p.addRoundedCorner = function (r, dir) {
@@ -954,13 +964,17 @@ var Raphael = (function (type) {
                 p.andClose = function () {
                     var oldD = this[0].getAttribute("d") || "";
                     this[0].setAttribute("d", oldD + "Z ");
-                    this.path.push({type: "end"});
+                    this.attrs.path = oldD + "Z ";
                     return this;
                 };
                 if (typeof pathString == "string") {
+                    p.attrs.path = pathString;
                     p.absolutely();
                     C.pathfinder(p, pathString);
                 }
+                if (params) {
+                    setFillAndStroke(p, params);
+                }
                 return p;
             };
             var addGrdientFill = function (o, gradient, SVG) {
@@ -1002,51 +1016,78 @@ var Raphael = (function (type) {
                     "- .": [4, 3, 1, 3],
                     "--.": [8, 3, 1, 3],
                     "--..": [8, 3, 1, 3, 1, 3]
+                },
+                addDashes = function (o, value) {
+                    value = dasharray[value.toString().toLowerCase()];
+                    if (value) {
+                        var width = o.attrs["stroke-width"] || "1",
+                            butt = {round: width, square: width, butt: 0}[o.attrs["stroke-linecap"]] || 0,
+                            dashes = [];
+                        for (var i = 0, ii = value.length; i < ii; i++) {
+                            dashes.push(value[i] * width + ((i % 2) ? 1 : -1) * butt);
+                        }
+                        value = dashes.join(",");
+                        o[0].setAttribute("stroke-dasharray", value);
+                    }
                 };
                 for (var att in params) {
                     var value = params[att];
                     o.attrs[att] = value;
                     switch (att) {
+                        case "path":
+                            if (o.type == "path") {
+                                o[0].setAttribute("d", "M0,0");
+                                C.pathfinder(o, value);
+                            }
                         case "rx":
                         case "cx":
                         case "x":
-                            o[0].setAttribute(att, o.svg._getX(value));
+                            o[0].setAttribute(att, value);
                             updatePosition(o);
                             break;
                         case "ry":
                         case "cy":
                         case "y":
-                            o[0].setAttribute(att, o.svg._getY(value));
+                            o[0].setAttribute(att, value);
                             updatePosition(o);
                             break;
                         case "width":
-                            o[0].setAttribute(att, o.svg._getW(value));
+                            o[0].setAttribute(att, value);
                             break;
                         case "height":
-                            o[0].setAttribute(att, o.svg._getH(value));
+                            o[0].setAttribute(att, value);
                             break;
                         case "gradient":
                             addGrdientFill(o[0], value, o.svg);
                             break;
-                        case "stroke-dasharray":
-                            value = dasharray[value.toLowerCase()];
-                            if (value) {
-                                var width = params["stroke-width"] || o.attr("stroke-width") || "1",
-                                    butt = {round: width, square: width, butt: 0}[o.attr("stroke-linecap")] || 0,
-                                    dashes = [];
-                                for (var i = 0, ii = value.length; i < ii; i++) {
-                                    dashes.push(value[i] * width + ((i % 2) ? 1 : -1) * butt);
-                                }
-                                value = dashes.join(",");
-                                o[0].setAttribute(att, value);
+                        case "stroke-width":
+                            o[0].style.strokeWidth = value;
+                            // Need following line for Firefox
+                            o[0].setAttribute(att, value);
+                            if (o.attrs["stroke-dasharray"]) {
+                                addDashes(o, o.attrs["stroke-dasharray"]);
                             }
                             break;
+                        case "stroke-dasharray":
+                            addDashes(o, value);
+                            break;
                         case "text":
                             if (o.type == "text") {
                                 o[0].childNodes.length && o[0].removeChild(o[0].firstChild);
                                 o[0].appendChild(document.createTextNode(value));
                             }
                             break;
+                        case "rotation":
+                            o.rotate(value, true);
+                            break;
+                        case "translation":
+                            var xy = value.split(/[, ]+/);
+                            o.translate(xy[0], xy[1]);
+                            break;
+                        case "scale":
+                            var xy = value.split(/[, ]+/);
+                            o.scale(xy[0], xy[1]);
+                            break;
                         case "fill":
                             var isURL = value.match(/^url\(([^\)]+)\)$/i);
                             if (isURL) {
@@ -1095,65 +1136,64 @@ var Raphael = (function (type) {
             };
             var Element = function (node, svg) {
                 var X = 0,
-                    Y = 0,
-                    Rotation = {deg: 0, x: 0, y: 0},
-                    ScaleX = 1,
-                    ScaleY = 1,
-                    tMatrix = null;
+                    Y = 0;
                 this[0] = node;
                 this.node = node;
                 this.svg = svg;
                 this.attrs = this.attrs || {};
                 this.transformations = []; // rotate, translate, scale, matrix
-                this.rotate = function (deg) {
-                    if (deg == undefined) {
-                        return Rotation.deg;
-                    }
-                    var bbox = this.getBBox();
-                    Rotation.deg += deg;
-                    if (Rotation.deg) {
-                        this.transformations[0] = ("rotate(" + Rotation.deg + " " + (bbox.x + bbox.width / 2) + " " + (bbox.y + bbox.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 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 {
-                            this.transformations[2] = "";
-                        }
-                        this[0].setAttribute("transform", this.transformations.join(" "));
-                    }
-                    return this;
+                this._ = {
+                    tx: 0,
+                    ty: 0,
+                    rt: {deg: 0, x: 0, y: 0},
+                    sx: 1,
+                    sy: 1
                 };
             };
+            Element.prototype.translate = function (x, y) {
+                if (x == undefined && y == undefined) {
+                    return {x: this._.tx, y: this._.ty};
+                }
+                this._.tx += +x;
+                this._.ty += +y;
+                switch (this.type) {
+                    case "circle":
+                    case "ellipse":
+                        this.attr({cx: this.attrs.cx + x, cy: this.attrs.cy + y});
+                        break;
+                    case "rect":
+                    case "image":
+                    case "text":
+                        this.attr({x: this.attrs.x + x, y: this.attrs.y + y});
+                        break;
+                    case "path":
+                        var path = Raphael.pathToRelative(this.attrs.path);
+                        path[0][1] += +x;
+                        path[0][2] += +y;
+                        this.attr({path: path.join(" ")});
+                    break;
+                }
+                return this;
+            };
+            Element.prototype.rotate = function (deg, isAbsolute) {
+                if (deg == undefined) {
+                    return this._.rt.deg;
+                }
+                var bbox = this.getBBox();
+                if (isAbsolute) {
+                    this._.rt.deg = deg;
+                } else {
+                    this._.rt.deg += deg;
+                }
+                
+                if (this._.rt.deg) {
+                    this.transformations[0] = ("rotate(" + this._.rt.deg + " " + (bbox.x + bbox.width / 2) + " " + (bbox.y + bbox.height / 2) + ")");
+                } else {
+                    this.transformations[0] = "";
+                }
+                this[0].setAttribute("transform", this.transformations.join(" "));
+                return this;
+            };
             Element.prototype.hide = function () {
                 this[0].style.display = "none";
                 return this;
@@ -1162,12 +1202,6 @@ var Raphael = (function (type) {
                 this[0].style.display = "block";
                 return this;
             };
-            // depricated
-            Element.prototype.matrix = function (xx, xy, yx, yy, dx, dy) {
-                this.transformations[3] = new Matrix(xx, xy, yx, yy, dx, dy);
-                this[0].setAttribute("transform", this.transformations.join(" "));
-                return this;
-            };
             Element.prototype.remove = function () {
                 this[0].parentNode.removeChild(this[0]);
             };
@@ -1176,7 +1210,10 @@ var Raphael = (function (type) {
             };
             Element.prototype.attr = function () {
                 if (arguments.length == 1 && typeof arguments[0] == "string") {
-                    return this[0].getAttribute(arguments[0]);
+                    if (arguments[0] == "translation") {
+                        return this.translate();
+                    }
+                    return this.attrs[arguments[0]];
                 }
                 if (arguments.length == 1 && arguments[0] instanceof Array) {
                     var values = {};
@@ -1206,8 +1243,8 @@ var Raphael = (function (type) {
             };
             var theCircle = function (svg, x, y, r) {
                 var el = document.createElementNS(svg.svgns, "circle");
-                el.setAttribute("cx", svg._getX(x));
-                el.setAttribute("cy", svg._getY(y));
+                el.setAttribute("cx", x);
+                el.setAttribute("cy", y);
                 el.setAttribute("r", r);
                 el.setAttribute("fill", "none");
                 el.setAttribute("stroke", "#000");
@@ -1225,10 +1262,10 @@ var Raphael = (function (type) {
             };
             var theRect = function (svg, x, y, w, h, r) {
                 var el = document.createElementNS(svg.svgns, "rect");
-                el.setAttribute("x", svg._getX(x));
-                el.setAttribute("y", svg._getY(y));
-                el.setAttribute("width", svg._getW(w));
-                el.setAttribute("height", svg._getH(h));
+                el.setAttribute("x", x);
+                el.setAttribute("y", y);
+                el.setAttribute("width", w);
+                el.setAttribute("height", h);
                 if (r) {
                     el.setAttribute("rx", r);
                     el.setAttribute("ry", r);
@@ -1253,10 +1290,10 @@ var Raphael = (function (type) {
             };
             var theEllipse = function (svg, x, y, rx, ry) {
                 var el = document.createElementNS(svg.svgns, "ellipse");
-                el.setAttribute("cx", svg._getX(x));
-                el.setAttribute("cy", svg._getY(y));
-                el.setAttribute("rx", svg._getW(rx));
-                el.setAttribute("ry", svg._getH(ry));
+                el.setAttribute("cx", x);
+                el.setAttribute("cy", y);
+                el.setAttribute("rx", rx);
+                el.setAttribute("ry", ry);
                 el.setAttribute("fill", "none");
                 el.setAttribute("stroke", "#000");
                 if (svg.canvas) {
@@ -1274,10 +1311,11 @@ var Raphael = (function (type) {
             };
             var theImage = function (svg, src, x, y, w, h) {
                 var el = document.createElementNS(svg.svgns, "image");
-                el.setAttribute("x", svg._getX(x));
-                el.setAttribute("y", svg._getY(y));
-                el.setAttribute("width", svg._getW(w));
-                el.setAttribute("height", svg._getH(h));
+                el.setAttribute("x", x);
+                el.setAttribute("y", y);
+                el.setAttribute("width", w);
+                el.setAttribute("height", h);
+                el.setAttribute("preserveAspectRatio", "none");
                 el.setAttributeNS(svg.xlink, "href", src);
                 if (svg.canvas) {
                     svg.canvas.appendChild(el);
@@ -1438,31 +1476,220 @@ var Raphael = (function (type) {
                 }
                 return p;
             };
-            C.setGrid = function (xmin, ymin, xmax, ymax, w, h) {
-                var xc = (xmax - xmin) / w;
-                var yc = (ymax - ymin) / h;
-                this._getX = function (x) {
-                    return xmin + x * xc;
-                };
-                this._getY = function (y) {
-                    return ymin + y * yc;
-                };
-                this._getW = function (w) {
-                    return w * xc;
-                };
-                this._getH = function (h) {
-                    return h * yc;
-                };
-            };
-            C.clearGrid = function () {
-                this._getX = this._getY = this._getW = this._getH = function (x) { return x; };
-            };
             C.safari = function () {
                 if (r.type == "SVG") {
                     var rect = C.rect(-C.width, -C.height, C.width * 3, C.height * 3).attr({stroke: "none"});
                     setTimeout(function () {rect.remove();}, 0);
                 }
             };
+            Element.prototype.stop = function () {
+                clearTimeout(this.animation_in_progress);
+            };
+            Element.prototype.scale = function (x, y) {
+                if (x == undefined && y == undefined) {
+                    return {x: this._.sx, y: this._.sy};
+                }
+                y = y || x;
+                var dx, dy, cx, cy;
+                if (x != 0 && !(x == 1 && y == 1)) {
+                    var dirx = Math.round(x / Math.abs(x)),
+                        diry = Math.round(y / Math.abs(y)),
+                        s = this.node.style;
+                    dx = this.attr("x");
+                    dy = this.attr("y");
+                    cx = this.attr("cx");
+                    cy = this.attr("cy");
+                    if (dirx != 1 || diry != 1) {
+                        if (this.transformations) {
+                            this.transformations[2] = "scale(" + [dirx, diry] + ")";
+                            this.node.setAttribute("transform", this.transformations.join(" "));
+                            dx = (dirx < 0) ? -this.attr("x") - this.attrs.width * x * dirx / this._.sx : this.attr("x");
+                            dy = (diry < 0) ? -this.attr("y") - this.attrs.height * y * diry / this._.sy : this.attr("y");
+                            cx = this.attr("cx") * dirx;
+                            cy = this.attr("cy") * diry;
+                        } else {
+                            s.filter = "progid:DXImageTransform.Microsoft.Matrix(M11=" + dirx +
+                                ", M12=0, M21=0, M22=" + diry +
+                                ", Dx=0, Dy=0, sizingmethod='auto expand', filtertype='bilinear')";
+                        }
+                    } else {
+                        if (this.transformations) {
+                            this.transformations[2] = "";
+                            this.node.setAttribute("transform", this.transformations.join(" "));
+                        } else {
+                            s.filter = "";
+                        }
+                    }
+                    switch (this.type) {
+                        case "rect":
+                        case "image":
+                            this.attr({
+                                width: this.attrs.width * x * dirx / this._.sx,
+                                height: this.attrs.height * y * diry / this._.sy,
+                                x: dx,
+                                y: dy
+                            });
+                            break;
+                        case "circle":
+                        case "ellipse":
+                            this.attr({
+                                rx: this.attrs.rx * x * dirx / this._.sx,
+                                ry: this.attrs.ry * y * diry / this._.sy,
+                                r: this.attrs.r * x * diry / this._.sx,
+                                cx: cx,
+                                cy: cy
+                            });
+                            break;
+                        case "path":
+                            var path = Raphael.pathToRelative(Raphael.parsePathString(this.attr("path"))), 
+                                skip = true,
+                                dim = Raphael.pathDimensions(this.attrs.path),
+                                dx = -dim.width * (x - 1) / 2,
+                                dy = -dim.height * (y - 1) / 2;
+                            for (var i = 0, ii = path.length; i < ii; i++) {
+                                if (path[i][0].toUpperCase() == "M" && skip) {
+                                    continue;
+                                } else {
+                                    skip = false;
+                                }
+                                if (path[i][0].toUpperCase() == "A") {
+                                    path[i][path[i].length - 2] *= x * dirx;
+                                    path[i][path[i].length - 1] *= y * diry;
+                                } else {
+                                    for (var j = 1, jj = path[i].length; j < jj; j++) {
+                                        path[i][j] *= (j % 2) ? x * dirx / this._.sx : y * diry / this._.sy;
+                                    }
+                                }
+                            }
+                            var dim2 = Raphael.pathDimensions(path),
+                                dx = dim.x + dim.width / 2 - dim2.x - dim2.width / 2,
+                                dy = dim.y + dim.height / 2 - dim2.y - dim2.height / 2;
+                            path = Raphael.pathToRelative(path);
+                            path[0][1] += dx;
+                            path[0][2] += dy;
+                            
+                            this.attr({path: path.join(" ")});
+                    }
+                }
+                this._.sx = x;
+                this._.sy = y;
+                return this;
+            };
+            Element.prototype.animate = function (params, ms, callback) {
+                clearTimeout(this.animation_in_progress);
+                var from = {}, to = {}, diff = {}, t = {x: 0, y: 0};
+                for (var attr in params) {
+                    if (attr in availableAnimAttrs) {
+                        from[attr] = this.attr(attr);
+                        if (typeof from[attr] == "undefined") {
+                            from[attr] = availableAttrs[attr];
+                        }
+                        to[attr] = params[attr];
+                        switch (availableAnimAttrs[attr]) {
+                            case "number":
+                                diff[attr] = (to[attr] - from[attr]) / ms;
+                                break;
+                            case "colour":
+                                from[attr] = Raphael.getRGB(from[attr]);
+                                var toColour = Raphael.getRGB(to[attr]);
+                                diff[attr] = {
+                                    r: (toColour.r - from[attr].r) / ms,
+                                    g: (toColour.g - from[attr].g) / ms,
+                                    b: (toColour.b - from[attr].b) / ms
+                                };
+                                break;
+                            case "path":
+                                var pathes = Raphael.pathEqualiser(from[attr], to[attr]);
+                                from[attr] = pathes[0];
+                                to[attr] = pathes[1];
+                                diff[attr] = [];
+                                for (var i = 0, ii = from[attr].length; i < ii; i++) {
+                                    diff[attr][i] = [0];
+                                    for (var j = 1, jj = from[attr][i].length; j < jj; j++) {
+                                        diff[attr][i][j] = (to[attr][i][j] - from[attr][i][j]) / ms;
+                                    }
+                                }
+                                break;
+                            case "csv":
+                                var values = params[attr].split(/[, ]+/);
+                                if (attr == "translation") {
+                                    from[attr] = [0, 0];
+                                    diff[attr] = [values[0] / ms, values[1] / ms];
+                                } else {
+                                    from[attr] = from[attr].split(/[, ]+/);
+                                    diff[attr] = [(values[0] - from[attr][0]) / ms, (values[1] - from[attr][0]) / ms];
+                                }
+                                to[attr] = values;
+                        }
+                    }
+                }
+                var start = new Date(),
+                    prev = 0,
+                    that = this;
+                (function () {
+                    var time = (new Date()).getTime() - start.getTime(),
+                        set = {},
+                        now;
+                    if (time < ms) {
+                        for (var attr in from) {
+                            switch (availableAnimAttrs[attr]) {
+                                case "number":
+                                    now = +from[attr] + time * diff[attr];
+                                    break;
+                                case "colour":
+                                    now = "rgb(" + [
+                                        Math.round(from[attr].r + time * diff[attr].r),
+                                        Math.round(from[attr].g + time * diff[attr].g),
+                                        Math.round(from[attr].b + time * diff[attr].b)
+                                    ].join(",") + ")";
+                                    break;
+                                case "path":
+                                    now = [];
+                                    for (var i = 0, ii = from[attr].length; i < ii; i++) {
+                                        now[i] = [from[attr][i][0]];
+                                        for (var j = 1, jj = from[attr][i].length; j < jj; j++) {
+                                            now[i][j] = from[attr][i][j] + time * diff[attr][i][j];
+                                        }
+                                        now[i] = now[i].join(" ");
+                                    }
+                                    now = now.join(" ");
+                                    break;
+                                case "csv":
+                                    if (attr == "translation") {
+                                        var x = diff[attr][0] * (time - prev),
+                                            y = diff[attr][1] * (time - prev);
+                                        t.x += x;
+                                        t.y += y;
+                                        now = [x, y].join(" ");
+                                    } else {
+                                        now = [+from[attr][0] + time * diff[attr][0], +from[attr][1] + time * diff[attr][1]].join(" ");
+                                    }
+                                    break;
+                            }
+                            if (attr == "font-size") {
+                                set[attr] = now + "px";
+                            } else {
+                                set[attr] = now;
+                            }
+                        }
+                        that.attr(set);
+                        that.animation_in_progress = setTimeout(arguments.callee, 0);
+                        C.safari();
+                    } else {
+                        if (t.x || t.y) {
+                            that.translate(-t.x, -t.y);
+                        }
+                        that.attr(params);
+                        clearTimeout(that.animation_in_progress);
+                        C.safari();
+                        (typeof callback == "function") && callback.call(that);
+                    }
+                    prev = time;
+                })();
+                return this;
+            };
+            
+            // depricated
             Element.prototype.animateTo = function (x, y, ms, callback) {
                 clearTimeout(this.animation_in_progress);
                 if ("cx" in this.attrs || "x" in this.attrs) {
@@ -1473,21 +1700,14 @@ var Raphael = (function (type) {
                         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;
-                    }
+                        dx = x - X;
                     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;
+                            var y1 = Y + time * dy / ms;
                             that.attr(is_round ? {cx: x1, cy: y1} : {x: x1, y: y1});
                             that.animation_in_progress = setTimeout(arguments.callee, 1);
                             C.safari();
@@ -1505,67 +1725,46 @@ var Raphael = (function (type) {
                     M: function (x, y) {
                         this.moveTo(x, y);
                     },
-                    m: function (x, y) {
-                        this.moveTo(this.last.x + x, this.last.y + y);
-                    },
                     C: function (x1, y1, x2, y2, x3, y3) {
                         this.curveTo(x1, y1, x2, y2, x3, y3);
                     },
-                    c: function (x1, y1, x2, y2, x3, y3) {
-                        this.curveTo(this.last.x + x1, this.last.y + y1, this.last.x + x2, this.last.y + y2, this.last.x + x3, this.last.y + y3);
+                    Q: function (x1, y1, x2, y2) {
+                        this.qcurveTo(x1, y1, x2, y2);
+                    },
+                    T: function (x, y) {
+                        this.qcurveTo(x, y);
                     },
                     S: function (x1, y1, x2, y2) {
                         p.curveTo(x1, y1, x2, y2);
                     },
-                    s: function (x1, y1, x2, y2) {
-                        this.curveTo(this.last.x + x1, this.last.y + y1, this.last.x + x2, this.last.y + y2);
-                    },
                     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 (rx, ry, xaxisrotation, largearcflag, sweepflag, x, y) {
                         this.arcTo(rx, ry, largearcflag, sweepflag, x, y);
                     },
-                    a: function (rx, ry, xaxisrotation, largearcflag, sweepflag, x, y) {
-                        this.arcTo(this.last.x + rx, this.last.y + ry, largearcflag, sweethisflag, this.last.x + x, this.last.y + y);
-                    },
-                    z: function () {
+                    Z: function () {
                         this.andClose();
                     }
                 };
-                path.replace(/([mzlhvcsqta])\s*((-?\d*\.?\d*\s*,?\s*)+)/ig, function (a, b, c) {
-                    var params = [];
-                    c.replace(/(-?\d*\.?\d*)\s*,?\s*/ig, function (a, b) {
-                        b && params.push(+b);
-                    });
-                    while (params.length >= commands[b].length) {
-                        commands[b].apply(p, params.splice(0, commands[b].length));
-                        if (!commands[b].length) {
-                            break;
-                        };
-                    }
-                });
+
+                path = Raphael.pathToAbsolute(path);
+                for (var i = 0, ii = path.length; i < ii; i++) {
+                    var b = path[i].shift();
+                    commands[b].apply(p, path[i]);
+                }
             };
             return r;
         } else {
             return function () {};
         }
-    })((!(window.SVGPreserveAspectRatio && window.SVGPreserveAspectRatio.SVG_PRESERVEASPECTRATIO_XMINYMIN == 2)) ? "VML" : "SVG");
+    })((!window.SVGAngle) ? "VML" : "SVG");
 
 
 Raphael.vml = !(Raphael.svg = (Raphael.type == "SVG"));
@@ -1672,6 +1871,57 @@ Raphael.rgb2hsb = function (red, green, blue) {
     }
     return {h: hue, s: saturation, b: brightness};
 };
+Raphael.getRGB = function (colour) {
+    var red, green, blue,
+        rgb = colour.match(/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgb\(\s*(\d+,\s*\d+,\s*\d+)\s*\)|rgb\(\s*(\d+%,\s*\d+%,\s*\d+%)\s*\)|hsb\(\s*(\d+,\s*\d+,\s*\d+)\s*\)|hsb\(\s*(\d+%,\s*\d+%,\s*\d+%)\s*\))\s*$/i);
+    if (rgb) {
+        if (rgb[2]) {
+            blue = parseInt(rgb[2].substring(5), 16);
+            green = parseInt(rgb[2].substring(3, 5), 16);
+            red = parseInt(rgb[2].substring(1, 3), 16);
+        }
+        if (rgb[3]) {
+            blue = parseInt(rgb[3].substring(3) + rgb[3].substring(3), 16);
+            green = parseInt(rgb[3].substring(2, 3) + rgb[3].substring(2, 3), 16);
+            red = parseInt(rgb[3].substring(1, 2) + rgb[3].substring(1, 2), 16);
+        }
+        if (rgb[4]) {
+            rgb = rgb[4].split(/\s*,\s*/);
+            red = parseInt(rgb[0], 10);
+            green = parseInt(rgb[1], 10);
+            blue = parseInt(rgb[2], 10);
+        }
+        if (rgb[5]) {
+            rgb = rgb[5].split(/\s*,\s*/);
+            red = parseInt(rgb[0], 10) * 2.55;
+            green = parseInt(rgb[1], 10) * 2.55;
+            blue = parseInt(rgb[2], 10) * 2.55;
+        }
+        if (rgb[6]) {
+            rgb = rgb[6].split(/\s*,\s*/);
+            red = parseInt(rgb[0], 10);
+            green = parseInt(rgb[1], 10);
+            blue = parseInt(rgb[2], 10);
+            return this.hsb2rgb(red, green, blue);
+        }
+        if (rgb[7]) {
+            rgb = rgb[7].split(/\s*,\s*/);
+            red = parseInt(rgb[0], 10) * 2.55;
+            green = parseInt(rgb[1], 10) * 2.55;
+            blue = parseInt(rgb[2], 10) * 2.55;
+            return this.hsb2rgb(red, green, blue);
+        }
+        var rgb = {r: red, g: green, b: blue};
+        var r = Math.round(red).toString(16);
+        (r.length == 1) && (r = "0" + r);
+        var g = Math.round(green).toString(16);
+        (g.length == 1) && (g = "0" + g);
+        var b = Math.round(blue).toString(16);
+        (b.length == 1) && (b = "0" + b);
+        rgb.hex = "#" + r + g + b;
+        return rgb;
+    }
+};
 Raphael.getColor = function (value) {
     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);
@@ -1687,4 +1937,256 @@ Raphael.getColor = function (value) {
 };
 Raphael.getColor.reset = function () {
     this.start = undefined;
-};
\ No newline at end of file
+};
+Raphael.parsePathString = function (pathString) {
+    var paramCounts = {a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0};
+    var data = [];
+    pathString.replace(/([achlmqstvz])\s*((-?\d*\.?\d*\s*,?\s*)+)/ig, function (a, b, c) {
+        var params = [], name = b.toLowerCase();
+        c.replace(/(-?\d*\.?\d*)\s*,?\s*/ig, function (a, b) {
+            b && params.push(+b);
+        });
+        while (params.length >= paramCounts[name]) {
+            data.push([b].concat(params.splice(0, paramCounts[name])));
+            if (!paramCounts[name]) {
+                break;
+            };
+        }
+    });
+    return data;
+};
+Raphael.pathDimensions = function (path) {
+    var pathArray = path;
+    if (typeof path == "string") {
+        pathArray = this.parsePathString(path);
+    }
+    pathArray = this.pathToAbsolute(pathArray);
+    var x = [], y = [], length = 0;
+    for (var i = 0, ii = pathArray.length; i < ii; i++) {
+        switch (pathArray[i][0]) {
+            case "Z":
+                break;
+            case "A":
+                x.push(pathArray[i][pathArray[i].length - 2]);
+                y.push(pathArray[i][pathArray[i].length - 1]);
+                break;
+            default:
+                for (var j = 1, jj = pathArray[i].length; j < jj; j++) {
+                    if (j % 2) {
+                        x.push(pathArray[i][j]);
+                    } else {
+                        y.push(pathArray[i][j]);
+                    }
+                }
+        }
+    }
+    var minx = Math.min.apply(Math, x),
+        miny = Math.min.apply(Math, y);
+    return {
+        x: minx,
+        y: miny,
+        width: Math.max.apply(Math, x) - minx,
+        height: Math.max.apply(Math, y) - miny,
+        X: x,
+        Y: y
+    };
+};
+Raphael.pathToRelative = function (pathArray) {
+    var res = [];
+    if (typeof pathArray == "string") {
+        pathArray = this.parsePathString(pathArray);
+    }
+    var x = 0, y = 0, start = 0;
+    if (pathArray[0][0] == "M") {
+        x = pathArray[0][1];
+        y = pathArray[0][2];
+        start++;
+        res.push(pathArray[0]);
+    }
+    for (var i = start, ii = pathArray.length; i < ii; i++) {
+        res[i] = [];
+        if (pathArray[i][0] != pathArray[i][0].toLowerCase()) {
+            res[i][0] = pathArray[i][0].toLowerCase();
+            switch (res[i][0]) {
+                case "a":
+                    res[i][1] = pathArray[i][1];
+                    res[i][2] = pathArray[i][2];
+                    res[i][3] = 0;
+                    res[i][4] = pathArray[i][4];
+                    res[i][5] = pathArray[i][5];
+                    res[i][6] = +(pathArray[i][6] - x).toFixed(3);
+                    res[i][7] = +(pathArray[i][7] - y).toFixed(3);
+                    break;
+                case "v":
+                    res[i][1] = +(pathArray[i][1] - y).toFixed(3);
+                    break;
+                default:
+                    for (var j = 1, jj = pathArray[i].length; j < jj; j++) {
+                        res[i][j] = +(pathArray[i][j] - ((j % 2) ? x : y)).toFixed(3);
+                    }
+            }
+        } else {
+            res[i] = pathArray[i];
+        }
+        switch (res[i][0]) {
+            case "z":
+                break;
+            case "h": 
+                x += res[i][res[i].length - 1];
+                break;
+            case "v":
+                y += res[i][res[i].length - 1];
+                break;
+            default:
+                x += res[i][res[i].length - 2];
+                y += res[i][res[i].length - 1];
+        }
+    }
+    return res;
+};
+Raphael.pathToAbsolute = function (pathArray) {
+    var res = [];
+    if (typeof pathArray == "string") {
+        pathArray = this.parsePathString(pathArray);
+    }
+    var x = 0, y = 0, start = 0;
+    if (pathArray[0][0] == "M") {
+        x = +pathArray[0][1];
+        y = +pathArray[0][2];
+        start++;
+        res[0] = pathArray[0];
+    }
+    for (var i = start, ii = pathArray.length; i < ii; i++) {
+        res[i] = [];
+        if (pathArray[i][0] != pathArray[i][0].toUpperCase()) {
+            res[i][0] = pathArray[i][0].toUpperCase();
+            switch (res[i][0]) {
+                case "A":
+                    res[i][1] = pathArray[i][1];
+                    res[i][2] = pathArray[i][2];
+                    res[i][3] = 0;
+                    res[i][4] = pathArray[i][4];
+                    res[i][5] = pathArray[i][5];
+                    res[i][6] = +(pathArray[i][6] + x).toFixed(3);
+                    res[i][7] = +(pathArray[i][7] + y).toFixed(3);
+                    break;
+                case "V":
+                    res[i][1] = +pathArray[i][1] + y;
+                    break;
+                default:
+                    for (var j = 1, jj = pathArray[i].length; j < jj; j++) {
+                        res[i][j] = +pathArray[i][j] + ((j % 2) ? x : y);
+                    }
+            }
+        } else {
+            res[i] = pathArray[i];
+        }
+        switch (res[i][0]) {
+            case "Z":
+                break;
+            case "H": 
+                x = res[i][1];
+                break;
+            case "V":
+                y = res[i][1];
+                break;
+            default:
+                x = res[i][res[i].length - 2];
+                y = res[i][res[i].length - 1];
+        }
+    }
+    return res;
+};
+Raphael.pathEqualiser = function (path1, path2) {
+    var data = [this.pathToAbsolute(this.parsePathString(path1)), this.pathToAbsolute(this.parsePathString(path2))],
+        attrs = [{x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0}, {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0}],
+        processPath = function (path, d) {
+            if (!path) {
+                return ["U"];
+            }
+            switch (path[0]) {
+                case "M":
+                    d.X = path[1];
+                    d.Y = path[2];
+                    break;
+                case "S":
+                    var nx = d.x + (d.x - (d.bx || d.x));
+                    var ny = d.y + (d.y - (d.by || d.y));
+                    path = ["C", nx, ny, path[1], path[2], path[3], path[4]];
+                    break;
+                case "T":
+                    var nx = d.x + (d.x - (d.bx || d.x));
+                    var ny = d.y + (d.y - (d.by || d.y));
+                    path = ["Q", nx, ny, path[1], path[2]];
+                    break;
+                case "H":
+                    path = ["L", path[1], d.y];
+                    break;
+                case "V":
+                    path = ["L", d.x, path[1]];
+                    break;
+                case "Z":
+                    path = ["L", d.X, d.Y];
+                    break;
+            }
+            return path;
+        },
+        edgeCases = function (a, b, i) {
+            if (data[a][i][0] == "M" && data[b][i][0] != "M") {
+                data[b].splice(i, 0, ["M", attrs[b].x, attrs[b].y]);
+                attrs[a].bx = data[a][i][data[a][i].length - 4] || 0;
+                attrs[a].by = data[a][i][data[a][i].length - 3] || 0;
+                attrs[a].x = data[a][i][data[a][i].length - 2];
+                attrs[a].y = data[a][i][data[a][i].length - 1];
+                return true;
+            } else if (data[a][i][0] == "L" && data[b][i][0] == "C") {
+                data[a][i] = ["C", attrs[a].x, attrs[a].y, data[a][i][1], data[a][i][2], data[a][i][1], data[a][i][2]];
+            } else if (data[a][i][0] == "L" && data[b][i][0] == "Q") {
+                data[a][i] = ["Q", data[a][i][1], data[a][i][2], data[a][i][1], data[a][i][2]];
+            } else if (data[a][i][0] == "Q" && data[b][i][0] == "C") {
+                var x = data[b][i][data[b][i].length - 2];
+                var y = data[b][i][data[b][i].length - 1];
+                data[b].splice(i + 1, 0, ["Q", x, y, x, y]);
+                data[a].splice(i, 0, ["C", attrs[a].x, attrs[a].y, attrs[a].x, attrs[a].y, attrs[a].x, attrs[a].y]);
+                i++;
+                attrs[b].bx = data[b][i][data[b][i].length - 4] || 0;
+                attrs[b].by = data[b][i][data[b][i].length - 3] || 0;
+                attrs[b].x = data[b][i][data[b][i].length - 2];
+                attrs[b].y = data[b][i][data[b][i].length - 1];
+                return true;
+            } else if (data[a][i][0] == "A" && data[b][i][0] == "C") {
+                var x = data[b][i][data[b][i].length - 2];
+                var y = data[b][i][data[b][i].length - 1];
+                data[b].splice(i + 1, 0, ["A", 0, 0, data[a][i][3], data[a][i][4], data[a][i][5], x, y]);
+                data[a].splice(i, 0, ["C", attrs[a].x, attrs[a].y, attrs[a].x, attrs[a].y, attrs[a].x, attrs[a].y]);
+                i++;
+                attrs[b].bx = data[b][i][data[b][i].length - 4] || 0;
+                attrs[b].by = data[b][i][data[b][i].length - 3] || 0;
+                attrs[b].x = data[b][i][data[b][i].length - 2];
+                attrs[b].y = data[b][i][data[b][i].length - 1];
+                return true;
+            } else if (data[a][i][0] == "U") {
+                data[a][i][0] = data[b][i][0];
+                for (var j = 1, jj = data[b][i].length; j < jj; j++) {
+                    data[a][i][j] = (j % 2) ? attrs[a].x : attrs[a].y;
+                }
+            }
+            return false;
+        };
+    for (var i = 0; i < Math.max(data[0].length, data[1].length); i++) {
+        data[0][i] = processPath(data[0][i], attrs[0]);
+        data[1][i] = processPath(data[1][i], attrs[1]);
+        if (data[0][i][0] != data[1][i][0] && (edgeCases(0, 1, i) || edgeCases(1, 0, i))) {
+            continue;
+        }
+        attrs[0].bx = data[0][i][data[0][i].length - 4] || 0;
+        attrs[0].by = data[0][i][data[0][i].length - 3] || 0;
+        attrs[0].x = data[0][i][data[0][i].length - 2];
+        attrs[0].y = data[0][i][data[0][i].length - 1];
+        attrs[1].bx = data[1][i][data[1][i].length - 4] || 0;
+        attrs[1].by = data[1][i][data[1][i].length - 3] || 0;
+        attrs[1].x = data[1][i][data[1][i].length - 2];
+        attrs[1].y = data[1][i][data[1][i].length - 1];
+    }
+    return data;
+};