{"size": 25765, "ext": "js", "max_stars_repo_path": "jawr-dwr3.x/jawr-dwr3.x-webapp-sample/src/main/webapp/gi/JSX/addins/charting/classes/jsx3/chart/package_svg.js", "max_stars_repo_name": "sustain/jawr-main-repo", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "jawr-dwr3.x/jawr-dwr3.x-webapp-sample/src/main/webapp/gi/JSX/addins/charting/classes/jsx3/chart/package_svg.js", "max_issues_repo_name": "sustain/jawr-main-repo", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "jawr-dwr3.x/jawr-dwr3.x-webapp-sample/src/main/webapp/gi/JSX/addins/charting/classes/jsx3/chart/package_svg.js", "max_forks_repo_name": "sustain/jawr-main-repo", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 4294.1666666667, "max_line_length": 25637, "alphanum_fraction": 0.6981564137}
/*
 * Copyright (c) 2001-2007, TIBCO Software Inc.
 * Use, modification, and distribution subject to terms of license.
 */
jsx3.Package.definePackage("jsx3.chart",function(s){s.q2=s.ADDIN.getVersion();s.qN=s.ADDIN.getPath()+"properties/";s.mK=s.ADDIN.getPath()+"events/";s.LOG=jsx3.util.Logger.getLogger(s.jsxpackage.getName());s.LOG_BENCH=jsx3.util.Logger.getLogger(s.jsxpackage.getName()+".benchmark");s.QTOP="top";s.QRIGHT="right";s.QBOTTOM="bottom";s.QLEFT="left";s.splitBox=function(k,n,i,o,b,l,h){var J=null,zb=null;if(b==s.QTOP){J=[k,n,i,Math.min(h,o-1)];zb=[k,n+J[3],i,o-J[3]];}else{if(b==s.QRIGHT){var H=Math.min(l,i-1);J=[k+i-H,n,H,o];zb=[k,n,i-H,o];}else{if(b==s.QBOTTOM){var x=Math.min(h,o-1);J=[k,n+o-x,i,x];zb=[k,n,i,o-x];}else{if(b==s.QLEFT){J=[k,n,Math.min(l,i-1),o];zb=[k+J[2],n,i-J[2],o];}}}}return [J,zb];};s.isValueAxis=function(n){return s.LinearAxis&&n instanceof s.LinearAxis||s.LogarithmicAxis&&n instanceof s.LogarithmicAxis;};s.isCategoryAxis=function(g){return s.CategoryAxis&&g instanceof s.CategoryAxis;};s.o9=function(m){if(m==null)return null;var v=m.split(/\s*[,;]\s*/);if(v[0]==="")v.shift();if(v.length>0&&v[v.length-1]==="")v.pop();return v;};s.asNumber=function(l){if(l==null)return null;if(typeof(l)=="number")return l;return new Number(l);};s.parseGradient=function(o){if(!o)return null;var Cb=o.split(/\s+/);if(Cb[0]==="")Cb.shift();if(Cb.length>0&&Cb[Cb.length-1]==="")Cb.pop();if(Cb.length==0)return null;if(Cb.length>4)return [Cb[0],Cb[1],Cb[2],Cb.slice(3).join(" ")];return Cb;};s.addGradient=function(a,c){var Zb=s.parseGradient(c);if(a!=null&&Zb!=null){var mc=new jsx3.vector.Fill(a.getColor(),a.getAlpha());mc.setType("gradient");mc.setColor2(Zb[0]);mc.setAngle(Zb[1]);mc.setAlpha2(Zb[2]);mc.setColors(Zb[3]);return mc;}else{return a;}};});if(jsx3.IDE){jsx3.ide.loadTemplateCatalog("prop","properties/catalog.xml",jsx3.chart.ADDIN);jsx3.ide.loadTemplateCatalog("event","events/catalog.xml",jsx3.chart.ADDIN);}jsx3.Package.definePackage("jsx3.vector",function(g){g.n1="px";g.PQ="http://www.w3.org/2000/svg";g.eZ=function(e){return typeof(e)=="number"?"#"+(e+16777216).toString(16).substring(1):""+e;};g.x0=function(b,i,j){if(b==null)b=0;if(i==null)i=g.n1;if(typeof(b)=="number"){return b+""+i;}else{b=b.toString();b=b.replace(/^\s*(.*?)\s*$/,"$1");if(j)b=b.replace(/[^\d\.]/g,"");return b.match(/[^\d\.]/)?b:b+""+i;}};g.F0=function(h){return Math.max(0,Math.min(1,h));};g.degreesToRadians=function(e){return Math.modpos(2*Math.PI/360*(-1*e+90),2*Math.PI);};});jsx3.Class.defineClass("jsx3.html.Tag",null,null,function(g,q){var Kb=jsx3.Exception;g.Jg=[];q.ij=null;q.vo=null;if(jsx3.CLASS_LOADER.VML){q.init=function(e,m){this.ij=m;this.vo=e;this.nD=document.createElement(e?e+":"+m:m);this.vu=null;this.yg=null;};q.appendChild=function(c){if(this._P(c)){if(c instanceof g&&c.getParent()!=null){throw new Kb("can't append "+c+" to "+this+", already has parent "+c.vu);}if(this.yg==null)this.yg=[];this.yg.push(c);c.vu=this;}else{throw new Kb("Illegal to append child "+c+" to parent "+this+".");}};q.removeChild=function(d){if(this.yg){var Pb=this.yg.indexOf(d);if(Pb>=0){this.yg[Pb].vu=null;this.yg.splice(Pb,1);}}};q.replaceChild=function(h,i){if(this.yg){var I=this.yg.indexOf(i);if(I>=0){this.yg[I].vu=null;this.yg[I]=h;h.vu=this;}}};q.removeChildren=function(){if(this.yg)this.yg.splice(0,this.yg.length);};}else{if(jsx3.CLASS_LOADER.SVG){q.init=function(f,n){this.ij=n;this.vo=f;if(n)this.nD=f?document.createElementNS(f,n):document.createElement(n);this.vu=null;this.yg=null;};q.appendChild=function(n){if(this._P(n)){if(n instanceof g&&n.getParent()!=null){throw new Kb("can't append "+n+" to "+this+", already has parent "+n.vu);}if(this.yg==null)this.yg=[];this.yg.push(n);n.vu=this;this.nD.appendChild(n.nD);}else{throw new Kb("Illegal to append child "+n+" to parent "+this+".");}};q.removeChild=function(d){if(this.yg){var wb=this.yg.indexOf(d);if(wb>=0){this.yg[wb].vu=null;this.yg.splice(wb,1);}}this.nD.removeChild(d.nD);};q.replaceChild=function(j,e){if(this.yg){var W=this.yg.indexOf(e);if(W>=0){this.yg[W].vu=null;this.yg[W]=j;j.vu=this;}}this.nD.replaceChild(j.nD,e.nD);};q.removeChildren=function(){if(this.yg)this.yg.splice(0,this.yg.length);var hc=this.nD.childNodes;for(var Kc=hc.length-1;Kc>=0;Kc--)this.nD.removeChild(hc[Kc]);};}}q.getParent=function(){return this.vu;};q.getChildren=function(){return this.yg==null?g.Jg:this.yg;};q.getId=function(){return this.nD.id;};q.setId=function(l){this.setProperty("id",l);};q.getClassName=function(){return this.nD.className;};q.setClassName=function(n){this.setProperty("className",n);};q.setExtraStyles=function(f){try{this.nD.style.cssText+=(";"+f);}catch(Kc){throw new Kb("Error appending '"+f+"' to 'cssText': "+jsx3.NativeError.wrap(Kc));}};q.release=function(){delete this.vu;if(this.yg){for(var gc=this.yg.length-1;gc>=0;gc--){if(this.yg[gc].release)this.yg[gc].release();}delete this.yg;}};q._P=function(n){return true;};q._T=function(o){return true;};q.setProperty=function(j,e){var Ic=arguments;for(var Ec=0;Ec<Ic.length;Ec=Ec+2){j=Ic[Ec];e=Ic[Ec+1];if(e!=null)this.nD.setAttribute(j,e);else this.nD.removeAttribute(j);}};if(jsx3.CLASS_LOADER.SVG){q.setPropertyNS=function(b,a,n){if(n!=null)this.nD.setAttributeNS(b,a,n);else this.nD.removeAttributeNS(b,a);};}q.getProperty=function(i){return this.nD.getAttribute(i);};q.removeProperty=function(l){var S=arguments;for(var ec=0;ec<S.length;ec++)this.nD.removeAttribute(S[ec]);};q.setStyle=function(m,b){var Db=arguments;for(var G=0;G<Db.length;G=G+2){m=Db[G];b=Db[G+1];try{this.nD.style[m]=b==null?"":b;}catch(Kc){throw new Kb("Error setting style '"+m+"' to '"+b+"': "+jsx3.NativeError.wrap(Kc));}}};q.getStyle=function(l){return this.nD.style[l];};q.removeStyle=function(s){var lb=arguments;for(var Jc=0;Jc<lb.length;Jc++)this.nD.style[lb[Jc]]="";};q.getTagName=function(){return this.ij;};q.getTagNS=function(){return this.vo;};if(jsx3.CLASS_LOADER.VML){q.paint=function(){this.paintUpdate();var ec=[];var D=this.k1(ec,0);return ec.slice(0,D).join("");};q.k1=function(k,s){var gb=this.yg;var ac=jsx3.html.getOuterHTML(this.nD);ac=ac.replace(/^<(\w+(\:\w+)?)\b/,function(d,f){return "<"+f.toLowerCase();});ac=ac.replace(/\b([_a-zA-Z]\w*)=([^\s\"]+) /g,"$1=\"$2\" ");var F=ac.lastIndexOf("</");if(F>=0&&ac.substring(F).indexOf(this.nD.nodeName)!=2)F=-1;if(gb!=null&&gb.length>0){var L=null,T=null;if(F>=0){L=ac.substring(0,F);T=ac.substring(F);}else{L=ac;T="</"+this.nD.nodeName.toLowerCase()+">";}k[s++ ]=L;for(var Wb=0;Wb<gb.length;Wb++){var Zb=gb[Wb];if(typeof(Zb)=="string")k[s++ ]=Zb;else s=Zb.k1(k,s);}k[s++ ]=T;}else{if(F>=0)k[s++ ]=ac.substring(0,F-1);else k[s++ ]=ac.substring(0,ac.length-1);k[s++ ]="/>";}return s;};}else{if(jsx3.CLASS_LOADER.SVG){q.paintDom=function(){this.paintUpdate();return this.nD;};}}q.paintUpdate=function(){var sb=this.yg;if(sb){for(var L=0;L<sb.length;L++)sb[L].paintUpdate();}};q.toString=function(){return "<"+this.getTagName()+"#"+this.getId()+"/>";};q.getFirstChildOfType=function(m){if(typeof(m)=="string")m=jsx3.Class.forName(m).getConstructor();if(this.yg){var tb=this.yg;for(var Fb=0;Fb<tb.length;Fb++){if(tb[Fb] instanceof m)return tb[Fb];}}return null;};});jsx3.Class.defineClass("jsx3.html.Text",jsx3.html.Tag,null,function(q,g){if(jsx3.CLASS_LOADER.VML){g.init=function(p){this.Iw=p;};g.k1=function(a,j){a[j]=this.Iw;return j+1;};g.getText=function(){return this.Iw;};g.setText=function(b){this.Iw=b;};g.paint=function(){return this.Iw;};}else{if(jsx3.CLASS_LOADER.SVG){g.init=function(n){this.nD=document.createTextNode(n!=null?n:"");};g.getText=function(){return this.nD.nodeValue;};g.setText=function(l){this.nD.nodeValue=l;};}}g._P=function(k){return false;};g.toString=function(){return "[jsx3.html.Text \""+this.getText()+"\"]";};});jsx3.Class.defineClass("jsx3.html.BlockTag",jsx3.html.Tag,null,function(b,l){l.init=function(c,q,r,e,h,f){this.jsxsuper(c,q);this.setDimensions(r,e,h,f);};l.getLeft=function(){var Kc=this.getStyle("left");return Kc!=null?parseInt(Kc):null;};l.xi=function(q,m){if(m==null){this.setStyle(q,null);}else{var P=parseInt(m);if(isNaN(P))jsx3.chart.LOG.debug("trying to set "+q+" of "+this+" to "+m);else this.setStyle(q,P+"px");}};l.setLeft=function(a){this.xi("left",a);};l.getTop=function(){var qb=this.getStyle("top");return qb!=null?parseInt(qb):null;};l.setTop=function(r){this.xi("top",r);};l.getWidth=function(){var Ic=this.getStyle("width");return Ic!=null?parseInt(Ic):null;};l.setWidth=function(a){this.xi("width",a);};l.getHeight=function(){var ub=this.getStyle("height");return ub!=null?parseInt(ub):null;};l.setHeight=function(i){this.xi("height",i);};l.getMargin=function(){return this.getStyle("margin");};l.setMargin=function(o){this.setStyle("margin",o);};l.getPadding=function(){return this.getStyle("padding");};l.setPadding=function(a){this.setStyle("padding",a);};l.getPosition=function(){return this.getStyle("position");};l.setPosition=function(j){this.setStyle("position",j);};l.getZIndex=function(){return this.getStyle("zIndex");};l.setZIndex=function(m){this.setStyle("zIndex",m);};l.getBackgroundColor=function(){return this.getStyle("backgroundColor");};l.setBackgroundColor=function(c){this.setStyle("backgroundColor",c);};l.getMarginDimensions=function(){return b.nR(this.getMargin());};l.getPaddingDimensions=function(){return b.nR(this.getPadding());};b.nR=function(c){if(c){if(typeof(c)=="number"){return [c,c,c,c];}else{var v=(""+c).split(/[^\d\-]+/);if(v[0]==="")v.shift();if(v.length>0&&v[v.length]==="")v.pop();if(v.length>=4){return [parseInt(v[0]),parseInt(v[1]),parseInt(v[2]),parseInt(v[3])];}else{if(v.length>=1){var G=parseInt(v[0]);return [G,G,G,G];}}}}return [0,0,0,0];};l.getDimensions=function(){return [this.getLeft(),this.getTop(),this.getWidth(),this.getHeight()];};l.setDimensions=function(k,n,i,o){if(k instanceof Array){this.setLeft(k[0]);this.setTop(k[1]);this.setWidth(k[2]);this.setHeight(k[3]);}else{this.setLeft(k);this.setTop(n);this.setWidth(i);this.setHeight(o);}};});jsx3.Class.defineInterface("jsx3.html.FontTag",null,function(q,s){s.getFontFamily=function(){return this.getStyle("fontFamily");};s.setFontFamily=function(a){this.setStyle("fontFamily",a);};s.getFontSize=function(){return this.getStyle("fontSize");};s.setFontSize=function(h){this.setStyle("fontSize",isNaN(h)?h:h+"px");};s.getFontStyle=function(){return this.getStyle("fontStyle");};s.setFontStyle=function(f){this.setStyle("fontStyle",f);};s.getFontWeight=function(){return this.getStyle("fontWeight");};s.setFontWeight=function(e){this.setStyle("fontWeight",e);};s.getTextAlign=function(){return this.getStyle("textAlign");};s.setTextAlign=function(l){this.setStyle("textAlign",l);};s.getTextDecoration=function(){return this.getStyle("textDecoration");};s.setTextDecoration=function(j){this.setStyle("textDecoration",j);};s.getColor=function(){return this.getStyle("color");};s.setColor=function(r){this.setStyle("color",r);};});jsx3.Class.defineClass("jsx3.vector.Canvas",jsx3.html.BlockTag,null,function(s,a){a.init=function(g,j,m,k){this.jsxsuper(jsx3.vector.PQ,"svg",g,j,m,k);this.setProperty("version","1.1","baseProfile","full","xmlns:xlink","http://www.w3.org/1999/xlink");};a.paintUpdate=function(){this.jsxsuper();if(this.nB!=null&&this.nB.getParent()==null)this.appendChild(this.nB);if(this.getPosition()!="absolute"){this.setLeft(null);this.setTop(null);}};a.getDefs=function(){if(this.nB==null){this.nB=new jsx3.html.Tag(jsx3.vector.PQ,"defs");this.appendChild(this.nB);}return this.nB;};a.setWidth=function(d){this.jsxsuper(d);this.setProperty("width",typeof(d)=="number"?d+"px":d);};a.setHeight=function(g){this.jsxsuper(g);this.setProperty("height",typeof(g)=="number"?g+"px":g);};});jsx3.Class.defineClass("jsx3.vector.Tag",jsx3.html.BlockTag,null,function(o,f){f.init=function(h,d,g,p,c){this.jsxsuper(jsx3.vector.PQ,h,d,g,p,c);};f.getToolTip=function(){return this.getProperty("title");};f.setToolTip=function(d){this.setProperty("title",d);};f.setRotation=function(p){this.xG=p;};f.setLeft=function(c){this.Sj=c;};f.setTop=function(d){this.xx=d;};f.setWidth=function(m){this.Ul=m;};f.setHeight=function(l){this.Ir=l;};f.setPosition=function(k){this._x=k;};f.getRotation=function(){return this.xG;};f.getLeft=function(){return this.Sj;};f.getTop=function(){return this.xx;};f.getWidth=function(){return this.Ul;};f.getHeight=function(){return this.Ir;};f.getPosition=function(){return this._x;};f.setZIndex=function(q){this.jsxsuper(q);var ob=this.getParent();if(ob){var Yb=ob.getChildren();for(var zb=0;zb<Yb.length;zb++){var Pb=Yb[zb];if(Pb instanceof o){var jb=parseInt(Pb.getZIndex());if(q<jb){if(Pb!=this){ob.nD.removeChild(this.nD);ob.nD.insertBefore(this.nD,Pb.nD);}break;}}}}};f.appendChild=function(g){if(this._P(g)){if(g instanceof o&&g.getParent()!=null){throw new jsx3.Exception("can't append "+g+" to "+this+", already has parent "+g.vu);}if(this.yg==null)this.yg=[];if(g instanceof o){var jb=parseInt(g.getZIndex());if(!isNaN(jb)){for(var Qb=0;Qb<this.yg.length;Qb++){var Wb=this.yg[Qb];var qb=parseInt(Wb.getZIndex());if(jb<qb){this.nD.insertBefore(g.nD,Wb.nD);}}}}if(g.nD.parentNode==null)this.nD.appendChild(g.nD);this.yg.push(g);g.vu=this;}else{throw new jsx3.Exception("Illegal to append child "+g+" to parent "+this+".");}};f.getDefs=function(){var w=this.getParent();return w!=null?w.getDefs():null;};});jsx3.Class.defineClass("jsx3.vector.Stroke",jsx3.html.Tag,null,function(m,s){var gb=jsx3.vector;m.D1=null;s.init=function(p,j,h){this.jsxsuper(gb.PQ,m.D1);this.Vt=null;this.iD=p!=null?p:0;this.Ul=j!=null?j:1;this.Vz=h!=null?gb.F0(h):1;};s.getColor=function(){return this.iD;};s.getColorHtml=function(){return gb.eZ(this.iD);};s.setColor=function(e){this.iD=e;};s.getWidth=function(){return this.Ul;};s.setWidth=function(n){this.Ul=n;};s.getAlpha=function(){return this.Vz;};s.setAlpha=function(p){this.Vz=p!=null?gb.F0(p):null;};s._P=function(n){return false;};s.toString=function(){return "<stroke "+this.getColorHtml()+" "+this.Ul+" "+this.Vz+"/>";};s.paint=function(){var qb="<"+gb.PQ+":"+this.getTagName();if(this.getId()!=null)qb=qb+(" id='"+this.getId()+"'");var db=this.getColorHtml();if(this.Vt!=null)qb=qb+(" on='"+this.Vt+"'");if(db!=null)qb=qb+(" color='"+db+"'");if(this.Vz!=null&&this.Vz<1)qb=qb+(" opacity='"+this.Vz+"'");if(this.Ul!=null)qb=qb+(" weight='"+gb.x0(this.Ul)+"'");qb=qb+"/>";return qb;};s.KJ=function(){return this.Vz==1||this.Vz==null;};m.valueOf=function(a){if(jsx3.util.strEmpty(a))return null;if(a instanceof m)return a;var Kb=a.toString().split(/\s+/);return new m(Kb[0],Kb[1],Kb[2]);};});jsx3.Class.defineClass("jsx3.vector.Fill",jsx3.html.Tag,null,function(c,b){var gb=jsx3.vector;c.D1=null;b.init=function(e,m){this.jsxsuper(gb.PQ,c.D1);this.Vt=null;this.iD=e!=null?e:0;this.Vz=m!=null?gb.F0(m):1;this.Se=null;this.Xm=null;this.Tp=null;this.xs=null;this.al=null;};b.getColor=function(){return this.iD;};b.getColorHtml=function(){return gb.eZ(this.iD);};b.setColor=function(s){this.iD=s;};b.getAlpha=function(){return this.Vz;};b.setAlpha=function(l){this.Vz=l!=null?gb.F0(l):null;};b.getType=function(){return this.Se;};b.setType=function(g){this.Se=g;};b.getColor2=function(){return this.Xm;};b.getColor2Html=function(){return gb.eZ(this.Xm);};b.setColor2=function(n){this.Xm=n;};b.getAlpha2=function(){return this.Tp;};b.setAlpha2=function(m){this.Tp=m;};b.getAngle=function(){return this.xs;};b.setAngle=function(l){this.xs=l;};b.getColors=function(){return this.al;};b.setColors=function(l){this.al=l;};b.toString=function(){return "<fill "+this.getColorHtml()+" "+this.getAlpha()+"/>";};b.hasGradient=function(){return this.Se&&this.Se!="solid";};b.KJ=function(){return (this.Vz==1||this.Vz==null)&&!this.hasGradient();};c.valueOf=function(n){if(jsx3.util.strEmpty(n))return null;if(n instanceof c)return n;var Ec=n.toString().split(/\s+/);return new c(Ec[0],Ec[1]);};b._P=function(q){return false;};});jsx3.Class.defineClass("jsx3.vector.Group",jsx3.vector.Tag,null,function(i,k){k.init=function(p,s,d,a){this.jsxsuper(i.D1,p,s,d,a);};i.D1="g";k.paintUpdate=function(){this.jsxsuper();var I=this.getLeft()||Number(0);var yc=this.getTop()||Number(0);if(I||yc)this.setProperty("transform","translate("+I+","+yc+")");};k._P=function(r){return r instanceof i||r instanceof jsx3.vector.Shape;};});jsx3.Class.defineClass("jsx3.vector.Shape",jsx3.vector.Tag,null,function(j,n){var _b=jsx3.html.Tag;var lb=jsx3.vector;n.init=function(b,e,h,o,i){this.jsxsuper(b!=null?b:j.D1,e,h,o,i);this.Rl=null;this.sw=null;};n.getPath=function(){return this.getProperty("d");};n.setPath=function(q){this.setProperty("d",q);};n.X6=function(i,h,a){this.vr((a?"m":"M")+" "+i+" "+h);return this;};n.Z7=function(k,r,b){this.vr((b?"l":"L")+" "+k+" "+r);return this;};n.XZ=function(b,i,a,s,k,g,r,f,q){var ec=Math.sqrt(Math.pow(k-b,2)+Math.pow(g-i,2));var bc=Math.sqrt(Math.pow(r-b,2)+Math.pow(f-i,2));var Gb=Math.asin((i-g)/ec);if(k-b<0)Gb=(Gb>0?Math.PI:-Math.PI)-Gb;var Xb=Math.asin((i-f)/bc);if(r-b<0)Xb=(Xb>0?Math.PI:-Math.PI)-Xb;var Jc=q?Gb-Xb:Xb-Gb;var Zb=Jc>-1*Math.PI&&Jc<0||Jc>Math.PI;this.Z7(k,g).vr("A "+a+" "+s+" 0 "+(Zb?"1":"0")+" "+(q?"1":"0")+" "+r+" "+f);return this;};n.w9=function(){this.vr("z");return this;};n.vr=function(o){var K=this.getPath();if(!K)this.setPath(o);else this.setPath(K+" "+o);};j.D1="path";n.paintUpdate=function(){this.jsxsuper();if(this.Rl!=null){if(this.Rl.hasGradient()){var jc=this;var G;while(!(G=jc.getId()))jc=jc.getParent();var rb="grad_"+G;if(this.UB!=null&&this.UB.getParent()!=null)this.UB.getParent().removeChild(this.UB);this.setProperty("fill","url(#"+rb+")");this.removeProperty("fill-opacity");this.UB=new _b(lb.PQ,"linearGradient");this.UB.setId(rb);var E=this.Rl.getAngle()||Number(0);var wc=Math.modpos(2*Math.PI/360*(-1*E-90),2*Math.PI);var bc=Math.cos(wc);var Zb=Math.sin(wc);var tc=Math.max(Math.abs(bc),Math.abs(Zb));Zb=Zb/tc;bc=bc/tc;this.UB.setProperty("x1",(0.5-bc/2).roundTo(1.0E-4),"y1",(0.5-Zb/2).roundTo(1.0E-4),"x2",(0.5+bc/2).roundTo(1.0E-4),"y2",(0.5+Zb/2).roundTo(1.0E-4));var Wb=this.getRotation();if(Wb)this.UB.setProperty("gradientTransform","rotate("+-Wb+")");var Ub=new _b(lb.PQ,"stop");Ub.setProperty("offset","0%","stop-color",this.Rl.getColorHtml(),"stop-opacity",this.Rl.getAlpha());this.UB.appendChild(Ub);var P=this.Rl.getColors();if(P){var u=P.split(/\s*,\s*/);for(var oc=0;oc<u.length;oc++){var fb=u[oc].trim().split(/\s+/,2);if(fb.length==2){var Sb=parseInt(fb[0]);if(!isNaN(Sb)){var db=new _b(lb.PQ,"stop");db.setProperty("offset",Sb+"%","stop-color",fb[1]);this.UB.appendChild(db);}}}}var Jc=new _b(lb.PQ,"stop");Jc.setProperty("offset","100%","stop-color",this.Rl.getColor2Html(),"stop-opacity",this.Rl.getAlpha2()!=null?this.Rl.getAlpha2():1);this.UB.appendChild(Jc);this.getDefs().appendChild(this.UB);}else{this.setProperty("fill",this.Rl.getColorHtml(),"fill-opacity",this.Rl.getAlpha());}}else{this.setProperty("fill","none");this.removeProperty("fill-opacity");if(this.UB!=null&&this.UB.getParent()!=null)this.UB.getParent().removeChild(this.UB);}if(this.sw!=null){var pb=this.sw.getWidth();this.setProperty("stroke",this.sw.getColor(),"stroke-width",pb||Number(1),"stroke-opacity",this.sw.getAlpha());}else{this.setProperty("stroke","none");this.removeProperty("stroke-width","stroke-opacity");}var pc=[];var tb=this.getLeft()||Number(0);var fc=this.getTop()||Number(0);if(tb||fc)pc.push("translate("+tb+","+fc+")");var Wb=this.getRotation();if(Wb)pc.push("rotate("+Wb+","+Math.round(this.getWidth()/2)+","+Math.round(this.getHeight()/2)+")");this.setProperty("transform",pc.length>0?pc.join(" "):null);};n.setFill=function(m){this.Rl=m;};n.setStroke=function(i){this.sw=i;};n.getFill=function(){return this.Rl;};n.getStroke=function(){return this.sw;};});jsx3.Class.defineClass("jsx3.vector.Line",jsx3.vector.Shape,null,function(k,n){n.init=function(g,j,f,m,e,l){this.jsxsuper("line",g,j);this.fS(f,m,e,l);};n.fS=function(j,q,i,p){this.setX1(j);this.setY1(q);this.setX2(i);this.setY2(p);};n.getX1=function(){return this.getProperty("x1");};n.setX1=function(r){this.setProperty("x1",r);};n.getY1=function(){return this.getProperty("y1");};n.setY1=function(d){this.setProperty("y1",d);};n.getX2=function(){return this.getProperty("x2");};n.setX2=function(h){this.setProperty("x2",h);};n.getY2=function(){return this.getProperty("y2");};n.setY2=function(i){this.setProperty("y2",i);};n.toString=function(){return "<line "+this.getId()+" {"+this.getX1()+","+this.getY1()+"} {"+this.getX2()+","+this.getY2()+"}/>";};});jsx3.Class.defineClass("jsx3.vector.Rectangle",jsx3.vector.Shape,null,function(r,i){i.init=function(p,s,d,a){this.jsxsuper("rect",p,s,d,a);};i.bI=function(p){this.ET(p.getLeft(),p.getTop(),p.getWidth(),p.getHeight());};i.ET=function(l,k,m,c){var xb=Math.max(this.getLeft(),l);var T=Math.max(this.getTop(),k);var vc=Math.min(this.getWidth()-(xb-this.getLeft()),l+m-xb);var Fb=Math.min(this.getHeight()-(T-this.getTop()),k+c-T);this.setDimensions(xb,T,vc,Fb);};i.getWidth=function(){var Jb=this.getProperty("width");return Jb!=null?parseInt(Jb):null;};i.setWidth=function(e){this.setProperty("width",typeof(e)=="number"?e+"px":e);};i.getHeight=function(){var z=this.getProperty("height");return z!=null?parseInt(z):null;};i.setHeight=function(b){this.setProperty("height",typeof(b)=="number"?b+"px":b);};});jsx3.Class.defineClass("jsx3.vector.Oval",jsx3.vector.Shape,null,function(a,b){b.init=function(p,s,d,k){this.jsxsuper(a.D1,p,s,d,k);};a.D1="ellipse";b.getLeft=function(){var N=this.getProperty("cx");return N!=null?parseInt(N):null;};b.setLeft=function(f){this.setProperty("cx",typeof(f)=="number"?f+"px":f);};b.getTop=function(){var vc=this.getProperty("cy");return vc!=null?parseInt(vc):null;};b.setTop=function(k){this.setProperty("cy",typeof(k)=="number"?k+"px":k);};b.getWidth=function(){var Q=this.getProperty("rx");return Q!=null?2*parseInt(Q):null;};b.setWidth=function(s){this.setProperty("rx",s!=null?parseFloat(s)/2+"px":null);};b.getHeight=function(){var Jc=this.getProperty("ry");return Jc!=null?2*parseInt(Jc):null;};b.setHeight=function(e){this.setProperty("ry",e!=null?parseFloat(e)/2+"px":null);};b.paintUpdate=function(){this.jsxsuper();this.setProperty("transform","translate("+this.getWidth()/2+","+this.getHeight()/2+")");};});jsx3.Class.defineClass("jsx3.vector.Polygon",jsx3.vector.Shape,null,function(r,o){o.init=function(k,n,q){this.jsxsuper("polyline",k,n);this.HG=null;this.XG=q;this.vG=q!=null?q.join(" "):null;};o.fS=function(i){this.HG=i;this.XG=null;this.vG=i!=null?i.join(" "):null;};o.OJ=function(b){this.HG=null;this.XG=b;this.vG=b!=null?b.join(" "):null;};o._Q=function(q){this.HG=null;this.XG=null;this.vG=q;};o.paintUpdate=function(){this.jsxsuper();this.setProperty("points",this.vG);};});jsx3.Class.defineClass("jsx3.vector.TextLine",jsx3.vector.Shape,[jsx3.html.FontTag],function(g,b){var bc=jsx3.html.Tag;var Ab=jsx3.app.Browser;var G=jsx3.vector;b.init=function(j,q,i,p,l){this.IF=j;this.Yu=q;this.iG=i;this.QC=p;var ec=Math.max(1,Math.max(j,i)-Math.min(j,i));var sb=Math.max(1,Math.max(q,p)-Math.min(q,p));this.jsxsuper("text",null,null,ec,sb);var R=0;var mc=Math.sqrt(Math.pow(i-j,2)+Math.pow(p-q,2));if(q>=p){R=360-Math.round(Math.acos((i-j)/mc)*180/Math.PI);}else{R=Math.round(Math.acos((i-j)/mc)*180/Math.PI);}this.xs=R%360;this.Iw=new jsx3.html.Text(l);};b.getText=function(){return this.Iw.getText();};b.setText=function(p){this.Iw.setText(p);};b.paintUpdate=function(){if(!this.getProperty("fill")){if(this.Rl!=null){this.setProperty("fill",this.Rl.getColorHtml(),"fill-opacity",this.Rl.getAlpha());}else{this.removeProperty("fill","fill-opacity");}}if(this.sw!=null){var bb=this.sw.getWidth();this.setProperty("stroke",this.sw.getColor(),"stroke-width",bb||Number(1));}else{this.removeProperty("stroke","stroke-width");}var kb=this.getFontSize();if(kb==null){var Y=Ab.getStyleClass("."+this.getClassName());if(Y!=null)kb=Y.fontSize;}this.setProperty("dy",kb?Math.floor(parseInt(kb)/2.5):0);var sb=this.getTextAlign();if(!sb){var Y=Ab.getStyleClass("."+this.getClassName());if(Y!=null)sb=Y.textAlign;}var uc=null,A=null,Fc=null;if(sb=="left"){Fc="start";uc=this.IF;A=this.Yu;}else{if(sb=="right"){Fc="end";uc=this.iG;A=this.QC;}else{Fc="middle";uc=Math.round((this.iG+this.IF)/2);A=Math.round((this.QC+this.Yu)/2);}}this.setProperty("text-anchor",Fc,"x",uc,"y",A);if(this.xs>0)this.setProperty("transform","rotate("+this.xs+","+uc+","+A+")");else this.removeProperty("transform");if(this.Iw.getParent()==null)this.appendChild(this.Iw);};b.getFontFamily=function(){return this.getProperty("font-family");};b.setFontFamily=function(s){this.setProperty("font-family",s);};b.getFontStyle=function(){return this.getProperty("font-style");};b.setFontStyle=function(l){this.setProperty("font-style",l);};b.getFontWeight=function(){return this.getProperty("font-weight");};b.setFontWeight=function(m){this.setProperty("font-weight",m);};b.getTextDecoration=function(){return this.getProperty("text-decoration");};b.setTextDecoration=function(p){this.setProperty("text-decoration",p);};b.getColor=function(){return this.getProperty("fill");};b.setColor=function(a){this.setProperty("fill",a);};b._P=function(e){return e instanceof jsx3.html.Text;};});jsx3.Class.defineClass("jsx3.vector.LineGroup",jsx3.vector.Shape,null,function(n,m){m.init=function(p,s,d,a){this.jsxsuper(null,p,s,d,a);};m.HS=function(h,o,g,b){this.X6(h,o).Z7(g,b);};m.aT=function(o,c,d,l){this.X6(o,c).Z7(d,l,true);};m.ZM=function(){this.setPath("");};});jsx3.Class.defineClass("jsx3.vector.RectangleGroup",jsx3.vector.Shape,null,function(h,r){r.init=function(p,s,d,a){this.jsxsuper(null,p,s,d,a);};r.C6=function(b,o,g,n){this.X6(b,o).Z7(g,o).Z7(g,n).Z7(b,n).w9();};r.pJ=function(o,c,q,m){this.X6(o,c).Z7(q,0,true).Z7(0,m,true).Z7(-1*q,0,true).w9();};r.OT=function(){this.setPath("");};});
