zingchart
Version:
Our JavaScript charting library is a commercial product. But the full branded version is free to try, forever.
8 lines (7 loc) • 33.7 kB
JavaScript
/*
All of the code within the ZingChart software is developed and copyrighted by ZingChart, Inc., and may not be copied,
replicated, or used in any other software or application without prior permission from ZingChart. All usage must coincide with the
ZingChart End User License Agreement which can be requested by email at support@zingchart.com.
Build 2.9.11
*/
var P4={$i:function(e){this.b(e);var i=this;i.WO=null,i.BG=null,i.M=null,i.SI=null,i.A7=null,i.K9=!1,i.O7=!1,i.L0=!1,i.A66=!1},parse:function(){var e,i=this;i.BG=zingchart.pool.getInstance("box"===i.WO.type?"HQ":"DQ",i.A,i.K+"-shape",i.WO.tween),i.BG.append(i.WO),i.BG.iX=i.iX,i.BG.iY=i.iY,i.BG.K=i.K+"-gshape",i.BG.O7=i.O7,i.A66||null===ZC._n_(e=i.BG.o.points)||(i.BG.o.points=ZC.AQ.A5L(e,i.A.iX,i.A.iY),i.A66=!0),i.BG.parse(),null!==ZC._n_(e=i.BG.o.label)&&null!==ZC._n_(e.text)&&""!==e.text&&("undefined"==typeof e.visible||ZC._b_(e.visible))&&(i.M=zingchart.pool.getInstance("DN",i,i.A.K+"-shape-label-"+i.H6,ZC.objmove),ZC.objmove||i.M.append(e)),null!==ZC._n_(e=i.BG.o["static"])&&(i.K9=ZC._b_(e)),null!==ZC._n_(e=i.BG.o.flat)&&(i.K9=ZC._b_(e)),null!==ZC._n_(e=i.BG.o.dynamic)&&(i.L0=ZC._b_(e)),null!==ZC._n_(e=i.BG.o.connector)&&(i.SI=new ZC.DQ(i),i.SI.append(e),i.SI.parse())},paint:function(){var e,i=this;if(i.BG.Z=i.Z,i.BG.C7=i.C7,i.BG.locate(2),i.BG.VY=!1,"box"===i.BG.o.type&&(i.iX-=i.BG.I/2,i.iY-=i.BG.F/2,i.BG.iX-=i.BG.I/2,i.BG.iY-=i.BG.F/2),i.BG.paint(),i.M){if(i.M.Z=i.M.C7=i.Z,i.M.IM=ZC.AL(i.A.A.K+"-text"),i.M.K=i.A.K+"-shape-label-"+i.H6,i.M.GL=i.A.K+"-shape-label zc-shape-label",i.M.o.anchor=i.M.o.anchor||"c",!i.WO["map-item"])switch(i.DV){default:i.M.o.x=i.iX,i.M.o.y=i.iY;break;case"line":case"poly":case"rect":case"rectangle":i.M.o.x=ZC._i_((i.BG.D2[0]+i.BG.D2[2])/2),i.M.o.y=ZC._i_((i.BG.D2[1]+i.BG.D2[3])/2)}if(ZC.objmove||i.M.parse(),i.M.iX=i.M.iX+i.BG.BK,i.M.iY=i.M.iY+i.BG.BI,i.M.AN){if(i.SI&&i.SI.D.length>0){if(!ZC.AL(i.A.K+"-objects-front")){var a=i.A.A.I+"/"+i.A.A.F;ZC.Q.K1({cls:"zc-abs",wh:a,id:i.A.K+"-objects-front",p:ZC.AL(i.A.A.K+"-objects-front")},i.A.A.AC),ZC.Q.HH({cls:"zc-abs zc-layer",id:i.A.K+"-objects-front-c",p:ZC.AL(i.A.K+"-objects-front"),wh:a},i.A.A.AC)}var l=i.SI.D,t=i.SI.o.anchor||"",o=l[l.length-1];switch(t){case"l":i.M.iX=o[0]+i.BG.BK,i.M.iY=o[1]-i.M.F/2+i.BG.BI;break;case"r":i.M.iX=o[0]-i.M.I+i.BG.BK,i.M.iY=o[1]-i.M.F/2+i.BG.BI;break;case"t":i.M.iX=o[0]-i.M.I/2+i.BG.BK,i.M.iY=o[1]+i.BG.BI;break;case"b":i.M.iX=o[0]-i.M.I/2+i.BG.BK,i.M.iY=o[1]-i.M.F+i.BG.BI;break;default:i.M.iX=o[0]-i.M.I/2+i.BG.BK,i.M.iY=o[1]-i.M.F/2+i.BG.BI}e=ZC.Q.EC(ZC.AL(i.A.K+"-objects-front-c"),i.A.H.AC),ZC.CR.setup(e,i.SI),ZC.CR.paint(e,i.SI,l)}if(i.M.VY=!1,i.WO["map-item"]&&(i.M.GL=i.A.K+"-mapshape-label zc-mapshape-label",i.M.iX<i.A.iX||i.M.iX+i.M.I>i.A.iX+i.A.I||i.M.iY<i.A.iY||i.M.iY+i.M.F>i.A.iY+i.A.F))return;i.M.paint(),i.E["print-canvas"]?i.M.EM(ZC.AL(i.E["print-canvas"])):i.M.EM()}}}};ZC.P4=ZC.DQ.CC(P4);var A7W={$i:function(e){this.b(e);var i=this;i.MY=null,i.BB=null,i.M=null,i.JS=0,i.BG=null,i.GG="bottom",i.L3=40,i.A2W=[2,4]},parse:function(){var e,i,a,l=this;(l.assign_a([["z-index","JS","i"],["length","L3","i"],["aspect","A2W"],["direction","GG"]]),null===ZC._n_(l.o.from)&&null===ZC._n_(l.o.to))&&(null!==ZC._n_(l.o.x)&&null!==ZC._n_(l.o.y)&&null!==ZC._n_(l.o.length)&&null!==ZC._n_(l.o.angle)&&(i="string"==typeof l.o.x?l.A.V4(l.o.x)[0]:ZC._i_(l.o.x),a="string"==typeof l.o.y?l.A.V4(l.o.y)[1]:ZC._i_(l.o.y),l.o.from={x:i+l.L3*ZC.EP(l.AA+180),y:a+l.L3*ZC.EI(l.AA+180)},l.o.to={x:i+l.L3*ZC.EP(l.AA),y:a+l.L3*ZC.EI(l.AA)}));null!==ZC._n_(e=l.o.from)&&(l.MY=new ZC.DQ(l.A),l.MY.append(e),null!==e.hook&&(l.MY.E.hook=e.hook),l.MY.parse(),"string"==typeof e&&(l.MY.E.hook=e)),null!==ZC._n_(e=l.o.to)&&(l.BB=new ZC.DQ(l.A),l.BB.append(e),null!==e.hook&&(l.BB.E.hook=e.hook),l.BB.parse(),"string"==typeof e&&(l.BB.E.hook=e)),(null!==ZC._n_(e=l.o.label)||""!==l.o.text&&"undefined"!=typeof l.o.text)&&(l.M=new ZC.DN(l),l.M.append(l.o),l.M.append(e),l.M.parse()),l.b()},paint:function(){var e,i,a=this;if(a.AN&&(null!==a.MY||null!==a.BB))if(a.AI<1&&(a.AI=1),!a.MY||null===ZC._n_(e=a.MY.E.hook)||(i=a.A.V4(e),a.MY.iX=i[0],a.MY.iY=i[1],a.MY.iX+=a.MY.BK,a.MY.iY+=a.MY.BI,ZC.DP(a.MY.iX,a.A.P.iX-2,a.A.P.iX+a.A.P.I+2)&&ZC.DP(a.MY.iY,a.A.P.iY-2,a.A.P.iY+a.A.P.F+2)))if(!a.BB||null===ZC._n_(e=a.BB.E.hook)||(i=a.A.V4(e),a.BB.iX=i[0],a.BB.iY=i[1],a.BB.iX+=a.BB.BK,a.BB.iY+=a.BB.BI,ZC.DP(a.BB.iX,a.A.P.iX-2,a.A.P.iX+a.A.P.I+2)&&ZC.DP(a.BB.iY,a.A.P.iY-2,a.A.P.iY+a.A.P.F+2))){var l,t;if(a.MY&&a.BB)l=[a.MY.iX,a.MY.iY],t=[a.BB.iX,a.BB.iY];else if(a.MY&&!a.BB)switch(l=[a.MY.iX,a.MY.iY],a.GG){case"top":t=[a.MY.iX,a.MY.iY+a.L3];break;case"right":t=[a.MY.iX+a.L3,a.MY.iY];break;case"bottom":t=[a.MY.iX,a.MY.iY-a.L3];break;case"left":t=[a.MY.iX-a.L3,a.MY.iY]}else if(!a.MY&&a.BB)switch(t=[a.BB.iX,a.BB.iY],a.GG){case"top":l=[a.BB.iX,a.BB.iY+a.L3];break;case"right":l=[a.BB.iX-a.L3,a.BB.iY];break;case"bottom":l=[a.BB.iX,a.BB.iY-a.L3];break;case"left":l=[a.BB.iX+a.L3,a.BB.iY]}var o,n=t[0]-l[0],s=t[1]-l[1],r=ZC.U0(Math.atan2(s,n)),p=Math.sqrt(n*n+s*s),c=[];if(c.push(l),o=ZC.AO.BN(l[0],l[1],a.AI/2,r+90),c.push(o),o=ZC.AO.BN(o[0],o[1],p-a.A2W[1]*a.AI/2,r),c.push(o),o=ZC.AO.BN(o[0],o[1],a.A2W[0]*a.AI/2,r+90),c.push(o),c.push(t),o=ZC.AO.BN(o[0],o[1],(2*a.A2W[0]+2)*a.AI/2,r-90),c.push(o),o=ZC.AO.BN(o[0],o[1],a.A2W[0]*a.AI/2,r+90),c.push(o),o=ZC.AO.BN(l[0],l[1],a.AI/2,r-90),c.push(o),c.push(l),a.BG=new ZC.DQ(a.A),a.BG.K=a.K,a.BG.Z=a.BG.C7=a.Z,a.BG.copy(a),a.BG.D=c,a.BG.D0=!1,a.BG.parse(),a.BG.paint(),null!==a.M&&a.M.AN){a.M.Z=a.Z,a.M.K=a.A.K+"-arrow-label-"+a.H6,a.M.GL=a.A.K+"-arrow-label zc-arrow-label";var C=ZC.AO.JW(l[0],l[1],t[0],t[1]);a.M.iX=C[0],a.M.iY=C[1],a.M.BK-=a.M.I/2,a.M.BI-=a.M.F/2,null!==ZC._n_(a.M.o["font-angle"])&&"inherit"===a.M.o["font-angle"]&&(a.M.AA=r),a.M.paint(),a.M.EM()}}else a.AN=!1;else a.AN=!1}};ZC.A7W=ZC.DQ.CC(A7W),ZC.WG.push("objects"),ZC.JL.prototype.Q1=function(){var e,i,a,l,t,o,n,s,r=this;r.initObjectsLayers(),r.BY=[],r.FH=[],r.Y6=[],r.L1=[],r.FA=[],r.XD={};var p,c,C,A=r.A.B8,Z="("+r.AF+")";if(null!==ZC._n_(p=r.o.labels))for(i=0,a=p.length;i<a;i++){p[i].id||(p[i].id="lbl_"+i+"_"+ZC._r_(1e3,9999)),l=p[i].id||i,t=!1,o=!1,r.E["objects.updates"]&&-1===ZC.AV(r.E["objects.updates"],l)&&(t=!0,o=!0),p[i].tween&&(t=!0);var u=zingchart.pool.getInstance("DN",r,r.K+"-label-"+l,t);if(!o||!u._POOL_){if(A.load(u.o,Z+".label"),u.append(p[i]),null!==ZC._n_(e=u.o.parent))for(var h=0;h<r.BY.length;h++)if(""+r.BY[h].H6==""+e){u.E["p-x"]=r.BY[h].iX,u.E["p-y"]=r.BY[h].iY,u.E["p-width"]=r.BY[h].I,u.E["p-height"]=r.BY[h].F;break}if(u.H6=l,u.K=r.K+"-label-"+l,u.GL=r.K+"-label zc-label",null!==ZC._n_(e=p[i].hook)&&(u.E.hook=e),u.JX=function(i){if(!i||-1===(""+i).indexOf("%"))return i;i=""+i;var a,l=[];l.push(["%id",r.A.K]),l.push(["%graphid",r.K.replace(r.A.K+"-graph-","")]);var t=r.E.update;for(var o in t)l.push(["%"+o,t[o]]);l.sort(ZC.A1Q);for(var n=0,s=l.length;n<s;n++)a=new RegExp(l[n][0],"g"),i=i.replace(a,l[n][1]);var p,c,C,A,Z=u.o["default-value"]||" ";for(a=new RegExp("(%plot-([0-9]+?)-value(-*)([0-9]*?))|(%plot-value-([0-9]+?))|(%plot-value)|(%npv)|(%node-percent-value)","g"),i=i.replace(a,Z),a=new RegExp("%plot-([0-9]+?)-data-([a-zA-Z0-9-]+)","g"),i=i.replace(a,Z),a=new RegExp("\\((.+?)\\)\\(([0-9]*)\\)\\(([0-9]*)\\)");p=a.exec(i);)if("%node-value"===p[1]){c="";var h=0,_=0;""!==(e=p[2])&&(h=ZC._i_(e)),""!==(e=p[3])&&(_=ZC._i_(e)),(A=r.AZ.A3[h])&&(C=A.FK(_,3))&&(c=C.JX(p[1])),i=i.replace(p[0],c)}return i},u.parse(),p[i]["3d"]){var _=new ZC.CF(r,u.iX+u.I/2-ZC.AP.E4,u.iY+u.F/2-ZC.AP.E5,ZC._i_(p[i].z||"0"));u.iX=_.ED[0]-u.I/2,u.iY=_.ED[1]-u.F/2}}r.BY.push(u),r.FA.push({type:"label",index:i,zindex:u.JS}),r.XD[l]={shape:"label",idx:i}}if(null!==ZC._n_(c=r.o.arrows))for(i=0,a=c.length;i<a;i++){var d=new ZC.A7W(r);A.load(d.o,Z+".arrow"),d.append(c[i]),l=c[i].id||i,d.K=r.K+"-arrow-"+l,d.parse(),r.Y6.push(d),r.FA.push({type:"arrow",index:i,zindex:d.JS})}var f,b=0;if(null!==ZC._n_(C=r.o.shapes))for(i=0,a=C.length;i<a;i++)if(null===ZC._n_(C[i].type)||0!==C[i].type.indexOf("zingchart.")){var B,m,v;if(C[i].id||(C[i].id="shp_"+i+"_"+ZC._r_(1e3,9999)),l=C[i].id||i,o=null!==ZC._n_(zingchart.pool[r.K+"-shape-"+l])&&zingchart.SKIP.PARSE3D,t=!1,r.E["objects.updates"]&&-1===ZC.AV(r.E["objects.updates"],l)&&(t=!0,o=!0),C[i].tween&&(t=!0),C[i]["3d"]?((n=zingchart.pool.getInstance("DQ",r,r.K+"-shape-"+l,!0)).o=C[i],("poly"!==C[i].type||C[i]["map-item"])&&(o=!1)):(null!==ZC._n_(C[i].label)?(n=zingchart.pool.getInstance("P4",r,r.K+"-shape-"+l,t)).WO=C[i]:((n=zingchart.pool.getInstance("DQ",r,r.K+"-shape-"+l,t)).o=C[i],n.append({},!0)),t&&n._POOL_||(o=!1)),o||(n.H6=l,n.K=r.K+"-shape-"+l,n.O7=!0,C[i]["map-item"]&&(n.O7=!1),n.parse()),null!==ZC._n_(e=C[i].hook)&&(n.E.hook=e),C[i]["3d"]){if(C[i]["map-item"]){for(B=[],m=0,v=n.D.length;m<v;m++)null!==n.D[m]?(s=new ZC.CF(r,n.D[m][0]-ZC.AP.E4,n.D[m][1]-ZC.AP.E5,ZC._i_(n.D[m][2]||C[i].z||"0")),B.push(s.ED)):B.push(null);n.D=B,r.FH.push(n),r.FA.push({type:"shape",index:b,zindex:n.JS,z3d:s.AAM}),r.XD[l]={shape:n.DV,idx:b}}else if("poly"===C[i].type){var g=ZC.DK.D9(n,r,C[i].points,!1);r.CM.add(g),r.FH.push(null)}else{if(n.D.length>0){for(B=[],m=0,v=n.D.length;m<v;m++)s=new ZC.CF(r,n.D[m][0]-ZC.AP.E4,n.D[m][1]-ZC.AP.E5,ZC._i_(n.D[m][2]||C[i].z||"0")),B.push(s.ED);n.D=B}else s=new ZC.CF(r,n.iX-ZC.AP.E4,n.iY-ZC.AP.E5,ZC._i_(C[i].z||"0")),n.iX=ZC._i_(s.ED[0]),n.iY=ZC._i_(s.ED[1]);r.FH.push(n),r.FA.push({type:"shape",index:b,zindex:n.JS,z3d:s.AAM})}n.E["3dtx"]=!0,n.E["3d"]=!0}else r.FH.push(n),n instanceof ZC.P4?(r.FA.push({type:"shape",index:b,zindex:n.BG.JS}),r.XD[l]={shape:n.BG.DV,idx:b}):(r.FA.push({type:"shape",index:b,zindex:n.JS}),r.XD[l]={shape:n.DV,idx:b});b++}if(null!==ZC._n_(f=r.o.images))for(i=0,a=f.length;i<a;i++){var K=f[i].src;if(ZC.cache.data[K]){var M=new ZC.HQ(r);M.append({"background-repeat":"no-repeat","background-image":K,width:ZC.cache.data[K].width,height:ZC.cache.data[K].height}),M.append(f[i]),l=f[i].id||i,M.H6=l,M.K=r.K+"-image-"+l,M.L=i,M.parse(),r.L1.push(M),r.FA.push({type:"image",index:i,zindex:M.JS})}}r.E["objects.updates"]=null,r.FA=r.FA.sort(function(e,i){return null!==ZC._n_(e.z3d)&&null!==ZC._n_(i.z3d)?e.z3d-i.z3d>0?1:-1:0}),r.FA=r.FA.sort(function(e,i){return e.zindex-i.zindex==0?e.index-i.index:e.zindex-i.zindex})},ZC.JL.prototype.A0M=function(e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var a,l=this,t=[l.K+"-objects-bottom-sh-c",l.K+"-objects-bottom-c",l.K+"-objects-top-sh-c",l.K+"-objects-top-c",l.K+"-objects-front-c",l.K+"-objects-print-c"];ZC.SKIPMAPS||t.push(l.K+"-objects-maps-sh-c",l.K+"-objects-maps-c");for(var o=0;o<t.length;o++)(a=ZC.AL(t[o]))&&ZC.Q.IV(a,l.H.AC,l.iX,l.iY,l.I,l.F,l.K);"canvas"===l.A.AC&&!zingchart.CANVASTEXT&&ZC.objmove||(ZC.A5("."+l.K+"-label").remove(),ZC.A5("."+l.K+"-shape-label").remove(),ZC.A5("."+l.K+"-arrow-label").remove()),e||(ZC.A5("."+l.K+"-label-area").each(function(){if(-1===ZC.AV([l.K+"-title-area",l.K+"-subtitle-area",l.K+"-source-area"],this.id)){var e=new RegExp("scale_(x|y|k|v)((_[0-9]+)*)-(item_|marker_)([0-9]+)").exec(this.id);!i&&e&&e.length||ZC.Q.EV(this.id)}}),ZC.A5("."+l.K+"-shape-area").each(function(){(!ZC.SKIPMAPS||ZC.SKIPMAPS&&"1"!==this.getAttribute("data-map"))&&ZC.Q.EV(this.id)}),ZC.A5("."+l.K+"-arrow-area").remove()),"svg"===l.A.AC&&ZC.A5("#"+l.A.K+"-svg").children().each(function(){var e=l.K+"-label-";"clippath"===this.tagName.toLowerCase()&&this.id.substring(0,e.length)===e&&ZC.Q.EV(this.id)})},ZC.JL.prototype.AC9=function(){var e=this;(e.H.NX["objects-top"]||e.H.NX["objects-bottom"])&&(ZC.A5("."+e.K+"-label-area").die(ZC.mobile?"touchstart":"mousedown mouseover",e.A04).die(ZC.mobile?"touchend":"mouseup mouseout",e.A0R).die(ZC.mobile?"touchmove":"mousemove",e.A05),ZC.mobile||ZC.A5("."+e.K+"-label-area").die("click",e.UI).die("dblclick",e.UI),ZC.A5("."+e.K+"-shape-area").die(ZC.mobile?"touchstart":"mousedown mouseover",e.A06).die(ZC.mobile?"touchend":"mouseup mouseout",e.A0S).die(ZC.mobile?"touchmove":"mousemove",e.A07),ZC.mobile||ZC.A5("."+e.K+"-shape-area").die("click",e.UJ).die("dblclick",e.UJ))},ZC.JL.prototype.OY=function(){var e,i,a,l,t=this;if(t.YH=!1,null!==ZC._n_(a=t.o.labels))for(e=0,i=a.length;e<i;e++){var o=""+(a[e].text||"");if(-1!==o.indexOf("%node-")||-1!==o.indexOf("%plot-")||-1!==o.indexOf("%npv")||-1!==o.indexOf("%node-percent-value")||ZC._b_(a[e].dynamic)){t.YH=!0;break}}if(null!==ZC._n_(l=t.o.shapes))for(e=0,i=l.length;e<i;e++)if(ZC._b_(l[e].dynamic)){t.YH=!0;break}},ZC.JL.prototype.QZ=function(e){var i=this;i.A0M(e),i.Q1(),i.KL(e),ZC.SKIPMAPS=!1},ZC.JL.prototype.KL=function(e){void 0===e&&(e=!1);var i,a,l,t=this,o=[],n=[];function s(e){var i=t.Y6[e];if(i.AN&&(i.Z=i.C7=t.H.usc()?t.H.mc("top"):ZC.AL(t.K+"-objects-"+(i.JS<0?"bottom":"top")+"-c"),i.paint(),i.AN&&ZC.AL(t.A.K+"-map"))){var a=i.BG.A5E(),l=ZC.Q.FS(a[0],i.BG.EA,i.BG.IK)+'class="'+t.K+'-arrow-area zc-arrow-area" id="'+i.BG.K+'-area" coords="'+a[1]+'" />';"top"===i.o.placement?n.push(l):o.push(l)}}function r(e){if(t.FH[e]){var a=t.FH[e],l=a instanceof ZC.P4?a.BG:a;if((!ZC.SKIPMAPS||!l.o["map-item"])&&l.AN){if(null!==ZC._n_(i=a.E.hook)){var s=t.V4(i);-1!==s[0]&&(l.iX=ZC._i_(s[0])),-1!==s[1]&&(l.iY=ZC._i_(s[1]))}if(!a.E["3d"]||a.E["3dtx"]){a.Z=t.H.usc()?t.H.mc("top"):ZC.AL(t.K+"-objects-"+(l.JS<0?"bottom":"top")+"-c"),a.C7=t.H.usc()?t.H.mc("top"):ZC.AL(t.K+"-objects-"+(l.JS<0?"bottom":"top")+"-sh-c"),l.o["map-item"]&&(a.Z=t.H.usc()?t.H.mc("top"):ZC.AL(t.K+"-objects-maps-c"),a.C7=t.H.usc()?t.H.mc("top"):ZC.AL(t.K+"-objects-maps-sh-c"));var r="";null!==ZC._n_(i=l.o.limit)&&("x"===i?r="x":"y"===i?r="y":"xy"===i&&(r="xy")),(""===r||"x"===r&&ZC.DP(l.iX-l.BK,t.P.iX-2,t.P.iX+t.P.I+2)||"y"===r&&ZC.DP(l.iY-l.BI,t.P.iY-2,t.P.iY+t.P.F+2)||"xy"===r&&ZC.DP(l.iX+l.BK,t.P.iX-2,t.P.iX+t.P.I-2)&&ZC.DP(l.iY+l.BI,t.P.iY-2,t.P.iY+t.P.F+2))&&(a.VY=!1,a.E["print-canvas"]=t.K+"-"+(l.o["map-item"]?"maps":"objects")+"-print-c",a.paint())}if(!a.K9&&!t.Q3&&"normal"===zingchart.OBJECTMODE){var p=l.A5E();if(ZC.AL(t.A.K+"-map"))for(var c=1,C=p.length;c<C;c++)if(""!==p[c]){var A=l.o["map-item"]&&!l.o["map-skip-z-sort"]?' data-map="1"':"",Z=ZC.Q.FS(p[0],l.EA,l.IK)+'class="'+t.K+'-shape-area zc-shape-area" id="'+l.K+"-area"+(c>1?"--"+c:"")+'" coords="'+p[c]+'" data-z-sort="'+l.A74+'"'+A+" />";if("top"===a.o.placement?n.push(Z):o.push(Z),a.M){var u=[ZC._i_(a.M.iX+a.M.BK),ZC._i_(a.M.iY+a.M.BI),ZC._i_(a.M.iX+a.M.BK+a.M.I),ZC._i_(a.M.iY+a.M.BI+a.M.F)].join(",");Z=ZC.Q.FS("rect",l.EA,l.IK)+'class="'+t.K+'-shape-area zc-shape-area" id="'+l.K+"-area"+(c>1?"--"+c:"")+'" coords="'+u+'" data-z-sort="'+l.A74+'"'+A+" />","top"===a.o.placement?n.push(Z):o.push(Z)}}}}}}function p(e){var i=t.L1[e];if(i.AN)if(i.Z=i.C7=t.H.usc()?t.H.mc("top"):ZC.AL(t.K+"-objects-"+(i.JS<0?"bottom":"top")+"-c"),null!==ZC._n_(i.o.repeat)&&ZC._b_(i.o.repeat)){var a=ZC._i_(ZC._c_(i.o.items,0)),l=null;if(i.o.inactive&&((l=new ZC.HQ(i.A)).copy(i),l.append(i.o.inactive),l.parse(),l.Z=l.C7=i.Z),a>0||l){var o=ZC._i_(ZC._c_(i.o.rows,-1)),n=ZC._i_(ZC._c_(i.o.cols,-1)),s=ZC._i_(ZC._c_(i.o["space-x"],0)),r=ZC._i_(ZC._c_(i.o["space-y"],0)),p=ZC._i_(ZC._c_(i.o["offset-row"],0)),c=ZC._i_(ZC._c_(i.o["offset-col"],0));-1!==o&&-1===n?n=Math.ceil(a/o):-1===o&&-1!==n?o=Math.ceil(a/n):-1===o&&-1===n&&(n=Math.ceil(Math.sqrt(a)),o=Math.ceil(a/n));for(var C=i.iX,A=i.iY,Z=i.K,u=0;u<o;u++)for(var h=0;h<n;h++)i.iX=C+h*s+u*p,i.iY=A+u*r+h*c,i.K=Z+(u*n+h),u*n+h<a?i.paint():l&&(l.iX=i.iX,l.iY=i.iY,l.K=i.K,l.paint())}else i.paint()}else i.paint()}function c(e){var a=t.BY[e];if(a.AN){if(a.E.lbltype="label",null!==ZC._n_(i=a.E.hook)){var l=t.V4(i);if(-1===l[0]&&-1===l[1])return;if(-1!==l[0]&&(a.iX=l[0]),-1!==l[1]&&(a.iY=l[1]),null===ZC._n_(l[2])||a.o.anchor||null!==ZC._n_(l[2].center)&&l[2].center&&(a.iX-=a.I/2,a.iY-=a.F/2),a.o.anchor&&a.setAnchor(),a.o["3d"]){var s=0;l[2]&&l[2].z?s=l[2].z:a.o.z&&(s=ZC._i_(a.o.z));var r=new ZC.CF(t,a.iX+a.I/2-ZC.AP.E4,a.iY+a.F/2-ZC.AP.E5,s);a.iX=r.ED[0]-a.I/2,a.iY=r.ED[1]-a.F/2}}a.iX=ZC._i_(a.iX),a.iY=ZC._i_(a.iY),a.IM=ZC.AL(t.A.K+"-text"),a.Z=t.H.usc()?t.H.mc("top"):ZC.AL(t.K+"-objects-"+(a.JS<0?"bottom":"top")+"-c"),a.C7=t.H.usc()?t.H.mc("top"):ZC.AL(t.K+"-objects-"+(a.JS<0?"bottom":"top")+"-sh-c");var p="";if(null!==ZC._n_(i=a.o.limit)&&("x"===i?p="x":"y"===i?p="y":"xy"===i&&(p="xy")),(""===p||"x"===p&&ZC.DP(a.iX-a.BK,t.P.iX-a.I/2-2,t.P.iX+t.P.I-a.I/2+2)||"y"===p&&ZC.DP(a.iY-a.BI,t.P.iY-a.F/2-2,t.P.iY+t.P.F-a.F/2+2)||"xy"===p&&ZC.DP(a.iX+a.BK,t.P.iX-a.I/2-2,t.P.iX+t.P.I-a.I/2+2)&&ZC.DP(a.iY+a.BI,t.P.iY-a.F/2-2,t.P.iY+t.P.F-a.F/2+2))&&(a.VY=!1,a.paint(),a.EM(ZC.AL(t.K+"-objects-print-c")),!a.K9&&!t.Q3&&"normal"===zingchart.OBJECTMODE&&ZC.AL(t.A.K+"-map"))){var c=ZC.AQ.O6(t.K,a);"top"===a.o.placement?n.push(c):o.push(c)}}}if(t.H.clearLabelBoxes("label"),t.FA)for(a=0,l=t.FA.length;a<l;a++){var C=t.FA[a].index;switch(t.FA[a].type){case"arrow":s(C);break;case"shape":r(C);break;case"image":p(C);break;case"label":c(C)}}for(a=0;a<t.AZ.A3.length;a++)t.AZ.A3[a].RO=null;if(!e&&"normal"===zingchart.OBJECTMODE&&(n.length>0||o.length>0)&&ZC.AL(t.A.K+"-map")){if(t.A4X){var A=function(e,i){return-1!==e.indexOf("data-map")&&-1!==i.indexOf("data-map")?ZC.AQ.N8(i)-ZC.AQ.N8(e):ZC.AQ.N8(e)-ZC.AQ.N8(i)};n.sort(A),o.sort(A)}zingchart.DEV.MAPSONBOTTOM?window.setTimeout(function(){ZC.AL(t.A.K+"-map").innerHTML=n.join("")+ZC.AL(t.A.K+"-map").innerHTML+o.join("")},33):ZC.AL(t.A.K+"-map").innerHTML=n.join("")+ZC.AL(t.A.K+"-map").innerHTML+o.join("")}t.A.E["fire-load"]||ZC.AQ.C0("objectsready",t.A,t.GZ())},ZC.JL.prototype.SH=function(e,i,a,l){var t,o,n,s,r=this;switch(a=a||"hover",e){case"shape":var p=r.FH[i],c=p instanceof ZC.P4?p.BG:p;if(null!==ZC._n_(c.o[a+"-state"])){if(!l&&c.o.group)for(n=0,s=r.FH.length;n<s;n++)n!==i&&(r.FH[n].o.group===c.o.group||r.FH[n].BG&&r.FH[n].BG.o.group===c.o.group)&&r.SH(e,n,a,!0);if((t=new ZC.DQ(r)).append(c.o),t.append(c.o[a+"-state"]),o=c.o.id||i,t.H6=o+"-"+a,t.K=r.K+"-shape-"+o+"-"+a,t.parse(),p.E["3d"]&&(t.D=c.D,t.iX=p.iX,t.iY=p.iY),t.AN)if(t.Z=t.C7=ZC.AL(r.K+"-objects-"+a+"-c"),t.o["map-item"]&&(t.Z=t.C7=ZC.AL(r.K+"-objects-maps-"+a+"-c")),t.o["map-item"]&&zingchart.maps.LITE&&"canvas"!==r.A.AC){if("svg"===r.A.AC){var C=ZC.A5("#"+r.K+"-shape-"+t.H6+"-gshape-path");r.E["map-shape-info"]={fill:C.attr("fill"),stroke:C.attr("stroke"),"stroke-width":C.attr("stroke-width")},"poly"===t.DV?(C.attr("fill",t.A0),C.attr("stroke-width",t.AU),C.attr("stroke",t.BX)):"line"===t.DV&&(C.attr("stroke-width",t.B1),C.attr("stroke",t.B7))}else if("vml"===r.A.AC){var A=ZC.AL(r.K+"-shape-"+t.H6+"-gshape-path"),Z=ZC.A5(A.childNodes[1]),u=ZC.A5(A.childNodes[2]);r.E["map-shape-info"]={fill:""+u.attr("color"),stroke:""+Z.attr("color"),"stroke-width":""+Z.attr("weight")},"poly"===t.DV?(u.attr("color",t.A0),Z.attr("weight",t.AU),Z.attr("color",t.BX)):"line"===t.DV&&(Z.attr("weight",t.B1),Z.attr("color",t.B7))}}else t.paint(),"canvas"===r.A.AC&&zingchart.CANVASTEXT&&p.M&&(p.M.Z=p.M.C7=ZC.AL(r.K+"-objects-"+a+"-c"),p.M.paint())}break;case"label":var h=r.BY[i];if(h&&null!==ZC._n_(h.o[a+"-state"])){if(!l&&h.o.group)for(n=0,s=r.BY.length;n<s;n++)n!==i&&r.BY[n].o.group===h.o.group&&r.SH(e,n,a,!0);var _=zingchart.pool.getInstance("DN",r,r.K+"-label-"+a);_.append(h.o),_.append(h.o[a+"-state"]),o=h.id||i,_.H6=o+"-"+a,_.K=r.K+"-label-"+o+"-"+a,_.GL=r.K+"-label "+r.K+"-label-"+a+" zc-label zc-label-"+a,_.IM=ZC.AL(r.A.K+"-text"),_.parse(),_.AN&&(_.iX=h.iX,_.iY=h.iY,_.I=h.I,_.F=h.F,_.Z=_.C7=ZC.AL(r.K+"-objects-"+a+"-c"),ZC.AL(r.K+"-label-"+o)&&(ZC.AL(r.K+"-label-"+o).style.display="none"),_.paint())}}},ZC.JL.prototype.S1=function(){var e,i,a,l=this;(l.H.NX["objects-top"]||l.H.NX["objects-bottom"])&&(l.A06=function(e){ZC.mobile&&(l.LJ(),ZC.move=!1,l.H.hideCM(),null===l.H.DI||null===ZC._n_(l.H.DI["page-scroll"])||l.H.DI["page-scroll"]||e.preventDefault(),l.A.Z1(e));var i=t(e);i.tooltip&&l.A7&&l.A.A7&&l.A7.AN&&l.A.A7.onmouseover(e);var a=ZC.mobile?"mousedown":e.xtype||e.type;i.lowlevel||l.SH("shape",i.shapeindex),l.S0(a,i)},l.A0S=function(e){ZC.mobile&&(l.H.A9C||ZC.move||(zingchart.SC(e),l.UJ(e)),l.A.OW(e)),l.A7&&l.A.A7&&l.A7.AN&&l.A.A7.onmouseout(e),ZC.mobile||l.LJ();var i=ZC.mobile?"mouseup":e.xtype||e.type,a=t(e);if(a.shape&&a.shape.mapItem&&zingchart.maps.LITE&&"canvas"!==l.A.AC)if("svg"===l.A.AC){var o=ZC.A5("#"+l.K+"-shape-"+a.shape.id+"-gshape-path");"poly"===a.shape.type&&o.attr("fill",l.E["map-shape-info"].fill),o.attr("stroke",l.E["map-shape-info"].stroke),o.attr("stroke-width",l.E["map-shape-info"]["stroke-width"])}else if("vml"===l.A.AC){var n=ZC.AL(l.K+"-shape-"+a.shape.id+"-gshape-path"),s=n.childNodes[1],r=n.childNodes[2],p=l.E["map-shape-info"];"poly"===a.shape.type&&ZC.Q.G5(r,{color:p.fill}),ZC.Q.G5(s,{weight:p["stroke-width"],color:p.stroke})}l.S0(i,a)},l.A07=function(e){var i=t(e);i.tooltip&&l.A7&&l.A.A7&&l.A7.AN&&l.A.A7.onmousemove(e),l.S0("mousemove",i)},l.UJ=function(e){var i=t(e);if("dblclick"!==e.type){e.ctrlKey||l.LJ("click"),l.TB=l.TB||{},l.TB["s_"+i.shapeid]?(l.TB["s_"+i.shapeid]=null,l.LJ("click")):(e.ctrlKey||(l.TB={}),l.TB["s_"+i.shapeid]=1,l.SH("shape",i.shapeindex,"click")),l.S0("click",i);var a=l.FH[i.shapeindex].BG||l.FH[i.shapeindex];if(ZC.mobile&&(l.E["click-ts"]&&(new Date).getTime()-l.E["click-ts"]<500&&l.S0("dblclick",i),l.E["click-ts"]=(new Date).getTime()),a&&a.EA&&"NULL"!==a.EA)if(a.EA instanceof Array)for(var o=0;o<a.EA.length;o++)null!==ZC._n_(a.FC[o])&&l.V5(e,a.EA[o],a.FC[o]);else l.V5(e,a.EA,a.FC)}else l.S0("dblclick",i)},ZC.A5("."+l.K+"-shape-area").live(ZC.mobile?"touchstart":"mousedown mouseover",l.A06).live(ZC.mobile?"touchend":"mouseup mouseout",l.A0S).live(ZC.mobile?"touchmove":"mousemove",l.A07),ZC.mobile||ZC.A5("."+l.K+"-shape-area").live("click",l.UJ).live("dblclick",l.UJ),l.A04=function(e){ZC.mobile&&(l.LJ(),ZC.move=!1,l.H.hideCM(),null===l.H.DI||null===ZC._n_(l.H.DI["page-scroll"])||l.H.DI["page-scroll"]||e.preventDefault(),l.A.Z1(e));var i=o(e);if(i.tooltip&&l.A7&&l.A.A7&&l.A7.AN&&l.A.A7.onmouseover(e),null!==i&&"label"===i.type){var a=ZC.mobile?"mousedown":e.xtype||e.type;i["data-active"]||l.SH("label",i.labelindex),l.RZ(a,i)}},l.A0R=function(e){ZC.mobile&&(l.H.A9C||ZC.move||(zingchart.SC(e),l.UI(e)),l.A.OW(e)),l.A7&&l.A.A7&&l.A7.AN&&l.A.A7.onmouseout(e),ZC.mobile||l.LJ();var i=o(e);if(null!==i){var a=ZC.mobile?"mouseup":e.xtype||e.type;ZC.AL(l.K+"-label-"+i.label.id)&&(ZC.AL(l.K+"-label-"+i.label.id).style.display="block"),l.RZ(a,i)}},l.A05=function(e){var i=o(e);i.tooltip&&l.A7&&l.A.A7&&l.A7.AN&&l.A.A7.onmousemove(e),l.RZ("mousemove",i)},l.UI=function(e){var i=o(e);if("dblclick"!==e.type){e.ctrlKey||l.LJ("click"),l.TB=l.TB||{},l.TB["l_"+i.labelid]?(l.TB["l_"+i.labelid]=null,l.LJ("click")):(e.ctrlKey||(l.TB={}),l.TB["l_"+i.labelid]=1,l.SH("label",i.labelindex,"click")),l.RZ("click",i),ZC.mobile&&(l.E["click-ts"]&&(new Date).getTime()-l.E["click-ts"]<500&&l.RZ("dblclick",i),l.E["click-ts"]=(new Date).getTime());var a=l.BY[i.labelindex];if(!a)switch(i.type){case"graph-title":a={EA:l.IR.EA,FC:l.IR.FC};break;case"graph-subtitle":a={EA:l.K2.EA,FC:l.K2.FC};break;case"graph-source":a={EA:l.MU.EA,FC:l.MU.FC}}if(a&&a.EA&&"NULL"!==a.EA)if(a.EA instanceof Array)for(var t=0;t<a.EA.length;t++)null!==ZC._n_(a.FC[t])&&(a.EA[t]=a.EA[t].replace("%id",l.A.K),a.EA[t]=a.EA[t].replace("%graphid",l.K.replace(l.A.K+"-graph-","")),l.V5(e,a.EA[t],a.FC[t]));else a.EA=a.EA.replace("%id",l.A.K),a.EA=a.EA.replace("%graphid",l.K.replace(l.A.K+"-graph-","")),l.V5(e,a.EA,a.FC)}else l.RZ("dblclick",i)},ZC.A5("."+l.K+"-label-area").live(ZC.mobile?"touchstart":"mousedown mouseover",l.A04).live(ZC.mobile?"touchend":"mouseup mouseout",l.A0R).live(ZC.mobile?"touchmove":"mousemove",l.A05),ZC.mobile||ZC.A5("."+l.K+"-label-area").live("click",l.UI).live("dblclick",l.UI));function t(e){for(var i=(e.targetid||e.target.id).replace(/\-\-\d+/g,"").replace(l.K+"-shape-","").replace("-gshape-area","").replace("-area",""),a=-1,t=null,o=0,n=l.FH.length;o<n;o++)if(l.FH[o]&&""+l.FH[o].H6==""+i){a=o,t=l.FH[o]instanceof ZC.P4?l.FH[o].BG:l.FH[o];break}if(!t&&e.target.getAttribute("data-lowlevel"))return{shapeid:e.target.id,lowlevel:!0,ev:e};if(-1===a)return null;var s={shapeid:i,shapeindex:a,tooltip:t.o.tooltip?1:0,shape:{id:i,index:a,cls:t.DG,x:t.iX,y:t.iY,type:t.DV,mapItem:t.o["map-item"],points:t.D,width:t.I,height:t.F,size:t.AI,size2:t.JP,angle:t.AA,zIndex:t.JS},ev:e};for(var r in t.o)t.o.hasOwnProperty(r)&&"data-"===r.substring(0,5)&&(s[r]=t.o[r]);return s}function o(t){var o,n=t.targetid||t.target.id;if(n===l.K+"-title-area"||n===l.K+"-subtitle-area"||n===l.K+"-source-area"){var s=null,r=-1;switch(o=n.replace(l.K+"-","").replace("-area","")){case"title":s=l.IR,r=-1;break;case"subtitle":s=l.K2,r=-2;break;case"source":s=l.MU,r=-3}return{type:"graph-"+o,labelid:s.K,labelindex:r,text:s.AM,label:{id:s.K,index:r,text:s.AM},ev:t}}if(-1===n.indexOf("-scale")||-1===n.indexOf("-item")&&-1===n.indexOf("-marker")){if(-1!==n.indexOf("-value-box-")){e=n.replace(l.K+"-plotset-plot-","").replace("-value-box-area",""),i=e.split("-node-");var p=l.AZ.A3[ZC._i_(i[0])].FK(ZC._i_(i[1]));return p?{type:"value-box",labelid:"vb_"+i.join("_"),plotindex:ZC._i_(i[0]),nodeindex:ZC._i_(i[1]),text:p.AD,label:{id:"vb_"+i.join("_"),text:p.AD},ev:t}:null}e=n.replace(l.K+"-label-","").replace("-area","");for(var c=-1,C=null,A=0,Z=l.BY.length;A<Z;A++)if(""+l.BY[A].H6==""+e){c=A,C=l.BY[A];break}if(a=-1===c?"":l.BY[c].AM,-1===c)return null;var u={type:"label",labelid:e,labelindex:c,text:a,tooltip:C.o.tooltip?1:0,label:{id:e,index:c,cls:C.DG,x:C.iX+C.BK,y:C.iY+C.BI,width:C.I,height:C.F,text:a},ev:t};for(var h in C.o)C.o.hasOwnProperty(h)&&"data-"===h.substring(0,5)&&(u[h]=C.o[h]);return u}e=n.replace(l.K+"-","").replace("-area","");var _=(i=e.split("-"))[1].split("_"),d=0;2===_.length?d=ZC._i_(_[1]):3===_.length&&(d=ZC._i_(_[2]));var f,b=i[0].replace(/_/g,"-"),B=l.BM(b);return-1!==n.indexOf("-item")?(o="scale-item",f="si_"+i[1].replace("item_",""),a=B.BY[d]||B.V[d],"si_title"===f&&(a=B.M.AM)):(o="scale-marker",f="sm_"+i[1].replace("marker_",""),a=B.E["marker_text_"+d]||""),{type:o,labelid:f,labelindex:d,scale:b,text:a,tooltip:B.o.tooltip||B.o.item&&B.o.item.tooltip?1:0,label:{id:f,index:d,text:a},ev:t}}},ZC.JL.prototype.RZ=function(e,i){ZC._cp_(this.GZ(),i),i.ev=ZC.A5.C1(i.ev),ZC.AQ.C0("label_"+e,this.A,i)},ZC.JL.prototype.S0=function(e,i){ZC._cp_(this.GZ(),i),i.ev=ZC.A5.C1(i.ev),ZC.AQ.C0("shape_"+e,this.A,i)},ZC.JL.prototype.V4=function(e){var i,a,l=this;if("string"==typeof e){var t={},o=e.split(":");if(2===o.length){t.type=o[0];for(var n=0,s=(o=o[1].split(/\s|,|;/)).length;n<s;n++){var r=o[n].split("=");t[r[0]]=r[1]}}e=t}var p=[-1,-1];switch(l.E.hooks=!0,e.type){case"scale":var c,C,A,Z="",u=-1,h=null;if(null!==ZC._n_(i=e.name)&&(Z=i),null!==ZC._n_(i=e.index)&&(u=ZC._i_(i)),null!==ZC._n_(i=e.value)&&(h=ZC._f_(i)),a=null,""===Z&&(Z="scale-x"),a=l.BM(Z))switch(a.IE&&-1!==u?A=a.IE(u):a.AR&&(null!==ZC._n_(h)?A=a.AR(h):-1!==u&&(A=a.AR(a.V[u]))),l.AJ.layout){case"radar":case"gauge":c=A[0],C=A[1];break;case"xy":"k"===a.AF?(c=A,C=a.iY,"default"===a.BA&&(C+=a.F),null!==ZC._n_(a.E.iY)&&(C=a.E.iY)):"v"===a.AF&&(C=A,c=a.iX,"opposite"===a.BA&&(c+=a.I),null!==ZC._n_(a.E.iX)&&(c=a.E.iX));break;case"yx":"k"===a.AF?(C=A,c=a.iX,"opposite"===a.BA&&(c+=a.I),null!==ZC._n_(a.E.iX)&&(c=a.E.iX)):"v"===a.AF&&(c=A,C=a.iY,"default"===a.BA&&(C+=a.F),null!==ZC._n_(a.E.iY)&&(C=a.E.iY))}p=[c,C,{center:!0}];break;case"node":var _=-1,d=null,f=null,b=null,B=null;null!==ZC._n_(i=e.plot)&&(b=i),null!==ZC._n_(i=e.plotindex)&&(b=i),null!==ZC._n_(i=e.plotid)&&(B=i);var m=l.I5(b,B);null!==ZC._n_(i=e.index)&&(_=ZC._i_(i)),null!==ZC._n_(i=e.value)&&(d=i),null!==ZC._n_(i=e.keyvalue)&&(f=i);var v=null;if(m){if(-1!==_&&m.R[_])v=m.FK(_,3);else if(null!==ZC._n_(d)||null!==ZC._n_(f)){var g,K;if(a=m.C.BM(m.BO[0]),null!==f&&null===d&&m.R.length>4096&&a.F6&&"date"===a.F6.o.type&&null!==(g=ZC._nfind_(f,m,0,m.R.length-1))&&(v=m.FK(g,3)),!v)for(g=0,K=m.R.length;g<K;g++)m.R[g]&&(null!==d&&m.R[g].AD==d&&(v=m.FK(g,3)),null!==f&&null!==ZC._n_(m.R[g].BV)&&m.R[g].BV==f&&(v=m.FK(g,3)))}v&&(v.setup(),p=v.V4(e),!v.IY&&ZC.DP(p[0],l.P.iX,l.P.iX+l.P.I)&&ZC.DP(p[1],l.P.iY,l.P.iY+l.P.F)&&(v.IY=!0),v.IY&&v.AN&&v.A.AN&&v.C.E["plot"+v.A.L+".visible"]||(p=[-1,-1])),m.E["z-mid"]&&(p[2].z=m.E["z-mid"])}}return null!==ZC._n_(e.x)&&(p[0]=ZC._i_(e.x)),null!==ZC._n_(e.y)&&(p[1]=ZC._i_(e.y)),null!==ZC._n_(i=e["offset-x"])&&(p[0]+=ZC._i_(i)),null!==ZC._n_(i=e["offset-y"])&&(p[1]+=ZC._i_(i)),p},zingchart.AB4=function(e,i,a){document.getElementById("zc-fullscreen")&&(e="zc-fullscreen"),"string"==typeof(a=a||{})&&(a=JSON.parse(a));var l,t,o,n,s,r,p,c,C,A,Z,u,h,_,d=!(null!==ZC._n_(a.update)&&!ZC._b_(a.update)),f=!!a.dynamic&&ZC._b_(a.dynamic),b=zingchart.getLoader(e);if(b)switch(i){case"addobject":if((l=b.CA(a.graphid))&&a.data){if(C=(c=a.data instanceof Array)?[]:{},ZC._cp_(a.data,C),t=a.type||"label",c)for(s=0,r=C.length;s<r;s++)t=a.type||C[s].objtype||"label",l.o[t+"s"]||(l.o[t+"s"]=[]),f&&(C[s]["map-item"]=!1),l.o[t+"s"].push(C[s]);else l.o[t+"s"]||(l.o[t+"s"]=[]),f&&(C["map-item"]=!1),l.o[t+"s"].push(C);d&&(l.OY(),l.QZ(f))}a.callback&&"function"==typeof a.callback&&a.callback(a);break;case"removeobject":if(l=b.CA(a.graphid),a["class"]&&(a.cls=a["class"]),l&&(a.id||a.cls||a.group)){t=a.type||"label",p=l.o[t+"s"]||[],o=a.id?"string"==typeof a.id?[a.id]:a.id:[],n=a.cls?"string"==typeof a.cls?[a.cls]:a.cls:[],A=!1;var B=[];for(s=p.length-1;s>=0;s--)(null!==ZC._n_(p[s].id)&&-1!==ZC.AV(o,p[s].id)||null!==ZC._n_(p[s].cls)&&-1!==ZC.AV(n,p[s].cls)||null!==ZC._n_(p[s]["class"])&&-1!==ZC.AV(n,p[s]["class"])||a.group&&p[s].group===a.group)&&(null!==ZC._n_(p[s].id)&&B.push(p[s].id),p.splice(s,1),A=!0);for(s=0;s<B.length;s++)ZC.Q.EV([l.K+"-label-"+B[s]+"-gradient",l.K+"-label-"+B[s]+"-top-gradient",l.K+"-shape-"+B[s]+"-gradient",l.K+"-shape-"+B[s]+"-top-gradient",l.K+"-shape-"+B[s]+"-gshape-gradient",l.K+"-shape-"+B[s]+"-gshape-top-gradient"]);A&&d&&(l.OY(),l.QZ(f))}a.callback&&"function"==typeof a.callback&&a.callback(a);break;case"updateobject":if(a["class"]&&(a.cls=a["class"]),(l=b.CA(a.graphid))&&a.data){l.E["objects.updates"]=[],t=a.type||"label",p=l.o[t+"s"]||[],_="label"===t?l.BY:l.FH,C=(c=a.data instanceof Array)?[]:{},ZC._cp_(a.data,C),A=!1;var m=!0,v=function(e,i){var a,o,n,s=l.XD[e.id||""],r=!1;if(s&&("label"===s.shape?(n=l.BY[s.idx],Object.keys&&3===Object.keys(e).length&&null!==ZC._n_(e.x)&&null!==ZC._n_(e.y)&&(n.iX=e.x,n.iY=e.y,r=!0)):((n=l.FH[s.idx]).BG&&n.BG.o["map-item"]&&(m=!1),"circle"===s.shape?Object.keys&&3===Object.keys(e).length&&null!==ZC._n_(e.x)&&null!==ZC._n_(e.y)&&(n.BG?(n.BG.iX=e.x,n.BG.iY=e.y):(n.iX=e.x,n.iY=e.y),r=!0):"line"===s.shape&&Object.keys&&2===Object.keys(e).length&&null!==ZC._n_(e.points)&&(n.BG?n.BG.D=e.points:n.D=e.points,r=!0))),r||l.E["objects.updates"].push(e.id),ZC._cp_(e,i),null!==ZC._n_(e.animation)){var p=null;if("label"===t){for(a=0,o=l.BY.length;a<o;a++)if(l.BY[a].H6===e.id){p=l.BY[a];break}}else if("shape"===t)for(a=0,o=l.FH.length;a<o;a++)if(l.FH[a].H6===e.id){p=l.FH[a]instanceof ZC.P4?l.FH[a].BG:l.FH[a];break}var c=l.LV,C={};if(ZC._cp_(e,C),null!==ZC._n_(C.x)&&(C.x+=l.iX),null!==ZC._n_(C.y)&&(C.y+=l.iY),null!==ZC._n_(C.points))for(a=0,o=C.points.length;a<o;a++)null!==ZC._n_(C.points[a])&&(C.points[a][0]+=l.iX,C.points[a][1]+=l.iY,null!==ZC._n_(C.points[a][2])&&(C.points[a][2]+=l.iX),null!==ZC._n_(C.points[a][3])&&(C.points[a][3]+=l.iY));C.animation=null;var Z=new ZC.E6(p,C,ZC._i_(e.animation.speed||"300"),ZC._i_(e.animation.delay||"0"),ZC.E6.RL[ZC._i_(e.animation.method||"0")],function(){null!==ZC._n_(e.animation.end)&&e.animation.end.call()});l.Q3=!0,window.setTimeout(function(){c.add(Z)},33)}A=!0};if(c){var g=!1,K=!1;for(s=0,r=C.length;s<r;s++){if(null!==ZC._n_(C[s].objtype)&&(p=l.o[C[s].objtype+"s"]),p)for(Z=0,u=p.length;Z<u;Z++)null!==ZC._n_(C[s].id)&&null!==ZC._n_(p[Z].id)&&p[Z].id===C[s].id&&v(C[s],p[Z]);null!==ZC._n_(C[s].animation)?g=!0:K=!0,K&&g&&(ZC.SKIPMAPS=m,l.Q1())}}else if(a.group)for(Z=0,u=p.length;Z<u;Z++)p[Z].group===a.group&&(C.id=p[Z].id,v(C,p[Z]));else if(a.cls)for(Z=0,u=p.length;Z<u;Z++)p[Z].cls===a.cls&&(C.id=p[Z].id,v(C,p[Z]));else for(e=C.id||a.id,Z=0,u=p.length;Z<u;Z++)null!==ZC._n_(p[Z].id)&&null!==ZC._n_(e)&&p[Z].id===e&&(C.id=e,v(C,p[Z]));ZC.SKIPMAPS=m,!A||!d&&l.Q3||l.Q3||(l.OY(),l.QZ(f))}a.callback&&"function"==typeof a.callback&&a.callback(a);break;case"repaintobjects":(l=b.CA(a.graphid))&&(l.OY(),l.QZ(f)),a.callback&&"function"==typeof a.callback&&a.callback(a);break;case"getallobjects":if(o=[],l=b.CA(a.graphid))for(t=a.type||"label",s=0,r=(p=l.o[t+"s"]||[]).length;s<r;s++)null!==ZC._n_(p[s].id)&&o.push(p[s].id);return o;case"getobjectsbyclass":if(a["class"]&&(a.cls=a["class"]),o=[],(l=b.CA(a.graphid))&&a.cls){t=a.type||"label",p=l.o[t+"s"]||[];var M=a.cls instanceof Array?a.cls:[a.cls];for(s=0,r=p.length;s<r;s++)-1===ZC.AV(M,p[s].cls)&&-1===ZC.AV(M,p[s]["class"])||null===ZC._n_(p[s].id)||o.push(p[s].id)}return o;case"getlabelinfo":case"getshapeinfo":var Y={x:"iX",y:"iY",width:"I",height:"F",color:"C2",lineColor:"B7",lineWidth:"B1",borderColor:"BX",borderWidth:"AU",backgroundColor1:"A0",backgroundColor2:"AE",size:"AI",type:"DV",text:"AM",fontSize:"DH",callout:"KQ",calloutPosition:"EN",offsetX:"BK",offsetY:"BI"};if(l=b.CA(a.graphid),t=a.type||"label","getlabelinfo"===i&&"label"!==t||"getshapeinfo"===i&&"shape"!==t)return null;if(e=a.id||"",l&&""!==e){_=[],"label"===t?_=l.BY:"shape"===t&&(_=l.FH);var y=null;for(s=0,r=_.length;s<r;s++)_[s].H6===e&&(y=_[s]);if(y){var E={};if("shape"===t){if(y.M)for(h in E.label={},Y)E.label[h]=y.M[Y[h]];y.BG&&(y=y.BG)}for(h in Y)E[h]=y[Y[h]];return E}}return null;case"setobjectsmode":zingchart.OBJECTMODE="normal",a.mode&&"flat"===a.mode&&(zingchart.OBJECTMODE="flat");break;case"settweenmode":ZC.objmove=!1,a.mode&&"position"===a.mode&&(ZC.objmove=!0)}return null};