if(!_.surface){_.surface=1;(function($){var o6=function(){$.By.call(this);this.j=[];this.G=[]},Mna=function(a,b,c){var d=a.j.slice(),e=a.G.slice(),f=a.i("length"),h=a.i("stroke"),k=$.Wo(h),l=d[0]*(1-b)+b*e[0];b=d[1]*(1-b)+b*e[1]+c/2;b=$.R(b,1)-.5;l=$.R(l,k);a.path.moveTo(l,b);a.path.lineTo(l,b+f);a.path.stroke(h)},p6=function(a,b){a*=Math.PI/180;b*=Math.PI/180;var c=Math.sin(a),d=Math.cos(a),e=Math.sin(b),f=Math.cos(b);return[d*f,-c*f,e,c,d,0,-e*d,c*e,f]},q6=function(a,b){return[b[0]*a[0]+b[1]*a[1]+b[2]*a[2],b[0]*a[3]+b[1]*a[4]+b[2]*a[5],
b[0]*a[6]+b[1]*a[7]+b[2]*a[8]]},r6=function(a,b){var c=q6(p6(0,a),[-1,0,0]),d=c[0],e=c[1];c=c[2];for(var f=d*d+e*e+c*c,h=0,k=0;k<b.length;k++){var l=b[k];h+=Math.abs(d*l[0]+e*l[1]+c*l[2]-f)/Math.sqrt(f)}return h/=b.length},s6=function(a,b){a=a.slice();for(var c=0;c<a.length;c++){var d=a,e=c,f=a[c],h=b;f=f.slice();f[1]=h.left+f[1]*h.width/1.48+h.width/2;f[2]=h.top+f[2]*h.height/1.75+h.height/2;d[e]=f}return a},t6=function(){$.Dy.call(this);this.U=[[-.5,-.5,.5],[-.5,.5,.5],[.5,.5,.5],[.5,-.5,.5]];this.b=
[]},u6=function(a){a.b=p6(a.N,a.g)},v6=function(a){u6(a);for(var b=[],c=[0,0,0],d=[0,0,0],e=0;e<a.U.length;e++){var f=a.U[e];b.push(q6(a.b,f));b[e][1]<d[1]&&(c=f,d=b[e])}return c},w6=function(a){u6(a);for(var b=[],c=window.Infinity,d=0,e=0;e<a.U.length;e++){var f=r6(a.g,[q6(a.b,a.U[e])]);f<c&&(c=f,d=e);b.push(f)}return a.U[d]},x6=function(a,b,c,d){b=q6(a.b,b);c=q6(a.b,c);a.j=b.slice();a.G=c.slice();var e=s6([b,c],d),f=e[0][1],h=e[0][2];d=e[1][1];e=e[1][2];b=a.zIndex()+2-r6(a.g,[b,c]);c=a.TE();c.clear();
c.moveTo(f,h).lineTo(d,e);c=a.Qa();a=a.tb();$.kr(c,a);var k=[f,h],l=[d,e];$.n(k)&&$.n(l)&&(c.j=k,c.G=l,c.ta(1));c.zIndex(b);f=[f,h];d=[d,e];$.n(f)&&$.n(d)&&(a.j=f,a.G=d,a.ta(1));a.zIndex(b);$.lr(c,a)},y6=function(){$.Wy.call(this);this.G=null;this.O={lX:[],ES:[]};this.ba=!1},z6=function(a){if(0==a.O.ES.length){var b=$.nk();b.parent(a.P()).zIndex(a.zIndex());b.stroke("none");a.O.lX.push(b);return b}b=a.O.ES.pop();a.O.lX.push(b);b.parent(a.P());return b},Nna=function(a,b){return $.n(b)?(a.ba=!!b,a):
a.ba},A6=function(a){a.G=a.G?a.G:$.nk();return a.G},Ona=function(a,b){var c=a.ja(),d=p6(a.N,a.g),e=[];e[0]=q6(d,b[0]);e[1]=q6(d,b[1]);if(r6(a.g,[e[0]])>r6(a.g,[e[1]])){var f=b[1];b[1]=b[0];b[0]=f;f=e[1];e[1]=e[0];e[0]=f}b[2]=[b[1][0],b[1][1],-.5];e[2]=q6(d,b[2]);c=s6(e,c);a.j.moveTo(c[0][1],c[0][2]);a.j.lineTo(c[1][1],c[1][2]);a.G.moveTo(c[1][1],c[1][2]);a.G.lineTo(c[2][1],c[2][2])},B6=function(a,b){function c(){var a=this.i("rotationZ"),b=this.i("rotationY"),c=$.jr(this,"xGrid"),h=$.jr(this,"yGrid"),
k=$.jr(this,"zGrid"),l=$.jr(this,"xAxis"),m=$.jr(this,"yAxis"),p=$.jr(this,"zAxis");$.kr(l,m,p,c,h,k);c&&c.rq(a).qq(b);h&&h.rq(a).qq(b);k&&k.rq(a).qq(b);p&&p.rq(a).qq(b);l&&l.rq(a).qq(b);m&&m.rq(a).qq(b);$.mr(l,m,p,c,h,k)}$.ox.call(this);this.Fa("surface");this.nr=["z","value"];this.nX=[];this.Py=[];this.VO=[];this.wa=[];this.qz=[];this.data(a||null,b);$.T(this.ua,[["rotationZ",10485776,1,null,c],["rotationY",10485776,1,null,c],["box",16,1],["stroke",16,1]])},C6=function(a,b){var c=a.Va().transform(b[0])-
.5,d=a.bb().transform(b[1])-.5,e=1-a.Ww().transform(b[2])-.5;return[c,d,e]},D6=function(a,b){for(var c=0,d=0;d<b.length;d++){var e=a.xba,f=b[d],h=e[0],k=e[1];e=e[2];var l=h*h+k*k+e*e;c+=Math.abs(h*f[0]+k*f[1]+e*f[2]-l)/Math.sqrt(l)}c/=b.length;return 2-c},Pna=function(a){for(var b=0,c=0,d=0,e=0,f=-window.Infinity,h=0,k=window.Infinity,l=0,m=0;m<a.length;m++){a[m][1]<b&&(b=a[m][1],c=m);a[m][1]>d&&(d=a[m][1],e=m);var p=a[m][0];f<p&&(f=a[m][0],h=m);k>p&&(k=a[m][0],l=m)}return{left:a[c],right:a[e],Ona:a[h],
D2:a[l]}},E6=function(a,b,c,d){var e=$.oa(b.scale());$.Aa(a,e)||(d[c].scale=b.scale().F())},F6=function(a,b,c){c in b&&(a[c](b[c]),"scale"in b[c]&&a[c]().scale(b[c].scale))},Qna=function(a,b){var c=new B6(a,b);c.sd(c.mf("colorScale"));return c};$.H(o6,$.By);$.g=o6.prototype;$.g.qa=$.By.prototype.qa;$.g.sa=$.By.prototype.sa|16;
$.g.ZR=function(a,b,c,d){b=this.i("length");c=this.j.slice();var e=this.j[1],f=this.G[1],h=Math.abs(e-f);c[1]=Math.min(e,f)+h-h*a;a=this.i("stroke");e=$.Wo(a);d=c[0]-d/2;d=$.R(d,1)+.5;c=c[1];c=$.R(c,e);this.path.moveTo(d,c);this.path.lineTo(d-b,c);this.path.stroke(a)};$.g.VR=function(a,b,c,d){Mna(this,a,d)};$.g.aS=function(a,b,c,d){Mna(this,a,d)};$.H(t6,$.Dy);$.g=t6.prototype;$.g.qa=$.Dy.prototype.qa;$.g.sa=$.Dy.prototype.sa;$.g.K_=function(){var a=$.jr(this,"title");if(a){var b=this.TE().pb().clone(),c=this.ja();switch(this.i("orientation")){case "left":$.Qv(a,"left");break;case "bottom":$.Qv(a,"bottom");b.height=c.Ua()-b.top;break;case "right":$.Qv(a,"bottom"),b.height=c.Ua()-b.top}a.ja(b);a.$()}};$.g.RE=function(a){u6(this);var b=v6(this);x6(this,b,[b[0],b[1],-.5],a)};
$.g.SE=function(a){u6(this);var b=w6(this),c=[-.5==b[0]?.5:-.5,b[1],b[2]];if(-.5==c[0]){var d=c;c=b;b=d}x6(this,b,c,a)};$.g.QE=function(a){u6(this);var b=w6(this),c=[b[0],-.5==b[1]?.5:-.5,b[2]];if(-.5==c[1]){var d=c;c=b;b=d}x6(this,b,c,a)};$.g.$P=function(){t6.u.$P.call(this);var a=this.zIndex()+2-r6(this.g,[this.j,this.G]);this.line.zIndex(a);this.Qa().zIndex(a);this.tb().zIndex(a)};
$.g.Np=function(){var a=this.i("orientation");if("left"==a)var b=this.RE;else"right"==a?b=this.SE:"bottom"==a&&(b=this.QE);b.call(this,this.ja(),0,1,0,0);this.line.stroke(this.i("stroke"))};
$.g.A0=function(a,b,c,d,e,f,h){e=this.ja();h=h?this.labels():this.kb();var k=0,l=0;c=this.zIndex();var m=this.i("orientation");f=w6(this);switch(m){case "right":k=[-.5==f[0]?.5:-.5,f[1],f[2]];-.5==k[0]&&(c=f,f=k,k=c);f=q6(this.b,f);k=q6(this.b,k);c=this.zIndex()+(0>this.g?2:-2);l=s6([f,k],e);e=l[0][1];f=l[0][2];k=l[1][1];l=l[1][2];k=e*(1-a)+a*k;l=f*(1-a)+a*l+d+b.height/2;break;case "bottom":k=[f[0],-.5==f[1]?.5:-.5,f[2]];-.5==k[1]&&(c=f,f=k,k=c);f=q6(this.b,f);k=q6(this.b,k);c=1-a;l=[];l.push(a*k[0]+
c*f[0]);l.push(a*k[1]+c*f[1]);l.push(a*k[2]+c*f[2]);c=this.zIndex()+(0>this.g?2:-2);l=s6([f,k],e);e=l[0][1];f=l[0][2];k=l[1][1];l=l[1][2];k=e*(1-a)+a*k;l=f*(1-a)+a*l+d+b.height/2;break;case "left":f=v6(this),k=[f[0],f[1],-.5],f=q6(this.b,f),k=q6(this.b,k),c=this.zIndex()+2,l=s6([f,k],e),e=l[0][1],f=l[0][2],l=l[1][2],k=Math.abs(f-l),l=Math.min(f,l)+k-k*a,k=e-d-b.width/2}h.zIndex(c);return{x:k,y:l}};$.g.qq=function(a){a=Number(a);$.n(a)&&this.g!=a&&(this.g=a,this.B(16|this.xe,9),this.Qd())};
$.g.rq=function(a){a=Number(a);return $.n(a)?(this.N!=a&&(this.N=a,this.B(16|this.xe,9),this.Qd()),this):this.N};$.g.Xk=function(){return new o6};
$.g.B0=function(a,b,c,d){a=this.ja();var e=0,f=0;this.zIndex();var h=this.i("orientation");c=w6(this);switch(h){case "right":e=[-.5==c[0]?.5:-.5,c[1],c[2]];-.5==e[0]&&(f=c,c=e,e=f);c=q6(this.b,c);e=q6(this.b,e);this.zIndex();f=s6([c,e],a);a=f[0][1];c=f[0][2];e=f[1][1];f=f[1][2];e=a*(1-b)+b*e;f=c*(1-b)+b*f+d;break;case "bottom":e=[c[0],-.5==c[1]?.5:-.5,c[2]];-.5==e[1]&&(f=c,c=e,e=f);c=q6(this.b,c);e=q6(this.b,e);f=1-b;h=[];h.push(b*e[0]+f*c[0]);h.push(b*e[1]+f*c[1]);h.push(b*e[2]+f*c[2]);this.zIndex();
f=s6([c,e],a);a=f[0][1];c=f[0][2];e=f[1][1];f=f[1][2];e=a*(1-b)+b*e;f=c*(1-b)+b*f+d;break;case "left":c=v6(this),e=[c[0],c[1],-.5],c=q6(this.b,c),e=q6(this.b,e),this.zIndex(),f=s6([c,e],a),a=f[0][1],c=f[0][2],f=f[1][2],e=Math.abs(c-f),f=Math.min(c,f)+e-e*b,e=a-d}return{x:e,y:f}};$.H(y6,$.Wy);$.g=y6.prototype;$.g.sz=function(){y6.u.sz.call(this);for(var a;a=this.O.lX.pop();)a.clear(),this.O.ES.push(a)};$.g.wJ=function(){y6.u.wJ.call(this);A6(this).stroke(this.i("stroke"))};$.g.WJ=function(){y6.u.WJ.call(this);var a=this.P();A6(this).parent(a)};$.g.OB=function(){var a=this.zIndex()-1,b=0>=this.g?a+2:a;this.Gh().zIndex(b);A6(this).zIndex(a);$.Dc(this.D,function(a){a.zIndex(b)})};$.g.remove=function(){y6.u.remove.call(this);A6(this).parent(null)};
$.g.uj=function(){A6(this).clear();y6.u.uj.call(this)};
$.g.WF=function(a){a-=.5;if(this.ba){a=-a;var b=[[-.5,-.5,a],[-.5,.5,a],[.5,.5,a],[.5,-.5,a]];a=p6(this.N,this.g);for(var c=[],d=-window.Infinity,e=0,f=0;f<b.length;f++){c[f]=q6(a,b[f]);var h=r6(this.g,[c[f]]);h>d&&(d=h,e=f)}c=b[e];c=[[-c[0],c[1],c[2]],[c[0],c[1],c[2]],[c[0],-c[1],c[2]]];for(f=0;f<c.length;f++)c[f]=q6(a,c[f]);a=this.ja();a=s6(c,a);this.G.moveTo(a[0][1],a[0][2]);this.G.lineTo(a[1][1],a[1][2]);this.G.lineTo(a[2][1],a[2][2])}else a=[[a,-.5,.5],[a,.5,.5]],Ona(this,a)};
$.g.XF=function(a){a-=.5;Ona(this,[[-.5,a,.5],[.5,a,.5]])};
$.g.TF=function(a,b,c){if(Nna(this)){var d=z6(this),e=-(a-.5);a=-(b-.5);var f=[[-.5,-.5,e],[-.5,.5,e],[.5,.5,e],[.5,-.5,e]];e=p6(this.N,this.g);b=[];for(var h=-window.Infinity,k=0,l=0;l<f.length;l++){b[l]=q6(e,f[l]);var m=r6(this.g,[b[l]]);m>h&&(h=m,k=l)}l=f[k];b=[[-l[0],l[1],l[2]],[l[0],l[1],l[2]],[l[0],-l[1],l[2]]];a=[[-l[0],l[1],a],[l[0],l[1],a],[l[0],-l[1],a]];for(l=0;l<b.length;l++)b[l]=q6(e,b[l]),a[l]=q6(e,a[l]);e=this.ja();b=s6(b,e);a=s6(a,e);d.moveTo(b[0][1],b[0][2]);d.lineTo(b[1][1],b[1][2]);
d.lineTo(b[2][1],b[2][2]);d.lineTo(a[2][1],a[2][2]);d.lineTo(a[1][1],a[1][2]);d.lineTo(a[0][1],a[0][2]);d.close();d.fill(c.fill());d.zIndex(20)}else{d=p6(this.N,this.g);a-=.5;b-=.5;a=[[a,-.5,.5],[a,.5,.5]];a.push([b,.5,.5]);a.push([b,-.5,.5]);f=[];for(h=0;h<a.length;h++)f.push(q6(d,a[h]));e=this.ja();l=s6(f,e);c.moveTo(l[0][1],l[0][2]);c.lineTo(l[1][1],l[1][2]);c.lineTo(l[2][1],l[2][2]);c.lineTo(l[3][1],l[3][2]);c.close();l=z6(this);k=[];f[0][0]>f[1][0]?k.push(a[0]):k.push(a[1]);k.push([k[0][0],k[0][1],
-.5]);k.push([b,k[0][1],-.5]);k.push([b,k[0][1],.5]);b=[];for(h=0;h<a.length;h++)b.push(q6(d,k[h]));d=s6(b,e);l.moveTo(d[0][1],d[0][2]);l.lineTo(d[1][1],d[1][2]);l.lineTo(d[2][1],d[2][2]);l.lineTo(d[3][1],d[3][2]);l.close();l.fill(c.fill());l.zIndex(20)}};
$.g.UF=function(a,b,c){var d=p6(this.N,this.g);a-=.5;b-=.5;a=[[-.5,a,.5],[.5,a,.5]];a.push([.5,b,.5]);a.push([-.5,b,.5]);for(var e=[],f=0;f<a.length;f++)e.push(q6(d,a[f]));var h=this.ja(),k=s6(e,h);c.moveTo(k[0][1],k[0][2]);c.lineTo(k[1][1],k[1][2]);c.lineTo(k[2][1],k[2][2]);c.lineTo(k[3][1],k[3][2]);c.close();k=z6(this);k.clear();var l=[];e[0][0]>e[1][0]?l.push(a[0]):l.push(a[1]);l.push([l[0][0],l[0][1],-.5]);l.push([l[0][0],b,-.5]);l.push([l[0][0],b,.5]);b=[];for(f=0;f<a.length;f++)b.push(q6(d,
l[f]));d=s6(b,h);k.moveTo(d[0][1],d[0][2]);k.lineTo(d[1][1],d[1][2]);k.lineTo(d[2][1],d[2][2]);k.lineTo(d[3][1],d[3][2]);k.close();k.fill(c.fill());k.zIndex(20)};$.g.rq=function(a){return $.n(a)?(this.N=+a,this.B(28,1),this):this.N};$.g.qq=function(a){$.n(a)&&(this.g=+a,this.B(28,1))};$.g.R=function(){$.qd(this.G);this.G=null;y6.u.R.call(this)};$.H(B6,$.ox);var G6=function(){var a={};$.hq(a,[[0,"rotationZ",$.qq],[0,"rotationY",function(a){a=Number(a);return $.Za(a,-90,90)}],[1,"box",$.Dq],[1,"stroke",$.Dq]]);return a}();$.U(B6,G6);$.g=B6.prototype;$.g.qa=$.ox.prototype.qa;$.g.sa=$.ox.prototype.sa|10580496;$.g.CX=function(a){this.xu||(this.xu=new t6,$.L(this.xu,this.ko,this),this.xu.rq(this.i("rotationZ")),this.xu.qq(this.i("rotationY")),$.W(this,"zAxis",this.xu));return $.n(a)?(this.xu.K(a),this):this.xu};
$.g.lh=function(a){this.ec||(this.ec=new t6,$.L(this.ec,this.ko,this),this.ec.rq(this.i("rotationZ")),this.ec.qq(this.i("rotationY")),$.W(this,"xAxis",this.ec));return $.n(a)?(this.ec.K(a),this):this.ec};$.g.ti=function(a){this.Uj||(this.Uj=new t6,$.L(this.Uj,this.ko,this),this.Uj.rq(this.i("rotationZ")),this.Uj.qq(this.i("rotationY")),$.W(this,"yAxis",this.Uj));return $.n(a)?(this.Uj.K(a),this):this.Uj};$.g.ko=function(){this.B(2097152,1)};$.g.Qf=function(){return this.oa.aa()};
$.g.vc=function(){return this.Nd=this.oa.aa()};$.g.aa=function(){return this.Nd||(this.Nd=this.oa.aa())};$.g.Ej=function(){return!this.oa.aa().Gb()};$.g.data=function(a,b){return $.n(a)?(this.jg!==a&&(this.jg=a,this.oa&&$.Zq(this.oa,this.Id,this),$.qd(this.oa),$.qd(this.jd),$.K(a,$.pr)?this.oa=a.tj():this.oa=$.K(a,$.zr)?a.ie():(this.jd=new $.zr($.A(a)||$.z(a)?a:null,b)).ie(),$.L(this.oa,this.Id,this),this.B(4608,1)),this):this.oa};$.g.Id=function(){this.B(4352,1)};
$.g.pS=function(a,b,c){return(0,$.za)(c,a)===b};
$.g.ob=function(){if(this.J(4096)){this.B(16384);var a=this.data().aa();a.reset();for(var b=[],c=[],d=[];a.advance();){var e=$.N(a.get("x")),f=$.N(a.get("y")),h=$.N(a.get("z"));b.push(e);c.push(f);d.push(h)}b=(0,$.Ye)(b,this.pS);c=(0,$.Ye)(c,this.pS);d=(0,$.Ye)(d,this.pS);this.nX=b;this.Py=c;this.VO=d;a=a.Gb();3E3<a&&$.el(800,null,[a],!0);(b.length*c.length!=a||4>a)&&0!=a?($.cl(400),this.n3=!0):this.n3=!1;this.I(4096)}this.J(16384)&&this.Kb&&(this.Kb.Hf()?(this.Kb.tg(),this.Kb.Uc.apply(this.Kb,this.VO),
this.Kb.Cg()):(this.Kb.mp(),this.Kb.Uc.apply(this.Kb,this.VO)),$.K(this.Kb,$.Uy)&&$.Bt(this.Kb.Qa()),this.B(16),this.I(16384));b=this.Va();c=this.bb();a=this.Ww();d=!1;b.Hf()&&b.tg();c.Hf()&&c.tg();a.Hf()&&a.tg();b.Uc.apply(b,this.nX);c.Uc.apply(c,this.Py);a.Uc.apply(a,this.VO);b.Hf()&&(d|=b.Cg());c.Hf()&&(d|=c.Cg());a.Hf()&&(d|=a.Cg());d&&this.B(65536)};
$.g.bm=function(){this.ob();for(var a=this.Ww().Qa().get(),b=[],c=0;c<a.length;c++){var d=this.sd()?this.sd().yq(a[c]):this.cc().nc(0);d={index:0,text:a[c],iconEnabled:!0,iconType:"square",iconStroke:$.Ol(d,1),iconFill:d,disabled:!this.enabled()};b.push(d)}return b};$.g.Te=function(){return[]};$.g.Va=function(a){if($.n(a)){if(a=$.Xs(this.cb,a,null,15))this.cb=a,this.cb.da(!1),this.B(16,1);$.L(this.cb,this.yD,this);return this}this.cb||(this.cb=$.Ts(),$.L(this.cb,this.yD,this));return this.cb};
$.g.bb=function(a){if($.n(a)){if(a=$.Xs(this.wc,a,null,15))this.wc=a,this.wc.da(!1),this.B(16,1);$.L(this.wc,this.yD,this);return this}this.wc||(this.wc=$.Ts(),$.L(this.wc,this.yD,this));return this.wc};$.g.Ww=function(a){if($.n(a)){if(a=$.Xs(this.Wy,a,null,15))this.Wy=a,this.Wy.da(!1),this.B(16,1);$.L(this.Wy,this.yD,this);return this}this.Wy||(this.Wy=$.Ts(),$.L(this.Wy,this.yD,this));return this.Wy};
$.g.sd=function(a){if($.n(a)){if(null===a&&this.Kb)this.Kb=null,this.B(16400,1);else if(a=$.Xs(this.Kb,a,null,48,null,this.Cp,this)){var b=this.Kb==a;this.Kb=a;this.Kb.da(b);b||this.B(16400,1)}return this}return this.Kb};$.g.Cp=function(a){$.X(a,6)&&this.B(16896,1)};$.g.yD=function(){this.B(16,1)};
$.g.Yj=function(a){this.Yb||(this.Yb=new $.oN,$.W(this,"colorRange",this.Yb),this.Yb.ia(!0,this.Yb.ma),this.Yb.gr().Fa("defaultMarkerFactory","surface.colorRange.marker"),this.Yb.gr().ia(!0,this.Yb.gr().ma),this.Yb.ib(this),this.Yb.P(this.La),$.L(this.Yb,this.uz,this),this.B(8196,1));return $.n(a)?(this.Yb.K(a),this):this.Yb};$.g.uz=function(a){var b=0,c=0;$.X(a,1)&&(b|=8208,c|=1);$.X(a,8)&&(b|=4,c|=8);this.B(b,c)};
$.g.kq=function(a){a.button==$.Mi&&(this.C2=!0,this.pia=a.clientX,this.qia=a.clientY,this.sia=this.i("rotationY"),this.tia=this.i("rotationZ"))};$.g.sh=function(a){"mouseup"==a.type&&(this.C2=!1)};$.g.rg=function(a){if(this.C2){$.V(this);var b=this.lb();this.rotationY(this.sia-(this.qia-a.clientY)/b.height*110);this.rotationZ(this.tia+(this.pia-a.clientX)/b.width*110);this.da(!0)}};
$.g.ei=function(a){if(!this.ef()){var b=this.i("rotationZ"),c=this.i("rotationY"),d=[-1,0,0];this.xba=d=q6(p6(0,c),d);b*=Math.PI/180;c*=Math.PI/180;d=Math.sin(b);b=Math.cos(b);var e=Math.sin(c);c=Math.cos(c);this.kh=[b*c,-d*c,e,d,b,0,-e*b,d*e,c];c=$.jr(this,"xGrid");d=$.jr(this,"yGrid");b=$.jr(this,"zGrid");e=$.jr(this,"xAxis");var f=$.jr(this,"yAxis"),h=$.jr(this,"zAxis");this.Wa||(this.Wa=this.La.Dd(),this.Wa.zIndex(36),this.pE=this.Wa.Dd(),this.pE.zIndex(36));var k=$.jr(this,"colorRange");this.ob();
this.J(65536)&&(h&&!h.scale()&&h.scale(this.Ww()),e&&!e.scale()&&e.scale(this.Va()),f&&!f.scale()&&f.scale(this.bb()),c&&c.scale(this.Va()),d&&d.scale(this.bb()),b&&b.scale(this.Ww()),this.I(65536));this.J(8192)&&k&&($.V(k),k.scale(this.sd()),k.target(this),k.da(!1),this.B(4));this.J(4)&&(k?(k.ja(a.clone()),this.Pf=k.qd()):this.Pf=a.clone(),this.Pf.left+=10,this.Pf.width-=10,h&&h.ja(this.Pf),f&&f.ja(this.Pf),e&&e.ja(this.Pf),c&&c.ja(this.Pf),d&&d.ja(this.Pf),b&&b.ja(this.Pf),this.B(512),this.I(4));
this.J(8192)&&(k&&($.V(k),k.P(this.La),k.$(),k.da(!1)),this.I(8192));a=this.Pf;var l=[[-.5,-.5,.5],[-.5,.5,.5],[.5,.5,.5],[.5,-.5,.5]];h=[[-.5,-.5,-.5],[-.5,.5,-.5],[.5,.5,-.5],[.5,-.5,-.5]];if(0==this.qz.length)for(f=0;12>f;f++)this.qz[f]=this.Wa.path();else for(f=0;f<this.qz.length;f++)this.qz[f].clear();e=this.i("box");var m=[],p=[];for(f=0;f<l.length;f++)m[f]=q6(this.kh,l[f]),p[f]=q6(this.kh,h[f]);f=Pna(m);h=f.D2;k=Pna(p).D2;var q=f.left,r=[];for(f=0;f<m.length;f++){var t=f==m.length-1?0:f+1,
u=m[t],v=m[f],w=Math.abs(l[f][0]-l[t][0]),x=Math.abs(l[f][1]-l[t][1]),y=$.jr(this,"xAxis"),B=$.jr(this,"yAxis");t=$.jr(this,"zAxis");(y&&y.enabled(),B&&B.enabled(),y&&y.enabled()&&w>x&&0<=[v,u].indexOf(h))||B&&B.enabled()&&x>w&&0<=[v,u].indexOf(h)||r.push([m[f],u])}for(f=0;f<p.length;f++)u=f==p.length-1?p[0]:p[f+1],r.push([p[f],u]);for(f=0;f<m.length;f++)t&&t.enabled()&&m[f]==q||r.push([m[f],p[f]]);for(f=0;f<r.length;f++){t=r[f][0];l=r[f][1];m=Math.min(D6(this,[t]),D6(this,[l]));if(t==h||l==h||t==
k||l==k)m=100;this.Np(this.qz[f],s6(r[f],a),m,e)}this.J(8388608)&&(c&&(c.P(this.La),c.$()),d&&(d.P(this.La),d.$()),b&&(b.P(this.La),b.$()),this.I(8388608));if(this.J(16)){t=this.Pf;c=this.data().aa();c.reset();d=this.i("stroke");this.pE.Ki();if(!this.n3){this.Wa.suspend();for(b=0;b<this.nX.length-1;b++)for(a=0;a<this.Py.length-1;a++){f=b*(this.Py.length-1)+a;(e=this.wa[f])?(e.parent(this.pE),e.clear()):(e=this.wa[f]=this.pE.path(),e.stroke(null));c.select(b*this.Py.length+a);f=[$.N(c.get("x")),$.N(c.get("y")),
$.N(c.get("z"))];c.select((b+1)*this.Py.length+a);h=[$.N(c.get("x")),$.N(c.get("y")),$.N(c.get("z"))];c.select((b+1)*this.Py.length+a+1);k=[$.N(c.get("x")),$.N(c.get("y")),$.N(c.get("z"))];c.select(b*this.Py.length+a+1);r=[$.N(c.get("x")),$.N(c.get("y")),$.N(c.get("z"))];l=[f,h,k,r];p=this.Ww();m=p.uh();p=p.Rh();u=this.bb();q=u.uh();u=u.Rh();w=this.Va();v=w.uh();w=w.Rh();x=0;y=[];for(B=0;B<l.length;B++){var G=l[B];if(!(G[2]>=m&&G[2]<=p&&G[1]<=u&&G[1]>=q&&G[0]>=v&&G[0]<=w)){x++;if(G[2]<m||G[2]>p)G[2]=
Math.max(Math.min(G[2],p),m);if(G[1]<u||G[1]>q)G[1]=Math.max(Math.min(G[1],u),q);if(G[0]>v||G[0]<w)G[0]=Math.max(Math.min(G[0],w),v)}y.push(G)}if(l=x==l.length?null:y){m=q6(this.kh,C6(this,l[0]));p=q6(this.kh,C6(this,l[1]));q=q6(this.kh,C6(this,l[2]));u=q6(this.kh,C6(this,l[3]));l=36+D6(this,[m,p,q,u]);m=s6([m,p,q,u],t);p=this.sd();var C;p?C=p.yq((f[2]+h[2]+k[2]+r[2])/4):C=this.cc().nc(0);f=C;this.Np(e,m,l,d);e.close();e.fill(f||"white")}}this.Wa.resume()}this.I(16)}this.J(2097152)&&(C=$.jr(this,
"xAxis"),t=$.jr(this,"yAxis"),c=$.jr(this,"zAxis"),C&&C.P(this.La).$(),t&&t.P(this.La).$(),c&&c.P(this.La).$(),this.I(2097152))}};$.g.Np=function(a,b,c,d){a.clear();a.moveTo(b[0][1],b[0][2]);for(var e=1;e<b.length;e++)a.lineTo(b[e][1],b[e][2]);a.zIndex(c);a.stroke(d)};$.g.Zm=function(a){this.Vs||(this.Vs=new y6,this.Vs.Hj=this,$.L(this.Vs,this.ny,this),this.Vs.rq(this.i("rotationZ")),this.Vs.qq(this.i("rotationY")),$.W(this,"xGrid",this.Vs),this.B(8388608,1));return $.n(a)?(this.Vs.K(a),this):this.Vs};
$.g.$m=function(a){this.yr||(this.yr=new y6,this.yr.Hj=this,$.L(this.yr,this.ny,this),this.yr.rq(this.i("rotationZ")),this.yr.qq(this.i("rotationY")),$.Yy(this.yr,"vertical"),$.W(this,"yGrid",this.yr),this.B(8388608,1));return $.n(a)?(this.yr.K(a),this):this.yr};
$.g.DX=function(a){this.Cq||(this.Cq=new y6,this.Cq.Hj=this,$.L(this.Cq,this.ny,this),this.Cq.rq(this.i("rotationZ")),this.Cq.qq(this.i("rotationY")),$.Yy(this.Cq,"horizontal"),Nna(this.Cq,!0),$.W(this,"zGrid",this.Cq),this.B(8388608,1));return $.n(a)?(this.Cq.K(a),this):this.Cq};$.g.ny=function(){this.B(8388624,1)};$.g.mc=function(){return this};$.g.Rd=function(){return null};
$.g.cc=function(a){if($.K(a,$.ys))return this.Ic($.ys,a),this;if($.K(a,$.vs))return this.Ic($.vs,a),this;$.D(a)&&"range"==a.type?this.Ic($.ys):($.D(a)||null==this.Ea)&&this.Ic($.vs);return $.n(a)?(this.Ea.K(a),this):this.Ea};$.g.Ic=function(a,b){if($.K(this.Ea,a))b&&this.Ea.K(b);else{var c=!!this.Ea;$.qd(this.Ea);this.Ea=new a;$.W(this,"palette",this.Ea);this.Ea.oq();b&&this.Ea.K(b);$.L(this.Ea,this.If,this);c&&this.B(16,1)}};$.g.If=function(a){$.X(a,2)&&this.B(16,1)};$.g.Na=function(){return"surface"};
$.g.F=function(){var a=B6.u.F.call(this);this.oa&&(a.data=this.data().F());var b=[];this.cb&&(a.xScale=this.Va().F(),b.push($.oa(this.Va())));this.wc&&(a.yScale=this.bb().F(),b.push($.oa(this.bb())));this.Wy&&(a.zScale=this.Ww().F(),b.push($.oa(this.Ww())));this.ec&&(a.xAxis=this.lh().F(),E6(b,this.lh(),"xAxis",a));this.Uj&&(a.yAxis=this.ti().F(),E6(b,this.ti(),"yAxis",a));this.xu&&(a.zAxis=this.CX().F(),E6(b,this.CX(),"zAxis",a));this.Vs&&(a.xGrid=this.Zm().F(),E6(b,this.Zm(),"xGrid",a));this.yr&&
(a.yGrid=this.$m().F(),E6(b,this.$m(),"yGrid",a));this.Cq&&(a.zGrid=this.DX().F(),E6(b,this.DX(),"zGrid",a));a.colorScale=this.Kb?this.sd().F():null;this.Yb&&(a.colorRange=this.Yj().F());$.Hq(this,G6,a);return{chart:a}};
$.g.X=function(a,b){B6.u.X.call(this,a,b);"data"in a&&this.data(a.data);F6(this,a,"xScale");F6(this,a,"yScale");F6(this,a,"zScale");F6(this,a,"xAxis");F6(this,a,"yAxis");F6(this,a,"zAxis");F6(this,a,"xGrid");F6(this,a,"yGrid");F6(this,a,"zGrid");"colorScale"in a&&this.sd(a.colorScale);"colorRange"in a&&this.Yj(a.colorRange);$.zq(this,G6,a,b)};
$.g.R=function(){$.td(this.ec,this.Uj,this.xu,this.wa,this.Vs,this.yr,this.Cq,this.qz,this.pE,this.Wa,this.Yb,this.Ea,this.oa,this.jd);this.qz.length=0;this.wa.length=0;this.Cq=this.yr=this.Vs=this.xu=this.Uj=this.ec=this.jd=this.oa=this.Ea=this.Yb=this.Wa=this.pE=null;B6.u.R.call(this)};$.g.At=function(){return[this]};$.g.mG=function(){return["x","y","z"]};var H6=B6.prototype;H6.colorScale=H6.sd;H6.colorRange=H6.Yj;H6.xGrid=H6.Zm;H6.yGrid=H6.$m;H6.zGrid=H6.DX;H6.xAxis=H6.lh;H6.yAxis=H6.ti;
H6.zAxis=H6.CX;H6.xScale=H6.Va;H6.yScale=H6.bb;H6.zScale=H6.Ww;H6.getType=H6.Na;H6.palette=H6.cc;$.Jp.surface=Qna;$.F("anychart.surface",Qna);}).call(this,$)}
