!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";function e(t,e){"createcanvas"===t&&(gx=null),bx[t]=e}function i(t){if(null==t||"object"!=typeof t)return t;var e=t,n=kx.call(t);if("[object array]"===n){if(!o(t)){e=[];for(var o=0,a=t.length;on_||t<-n_}function vt(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedtime=0,this._paused=!1}function yt(t){return(t=math.round(t))<0?0:t>255?255:t}function xt(t){return(t=math.round(t))<0?0:t>360?360:t}function _t(t){return t<0?0:t>1?1:t}function wt(t){return yt(t.length&&"%"===t.charat(t.length-1)?parsefloat(t)/100*255:parseint(t,10))}function bt(t){return _t(t.length&&"%"===t.charat(t.length-1)?parsefloat(t)/100:parsefloat(t))}function st(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function mt(t,e,i){return t+(e-t)*i}function it(t,e,i,n,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=o,t}function dt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function tt(t,e){g_&&dt(g_,e),g_=p_.put(t,g_||e.slice())}function at(t,e){if(t){e=e||[];var i=p_.get(t);if(i)return dt(e,i);var n=(t+="").replace(/ /g,"").tolowercase();if(n in f_)return dt(e,f_[n]),tt(t,e),e;if("#"!==n.charat(0)){var o=n.indexof("("),a=n.indexof(")");if(-1!==o&&a+1===n.length){var r=n.substr(0,o),s=n.substr(o+1,a-(o+1)).split(","),l=1;switch(r){case"rgba":if(4!==s.length)return void it(e,0,0,0,1);l=bt(s.pop());case"rgb":return 3!==s.length?void it(e,0,0,0,1):(it(e,wt(s[0]),wt(s[1]),wt(s[2]),l),tt(t,e),e);case"hsla":return 4!==s.length?void it(e,0,0,0,1):(s[3]=bt(s[3]),ct(s,e),tt(t,e),e);case"hsl":return 3!==s.length?void it(e,0,0,0,1):(ct(s,e),tt(t,e),e);default:return}}it(e,0,0,0,1)}else{if(4===n.length)return(u=parseint(n.substr(1),16))>=0&&u<=4095?(it(e,(3840&u)>>4|(3840&u)>>8,240&u|(240&u)>>4,15&u|(15&u)<<4,1),tt(t,e),e):void it(e,0,0,0,1);if(7===n.length){var u=parseint(n.substr(1),16);return u>=0&&u<=16777215?(it(e,(16711680&u)>>16,(65280&u)>>8,255&u,1),tt(t,e),e):void it(e,0,0,0,1)}}}}function ct(t,e){var i=(parsefloat(t[0])%360+360)%360/360,n=bt(t[1]),o=bt(t[2]),a=o<=.5?o*(n+1):o+n-o*n,r=2*o-a;return e=e||[],it(e,yt(255*st(r,a,i+1/3)),yt(255*st(r,a,i)),yt(255*st(r,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function lt(t){if(t){var e,i,n=t[0]/255,o=t[1]/255,a=t[2]/255,r=math.min(n,o,a),s=math.max(n,o,a),l=s-r,u=(s+r)/2;if(0===l)e=0,i=0;else{i=u<.5?l/(s+r):l/(2-s-r);var h=((s-n)/6+l/2)/l,c=((s-o)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?e=d-c:o===s?e=1/3+h-d:a===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var f=[360*e,i,u];return null!=t[3]&&f.push(t[3]),f}}function kt(t,e){var i=at(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,i[n]>255?i[n]=255:t[n]<0&&(i[n]=0);return rt(i,4===i.length?"rgba":"rgb")}}function pt(t){var e=at(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).tostring(16).slice(1)}function nt(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var n=t*(e.length-1),o=math.floor(n),a=math.ceil(n),r=e[o],s=e[a],l=n-o;return i[0]=yt(mt(r[0],s[0],l)),i[1]=yt(mt(r[1],s[1],l)),i[2]=yt(mt(r[2],s[2],l)),i[3]=_t(mt(r[3],s[3],l)),i}}function ot(t,e,i){if(e&&e.length&&t>=0&&t<=1){var n=t*(e.length-1),o=math.floor(n),a=math.ceil(n),r=at(e[o]),s=at(e[a]),l=n-o,u=rt([yt(mt(r[0],s[0],l)),yt(mt(r[1],s[1],l)),yt(mt(r[2],s[2],l)),_t(mt(r[3],s[3],l))],"rgba");return i?{color:u,leftindex:o,rightindex:a,value:n}:u}}function et(t,e,i,n){if(t=at(t))return t=lt(t),null!=e&&(t[0]=xt(e)),null!=i&&(t[1]=bt(i)),null!=n&&(t[2]=bt(n)),rt(ct(t),"rgba")}function zt(t,e){if((t=at(t))&&null!=e)return t[3]=_t(e),rt(t,"rgba")}function rt(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}}function bt(t,e){return t[e]}function vt(t,e,i){t[e]=i}function gt(t,e,i){return(e-t)*i+t}function ft(t,e,i){return i>.5?e:t}function wt(t,e,i,n,o){var a=t.length;if(1==o)for(s=0;so)t.length=o;else for(r=n;r=0&&!(m[i]<=e);i--);i=math.min(i,u-2)}else{for(i=l;ie);i++);i=math.min(i-1,u-2)}l=i,k=e;var n=m[i+1]-m[i];if(0!==n)if(i=(e-m[i])/n,l)if(t=v[i],d=v[0===i?i:i-1],a=v[i>u-2?u-1:i+1],c=v[i>u-3?u-1:i+2],d)ut(d,t,a,c,i,i*i,i*i*i,r(t,o),g);else{if(f)a=ut(d,t,a,c,i,i*i,i*i*i,p,1),a=yt(p);else{if(p)return ft(t,a,i);a=jt(d,t,a,c,i,i*i,i*i*i)}s(t,o,a)}else if(d)wt(v[i],v[i+1],i,r(t,o),g);else{var a;if(f)wt(v[i],v[i+1],i,p,1),a=yt(p);else{if(p)return ft(v[i],v[i+1],i);a=gt(v[i],v[i+1],i)}s(t,o,a)}},ondestroy:i});return e&&"spline"!==e&&(n.easing=e),n}}}function kt(t,e,i,n){i<0&&(t+=i,i=-i),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}function jt(t){for(var e=0;t>=k_;)e|=1&t,t>>=1;return t+e}function qt(t,e,i,n){var o=e+1;if(o===i)return 1;if(n(t[o++],t[e])<0){for(;o=0;)o++;return o-e}function te(t,e,i){for(i--;e>>1])<0?l=a:s=a+1;var u=n-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=r}}function ie(t,e,i,n,o,a){var r=0,s=0,l=1;if(a(t,e[i+o])>0){for(s=n-o;l0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),r+=o,l+=o}else{for(s=o+1;ls&&(l=s);var u=r;r=o-l,l=o-u}for(r++;r>>1);a(t,e[i+h])>0?r=h+1:l=h}return l}function ne(t,e,i,n,o,a){var r=0,s=0,l=1;if(a(t,e[i+o])<0){for(s=o+1;ls&&(l=s);var u=r;r=o-l,l=o-u}else{for(s=n-o;l=0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),r+=o,l+=o}for(r++;r>>1);a(t,e[i+h])<0?l=h:r=h+1}return l}function oe(t,e){function i(i){var s=a[i],u=r[i],h=a[i+1],c=r[i+1];r[i]=u+c,i===l-3&&(a[i+1]=a[i+2],r[i+1]=r[i+2]),l--;var d=ne(t[h],t,s,u,0,e);s+=d,0!==(u-=d)&&0!==(c=ie(t[s+u-1],t,h,c,c-1,e))&&(u<=c?n(s,u,h,c):o(s,u,h,c))}function n(i,n,o,a){var r=0;for(r=0;r=p_||f>=p_);if(p)break;g<0&&(g=0),g+=2}if((s=g)<1&&(s=1),1===n){for(r=0;r=0;r--)t[f+r]=t[d+r];if(0===n){v=!0;break}}if(t[c--]=u[h--],1==--a){v=!0;break}if(0!=(m=a-ie(t[l],u,0,a,a-1,e))){for(a-=m,f=(c-=m)+1,d=(h-=m)+1,r=0;r=p_||m>=p_);if(v)break;p<0&&(p=0),p+=2}if((s=p)<1&&(s=1),1===a){for(f=(c-=n)+1,d=(l-=n)+1,r=n-1;r>=0;r--)t[f+r]=t[d+r];t[c]=u[h]}else{if(0===a)throw new error;for(d=c-(a-1),r=0;r=0;r--)t[f+r]=t[d+r];t[c]=u[h]}else for(d=c-(a-1),r=0;r1;){var t=l-2;if(t>=1&&r[t-1]<=r[t]+r[t+1]||t>=2&&r[t-2]<=r[t]+r[t-1])r[t-1]r[t+1])break;i(t)}},this.forcemergeruns=function(){for(;l>1;){var t=l-2;t>0&&r[t-1]s&&(l=s),ee(t,i,i+l,i+a,e),a=l}r.pushrun(i,a),r.mergeruns(),o-=a,i+=a}while(0!==o);r.forcemergeruns()}}function re(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function se(t,e,i){var n=null==e.x?0:e.x,o=null==e.x2?1:e.x2,a=null==e.y?0:e.y,r=null==e.y2?0:e.y2;return e.global||(n=n*i.width+i.x,o=o*i.width+i.x,a=a*i.height+i.y,r=r*i.height+i.y),n=isnan(n)?0:n,o=isnan(o)?1:o,a=isnan(a)?0:a,r=isnan(r)?0:r,t.createlineargradient(n,a,o,r)}function le(t,e,i){var n=i.width,o=i.height,a=math.min(n,o),r=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(r=r*n+i.x,s=s*o+i.y,l*=a),t.createradialgradient(r,s,0,r,s,l)}function ue(){return!1}function he(t,e,i){var n=vx(),o=e.getwidth(),a=e.getheight(),r=n.style;return r&&(r.position="absolute",r.left=0,r.top=0,r.width=o+"px",r.height=a+"px",n.setattribute("data-zr-dom-id",t)),n.width=o*i,n.height=a*i,n}function ce(t){if("string"==typeof t){var e=z_.get(t);return e&&e.image}return t}function de(t,e,i,n,o){if(t){if("string"==typeof t){if(e&&e.__zrimagesrc===t||!i)return e;var a=z_.get(t),r={hostel:i,cb:n,cbpayload:o};return a?!pe(e=a.image)&&a.pending.push(r):(!e&&(e=new image),e.onload=fe,z_.put(t,e.__cachedimgobj={image:e,pending:[r]}),e.src=e.__zrimagesrc=t),e}return t}return e}function fe(){var t=this.__cachedimgobj;this.onload=this.__cachedimgobj=null;for(var e=0;ex_&&(j_=0,u_={}),j_++,u_[i]=o,o}function me(t,e,i,n,o,a,r){return a?ye(t,e,i,n,o,a,r):ve(t,e,i,n,o,r)}function ve(t,e,i,n,o,a){var r=ae(t,e,o,a),s=ge(t,e);o&&(s+=o[1]+o[3]);var l=r.outerheight,u=new kt(xe(0,s,i),_e(0,l,n),s,l);return u.lineheight=r.lineheight,u}function ye(t,e,i,n,o,a,r){var s=ce(t,{rich:a,truncate:r,font:e,textalign:i,textpadding:o}),l=s.outerwidth,u=s.outerheight;return new kt(xe(0,l,i),_e(0,u,n),l,u)}function xe(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function _e(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function we(t,e,i){var n=e.x,o=e.y,a=e.height,r=e.width,s=a/2,l="left",u="top";switch(t){case"left":n-=i,o+=s,l="right",u="middle";break;case"right":n+=i+r,o+=s,u="middle";break;case"top":n+=r/2,o-=i,l="center",u="bottom";break;case"bottom":n+=r/2,o+=a+i,l="center";break;case"inside":n+=r/2,o+=s,l="center",u="middle";break;case"insideleft":n+=i,o+=s,u="middle";break;case"insideright":n+=r-i,o+=s,l="right",u="middle";break;case"insidetop":n+=r/2,o+=i,l="center";break;case"insidebottom":n+=r/2,o+=a-i,l="center",u="bottom";break;case"insidetopleft":n+=i,o+=i;break;case"insidetopright":n+=r-i,o+=i,l="right";break;case"insidebottomleft":n+=i,o+=a-i,u="bottom";break;case"insidebottomright":n+=r-i,o+=a-i,l="right",u="bottom"}return{x:n,y:o,textalign:l,textverticalalign:u}}function be(t,e,i,n,o){if(!e)return"";var a=(t+"").split("\n");o=se(e,i,n,o);for(var r=0,s=a.length;r=r;l++)s-=r;var u=ge(i);return u>s&&(i="",u=0),s=t-u,n.ellipsis=i,n.ellipsiswidth=u,n.contentwidth=s,n.containerwidth=t,n}function me(t,e){var i=e.containerwidth,n=e.font,o=e.contentwidth;if(!i)return"";var a=ge(t,n);if(a<=i)return t;for(var r=0;;r++){if(a<=o||r>=e.maxiterations){t+=e.ellipsis;break}var s=0===r?ie(t,o,e.asccharwidth,e.cncharwidth):a>0?math.floor(t.length*o/a):0;a=ge(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function ie(t,e,i,n){for(var o=0,a=0,r=t.length;al)t="",a=[];else if(null!=u)for(var h=se(u-(i?i[1]+i[3]:0),e,n.ellipsis,{minchar:n.minchar,placeholder:n.placeholder}),c=0,d=a.length;co&&le(i,t.substring(o,a)),le(i,n[2],n[1]),o=y_.lastindex}of)return{lines:[],width:0,height:0};k.textwidth=ge(k.text,_);var b=y.textwidth,s=null==b||"auto"===b;if("string"==typeof b&&"%"===b.charat(b.length-1))k.percentwidth=b,u.push(k),b=0;else{if(s){b=k.textwidth;var m=y.textbackgroundcolor,i=m&&m.image;i&&pe(i=ce(i))&&(b=math.max(b,i.width*w/i.height))}var d=x?x[1]+x[3]:0;b+=d;var c=null!=d?d-m:null;null!=c&&cl&&(i*=l/(c=i+n),n*=l/c),o+a>l&&(o*=l/(c=o+a),a*=l/c),n+o>u&&(n*=u/(c=n+o),o*=u/c),i+a>u&&(i*=u/(c=i+a),a*=u/c),t.moveto(r+i,s),t.lineto(r+l-n,s),0!==n&&t.arc(r+l-n,s+n,n,-math.pi/2,0),t.lineto(r+l,s+u-o),0!==o&&t.arc(r+l-o,s+u-o,o,0,math.pi/2),t.lineto(r+a,s+u),0!==a&&t.arc(r+a,s+u-a,a,math.pi/2,math.pi),t.lineto(r,s+i),0!==i&&t.arc(r+i,s+i,i,math.pi,1.5*math.pi)}function ne(t){return oe(t),d(t.rich,oe),t}function oe(t){if(t){t.font=ke(t);var e=t.textalign;"middle"===e&&(e="center"),t.textalign=null==e||k_[e]?e:"left";var i=t.textverticalalign||t.textbaseline;"center"===i&&(i="middle"),t.textverticalalign=null==i||j_[i]?i:"top",t.textpadding&&(t.textpadding=l(t.textpadding))}}function ee(t,e,i,n,o){n.rich?re(t,e,i,n,o):ze(t,e,i,n,o)}function ze(t,e,i,n,o){var a=ue(e,"font",n.font||q_),r=n.textpadding,s=t.__textcotentblock;s&&!t.__dirty||(s=t.__textcotentblock=ae(i,a,r,n.truncate));var l=s.outerheight,u=s.lines,h=s.lineheight,c=ze(l,n,o),d=c.basex,f=c.basey,p=c.textalign,g=c.textverticalalign;ve(e,n,o,d,f);var m=_e(f,l,g),v=d,y=m,x=fe(n);if(x||r){var _=ge(i,a);r&&(_+=r[1]+r[3]);var w=xe(d,_,p);x&&we(t,e,n,w,m,_,l),r&&(v=qe(d,p,r),y+=r[0])}ue(e,"textalign",p||"left"),ue(e,"textbaseline","middle"),ue(e,"shadowblur",n.textshadowblur||0),ue(e,"shadowcolor",n.textshadowcolor||"transparent"),ue(e,"shadowoffsetx",n.textshadowoffsetx||0),ue(e,"shadowoffsety",n.textshadowoffsety||0),y+=h/2;var b=n.textstrokewidth,s=je(n.textstroke,b),m=xe(n.textfill);s&&(ue(e,"linewidth",b),ue(e,"strokestyle",s)),m&&ue(e,"fillstyle",m);for(var i=0;i=0&&"right"===(_=b[c]).textalign;)ge(t,e,_,n,m,v,a,"right"),i-=_.width,a-=_.width,c--;for(t+=(a-(t-m)-(y-a)-i)/2;d<=c;)ge(t,e,_=b[d],n,m,v,t+_.width/2,"center"),t+=_.width,d++;v+=m}}function ve(t,e,i,n,o){if(i&&e.textrotation){var a=e.textorigin;"center"===a?(n=i.width/2+i.x,o=i.height/2+i.y):a&&(n=a[0]+i.x,o=a[1]+i.y),t.translate(n,o),t.rotate(-e.textrotation),t.translate(-n,-o)}}function ge(t,e,i,n,o,a,r,s){var l=n.rich[i.stylename]||{},u=i.textverticalalign,h=a+o/2;"top"===u?h=a+i.height/2:"bottom"===u&&(h=a+o-i.height/2),!i.islineholder&&fe(l)&&we(t,e,l,"right"===s?r-i.width:"center"===s?r-i.width/2:r,h-i.height/2,i.width,i.height);var c=i.textpadding;c&&(r=qe(r,s,c),h-=i.height/2-c[2]-i.textheight/2),ue(e,"shadowblur",a(l.textshadowblur,n.textshadowblur,0)),ue(e,"shadowcolor",l.textshadowcolor||n.textshadowcolor||"transparent"),ue(e,"shadowoffsetx",a(l.textshadowoffsetx,n.textshadowoffsetx,0)),ue(e,"shadowoffsety",a(l.textshadowoffsety,n.textshadowoffsety,0)),ue(e,"textalign",s),ue(e,"textbaseline","middle"),ue(e,"font",i.font||q_);var d=je(l.textstroke||n.textstroke,p),f=xe(l.textfill||n.textfill),p=t(l.textstrokewidth,n.textstrokewidth);d&&(ue(e,"linewidth",p),ue(e,"strokestyle",d),e.stroketext(i.text,r,h)),f&&(ue(e,"fillstyle",f),e.filltext(i.text,r,h))}function fe(t){return t.textbackgroundcolor||t.textborderwidth&&t.textbordercolor}function we(t,e,i,n,o,a,r){var s=i.textbackgroundcolor,l=i.textborderwidth,u=i.textbordercolor,h=_(s);if(ue(e,"shadowblur",i.textboxshadowblur||0),ue(e,"shadowcolor",i.textboxshadowcolor||"transparent"),ue(e,"shadowoffsetx",i.textboxshadowoffsetx||0),ue(e,"shadowoffsety",i.textboxshadowoffsety||0),h||l&&u){e.beginpath();var c=i.textborderradius;c?pe(e,{x:n,y:o,width:a,height:r,r:c}):e.rect(n,o,a,r),e.closepath()}if(h)ue(e,"fillstyle",s),e.fill();else if(w(s)){var d=s.image;(d=de(d,null,t,he,s))&&pe(d)&&e.drawimage(d,n,o,a,r)}l&&u&&(ue(e,"linewidth",l),ue(e,"strokestyle",u),e.stroke())}function he(t,e){e.image=t}function ze(t,e,i){var n=e.x||0,o=e.y||0,a=e.textalign,r=e.textverticalalign;if(i){var s=e.textposition;if(s instanceof array)n=i.x+ye(s[0],i.width),o=i.y+ye(s[1],i.height);else{var l=we(s,i,e.textdistance);n=l.x,o=l.y,a=a||l.textalign,r=r||l.textverticalalign}var u=e.textoffset;u&&(n+=u[0],o+=u[1])}return{basex:n,basey:o,textalign:a,textverticalalign:r}}function ue(t,e,i){return t[e]=e_(t,e,i),t[e]}function je(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorstops?"#000":t}function xe(t){return null==t||"none"===t?null:t.image||t.colorstops?"#000":t}function ye(t,e){return"string"==typeof t?t.lastindexof("%")>=0?parsefloat(t)/100*e:parsefloat(t):t}function qe(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function $e(t,e){return null!=t&&(t||e.textbackgroundcolor||e.textborderwidth&&e.textbordercolor||e.textpadding)}function ke(t){t=t||{},d_.call(this,t);for(var e in t)t.hasownproperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new r_(t.style,this),this._rect=null,this.__clippaths=[]}function je(t){ke.call(this,t)}function qe(t){return parseint(t,10)}function ti(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}function ei(t,e,i){return ew.copy(t.getboundingrect()),t.transform&&ew.applytransform(t.transform),iw.width=e,iw.height=i,!ew.intersect(iw)}function ii(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i=0){var o="touchend"!=n?e.targettouches[0]:e.changedtouches[0];o&&ri(t,o,e,i)}else ri(t,e,e,i),e.zrdelta=e.wheeldelta?e.wheeldelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&aw.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function ui(t,e,i){ow?t.addeventlistener(e,i):t.attachevent("on"+e,i)}function hi(t,e,i){ow?t.removeeventlistener(e,i):t.detachevent("on"+e,i)}function ci(t){return t.which>1}function di(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return math.sqrt(e*e+i*i)}function fi(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function pi(t){return"mousewheel"===t&&ax.browser.firefox?"dommousescroll":t}function gi(t,e,i){var n=t._gesturemgr;"start"===i&&n.clear();var o=n.recognize(e,t.handler.findhover(e.zrx,e.zry,null).target,t.dom);if("end"===i&&n.clear(),o){var a=o.type;e.gestureevent=a,t.handler.dispatchtoelement({target:o.target},a,o.event)}}function mi(t){t._touching=!0,cleartimeout(t._touchtimer),t._touchtimer=settimeout(function(){t._touching=!1},700)}function vi(t){var e=t.pointertype;return"pen"===e||"touch"===e}function yi(t){function e(t,e){return function(){if(!e._touching)return t.apply(e,arguments)}}d(cw,function(e){t._handlers[e]=m(pw[e],t)}),d(fw,function(e){t._handlers[e]=m(pw[e],t)}),d(hw,function(i){t._handlers[i]=e(pw[i],t)})}function xi(t){function e(e,i){d(e,function(e){ui(t,pi(e),i._handlers[e])},i)}$x.call(this),this.dom=t,this._touching=!1,this._touchtimer,this._gesturemgr=new lw,this._handlers={},yi(this),ax.pointereventssupported?e(fw,this):(ax.toucheventssupported&&e(cw,this),e(hw,this))}function _i(t,e){var i=new xw(dx(),t,e);return yw[i.id]=i,i}function wi(t,e){vw[t]=e}function bi(t){delete yw[t]}function si(t){return t instanceof array?t:null==t?[]:[t]}function mi(t,e,i){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var n=0,o=i.length;n=i.length&&i.push({option:t})}}),i}function ai(t){var e=z();ww(t,function(t,i){var n=t.exist;n&&e.set(n.id,t)}),ww(t,function(t,i){var n=t.option;k(!n||null==n.id||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&e.set(n.id,t),!t.keyinfo&&(t.keyinfo={})}),ww(t,function(t,i){var n=t.exist,o=t.option,a=t.keyinfo;if(bw(o)){if(a.name=null!=o.name?o.name+"":n?n.name:mw+i,n)a.id=n.id;else if(null!=o.id)a.id=o.id+"";else{var r=0;do{a.id="\0"+a.name+"\0"+r++}while(e.get(a.id))}e.set(a.id,t)}})}function ci(t){var e=t.name;return!(!e||!e.indexof(mw))}function li(t){return bw(t)&&t.id&&0===(t.id+"").indexof("\0_ec_\0")}function ki(t,e){function i(t,e,i){for(var n=0,o=t.length;n-rw&&trw||t<-rw}function xi(t,e,i,n,o){var a=1-o;return a*a*(a*t+3*o*e)+o*o*(o*n+3*a*i)}function yi(t,e,i,n,o){var a=1-o;return 3*(((e-t)*a+2*(i-e)*o)*a+(n-i)*o*o)}function qi(t,e,i,n,o,a){var r=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),u=t-o,h=s*s-3*r*l,c=s*l-9*r*u,d=l*l-3*s*u,f=0;if(ui(h)&&ui(c))ui(s)?a[0]=0:(m=-l/s)>=0&&m<=1&&(a[f++]=m);else{var p=c*c-4*h*d;if(ui(p)){var g=c/h,m=-g/2;(m=-s/r+g)>=0&&m<=1&&(a[f++]=m),m>=0&&m<=1&&(a[f++]=m)}else if(p>0){var v=zw(p),y=h*s+1.5*r*(-c+v),x=h*s+1.5*r*(-c-v);(m=(-s-((y=y<0?-ew(-y,gw):ew(y,gw))+(x=x<0?-ew(-x,gw):ew(x,gw))))/(3*r))>=0&&m<=1&&(a[f++]=m)}else{var _=(2*h*s-3*r*c)/(2*zw(h*h*h)),w=math.acos(_)/3,b=zw(h),s=math.cos(w),m=(-s-2*b*s)/(3*r),m=(-s+b*(s+vw*math.sin(w)))/(3*r),i=(-s+b*(s-vw*math.sin(w)))/(3*r);m>=0&&m<=1&&(a[f++]=m),m>=0&&m<=1&&(a[f++]=m),i>=0&&i<=1&&(a[f++]=i)}}return f}function $i(t,e,i,n,o){var a=6*i-12*e+6*t,r=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(ui(r))ji(a)&&(c=-s/a)>=0&&c<=1&&(o[l++]=c);else{var u=a*a-4*r*s;if(ui(u))o[0]=-a/(2*r);else if(u>0){var h=zw(u),c=(-a+h)/(2*r),d=(-a-h)/(2*r);c>=0&&c<=1&&(o[l++]=c),d>=0&&d<=1&&(o[l++]=d)}}return l}function ki(t,e,i,n,o,a){var r=(e-t)*o+t,s=(i-e)*o+e,l=(n-i)*o+i,u=(s-r)*o+r,h=(l-s)*o+s,c=(h-u)*o+u;a[0]=t,a[1]=r,a[2]=u,a[3]=c,a[4]=c,a[5]=h,a[6]=l,a[7]=n}function ji(t,e,i,n,o,a,r,s,l,u,h){var c,d,f,p,g,m=.005,v=1/0;fw[0]=l,fw[1]=u;for(var y=0;y<1;y+=.05)ww[0]=xi(t,i,o,r,y),ww[1]=xi(e,n,a,s,y),(p=xx(fw,ww))=0&&p=0&&c<=1&&(o[l++]=c);else{var u=r*r-4*a*s;if(ui(u))(c=-r/(2*a))>=0&&c<=1&&(o[l++]=c);else if(u>0){var h=zw(u),c=(-r+h)/(2*a),d=(-r-h)/(2*a);c>=0&&c<=1&&(o[l++]=c),d>=0&&d<=1&&(o[l++]=d)}}return l}function nn(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n}function on(t,e,i,n,o){var a=(e-t)*n+t,r=(i-e)*n+e,s=(r-a)*n+a;o[0]=t,o[1]=a,o[2]=s,o[3]=s,o[4]=r,o[5]=i}function an(t,e,i,n,o,a,r,s,l){var u,h=.005,c=1/0;fw[0]=r,fw[1]=s;for(var d=0;d<1;d+=.05)ww[0]=qi(t,i,o,d),ww[1]=qi(e,n,a,d),(m=xx(fw,ww))=0&&m1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(qw[0]=xw(o)*i+t,qw[1]=jw(o)*n+e,$w[0]=xw(a)*i+t,$w[1]=jw(a)*n+e,u(s,qw,$w),h(l,qw,$w),(o%=yw)<0&&(o+=yw),(a%=yw)<0&&(a+=yw),o>a&&!r?a+=yw:oo&&(kw[0]=xw(f)*i+t,kw[1]=jw(f)*n+e,u(s,kw,s),h(l,kw,l))}function cn(t,e,i,n,o,a,r){if(0===o)return!1;var s=o,l=0,u=t;if(r>e+s&&r>n+s||rt+s&&a>i+s||ae+c&&h>n+c&&h>a+c&&h>s+c||ht+c&&u>i+c&&u>o+c&&u>r+c||ue+u&&l>n+u&&l>a+u||lt+u&&s>i+u&&s>o+u||si||h+uo&&(o+=pb);var d=math.atan2(l,s);return d<0&&(d+=pb),d>=n&&d<=o||d+pb>=n&&d+pb<=o}function mn(t,e,i,n,o,a){if(a>e&&a>n||ao?r:0}function vn(t,e){return math.abs(t-e)e&&u>n&&u>a&&u>s||u1&&yn(),c=xi(e,n,a,s,xb[0]),p>1&&(d=xi(e,n,a,s,xb[1]))),2==p?me&&s>n&&s>a||s=0&&u<=1){for(var h=0,c=qi(e,n,a,u),d=0;di||s<-i)return 0;u=math.sqrt(i*i-s*s);yb[0]=-u,yb[1]=u;var l=math.abs(n-o);if(l<1e-4)return 0;if(l%mb<1e-4){n=0,o=mb;p=a?1:-1;return r>=yb[0]+t&&r<=yb[1]+t?p:0}if(a){var u=n;n=pn(o),o=pn(u)}else n=pn(n),o=pn(o);n>o&&(o+=mb);for(var h=0,c=0;c<2;c++){var d=yb[c];if(d+t>r){var f=math.atan2(s,d),p=a?1:-1;f<0&&(f=mb+f),(f>=n&&f<=o||f+mb>=n&&f+mb<=o)&&(f>math.pi/2&&f<1.5*math.pi&&(p=-p),h+=p)}}return h}function bn(t,e,i,n,o){for(var a=0,r=0,s=0,l=0,u=0,h=0;h1&&(i||(a+=mn(r,s,l,u,n,o))),1==h&&(l=r=t[h],u=s=t[h+1]),c){case gb.m:r=l=t[h++],s=u=t[h++];break;case gb.l:if(i){if(cn(r,s,t[h],t[h+1],e,n,o))return!0}else a+=mn(r,s,t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case gb.c:if(i){if(dn(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,n,o))return!0}else a+=xn(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case gb.q:if(i){if(fn(r,s,t[h++],t[h++],t[h],t[h+1],e,n,o))return!0}else a+=_n(r,s,t[h++],t[h++],t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case gb.a:var d=t[h++],f=t[h++],p=t[h++],g=t[h++],m=t[h++],v=t[h++],y=(t[h++],1-t[h++]),x=math.cos(m)*p+d,_=math.sin(m)*g+f;h>1?a+=mn(r,s,x,_,n,o):(l=x,u=_);var w=(n-d)*g/p+d;if(i){if(gn(d,f,g,m,m+v,y,e,w,o))return!0}else a+=wn(d,f,g,m,m+v,y,w,o);r=math.cos(m+v)*p+d,s=math.sin(m+v)*g+f;break;case gb.r:l=r=t[h++],u=s=t[h++];var x=l+t[h++],_=u+t[h++];if(i){if(cn(l,u,x,u,e,n,o)||cn(x,u,x,_,e,n,o)||cn(x,_,l,_,e,n,o)||cn(l,_,l,u,e,n,o))return!0}else a+=mn(x,u,x,_,n,o),a+=mn(l,_,l,u,n,o);break;case gb.z:if(i){if(cn(r,s,l,u,e,n,o))return!0}else a+=mn(r,s,l,u,n,o);r=l,s=u}}return i||vn(s,u)||(a+=mn(r,s,l,u,n,o)||0),0!==a}function sn(t,e,i){return bn(t,0,!1,e,i)}function mn(t,e,i,n){return bn(t,e,!0,i,n)}function in(t){ke.call(this,t),this.path=null}function dn(t,e,i,n,o,a,r,s,l,u,h){var c=l*(pb/180),d=kb(c)*(t-i)/2+lb(c)*(e-n)/2,f=-1*lb(c)*(t-i)/2+kb(c)*(e-n)/2,p=d*d/(r*r)+f*f/(s*s);p>1&&(r*=cb(p),s*=cb(p));var g=(o===a?-1:1)*cb((r*r*(s*s)-r*r*(f*f)-s*s*(d*d))/(r*r*(f*f)+s*s*(d*d)))||0,m=g*r*f/s,v=g*-s*d/r,y=(t+i)/2+kb(c)*m-lb(c)*v,x=(e+n)/2+lb(c)*m+kb(c)*v,_=eb([1,0],[(d-m)/r,(f-v)/s]),w=[(d-m)/r,(f-v)/s],b=[(-1*d-m)/r,(-1*f-v)/s],s=eb(w,b);ob(w,b)<=-1&&(s=pb),ob(w,b)>=1&&(s=0),0===a&&s>0&&(s-=2*pb),1===a&&s<0&&(s+=2*pb),h.adddata(u,y,x,r,s,_,s,c,a)}function tn(t){if(!t)return[];var e,i=t.replace(/-/g," -").replace(/ /g," ").replace(/ /g,",").replace(/,,/g,",");for(e=0;e0&&""===f[0]&&f.shift();for(var p=0;p=2){if(o&&"spline"!==o){var a=hb(n,o,i,e.smoothconstraint);t.moveto(n[0][0],n[0][1]);for(var r=n.length,s=0;s<(i?r:r-1);s++){var l=a[2*s],u=a[2*s+1],h=n[(s+1)%r];t.beziercurveto(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===o&&(n=wb(n,i)),t.moveto(n[0][0],n[0][1]);for(var s=1,c=n.length;s=0)&&(n={textfill:null,textstroke:t.textstroke,textstrokewidth:t.textstrokewidth},t.textfill="#fff",null==t.textstroke&&(t.textstroke=i.autocolor,null==t.textstrokewidth&&(t.textstrokewidth=2))),n}function uo(t){var e=t.insiderollback;e&&(t.textfill=e.textfill,t.textstroke=e.textstroke,t.textstrokewidth=e.textstrokewidth)}function ho(t,e){var i=e||e.getmodel("textstyle");return p([t.fontstyle||i&&i.getshallow("fontstyle")||"",t.fontweight||i&&i.getshallow("fontweight")||"",(t.fontsize||i&&i.getshallow("fontsize")||12)+"px",t.fontfamily||i&&i.getshallow("fontfamily")||"sans-serif"].join(" "))}function co(t,e,i,n,o,a){if("function"==typeof o&&(a=o,o=null),n&&n.isanimationenabled()){var r=t?"update":"",s=n.getshallow("animationduration"+r),l=n.getshallow("animationeasing"+r),u=n.getshallow("animationdelay"+r);"function"==typeof u&&(u=u(o,n.getanimationdelayparams?n.getanimationdelayparams(e,o):null)),"function"==typeof s&&(s=s(o)),s>0?e.animateto(i,s,u||0,l,a,!!a):(e.stopanimation(),e.attr(i),a&&a())}else e.stopanimation(),e.attr(i),a&&a()}function fo(t,e,i,n,o){co(!0,t,e,i,n,o)}function po(t,e,i,n,o){co(!1,t,e,i,n,o)}function go(t,e){for(var i=lt([]);t&&t!==e;)ht(i,t.getlocaltransform(),i),t=t.parent;return i}function mo(t,e,i){return e&&!c(e)&&(e=o_.getlocaltransform(e)),i&&(e=pt([],e)),q([],t,e)}function vo(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:math.abs(2*e[4]/e[0]),o=0===e[4]||0===e[5]||0===e[2]?1:math.abs(2*e[4]/e[2]),a=["left"===t?-n:"right"===t?n:0,"top"===t?-o:"bottom"===t?o:0];return a=mo(a,e,i),math.abs(a[0])>math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function yo(t,e,i,n){function o(t){var e={position:f(t.position),rotation:t.rotation};return t.shape&&(e.shape=a({},t.shape)),e}if(t&&e){var r=function(t){var e={};return t.traverse(function(t){!t.isgroup&&t.anid&&(e[t.anid]=t)}),e}(t);e.traverse(function(t){if(!t.isgroup&&t.anid){var e=r[t.anid];if(e){var n=o(t);t.attr(o(e)),fo(t,n,i,t.dataindex)}}})}}function xo(t,e){return f(t,function(t){var i=t[0];i=ns(i,e.x),i=os(i,e.x+e.width);var n=t[1];return n=ns(n,e.y),n=os(n,e.y+e.height),[i,n]})}function _o(t,e,i){var n=(e=a({recthover:!0},e)).style={strokenoscale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexof("image://")?(n.image=t.slice(8),r(n,i),new je(e)):zn(t.replace("path://",""),e,i,"center")}function wo(t,e,i){this.parentmodel=e,this.ecmodel=i,this.option=t}function bo(t,e,i){for(var n=0;n0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/o*a+i[0]}function to(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?io(t).match(/%$/)?parsefloat(t)/100*e:parsefloat(t):null==t?nan:+t}function ao(t,e,i){return null==e&&(e=10),e=math.min(math.max(0,e),20),t=(+t).tofixed(e),i?t:+t}function co(t){return t.sort(function(t,e){return t-e}),t}function lo(t){if(t=+t,isnan(t))return 0;for(var e=1,i=0;math.round(t*e)/e!==t;)e*=10,i++;return i}function ko(t){var e=t.tostring(),i=e.indexof("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var o=e.indexof(".");return o<0?0:e.length-1-o}function po(t,e){var i=math.log,n=math.ln10,o=math.floor(i(t[1]-t[0])/n),a=math.round(i(math.abs(e[1]-e[0]))/n),r=math.min(math.max(-o+a,0),20);return isfinite(r)?r:20}function no(t,e,i){if(!t[e])return 0;var n=p(t,function(t,e){return t+(isnan(e)?0:e)},0);if(0===n)return 0;for(var o=math.pow(10,i),a=f(t,function(t){return(isnan(t)?0:t)/n*o*100}),r=100*o,s=f(a,function(t){return math.floor(t)}),l=p(s,function(t,e){return t+e},0),u=f(a,function(t,e){return t-s[e]});lh&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/o}function oo(t){var e=2*math.pi;return(t%e+e)%e}function eo(t){return t>-gs&&t=-20?+t.tofixed(n<0?-n:0):t}function go(t){function e(t,i,n){return t.interval[n]=0}function wo(t){return isnan(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function ho(t,e){return t=(t||"").tolowercase().replace(/-(.)/g,function(t,e){return e.touppercase()}),e&&t&&(t=t.charat(0).touppercase()+t.slice(1)),t}function zo(t){return string(t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function uo(t,e,i){y(e)||(e=[e]);var n=e.length;if(!n)return"";for(var o=e[0].$vars||[],a=0;a':'':""}function yo(t,e){return t+="","0000".substr(0,e-t.length)+t}function qo(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="mm-dd\nyyyy");var n=zo(e),o=i?"utc":"",a=n["get"+o+"fullyear"](),r=n["get"+o+"month"]()+1,s=n["get"+o+"date"](),l=n["get"+o+"hours"](),u=n["get"+o+"minutes"](),h=n["get"+o+"seconds"](),c=n["get"+o+"milliseconds"]();return t=t.replace("mm",yo(r,2)).replace("m",r).replace("yyyy",a).replace("yy",a%100).replace("dd",yo(s,2)).replace("d",s).replace("hh",yo(l,2)).replace("h",l).replace("mm",yo(u,2)).replace("m",u).replace("ss",yo(h,2)).replace("s",h).replace("sss",yo(c,3))}function $o(t){return t?t.charat(0).touppercase()+t.substr(1):t}function ko(t,e,i,n,o){var a=0,r=0;null==n&&(n=1/0),null==o&&(o=1/0);var s=0;e.eachchild(function(l,u){var h,c,d=l.position,f=l.getboundingrect(),p=e.childat(u+1),g=p&&p.getboundingrect();if("horizontal"===t){var m=f.width+(g?-g.x+f.x:0);(h=a+m)>n||l.newline?(a=0,h=m,r+=s+i,s=f.height):s=math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);(c=r+v)>o||l.newline?(a+=s+i,r=0,c=v,s=f.width):s=math.max(s,f.width)}l.newline||(d[0]=a,d[1]=r,"horizontal"===t?a=h+i:r=c+i)})}function jo(t,e,i){var n=e.width,o=e.height,a=to(t.x,n),r=to(t.y,o),s=to(t.x2,n),l=to(t.y2,o);return(isnan(a)||isnan(parsefloat(t.x)))&&(a=0),(isnan(s)||isnan(parsefloat(t.x2)))&&(s=n),(isnan(r)||isnan(parsefloat(t.y)))&&(r=0),(isnan(l)||isnan(parsefloat(t.y2)))&&(l=o),i=xs(i||0),{width:math.max(s-a-i[1]-i[3],0),height:math.max(l-r-i[0]-i[2],0)}}function qo(t,e,i){i=xs(i||0);var n=e.width,o=e.height,a=to(t.left,n),r=to(t.top,o),s=to(t.right,n),l=to(t.bottom,o),u=to(t.width,n),h=to(t.height,o),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isnan(u)&&(u=n-s-d-a),isnan(h)&&(h=o-l-c-r),null!=f&&(isnan(u)&&isnan(h)&&(f>n/o?u=.8*n:h=.8*o),isnan(u)&&(u=f*h),isnan(h)&&(h=u/f)),isnan(a)&&(a=n-s-u-d),isnan(r)&&(r=o-l-h-c),t.left||t.right){case"center":a=n/2-u/2-i[3];break;case"right":a=n-u-d}switch(t.top||t.bottom){case"middle":case"center":r=o/2-h/2-i[0];break;case"bottom":r=o-h-c}a=a||0,r=r||0,isnan(u)&&(u=n-d-a-(s||0)),isnan(h)&&(h=o-c-r-(l||0));var p=new kt(a+i[3],r+i[0],u,h);return p.margin=i,p}function ta(t,e,i,n,o){var a=!o||!o.hv||o.hv[0],s=!o||!o.hv||o.hv[1],l=o&&o.boundingmode||"all";if(a||s){var u;if("raw"===l)u="group"===t.type?new kt(0,0,+e.width||0,+e.height||0):t.getboundingrect();else if(u=t.getboundingrect(),t.needlocaltransform()){var h=t.getlocaltransform();(u=u.clone()).applytransform(h)}e=qo(r({width:u.width,height:u.height},e),i,n);var c=t.position,d=a?e.x-u.x:0,f=s?e.y-u.y:0;t.attr("position","raw"===l?[d,f]:[c[0]+d,c[1]+f])}}function ea(t,e){return null!=t[ts[e][0]]||null!=t[ts[e][1]]&&null!=t[ts[e][2]]}function ia(t,e,i){function n(i,n){var r={},l=0,u={},h=0;if(is(i,function(e){u[e]=t[e]}),is(i,function(t){o(e,t)&&(r[t]=u[t]=e[t]),a(r,t)&&l++,a(u,t)&&h++}),s[n])return a(e,i[1])?u[i[2]]=null:a(e,i[2])&&(u[i[1]]=null),u;if(2!==h&&l){if(l>=2)return r;for(var c=0;ce)return t[n];return t[i-1]}function ra(t){var e=t.get("coordinatesystem"),i={coordsysname:e,coordsysdims:[],axismap:z(),categoryaxismap:z()},n=zs[e];if(n)return n(t,i,i.axismap,i.categoryaxismap),i}function sa(t){return"category"===t.get("type")}function la(t){this.fromdataset=t.fromdataset,this.data=t.data||(t.sourceformat===gs?{}:[]),this.sourceformat=t.sourceformat||fs,this.serieslayoutby=t.serieslayoutby||hs,this.dimensionsdefine=t.dimensionsdefine,this.encodedefine=t.encodedefine&&z(t.encodedefine),this.startindex=t.startindex||0,this.dimensionsdetectcount=t.dimensionsdetectcount}function ua(t){var e=t.option.source,i=fs;if(s(e))i=ws;else if(y(e))for(var n=0,o=e.length;n=e:"max"===i?t<=e:t===e}function oa(t,e){return t.join(",")===e.join(",")}function ea(t,e){$s(e=e||{},function(e,i){if(null!=e){var n=t[i];if(ks.hasclass(i)){e=si(e);var o=ti(n=si(n),e);t[i]=js(o,function(t){return t.option&&t.exist?qs(t.exist,t.option,!0):t.exist||t.option})}else t[i]=qs(n,e,!0)}})}function za(t){var e=t&&t.itemstyle;if(e)for(var i=0,o=nm.length;i=0;p--){var g=t[p];if(s||(d=g.data.rawindexof(g.stackedbydimension,c)),d>=0){var m=g.data.getbyrawindex(g.stackresultdimension,d);if(h>=0&&m>0||h<=0&&m<0){h+=m,f=m;break}}}return n[0]=h,n[1]=f,n});r.hostmodel.setdata(l),e.data=l})}function ya(t,e){la.isinstance(t)||(t=la.seriesdatatosource(t)),this._source=t;var i=this._data=t.data,n=t.sourceformat;n===ws&&(this._offset=0,this._dimsize=e,this._data=i),a(this,um[n===bs?n+"_"+t.serieslayoutby:n])}function qa(){return this._data.length}function $a(t){return this._data[t]}function ka(t){for(var e=0;ee.outputdata.count()&&e.model.getrawdata().cloneshallow(e.outputdata)}function cr(t,e){d(t.changable_methods,function(i){t.wrapmethod(i,v(dr,e))})}function dr(t){var e=fr(t);e&&e.setoutputend(this.count())}function fr(t){var e=(t.ecmodel||{}).scheduler,i=e&&e.getpipeline(t.uid);if(i){var n=i.currenttask;if(n){var o=n.agentstubmap;o&&(n=o.get(t.uid))}return n}}function pr(){this.group=new l_,this.uid=mo("viewchart"),this.rendertask=nr({plan:vr,reset:yr}),this.rendertask.context={view:this}}function gr(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var i=0;i=0?n():c=settimeout(n,-a),u=o};return d.clear=function(){c&&(cleartimeout(c),c=null)},d.debouncenextcall=function(t){l=t},d}function _r(t,e,i,n){var o=t[e];if(o){var a=o[mm]||o,r=o[dm];if(o[im]!==i||r!==n){if(null==i||!n)return t[e]=a;(o=t[e]=xr(a,i,"debounce"===n))[mm]=a,o[dm]=n,o[im]=i}return o}}function wr(t,e){var i=t[e];i&&i[mm]&&(t[e]=i[mm])}function br(t,e,i,n){this.ecinstance=t,this.api=e,this.unfinished,this._dataprocessorhandlers=i.slice(),this._visualhandlers=n.slice(),this._stagetaskmap=z()}function sr(t,e,i,n,o){function a(t,e){return t.setdirty&&(!t.dirtymap||t.dirtymap.get(e.__pipeline.id))}o=o||{};var r;d(e,function(e,s){if(!o.visualtype||o.visualtype===e.visualtype){var l=t._stagetaskmap.get(e.uid),u=l.seriestaskmap,h=l.overalltask;if(h){var c,d=h.agentstubmap;d.each(function(t){a(o,t)&&(t.dirty(),c=!0)}),c&&h.dirty(),pm(h,n);var f=t.getperformargs(h,o.block);d.each(function(t){t.perform(f)}),r|=h.perform(f)}else u&&u.each(function(s,l){a(o,s)&&s.dirty();var u=t.getperformargs(s,o.block);u.skip=!e.performrawseries&&i.isseriesfiltered(s.context.model),pm(s,n),r|=s.perform(u)})}}),t.unfinished|=r}function mr(t,e,i,n,o){function a(i){var a=i.uid,s=r.get(a)||r.set(a,nr({plan:lr,reset:kr,count:nr}));s.context={model:i,ecmodel:n,api:o,useclearvisual:e.isvisual&&!e.islayout,plan:e.plan,reset:e.reset,scheduler:t},or(t,i,s)}var r=i.seriestaskmap||(i.seriestaskmap=z()),s=e.seriestype,l=e.gettargetseries;e.createonallseries?n.eachrawseries(a):s?n.eachrawseriesbytype(s,a):l&&l(n,o).each(a);var u=t._pipelinemap;r.each(function(t,e){u.get(e)||(t.dispose(),r.removekey(e))})}function ir(t,e,i,n,o){function a(e){var i=e.uid,n=s.get(i)||s.set(i,nr({reset:tr,ondirty:cr}));n.context={model:e,overallprogress:h,isoverallfilter:c},n.agent=r,n.__block=h,or(t,e,n)}var r=i.overalltask=i.overalltask||nr({reset:dr});r.context={ecmodel:n,api:o,overallreset:e.overallreset,scheduler:t};var s=r.agentstubmap=r.agentstubmap||z(),l=e.seriestype,u=e.gettargetseries,h=!0,c=e.isoverallfilter;l?n.eachrawseriesbytype(l,a):u?u(n,o).each(a):(h=!1,d(n.getseries(),a));var f=t._pipelinemap;s.each(function(t,e){f.get(e)||(t.dispose(),s.removekey(e))})}function dr(t){t.overallreset(t.ecmodel,t.api,t.payload)}function tr(t,e){return t.overallprogress&&ar}function ar(){this.agent.dirty(),this.getdownstream().dirty()}function cr(){this.agent&&this.agent.dirty()}function lr(t){return t.plan&&t.plan(t.model,t.ecmodel,t.api,t.payload)}function kr(t){if(t.useclearvisual&&t.data.clearallvisual(),(t.resetdefines=si(t.reset(t.model,t.ecmodel,t.api,t.payload))).length)return pr}function pr(t,e){for(var i=e.data,n=e.resetdefines,o=0;oe.get("hoverlayerthreshold")&&!ax.node&&i.traverse(function(t){t.isgroup||(t.usehoverlayer=!0)})}function es(t,e){var i=t.get("blendmode")||null;e.group.traverse(function(t){t.isgroup||t.style.blend!==i&&t.setstyle("blend",i),t.eachpendingdisplayable&&t.eachpendingdisplayable(function(t){t.setstyle("blend",i)})})}function is(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function ns(t){var e=t._coordsysmgr;return a(new aa(t),{getcoordinatesystems:m(e.getcoordinatesystems,e),getcomponentbyelement:function(e){for(;e;){var i=e.__eccomponentinfo;if(null!=i)return t._model.getcomponent(i.maintype,i.index);e=e.parent}}})}function os(t){function e(t,e){for(var n=0;n65535?si:mi}function as(t){var e=t.constructor;return e===array?t.slice():new e(t)}function cs(t,e){d(ii.concat(e.__wrappedmethods||[]),function(i){e.hasownproperty(i)&&(t[i]=e[i])}),t.__wrappedmethods=e.__wrappedmethods}function ls(t){var e=t._invertedindicesmap;d(e,function(i,n){var o=t._dimensioninfos[n].ordinalmeta;if(o){i=e[n]=new si(o.categories.length);for(a=0;a=0?this._indices[t]:-1}function ns(t,e){var i=t._idlist[e];return null==i&&(i=t._getidfromstore(e)),null==i&&(i=wi+e),i}function os(t){return y(t)||(t=[t]),t}function es(t,e){var i=t.dimensions,n=new di(f(i,t.getdimensioninfo,t),t.hostmodel);cs(n,t);for(var o=n._storage={},r=t._storage,s=a({},t._rawextent),u=0;u=0?(o[h]=zs(r[h]),s[h]=rs()):o[h]=r[h])}return n}function zs(t){for(var e=new array(t.length),i=0;in&&(r=o.interval=n);var s=o.intervalprecision=ks(r);return qs(o.nicetickextent=[ni(math.ceil(t[0]/r)*r,s),ni(math.floor(t[1]/r)*r,s)],t),o}function ks(t){return ko(t)+2}function js(t,e,i){t[e]=math.max(math.min(t[e],i[1]),i[0])}function qs(t,e){!isfinite(t[0])&&(t[0]=e[0]),!isfinite(t[1])&&(t[1]=e[1]),js(t,0,e),js(t,1,e),t[0]>t[1]&&(t[0]=t[1])}function tl(t,e,i,n){var o=[];if(!t)return o;e[0]1e4)return[];return e[1]>(o.length?o[o.length-1]:i[1])&&o.push(e[1]),o}function el(t){return t.get("stack")||zi+t.seriesindex}function il(t){return t.dim+t.index}function nl(t,e){var i=[],n=t.axis;if("category"===n.type){for(var o=n.getbandwidth(),a=0;a=0?"p":"n",b=m;p&&(a[r][_]||(a[r][_]={p:m,n:m}),b=a[r][_][w]);var s,m,i,d;if(g)s=b,m=(t=i.datatopoint([x,_]))[1]+l,i=t[0]-m,d=u,math.abs(i)0&&s>0&&!l&&(r=0),r<0&&s<0&&!u&&(s=0));var c=e.ecmodel;if(c&&"time"===a){var d,f=[];if(c.eachseriesbytype("bar",function(t){t.coordinatesystem&&"cartesian2d"===t.coordinatesystem.type&&(f.push(t),d|=t.getbaseaxis()===e.axis)}),d){var p=ul(r,s,e,f);r=p.min,s=p.max}}return[r,s]}function ul(t,e,i,n){var o=i.axis.getextent(),a=o[1]-o[0],r=ol(n)[i.axis.dim+i.axis.index];if(void 0===r)return{min:t,max:e};var s=1/0;d(r,function(t){s=math.min(t.offset,s)});var l=-1/0;d(r,function(t){l=math.max(t.offset+t.width,l)}),s=math.abs(s),l=math.abs(l);var u=s+l,h=e-t,c=h/(1-(s+l)/a)-h;return e+=c*(l/u),t-=c*(s/u),{min:t,max:e}}function hl(t,e){var i=ll(t,e),n=null!=e.getmin(),o=null!=e.getmax(),a=e.get("splitnumber");"log"===t.type&&(t.base=e.get("logbase"));var r=t.type;t.setextent(i[0],i[1]),t.niceextent({splitnumber:a,fixmin:n,fixmax:o,mininterval:"interval"===r||"time"===r?e.get("mininterval"):null,maxinterval:"interval"===r||"time"===r?e.get("maxinterval"):null});var s=e.get("interval");null!=s&&t.setinterval&&t.setinterval(s)}function cl(t,e){if(e=e||t.get("type"))switch(e){case"category":return new pi(t.getordinalmeta?t.getordinalmeta():t.getcategories(),[1/0,-1/0]);case"value":return new ei;default:return(js.getclass(e)||ei).create(t)}}function dl(t,e,i,n,o){var a,r=0,s=0,l=(n-o)/180*math.pi,u=1;e.length>40&&(u=math.floor(e.length/40));for(var h=0;h1?u:(r+1)*u-1}function fl(t,e){var i=t.scale,n=i.gettickslabels(),o=i.getticks();return"string"==typeof e?(e=function(t){return function(e){return t.replace("{value}",null!=e?e:"")}}(e),f(n,e)):"function"==typeof e?f(o,function(i,n){return e(pl(t,i),n)},this):n}function pl(t,e){return"category"===t.type?t.scale.getlabel(e):e}function gl(t,e){if("image"!==this.type){var i=this.style,n=this.shape;n&&"line"===n.symboltype?i.stroke=t:this.__isemptybrush?(i.stroke=t,i.fill=e||"#fff"):(i.fill&&(i.fill=t),i.stroke&&(i.stroke=t)),this.dirty(!1)}}function ml(t,e,i,n,o,a,r){var s=0===t.indexof("empty");s&&(t=t.substr(5,1).tolowercase()+t.substr(6));var l;return l=0===t.indexof("image://")?rn(t.slice(8),new kt(e,i,n,o),r?"center":"cover"):0===t.indexof("path://")?zn(t.slice(7),{},new kt(e,i,n,o),r?"center":"cover"):new ad({shape:{symboltype:t,x:e,y:i,width:n,height:o}}),l.__isemptybrush=s,l.setcolor=gl,l.setcolor(a),l}function vl(t,e){return math.abs(t-e)>1^-(1&s),l=l>>1^-(1&l),o=s+=o,a=l+=a,n.push([s/i,l/i])}return n}function bl(t,e){var i=(t[1]-t[0])/e/2;t[0]+=i,t[1]-=i}function sl(t,e){var i=t.mapdimension("defaultedlabel",!0),n=i.length;if(1===n)return er(t,e,i[0]);if(n){for(var o=[],a=0;a0?i=n[0]:n[1]<0&&(i=n[1]),i}function ol(t,e,i,n){var o=nan;t.stacked&&(o=i.get(i.getcalculationinfo("stackedoverdimension"),n)),isnan(o)&&(o=t.valuestart);var a=t.basedataoffset,r=[];return r[a]=i.get(t.basedim,n),r[1-a]=o,e.datatopoint(r)}function el(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}function zl(t){return isnan(t[0])||isnan(t[1])}function rl(t,e,i,n,o,a,r,s,l,u,h){return null==u?bl(e,"x")?vl(t,e,i,n,o,a,r,s,l,"x",h):bl(e,"y")?vl(t,e,i,n,o,a,r,s,l,"y",h):gl.apply(this,arguments):"none"!==u&&bl(e,u)?vl.apply(this,arguments):gl.apply(this,arguments)}function bl(t,e){if(t.length<=1)return!0;for(var i="x"===e?0:1,n=t[0][i],o=0,a=1;a=0!=o>=0)return!1;isnan(r)||0===r||(o=r,n=t[a][i])}return!0}function vl(t,e,i,n,o,a,r,s,l,u,h){for(var c=0,d=i,f=0;f=o||d<0)break;if(zl(p)){if(h){d+=a;continue}break}if(d===i)t[a>0?"moveto":"lineto"](p[0],p[1]);else if(l>0){var g=e[c],m="y"===u?1:0,v=(p[m]-g[m])*l;id(td,g),td[m]=g[m]+v,id(ad,p),ad[m]=p[m]-v,t.beziercurveto(td[0],td[1],ad[0],ad[1],p[0],p[1])}else t.lineto(p[0],p[1]);c=d,d+=a}return f}function gl(t,e,i,n,o,a,r,s,l,u,h){for(var c=0,d=i,f=0;f=o||d<0)break;if(zl(p)){if(h){d+=a;continue}break}if(d===i)t[a>0?"moveto":"lineto"](p[0],p[1]),id(td,p);else if(l>0){var g=d+a,m=e[g];if(h)for(;m&&zl(e[g]);)m=e[g+=a];var v=.5,y=e[c];if(!(m=e[g])||zl(m))id(ad,p);else{zl(m)&&!h&&(m=p),u(dd,m,y);var x,_;if("x"===u||"y"===u){var w="x"===u?0:1;x=math.abs(p[w]-y[w]),_=math.abs(p[w]-m[w])}else x=jx(p,y),_=jx(p,m);md(ad,p,dd,-l*(1-(v=_/(_+x))))}bd(td,td,s),sd(td,td,r),bd(ad,ad,s),sd(ad,ad,r),t.beziercurveto(td[0],td[1],ad[0],ad[1],p[0],p[1]),md(td,p,dd,l*v)}else t.lineto(p[0],p[1]);c=d,d+=a}return f}function fl(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var o=0;on[0]&&(n[0]=a[0]),a[1]>n[1]&&(n[1]=a[1])}return{min:e?i:n,max:e?n:i}}function wl(t,e){if(t.length===e.length){for(var i=0;ie[0]?1:-1;e[0]+=n*i,e[1]-=n*i}return e}function ul(t,e,i){if(!i.valuedim)return[];for(var n=[],o=0,a=e.count();o=0;a--){var r=i[a].dimension,s=t.dimensions[r],l=t.getdimensioninfo(s);if("x"===(n=l&&l.coorddim)||"y"===n){o=i[a];break}}if(o){var u=e.getaxis(n),h=f(o.stops,function(t){return{coord:u.toglobalcoord(u.datatocoord(t.value)),color:t.color}}),c=h.length,p=o.outercolors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),p.reverse());var g=h[0].coord-10,m=h[c-1].coord+10,v=m-g;if(v<.001)return"transparent";d(h,function(t){t.offset=(t.coord-g)/v}),h.push({offset:c?h[c-1].offset:.5,color:p[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:p[0]||"transparent"});var y=new qb(0,0,0,0,h,!0);return y[n]=g,y[n+"2"]=m,y}}}function kl(t){return this._axes[t]}function jl(t){ed.call(this,t)}function ql(t,e){return e.type||(e.data?"category":"value")}function tu(t,e,i){return t.getcoordsysmodel()===e}function eu(t,e){var i=e*math.pi/180,n=t.plain(),o=n.width,a=n.height,r=o*math.cos(i)+a*math.sin(i),s=o*math.sin(i)+a*math.cos(i);return new kt(n.x,n.y,r,s)}function iu(t){var e,i=t.model,n=i.get("axislabel.show")?i.getformattedlabels():[],o=i.getmodel("axislabel"),a=1,r=n.length;r>40&&(a=math.ceil(r/40));for(var s=0;sn[1],l="start"===e&&!s||"start"!==e&&s;return eo(r-yd/2)?(a=l?"bottom":"top",o="center"):eo(r-1.5*yd)?(a=l?"top":"bottom",o="center"):(a="middle",o=r<1.5*yd&&r>yd/2?l?"left":"right":l?"right":"left"),{rotation:r,textalign:o,textverticalalign:a}}function cu(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerevent")||e&&e.show)}function du(t,e,i){var n=t.get("axislabel.showminlabel"),o=t.get("axislabel.showmaxlabel");e=e||[],i=i||[];var a=e[0],r=e[1],s=e[e.length-1],l=e[e.length-2],u=i[0],h=i[1],c=i[i.length-1],d=i[i.length-2];!1===n?(fu(a),fu(u)):pu(a,r)&&(n?(fu(r),fu(h)):(fu(a),fu(u))),!1===o?(fu(s),fu(c)):pu(l,s)&&(o?(fu(l),fu(d)):(fu(s),fu(c)))}function fu(t){t&&(t.ignore=!0)}function pu(t,e,i){var n=t&&t.getboundingrect().clone(),o=e&&e.getboundingrect().clone();if(n&&o){var a=lt([]);return dt(a,a,-t.rotation),n.applytransform(ht([],a,t.getlocaltransform())),o.applytransform(ht([],a,e.getlocaltransform())),n.intersect(o)}}function gu(t){return"middle"===t||"center"===t}function mu(t,e,i){var n=e.axis;if(e.get("axistick.show")&&!n.scale.isblank()){for(var o=e.getmodel("axistick"),a=o.getmodel("linestyle"),s=o.get("length"),l=qd(o,i.labelinterval),u=n.gettickscoords(o.get("alignwithlabel")),h=n.scale.getticks(),c=e.get("axislabel.showminlabel"),d=e.get("axislabel.showmaxlabel"),f=[],p=[],g=t._transform,m=[],v=u.length,y=0;y=0||t===e}function mu(t){var e=iu(t);if(e){var i=e.axispointermodel,n=e.axis.scale,o=i.option,a=i.get("status"),r=i.get("value");null!=r&&(r=n.parse(r));var s=tu(i);null==a&&(o.status=s?"show":"hide");var l=n.getextent().slice();l[0]>l[1]&&l.reverse(),(null==r||r>l[1])&&(r=l[1]),r0?"bottom":"top":o.width>0?"left":"right";l||pu(t.style,d,n,u,a,i,p),eo(t,d)}function ru(t,e){var i=t.get(dt)||0;return math.min(i,math.abs(e.width),math.abs(e.height))}function bu(t,e,i,n){var o=e.getdata(),a=this.dataindex,r=o.getname(a),s=e.get("selectedoffset");n.dispatchaction({type:"pietoggleselect",from:t,name:r,seriesid:e.id}),o.each(function(t){vu(o.getitemgraphicel(t),o.getitemlayout(t),e.isselected(o.getname(t)),s,i)})}function vu(t,e,i,n,o){var a=(e.startangle+e.endangle)/2,r=math.cos(a),s=math.sin(a),l=i?n:0,u=[r*l,s*l];o?t.animate().when(200,{position:u}).start("bounceout"):t.attr("position",u)}function gu(t,e){function i(){a.ignore=a.hoverignore,r.ignore=r.hoverignore}function n(){a.ignore=a.normalignore,r.ignore=r.normalignore}l_.call(this);var o=new gb({z2:2}),a=new ub,r=new zb;this.add(o),this.add(a),this.add(r),this.updatedata(t,e,!0),this.on("emphasis",i).on("normal",n).on("mouseover",i).on("mouseout",n)}function fu(t,e,i,n,o,a,r){function s(e,i){for(var n=e;n>=0&&(t[n].y-=i,!(n>0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function l(t,e,i,n,o,a){for(var r=e?number.max_value:0,s=0,l=t.length;s=r&&(d=r-10),!e&&d<=r&&(d=r+10),t[s].x=i+d*a,r=d}}t.sort(function(t,e){return t.y-e.y});for(var u,h=0,c=t.length,d=[],f=[],p=0;pe&&a+1t[a].y+t[a].height)return void s(a,n/2);s(i-1,n/2)}(p,c,-u),h=t[p].y+t[p].height;r-h<0&&s(c-1,h-r);for(p=0;p=i?f.push(t[p]):d.push(t[p]);l(d,!1,e,i,n,o),l(f,!0,e,i,n,o)}function wu(t,e,i,n,o,a){for(var r=[],s=[],l=0;l1?(p.width=l,p.height=l/d):(p.height=l,p.width=l*d),p.y=s[1]-p.height/2,p.x=s[0]-p.width/2}else(a=t.getboxlayoutparams()).aspect=d,p=qo(a,{width:u,height:h});this.setviewrect(p.x,p.y,p.width,p.height),this.setcenter(t.get("center")),this.setzoom(t.get("zoom"))}function th(t,e){d(e.get("geocoord"),function(e,i){t.addgeocoord(i,e)})}function eh(t,e,i){oh(t)[e]=i}function ih(t,e,i){var n=oh(t);n[e]===i&&(n[e]=null)}function nh(t,e){return!!oh(t)[e]}function oh(t){return t[ft]||(t[ft]={})}function ah(t){this.pointerchecker,this._zr=t,this._opt={};var e=m,n=e(rh,this),o=e(sh,this),a=e(lh,this),s=e(uh,this),l=e(hh,this);$x.call(this),this.setpointerchecker=function(t){this.pointerchecker=t},this.enable=function(e,u){this.disable(),this._opt=r(i(u)||{},{zoomonmousewheel:!0,moveonmousemove:!0,preventdefaultmousemove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",n),t.on("mousemove",o),t.on("mouseup",a)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",s),t.on("pinch",l))},this.disable=function(){t.off("mousedown",n),t.off("mousemove",o),t.off("mouseup",a),t.off("mousewheel",s),t.off("pinch",l)},this.dispose=this.disable,this.isdragging=function(){return this._dragging},this.ispinching=function(){return this._pinching}}function rh(t){if(!(ci(t)||t.target&&t.target.draggable)){var e=t.offsetx,i=t.offsety;this.pointerchecker&&this.pointerchecker(t,e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function sh(t){if(!ci(t)&&dh(this,"moveonmousemove",t)&&this._dragging&&"pinch"!==t.gestureevent&&!nh(this._zr,"globalpan")){var e=t.offsetx,i=t.offsety,n=this._x,o=this._y,a=e-n,r=i-o;this._x=e,this._y=i,this._opt.preventdefaultmousemove&&rw(t.event),this.trigger("pan",a,r,n,o,e,i)}}function lh(t){ci(t)||(this._dragging=!1)}function uh(t){if(dh(this,"zoomonmousewheel",t)&&0!==t.wheeldelta){var e=t.wheeldelta>0?1.1:1/1.1;ch.call(this,t,e,t.offsetx,t.offsety)}}function hh(t){if(!nh(this._zr,"globalpan")){var e=t.pinchscale>1?1.1:1/1.1;ch.call(this,t,e,t.pinchx,t.pinchy)}}function ch(t,e,i,n){this.pointerchecker&&this.pointerchecker(t,i,n)&&(rw(t.event),this.trigger("zoom",e,i,n))}function dh(t,e,i){var n=t._opt[e];return n&&(!_(n)||i.event[n+"key"])}function fh(t,e,i){var n=t.target,o=n.position;o[0]+=e,o[1]+=i,n.dirty()}function ph(t,e,i,n){var o=t.target,a=t.zoomlimit,r=o.position,s=o.scale,l=t.zoom=t.zoom||1;if(l*=e,a){var u=a.min||0,h=a.max||1/0;l=math.max(math.min(h,l),u)}var c=l/t.zoom;t.zoom=l,r[0]-=(i-r[0])*(c-1),r[1]-=(n-r[1])*(c-1),s[0]*=c,s[1]*=c,o.dirty()}function gh(t,e,i){var n=e.getcomponentbyelement(t.toptarget),o=n&&n.coordinatesystem;return n&&n!==i&&!wt[n.maintype]&&o&&o.model!==i}function mh(t,e){var i=t.getitemstyle(),n=t.get("areacolor");return null!=n&&(i.fill=n),i}function vh(t,e,i,n,o){i.off("click"),i.off("mousedown"),e.get("selectedmode")&&(i.on("mousedown",function(){t._mousedownflag=!0}),i.on("click",function(a){if(t._mousedownflag){t._mousedownflag=!1;for(var r=a.target;!r.__regions;)r=r.parent;if(r){var s={type:("geo"===e.maintype?"geo":"map")+"toggleselect",batch:f(r.__regions,function(t){return{name:t.name,from:o.uid}})};s[e.maintype+"id"]=e.id,n.dispatchaction(s),yh(e,i)}}}))}function yh(t,e){e.eachchild(function(e){d(e.__regions,function(i){e.trigger(t.isselected(i.name)?"emphasis":"normal")})})}function xh(t,e){var i=new l_;this._controller=new ah(t.getzr()),this._controllerhost={target:e?i:null},this.group=i,this._updategroup=e,this._mousedownflag}function _h(t,e,i){var n=t.getzoom(),o=t.getcenter(),a=e.zoom,r=t.datatopoint(o);if(null!=e.dx&&null!=e.dy){r[0]-=e.dx,r[1]-=e.dy;o=t.pointtodata(r);t.setcenter(o)}if(null!=a){if(i){var s=i.min||0,l=i.max||1/0;a=math.max(math.min(n*a,l),s)/n}t.scale[0]*=a,t.scale[1]*=a;var u=t.position,h=(e.originx-u[0])*(a-1),c=(e.originy-u[1])*(a-1);u[0]-=h,u[1]-=c,t.updatetransform();o=t.pointtodata(r);t.setcenter(o),t.setzoom(a*n)}return{center:t.getcenter(),zoom:t.getzoom()}}function wh(t,e){var i={};return d(t,function(t){t.each(t.mapdimension("value"),function(e,n){var o="ec-"+t.getname(n);i[o]=i[o]||[],isnan(e)||i[o].push(e)})}),t[0].map(t[0].mapdimension("value"),function(n,o){for(var a="ec-"+t[0].getname(o),r=0,s=1/0,l=-1/0,u=i[a].length,h=0;h=0;o--){var a=i[o];a.hiernode={defaultancestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},n.push(a)}}function nh(t,e){var i=t.isexpand?t.children:[],n=t.parentnode.children,o=t.hiernode.i?n[t.hiernode.i-1]:null;if(i.length){bh(t);var a=(i[0].hiernode.prelim+i[i.length-1].hiernode.prelim)/2;o?(t.hiernode.prelim=o.hiernode.prelim+e(t,o),t.hiernode.modifier=t.hiernode.prelim-a):t.hiernode.prelim=a}else o&&(t.hiernode.prelim=o.hiernode.prelim+e(t,o));t.parentnode.hiernode.defaultancestor=vh(t,o,t.parentnode.hiernode.defaultancestor||n[0],e)}function oh(t){var e=t.hiernode.prelim+t.parentnode.hiernode.modifier;t.setlayout({x:e},!0),t.hiernode.modifier+=t.parentnode.hiernode.modifier}function eh(t){return arguments.length?t:zh}function zh(t,e){var i={};return t-=math.pi/2,i.x=e*math.cos(t),i.y=e*math.sin(t),i}function rh(t,e){return qo(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()})}function bh(t){for(var e=t.children,i=e.length,n=0,o=0;--i>=0;){var a=e[i];a.hiernode.prelim+=n,a.hiernode.modifier+=n,o+=a.hiernode.change,n+=a.hiernode.shift+o}}function vh(t,e,i,n){if(e){for(var o=t,a=t,r=a.parentnode.children[0],s=e,l=o.hiernode.modifier,u=a.hiernode.modifier,h=r.hiernode.modifier,c=s.hiernode.modifier;s=gh(s),a=fh(a),s&&a;){o=gh(o),r=fh(r),o.hiernode.ancestor=t;var d=s.hiernode.prelim+c-a.hiernode.prelim-u+n(s,a);d>0&&(hh(wh(s,t,i),t,d),u+=d,l+=d),c+=s.hiernode.modifier,u+=a.hiernode.modifier,l+=o.hiernode.modifier,h+=r.hiernode.modifier}s&&!gh(o)&&(o.hiernode.thread=s,o.hiernode.modifier+=c-l),a&&!fh(r)&&(r.hiernode.thread=a,r.hiernode.modifier+=u-h,i=t)}return i}function gh(t){var e=t.children;return e.length&&t.isexpand?e[e.length-1]:t.hiernode.thread}function fh(t){var e=t.children;return e.length&&t.isexpand?e[0]:t.hiernode.thread}function wh(t,e,i){return t.hiernode.ancestor.parentnode===e.parentnode?t.hiernode.ancestor:i}function hh(t,e,i){var n=i/(e.hiernode.i-t.hiernode.i);e.hiernode.change-=n,e.hiernode.shift+=i,e.hiernode.modifier+=i,e.hiernode.prelim+=i,t.hiernode.change+=n}function zh(t,e){return t.parentnode===e.parentnode?1:2}function uh(t,e){var i=t.getitemlayout(e);return i&&!isnan(i.x)&&!isnan(i.y)&&"none"!==t.getitemvisual(e,"symbol")}function jh(t,e,i){return i.itemmodel=e,i.itemstyle=e.getmodel("itemstyle").getitemstyle(),i.hoveritemstyle=e.getmodel("emphasis.itemstyle").getitemstyle(),i.linestyle=e.getmodel("linestyle").getlinestyle(),i.labelmodel=e.getmodel("label"),i.hoverlabelmodel=e.getmodel("emphasis.label"),!1===t.isexpand&&0!==t.children.length?i.symbolinnercolor=i.itemstyle.fill:i.symbolinnercolor="#fff",i}function xh(t,e,i,n,o,a){var s=!i,l=t.tree.getnodebydataindex(e),a=jh(l,l.getmodel(),a),u=t.tree.root,h=l.parentnode===u?l:l.parentnode||l,c=t.getitemgraphicel(h.dataindex),d=h.getlayout(),f=c?{x:c.position[0],y:c.position[1],rawx:c.__radialoldrawx,rawy:c.__radialoldrawy}:d,p=l.getlayout();s?(i=new dl(t,e,a)).attr("position",[f.x,f.y]):i.updatedata(t,e,a),i.__radialoldrawx=i.__radialrawx,i.__radialoldrawy=i.__radialrawy,i.__radialrawx=p.rawx,i.__radialrawy=p.rawy,n.add(i),t.setitemgraphicel(e,i),fo(i,{position:[p.x,p.y]},o);var g=i.getsymbolpath();if("radial"===a.layout){var m,v,y=u.children[0],x=y.getlayout(),_=y.children.length;if(p.x===x.x&&!0===l.isexpand){var w={};w.x=(y.children[0].getlayout().x+y.children[_-1].getlayout().x)/2,w.y=(y.children[0].getlayout().y+y.children[_-1].getlayout().y)/2,(m=math.atan2(w.y-x.y,w.x-x.x))<0&&(m=2*math.pi+m),(v=w.xx.x)||(m-=math.pi);var b=v?"left":"right";g.setstyle({textposition:b,textrotation:-m,textorigin:"center",verticalalign:"middle"})}if(l.parentnode&&l.parentnode!==u){var s=i.__edge;s||(s=i.__edge=new qb({shape:qh(a,f,f),style:r({opacity:0},a.linestyle)})),fo(s,{shape:qh(a,d,p),style:{opacity:1}},o),n.add(s)}}function yh(t,e,i,n,o,a){for(var r,s=t.tree.getnodebydataindex(e),l=t.tree.root,a=jh(s,s.getmodel(),a),u=s.parentnode===l?s:s.parentnode||s;null==(r=u.getlayout());)u=u.parentnode===l?u:u.parentnode||u;fo(i,{position:[r.x+1,r.y+1]},o,function(){n.remove(i),t.setitemgraphicel(e,null)}),i.fadeout(null,{keeplabel:!0});var h=i.__edge;h&&fo(h,{shape:qh(a,r,r),style:{opacity:0}},o,function(){n.remove(h)})}function qh(t,e,i){var n,o,a,r,s=t.orient;if("radial"===t.layout){var l=e.rawx,u=e.rawy,h=i.rawx,c=i.rawy,d=zh(l,u),f=zh(l,u+(c-u)*t.curvature),p=zh(h,c+(u-c)*t.curvature),g=zh(h,c);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:f.x,cpy1:f.y,cpx2:p.x,cpy2:p.y}}var l=e.x,u=e.y,h=i.x,c=i.y;return"horizontal"===s&&(n=l+(h-l)*t.curvature,o=u,a=h+(l-h)*t.curvature,r=c),"vertical"===s&&(n=l,o=u+(c-u)*t.curvature,a=h,r=c+(u-c)*t.curvature),{x1:l,y1:u,x2:h,y2:c,cpx1:n,cpy1:o,cpx2:a,cpy2:r}}function $h(t,e,i){for(var n,o=[t],a=[];n=o.pop();)if(a.push(n),n.isexpand){var r=n.children;if(r.length)for(var s=0;s=0;a--)n.push(o[a])}}function jh(t,e,i){if(t&&l(e,t.type)>=0){var n=i.getdata().tree.root,o=t.targetnode;if(o&&n.contains(o))return{node:o};var a=t.targetnodeid;if(null!=a&&(o=n.getnodebyid(a)))return{node:o}}}function qh(t){for(var e=[];t;)(t=t.parentnode)&&e.push(t);return e.reverse()}function tc(t,e){return l(qh(t),e)>=0}function ec(t,e){for(var i=[];t;){var n=t.dataindex;i.push({name:t.name,dataindex:n,value:e.getrawvalue(n)}),t=t.parentnode}return i.reverse(),i}function ic(t){var e=0;d(t.children,function(t){ic(t);var i=t.value;y(i)&&(i=i[0]),e+=i});var i=t.value;y(i)&&(i=i[0]),(null==i||isnan(i))&&(i=e),i<0&&(i=0),y(t.value)?t.value[0]=i:t.value=i}function nc(t,e){var i=e.get("color");if(i){var n;return d(t=t||[],function(t){var e=new wo(t),i=e.get("color");(e.get("itemstyle.color")||i&&"none"!==i)&&(n=!0)}),n||((t[0]||(t[0]={})).color=i.slice()),t}}function oc(t){this.group=new l_,t.add(this.group)}function ac(t,e,i,n,o,a){var r=[[o?t:t-yt,e],[t+i,e],[t+i,e+n],[o?t:t-yt,e+n]];return!a&&r.splice(2,0,[t+i+yt,e+n/2]),!o&&r.push([t,e+n/2]),r}function rc(t,e,i){t.eventdata={componenttype:"series",componentsubtype:"treemap",seriesindex:e.componentindex,seriesname:e.name,seriestype:"treemap",selftype:"breadcrumb",nodedata:{dataindex:i&&i.dataindex,name:i&&i.name},treepathinfo:i&&ec(i,e)}}function sc(){var t,e=[],i={};return{add:function(t,n,o,a,r){return _(a)&&(r=a,a=0),!i[t.id]&&(i[t.id]=1,e.push({el:t,target:n,time:o,delay:a,easing:r}),!0)},done:function(e){return t=e,this},start:function(){for(var n=e.length,o=0,a=e.length;o=0;a--)null==i[a]&&(delete n[e[a]],e.pop())}function dc(t,e){var i=t.visual,n=[];w(i)?ha(i,function(t){n.push(t)}):null!=i&&n.push(i);var o={color:1,symbol:1};e||1!==n.length||o.hasownproperty(t.type)||(n[1]=n[0]),_c(t,n)}function fc(t){return{applyvisual:function(e,i,n){e=this.mapvaluetovisual(e),n("color",t(i("color"),e))},_domap:yc([0,1])}}function pc(t){var e=this.option.visual;return e[math.round(do(t,[0,1],[0,e.length-1],!0))]||{}}function gc(t){return function(e,i,n){n(t,this.mapvaluetovisual(e))}}function mc(t){var e=this.option.visual;return e[this.option.loop&&t!==da?t%e.length:t]}function vc(){return this.option.visual[0]}function yc(t){return{linear:function(e){return do(e,t,this.option.visual,!0)},category:mc,piecewise:function(e,i){var n=xc.call(this,i);return null==n&&(n=do(e,t,this.option.visual,!0)),n},fixed:vc}}function xc(t){var e=this.option,i=e.piecelist;if(e.hasspecialvisual){var n=i[fa.findpieceindex(t,i)];if(n&&n.visual)return n.visual[this.type]}}function _c(t,e){return t.visual=e,"color"===t.type&&(t.parsedvisual=f(e,function(t){return at(t)})),e}function wc(t,e,i){return t?e<=i:e=o.length||t===o[t.depth])&&bc(t,cc(r,h,t,e,g,a),i,n,o,a)})}else l=mc(h),t.setvisual("color",l)}}function sc(t,e,i,n){var o=a({},e);return d(["color","coloralpha","colorsaturation"],function(a){var r=t.get(a,!0);null==r&&i&&(r=i[a]),null==r&&(r=e[a]),null==r&&(r=n.get(a)),null!=r&&(o[a]=r)}),o}function mc(t){var e=dc(t,"color");if(e){var i=dc(t,"coloralpha"),n=dc(t,"colorsaturation");return n&&(e=et(e,null,null,n)),i&&(e=zt(e,i)),e}}function ic(t,e){return null!=e?et(e,null,null,t):null}function dc(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function tc(t,e,i,n,o,a){if(a&&a.length){var r=ac(e,"color")||null!=o.color&&"none"!==o.color&&(ac(e,"coloralpha")||ac(e,"colorsaturation"));if(r){var s=e.get("visualmin"),l=e.get("visualmax"),u=i.dataextent.slice();null!=s&&su[1]&&(u[1]=l);var h=e.get("colormappingby"),c={type:r.name,dataextent:u,visual:r.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingmethod="linear":(c.mappingmethod="category",c.loop=!0);var d=new fa(c);return d.__drcolormappingby=h,d}}}function ac(t,e){var i=t.get(e);return ma(i)&&i.length?{name:e,range:i}:null}function cc(t,e,i,n,o,r){var s=a({},e);if(o){var l=o.type,u="color"===l&&o.__drcolormappingby,h="index"===u?n:"id"===u?r.mapidtoindex(i.getid()):i.getvalue(t.get("visualdimension"));s[l]=o.mapvaluetovisual(h)}return s}function lc(t,e,i,n){var o,a;if(!t.isremoved()){var r=t.getlayout();o=r.width,a=r.height;var s=(f=t.getmodel()).get(sa),l=f.get(ma)/2,u=gc(f),h=math.max(s,u),c=s-l,d=h-l,f=t.getmodel();t.setlayout({borderwidth:s,upperheight:h,upperlabelheight:u},!0);var p=(o=xa(o-2*c,0))*(a=xa(a-c-d,0)),g=kc(t,f,p,e,i,n);if(g.length){var m={x:c,y:d,width:o,height:a},v=_a(o,a),y=1/0,x=[];x.area=0;for(var _=0,w=g.length;_=0;l--){var u=o["asc"===n?r-l-1:l].getvalue();u/i*es[1]&&(s[1]=e)})}else s=[nan,nan];return{sum:n,dataextent:s}}function ec(t,e,i){for(var n,o=0,a=1/0,r=0,s=t.length;ro&&(o=n));var l=t.area*t.area,u=e*e*i;return l?xa(u*o/l,l/(u*a)):1/0}function zc(t,e,i,n,o){var a=e===i.width?0:1,r=1-a,s=["x","y"],l=["width","height"],u=i[s[a]],h=e?t.area/e:0;(o||h>i[l[r]])&&(h=i[l[r]]);for(var c=0,d=t.length;cms&&(u=ms),a=s}u=0?n+=u:n-=u:p>=0?n-=u:n+=u}return n}function nd(t,e){return t.getvisual("opacity")||t.getmodel().get(e)}function od(t,e,i){var n=t.getgraphicel(),o=nd(t,e);null!=i&&(null==o&&(o=1),o*=i),n.downplay&&n.downplay(),n.traverse(function(t){"group"!==t.type&&t.setstyle("opacity",o)})}function ad(t,e){var i=nd(t,e),n=t.getgraphicel();n.highlight&&n.highlight(),n.traverse(function(t){"group"!==t.type&&t.setstyle("opacity",i)})}function rd(t){return t instanceof array||(t=[t,t]),t}function sd(t){var e=t.coordinatesystem;if(!e||"view"===e.type){var i=t.getgraph();i.eachnode(function(t){var e=t.getmodel();t.setlayout([+e.get("x"),+e.get("y")])}),ld(i)}}function ld(t){t.eachedge(function(t){var e=t.getmodel().get("linestyle.curveness")||0,i=f(t.node1.getlayout()),n=f(t.node2.getlayout()),o=[i,n];+e&&o.push([(i[0]+n[0])/2-(i[1]-n[1])*e,(i[1]+n[1])/2-(n[0]-i[0])*e]),t.setlayout(o)})}function ud(t){var e=t.coordinatesystem;if(!e||"view"===e.type){var i=e.getboundingrect(),n=t.getdata(),o=n.graph,a=0,r=n.getsum("value"),s=2*math.pi/(r||n.count()),l=i.width/2+i.x,u=i.height/2+i.y,h=math.min(i.width,i.height)/2;o.eachnode(function(t){var e=t.getvalue("value");a+=s*(r?e:1)/2,t.setlayout([h*math.cos(a)+l,h*math.sin(a)+u]),a+=s*(r?e:1)/2}),n.setlayout({cx:l,cy:u}),o.eachedge(function(t){var e,i=t.getmodel().get("linestyle.curveness")||0,n=f(t.node1.getlayout()),o=f(t.node2.getlayout()),a=(n[0]+o[0])/2,r=(n[1]+o[1])/2;+i&&(e=[l*(i*=3)+a*(1-i),u*i+r*(1-i)]),t.setlayout([n,o,e])})}}function hd(t,e,i){for(var n=i.rect,o=n.width,a=n.height,r=[n.x+o/2,n.y+a/2],s=null==i.gravity?.1:i.gravity,l=0;l0?-1:i<0?1:e?-1:1}}function wd(t,e){return math.min(e[1],math.max(e[0],t))}function bd(t,e,i){this._axesmap=z(),this._axeslayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,i)}function sd(t,e){return nc(oc(t,e[0]),e[1])}function md(t,e){var i=e.layoutlength/(e.axiscount-1);return{position:i*t,axisnameavailablewidth:i,axislabelshow:!0}}function id(t,e){var i,n,o=e.layoutlength,a=e.axisexpandwidth,r=e.axiscount,s=e.axiscollapsewidth,l=e.wininnerindices,u=s,h=!1;return tyc}function gd(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function fd(t,e,i,n){var o=new l_;return o.add(new jb({name:"main",style:ud(i),silent:!0,draggable:!0,cursor:"move",drift:cc(t,e,o,"nswe"),ondragend:cc(bd,e,{isend:!0})})),dc(n,function(i){o.add(new jb({name:i,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:cc(t,e,o,i),ondragend:cc(bd,e,{isend:!0})}))}),o}function wd(t,e,i,n){var o=n.brushstyle.linewidth||0,a=gc(o,xc),r=i[0][0],s=i[1][0],l=r-o/2,u=s-o/2,h=i[0][1],c=i[1][1],d=h-a+o/2,f=c-a+o/2,p=h-r,g=c-s,m=p+o,v=g+o;zd(t,e,"main",r,s,p,g),n.transformable&&(zd(t,e,"w",l,u,a,v),zd(t,e,"e",d,u,a,v),zd(t,e,"n",l,u,m,a),zd(t,e,"s",l,f,m,a),zd(t,e,"nw",l,u,a,a),zd(t,e,"ne",d,u,a,a),zd(t,e,"sw",l,f,a,a),zd(t,e,"se",d,f,a,a))}function hd(t,e){var i=e.__brushoption,n=i.transformable,o=e.childat(0);o.usestyle(ud(i)),o.attr({silent:!n,cursor:n?"move":"default"}),dc(["w","e","n","s","se","sw","ne","nw"],function(i){var o=e.childofname(i),a=yd(t,i);o&&o.attr({silent:!n,invisible:!n,cursor:n?bc[a]+"-resize":null})})}function zd(t,e,i,n,o,a,r){var s=e.childofname(i);s&&s.setshape(qd(jd(t,e,[[n,o],[n+a,o+r]])))}function ud(t){return r({strokenoscale:!0},t.brushstyle)}function jd(t,e,i,n){var o=[pc(t,i),pc(e,n)],a=[gc(t,i),gc(e,n)];return[[o[0],a[0]],[o[1],a[1]]]}function xd(t){return go(t.group)}function yd(t,e){if(e.length>1)return("e"===(n=[yd(t,(e=e.split(""))[0]),yd(t,e[1])])[0]||"w"===n[0])&&n.reverse(),n.join("");var i={left:"w",right:"e",top:"n",bottom:"s"},n=vo({w:"left",e:"right",n:"top",s:"bottom"}[e],xd(t));return i[n]}function qd(t,e,i,n,o,a,r,s){var l=n.__brushoption,u=t(l.range),h=kd(i,a,r);dc(o.split(""),function(t){var e=wc[t];u[e[0]][e[1]]+=h[e[0]]}),l.range=e(jd(u[0][0],u[1][0],u[0][1],u[1][1])),nd(i,n),bd(i,{isend:!1})}function $d(t,e,i,n,o){var a=e.__brushoption.range,r=kd(t,i,n);dc(a,function(t){t[0]+=r[0],t[1]+=r[1]}),nd(t,e),bd(t,{isend:!1})}function kd(t,e,i){var n=t.group,o=n.transformcoordtolocal(e,i),a=n.transformcoordtolocal(0,0);return[o[0]-a[0],o[1]-a[1]]}function jd(t,e,n){var o=zd(t,e);return o&&!0!==o?o.clippath(n,t._transform):i(n)}function qd(t){var e=pc(t[0][0],t[1][0]),i=pc(t[0][1],t[1][1]);return{x:e,y:i,width:gc(t[0][0],t[1][0])-e,height:gc(t[0][1],t[1][1])-i}}function tf(t,e,i){if(t._brushtype){var n=t._zr,o=t._covers,a=ed(t,e,i);if(!t._dragging)for(var r=0;r=i.length)return e;for(var o=-1,a=e.length,r=i[n++],s={},l={};++o=i.length)return t;var a=[],r=n[o++];return d(t,function(t,i){a.push({key:i,values:e(t,o)})}),r?a.sort(function(t,e){return r(t.key,e.key)}):a}var i=[],n=[];return{key:function(t){return i.push(t),this},sortkeys:function(t){return n[i.length-1]=t,this},entries:function(i){return e(t(i,0),0)}}}function if(t,e){return qo(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()})}function df(t,e,i,n,o,a,r){af(t,i,o),kf(t,e,a,n,r),bf(t)}function tf(t){d(t,function(t){var e=ff(t.outedges,uf),i=ff(t.inedges,uf),n=math.max(e,i);t.setlayout({value:n},!0)})}function af(t,e,i){for(var n=t,o=null,a=0;n.length;){o=[];for(var r=0,s=n.length;r0;o--)of(a,r*=.99),nf(a,n,i),zf(a,r),nf(a,n,i)}function pf(t,e,i,n,o){var a=[];d(e,function(t){var e=t.length,i=0;d(t,function(t){i+=t.getlayout().value});var r=(n-(e-1)*o)/i;a.push(r)}),a.sort(function(t,e){return t-e});var r=a[0];d(e,function(t){d(t,function(t,e){t.setlayout({y:e},!0);var i=t.getlayout().value*r;t.setlayout({dy:i},!0)})}),d(i,function(t){var e=+t.getvalue()*r;t.setlayout({dy:e},!0)})}function nf(t,e,i){d(t,function(t){var n,o,a,r=0,s=t.length;for(t.sort(hf),a=0;a0){l=n.getlayout().y+o;n.setlayout({y:l},!0)}r=n.getlayout().y+n.getlayout().dy+e}if((o=r-e-i)>0){var l=n.getlayout().y-o;for(n.setlayout({y:l},!0),r=n.getlayout().y,a=s-2;a>=0;--a)(o=(n=t[a]).getlayout().y+n.getlayout().dy+e-r)>0&&(l=n.getlayout().y-o,n.setlayout({y:l},!0)),r=n.getlayout().y}})}function of(t,e){d(t.slice().reverse(),function(t){d(t,function(t){if(t.outedges.length){var i=ff(t.outedges,ef)/ff(t.outedges,uf),n=t.getlayout().y+(i-wf(t))*e;t.setlayout({y:n},!0)}})})}function ef(t){return wf(t.node2)*t.getvalue()}function zf(t,e){d(t,function(t){d(t,function(t){if(t.inedges.length){var i=ff(t.inedges,rf)/ff(t.inedges,uf),n=t.getlayout().y+(i-wf(t))*e;t.setlayout({y:n},!0)}})})}function rf(t){return wf(t.node1)*t.getvalue()}function bf(t){d(t,function(t){t.outedges.sort(vf),t.inedges.sort(gf)}),d(t,function(t){var e=0,i=0;d(t.outedges,function(t){t.setlayout({sy:e},!0),e+=t.getlayout().dy}),d(t.inedges,function(t){t.setlayout({ty:i},!0),i+=t.getlayout().dy})})}function vf(t,e){return t.node2.getlayout().y-e.node2.getlayout().y}function gf(t,e){return t.node1.getlayout().y-e.node1.getlayout().y}function ff(t,e){for(var i=0,n=t.length,o=-1;++oe?1:t===e?0:nan}function uf(t){return t.getvalue()}function jf(t,e,i,n){l_.call(this),this.bodyindex,this.whiskerindex,this.styleupdater=i,this._createcontent(t,e,n),this.updatedata(t,e,n),this._seriesmodel}function xf(t,e,i){return f(t,function(t){return t=t.slice(),t[e]=i.initbaseline,t})}function yf(t){var e={};return d(t,function(t,i){e["ends"+i]=t}),e}function qf(t){this.group=new l_,this.styleupdater=t}function $f(t,e,i){var n=e.getitemmodel(i),o=n.getmodel(bc),a=e.getitemvisual(i,"color"),r=o.getitemstyle(["bordercolor"]),s=t.childat(t.whiskerindex);s.style.set(r),s.style.stroke=a,s.dirty();var l=t.childat(t.bodyindex);l.style.set(r),l.style.stroke=a,l.dirty(),eo(t,n.getmodel(vc).getitemstyle())}function kf(t){var e=[],i=[];return t.eachseriesbytype("boxplot",function(t){var n=t.getbaseaxis(),o=l(i,n);o<0&&(o=i.length,i[o]=n,e[o]={axis:n,seriesmodels:[]}),e[o].seriesmodels.push(t)}),e}function jf(t){var e,i,n=t.axis,o=t.seriesmodels,a=o.length,r=t.boxwidthlist=[],s=t.boxoffsetlist=[],l=[];if("category"===n.type)i=n.getbandwidth();else{var u=0;fc(o,function(t){u=math.max(u,t.getdata().count())}),e=n.getextent(),math.abs(e[1]-e[0])}fc(o,function(t){var e=t.get("boxwidth");y(e)||(e=[e,e]),l.push([to(e[0],i)||0,to(e[1],i)||0])});var h=.8*i-2,c=h/a*.3,d=(h-c*(a-1))/a,f=d/2-h/2;fc(o,function(t,e){s.push(f),f+=c+d,r.push(math.min(math.max(d,l[e][0]),l[e][1]))})}function qf(t,e,i){var n,o=t.coordinatesystem,a=t.getdata(),r=i/2,s=t.get("layout"),l="horizontal"===s?0:1,u=1-l,h=["x","y"],c=[];d(a.dimensions,function(t){var e=a.getdimensioninfo(t).coorddim;e===h[u]?c.push(t):e===h[l]&&(n=t)}),null==n||c.length<5||a.each([n].concat(c),function(){function t(t){var i=[];i[l]=d,i[u]=t;var n;return isnan(d)||isnan(t)?n=[nan,nan]:(n=o.datatopoint(i))[l]+=e,n}function i(t,e){var i=t.slice(),n=t.slice();i[l]+=r,n[l]-=r,e?y.push(i,n):y.push(n,i)}function n(t){var e=[t.slice(),t.slice()];e[0][l]-=r,e[1][l]+=r,v.push(e)}var h=arguments,d=h[0],f=h[c.length+1],p=t(h[3]),g=t(h[1]),m=t(h[5]),v=[[g,t(h[2])],[m,t(h[4])]];n(g),n(m),n(p);var y=[];i(v[0][1],0),i(v[1][1],1),a.setitemlayout(f,{chartlayout:s,initbaseline:p[u],median:p,bodyends:y,whiskerends:v})})}function tp(t,e,i){var n=e.getitemmodel(i),o=n.getmodel(wc),a=e.getitemvisual(i,"color"),r=e.getitemvisual(i,"bordercolor")||a,s=o.getitemstyle(["color","color0","bordercolor","bordercolor0"]),l=t.childat(t.whiskerindex);l.usestyle(s),l.style.stroke=r;var u=t.childat(t.bodyindex);u.usestyle(s),u.style.fill=a,u.style.stroke=r,eo(t,n.getmodel(hc).getitemstyle())}function ep(t,e){var i,n=t.getbaseaxis(),o="category"===n.type?n.getbandwidth():(i=n.getextent(),math.abs(i[1]-i[0])/e.count()),a=to(yc(t.get("barmaxwidth"),o),o),r=to(yc(t.get("barminwidth"),1),o),s=t.get("barwidth");return null!=s?to(s,o):math.max(math.min(o/2,a),r)}function ip(t){return y(t)||(t=[+t,+t]),t}function np(t,e){t.eachchild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushtype?e.color:null,fill:"fill"===e.brushtype?e.color:null}})})}function op(t,e){l_.call(this);var i=new dl(t,e),n=new l_;this.add(i),this.add(n),n.beforeupdate=function(){this.attr(i.getscale())},this.updatedata(t,e)}function ap(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=f(e,function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromname=t[0].name),t[1].name&&(e.toname=t[1].name),o([e,t[0],t[1]])}))}function rp(t,e,i){l_.call(this),this.add(this.createline(t,e,i)),this._updateeffectsymbol(t,e)}function sp(t,e,i){l_.call(this),this._createpolyline(t,e,i)}function lp(t,e,i){rp.call(this,t,e,i),this._lastframe=0,this._lastframepercent=0}function up(){this.group=new l_}function hp(t){return t instanceof array||(t=[t,t]),t}function cp(){var t=vx();this.canvas=t,this.blursize=30,this.pointsize=20,this.maxopacity=1,this.minopacity=0,this._gradientpixels={}}function dp(t,e,i){var n=t[1]-t[0],o=(e=f(e,function(e){return{interval:[(e.interval[0]-t[0])/n,(e.interval[1]-t[0])/n]}})).length,a=0;return function(t){for(n=a;n=0;n--){var r=e[n].interval;if(r[0]<=t&&t<=r[1]){a=n;break}}return n>=0&&n=e[0]&&t<=e[1]}}function pp(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}function gp(t,e,i,n){var o=t.getitemlayout(e),a=i.get("symbolrepeat"),r=i.get("symbolclip"),s=i.get("symbolposition")||"start",l=(i.get("symbolrotate")||0)*math.pi/180||0,u=i.get("symbolpatternsize")||2,h=i.isanimationenabled(),c={dataindex:e,layout:o,itemmodel:i,symboltype:t.getitemvisual(e,"symbol")||"circle",color:t.getitemvisual(e,"color"),symbolclip:r,symbolrepeat:a,symbolrepeatdirection:i.get("symbolrepeatdirection"),symbolpatternsize:u,rotation:l,animationmodel:h?i:null,hoveranimation:h&&i.get("hoveranimation"),z2:i.getshallow("z",!0)||0};mp(i,a,o,n,c),yp(t,e,o,a,r,c.boundinglength,c.pxsign,u,n,c),xp(i,c.symbolscale,l,n,c);var d=c.symbolsize,f=i.get("symboloffset");return y(f)&&(f=[to(f[0],d[0]),to(f[1],d[1])]),_p(i,d,o,a,r,f,s,c.valuelinewidth,c.boundinglength,c.repeatcutlength,n,c),c}function mp(t,e,i,n,o){var a,r=n.valuedim,s=t.get("symbolboundingdata"),l=n.coordsys.getotheraxis(n.coordsys.getbaseaxis()),u=l.toglobalcoord(l.datatocoord(0)),h=1-+(i[r.wh]<=0);if(y(s)){var c=[vp(l,s[0])-u,vp(l,s[1])-u];c[1]0?1:a<0?-1:0}function vp(t,e){return t.toglobalcoord(t.datatocoord(t.scale.parse(e)))}function yp(t,e,i,n,o,a,r,s,l,u){var h=l.valuedim,c=l.categorydim,d=math.abs(i[c.wh]),f=t.getitemvisual(e,"symbolsize");y(f)?f=f.slice():(null==f&&(f="100%"),f=[f,f]),f[c.index]=to(f[c.index],d),f[h.index]=to(f[h.index],n?d:math.abs(a)),u.symbolsize=f,(u.symbolscale=[f[0]/s,f[1]/s])[h.index]*=(l.ishorizontal?-1:1)*r}function xp(t,e,i,n,o){var a=t.get(ul)||0;a&&(cl.attr({scale:e.slice(),rotation:i}),cl.updatetransform(),a/=cl.getlinescale(),a*=e[n.valuedim.index]),o.valuelinewidth=a}function _p(t,e,i,n,o,r,s,l,u,h,c,d){var f=c.categorydim,p=c.valuedim,g=d.pxsign,m=math.max(e[p.index]+l,0),v=m;if(n){var y=math.abs(u),x=d(t.get("symbolmargin"),"15%")+"",_=!1;x.lastindexof("!")===x.length-1&&(_=!0,x=x.slice(0,x.length-1)),x=to(x,e[p.index]);var w=math.max(m+2*x,0),b=_?0:2*x,s=fo(n),m=s?n:rp((y+b)/w);w=m+2*(x=(y-m*m)/2/(_?m:m-1)),b=_?0:2*x,s||"fixed"===n||(m=h?rp((math.abs(h)+b)/w):0),v=m*w-b,d.repeattimes=m,d.symbolmargin=x}var i=g*(v/2),t=d.pathposition=[];t[f.index]=i[f.wh]/2,t[p.index]="start"===s?i:"end"===s?u-i:u/2,r&&(t[0]+=r[0],t[1]+=r[1]);var a=d.bundleposition=[];a[f.index]=i[f.xy],a[p.index]=i[p.xy];var c=d.barrectshape=a({},i);c[p.wh]=g*math.max(math.abs(i[p.wh]),math.abs(t[p.index]+i)),c[f.wh]=i[f.wh];var l=d.clipshape={};l[f.xy]=-i[f.xy],l[f.wh]=c.ecsize[f.wh],l[p.xy]=0,l[p.wh]=i[p.wh]}function wp(t){var e=t.symbolpatternsize,i=ml(t.symboltype,-e/2,-e/2,e,e,t.color);return i.attr({culling:!0}),"image"!==i.type&&i.setstyle({strokenoscale:!0}),i}function bp(t,e,i,n){function o(t){var e=l.slice(),n=i.pxsign,o=t;return("start"===i.symbolrepeatdirection?n>0:n<0)&&(o=h-1-t),e[u.index]=d*(o-h/2+.5)+l[u.index],{position:e,scale:i.symbolscale.slice(),rotation:i.rotation}}var a=t.__pictorialbundle,r=i.symbolsize,s=i.valuelinewidth,l=i.pathposition,u=e.valuedim,h=i.repeattimes||0,c=0,d=r[e.valuedim.index]+s+2*i.symbolmargin;for(op(t,function(t){t.__pictorialanimationindex=c,t.__pictorialrepeattimes=h,c0)],d=t.__pictorialbarrect;pu(d.style,h,a,n,e.seriesmodel,o,c),eo(d,h)}function rp(t){var e=math.round(t);return math.abs(t-e)<1e-4?e:math.ceil(t)}function bp(t,e,i){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,i),this.model=t}function vp(t,e){e=e||{};var i=t.coordinatesystem,n=t.axis,o={},a=n.position,r=n.orient,s=i.getrect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};o.position=["vertical"===r?u.vertical[a]:l[0],"horizontal"===r?u.horizontal[a]:l[3]];var h={horizontal:0,vertical:1};o.rotation=math.pi/2*h[r];var c={top:-1,bottom:1,right:1,left:-1};o.labeldirection=o.tickdirection=o.namedirection=c[a],t.get("axistick.inside")&&(o.tickdirection=-o.tickdirection),d(e.labelinside,t.get("axislabel.inside"))&&(o.labeldirection=-o.labeldirection);var d=e.rotate;return null==d&&(d=t.get("axislabel.rotate")),o.labelrotation="top"===a?-d:d,o.labelinterval=n.getlabelinterval(),o.z2=1,o}function gp(t,e,i,n,o){var r=t.axis;if(!r.scale.isblank()&&r.containdata(e))if(t.involveseries){var s=fp(e,t),l=s.payloadbatch,u=s.snaptovalue;l[0]&&null==o.seriesindex&&a(o,l[0]),!n&&t.snap&&r.containdata(u)&&null!=u&&(e=u),i.showpointer(t,e,l,o),i.showtooltip(t,s,u)}else i.showpointer(t,e)}function fp(t,e){var i=e.axis,n=i.dim,o=t,a=[],r=number.max_value,s=-1;return _l(e.seriesmodels,function(e,l){var u,h,c=e.getdata().mapdimension(n,!0);if(e.getaxistooltipdata){var d=e.getaxistooltipdata(c,t,i);h=d.dataindices,u=d.nestestvalue}else{if(!(h=e.getdata().indicesofnearest(c[0],t,"category"===i.type?.5:null)).length)return;u=e.getdata().get(c[0],h[0])}if(null!=u&&isfinite(u)){var f=t-u,p=math.abs(f);p<=r&&((p=0&&s<0)&&(r=p,s=f,o=u,a.length=0),_l(h,function(t){a.push({seriesindex:e.seriesindex,dataindexinside:t,dataindex:e.getdata().getrawindex(t)})}))}}),{payloadbatch:a,snaptovalue:o}}function wp(t,e,i,n){t[e.key]={value:i,payloadbatch:n}}function hp(t,e,i,n){var o=i.payloadbatch,a=e.axis,r=a.model,s=e.axispointermodel;if(e.triggertooltip&&o.length){var l=e.coordsys.model,u=au(l),h=t.map[u];h||(h=t.map[u]={coordsysid:l.id,coordsysindex:l.componentindex,coordsystype:l.type,coordsysmaintype:l.maintype,databyaxis:[]},t.list.push(h)),h.databyaxis.push({axisdim:a.dim,axisindex:r.componentindex,axistype:r.type,axisid:r.id,value:n,valuelabelopt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesdataindices:o.slice()})}}function zp(t,e,i){var n=i.axesinfo=[];_l(e,function(e,i){var o=e.axispointermodel.option,a=t[i];a?(!e.usehandle&&(o.status="show"),o.value=a.value,o.seriesdataindices=(a.payloadbatch||[]).slice()):!e.usehandle&&(o.status="hide"),"show"===o.status&&n.push({axisdim:e.axis.dim,axisindex:e.axis.model.componentindex,value:o.value})})}function up(t,e,i,n){if(!qp(e)&&t.list.length){var o=((t.list[0].databyaxis[0]||{}).seriesdataindices||[])[0]||{};n({type:"showtip",escapeconnect:!0,x:e[0],y:e[1],tooltipoption:i.tooltipoption,position:i.position,dataindexinside:o.dataindexinside,dataindex:o.dataindex,seriesindex:o.seriesindex,databycoordsys:t.list})}else n({type:"hidetip"})}function jp(t,e,i){var n=i.getzr(),o=bl(n).axispointerlasthighlights||{},a=bl(n).axispointerlasthighlights={};_l(t,function(t,e){var i=t.axispointermodel.option;"show"===i.status&&_l(i.seriesdataindices,function(t){var e=t.seriesindex+" | "+t.dataindex;a[e]=t})});var r=[],s=[];d(o,function(t,e){!a[e]&&s.push(t)}),d(a,function(t,e){!o[e]&&r.push(t)}),s.length&&i.dispatchaction({type:"downplay",escapeconnect:!0,batch:s}),r.length&&i.dispatchaction({type:"highlight",escapeconnect:!0,batch:r})}function xp(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisdim&&e.axis.model.componentindex===n.axisindex)return n}}function yp(t){var e=t.axis.model,i={},n=i.axisdim=t.axis.dim;return i.axisindex=i[n+"axisindex"]=e.componentindex,i.axisname=i[n+"axisname"]=e.name,i.axisid=i[n+"axisid"]=e.id,i}function qp(t){return!t||null==t[0]||isnan(t[0])||null==t[1]||isnan(t[1])}function $p(t,e,i){if(!ax.node){var n=e.getzr();sl(n).records||(sl(n).records={}),kp(n,e),(sl(n).records[t]||(sl(n).records[t]={})).handler=i}}function kp(t,e){function i(i,n){t.on(i,function(i){var o=eg(e);ml(sl(t).records,function(t){t&&n(t,i,o.dispatchaction)}),jp(o.pendings,e)})}sl(t).initialized||(sl(t).initialized=!0,i("click",v(tg,"click")),i("mousemove",v(tg,"mousemove")),i("globalout",qp))}function jp(t,e){var i,n=t.showtip.length,o=t.hidetip.length;n?i=t.showtip[n-1]:o&&(i=t.hidetip[o-1]),i&&(i.dispatchaction=null,e.dispatchaction(i))}function qp(t,e,i){t.handler("leave",null,i)}function tg(t,e,i,n){e.handler(t,i,n)}function eg(t){var e={showtip:[],hidetip:[]},i=function(n){var o=e[n.type];o?o.push(n):(n.dispatchaction=i,t.dispatchaction(n))};return{dispatchaction:i,pendings:e}}function ig(t,e){if(!ax.node){var i=e.getzr();(sl(i).records||{})[t]&&(sl(i).records[t]=null)}}function ng(){}function og(t,e,i,n){ag(dl(i).lastprop,n)||(dl(i).lastprop=n,e?fo(i,n,t):(i.stopanimation(),i.attr(n)))}function ag(t,e){if(w(t)&&w(e)){var i=!0;return d(e,function(e,n){i=i&&ag(t[n],e)}),!!i}return t===e}function rg(t,e){t[e.get("label.show")?"show":"hide"]()}function sg(t){return{position:t.position.slice(),rotation:t.rotation||0}}function lg(t,e,i){var n=e.get("z"),o=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=o&&(t.zlevel=o),t.silent=i)})}function ug(t){var e,i=t.get("type"),n=t.getmodel(i+"style");return"line"===i?(e=n.getlinestyle()).fill=null:"shadow"===i&&((e=n.getareastyle()).stroke=null),e}function hg(t,e,i,n,o){var a=dg(i.get("value"),e.axis,e.ecmodel,i.get("seriesdataindices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),r=i.getmodel("label"),s=xs(r.get("padding")||0),l=r.getfont(),u=me(a,l),h=o.position,c=u.width+s[1]+s[3],d=u.height+s[0]+s[2],f=o.align;"right"===f&&(h[0]-=c),"center"===f&&(h[0]-=c/2);var p=o.verticalalign;"bottom"===p&&(h[1]-=d),"middle"===p&&(h[1]-=d/2),cg(h,c,d,n);var g=r.get("backgroundcolor");g&&"auto"!==g||(g=e.get("axisline.linestyle.color")),t.label={shape:{x:0,y:0,width:c,height:d,r:r.get("borderradius")},position:h.slice(),style:{text:a,textfont:l,textfill:r.gettextcolor(),textposition:"inside",fill:g,stroke:r.get("bordercolor")||"transparent",linewidth:r.get("borderwidth")||0,shadowblur:r.get("shadowblur"),shadowcolor:r.get("shadowcolor"),shadowoffsetx:r.get("shadowoffsetx"),shadowoffsety:r.get("shadowoffsety")},z2:10}}function cg(t,e,i,n){var o=n.getwidth(),a=n.getheight();t[0]=math.min(t[0]+e,o)-e,t[1]=math.min(t[1]+i,a)-i,t[0]=math.max(t[0],0),t[1]=math.max(t[1],0)}function dg(t,e,i,n,o){var a=e.scale.getlabel(t,{precision:o.precision}),r=o.formatter;if(r){var s={value:pl(e,t),seriesdata:[]};d(n,function(t){var e=i.getseriesbyindex(t.seriesindex),n=t.dataindexinside,o=e&&e.getdataparams(n);o&&s.seriesdata.push(o)}),_(r)?a=r.replace("{value}",a):x(r)&&(a=r(s))}return a}function fg(t,e,i){var n=st();return dt(n,n,i.rotation),ct(n,n,i.position),mo([t.datatocoord(e),(i.labeloffset||0)+(i.labeldirection||1)*(i.labelmargin||0)],n)}function pg(t,e,i,n,o,a){var r=qd.innertextlayout(i.rotation,0,i.labeldirection);i.labelmargin=o.get("label.margin"),hg(e,n,o,a,{position:fg(n.axis,t,i),align:r.textalign,verticalalign:r.textverticalalign})}function gg(t,e,i){return i=i||0,{x1:t[i],y1:t[1-i],x2:e[i],y2:e[1-i]}}function mg(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}function vg(t,e,i,n,o,a){return{cx:t,cy:e,r0:i,r:n,startangle:o,endangle:a,clockwise:!0}}function yg(t,e){var i={};return i[e.dim+"axisindex"]=e.index,t.getcartesian(i)}function xg(t){return"x"===t.dim?0:1}function _g(t){return t.ishorizontal()?0:1}function wg(t,e){var i=t.getrect();return[i[kl[e]],i[kl[e]]+i[pl[e]]]}function bg(t,e,i){var n=new jb({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return po(n,{shape:{width:t.width+20,height:t.height+20}},e,i),n}function sg(t,e,i){if(t.count())for(var n,o=e.coordinatesystem,a=e.getlayerseries(),r=t.mapdimension("single"),s=t.mapdimension("value"),l=f(a,function(e){return f(e.indices,function(e){var i=o.datatopoint(t.get(r,e));return i[1]=t.get(s,e),i})}),u=mg(l),h=u.y0,c=i/u.max,d=a.length,p=a[0].indices.length,g=0;ga&&(a=u),n.push(u)}for(var h=0;ha&&(a=d)}return r.y0=o,r.max=a,r}function ig(t){var e=0;d(t.children,function(t){ig(t);var i=t.value;y(i)&&(i=i[0]),e+=i});var i=t.value;y(i)&&(i=i[0]),(null==i||isnan(i))&&(i=e),i<0&&(i=0),y(t.value)?t.value[0]=i:t.value=i}function dg(t,e,i){function n(){r.ignore=r.hoverignore}function o(){r.ignore=r.normalignore}l_.call(this);var a=new gb({z2:rl}),r=new zb({z2:bl,silent:t.getmodel("label").get("silent")});this.add(a),this.add(r),this.updatedata(!0,t,"normal",e,i),this.on("emphasis",n).on("normal",o).on("mouseover",n).on("mouseout",o)}function tg(t,e,i){var n=t.getvisual("color"),o=t.getvisual("visualmeta");o&&0!==o.length||(n=null);var a=t.getmodel("itemstyle").get("color");if(a)return a;if(n)return n;if(0===t.depth)return i.option.color[0];var r=i.option.color.length;return a=i.option.color[ag(t)%r]}function ag(t){for(var e=t;e.depth>1;)e=e.parentnode;return l(t.getancestors()[0].children,e)}function cg(t,e,i){return i!==zl.none&&(i===zl.self?t===e:i===zl.ancestor?t===e||t.isancestorof(e):t===e||t.isdescendantof(e))}function lg(t,e){var i=t.children||[];t.children=kg(i,e),i.length&&d(t.children,function(t){lg(t,e)})}function kg(t,e){if("function"==typeof e)return t.sort(e);var i="asc"===e;return t.sort(function(t,e){var n=(t.getvalue()-e.getvalue())*(i?1:-1);return 0===n?(t.dataindex-e.dataindex)*(i?-1:1):n})}function pg(t,e){return e=e||[0,0],f(["x","y"],function(i,n){var o=this.getaxis(i),a=e[n],r=t[n]/2;return"category"===o.type?o.getbandwidth():math.abs(o.datatocoord(a-r)-o.datatocoord(a+r))},this)}function ng(t,e){return e=e||[0,0],f([0,1],function(i){var n=e[i],o=t[i]/2,a=[],r=[];return a[i]=n-o,r[i]=n+o,a[1-i]=r[1-i]=e[1-i],math.abs(this.datatopoint(a)[i]-this.datatopoint(r)[i])},this)}function og(t,e){var i=this.getaxis(),n=e instanceof array?e[0]:e,o=(t instanceof array?t[0]:t)/2;return"category"===i.type?i.getbandwidth():math.abs(i.datatocoord(n-o)-i.datatocoord(n+o))}function eg(t,e){return f(["radius","angle"],function(i,n){var o=this["get"+i+"axis"](),a=e[n],r=t[n]/2,s="datato"+i,l="category"===o.type?o.getbandwidth():math.abs(o[s](a-r)-o[s](a+r));return"angle"===i&&(l=l*math.pi/180),l},this)}function zg(t){var e,i=t.type;if("path"===i){var n=t.shape;(e=zn(n.pathdata,null,{x:n.x||0,y:n.y||0,width:n.width||0,height:n.height||0},"center")).__custompathdata=t.pathdata}else"image"===i?(e=new je({})).__customimagepath=t.style.image:"text"===i?(e=new zb({})).__customtext=t.style.text:e=new(0,ss[i.charat(0).touppercase()+i.slice(1)]);return e.__customgraphictype=i,e.name=t.name,e}function rg(t,e,n,o,a,r){var s={},l=n.style||{};if(n.shape&&(s.shape=i(n.shape)),n.position&&(s.position=n.position.slice()),n.scale&&(s.scale=n.scale.slice()),n.origin&&(s.origin=n.origin.slice()),n.rotation&&(s.rotation=n.rotation),"image"===t.type&&n.style){u=s.style={};d(["x","y","width","height"],function(e){bg(e,u,l,t.style,r)})}if("text"===t.type&&n.style){var u=s.style={};d(["x","y"],function(e){bg(e,u,l,t.style,r)}),!l.hasownproperty("textfill")&&l.fill&&(l.textfill=l.fill),!l.hasownproperty("textstroke")&&l.stroke&&(l.textstroke=l.stroke)}if("group"!==t.type&&(t.usestyle(l),r)){t.style.opacity=0;var h=l.opacity;null==h&&(h=1),po(t,{style:{opacity:h}},o,e)}r?t.attr(s):fo(t,s,o,e),t.attr({z2:n.z2||0,silent:n.silent}),!1!==n.styleemphasis&&eo(t,n.styleemphasis)}function bg(t,e,i,n,o){null==i[t]||o||(e[t]=i[t],i[t]=n[t])}function vg(t,e,i,n){function o(t){null==t&&(t=h),v&&(c=e.getitemmodel(t),d=c.getmodel(ul),f=c.getmodel(jl),p=e.getitemvisual(t,"color"),v=!1)}var s=t.get("renderitem"),l=t.coordinatesystem,u={};l&&(u=l.preparecustoms?l.preparecustoms():yl[l.type](l));var h,c,d,f,p,g=r({getwidth:n.getwidth,getheight:n.getheight,getzr:n.getzr,getdevicepixelratio:n.getdevicepixelratio,value:function(t,i){return null==i&&(i=h),e.get(e.getdimension(t||0),i)},style:function(i,n){null==n&&(n=h),o(n);var r=c.getmodel(hl).getitemstyle();null!=p&&(r.fill=p);var s=e.getitemvisual(n,"opacity");return null!=s&&(r.opacity=s),no(r,d,null,{autocolor:p,isrecttext:!0}),r.text=d.getshallow("show")?t(t.getformattedlabel(n,"normal"),sl(e,n)):null,i&&a(r,i),r},styleemphasis:function(i,n){null==n&&(n=h),o(n);var r=c.getmodel(zl).getitemstyle();return no(r,f,null,{isrecttext:!0},!0),r.text=f.getshallow("show")?a(t.getformattedlabel(n,"emphasis"),t.getformattedlabel(n,"normal"),sl(e,n)):null,i&&a(r,i),r},visual:function(t,i){return null==i&&(i=h),e.getitemvisual(i,t)},barlayout:function(t){if(l.getbaseaxis)return nl(r({axis:l.getbaseaxis()},t),n)},currentseriesindices:function(){return i.getcurrentseriesindices()},font:function(t){return ho(t,i)}},u.api||{}),m={context:{},seriesid:t.id,seriesname:t.name,seriesindex:t.seriesindex,coordsys:u.coordsys,datainsidelength:e.count(),encode:gg(t.getdata())},v=!0;return function(t){return h=t,v=!0,s&&s(r({dataindexinside:t,dataindex:e.getrawindex(t)},m),g)||{}}}function gg(t){var e={};return d(t.dimensions,function(i,n){var o=t.getdimensioninfo(i);if(!o.isextracoord){var a=o.coorddim;(e[a]=e[a]||[])[o.coorddimindex]=n}}),e}function fg(t,e,i,n,o,a){return(t=wg(t,e,i,n,o,a))&&a.setitemgraphicel(e,t),t}function wg(t,e,i,n,o,a){var r=i.type;if(!t||r===t.__customgraphictype||"path"===r&&i.pathdata===t.__custompathdata||"image"===r&&i.style.image===t.__customimagepath||"text"===r&&i.style.text===t.__customtext||(o.remove(t),t=null),null!=r){var s=!t;if(!t&&(t=zg(i)),rg(t,e,i,n,a,s),"group"===r){var l=t.children()||[],u=i.children||[];if(i.diffchildrenbyname)hg({oldchildren:l,newchildren:u,dataindex:e,animatablemodel:n,group:t,data:a});else{for(var h=0;hn?t-=l+a:t+=a),null!=r&&(e+u+r>o?e-=u+r:e+=r),[t,e]}function pm(t,e,i,n,o){var a=gm(i),r=a.width,s=a.height;return t=math.min(t+r,n)-r,e=math.min(e+s,o)-s,t=math.max(t,0),e=math.max(e,0),[t,e]}function gm(t){var e=t.clientwidth,i=t.clientheight;if(document.defaultview&&document.defaultview.getcomputedstyle){var n=document.defaultview.getcomputedstyle(t);n&&(e+=parseint(n.paddingleft,10)+parseint(n.paddingright,10)+parseint(n.borderleftwidth,10)+parseint(n.borderrightwidth,10),i+=parseint(n.paddingtop,10)+parseint(n.paddingbottom,10)+parseint(n.bordertopwidth,10)+parseint(n.borderbottomwidth,10))}return{width:e,height:i}}function mm(t,e,i){var n=i[0],o=i[1],a=0,r=0,s=e.width,l=e.height;switch(t){case"inside":a=e.x+s/2-n/2,r=e.y+l/2-o/2;break;case"top":a=e.x+s/2-n/2,r=e.y-o-5;break;case"bottom":a=e.x+s/2-n/2,r=e.y+l+5;break;case"left":a=e.x-n-5,r=e.y+l/2-o/2;break;case"right":a=e.x+s+5,r=e.y+l/2-o/2}return[a,r]}function vm(t){return"center"===t||"middle"===t}function ym(t){return t.get("stack")||"__ec_stack_"+t.seriesindex}function xm(t){return t.dim}function _m(t,e){var i={};d(t,function(t,e){var n=t.getdata(),o=t.coordinatesystem.getbaseaxis(),a=o.getextent(),r="category"===o.type?o.getbandwidth():math.abs(a[1]-a[0])/n.count(),s=i[xm(o)]||{bandwidth:r,remainedwidth:r,autowidthcount:0,categorygap:"20%",gap:"30%",stacks:{}},l=s.stacks;i[xm(o)]=s;var u=ym(t);l[u]||s.autowidthcount++,l[u]=l[u]||{width:0,maxwidth:0};var h=to(t.get("barwidth"),r),c=to(t.get("barmaxwidth"),r),d=t.get("bargap"),f=t.get("barcategorygap");h&&!l[u].width&&(h=math.min(s.remainedwidth,h),l[u].width=h,s.remainedwidth-=h),c&&(l[u].maxwidth=c),null!=d&&(s.gap=d),null!=f&&(s.categorygap=f)});var n={};return d(i,function(t,e){n[e]={};var i=t.stacks,o=t.bandwidth,a=to(t.categorygap,o),r=to(t.gap,1),s=t.remainedwidth,l=t.autowidthcount,u=(s-a)/(l+(l-1)*r);u=math.max(u,0),d(i,function(t,e){var i=t.maxwidth;i&&ie[0]&&(e=e.slice().reverse());var n=t.coordtopoint([e[0],i]),o=t.coordtopoint([e[1],i]);return{x1:n[0],y1:n[1],x2:o[0],y2:o[1]}}function am(t){return t.getradiusaxis().inverse?0:1}function cm(t,e,i){return{position:[t.cx,t.cy],rotation:i/180*math.pi,labeldirection:-1,tickdirection:-1,namedirection:1,labelrotate:e.getmodel("axislabel").get("rotate"),z2:1}}function lm(t,e,i,n,o){var a=e.axis,r=a.datatocoord(t),s=n.getangleaxis().getextent()[0];s=s/180*math.pi;var l,u,h,c=n.getradiusaxis().getextent();if("radius"===a.dim){var d=st();dt(d,d,s),ct(d,d,[n.cx,n.cy]),l=mo([r,-o],d);var f=e.getmodel("axislabel").get("rotate")||0,p=qd.innertextlayout(s,f*math.pi/180,-1);u=p.textalign,h=p.textverticalalign}else{var g=c[1];l=n.coordtopoint([g+o,r]);var m=n.cx,v=n.cy;u=math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",h=math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalalign:h}}function km(t,e){e.update="updateview",hs(e,function(e,i){var n={};return i.eachcomponent({maintype:"geo",query:e},function(i){i[t](e.name),d(i.coordinatesystem.regions,function(t){n[t.name]=i.isselected(t.name)||!1})}),{selected:n,name:e.name}})}function pm(t){var e={};d(t,function(t){e[t]=1}),t.length=0,d(e,function(e,i){t.push(i)})}function nm(t){if(t)for(var e in t)if(t.hasownproperty(e))return!0}function om(t,e,n){function o(){var t=function(){};return t.prototype.__hidden=t.prototype,new t}var a={};return sk(e,function(e){var r=a[e]=o();sk(t[e],function(t,o){if(fa.isvalidtype(o)){var a={type:o,visual:t};n&&n(a,e),r[o]=new fa(a),"opacity"===o&&((a=i(a)).type="coloralpha",r.__hidden.__alphaforopacity=new fa(a))}})}),a}function em(t,e,n){var o;d(n,function(t){e.hasownproperty(t)&&nm(e[t])&&(o=!0)}),o&&d(n,function(n){e.hasownproperty(n)&&nm(e[n])?t[n]=i(e[n]):delete t[n]})}function zm(t,e,i,n,o,a){function r(t){return i.getitemvisual(h,t)}function s(t,e){i.setitemvisual(h,t,e)}function l(t,l){h=null==a?t:l;var c=i.getrawdataitem(h);if(!c||!1!==c.visualmap)for(var d=n.call(o,t),f=e[d],p=u[d],g=0,m=p.length;g1)return!1;var h=hm(i-t,o-t,n-e,a-e)/l;return!(h<0||h>1)}function wm(t){return t<=1e-6&&t>=-1e-6}function hm(t,e,i,n){return t*n-e*i}function zm(t,e,i){var n=this._targetinfolist=[],o={},a=jm(e,t);ik(kk,function(t,e){(!i||!i.include||dk(i.include,e)>=0)&&t(a,n,o)})}function um(t){return t[0]>t[1]&&t.reverse(),t}function jm(t,e){return oi(t,e,{includemaintypes:ck})}function xm(t,e,i,n){var o=i.getaxis(["x","y"][t]),a=um(f([0,1],function(t){return e?o.coordtodata(o.tolocalcoord(n[t])):o.toglobalcoord(o.datatocoord(n[t]))})),r=[];return r[t]=a,r[1-t]=[nan,nan],{values:a,xyminmax:r}}function ym(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function qm(t,e){var i=$m(t),n=$m(e),o=[i[0]/n[0],i[1]/n[1]];return isnan(o[0])&&(o[0]=1),isnan(o[1])&&(o[1]=1),o}function $m(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[nan,nan]}function km(t,e,i,n,o){if(o){var a=t.getzr();a[bk]||(a[rk]||(a[rk]=jm),_r(a,rk,i,e)(t,n))}}function jm(t,e){if(!t.isdisposed()){var i=t.getzr();i[bk]=!0,t.dispatchaction({type:"brushselect",batch:e}),i[bk]=!1}}function qm(t,e,i,n){for(var o=0,a=e.length;o=0}function fv(t,e,i){function n(t,e){return l(e.nodes,t)>=0}function o(t,n){var o=!1;return e(function(e){d(i(t,e)||[],function(t){n.records[e.name][t]&&(o=!0)})}),o}function a(t,n){n.nodes.push(t),e(function(e){d(i(t,e)||[],function(t){n.records[e.name][t]=!0})})}return function(i){var r={nodes:[],records:{}};if(e(function(t){r.records[t.name]={}}),!i)return r;a(i,r);var s;do{s=!1,t(function(t){!n(t,r)&&o(t,r)&&(a(t,r),s=!0)})}while(s);return r}}function pv(t,e,i){var n=[1/0,-1/0];return $k(i,function(t){var i=t.getdata();i&&$k(i.mapdimension(e,!0),function(t){var e=i.getapproximateextent(t);e[0]n[1]&&(n[1]=e[1])})}),n[1]0?0:nan);var r=i.getmax(!0);return null!=r&&"datamax"!==r&&"function"!=typeof r?e[1]=r:o&&(e[1]=a>0?a-1:nan),i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function mv(t,e){var i=t.getaxismodel(),n=t._percentwindow,o=t._valuewindow;if(n){var a=po(o,[0,500]);a=math.min(a,20);var r=e||0===n[0]&&100===n[1];i.setrange(r?null:+o[0].tofixed(a),r?null:+o[1].tofixed(a))}}function vv(t){var e=t._minmaxspan={},i=t._datazoommodel;$k(["min","max"],function(n){e[n+"span"]=i.get(n+"span");var o=i.get(n+"valuespan");if(null!=o&&(e[n+"valuespan"]=o,null!=(o=t.getaxismodel().axis.scale.parse(o)))){var a=t._dataextent;e[n+"span"]=do(a[0]+o,a,[0,100],!0)}})}function yv(t){var e={};return qk(["start","end","startvalue","endvalue","throttle"],function(i){t.hasownproperty(i)&&(e[i]=t[i])}),e}function xv(t,e){var i=t._rangepropmode,n=t.get("rangemode");qk([["start","startvalue"],["end","endvalue"]],function(t,o){var a=null!=e[t[0]],r=null!=e[t[1]];a&&!r?i[o]="percent":!a&&r?i[o]="value":n?i[o]=n[o]:a&&(i[o]="percent")})}function _v(t){return{x:"y",y:"x",radius:"angle",angle:"radius"}[t]}function wv(t){return"vertical"===t?"ns-resize":"ew-resize"}function bv(t,e){var i=dv(t),n=e.datazoomid,o=e.coordid;d(i,function(t,i){var a=t.datazoominfos;a[n]&&l(e.allcoordids,o)<0&&(delete a[n],t.count--)}),av(i);var a=i[o];a||((a=i[o]={coordid:o,datazoominfos:{},count:0}).controller=tv(t,a),a.dispatchaction=v(pv,t)),!a.datazoominfos[n]&&a.count++,a.datazoominfos[n]=e;var r=nv(a.datazoominfos);a.controller.enable(r.controltype,r.opt),a.controller.setpointerchecker(e.containspoint),_r(a,"dispatchaction",e.throttlerate,"fixrate")}function sv(t,e){var i=dv(t);d(i,function(t){t.controller.dispose();var i=t.datazoominfos;i[e]&&(delete i[e],t.count--)}),av(i)}function mv(t,e){if(t&&"datazoom"===t.type&&t.batch)for(var i=0,n=t.batch.length;in["type_"+e]&&(e=o),a(i,t.roamcontrolleropt)}),{controltype:e,opt:i}}function ov(t,e){return t&&t.hasownproperty&&t.hasownproperty(e)}function ev(t,e,i,n){for(var o=e.targetvisuals[n],a=fa.preparevisualtypes(o),r={color:t.getdata().getvisual("color")},s=0,l=a.length;s=0&&(r[a]=+r[a].tofixed(h)),r}function $v(t,e){var n=t.getdata(),o=t.coordinatesystem;if(e&&!yv(e)&&!y(e.coord)&&o){var a=o.dimensions,r=kv(e,n,o,t);if((e=i(e)).type&&xp[e.type]&&r.baseaxis&&r.valueaxis){var s=up(a,r.baseaxis.dim),l=up(a,r.valueaxis.dim);e.coord=xp[e.type](n,r.basedatadim,r.valuedatadim,s,l),e.value=e.coord[l]}else{for(var u=[null!=e.xaxis?e.xaxis:e.radiusaxis,null!=e.yaxis?e.yaxis:e.angleaxis],h=0;h<2;h++)xp[u[h]]&&(u[h]=ey(n,n.mapdimension(a[h]),u[h]));e.coord=u}}return e}function kv(t,e,i,n){var o={};return null!=t.valueindex||null!=t.valuedim?(o.valuedatadim=null!=t.valueindex?e.getdimension(t.valueindex):t.valuedim,o.valueaxis=i.getaxis(jv(n,o.valuedatadim)),o.baseaxis=i.getotheraxis(o.valueaxis),o.basedatadim=e.mapdimension(o.baseaxis.dim)):(o.baseaxis=n.getbaseaxis(),o.valueaxis=i.getotheraxis(o.baseaxis),o.basedatadim=e.mapdimension(o.baseaxis.dim),o.valuedatadim=e.mapdimension(o.valueaxis.dim)),o}function jv(t,e){var i=t.getdata(),n=i.dimensions;e=i.getdimension(e);for(var o=0;o=0)return!0}function ly(t){for(var e=t.split(/\n+/g),i=[],n=f(ay(e.shift()).split(fn),function(t){return{name:t,data:[]}}),o=0;o=0&&!i[o][n];o--);if(o<0){var a=t.querycomponents({maintype:"datazoom",subtype:"select",id:n})[0];if(a){var r=a.getpercentrange();i[0][n]={datazoomid:n,start:r[0],end:r[1]}}}}),i.push(e)}function zy(t){var e=vy(t),i=e[e.length-1];e.length>1&&e.pop();var n={};return pn(i,function(t,i){for(var o=e.length-1;o>=0;o--)if(t=e[o][i]){n[i]=t;break}}),n}function ry(t){t[gn]=null}function by(t){return vy(t).length}function vy(t){var e=t[gn];return e||(e=t[gn]=[{}]),e}function gy(t,e,i){(this._brushcontroller=new dd(i.getzr())).on("brush",m(this._onbrush,this)).mount(),this._iszoomactive}function fy(t){var e={};return d(["xaxisindex","yaxisindex"],function(i){e[i]=t[i],null==e[i]&&(e[i]="all"),(!1===e[i]||"none"===e[i])&&(e[i]=[])}),e}function wy(t,e){t.seticonstatus("back",by(e)>1?"emphasis":"normal")}function hy(t,e,i,n,o){var a=i._iszoomactive;n&&"takeglobalcursor"===n.type&&(a="datazoomselect"===n.key&&n.datazoomselectactive),i._iszoomactive=a,t.seticonstatus("zoom",a?"emphasis":"normal");var r=new zm(fy(t.option),e,{include:["grid"]});i._brushcontroller.setpanels(r.makepanelopts(o,function(t){return t.xaxisdeclared&&!t.yaxisdeclared?"linex":!t.xaxisdeclared&&t.yaxisdeclared?"liney":"rect"})).enablebrush(!!a&&{brushtype:"auto",brushstyle:{linewidth:0,fill:"rgba(0,0,0,0.2)"}})}function zy(t){this.model=t}function uy(t){return bn(t)}function jy(){if(!in&&dn){in=!0;var t=dn.stylesheets;t.length<31?dn.createstylesheet().addrule(".zrvml","behavior:url(#default#vml)"):t[0].addrule(".zrvml","behavior:url(#default#vml)")}}function xy(t){return parseint(t,10)}function yy(t,e){jy(),this.root=t,this.storage=e;var i=document.createelement("div"),n=document.createelement("div");i.style.csstext="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",n.style.csstext="position:absolute;left:0;top:0;",t.appendchild(i),this._vmlroot=n,this._vmlviewport=i,this.resize();var o=e.delfromstorage,a=e.addtostorage;e.delfromstorage=function(t){o.call(e,t),t&&t.onremove&&t.onremove(n)},e.addtostorage=function(t){t.onadd&&t.onadd(n),a.call(e,t)},this._firstpaint=!0}function qy(t){return function(){m_('in ie8.0 vml mode painter not support method "'+t+'"')}}function $y(t){return document.createelementns(ro,t)}function ky(t){return ho(1e4*t)/1e4}function jy(t){return t-mo}function qy(t,e){var i=e?t.textfill:t.fill;return null!=i&&i!==uo}function tx(t,e){var i=e?t.textstroke:t.stroke;return null!=i&&i!==uo}function ex(t,e){e&&ix(t,"transform","matrix("+lo.call(e,",")+")")}function ix(t,e,i){(!i||"linear"!==i.type&&"radial"!==i.type)&&t.setattribute(e,i)}function nx(t,e,i){t.setattributens("http://www.w3.org/1999/xlink",e,i)}function ox(t,e,i){if(qy(e,i)){var n=i?e.textfill:e.fill;n="transparent"===n?uo:n,"none"!==t.getattribute("clip-path")&&n===uo&&(n="rgba(0, 0, 0, 0.002)"),ix(t,"fill",n),ix(t,"fill-opacity",e.opacity)}else ix(t,"fill",uo);if(tx(e,i)){var o=i?e.textstroke:e.stroke;ix(t,"stroke",o="transparent"===o?uo:o),ix(t,"stroke-width",(i?e.textstrokewidth:e.linewidth)/(!i&&e.strokenoscale?e.host.getlinescale():1)),ix(t,"paint-order",i?"stroke":"fill"),ix(t,"stroke-opacity",e.opacity),e.linedash?(ix(t,"stroke-dasharray",e.linedash.join(",")),ix(t,"stroke-dashoffset",ho(e.linedashoffset||0))):ix(t,"stroke-dasharray",""),e.linecap&&ix(t,"stroke-linecap",e.linecap),e.linejoin&&ix(t,"stroke-linejoin",e.linejoin),e.miterlimit&&ix(t,"stroke-miterlimit",e.miterlimit)}else ix(t,"stroke",uo)}function ax(t){for(var e=[],i=t.data,n=t.len(),o=0;o=po||!jy(g)&&(d>-fo&&d<0||d>fo)==!!p;var y=ky(s+u*do(c)),x=ky(l+h*co(c));m&&(d=p?po-1e-4:1e-4-po,v=!0,9===o&&e.push("m",y,x));var _=ky(s+u*do(c+d)),w=ky(l+h*co(c+d));e.push("a",ky(u),ky(h),ho(f*go),+v,+p,_,w);break;case so.z:a="z";break;case so.r:var _=ky(i[o++]),w=ky(i[o++]),b=ky(i[o++]),s=ky(i[o++]);e.push("m",_,w,"l",_+b,w,"l",_+b,w+s,"l",_,w+s,"l",_,w)}a&&e.push(a);for(var m=0;m=11)}}(navigator.useragent),cx={"[object function]":1,"[object regexp]":1,"[object date]":1,"[object error]":1,"[object canvasgradient]":1,"[object canvaspattern]":1,"[object image]":1,"[object canvas]":1},lx={"[object int8array]":1,"[object uint8array]":1,"[object uint8clampedarray]":1,"[object int16array]":1,"[object uint16array]":1,"[object int32array]":1,"[object uint32array]":1,"[object float32array]":1,"[object float64array]":1},kx=object.prototype.tostring,px=array.prototype,nx=px.foreach,ox=px.filter,ex=px.slice,zx=px.map,rx=px.reduce,bx={},vx=function(){return bx.createcanvas()};bx.createcanvas=function(){return document.createelement("canvas")};var gx,fx="__ec_primitive__";e.prototype={constructor:e,get:function(t){return this.hasownproperty(t)?this[t]:null},set:function(t,e){return this[t]=e},each:function(t,e){void 0!==e&&(t=m(t,e));for(var i in this)this.hasownproperty(i)&&t(this[i],i)},removekey:function(t){delete this[t]}};var wx=(object.freeze||object)({$override:e,clone:i,merge:n,mergeall:o,extend:a,defaults:r,createcanvas:vx,getcontext:s,indexof:l,inherits:u,mixin:h,isarraylike:c,each:d,map:f,reduce:p,filter:g,find:function(t,e,i){if(t&&e)for(var n=0,o=t.length;n3&&(e=qx.call(e,1));for(var n=this._$handlers[t],o=n.length,a=0;a4&&(e=qx.call(e,1,e.length-1));for(var n=e[e.length-1],o=this._$handlers[t],a=o.length,r=0;r=0;a--){var r;if(n[a]!==i&&!n[a].ignore&&(r=rt(n[a],t,e))&&(!o.toptarget&&(o.toptarget=n[a]),r!==kx)){o.target=n[a];break}}return o}},d(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){qx.prototype[t]=function(e){var i=this.findhover(e.zrx,e.zry),n=i.target;if("mousedown"===t)this._downel=n,this._downpoint=[e.zrx,e.zry],this._upel=n;else if("mouseup"===t)this._upel=n;else if("click"===t){if(this._downel!==this._upel||!this._downpoint||jx(this._downpoint,[e.zrx,e.zry])>4)return;this._downpoint=null}this.dispatchtoelement(i,t,e)}}),h(qx,$x),h(qx,it);var t_="undefined"==typeof float32array?array:float32array,e_=(object.freeze||object)({create:st,identity:lt,copy:ut,mul:ht,translate:ct,rotate:dt,scale:ft,invert:pt,clone:gt}),i_=lt,n_=5e-5,o_=function(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},a_=o_.prototype;a_.transform=null,a_.needlocaltransform=function(){return mt(this.rotation)||mt(this.position[0])||mt(this.position[1])||mt(this.scale[0]-1)||mt(this.scale[1]-1)},a_.updatetransform=function(){var t=this.parent,e=t&&t.transform,i=this.needlocaltransform(),n=this.transform;i||e?(n=n||st(),i?this.getlocaltransform(n):i_(n),e&&(i?ht(n,t.transform,n):ut(n,t.transform)),this.transform=n,this.invtransform=this.invtransform||st(),pt(this.invtransform,n)):n&&i_(n)},a_.getlocaltransform=function(t){return o_.getlocaltransform(this,t)},a_.settransform=function(t){var e=this.transform,i=t.dpr||1;e?t.settransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):t.settransform(i,0,0,i,0,0)},a_.restoretransform=function(t){var e=t.dpr||1;t.settransform(e,0,0,e,0,0)};var r_=[];a_.decomposetransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(ht(r_,t.invtransform,e),e=r_);var i=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],o=this.position,a=this.scale;mt(i-1)&&(i=math.sqrt(i)),mt(n-1)&&(n=math.sqrt(n)),e[0]<0&&(i=-i),e[3]<0&&(n=-n),o[0]=e[4],o[1]=e[5],a[0]=i,a[1]=n,this.rotation=math.atan2(-e[1]/n,e[0]/i)}},a_.getglobalscale=function(){var t=this.transform;if(!t)return[1,1];var e=math.sqrt(t[0]*t[0]+t[1]*t[1]),i=math.sqrt(t[2]*t[2]+t[3]*t[3]);return t[0]<0&&(e=-e),t[3]<0&&(i=-i),[e,i]},a_.transformcoordtolocal=function(t,e){var i=[t,e],n=this.invtransform;return n&&q(i,i,n),i},a_.transformcoordtoglobal=function(t,e){var i=[t,e],n=this.transform;return n&&q(i,i,n),i},o_.getlocaltransform=function(t,e){i_(e=e||[]);var i=t.origin,n=t.scale||[1,1],o=t.rotation||0,a=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),ft(e,e,n),o&&dt(e,e,o),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=a[0],e[5]+=a[1],e};var s_={linear:function(t){return t},quadraticin:function(t){return t*t},quadraticout:function(t){return t*(2-t)},quadraticinout:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicin:function(t){return t*t*t},cubicout:function(t){return--t*t*t+1},cubicinout:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticin:function(t){return t*t*t*t},quarticout:function(t){return 1- --t*t*t*t},quarticinout:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticin:function(t){return t*t*t*t*t},quinticout:function(t){return--t*t*t*t*t+1},quinticinout:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalin:function(t){return 1-math.cos(t*math.pi/2)},sinusoidalout:function(t){return math.sin(t*math.pi/2)},sinusoidalinout:function(t){return.5*(1-math.cos(math.pi*t))},exponentialin:function(t){return 0===t?0:math.pow(1024,t-1)},exponentialout:function(t){return 1===t?1:1-math.pow(2,-10*t)},exponentialinout:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*math.pow(1024,t-1):.5*(2-math.pow(2,-10*(t-1)))},circularin:function(t){return 1-math.sqrt(1-t*t)},circularout:function(t){return math.sqrt(1- --t*t)},circularinout:function(t){return(t*=2)<1?-.5*(math.sqrt(1-t*t)-1):.5*(math.sqrt(1-(t-=2)*t)+1)},elasticin:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*math.asin(1/i)/(2*math.pi),-i*math.pow(2,10*(t-=1))*math.sin((t-e)*(2*math.pi)/.4))},elasticout:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*math.asin(1/i)/(2*math.pi),i*math.pow(2,-10*t)*math.sin((t-e)*(2*math.pi)/.4)+1)},elasticinout:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*math.asin(1/i)/(2*math.pi),(t*=2)<1?i*math.pow(2,10*(t-=1))*math.sin((t-e)*(2*math.pi)/.4)*-.5:i*math.pow(2,-10*(t-=1))*math.sin((t-e)*(2*math.pi)/.4)*.5+1)},backin:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backout:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backinout:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bouncein:function(t){return 1-s_.bounceout(1-t)},bounceout:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceinout:function(t){return t<.5?.5*s_.bouncein(2*t):.5*s_.bounceout(2*t-1)+.5}};vt.prototype={constructor:vt,step:function(t,e){if(this._initialized||(this._starttime=t+this._delay,this._initialized=!0),this._paused)this._pausedtime+=e;else{var i=(t-this._starttime-this._pausedtime)/this._life;if(!(i<0)){i=math.min(i,1);var n=this.easing,o="string"==typeof n?s_[n]:n,a="function"==typeof o?o(i):i;return this.fire("frame",a),1==i?this.loop?(this.restart(t),"restart"):(this._needsremove=!0,"destroy"):null}}},restart:function(t){var e=(t-this._starttime-this._pausedtime)%this._life;this._starttime=t-e+this.gap,this._pausedtime=0,this._needsremove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var l_=function(){this.head=null,this.tail=null,this._len=0},u_=l_.prototype;u_.insert=function(t){var e=new h_(t);return this.insertentry(e),e},u_.insertentry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},u_.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},u_.len=function(){return this._len},u_.clear=function(){this.head=this.tail=null,this._len=0};var h_=function(t){this.value=t,this.next,this.prev},c_=function(t){this._list=new l_,this._map={},this._maxsize=t||10,this._lastremovedentry=null},d_=c_.prototype;d_.put=function(t,e){var i=this._list,n=this._map,o=null;if(null==n[t]){var a=i.len(),r=this._lastremovedentry;if(a>=this._maxsize&&a>0){var s=i.head;i.remove(s),delete n[s.key],o=s.value,this._lastremovedentry=s}r?r.value=e:r=new h_(e),r.key=t,i.insertentry(r),n[t]=r}return o},d_.get=function(t){var e=this._map[t],i=this._list;if(null!=e)return e!==i.tail&&(i.remove(e),i.insertentry(e)),e.value},d_.clear=function(){this._list.clear(),this._map={}};var f_={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]},p_=new c_(20),g_=null,m_=nt,v_=ot,y_=(object.freeze||object)({parse:at,lift:kt,tohex:pt,fastlerp:nt,fastmaptocolor:m_,lerp:ot,maptocolor:v_,modifyhsl:et,modifyalpha:zt,stringify:rt}),x_=array.prototype.slice,__=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||bt,this._setter=n||vt,this._clipcount=0,this._delay=0,this._donelist=[],this._onframelist=[],this._cliplist=[]};__.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasownproperty(n)){if(!i[n]){i[n]=[];var o=this._getter(this._target,n);if(null==o)continue;0!==t&&i[n].push({time:0,value:xt(o)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframelist.push(t),this},pause:function(){for(var t=0;t0&&this.animate(t,!1).when(null==n?500:n,a).delay(o||0),this}};var d_=function(t){o_.call(this,t),$x.call(this,t),i_.call(this,t),this.id=t.id||dx()};d_.prototype={type:"element",name:"",__zr:null,ignore:!1,clippath:null,isgroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposetransform(),this.dirty(!1)},beforeupdate:function(){},afterupdate:function(){},update:function(){this.updatetransform()},traverse:function(t,e){},attrkv:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];i||(i=this[t]=[]),i[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrkv(t,e);else if(w(t))for(var i in t)t.hasownproperty(i)&&this.attrkv(i,t[i]);return this.dirty(!1),this},setclippath:function(t){var e=this.__zr;e&&t.addselftozr(e),this.clippath&&this.clippath!==t&&this.removeclippath(),this.clippath=t,t.__zr=e,t.__cliptarget=this,this.dirty(!1)},removeclippath:function(){var t=this.clippath;t&&(t.__zr&&t.removeselffromzr(t.__zr),t.__zr=null,t.__cliptarget=null,this.clippath=null,this.dirty(!1))},addselftozr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new kt(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},kt.create=function(t){return new kt(t.x,t.y,t.width,t.height)};var l_=function(t){t=t||{},d_.call(this,t);for(var e in t)t.hasownproperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};l_.prototype={constructor:l_,isgroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childat:function(t){return this._children[t]},childofname:function(t){for(var e=this._children,i=0;i=0&&(i.splice(n,0,t),this._doadd(t))}return this},_doadd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addtostorage(t),t instanceof l_&&t.addchildrentostorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,o=l(n,t);return o<0?this:(n.splice(o,1),t.parent=null,i&&(i.delfromstorage(t),t instanceof l_&&t.delchildrenfromstorage(i)),e&&e.refresh(),this)},removeall:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e=0&&(this.delfromstorage(t),this._roots.splice(o,1),t instanceof l_&&t.delchildrenfromstorage(this))}},addtostorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delfromstorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderlist=this._roots=null},displayablesortfunc:re};var o_={shadowblur:1,shadowoffsetx:1,shadowoffsety:1,textshadowblur:1,textshadowoffsetx:1,textshadowoffsety:1,textboxshadowblur:1,textboxshadowoffsetx:1,textboxshadowoffsety:1},e_=function(t,e,i){return o_.hasownproperty(e)?i*=t.dpr:i},z_=[["shadowblur",0],["shadowoffsetx",0],["shadowoffsety",0],["shadowcolor","#000"],["linecap","butt"],["linejoin","miter"],["miterlimit",10]],r_=function(t,e){this.extendfrom(t,!1),this.host=e};r_.prototype={constructor:r_,host:null,fill:"#000",stroke:null,opacity:1,linedash:null,linedashoffset:0,shadowblur:0,shadowoffsetx:0,shadowoffsety:0,linewidth:1,strokenoscale:!1,text:null,font:null,textfont:null,fontstyle:null,fontweight:null,fontsize:null,fontfamily:null,texttag:null,textfill:"#000",textstroke:null,textwidth:null,textheight:null,textstrokewidth:0,textlineheight:null,textposition:"inside",textrect:null,textoffset:null,textalign:null,textverticalalign:null,textdistance:5,textshadowcolor:"transparent",textshadowblur:0,textshadowoffsetx:0,textshadowoffsety:0,textboxshadowcolor:"transparent",textboxshadowblur:0,textboxshadowoffsetx:0,textboxshadowoffsety:0,transformtext:!1,textrotation:0,textorigin:null,textbackgroundcolor:null,textbordercolor:null,textborderwidth:0,textborderradius:0,textpadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){for(var n=this,o=i&&i.style,a=!o,r=0;r0},extendfrom:function(t,e){if(t)for(var i in t)!t.hasownproperty(i)||!0!==e&&(!1===e?this.hasownproperty(i):null==t[i])||(this[i]=t[i])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendfrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendfrom(this,!0),t},getgradient:function(t,e,i){for(var n=("radial"===e.type?le:se)(t,e,i),o=e.colorstops,a=0;a=0&&i.splice(n,1),t.__hovermir=null},clearhover:function(t){for(var e=this._hoverelements,i=0;i15)break}s.__drawindex=m,s.__drawindex0&&t>n[0]){for(r=0;rt);r++);a=i[n[r]]}if(n.splice(r+1,0,t),i[t]=e,!e.virtual)if(a){var l=a.dom;l.nextsibling?s.insertbefore(e.dom,l.nextsibling):s.appendchild(e.dom)}else s.firstchild?s.insertbefore(e.dom,s.firstchild):s.appendchild(e.dom)}else m_("layer of zlevel "+t+" is not valid")},eachlayer:function(t,e){var i,n,o=this._zlevellist;for(n=0;n0?.01:0),this._needsmanuallycompositing),a.__builtin__||m_("zlevel "+s+" has been used by unkown layer "+a.id),a!==i&&(a.__used=!0,a.__startindex!==o&&(a.__dirty=!0),a.__startindex=o,a.incremental?a.__drawindex=-1:a.__drawindex=o,e(o),i=a),r.__dirty&&(a.__dirty=!0,a.incremental&&a.__drawindex<0&&(a.__drawindex=o))}e(o),this.eachbuiltinlayer(function(t,e){!t.__used&&t.getelementcount()>0&&(t.__dirty=!0,t.__startindex=t.__endindex=t.__drawindex=0),t.__dirty&&t.__drawindex<0&&(t.__drawindex=t.__startindex)})},clear:function(){return this.eachbuiltinlayer(this._clearlayer),this},_clearlayer:function(t){t.clear()},setbackgroundcolor:function(t){this._backgroundcolor=t},configlayer:function(t,e){if(e){var i=this._layerconfig;i[t]?n(i[t],e,!0):i[t]=e;for(var o=0;o=0&&this._clips.splice(e,1)},removeanimator:function(t){for(var e=t.getclips(),i=0;i1&&n&&n.length>1){var a=di(n)/di(o);!isfinite(a)&&(a=1),e.pinchscale=a;var r=fi(n);return e.pinchx=r[0],e.pinchy=r[1],{type:"pinch",target:t[0].target,event:e}}}}},hw=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],cw=["touchstart","touchend","touchmove"],dw={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},fw=f(hw,function(t){var e=t.replace("mouse","pointer");return dw[e]?e:t}),pw={mousemove:function(t){t=li(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=li(this.dom,t)).toelement||t.relatedtarget;if(e!=this.dom)for(;e&&9!=e.nodetype;){if(e===this.dom)return;e=e.parentnode}this.trigger("mouseout",t)},touchstart:function(t){(t=li(this.dom,t)).zrbytouch=!0,this._lasttouchmoment=new date,gi(this,t,"start"),pw.mousemove.call(this,t),pw.mousedown.call(this,t),mi(this)},touchmove:function(t){(t=li(this.dom,t)).zrbytouch=!0,gi(this,t,"change"),pw.mousemove.call(this,t),mi(this)},touchend:function(t){(t=li(this.dom,t)).zrbytouch=!0,gi(this,t,"end"),pw.mouseup.call(this,t),+new date-this._lasttouchmoment<300&&pw.click.call(this,t),mi(this)},pointerdown:function(t){pw.mousedown.call(this,t)},pointermove:function(t){vi(t)||pw.mousemove.call(this,t)},pointerup:function(t){pw.mouseup.call(this,t)},pointerout:function(t){vi(t)||pw.mouseout.call(this,t)}};d(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){pw[t]=function(e){e=li(this.dom,e),this.trigger(t,e)}});var gw=xi.prototype;gw.dispose=function(){for(var t=hw.concat(cw),e=0;e=0||n&&l(n,r)<0)){var s=e.getshallow(r);null!=s&&(o[t[a][0]]=s)}}return o}},kw=lw([["linewidth","width"],["stroke","color"],["opacity"],["shadowblur"],["shadowoffsetx"],["shadowoffsety"],["shadowcolor"]]),pw={getlinestyle:function(t){var e=kw(this,t),i=this.getlinedash(e.linewidth);return i&&(e.linedash=i),e},getlinedash:function(t){null==t&&(t=1);var e=this.get("type"),i=math.max(t,2),n=4*t;return"solid"===e||null==e?null:"dashed"===e?[n,n]:[i,i]}},nw=lw([["fill","color"],["shadowblur"],["shadowoffsetx"],["shadowoffsety"],["opacity"],["shadowcolor"]]),ow={getareastyle:function(t,e){return nw(this,t,e)}},ew=math.pow,zw=math.sqrt,rw=1e-8,bw=1e-4,vw=zw(3),gw=1/3,fw=v(),ww=v(),hw=v(),zw=math.min,uw=math.max,jw=math.sin,xw=math.cos,yw=2*math.pi,qw=v(),$w=v(),kw=v(),jw=[],qw=[],tb={m:1,l:2,c:3,q:4,a:5,z:6,r:7},eb=[],ib=[],nb=[],ob=[],ab=math.min,rb=math.max,sb=math.cos,lb=math.sin,ub=math.sqrt,hb=math.abs,cb="undefined"!=typeof float32array,db=function(t){this._savedata=!t,this._savedata&&(this.data=[]),this._ctx=null};db.prototype={constructor:db,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_linedash:null,_dashoffset:0,_dashidx:0,_dashsum:0,setscale:function(t,e){this._ux=hb(1/b_/t)||0,this._uy=hb(1/b_/e)||0},getcontext:function(){return this._ctx},beginpath:function(t){return this._ctx=t,t&&t.beginpath(),t&&(this.dpr=t.dpr),this._savedata&&(this._len=0),this._linedash&&(this._linedash=null,this._dashoffset=0),this},moveto:function(t,e){return this.adddata(tb.m,t,e),this._ctx&&this._ctx.moveto(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineto:function(t,e){var i=hb(t-this._xi)>this._ux||hb(e-this._yi)>this._uy||this._len<5;return this.adddata(tb.l,t,e),this._ctx&&i&&(this._needsdash()?this._dashedlineto(t,e):this._ctx.lineto(t,e)),i&&(this._xi=t,this._yi=e),this},beziercurveto:function(t,e,i,n,o,a){return this.adddata(tb.c,t,e,i,n,o,a),this._ctx&&(this._needsdash()?this._dashedbezierto(t,e,i,n,o,a):this._ctx.beziercurveto(t,e,i,n,o,a)),this._xi=o,this._yi=a,this},quadraticcurveto:function(t,e,i,n){return this.adddata(tb.q,t,e,i,n),this._ctx&&(this._needsdash()?this._dashedquadraticto(t,e,i,n):this._ctx.quadraticcurveto(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,o,a){return this.adddata(tb.a,t,e,i,i,n,o-n,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,n,o,a),this._xi=sb(o)*i+t,this._yi=lb(o)*i+t,this},arcto:function(t,e,i,n,o){return this._ctx&&this._ctx.arcto(t,e,i,n,o),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.adddata(tb.r,t,e,i,n),this},closepath:function(){this.adddata(tb.z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsdash()&&this._dashedlineto(e,i),t.closepath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.tostatic()},stroke:function(t){t&&t.stroke(),this.tostatic()},setlinedash:function(t){if(t instanceof array){this._linedash=t,this._dashidx=0;for(var e=0,i=0;ie.length&&(this._expanddata(),e=this.data);for(var i=0;i0&&f<=t||h<0&&f>=t||0==h&&(c>0&&p<=e||c<0&&p>=e);)f+=h*(i=r[n=this._dashidx]),p+=c*i,this._dashidx=(n+1)%g,h>0&&fl||c>0&&pu||s[n%2?"moveto":"lineto"](h>=0?ab(f,t):rb(f,t),c>=0?ab(p,e):rb(p,e));h=f-t,c=p-e,this._dashoffset=-ub(h*h+c*c)},_dashedbezierto:function(t,e,i,n,o,a){var r,s,l,u,h,c=this._dashsum,d=this._dashoffset,f=this._linedash,p=this._ctx,g=this._xi,m=this._yi,v=xi,y=0,x=this._dashidx,_=f.length,w=0;for(d<0&&(d=c+d),d%=c,r=0;r<1;r+=.1)s=v(g,t,i,o,r+.1)-v(g,t,i,o,r),l=v(m,e,n,a,r+.1)-v(m,e,n,a,r),y+=ub(s*s+l*l);for(;x<_&&!((w+=f[x])>d);x++);for(r=(w-d)/y;r<=1;)u=v(g,t,i,o,r),h=v(m,e,n,a,r),x%2?p.moveto(u,h):p.lineto(u,h),r+=f[x]/y,x=(x+1)%_;x%2!=0&&p.lineto(o,a),s=o-u,l=a-h,this._dashoffset=-ub(s*s+l*l)},_dashedquadraticto:function(t,e,i,n){var o=i,a=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedbezierto(t,e,i,n,o,a)},tostatic:function(){var t=this.data;t instanceof array&&(t.length=this._len,cb&&(this.data=new float32array(t)))},getboundingrect:function(){eb[0]=eb[1]=nb[0]=nb[1]=number.max_value,ib[0]=ib[1]=ob[0]=ob[1]=-number.max_value;for(var t=this.data,e=0,i=0,n=0,o=0,a=0;al||hb(r-o)>u||c===h-1)&&(t.lineto(a,r),n=a,o=r);break;case tb.c:t.beziercurveto(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case tb.q:t.quadraticcurveto(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case tb.a:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=g>m?g:m,b=g>m?1:g/m,s=g>m?m/g:1,m=v+y;math.abs(g-m)>.001?(t.translate(f,p),t.rotate(x),t.scale(b,s),t.arc(0,0,w,v,m,1-_),t.scale(1/b,1/s),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,w,v,m,1-_),1==c&&(e=sb(v)*g+f,i=lb(v)*m+p),n=sb(m)*g+f,o=lb(m)*m+p;break;case tb.r:e=n=s[c],i=o=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case tb.z:t.closepath(),n=e,o=i}}}},db.cmd=tb;var fb=2*math.pi,pb=2*math.pi,gb=db.cmd,mb=2*math.pi,vb=1e-4,yb=[-1,-1,-1],xb=[-1,-1],_b=f_.prototype.getcanvaspattern,wb=math.abs,bb=new db(!0);in.prototype={constructor:in,type:"path",__dirtypath:!0,strokecontainthreshold:5,brush:function(t,e){var i=this.style,n=this.path||bb,o=i.hasstroke(),a=i.hasfill(),r=i.fill,s=i.stroke,l=a&&!!r.colorstops,u=o&&!!s.colorstops,h=a&&!!r.image,c=o&&!!s.image;if(i.bind(t,this,e),this.settransform(t),this.__dirty){var d;l&&(d=d||this.getboundingrect(),this._fillgradient=i.getgradient(t,r,d)),u&&(d=d||this.getboundingrect(),this._strokegradient=i.getgradient(t,s,d))}l?t.fillstyle=this._fillgradient:h&&(t.fillstyle=_b.call(r,t)),u?t.strokestyle=this._strokegradient:c&&(t.strokestyle=_b.call(s,t));var f=i.linedash,p=i.linedashoffset,g=!!t.setlinedash,m=this.getglobalscale();n.setscale(m[0],m[1]),this.__dirtypath||f&&!g&&o?(n.beginpath(t),f&&!g&&(n.setlinedash(f),n.setlinedashoffset(p)),this.buildpath(n,this.shape,!1),this.path&&(this.__dirtypath=!1)):(t.beginpath(),this.path.rebuildpath(t)),a&&n.fill(t),f&&g&&(t.setlinedash(f),t.linedashoffset=p),o&&n.stroke(t),f&&g&&t.setlinedash([]),null!=i.text&&(this.restoretransform(t),this.drawrecttext(t,this.getboundingrect()))},buildpath:function(t,e,i){},createpathproxy:function(){this.path=new db},getboundingrect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new db),this.__dirtypath&&(n.beginpath(),this.buildpath(n,this.shape,!1)),t=n.getboundingrect()}if(this._rect=t,e.hasstroke()){var o=this._rectwithstroke||(this._rectwithstroke=t.clone());if(this.__dirty||i){o.copy(t);var a=e.linewidth,r=e.strokenoscale?this.getlinescale():1;e.hasfill()||(a=math.max(a,this.strokecontainthreshold||4)),r>1e-10&&(o.width+=a/r,o.height+=a/r,o.x-=a/r/2,o.y-=a/r/2)}return o}return t},contain:function(t,e){var i=this.transformcoordtolocal(t,e),n=this.getboundingrect(),o=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var a=this.path.data;if(o.hasstroke()){var r=o.linewidth,s=o.strokenoscale?this.getlinescale():1;if(s>1e-10&&(o.hasfill()||(r=math.max(r,this.strokecontainthreshold)),mn(a,r/s,t,e)))return!0}if(o.hasfill())return sn(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtypath=t,this._rect=null),this.__dirty=!0,this.__zr&&this.__zr.refresh(),this.__cliptarget&&this.__cliptarget.dirty()},animateshape:function(t){return this.animate("shape",t)},attrkv:function(t,e){"shape"===t?(this.setshape(e),this.__dirtypath=!0,this._rect=null):ke.prototype.attrkv.call(this,t,e)},setshape:function(t,e){var i=this.shape;if(i){if(w(t))for(var n in t)t.hasownproperty(n)&&(i[n]=t[n]);else i[t]=e;this.dirty(!0)}return this},getlinescale:function(){var t=this.transform;return t&&wb(t[0]-1)>1e-10&&wb(t[3]-1)>1e-10?math.sqrt(wb(t[0]*t[3]-t[2]*t[1])):1}},in.extend=function(t){var e=function(e){in.call(this,e),t.style&&this.style.extendfrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var o in i)!n.hasownproperty(o)&&i.hasownproperty(o)&&(n[o]=i[o])}t.init&&t.init.call(this,e)};u(e,in);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},u(in,ke);var sb=db.cmd,mb=[[],[],[]],ib=math.sqrt,db=math.atan2,tb=function(t,e){var i,n,o,a,r,s,l=t.data,u=sb.m,h=sb.c,c=sb.l,d=sb.r,f=sb.a,p=sb.q;for(o=0,a=0;o=11?function(){var e,i=this.__clippaths,n=this.style;if(i)for(var o=0;oi-2?i-1:c+1],u=t[c>i-3?i-1:c+2]);var p=d*d,g=d*p;n.push([kn(s[0],f[0],l[0],u[0],d,p,g),kn(s[1],f[1],l[1],u[1],d,p,g)])}return n},hb=function(t,e,i,n){var o,a,r,s,l=[],u=[],h=[],c=[];if(n){r=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;d=i&&a>=o)return{x:i,y:o,width:n-i,height:a-o}},createicon:_o,group:l_,image:je,text:zb,circle:rb,sector:gb,ring:fb,polygon:zb,polyline:ub,rect:jb,line:xb,beziercurve:qb,arc:$b,incrementaldisplayable:on,compoundpath:kb,lineargradient:qb,radialgradient:ts,boundingrect:kt}),ls=["textstyle","color"],us={gettextcolor:function(t){var e=this.ecmodel;return this.getshallow("color")||(!t&&e?e.get(ls):null)},getfont:function(){return ho({fontstyle:this.getshallow("fontstyle"),fontweight:this.getshallow("fontweight"),fontsize:this.getshallow("fontsize"),fontfamily:this.getshallow("fontfamily")},this.ecmodel)},gettextrect:function(t){return me(t,this.getfont(),this.getshallow("align"),this.getshallow("verticalalign")||this.getshallow("baseline"),this.getshallow("padding"),this.getshallow("rich"),this.getshallow("truncatetext"))}},hs=lw([["fill","color"],["stroke","bordercolor"],["linewidth","borderwidth"],["opacity"],["shadowblur"],["shadowoffsetx"],["shadowoffsety"],["shadowcolor"],["textposition"],["textalign"]]),cs={getitemstyle:function(t,e){var i=hs(this,t,e),n=this.getborderlinedash();return n&&(i.linedash=n),i},getborderlinedash:function(){var t=this.get("bordertype");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},ds=h,fs=ni();wo.prototype={constructor:wo,init:null,mergeoption:function(t){n(this.option,t,!0)},get:function(t,e){return null==t?this.option:bo(this.option,this.parsepath(t),!e&&so(this,t))},getshallow:function(t,e){var i=this.option,n=null==i?i:i[t],o=!e&&so(this,t);return null==n&&o&&(n=o.getshallow(t)),n},getmodel:function(t,e){var i,n=null==t?this.option:bo(this.option,t=this.parsepath(t));return e=e||(i=so(this,t))&&i.getmodel(t),new wo(n,e,this.ecmodel)},isempty:function(){return null==this.option},restoredata:function(){},clone:function(){return new(0,this.constructor)(i(this.option))},setreadonly:function(t){},parsepath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizegetparent:function(t){fs(this).getparent=t},isanimationenabled:function(){if(!ax.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentmodel)return this.parentmodel.isanimationenabled()}}},gi(wo),fi(wo),ds(wo,pw),ds(wo,ow),ds(wo,us),ds(wo,cs);var ps=0,gs=1e-4,ms=9007199254740991,vs=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[t ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/,ys=(object.freeze||object)({linearmap:do,parsepercent:to,round:ao,asc:co,getprecision:lo,getprecisionsafe:ko,getpixelprecision:po,getpercentwithprecision:no,max_safe_integer:ms,remradian:oo,isradianaroundzero:eo,parsedate:zo,quantity:ro,nice:vo,reformintervals:go,isnumeric:fo}),xs=l,_s=["a","b","c","d","e","f","g"],ws=function(t,e){return"{"+t+(null==e?"":e)+"}"},bs=be,ss=me,ms=(object.freeze||object)({addcommas:wo,tocamelcase:ho,normalizecssarray:xs,encodehtml:zo,formattpl:uo,formattplsimple:jo,gettooltipmarker:xo,formattime:qo,capitalfirst:$o,truncatetext:bs,gettextrect:ss}),is=d,ds=["left","right","top","bottom","width","height"],ts=[["width","left","right"],["height","top","bottom"]],as=ko,cs=(v(ko,"vertical"),v(ko,"horizontal"),{getboxlayoutparams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}),ls=ni(),ks=wo.extend({type:"component",id:"",name:"",maintype:"",subtype:"",componentindex:0,defaultoption:null,ecmodel:null,dependentmodels:[],uid:null,layoutmode:null,$constructor:function(t,e,i,n){wo.call(this,t,e,i,n),this.uid=mo("ec_cpt_model")},init:function(t,e,i,n){this.mergedefaultandtheme(t,i)},mergedefaultandtheme:function(t,e){var i=this.layoutmode,o=i?na(t):{};n(t,e.gettheme().get(this.maintype)),n(t,this.getdefaultoption()),i&&ia(t,o,i)},mergeoption:function(t,e){n(this.option,t,!0);var i=this.layoutmode;i&&ia(this.option,t,i)},optionupdated:function(t,e){},getdefaultoption:function(){var t=ls(this);if(!t.defaultoption){for(var e=[],i=this.constructor;i;){var o=i.prototype.defaultoption;o&&e.push(o),i=i.superclass}for(var a={},r=e.length-1;r>=0;r--)a=n(a,e[r],!0);t.defaultoption=a}return t.defaultoption},getreferringcomponents:function(t){return this.ecmodel.querycomponents({maintype:t,index:this.get(t+"index",!0),id:this.get(t+"id",!0)})}});zi(ks,{registerwhenextend:!0}),function(t){var e={};t.registersubtypedefaulter=function(t,i){t=bi(t),e[t.main]=i},t.determinesubtype=function(i,n){var o=n.type;if(!o){var a=bi(i).main;t.hassubtypes(i)&&e[a]&&(o=e[a](n))}return o}}(ks),function(t,e){function i(t){var i={},a=[];return d(t,function(r){var s=n(i,r),u=o(s.originaldeps=e(r),t);s.entrycount=u.length,0===s.entrycount&&a.push(r),d(u,function(t){l(s.predecessor,t)<0&&s.predecessor.push(t);var e=n(i,t);l(e.successor,t)<0&&e.successor.push(r)})}),{graph:i,noentrylist:a}}function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}function o(t,e){var i=[];return d(t,function(t){l(e,t)>=0&&i.push(t)}),i}t.topologicaltravel=function(t,e,n,o){function a(t){s[t].entrycount--,0===s[t].entrycount&&l.push(t)}if(t.length){var r=i(e),s=r.graph,l=r.noentrylist,u={};for(d(t,function(t){u[t]=!0});l.length;){var h=l.pop(),c=s[h],f=!!u[h];f&&(n.call(o,h,c.originaldeps.slice()),delete u[h]),d(c.successor,f?function(t){u[t]=!0,a(t)}:a)}d(u,function(){throw new error("circle dependency may exists")})}}}(ks,function(t){var e=[];return d(ks.getclassesbymaintype(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=f(e,function(t){return bi(t).main}),"dataset"!==t&&l(e,"dataset")<=0&&e.unshift("dataset"),e}),h(ks,cs);var ps="";"undefined"!=typeof navigator&&(ps=navigator.platform||"");var ns={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientcolor:["#f6efa6","#d88273","#bf444c"],textstyle:{fontfamily:ps.match(/^win/)?"microsoft yahei":"sans-serif",fontsize:12,fontstyle:"normal",fontweight:"normal"},blendmode:null,animation:"auto",animationduration:1e3,animationdurationupdate:300,animationeasing:"exponentialout",animationeasingupdate:"cubicout",animationthreshold:2e3,progressivethreshold:3e3,progressive:400,hoverlayerthreshold:3e3,useutc:!1},os=ni(),es={clearcolorpalette:function(){os(this).coloridx=0,os(this).colornamemap={}},getcolorfrompalette:function(t,e,i){var n=os(e=e||this),o=n.coloridx||0,a=n.colornamemap=n.colornamemap||{};if(a.hasownproperty(t))return a[t];var r=si(this.get("color",!0)),s=this.get("colorlayer",!0),l=null!=i&&s?aa(s,i):r;if((l=l||r)&&l.length){var u=l[o];return t&&(a[t]=u),n.coloridx=(o+1)%l.length,u}}},zs={cartesian2d:function(t,e,i,n){var o=t.getreferringcomponents("xaxis")[0],a=t.getreferringcomponents("yaxis")[0];e.coordsysdims=["x","y"],i.set("x",o),i.set("y",a),sa(o)&&(n.set("x",o),e.firstcategorydimindex=0),sa(a)&&(n.set("y",a),e.firstcategorydimindex=1)},singleaxis:function(t,e,i,n){var o=t.getreferringcomponents("singleaxis")[0];e.coordsysdims=["single"],i.set("single",o),sa(o)&&(n.set("single",o),e.firstcategorydimindex=0)},polar:function(t,e,i,n){var o=t.getreferringcomponents("polar")[0],a=o.findaxismodel("radiusaxis"),r=o.findaxismodel("angleaxis");e.coordsysdims=["radius","angle"],i.set("radius",a),i.set("angle",r),sa(a)&&(n.set("radius",a),e.firstcategorydimindex=0),sa(r)&&(n.set("angle",r),e.firstcategorydimindex=1)},geo:function(t,e,i,n){e.coordsysdims=["lng","lat"]},parallel:function(t,e,i,n){var o=t.ecmodel,a=o.getcomponent("parallel",t.get("parallelindex")),r=e.coordsysdims=a.dimensions.slice();d(a.parallelaxisindex,function(t,a){var s=o.getcomponent("parallelaxis",t),l=r[a];i.set(l,s),sa(s)&&null==e.firstcategorydimindex&&(n.set(l,s),e.firstcategorydimindex=a)})}},rs="original",bs="arrayrows",vs="objectrows",gs="keyedcolumns",fs="unknown",ws="typedarray",hs="column",zs="row";la.seriesdatatosource=function(t){return new la({data:t,sourceformat:s(t)?ws:rs,fromdataset:!1})},fi(la);var us=ni(),js="\0_ec_inner",xs=wo.extend({constructor:xs,init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new wo(i),this._optionmanager=n},setoption:function(t,e){k(!(js in t),"please use chart.getoption()"),this._optionmanager.setoption(t,e),this.resetoption(null)},resetoption:function(t){var e=!1,i=this._optionmanager;if(!t||"recreate"===t){var n=i.mountoption("recreate"===t);this.option&&"recreate"!==t?(this.restoredata(),this.mergeoption(n)):sa.call(this,n),e=!0}if("timeline"!==t&&"media"!==t||this.restoredata(),!t||"recreate"===t||"timeline"===t){var o=i.gettimelineoption(this);o&&(this.mergeoption(o),e=!0)}if(!t||"recreate"===t||"media"===t){var a=i.getmediaoption(this,this._api);a.length&&d(a,function(t){this.mergeoption(t,e=!0)},this)}return e},mergeoption:function(t){var e=this.option,o=this._componentsmap,r=[];ca(this),d(t,function(t,o){null!=t&&(ks.hasclass(o)?o&&r.push(o):e[o]=null==e[o]?i(t):n(e[o],t,!0))}),ks.topologicaltravel(r,ks.getallclassmaintypes(),function(i,n){var r=si(t[i]),s=ti(o.get(i),r);ai(s),d(s,function(t,e){var n=t.option;w(n)&&(t.keyinfo.maintype=i,t.keyinfo.subtype=ia(i,n,t.exist))});var l=ma(o,n);e[i]=[],o.set(i,[]),d(s,function(t,n){var r=t.exist,s=t.option;if(k(w(s)||r,"empty component definition"),s){var u=ks.getclass(i,t.keyinfo.subtype,!0);if(r&&r instanceof u)r.name=t.keyinfo.name,r.mergeoption(s,this),r.optionupdated(s,!1);else{var h=a({dependentmodels:l,componentindex:n},t.keyinfo);a(r=new u(s,this,this,h),h),r.init(s,this,this,h),r.optionupdated(null,!0)}}else r.mergeoption({},this),r.optionupdated({},!1);o.get(i)[n]=r,e[i][n]=r.option},this),"series"===i&&da(this,o.get("series"))},this),this._seriesindicesmap=z(this._seriesindices=this._seriesindices||[])},getoption:function(){var t=i(this.option);return d(t,function(e,i){if(ks.hasclass(i)){for(var n=(e=si(e)).length-1;n>=0;n--)li(e[n])&&e.splice(n,1);t[i]=e}}),delete t[js],t},gettheme:function(){return this._theme},getcomponent:function(t,e){var i=this._componentsmap.get(t);if(i)return i[e||0]},querycomponents:function(t){var e=t.maintype;if(!e)return[];var i=t.index,n=t.id,o=t.name,a=this._componentsmap.get(e);if(!a||!a.length)return[];var r;if(null!=i)y(i)||(i=[i]),r=g(f(i,function(t){return a[t]}),function(t){return!!t});else if(null!=n){var s=y(n);r=g(a,function(t){return s&&l(n,t.id)>=0||!s&&t.id===n})}else if(null!=o){var u=y(o);r=g(a,function(t){return u&&l(o,t.name)>=0||!u&&t.name===o})}else r=a.slice();return ta(r,t)},findcomponents:function(t){var e=t.query,i=t.maintype,n=function(t){var e=i+"index",n=i+"id",o=i+"name";return!t||null==t[e]&&null==t[n]&&null==t[o]?null:{maintype:i,index:t[e],id:t[n],name:t[o]}}(e);return function(e){return t.filter?g(e,t.filter):e}(ta(n?this.querycomponents(n):this._componentsmap.get(i),t))},eachcomponent:function(t,e,i){var n=this._componentsmap;"function"==typeof t?(i=e,e=t,n.each(function(t,n){d(t,function(t,o){e.call(i,n,t,o)})})):_(t)?d(n.get(t),e,i):w(t)&&d(this.findcomponents(t),e,i)},getseriesbyname:function(t){return g(this._componentsmap.get("series"),function(e){return e.name===t})},getseriesbyindex:function(t){return this._componentsmap.get("series")[t]},getseriesbytype:function(t){return g(this._componentsmap.get("series"),function(e){return e.subtype===t})},getseries:function(){return this._componentsmap.get("series").slice()},getseriescount:function(){return this._componentsmap.get("series").length},eachseries:function(t,e){d(this._seriesindices,function(i){var n=this._componentsmap.get("series")[i];t.call(e,n,i)},this)},eachrawseries:function(t,e){d(this._componentsmap.get("series"),t,e)},eachseriesbytype:function(t,e,i){d(this._seriesindices,function(n){var o=this._componentsmap.get("series")[n];o.subtype===t&&e.call(i,o,n)},this)},eachrawseriesbytype:function(t,e,i){return d(this.getseriesbytype(t),e,i)},isseriesfiltered:function(t){return null==this._seriesindicesmap.get(t.componentindex)},getcurrentseriesindices:function(){return(this._seriesindices||[]).slice()},filterseries:function(t,e){da(this,g(this._componentsmap.get("series"),t,e))},restoredata:function(t){var e=this._componentsmap;da(this,e.get("series"));var i=[];e.each(function(t,e){i.push(e)}),ks.topologicaltravel(i,ks.getallclassmaintypes(),function(i,n){d(e.get(i),function(e){("series"!==i||!wa(e,t))&&e.restoredata()})})}});h(xs,es);var ys=["getdom","getzr","getwidth","getheight","getdevicepixelratio","dispatchaction","isdisposed","on","off","getdataurl","getconnecteddataurl","getmodel","getoption","getviewofcomponentmodel","getviewofseriesmodel"],qs={};ca.prototype={constructor:ca,create:function(t,e){var i=[];d(qs,function(n,o){var a=n.create(t,e);i=i.concat(a||[])}),this._coordinatesystems=i},update:function(t,e){d(this._coordinatesystems,function(i){i.update&&i.update(t,e)})},getcoordinatesystems:function(){return this._coordinatesystems.slice()}},ca.register=function(t,e){qs[t]=e},ca.get=function(t){return qs[t]};var $s=d,ks=i,js=f,qs=n,tm=/^(min|max)?(.+)$/;la.prototype={constructor:la,setoption:function(t,e){t&&d(si(t.series),function(t){t&&t.data&&s(t.data)&&n(t.data)}),t=ks(t,!0);var i=this._optionbackup,n=ka.call(this,t,e,!i);this._newbaseoption=n.baseoption,i?(ea(i.baseoption,n.baseoption),n.timelineoptions.length&&(i.timelineoptions=n.timelineoptions),n.medialist.length&&(i.medialist=n.medialist),n.mediadefault&&(i.mediadefault=n.mediadefault)):this._optionbackup=n},mountoption:function(t){var e=this._optionbackup;return this._timelineoptions=js(e.timelineoptions,ks),this._medialist=js(e.medialist,ks),this._mediadefault=ks(e.mediadefault),this._currentmediaindices=[],ks(t?e.baseoption:this._newbaseoption)},gettimelineoption:function(t){var e,i=this._timelineoptions;if(i.length){var n=t.getcomponent("timeline");n&&(e=ks(i[n.getcurrentindex()],!0))}return e},getmediaoption:function(t){var e=this._api.getwidth(),i=this._api.getheight(),n=this._medialist,o=this._mediadefault,a=[],r=[];if(!n.length&&!o)return r;for(var s=0,l=n.length;s1||l&&!r?function(i){function n(t,i){var n=o.getdimensioninfo(i);if(n&&!1!==n.otherdims.tooltip){var a=n.type,l=xo({color:u,type:"subitem"}),h=(r?l+zo(n.displayname||"-")+": ":"")+zo("ordinal"===a?t+"":"time"===a?e?"":qo("yyyy/mm/dd hh:mm:ss",t):wo(t));h&&s.push(h)}}var r=p(i,function(t,e,i){var n=o.getdimensioninfo(i);return t|=n&&!1!==n.tooltip&&null!=n.displayname},0),s=[];return a.length?d(a,function(e){n(er(o,t,e),e)}):d(i,n),(r?"
":"")+s.join(r?"
":", ")}(s):n(r?er(o,t,a[0]):l?s[0]:s),c=xo(u),f=o.getname(t),g=this.name;return ci(this)||(g=""),g=g?zo(g)+(e?": ":"
"):"",e?c+g+h:g+c+(f?zo(f)+": "+h:h)},isanimationenabled:function(){if(ax.node)return!1;var t=this.getshallow("animation");return t&&this.getdata().count()>this.getshallow("animationthreshold")&&(t=!1),t},restoredata:function(){this.datatask.dirty()},getcolorfrompalette:function(t,e,i){var n=this.ecmodel,o=es.getcolorfrompalette.call(this,t,e,i);return o||(o=n.getcolorfrompalette(t,e,i)),o},coorddimtodatadim:function(t){return this.getrawdata().mapdimension(t,!0)},getprogressive:function(){return this.get("progressive")},getprogressivethreshold:function(){return this.get("progressivethreshold")},getaxistooltipdata:null,gettooltipposition:null,pipetask:null,preventincremental:null,pipelinecontext:null});h(mm,fm),h(mm,es);var vm=function(){this.group=new l_,this.uid=mo("viewcomponent")};vm.prototype={constructor:vm,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){}};var ym=vm.prototype;ym.updateview=ym.updatelayout=ym.updatevisual=function(t,e,i,n){},gi(vm),zi(vm,{registerwhenextend:!0});var xm=function(){var t=ni();return function(e){var i=t(e),n=e.pipelinecontext,o=i.large,a=i.canprogressiverender,r=i.large=n.large,s=i.canprogressiverender=n.canprogressiverender;return!!(o^r||a^s)&&"reset"}},_m=ni(),wm=xm();pr.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){mr(t.getdata(),n,"emphasis")},downplay:function(t,e,i,n){mr(t.getdata(),n,"normal")},remove:function(t,e){this.group.removeall()},dispose:function(){},incrementalpreparerender:null,incrementalrender:null,updatetransform:null};var bm=pr.prototype;bm.updateview=bm.updatelayout=bm.updatevisual=function(t,e,i,n){this.render(t,e,i,n)},gi(pr),zi(pr,{registerwhenextend:!0}),pr.markupdatemethod=function(t,e){_m(t).updatemethod=e};var sm={incrementalpreparerender:{progress:function(t,e){e.view.incrementalrender(t,e.model,e.ecmodel,e.api,e.payload)}},render:{forcefirstprogress:!0,progress:function(t,e){e.view.render(e.model,e.ecmodel,e.api,e.payload)}}},mm="\0__throttleoriginmethod",im="\0__throttlerate",dm="\0__throttletype",tm={createonallseries:!0,performrawseries:!0,reset:function(t,e){var i=t.getdata(),n=(t.visualcoloraccesspath||"itemstyle.color").split("."),o=t.get(n)||t.getcolorfrompalette(t.name,null,e.getseriescount());if(i.setvisual("color",o),!e.isseriesfiltered(t)){"function"!=typeof o||o instanceof jb||i.each(function(e){i.setitemvisual(e,"color",o(t.getdataparams(e)))});return{dataeach:i.hasitemoption?function(t,e){var i=t.getitemmodel(e).get(n,!0);null!=i&&t.setitemvisual(e,"color",i)}:null}}}},am={toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",linex:"横向选择",liney:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataview:{title:"数据视图",lang:["数据视图","关闭","刷新"]},datazoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magictype:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveasimage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typenames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectscatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"k线图",k:"k线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialbar:"象形柱图",themeriver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withtitle:"这是一个关于“{title}”的图表。",withouttitle:"这是一个图表,"},series:{single:{prefix:"",withname:"图表类型是{seriestype},表示{seriesname}。",withoutname:"图表类型是{seriestype}。"},multiple:{prefix:"它由{seriescount}个图表系列组成。",withname:"第{seriesid}个系列是一个表示{seriesname}的{seriestype},",withoutname:"第{seriesid}个系列是一个{seriestype},",separator:{middle:";",end:"。"}}},data:{alldata:"其数据是——",partialdata:"其中,前{displaycnt}项是——",withname:"{name}的数据是{value}",withoutname:"{value}",separator:{middle:",",end:""}}}},cm=function(t,e){function i(t,e){if("string"!=typeof t)return t;var i=t;return d(e,function(t,e){i=i.replace(new regexp("\\{\\s*"+e+"\\s*\\}","g"),t)}),i}function n(t){var e=a.get(t);if(null==e){for(var i=t.split("."),n=am.aria,o=0;o1?"series.multiple.prefix":"series.single.prefix"),{seriescount:r}),e.eachseries(function(t,e){if(e1?"multiple":"single")+".";a=i(a=n(s?u+"withname":u+"withoutname"),{seriesid:t.seriesindex,seriesname:t.get("name"),seriestype:o(t.subtype)});var c=t.getdata();window.data=c,c.count()>l?a+=i(n("data.partialdata"),{displaycnt:l}):a+=n("data.alldata");for(var d=[],p=0;pi.bockindex?i.step:null}}},km.getpipeline=function(t){return this._pipelinemap.get(t)},km.updatestreammodes=function(t,e){var i=this._pipelinemap.get(t.uid),n=t.getdata().count(),o=i.progressiveenabled&&e.incrementalpreparerender&&n>=i.threshold,a=t.get("large")&&n>=t.get("largethreshold");t.pipelinecontext=i.context={canprogressiverender:o,large:a}},km.restorepipelines=function(t){var e=this,i=e._pipelinemap=z();t.eachseries(function(t){var n=t.getprogressive(),o=t.uid;i.set(o,{id:o,head:null,tail:null,threshold:t.getprogressivethreshold(),progressiveenabled:n&&!(t.preventincremental&&t.preventincremental()),bockindex:-1,step:n||700,count:0}),or(e,t,t.datatask)})},km.preparestagetasks=function(){var t=this._stagetaskmap,e=this.ecinstance.getmodel(),i=this.api;d([this._dataprocessorhandlers,this._visualhandlers],function(n){d(n,function(n){var o=t.get(n.uid)||t.set(n.uid,[]);n.reset&&mr(this,n,o,e,i),n.overallreset&&ir(this,n,o,e,i)},this)},this)},km.prepareview=function(t,e,i,n){var o=t.rendertask,a=o.context;a.model=e,a.ecmodel=i,a.api=n,o.__block=!t.incrementalpreparerender,or(this,e,o)},km.performdataprocessortasks=function(t,e){sr(this,this._dataprocessorhandlers,t,e,{block:!0})},km.performvisualtasks=function(t,e,i){sr(this,this._visualhandlers,t,e,i)},km.performseriestasks=function(t){var e;t.eachseries(function(t){e|=t.datatask.perform()}),this.unfinished|=e},km.plan=function(){this._pipelinemap.each(function(t){var e=t.tail;do{if(e.__block){t.bockindex=e.__idxinpipeline;break}e=e.getupstream()}while(e)})};var pm=km.updatepayload=function(t,e){"remain"!==e&&(t.context.payload=e)};br.wrapstagehandler=function(t,e){return x(t)&&(t={overallreset:t,seriestype:er(t)}),t.uid=mo("stagehandler"),e&&(t.visualtype=e),t};var nm,om={},em={};zr(om,xs),zr(em,aa),om.eachseriesbytype=om.eachrawseriesbytype=function(t){nm=t},om.eachcomponent=function(t){"series"===t.maintype&&t.subtype&&(nm=t.subtype)};var zm=["#37a2da","#32c5e9","#67e0e3","#9fe6b8","#ffdb5c","#ff9f7f","#fb7293","#e062ae","#e690d1","#e7bcf3","#9d96f5","#8378ea","#96bfff"],rm={color:zm,colorlayer:[["#37a2da","#ffd85c","#fd7b5f"],["#37a2da","#67e0e3","#ffdb5c","#ff9f7f","#e062ae","#9d96f5"],["#37a2da","#32c5e9","#9fe6b8","#ffdb5c","#ff9f7f","#fb7293","#e7bcf3","#8378ea","#96bfff"],zm]},bm=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],vm={color:bm,backgroundcolor:"#333",tooltip:{axispointer:{linestyle:{color:"#eee"},crossstyle:{color:"#eee"}}},legend:{textstyle:{color:"#eee"}},textstyle:{color:"#eee"},title:{textstyle:{color:"#eee"}},toolbox:{iconstyle:{normal:{bordercolor:"#eee"}}},datazoom:{textstyle:{color:"#eee"}},visualmap:{textstyle:{color:"#eee"}},timeline:{linestyle:{color:"#eee"},itemstyle:{normal:{color:bm[1]}},label:{normal:{textstyle:{color:"#eee"}}},controlstyle:{normal:{color:"#eee",bordercolor:"#eee"}}},timeaxis:{axisline:{linestyle:{color:"#eee"}},axistick:{linestyle:{color:"#eee"}},axislabel:{textstyle:{color:"#eee"}},splitline:{linestyle:{type:"dashed",color:"#aaa"}},splitarea:{areastyle:{color:"#eee"}}},logaxis:{axisline:{linestyle:{color:"#eee"}},axistick:{linestyle:{color:"#eee"}},axislabel:{textstyle:{color:"#eee"}},splitline:{linestyle:{type:"dashed",color:"#aaa"}},splitarea:{areastyle:{color:"#eee"}}},valueaxis:{axisline:{linestyle:{color:"#eee"}},axistick:{linestyle:{color:"#eee"}},axislabel:{textstyle:{color:"#eee"}},splitline:{linestyle:{type:"dashed",color:"#aaa"}},splitarea:{areastyle:{color:"#eee"}}},categoryaxis:{axisline:{linestyle:{color:"#eee"}},axistick:{linestyle:{color:"#eee"}},axislabel:{textstyle:{color:"#eee"}},splitline:{linestyle:{type:"dashed",color:"#aaa"}},splitarea:{areastyle:{color:"#eee"}}},line:{symbol:"circle"},graph:{color:bm},gauge:{title:{textstyle:{color:"#eee"}}},candlestick:{itemstyle:{normal:{color:"#fd1050",color0:"#0cf49b",bordercolor:"#fd1050",bordercolor0:"#0cf49b"}}}};vm.categoryaxis.splitline.show=!1;var gm=k,fm=d,wm=x,hm=w,zm=ks.parseclasstype,um={zrender:"4.0.3"},jm=1e3,xm=1e3,ym=3e3,qm={processor:{filter:jm,statistic:5e3},visual:{layout:xm,global:2e3,chart:ym,component:4e3,brush:5e3}},$m="__flaginmainprocess",km="__optionupdated",jm=/^[a-za-z0-9_]+$/;br.prototype.on=rr("on"),br.prototype.off=rr("off"),br.prototype.one=rr("one"),h(br,$x);var qm=vr.prototype;qm._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[km]){var e=this[km].silent;this[$m]=!0,fr(this),ti.update.call(this),this[$m]=!1,this[km]=!1,ur.call(this,e),jr.call(this,e)}else if(t.unfinished){var i=1,n=this._model;this._api;t.unfinished=!1;do{var o=+new date;t.performseriestasks(n),t.performdataprocessortasks(n),hr(this,n),t.performvisualtasks(n),jr(this,this._model,0,"remain"),i-=+new date-o}while(i>0&&t.unfinished);t.unfinished||this._zr.flush()}}},qm.getdom=function(){return this._dom},qm.getzr=function(){return this._zr},qm.setoption=function(t,e,i){var n;if(hm(e)&&(i=e.lazyupdate,n=e.silent,e=e.notmerge),this[$m]=!0,!this._model||e){var o=new la(this._api),a=this._theme,r=this._model=new xs(null,null,a,o);r.scheduler=this._scheduler,r.init(null,null,a,o)}this._model.setoption(t,ai),i?(this[km]={silent:n},this[$m]=!1):(fr(this),ti.update.call(this),this._zr.flush(),this[km]=!1,this[$m]=!1,ur.call(this,n),jr.call(this,n))},qm.settheme=function(){console.log("echarts#settheme() is deprecated in echarts 3.0")},qm.getmodel=function(){return this._model},qm.getoption=function(){return this._model&&this._model.getoption()},qm.getwidth=function(){return this._zr.getwidth()},qm.getheight=function(){return this._zr.getheight()},qm.getdevicepixelratio=function(){return this._zr.painter.dpr||window.devicepixelratio||1},qm.getrenderedcanvas=function(t){if(ax.canvassupported)return(t=t||{}).pixelratio=t.pixelratio||1,t.backgroundcolor=t.backgroundcolor||this._model.get("backgroundcolor"),this._zr.painter.getrenderedcanvas(t)},qm.getsvgdataurl=function(){if(ax.svgsupported){var t=this._zr;return d(t.storage.getdisplaylist(),function(t){t.stopanimation(!0)}),t.painter.pathtodataurl()}},qm.getdataurl=function(t){var e=(t=t||{}).excludecomponents,i=this._model,n=[],o=this;fm(e,function(t){i.eachcomponent({maintype:t},function(t){var e=o._componentsmap[t.__viewid];e.group.ignore||(n.push(e),e.group.ignore=!0)})});var a="svg"===this._zr.painter.gettype()?this.getsvgdataurl():this.getrenderedcanvas(t).todataurl("image/"+(t&&t.type||"png"));return fm(n,function(t){t.group.ignore=!1}),a},qm.getconnecteddataurl=function(t){if(ax.canvassupported){var e=this.group,n=math.min,o=math.max;if(ci[e]){var a=1/0,r=1/0,s=-1/0,l=-1/0,u=[],h=t&&t.pixelratio||1;d(hi,function(h,c){if(h.group===e){var d=h.getrenderedcanvas(i(t)),f=h.getdom().getboundingclientrect();a=n(f.left,a),r=n(f.top,r),s=o(f.right,s),l=o(f.bottom,l),u.push({dom:d,left:f.left,top:f.top})}});var c=(s*=h)-(a*=h),f=(l*=h)-(r*=h),p=vx();p.width=c,p.height=f;var g=_i(p);return fm(u,function(t){var e=new je({style:{x:t.left*h-a,y:t.top*h-r,image:t.dom}});g.add(e)}),g.refreshimmediately(),p.todataurl("image/"+(t&&t.type||"png"))}return this.getdataurl(t)}},qm.converttopixel=v(gr,"converttopixel"),qm.convertfrompixel=v(gr,"convertfrompixel"),qm.containpixel=function(t,e){var i;return t=oi(this._model,t),d(t,function(t,n){n.indexof("models")>=0&&d(t,function(t){var o=t.coordinatesystem;if(o&&o.containpoint)i|=!!o.containpoint(e);else if("seriesmodels"===n){var a=this._chartsmap[t.__viewid];a&&a.containpoint&&(i|=a.containpoint(e,t))}},this)},this),!!i},qm.getvisual=function(t,e){var i=(t=oi(this._model,t,{defaultmaintype:"series"})).seriesmodel.getdata(),n=t.hasownproperty("dataindexinside")?t.dataindexinside:t.hasownproperty("dataindex")?i.indexofrawindex(t.dataindex):null;return null!=n?i.getitemvisual(n,e):i.getvisual(e)},qm.getviewofcomponentmodel=function(t){return this._componentsmap[t.__viewid]},qm.getviewofseriesmodel=function(t){return this._chartsmap[t.__viewid]};var ti={prepareandupdate:function(t){fr(this),ti.update.call(this,t)},update:function(t){var e=this._model,i=this._api,n=this._zr,o=this._coordsysmgr,a=this._scheduler;if(e){e.restoredata(t),a.performseriestasks(e),o.create(e,i),a.performdataprocessortasks(e,t),hr(this,e),o.update(e,i),qr(e),a.performvisualtasks(e,t),$r(this,e,i,t);var r=e.get("backgroundcolor")||"transparent";if(ax.canvassupported)n.setbackgroundcolor(r);else{var s=at(r);r=rt(s,"rgb"),0===s[3]&&(r="transparent")}qr(e,i)}},updatetransform:function(t){var e=this._model,i=this,n=this._api;if(e){var o=[];e.eachcomponent(function(a,r){var s=i.getviewofcomponentmodel(r);if(s&&s.__alive)if(s.updatetransform){var l=s.updatetransform(r,e,n,t);l&&l.update&&o.push(s)}else o.push(s)});var a=z();e.eachseries(function(o){var r=i._chartsmap[o.__viewid];if(r.updatetransform){var s=r.updatetransform(o,e,n,t);s&&s.update&&a.set(o.uid,1)}else a.set(o.uid,1)}),qr(e),this._scheduler.performvisualtasks(e,t,{setdirty:!0,dirtymap:a}),jr(i,e,0,t,a),qr(e,this._api)}},updateview:function(t){var e=this._model;e&&(pr.markupdatemethod(t,"updateview"),qr(e),this._scheduler.performvisualtasks(e,t,{setdirty:!0}),$r(this,this._model,this._api,t),qr(e,this._api))},updatevisual:function(t){ti.update.call(this,t)},updatelayout:function(t){ti.update.call(this,t)}};qm.resize=function(t){this._zr.resize(t);var e=this._model;if(this._loadingfx&&this._loadingfx.resize(),e){var i=e.resetoption("media"),n=t&&t.silent;this[$m]=!0,i&&fr(this),ti.update.call(this),this[$m]=!1,ur.call(this,n),jr.call(this,n)}},qm.showloading=function(t,e){if(hm(t)&&(e=t,t=""),t=t||"default",this.hideloading(),ui[t]){var i=ui[t](this._api,e),n=this._zr;this._loadingfx=i,n.add(i)}},qm.hideloading=function(){this._loadingfx&&this._zr.remove(this._loadingfx),this._loadingfx=null},qm.makeactionfromevent=function(t){var e=a({},t);return e.type=ni[t.type],e},qm.dispatchaction=function(t,e){hm(e)||(e={silent:!!e}),ii[t.type]&&this._model&&(this[$m]?this._pendingactions.push(t):(zr.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&ax.browser.wechat&&this._throttledzrflush(),ur.call(this,e.silent),jr.call(this,e.silent)))},qm.appenddata=function(t){var e=t.seriesindex;this.getmodel().getseriesbyindex(e).appenddata(t),this._scheduler.unfinished=!0},qm.on=rr("on"),qm.off=rr("off"),qm.one=rr("one");var ei=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];qm._initevents=function(){fm(ei,function(t){this._zr.on(t,function(e){var i,n=this.getmodel(),o=e.target;if("globalout"===t)i={};else if(o&&null!=o.dataindex){var r=o.datamodel||n.getseriesbyindex(o.seriesindex);i=r&&r.getdataparams(o.dataindex,o.datatype)||{}}else o&&o.eventdata&&(i=a({},o.eventdata));i&&(i.event=e,i.type=t,this.trigger(t,i))},this)},this),fm(ni,function(t,e){this._messagecenter.on(e,function(t){this.trigger(e,t)},this)},this)},qm.isdisposed=function(){return this._disposed},qm.clear=function(){this.setoption({series:[]},!0)},qm.dispose=function(){if(!this._disposed){this._disposed=!0,zi(this.getdom(),pi,"");var t=this._api,e=this._model;fm(this._componentsviews,function(i){i.dispose(e,t)}),fm(this._chartsviews,function(i){i.dispose(e,t)}),this._zr.dispose(),delete hi[this.id]}},h(vr,$x);var ii={},ni={},oi=[],ai=[],ri=[],si=[],li={},ui={},hi={},ci={},di=new date-0,fi=new date-0,pi="_echarts_instance_",gi={},mi=as;fs(2e3,tm),ls(sm),us(5e3,function(t){var e=z();t.eachseries(function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),o=t.getdata(),a={stackresultdimension:o.getcalculationinfo("stackresultdimension"),stackedoverdimension:o.getcalculationinfo("stackedoverdimension"),stackeddimension:o.getcalculationinfo("stackeddimension"),stackedbydimension:o.getcalculationinfo("stackedbydimension"),isstackedbyindex:o.getcalculationinfo("isstackedbyindex"),data:o,seriesmodel:t};if(!a.stackeddimension||!a.isstackedbyindex&&!a.stackedbydimension)return;n.length&&o.setcalculationinfo("stackedonseries",n[n.length-1].seriesmodel),n.push(a)}}),e.each(xa)}),gs("default",function(t,e){r(e=e||{},{text:"loading",color:"#c23531",textcolor:"#000",maskcolor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new jb({style:{fill:e.maskcolor},zlevel:e.zlevel,z:1e4}),n=new $b({shape:{startangle:-lm/2,endangle:-lm/2+.1,r:10},style:{stroke:e.color,linecap:"round",linewidth:5},zlevel:e.zlevel,z:10001}),o=new jb({style:{fill:"none",text:e.text,textposition:"right",textdistance:10,textfill:e.textcolor},zlevel:e.zlevel,z:10001});n.animateshape(!0).when(1e3,{endangle:3*lm/2}).start("circularinout"),n.animateshape(!0).when(1e3,{startangle:3*lm/2}).delay(300).start("circularinout");var a=new l_;return a.add(n),a.add(o),a.add(i),a.resize=function(){var e=t.getwidth()/2,a=t.getheight()/2;n.setshape({cx:e,cy:a});var r=n.shape.r;o.setshape({x:e-r,y:a-r,width:2*r,height:2*r}),i.setshape({x:0,y:0,width:t.getwidth(),height:t.getheight()})},a.resize(),a}),hs({type:"highlight",event:"highlight",update:"highlight"},b),hs({type:"downplay",event:"downplay",update:"downplay"},b),ss("light",rm),ss("dark",vm);var vi={};bs.prototype={constructor:bs,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,i={},n=[],o=[];for(ss(t,{},n,"_oldkeygetter",this),ss(e,i,o,"_newkeygetter",this),a=0;a=e)){for(var i,n=this._chunksize,o=this._rawdata,a=this._storage,r=this.dimensions,s=this._dimensioninfos,l=this._namelist,u=this._idlist,h=this._rawextent,c=this._namerepeatcount={},d=this._chunkcount,f=d-1,p=0;ph[i][1]&&(h[i][1]=t)}if(!o.pure){var a=l[_];w&&!a&&(null!=i?a=this._getnamefromstore(_):null!=w.name&&(l[_]=a=w.name));var c=null==w?null:w.id;null==c&&null!=a&&(c[a]=c[a]||0,c=a,c[a]>0&&(c+="__ec__"+c[a]),c[a]++),null!=c&&(u[_]=c)}}!o.persistent&&o.clean&&o.clean(),this._rawcount=this._count=e,this._extent={},ls(this)}},ti._getnamefromstore=function(t){var e=this._namedimidx;if(null!=e){var i=this._chunksize,n=math.floor(t/i),o=t%i,a=this.dimensions[e],r=this._dimensioninfos[a].ordinalmeta;if(r)return r.categories[t];var s=this._storage[a][n];return s&&s[o]}},ti._getidfromstore=function(t){var e=this._iddimidx;if(null!=e){var i=this._chunksize,n=math.floor(t/i),o=t%i,a=this.dimensions[e],r=this._dimensioninfos[a].ordinalmeta;if(r)return r.categories[t];var s=this._storage[a][n];return s&&s[o]}},ti.count=function(){return this._count},ti.getindices=function(){if(this._indices)return new(t=this._indices.constructor)(this._indices.buffer,0,this._count);for(var t=ts(this),e=new t(this.count()),i=0;i=0&&e=0&&ea&&(a=s)}return i=[o,a],this._extent[t]=i,i},ti.getapproximateextent=function(t){return t=this.getdimension(t),this._approximateextent[t]||this.getdataextent(t)},ti.setapproximateextent=function(t,e){e=this.getdimension(e),this._approximateextent[e]=t.slice()},ti.getcalculationinfo=function(t){return this._calculationinfo[t]},ti.setcalculationinfo=function(t,e){xi(t)?a(this._calculationinfo,t):this._calculationinfo[t]=e},ti.getsum=function(t){var e=0;if(this._storage[t])for(var i=0,n=this.count();i=this._rawcount||t<0)return-1;var e=this._indices,i=e[t];if(null!=i&&it))return a;o=a-1}}return-1},ti.indicesofnearest=function(t,e,i){var n=[];if(!this._storage[t])return n;null==i&&(i=1/0);for(var o=number.max_value,a=-1,r=0,s=this.count();r=0&&a<0)&&(o=u,a=l,n.length=0),n.push(r))}return n},ti.getrawindex=ks,ti.getrawdataitem=function(t){if(this._rawdata.persistent)return this._rawdata.getitem(this.getrawindex(t));for(var e=[],i=0;i=l&&w<=u&&(a[r++]=c),c++;h=!0}else if(2===n){for(var d=this._storage[s],v=this._storage[e[1]],y=t[e[1]][0],x=t[e[1]][1],f=0;f=l&&w<=u&&b>=y&&b<=x&&(a[r++]=c),c++}h=!0}}if(!h)if(1===n)for(m=0;m=l&&w<=u&&(a[r++]=m)}else for(m=0;mt[i][1])&&(s=!1)}s&&(a[r++]=this.getrawindex(m))}return rb[1]&&(b[1]=w)}}}return o},ti.downsample=function(t,e,i,n){for(var o=es(this,[t]),a=o._storage,r=[],s=math.floor(1/e),l=a[t],u=this.count(),h=this._chunksize,c=o._rawextent[t],d=new(ts(this))(u),f=0,p=0;pu-p&&(s=u-p,r.length=s);for(var g=0;gc[1]&&(c[1]=x),d[f++]=_}return o._count=f,o._indices=d,o.getrawindex=ps,o},ti.getitemmodel=function(t){var e=this.hostmodel;return new wo(this.getrawdataitem(t),e,e&&e.ecmodel)},ti.diff=function(t){var e=this;return new bs(t?t.getindices():[],this.getindices(),function(e){return ns(t,e)},function(t){return ns(e,t)})},ti.getvisual=function(t){var e=this._visual;return e&&e[t]},ti.setvisual=function(t,e){if(xi(t))for(var i in t)t.hasownproperty(i)&&this.setvisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},ti.setlayout=function(t,e){if(xi(t))for(var i in t)t.hasownproperty(i)&&this.setlayout(i,t[i]);else this._layout[t]=e},ti.getlayout=function(t){return this._layout[t]},ti.getitemlayout=function(t){return this._itemlayouts[t]},ti.setitemlayout=function(t,e,i){this._itemlayouts[t]=i?a(this._itemlayouts[t]||{},e):e},ti.clearitemlayouts=function(){this._itemlayouts.length=0},ti.getitemvisual=function(t,e,i){var n=this._itemvisuals[t],o=n&&n[e];return null!=o||i?o:this.getvisual(e)},ti.setitemvisual=function(t,e,i){var n=this._itemvisuals[t]||{},o=this.hasitemvisual;if(this._itemvisuals[t]=n,xi(e))for(var a in e)e.hasownproperty(a)&&(n[a]=e[a],o[a]=!0);else n[e]=i,o[e]=!0},ti.clearallvisual=function(){this._visual={},this._itemvisuals=[],this.hasitemvisual={}};var ai=function(t){t.seriesindex=this.seriesindex,t.dataindex=this.dataindex,t.datatype=this.datatype};ti.setitemgraphicel=function(t,e){var i=this.hostmodel;e&&(e.dataindex=t,e.datatype=this.datatype,e.seriesindex=i&&i.seriesindex,"group"===e.type&&e.traverse(ai,e)),this._graphicels[t]=e},ti.getitemgraphicel=function(t){return this._graphicels[t]},ti.eachitemgraphicel=function(t,e){d(this._graphicels,function(i,n){i&&t&&t.call(e,i,n)})},ti.cloneshallow=function(t){if(!t){var e=f(this.dimensions,this.getdimensioninfo,this);t=new di(e,this.hostmodel)}if(t._storage=this._storage,cs(t,this),this._indices){var n=this._indices.constructor;t._indices=new n(this._indices)}else t._indices=null;return t.getrawindex=t._indices?ps:ks,t._extent=i(this._extent),t._approximateextent=i(this._approximateextent),t},ti.wrapmethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedmethods=this.__wrappedmethods||[],this.__wrappedmethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(c(arguments)))})},ti.transferable_methods=["cloneshallow","downsample","map"],ti.changable_methods=["filterself","selectrange"];var ci=function(t,e){return e=e||{},bs(e.coorddimensions||[],t,{dimsdef:e.dimensionsdefine||t.dimensionsdefine,encodedef:e.encodedefine||t.encodedefine,dimcount:e.dimensionscount,generatecoord:e.generatecoord,generatecoordcount:e.generatecoordcount})};js.prototype.parse=function(t){return t},js.prototype.getsetting=function(t){return this._setting[t]},js.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},js.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},js.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},js.prototype.unionextent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},js.prototype.unionextentfromdata=function(t,e){this.unionextent(t.getapproximateextent(e))},js.prototype.getextent=function(){return this._extent.slice()},js.prototype.setextent=function(t,e){var i=this._extent;isnan(t)||(i[0]=t),isnan(e)||(i[1]=e)},js.prototype.gettickslabels=function(){for(var t=[],e=this.getticks(),i=0;ie[1]&&(e[1]=t[1]),ei.prototype.setextent.call(this,e[0],e[1])},getinterval:function(){return this._interval},setinterval:function(t){this._interval=t,this._niceextent=this._extent.slice(),this._intervalprecision=ks(t)},getticks:function(){return tl(this._interval,this._extent,this._niceextent,this._intervalprecision)},gettickslabels:function(){for(var t=[],e=this.getticks(),i=0;i>>1;t[o][1]i&&(a=i);var r=wi.length,s=gi(wi,a,0,r),l=wi[math.min(s,r-1)],u=l[1];"year"===l[0]&&(u*=vo(o/u/t,!0));var h=this.getsetting("useutc")?0:60*new date(+n[0]||+n[1]).gettimezoneoffset()*1e3,c=[math.round(bi((n[0]-h)/u)*u+h),math.round(vi((n[1]-h)/u)*u+h)];qs(c,n),this._steplvl=l,this._interval=u,this._niceextent=c},parse:function(t){return+zo(t)}});d(["contain","normalize"],function(t){fi.prototype[t]=function(e){return ri[t].call(this,this.parse(e))}});var wi=[["hh:mm:ss",1e3],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nmm-dd",6e4],["hh:mm\nmm-dd",3e5],["hh:mm\nmm-dd",6e5],["hh:mm\nmm-dd",9e5],["hh:mm\nmm-dd",18e5],["hh:mm\nmm-dd",36e5],["hh:mm\nmm-dd",72e5],["hh:mm\nmm-dd",216e5],["hh:mm\nmm-dd",432e5],["mm-dd\nyyyy",864e5],["mm-dd\nyyyy",1728e5],["mm-dd\nyyyy",2592e5],["mm-dd\nyyyy",3456e5],["mm-dd\nyyyy",432e6],["mm-dd\nyyyy",5184e5],["week",6048e5],["mm-dd\nyyyy",864e6],["week",12096e5],["week",18144e5],["month",26784e5],["week",36288e5],["month",53568e5],["week",36288e5],["quarter",8208e6],["month",107136e5],["month",13392e6],["half-year",16416e6],["month",214272e5],["month",26784e6],["year",32832e6]];fi.create=function(t){return new fi({useutc:t.ecmodel.get("useutc")})};var hi=js.prototype,zi=ei.prototype,ui=ko,ji=ao,xi=math.floor,yi=math.ceil,qi=math.pow,$i=math.log,ki=js.extend({type:"log",base:10,$constructor:function(){js.apply(this,arguments),this._originalscale=new ei},getticks:function(){var t=this._originalscale,e=this._extent,i=t.getextent();return f(zi.getticks.call(this),function(n){var o=ao(qi(this.base,n));return o=n===e[0]&&t.__fixmin?sl(o,i[0]):o,o=n===e[1]&&t.__fixmax?sl(o,i[1]):o},this)},getlabel:zi.getlabel,scale:function(t){return t=hi.scale.call(this,t),qi(this.base,t)},setextent:function(t,e){var i=this.base;t=$i(t)/$i(i),e=$i(e)/$i(i),zi.setextent.call(this,t,e)},getextent:function(){var t=this.base,e=hi.getextent.call(this);e[0]=qi(t,e[0]),e[1]=qi(t,e[1]);var i=this._originalscale,n=i.getextent();return i.__fixmin&&(e[0]=sl(e[0],n[0])),i.__fixmax&&(e[1]=sl(e[1],n[1])),e},unionextent:function(t){this._originalscale.unionextent(t);var e=this.base;t[0]=$i(t[0])/$i(e),t[1]=$i(t[1])/$i(e),hi.unionextent.call(this,t)},unionextentfromdata:function(t,e){this.unionextent(t.getapproximateextent(e))},niceticks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||i<=0)){var n=ro(i);for(t/i*n<=.5&&(n*=10);!isnan(n)&&math.abs(n)<1&&math.abs(n)>0;)n*=10;var o=[ao(yi(e[0]/n)*n),ao(xi(e[1]/n)*n)];this._interval=n,this._niceextent=o}},niceextent:function(t){zi.niceextent.call(this,t);var e=this._originalscale;e.__fixmin=t.fixmin,e.__fixmax=t.fixmax}});d(["contain","normalize"],function(t){ki.prototype[t]=function(e){return e=$i(e)/$i(this.base),hi[t].call(this,e)}}),ki.create=function(){return new ki};var ji={getformattedlabels:function(){return fl(this.axis,this.get("axislabel.formatter"))},getmin:function(t){var e=this.option,i=t||null==e.rangestart?e.min:e.rangestart;return this.axis&&null!=i&&"datamin"!==i&&"function"!=typeof i&&!i(i)&&(i=this.axis.scale.parse(i)),i},getmax:function(t){var e=this.option,i=t||null==e.rangeend?e.max:e.rangeend;return this.axis&&null!=i&&"datamax"!==i&&"function"!=typeof i&&!i(i)&&(i=this.axis.scale.parse(i)),i},getneedcrosszero:function(){var t=this.option;return null==t.rangestart&&null==t.rangeend&&!t.scale},getcoordsysmodel:b,setrange:function(t,e){this.option.rangestart=t,this.option.rangeend=e},resetrange:function(){this.option.rangestart=this.option.rangeend=null}},qi=en({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildpath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,a=e.height/2;t.moveto(i,n-a),t.lineto(i+o,n+a),t.lineto(i-o,n+a),t.closepath()}}),td=en({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildpath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,a=e.height/2;t.moveto(i,n-a),t.lineto(i+o,n),t.lineto(i,n+a),t.lineto(i-o,n),t.closepath()}}),ed=en({type:"pin",shape:{x:0,y:0,width:0,height:0},buildpath:function(t,e){var i=e.x,n=e.y,o=e.width/5*3,a=math.max(o,e.height),r=o/2,s=r*r/(a-r),l=n-a+r+s,u=math.asin(s/r),h=math.cos(u)*r,c=math.sin(u),d=math.cos(u),f=.6*r,p=.7*r;t.moveto(i-h,l+s),t.arc(i,l,r,math.pi-u,2*math.pi+u),t.beziercurveto(i+h-c*f,l+s+d*f,i,n-p,i,n),t.beziercurveto(i,n-p,i-h+c*f,l+s+d*f,i-h,l+s),t.closepath()}}),id=en({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildpath:function(t,e){var i=e.height,n=e.width,o=e.x,a=e.y,r=n/3*2;t.moveto(o,a),t.lineto(o+r,a+i),t.lineto(o,a+i/4*3),t.lineto(o-r,a+i),t.lineto(o,a),t.closepath()}}),nd={line:function(t,e,i,n,o){o.x1=t,o.y1=e+n/2,o.x2=t+i,o.y2=e+n/2},rect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n},roundrect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n,o.r=math.min(i,n)/4},square:function(t,e,i,n,o){var a=math.min(i,n);o.x=t,o.y=e,o.width=a,o.height=a},circle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.r=math.min(i,n)/2},diamond:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n},pin:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},arrow:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},triangle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n}},od={};d({line:xb,rect:jb,roundrect:jb,square:jb,circle:rb,diamond:td,pin:ed,arrow:id,triangle:qi},function(t,e){od[e]=new t});var ad=en({type:"symbol",shape:{symboltype:"",x:0,y:0,width:0,height:0},beforebrush:function(){var t=this.style;"pin"===this.shape.symboltype&&"inside"===t.textposition&&(t.textposition=["50%","40%"],t.textalign="center",t.textverticalalign="middle")},buildpath:function(t,e,i){var n=e.symboltype,o=od[n];"none"!==e.symboltype&&(o||(o=od[n="rect"]),nd[n](e.x,e.y,e.width,e.height,o.shape),o.buildpath(t,o.shape,i))}}),rd={isdimensionstacked:ws,enabledatastack:fs},sd=(object.freeze||object)({createlist:function(t){return hs(t.getsource(),t)},getlayoutrect:qo,datastack:rd,createscale:function(t,e){var i=e;wo.isinstance(e)||h(i=new wo(e),ji);var n=cl(i);return n.setextent(t[0],t[1]),hl(n,i),n},mixinaxismodelcommonmethods:function(t){h(t,ji)},completedimensions:bs,createdimensions:ci,createsymbol:ml}),ld=1e-8;xl.prototype={constructor:xl,properties:null,getboundingrect:function(){var t=this._rect;if(t)return t;for(var e=number.max_value,i=[e,e],n=[-e,-e],o=[],a=[],r=this.geometries,s=0;s0}),function(t){var e=t.properties,i=t.geometry,n=i.coordinates,o=[];"polygon"===i.type&&o.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),"multipolygon"===i.type&&d(n,function(t){t[0]&&o.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var a=new xl(e.name,o,e.cp);return a.properties=e,a})},hd=do,cd=[0,1],dd=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onband=!1,this._labelinterval};dd.prototype={constructor:dd,contain:function(t){var e=this._extent,i=math.min(e[0],e[1]),n=math.max(e[0],e[1]);return t>=i&&t<=n},containdata:function(t){return this.contain(this.datatocoord(t))},getextent:function(){return this._extent.slice()},getpixelprecision:function(t){return po(t||this.scale.getextent(),this._extent)},setextent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},datatocoord:function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onband&&"ordinal"===n.type&&bl(i=i.slice(),n.count()),hd(t,cd,i,e)},coordtodata:function(t,e){var i=this._extent,n=this.scale;this.onband&&"ordinal"===n.type&&bl(i=i.slice(),n.count());var o=hd(t,i,cd,e);return this.scale.scale(o)},pointtodata:function(t,e){},gettickscoords:function(t){if(this.onband&&!t){for(var e=this.getbands(),i=[],n=0;n0&&zl(i[o-1]);o--);for(;n0&&zl(i[a-1]);a--);for(;o=0){var r=o.getitemgraphicel(a);if(!r){var s=o.getitemlayout(a);if(!s)return;(r=new dl(o,a)).position=s,r.setz(t.get("zlevel"),t.get("z")),r.ignore=isnan(s[0])||isnan(s[1]),r.__temp=!0,o.setitemgraphicel(a,r),r.stopsymbolanimation(!0),this.group.add(r)}r.highlight()}else pr.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var o=t.getdata(),a=pi(o,n);if(null!=a&&a>=0){var r=o.getitemgraphicel(a);r&&(r.__temp?(o.setitemgraphicel(a,null),this.group.remove(r)):r.downplay())}else pr.prototype.downplay.call(this,t,e,i,n)},_newpolyline:function(t){var e=this._polyline;return e&&this._linegroup.remove(e),e=new cd({shape:{points:t},silent:!0,z2:10}),this._linegroup.add(e),this._polyline=e,e},_newpolygon:function(t,e){var i=this._polygon;return i&&this._linegroup.remove(i),i=new ld({shape:{points:t,stackedonpoints:e},silent:!0}),this._linegroup.add(i),this._polygon=i,i},_getsymbolignorefunc:function(t,e){var i=e.getaxesbyscale("ordinal")[0];if(i&&i.islabelignored)return m(i.islabelignored,i)},_updateanimation:function(t,e,i,n,o,a){var r=this._polyline,s=this._polygon,l=t.hostmodel,u=wd(this._data,t,this._stackedonpoints,e,this._coordsys,i,this._valueorigin,a),h=u.current,c=u.stackedoncurrent,d=u.next,f=u.stackedonnext;o&&(h=ql(u.current,i,o),c=ql(u.stackedoncurrent,i,o),d=ql(u.next,i,o),f=ql(u.stackedonnext,i,o)),r.shape.__points=u.current,r.shape.points=h,fo(r,{shape:{points:d}},l),s&&(s.setshape({points:h,stackedonpoints:c}),fo(s,{shape:{points:d,stackedonpoints:f}},l));for(var p=[],g=u.status,m=0;me&&(e=t[i]);return e},min:function(t){for(var e=1/0,i=0;ie[1]&&e.reverse(),e},getotheraxis:function(){this.grid.getotheraxis()},islabelignored:function(t){if("category"===this.type){var e=this.getlabelinterval();return"function"==typeof e&&!e(t,this.scale.getlabel(t))||t%(e+1)}},pointtodata:function(t,e){return this.coordtodata(this.tolocalcoord(t["x"===this.dim?0:1]),e)},tolocalcoord:null,toglobalcoord:null},u(zd,dd);var rd={show:!0,zlevel:0,z:0,inverse:!1,name:"",namelocation:"end",namerotate:null,nametruncate:{maxwidth:null,ellipsis:"...",placeholder:"."},nametextstyle:{},namegap:15,silent:!1,triggerevent:!1,tooltip:{show:!1},axispointer:{},axisline:{show:!0,onzero:!0,onzeroaxisindex:null,linestyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolsize:[10,15]},axistick:{show:!0,inside:!1,length:5,linestyle:{width:1}},axislabel:{show:!0,inside:!1,rotate:0,showminlabel:null,showmaxlabel:null,margin:8,fontsize:12},splitline:{show:!0,linestyle:{color:["#ccc"],width:1,type:"solid"}},splitarea:{show:!1,areastyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},bd={};bd.categoryaxis=n({boundarygap:!0,deduplication:null,splitline:{show:!1},axistick:{alignwithlabel:!1,interval:"auto"},axislabel:{interval:"auto"}},rd),bd.valueaxis=n({boundarygap:[0,0],splitnumber:5},rd),bd.timeaxis=r({scale:!0,min:"datamin",max:"datamax"},bd.valueaxis),bd.logaxis=r({scale:!0,logbase:10},bd.valueaxis);var vd=["value","category","time","log"],gd=function(t,e,i,a){d(vd,function(r){e.extend({type:t+"axis."+r,mergedefaultandtheme:function(e,o){var a=this.layoutmode,s=a?na(e):{};n(e,o.gettheme().get(r+"axis")),n(e,this.getdefaultoption()),e.type=i(t,e),a&&ia(e,s,a)},optionupdated:function(){"category"===this.option.type&&(this.__ordinalmeta=xs.createbyaxismodel(this))},getcategories:function(){if("category"===this.option.type)return this.__ordinalmeta.categories},getordinalmeta:function(){return this.__ordinalmeta},defaultoption:o([{},bd[r+"axis"],a],!0)})}),ks.registersubtypedefaulter(t+"axis",v(i,t))},fd=ks.extend({type:"cartesian2daxis",axis:null,init:function(){fd.superapply(this,"init",arguments),this.resetrange()},mergeoption:function(){fd.superapply(this,"mergeoption",arguments),this.resetrange()},restoredata:function(){fd.superapply(this,"restoredata",arguments),this.resetrange()},getcoordsysmodel:function(){return this.ecmodel.querycomponents({maintype:"grid",index:this.option.gridindex,id:this.option.gridid})[0]}});n(fd.prototype,ji);var wd={offset:0};gd("x",fd,ql,wd),gd("y",fd,ql,wd),ks.extend({type:"grid",dependencies:["xaxis","yaxis"],layoutmode:"box",coordinatesystem:null,defaultoption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containlabel:!1,backgroundcolor:"rgba(0,0,0,0)",borderwidth:1,bordercolor:"#ccc"}});var hd=d,zd=function(t){var e=t.scale.getextent(),i=e[0],n=e[1];return!(i>0&&n>0||i<0&&n<0)},ud=hl,jd=nu.prototype;jd.type="grid",jd.axispointerenabled=!0,jd.getrect=function(){return this._rect},jd.update=function(t,e){var i=this._axesmap;this._updatescale(t,this.model),hd(i.x,function(t){ud(t.scale,t.model)}),hd(i.y,function(t){ud(t.scale,t.model)}),hd(i.x,function(t){ou(i,"y",t)}),hd(i.y,function(t){ou(i,"x",t)}),this.resize(this.model,e)},jd.resize=function(t,e,i){function n(){hd(a,function(t){var e=t.ishorizontal(),i=e?[0,o.width]:[0,o.height],n=t.inverse?1:0;t.setextent(i[n],i[1-n]),ru(t,e?o.x:o.y)})}var o=qo(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()});this._rect=o;var a=this._axeslist;n(),!i&&t.get("containlabel")&&(hd(a,function(t){if(!t.model.get("axislabel.inside")){var e=iu(t);if(e){var i=t.ishorizontal()?"height":"width",n=t.model.get("axislabel.margin");o[i]-=e[i]+n,"top"===t.position?o.y+=e.height+n:"left"===t.position&&(o.x+=e.width+n)}}}),n())},jd.getaxis=function(t,e){var i=this._axesmap[t];if(null!=i){if(null==e)for(var n in i)if(i.hasownproperty(n))return i[n];return i[e]}},jd.getaxes=function(){return this._axeslist.slice()},jd.getcartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsmap[i]}w(t)&&(e=t.yaxisindex,t=t.xaxisindex);for(var n=0,o=this._coordslist;nu[1]?-1:1,c=["start"===o?u[0]-h*l:"end"===o?u[1]+h*l:(u[0]+u[1])/2,gu(o)?t.labeloffset+r*l:0],d=e.get("namerotate");null!=d&&(d=d*yd/180);var f;gu(o)?n=kd(t.rotation,null!=d?d:t.rotation,r):(n=hu(t,o,d||0,u),null!=(f=t.axisnameavailablewidth)&&(f=math.abs(f/math.sin(n.rotation)),!isfinite(f)&&(f=null)));var p=s.getfont(),g=e.get("nametruncate",!0)||{},m=g.ellipsis,v=d(t.nametruncatemaxwidth,g.maxwidth,f),y=null!=m&&null!=v?bs(i,v,p,m,{minchar:2,placeholder:g.placeholder}):i,x=e.get("tooltip",!0),_=e.maintype,w={componenttype:_,name:i,$vars:["name"]};w[_+"index"]=e.componentindex;var b=new zb({anid:"name",__fulltext:i,__truncatedtext:y,position:c,rotation:n.rotation,silent:cu(e),z2:1,tooltip:x&&x.show?a({content:i,formatter:function(){return i},formatterparams:w},x):null});no(b.style,s,{text:y,textfont:p,textfill:s.gettextcolor()||e.get("axisline.linestyle.color"),textalign:n.textalign,textverticalalign:n.textverticalalign}),e.get("triggerevent")&&(b.eventdata=uu(e),b.eventdata.targettype="axisname",b.eventdata.name=i),this._dumbgroup.add(b),b.updatetransform(),this.group.add(b),b.decomposetransform()}}},kd=qd.innertextlayout=function(t,e,i){var n,o,a=oo(e-t);return eo(a)?(o=i>0?"top":"bottom",n="center"):eo(a-yd)?(o=i>0?"bottom":"top",n="center"):(o="middle",n=a>0&&a0?"right":"left":i>0?"left":"right"),{rotation:a,textalign:n,textverticalalign:o}},jd=qd.ifignoreontick=function(t,e,i,n,o,a){if(0===e&&o||e===n-1&&a)return!1;var r,s=t.scale;return"ordinal"===s.type&&("function"==typeof i?(r=s.getticks()[e],!i(r,s.getlabel(r))):e%(i+1))},qd=qd.getinterval=function(t,e){var i=t.get("interval");return null!=i&&"auto"!=i||(i=e),i},tt=d,et=v,it=vs({type:"axis",_axispointer:null,axispointerclass:null,render:function(t,e,i,n){this.axispointerclass&&mu(t),it.superapply(this,"render",arguments),cu(this,t,0,i,0,!0)},updateaxispointer:function(t,e,i,n,o){cu(this,t,0,i,0,!1)},remove:function(t,e){var i=this._axispointer;i&&i.remove(e),it.superapply(this,"remove",arguments)},dispose:function(t,e){lu(this,e),it.superapply(this,"dispose",arguments)}}),nt=[];it.registeraxispointerclass=function(t,e){nt[t]=e},it.getaxispointerclass=function(t){return t&&nt[t]};var ot=qd.ifignoreontick,at=qd.getinterval,rt=["axisline","axisticklabel","axisname"],st=["splitarea","splitline"],lt=it.extend({type:"cartesianaxis",axispointerclass:"cartesianaxispointer",render:function(t,e,i,n){this.group.removeall();var o=this._axisgroup;if(this._axisgroup=new l_,this.group.add(this._axisgroup),t.get("show")){var a=t.getcoordsysmodel(),r=ku(a,t),s=new qd(t,r);d(rt,s.add,s),this._axisgroup.add(s.getgroup()),d(st,function(e){t.get(e+".show")&&this["_"+e](t,a,r.labelinterval)},this),yo(o,this._axisgroup,t),lt.supercall(this,"render",t,e,i,n)}},_splitline:function(t,e,i){var n=t.axis;if(!n.scale.isblank()){var o=t.getmodel("splitline"),a=o.getmodel("linestyle"),s=a.get("color"),l=at(o,i);s=y(s)?s:[s];for(var u=e.coordinatesystem.getrect(),h=n.ishorizontal(),c=0,d=n.gettickscoords(),f=n.scale.getticks(),p=t.get("axislabel.showminlabel"),g=t.get("axislabel.showmaxlabel"),m=[],v=[],x=a.getlinestyle(),_=0;_1){var c;"string"==typeof o?c=nd[o]:"function"==typeof o&&(c=o),c&&t.setdata(n.downsample(s.dim,1/h,c,od))}}}}}("line"));var ut=mm.extend({type:"series.__base_bar__",getinitialdata:function(t,e){return hs(this.getsource(),this)},getmarkerposition:function(t){var e=this.coordinatesystem;if(e){var i=e.datatopoint(e.clampdata(t)),n=this.getdata(),o=n.getlayout("offset"),a=n.getlayout("size");return i[e.getbaseaxis().ishorizontal()?0:1]+=o+a/2,i}return[nan,nan]},defaultoption:{zlevel:0,z:2,coordinatesystem:"cartesian2d",legendhoverlink:!0,barminheight:0,barminangle:0,itemstyle:{},emphasis:{}}});ut.extend({type:"series.bar",dependencies:["grid","polar"],brushselector:"rect"});var ht=lw([["fill","color"],["stroke","bordercolor"],["linewidth","borderwidth"],["stroke","barbordercolor"],["linewidth","barborderwidth"],["opacity"],["shadowblur"],["shadowoffsetx"],["shadowoffsety"],["shadowcolor"]]),ct={getbaritemstyle:function(t){var e=ht(this,t);if(this.getborderlinedash){var i=this.getborderlinedash();i&&(e.linedash=i)}return e}},dt=["itemstyle","barborderwidth"];a(wo.prototype,ct),xs({type:"bar",render:function(t,e,i){var n=t.get("coordinatesystem");return"cartesian2d"!==n&&"polar"!==n||this._render(t,e,i),this.group},dispose:b,_render:function(t,e,i){var n,o=this.group,a=t.getdata(),r=this._data,s=t.coordinatesystem,l=s.getbaseaxis();"cartesian2d"===s.type?n=l.ishorizontal():"polar"===s.type&&(n="angle"===l.dim);var u=t.isanimationenabled()?t:null;a.diff(r).add(function(e){if(a.hasvalue(e)){var i=a.getitemmodel(e),r=pt[s.type](a,e,i),l=ft[s.type](a,e,i,r,n,u);a.setitemgraphicel(e,l),o.add(l),zu(l,a,e,i,r,t,n,"polar"===s.type)}}).update(function(e,i){var l=r.getitemgraphicel(i);if(a.hasvalue(e)){var h=a.getitemmodel(e),c=pt[s.type](a,e,h);l?fo(l,{shape:c},u,e):l=ft[s.type](a,e,h,c,n,u,!0),a.setitemgraphicel(e,l),o.add(l),zu(l,a,e,h,c,t,n,"polar"===s.type)}else o.remove(l)}).remove(function(t){var e=r.getitemgraphicel(t);"cartesian2d"===s.type?e&&ou(t,u,e):e&&eu(t,u,e)}).execute(),this._data=a},remove:function(t,e){var i=this.group,n=this._data;t.get("animation")?n&&n.eachitemgraphicel(function(e){"sector"===e.type?eu(e.dataindex,t,e):ou(e.dataindex,t,e)}):i.removeall()}});var ft={cartesian2d:function(t,e,i,n,o,r,s){var l=new jb({shape:a({},n)});if(r){var u=l.shape,h=o?"height":"width",c={};u[h]=0,c[h]=n[h],ss[s?"updateprops":"initprops"](l,{shape:c},r,e)}return l},polar:function(t,e,i,n,o,a,s){var l=n.startangle0?1:-1,r=n.height>0?1:-1;return{x:n.x+a*o/2,y:n.y+r*o/2,width:n.width-a*o,height:n.height-r*o}},polar:function(t,e,i){var n=t.getitemlayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startangle:n.startangle,endangle:n.endangle}}};ds(v(rl,"bar")),fs(function(t){t.eachseriesbytype("bar",function(t){t.getdata().setvisual("legendsymbol","roundrect")})});var gt=function(t,e,i){e=y(e)&&{coorddimensions:e}||a({},e);var n=t.getsource(),o=ci(n,e),r=new di(o,t);return r.initdata(n,i),r},mt={updateselectedmap:function(t){this._targetlist=y(t)?t.slice():[],this._selecttargetmap=p(t||[],function(t,e){return t.set(e.name,e),t},z())},select:function(t,e){var i=null!=e?this._targetlist[e]:this._selecttargetmap.get(t);"single"===this.get("selectedmode")&&this._selecttargetmap.each(function(t){t.selected=!1}),i&&(i.selected=!0)},unselect:function(t,e){var i=null!=e?this._targetlist[e]:this._selecttargetmap.get(t);i&&(i.selected=!1)},toggleselected:function(t,e){var i=null!=e?this._targetlist[e]:this._selecttargetmap.get(t);if(null!=i)return this[i.selected?"unselect":"select"](t,e),i.selected},isselected:function(t,e){var i=null!=e?this._targetlist[e]:this._selecttargetmap.get(t);return i&&i.selected}},vt=ys({type:"series.pie",init:function(t){vt.superapply(this,"init",arguments),this.legenddataprovider=function(){return this.getrawdata()},this.updateselectedmap(this._createselectablelist()),this._defaultlabelline(t)},mergeoption:function(t){vt.supercall(this,"mergeoption",t),this.updateselectedmap(this._createselectablelist())},getinitialdata:function(t,e){return gt(this,["value"])},_createselectablelist:function(){for(var t=this.getrawdata(),e=t.mapdimension("value"),i=[],n=0,o=t.count();n0&&"scale"!==u){var d=o.getitemlayout(0),f=math.max(i.getwidth(),i.getheight())/2,p=m(r.removeclippath,r);r.setclippath(this._createclippath(d.cx,d.cy,f,d.startangle,d.clockwise,p,t))}this._data=o}},dispose:function(){},_createclippath:function(t,e,i,n,o,a,r){var s=new gb({shape:{cx:t,cy:e,r0:0,r:i,startangle:n,endangle:n,clockwise:o}});return po(s,{shape:{endangle:n+(o?1:-1)*math.pi*2}},r,a),s},containpoint:function(t,e){var i=e.getdata().getitemlayout(0);if(i){var n=t[0]-i.cx,o=t[1]-i.cy,a=math.sqrt(n*n+o*o);return a<=i.r&&a>=i.r0}}});var xt=function(t,e){d(e,function(e){e.update="updateview",hs(e,function(i,n){var o={};return n.eachcomponent({maintype:"series",subtype:t,query:i},function(t){t[e.method]&&t[e.method](i.name,i.dataindex);var n=t.getdata();n.each(function(e){var i=n.getname(e);o[i]=t.isselected(i)||!1})}),{name:i.name,selected:o}})})},_t=function(t){return{gettargetseries:function(e){var i={},n=z();return e.eachseriesbytype(t,function(t){t.__palettescope=i,n.set(t.uid,t)}),n},reset:function(t,e){var i=t.getrawdata(),n={},o=t.getdata();o.each(function(t){var e=o.getrawindex(t);n[e]=t}),i.each(function(e){var a=n[e],r=null!=a&&o.getitemvisual(a,"color",!0);if(r)i.setitemvisual(e,"color",r);else{var s=i.getitemmodel(e).get("itemstyle.color")||t.getcolorfrompalette(i.getname(e)||e+"",t.__palettescope,i.count());i.setitemvisual(e,"color",s),null!=a&&o.setitemvisual(a,"color",s)}})}}},wt=function(t,e,i,n){var o,a,r=t.getdata(),s=[],l=!1;r.each(function(i){var n,u,h,c,d=r.getitemlayout(i),f=r.getitemmodel(i),p=f.getmodel("label"),g=p.get("position")||f.get("emphasis.label.position"),m=f.getmodel("labelline"),v=m.get("length"),y=m.get("length2"),x=(d.startangle+d.endangle)/2,_=math.cos(x),w=math.sin(x);o=d.cx,a=d.cy;var b="inside"===g||"inner"===g;if("center"===g)n=d.cx,u=d.cy,c="center";else{var s=(b?(d.r+d.r0)/2*_:d.r*_)+o,m=(b?(d.r+d.r0)/2*w:d.r*w)+a;if(n=s+3*_,u=m+3*w,!b){var i=s+_*(v+e-d.r),d=m+w*(v+e-d.r),t=i+(_<0?-1:1)*y,a=d;n=t+(_<0?-5:5),u=a,h=[[s,m],[i,d],[t,a]]}c=b?"center":_>0?"left":"right"}var c=p.getfont(),l=p.get("rotate")?_<0?-x+math.pi:-x:0,k=me(t.getformattedlabel(i,"normal")||r.getname(i),c,c,"top");l=!!l,d.label={x:n,y:u,position:g,height:k.height,len:v,len2:y,linepoints:h,textalign:c,verticalalign:"middle",rotation:l,inside:b},b||s.push(d.label)}),!l&&t.get("avoidlabeloverlap")&&wu(s,o,a,e,i,n)},bt=2*math.pi,st=math.pi/180,mt=function(t){return{seriestype:t,reset:function(t,e){var i=e.findcomponents({maintype:"legend"});if(i&&i.length){var n=t.getdata();n.filterself(function(t){for(var e=n.getname(t),o=0;o=0;s--){var l=2*s,u=n[l]-a/2,h=n[l+1]-r/2;if(t>=u&&e>=h&&t<=u+a&&e<=h+r)return s}return-1}}),dt=hu.prototype;dt.ispersistent=function(){return!this._incremental},dt.updatedata=function(t){this.group.removeall();var e=new it({recthover:!0,cursor:"default"});e.setshape({points:t.getlayout("symbolpoints")}),this._setcommon(e,t),this.group.add(e),this._incremental=null},dt.updatelayout=function(t){if(!this._incremental){var e=t.getlayout("symbolpoints");this.group.eachchild(function(t){if(null!=t.startindex){var i=2*(t.endindex-t.startindex),n=4*t.startindex*2;e=new float32array(e.buffer,n,i)}t.setshape("points",e)})}},dt.incrementalprepareupdate=function(t){this.group.removeall(),this._clearincremental(),t.count()>2e6?(this._incremental||(this._incremental=new on({silent:!0})),this.group.add(this._incremental)):this._incremental=null},dt.incrementalupdate=function(t,e){var i;this._incremental?(i=new it,this._incremental.adddisplayable(i,!0)):((i=new it({recthover:!0,cursor:"default",startindex:t.start,endindex:t.end})).incremental=!0,this.group.add(i)),i.setshape({points:e.getlayout("symbolpoints")}),this._setcommon(i,e,!!this._incremental)},dt._setcommon=function(t,e,i){var n=e.hostmodel,o=e.getvisual("symbolsize");t.setshape("size",o instanceof array?o:[o,o]),t.symbolproxy=ml(e.getvisual("symbol"),0,0,0,0),t.setcolor=t.symbolproxy.setcolor;var a=t.shape.size[0]<4;t.usestyle(n.getmodel("itemstyle").getitemstyle(a?["color","shadowblur","shadowcolor"]:["color"]));var r=e.getvisual("color");r&&t.setcolor(r),i||(t.seriesindex=n.seriesindex,t.on("mousemove",function(e){t.dataindex=null;var i=t.finddataindex(e.offsetx,e.offsety);i>=0&&(t.dataindex=i+(t.startindex||0))}))},dt.remove=function(){this._clearincremental(),this._incremental=null,this.group.removeall()},dt._clearincremental=function(){var t=this._incremental;t&&t.cleardisplaybles()},xs({type:"scatter",render:function(t,e,i){var n=t.getdata();this._updatesymboldraw(n,t).updatedata(n),this._finished=!0},incrementalpreparerender:function(t,e,i){var n=t.getdata();this._updatesymboldraw(n,t).incrementalprepareupdate(n),this._finished=!1},incrementalrender:function(t,e,i){this._symboldraw.incrementalupdate(t,e.getdata()),this._finished=t.end===e.getdata().count()},updatetransform:function(t,e,i){var n=t.getdata();if(this.group.dirty(),!this._finished||n.count()>1e4||!this._symboldraw.ispersistent())return{update:!0};var o=pd().reset(t);o.progress&&o.progress({start:0,end:n.count()},n),this._symboldraw.updatelayout(n)},_updatesymboldraw:function(t,e){var i=this._symboldraw,n=e.pipelinecontext.large;return i&&n===this._islargedraw||(i&&i.remove(),i=this._symboldraw=n?new hu:new al,this._islargedraw=n,this.group.removeall()),this.group.add(i.group),i},remove:function(t,e){this._symboldraw&&this._symboldraw.remove(!0),this._symboldraw=null},dispose:function(){}}),fs(kd("scatter","circle")),ds(pd("scatter")),u(zu,dd),uu.prototype.getindicatoraxes=function(){return this._indicatoraxes},uu.prototype.datatopoint=function(t,e){var i=this._indicatoraxes[e];return this.coordtopoint(i.datatocoord(t),e)},uu.prototype.coordtopoint=function(t,e){var i=this._indicatoraxes[e].angle;return[this.cx+t*math.cos(i),this.cy-t*math.sin(i)]},uu.prototype.pointtodata=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=math.sqrt(e*e+i*i);e/=n,i/=n;for(var o,a=math.atan2(-i,e),r=1/0,s=-1,l=0;ln[0]&&isfinite(c)&&isfinite(n[0]))}else{r.getticks().length-1>a&&(u=i(u));var d=math.round((n[0]+n[1])/2/u)*u,f=math.round(a/2);r.setextent(ao(d-f*u),ao(d+(a-f)*u)),r.setinterval(u)}})},uu.dimensions=[],uu.create=function(t,e){var i=[];return t.eachcomponent("radar",function(n){var o=new uu(n,t,e);i.push(o),n.coordinatesystem=o}),t.eachseriesbytype("radar",function(t){"radar"===t.get("coordinatesystem")&&(t.coordinatesystem=i[t.get("radarindex")||0])}),i},ca.register("radar",uu);var tt=bd.valueaxis,at=(ms({type:"radar",optionupdated:function(){var t=this.get("boundarygap"),e=this.get("splitnumber"),o=this.get("scale"),s=this.get("axisline"),l=this.get("axistick"),u=this.get("axislabel"),h=this.get("name"),c=this.get("name.show"),d=this.get("name.formatter"),p=this.get("namegap"),g=this.get("triggerevent"),m=f(this.get("indicator")||[],function(f){null!=f.max&&f.max>0&&!f.min?f.min=0:null!=f.min&&f.min<0&&!f.max&&(f.max=0);var m=h;if(null!=f.color&&(m=r({color:f.color},h)),f=n(i(f),{boundarygap:t,splitnumber:e,scale:o,axisline:s,axistick:l,axislabel:u,name:f.text,namelocation:"end",namegap:p,nametextstyle:m,triggerevent:g},!1),c||(f.name=""),"string"==typeof d){var v=f.name;f.name=d.replace("{value}",null!=v?v:"")}else"function"==typeof d&&(f.name=d(f.name,f));var y=a(new wo(f,null,this.ecmodel),ji);return y.maintype="radar",y.componentindex=this.componentindex,y},this);this.getindicatormodels=function(){return m}},defaultoption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startangle:90,name:{show:!0},boundarygap:[0,0],splitnumber:5,namegap:15,scale:!1,shape:"polygon",axisline:n({linestyle:{color:"#bbb"}},tt.axisline),axislabel:ju(tt.axislabel,!1),axistick:ju(tt.axistick,!1),splitline:ju(tt.splitline,!0),splitarea:ju(tt.splitarea,!0),indicator:[]}}),["axisline","axisticklabel","axisname"]);vs({type:"radar",render:function(t,e,i){this.group.removeall(),this._buildaxes(t),this._buildsplitlineandarea(t)},_buildaxes:function(t){var e=t.coordinatesystem;d(f(e.getindicatoraxes(),function(t){return new qd(t.model,{position:[e.cx,e.cy],rotation:t.angle,labeldirection:-1,tickdirection:-1,namedirection:1})}),function(t){d(at,t.add,t),this.group.add(t.getgroup())},this)},_buildsplitlineandarea:function(t){function e(t,e,i){var n=i%e.length;return t[n]=t[n]||[],n}var i=t.coordinatesystem,n=i.getindicatoraxes();if(n.length){var o=t.get("shape"),a=t.getmodel("splitline"),s=t.getmodel("splitarea"),l=a.getmodel("linestyle"),u=s.getmodel("areastyle"),h=a.get("show"),c=s.get("show"),p=l.get("color"),g=u.get("color");p=y(p)?p:[p],g=y(g)?g:[g];var m=[],v=[];if("circle"===o)for(var x=n[0].gettickscoords(),_=i.cx,w=i.cy,b=0;b"+f(i,function(i,n){var o=e.get(e.mapdimension(i.dim),t);return zo(i.name+" : "+o)}).join("
")},defaultoption:{zlevel:0,z:2,coordinatesystem:"radar",legendhoverlink:!0,radarindex:0,linestyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptycircle",symbolsize:4}});xs({type:"radar",render:function(t,e,n){function o(t,e){var i=t.getitemvisual(e,"symbol")||"circle",n=t.getitemvisual(e,"color");if("none"!==i){var o=xu(t.getitemvisual(e,"symbolsize")),a=ml(i,-1,-1,2,2,n);return a.attr({style:{strokenoscale:!0},z2:100,scale:[o[0]/2,o[1]/2]}),a}}function a(e,i,n,a,r,s){n.removeall();for(var l=0;l"+zo(n+" : "+i)},gettooltipposition:function(t){if(null!=t){var e=this.getdata().getname(t),i=this.coordinatesystem,n=i.getregion(e);return n&&i.datatopoint(n.center)}},setzoom:function(t){this.option.zoom=t},setcenter:function(t){this.option.center=t},defaultoption:{zlevel:0,z:2,coordinatesystem:"geo",map:"",left:"center",top:"center",aspectscale:.75,showlegendsymbol:!0,datarangehoverlink:!0,boundingcoords:null,center:null,zoom:1,scalelimit:null,label:{show:!1,color:"#000"},itemstyle:{borderwidth:.5,bordercolor:"#444",areacolor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemstyle:{areacolor:"rgba(255,215,0,0.8)"}}}});h(gt,mt);var ft="\0_ec_interaction_mutex";hs({type:"takeglobalcursor",event:"globalcursortaken",update:"update"},function(){}),h(ah,$x);var wt={axispointer:1,tooltip:1,brush:1};xh.prototype={constructor:xh,draw:function(t,e,i,n,o){var a="geo"===t.maintype,r=t.getdata&&t.getdata();a&&e.eachcomponent({maintype:"series",subtype:"map"},function(e){r||e.gethostgeomodel()!==t||(r=e.getdata())});var s=t.coordinatesystem,l=this.group,u=s.scale,h={position:s.position,scale:u};!l.childat(0)||o?l.attr(h):fo(l,h,t),l.removeall();var c=["itemstyle"],f=["emphasis","itemstyle"],p=["label"],g=["emphasis","label"],m=z();d(s.regions,function(e){var i=m.get(e.name)||m.set(e.name,new l_),n=new kb({shape:{paths:[]}});i.add(n);var o,s=(c=t.getregionmodel(e.name)||t).getmodel(c),h=c.getmodel(f),v=mh(s),y=mh(h),x=c.getmodel(p),_=c.getmodel(g);if(r){o=r.indexofname(e.name);var w=r.getitemvisual(o,"color",!0);w&&(v.fill=w)}d(e.geometries,function(t){if("polygon"===t.type){n.shape.paths.push(new zb({shape:{points:t.exterior}}));for(var e=0;e<(t.interiors?t.interiors.length:0);e++)n.shape.paths.push(new zb({shape:{points:t.interiors[e]}}))}}),n.setstyle(v),n.style.strokenoscale=!0,n.culling=!0;var b=x.get("show"),s=_.get("show"),m=r&&isnan(r.get(r.mapdimension("value"),o)),i=r&&r.getitemlayout(o);if(a||m&&(b||s)||i&&i.showlabel){var d,t=a?e.name:o;(!r||o>=0)&&(d=t);var a=new zb({position:e.center.slice(),scale:[1/u[0],1/u[1]],z2:10,silent:!0});io(a.style,a.hoverstyle={},x,_,{labelfetcher:d,labeldataindex:t,defaulttext:e.name,useinsidestyle:!1},{textalign:"center",textverticalalign:"middle"}),i.add(a)}if(r)r.setitemgraphicel(o,i);else{var c=t.getregionmodel(e.name);n.eventdata={componenttype:"geo",geoindex:t.componentindex,name:e.name,region:c&&c.option||{}}}(i.__regions||(i.__regions=[])).push(e),eo(i,y,{hoversilentontouch:!!t.get("selectedmode")}),l.add(i)}),this._updatecontroller(t,e,i),vh(this,t,l,i,n),yh(t,l)},remove:function(){this.group.removeall(),this._controller.dispose(),this._controllerhost={}},_updatecontroller:function(t,e,i){function n(){var e={type:"georoam",componenttype:l};return e[l+"id"]=t.id,e}var o=t.coordinatesystem,r=this._controller,s=this._controllerhost;s.zoomlimit=t.get("scalelimit"),s.zoom=o.getzoom(),r.enable(t.get("roam")||!1);var l=t.maintype;r.off("pan").on("pan",function(t,e){this._mousedownflag=!1,fh(s,t,e),i.dispatchaction(a(n(),{dx:t,dy:e}))},this),r.off("zoom").on("zoom",function(t,e,o){if(this._mousedownflag=!1,ph(s,t,e,o),i.dispatchaction(a(n(),{zoom:t,originx:e,originy:o})),this._updategroup){var r=this.group,l=r.scale;r.traverse(function(t){"text"===t.type&&t.attr("scale",[1/l[0],1/l[1]])})}},this),r.setpointerchecker(function(e,n,a){return o.getviewrectafterroam().contain(n,a)&&!gh(e,i,t)})}},xs({type:"map",render:function(t,e,i,n){if(!n||"maptoggleselect"!==n.type||n.from!==this.uid){var o=this.group;if(o.removeall(),!t.gethostgeomodel()){if(n&&"georoam"===n.type&&"series"===n.componenttype&&n.seriesid===t.id)(a=this._mapdraw)&&o.add(a.group);else if(t.needsdrawmap){var a=this._mapdraw||new xh(i,!0);o.add(a.group),a.draw(t,e,i,this,n),this._mapdraw=a}else this._mapdraw&&this._mapdraw.remove(),this._mapdraw=null;t.get("showlegendsymbol")&&e.getcomponent("legend")&&this._rendersymbols(t,e,i)}}},remove:function(){this._mapdraw&&this._mapdraw.remove(),this._mapdraw=null,this.group.removeall()},dispose:function(){this._mapdraw&&this._mapdraw.remove(),this._mapdraw=null},_rendersymbols:function(t,e,i){var n=t.originaldata,o=this.group;n.each(n.mapdimension("value"),function(e,i){if(!isnan(e)){var a=n.getitemlayout(i);if(a&&a.point){var r=a.point,s=a.offset,l=new rb({style:{fill:t.getdata().getvisual("color")},shape:{cx:r[0]+9*s,cy:r[1],r:3},silent:!0,z2:s?8:10});if(!s){var u=t.mainseries.getdata(),h=n.getname(i),c=u.indexofname(h),d=n.getitemmodel(i),f=d.getmodel("label"),p=d.getmodel("emphasis.label"),g=u.getitemgraphicel(c),m=t(t.getformattedlabel(i,"normal"),h),v=t(t.getformattedlabel(i,"emphasis"),m),y=function(){var t=no({},p,{text:p.get("show")?v:null},{isrecttext:!0,useinsidestyle:!1},!0);l.style.extendfrom(t),l.__maporiginalz2=l.z2,l.z2+=1},x=function(){no(l.style,f,{text:f.get("show")?m:null,textposition:f.getshallow("position")||"bottom"},{isrecttext:!0,useinsidestyle:!1}),null!=l.__maporiginalz2&&(l.z2=l.__maporiginalz2,l.__maporiginalz2=null)};g.on("mouseover",y).on("mouseout",x).on("emphasis",y).on("normal",x),x()}o.add(l)}}})}}),hs({type:"georoam",event:"georoam",update:"updatetransform"},function(t,e){var i=t.componenttype||"series";e.eachcomponent({maintype:i,query:t},function(e){var n=e.coordinatesystem;if("geo"===n.type){var o=_h(n,t,e.get("scalelimit"));e.setcenter&&e.setcenter(o.center),e.setzoom&&e.setzoom(o.zoom),"series"===i&&d(e.seriesgroup,function(t){t.setcenter(o.center),t.setzoom(o.zoom)})}})});ds(function(t){var e={};t.eachseriesbytype("map",function(i){var n=i.getmaptype();if(!i.gethostgeomodel()&&!e[n]){var o={};d(i.seriesgroup,function(e){var i=e.coordinatesystem,n=e.originaldata;e.get("showlegendsymbol")&&t.getcomponent("legend")&&n.each(n.mapdimension("value"),function(t,e){var a=n.getname(e),r=i.getregion(a);if(r&&!isnan(t)){var s=o[a]||0,l=i.datatopoint(r.center);o[a]=s+1,n.setitemlayout(e,{point:l,offset:s})}})});var a=i.getdata();a.each(function(t){var e=a.getname(t),i=a.getitemlayout(t)||{};i.showlabel=!o[e],a.setitemlayout(t,i)}),e[n]=!0}})}),fs(function(t){t.eachseriesbytype("map",function(t){var e=t.get("color"),i=t.getmodel("itemstyle"),n=i.get("areacolor"),o=i.get("color")||e[t.seriesindex%e.length];t.getdata().setvisual({areacolor:n,color:o})})}),us(qm.processor.statistic,function(t){var e={};t.eachseriesbytype("map",function(t){var i=t.gethostgeomodel(),n=i?"o"+i.id:"i"+t.getmaptype();(e[n]=e[n]||[]).push(t)}),d(e,function(t,e){for(var i=wh(f(t,function(t){return t.getdata()}),t[0].get("mapvaluecalculation")),n=0;ne&&(e=n.height)}this.height=e+1},getnodebyid:function(t){if(this.getid()===t)return this;for(var e=0,i=this.children,n=i.length;e=0&&this.hosttree.data.setitemlayout(this.dataindex,t,e)},getlayout:function(){return this.hosttree.data.getitemlayout(this.dataindex)},getmodel:function(t){if(!(this.dataindex<0)){var e,i=this.hosttree,n=i.data.getitemmodel(this.dataindex),o=this.getlevelmodel();return o||0!==this.children.length&&(0===this.children.length||!1!==this.isexpand)||(e=this.getleavesmodel()),n.getmodel(t,(o||e||i.hostmodel).getmodel(t))}},getlevelmodel:function(){return(this.hosttree.levelmodels||[])[this.depth]},getleavesmodel:function(){return this.hosttree.leavesmodel},setvisual:function(t,e){this.dataindex>=0&&this.hosttree.data.setitemvisual(this.dataindex,t,e)},getvisual:function(t,e){return this.hosttree.data.getitemvisual(this.dataindex,t,e)},getrawindex:function(){return this.hosttree.data.getrawindex(this.dataindex)},getid:function(){return this.hosttree.data.getid(this.dataindex)},isancestorof:function(t){for(var e=t.parentnode;e;){if(e===this)return!0;e=e.parentnode}return!1},isdescendantof:function(t){return t!==this&&t.isancestorof(this)}},lh.prototype={constructor:lh,type:"tree",eachnode:function(t,e,i){this.root.eachnode(t,e,i)},getnodebydataindex:function(t){var e=this.data.getrawindex(t);return this._nodes[e]},getnodebyname:function(t){return this.root.getnodebyname(t)},update:function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;ia&&(a=t.depth)});var r=t.expandandcollapse&&t.initialtreedepth>=0?t.initialtreedepth:a;return o.root.eachnode("preorder",function(t){var e=t.hosttree.data.getrawdataitem(t.dataindex);t.isexpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=r}),o.data},formattooltip:function(t){for(var e=this.getdata().tree,i=e.root.children[0],n=e.getnodebydataindex(t),o=n.getvalue(),a=n.name;n&&n!==i;)a=n.parentnode.name+"."+a,n=n.parentnode;return zo(a+(isnan(o)||null==o?"":" : "+o))},defaultoption:{zlevel:0,z:2,left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",orient:"horizontal",symbol:"emptycircle",symbolsize:7,expandandcollapse:!0,initialtreedepth:2,linestyle:{color:"#ccc",width:1.5,curveness:.5},itemstyle:{color:"lightsteelblue",bordercolor:"#c23531",borderwidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationeasing:"linear",animationduration:700,animationdurationupdate:1e3}}),xs({type:"tree",init:function(t,e){this._oldtree,this._maingroup=new l_,this.group.add(this._maingroup)},render:function(t,e,i,n){var o=t.getdata(),a=t.layoutinfo,r=this._maingroup,s=t.get("layout");"radial"===s?r.attr("position",[a.x+a.width/2,a.y+a.height/2]):r.attr("position",[a.x,a.y]);var l=this._data,u={expandandcollapse:t.get("expandandcollapse"),layout:s,orient:t.get("orient"),curvature:t.get("linestyle.curveness"),symbolrotate:t.get("symbolrotate"),symboloffset:t.get("symboloffset"),hoveranimation:t.get("hoveranimation"),usenamelabel:!0,fadein:!0};o.diff(l).add(function(e){uh(o,e)&&xh(o,e,null,r,t,u)}).update(function(e,i){var n=l.getitemgraphicel(i);uh(o,e)?xh(o,e,n,r,t,u):n&&yh(o,e,n,r,t,u)}).remove(function(e){var i=l.getitemgraphicel(e);yh(o,e,i,r,t,u)}).execute(),!0===u.expandandcollapse&&o.eachitemgraphicel(function(e,n){e.off("click").on("click",function(){i.dispatchaction({type:"treeexpandandcollapse",seriesid:t.id,dataindex:n})})}),this._data=o},dispose:function(){},remove:function(){this._maingroup.removeall(),this._data=null}}),hs({type:"treeexpandandcollapse",event:"treeexpandandcollapse",update:"update"},function(t,e){e.eachcomponent({maintype:"series",subtype:"tree",query:t},function(e){var i=t.dataindex,n=e.getdata().tree.getnodebydataindex(i);n.isexpand=!n.isexpand})});var xt=function(t,e){var i=rh(t,e);t.layoutinfo=i;var n=t.get("layout"),o=0,a=0,r=null;"radial"===n?(o=2*math.pi,a=math.min(i.height,i.width)/2,r=eh(function(t,e){return(t.parentnode===e.parentnode?1:2)/t.depth})):(o=i.width,a=i.height,r=eh());var s=t.getdata().tree.root,l=s.children[0];ph(s),$h(l,nh,r),s.hiernode.modifier=-l.hiernode.prelim,kh(l,oh);var u=l,h=l,c=l;kh(l,function(t){var e=t.getlayout().x;eh.getlayout().x&&(h=t),t.depth>c.depth&&(c=t)});var d=u===h?1:r(u,h)/2,f=d-u.getlayout().x,p=0,g=0,m=0,v=0;"radial"===n?(p=o/(h.getlayout().x+d+f),g=a/(c.depth-1||1),kh(l,function(t){m=(t.getlayout().x+f)*p,v=(t.depth-1)*g;var e=zh(m,v);t.setlayout({x:e.x,y:e.y,rawx:m,rawy:v},!0)})):"horizontal"===t.get("orient")?(g=a/(h.getlayout().x+d+f),p=o/(c.depth-1||1),kh(l,function(t){v=(t.getlayout().x+f)*g,m=(t.depth-1)*p,t.setlayout({x:m,y:v},!0)})):(p=o/(h.getlayout().x+d+f),g=a/(c.depth-1||1),kh(l,function(t){m=(t.getlayout().x+f)*p,v=(t.depth-1)*g,t.setlayout({x:m,y:v},!0)}))};fs(kd("tree","circle")),ds(function(t,e){t.eachseriesbytype("tree",function(t){xt(t,e)})}),ds(function(t,e){t.eachseriesbytype("tree",function(t){xt(t,e)})}),mm.extend({type:"series.treemap",layoutmode:"box",dependencies:["grid","polar"],_viewroot:null,defaultoption:{progressive:0,hoverlayerthreshold:1/0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipwindow:"origin",squareratio:.5*(1+math.sqrt(5)),leafdepth:null,drilldownicon:"▶",zoomtonoderatio:.1024,roam:!0,nodeclick:"zoomtonode",animation:!0,animationdurationupdate:900,animationeasing:"quinticinout",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyitemwidth:25,itemstyle:{color:"rgba(0,0,0,0.7)",bordercolor:"rgba(255,255,255,0.7)",borderwidth:1,shadowcolor:"rgba(150,150,150,1)",shadowblur:3,shadowoffsetx:0,shadowoffsety:0,textstyle:{color:"#fff"}},emphasis:{textstyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperlabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalalign:"middle"},itemstyle:{color:null,coloralpha:null,colorsaturation:null,borderwidth:0,gapwidth:0,bordercolor:"#fff",bordercolorsaturation:null},emphasis:{upperlabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalalign:"middle"}},visualdimension:0,visualmin:null,visualmax:null,color:[],coloralpha:null,colorsaturation:null,colormappingby:"index",visiblemin:10,childrenvisiblemin:null,levels:[]},getinitialdata:function(t,e){var i={name:t.name,children:t.data};ic(i);var n=t.levels||[];n=t.levels=nc(n,e);var o={};return o.levels=n,lh.createtree(i,this,o).data},optionupdated:function(){this.resetviewroot()},formattooltip:function(t){var e=this.getdata(),i=this.getrawvalue(t),n=wo(y(i)?i[0]:i);return zo(e.getname(t)+": "+n)},getdataparams:function(t){var e=mm.prototype.getdataparams.apply(this,arguments),i=this.getdata().tree.getnodebydataindex(t);return e.treepathinfo=ec(i,this),e},setlayoutinfo:function(t){this.layoutinfo=this.layoutinfo||{},a(this.layoutinfo,t)},mapidtoindex:function(t){var e=this._idindexmap;e||(e=this._idindexmap=z(),this._idindexmapcount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idindexmapcount++),i},getviewroot:function(){return this._viewroot},resetviewroot:function(t){t?this._viewroot=t:t=this._viewroot;var e=this.getrawdata().tree.root;t&&(t===e||e.contains(t))||(this._viewroot=e)}});var yt=5;oc.prototype={constructor:oc,render:function(t,e,i,n){var o=t.getmodel("breadcrumb"),a=this.group;if(a.removeall(),o.get("show")&&i){var r=o.getmodel("itemstyle"),s=r.getmodel("textstyle"),l={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:e.getwidth(),height:e.getheight()},emptyitemwidth:o.get("emptyitemwidth"),totalwidth:0,renderlist:[]};this._prepare(i,l,s),this._rendercontent(t,l,r,s,n),ta(a,l.pos,l.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentnode){var o=n.getmodel().get("name"),a=i.gettextrect(o),r=math.max(a.width+16,e.emptyitemwidth);e.totalwidth+=r+8,e.renderlist.push({node:n,text:o,width:r})}},_rendercontent:function(t,e,i,n,o){for(var a=0,s=e.emptyitemwidth,l=t.get("breadcrumb.height"),u=jo(e.pos,e.box),h=e.totalwidth,c=e.renderlist,d=c.length-1;d>=0;d--){var f=c[d],p=f.node,g=f.width,m=f.text;h>u.width&&(h-=g-s,g=s,m=null);var y=new zb({shape:{points:ac(a,0,g,l,d===c.length-1,0===d)},style:r(i.getitemstyle(),{linejoin:"bevel",text:m,textfill:n.gettextcolor(),textfont:n.getfont()}),z:10,onclick:v(o,p)});this.group.add(y),rc(y,t,p),a+=g+8}},remove:function(){this.group.removeall()}};var qt=m,$t=l_,kt=jb,jt=d,qt=["label"],ta=["emphasis","label"],ea=["upperlabel"],ia=["emphasis","upperlabel"],na=10,oa=1,aa=2,ra=lw([["fill","color"],["stroke","strokecolor"],["linewidth","strokewidth"],["shadowblur"],["shadowoffsetx"],["shadowoffsety"],["shadowcolor"]]),sa=function(t){var e=ra(t);return e.stroke=e.fill=e.linewidth=null,e};xs({type:"treemap",init:function(t,e){this._containergroup,this._storage={nodegroup:[],background:[],content:[]},this._oldtree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){if(!(l(e.findcomponents({maintype:"series",subtype:"treemap",query:n}),t)<0)){this.seriesmodel=t,this.api=i,this.ecmodel=e;var o=jh(n,["treemapzoomtonode","treemaproottonode"],t),a=n&&n.type,r=t.layoutinfo,s=!this._oldtree,u=this._storage,h="treemaproottonode"===a&&o&&u?{rootnodegroup:u.nodegroup[o.node.getrawindex()],direction:n.direction}:null,c=this._givecontainergroup(r),d=this._dorender(c,t,h);s||a&&"treemapzoomtonode"!==a&&"treemaproottonode"!==a?d.renderfinally():this._doanimation(c,d,t,h),this._resetcontroller(i),this._renderbreadcrumb(t,i,o)}},_givecontainergroup:function(t){var e=this._containergroup;return e||(e=this._containergroup=new $t,this._initevents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_dorender:function(t,e,i){function n(t,e,i,o,a){function r(t){return t.getid()}function s(r,s){var l=null!=r?t[r]:null,u=null!=s?e[s]:null,c=h(l,u,i,a);c&&n(l&&l.viewchildren||[],u&&u.viewchildren||[],c,o,a+1)}o?(e=t,jt(t,function(t,e){!t.isremoved()&&s(e,e)})):new bs(e,t,r,r).add(s).update(s).remove(v(s,null)).execute()}var o=e.getdata().tree,a=this._oldtree,r={nodegroup:[],background:[],content:[]},s={nodegroup:[],background:[],content:[]},l=this._storage,u=[],h=v(lc,e,s,l,i,r,u);n(o.root?[o.root]:[],a&&a.root?[a.root]:[],t,o===a||!a,0);var c=function(t){var e={nodegroup:[],background:[],content:[]};return t&&jt(t,function(t,i){var n=e[i];jt(t,function(t){t&&(n.push(t),t.__tmwilldelete=1)})}),e}(l);return this._oldtree=o,this._storage=s,{lastsforanimation:r,willdeleteels:c,renderfinally:function(){jt(c,function(t){jt(t,function(t){t.parent&&t.parent.remove(t)})}),jt(u,function(t){t.invisible=!0,t.dirty()})}}},_doanimation:function(t,e,i,n){if(i.get("animation")){var o=i.get("animationdurationupdate"),r=i.get("animationeasing"),s=sc();jt(e.willdeleteels,function(t,e){jt(t,function(t,i){if(!t.invisible){var a,l=t.parent;if(n&&"drilldown"===n.direction)a=l===n.rootnodegroup?{shape:{x:0,y:0,width:l.__tmnodewidth,height:l.__tmnodeheight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,h=0;l.__tmwilldelete||(u=l.__tmnodewidth/2,h=l.__tmnodeheight/2),a="nodegroup"===e?{position:[u,h],style:{opacity:0}}:{shape:{x:u,y:h,width:0,height:0},style:{opacity:0}}}a&&s.add(t,a,o,r)}})}),jt(this._storage,function(t,i){jt(t,function(t,n){var l=e.lastsforanimation[i][n],u={};l&&("nodegroup"===i?l.old&&(u.position=t.position.slice(),t.attr("position",l.old)):(l.old&&(u.shape=a({},t.shape),t.setshape(l.old)),l.fadein?(t.setstyle("opacity",0),u.style={opacity:1}):1!==t.style.opacity&&(u.style={opacity:1})),s.add(t,u,o,r))})},this),this._state="animating",s.done(qt(function(){this._state="ready",e.renderfinally()},this)).start()}},_resetcontroller:function(t){var e=this._controller;e||((e=this._controller=new ah(t.getzr())).enable(this.seriesmodel.get("roam")),e.on("pan",qt(this._onpan,this)),e.on("zoom",qt(this._onzoom,this)));var i=new kt(0,0,t.getwidth(),t.getheight());e.setpointerchecker(function(t,e,n){return i.contain(e,n)})},_clearcontroller:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onpan:function(t,e){if("animating"!==this._state&&(math.abs(t)>3||math.abs(e)>3)){var i=this.seriesmodel.getdata().tree.root;if(!i)return;var n=i.getlayout();if(!n)return;this.api.dispatchaction({type:"treemapmove",from:this.uid,seriesid:this.seriesmodel.id,rootrect:{x:n.x+t,y:n.y+e,width:n.width,height:n.height}})}},_onzoom:function(t,e,i){if("animating"!==this._state){var n=this.seriesmodel.getdata().tree.root;if(!n)return;var o=n.getlayout();if(!o)return;var a=new kt(o.x,o.y,o.width,o.height),r=this.seriesmodel.layoutinfo;e-=r.x,i-=r.y;var s=st();ct(s,s,[-e,-i]),ft(s,s,[t,t]),ct(s,s,[e,i]),a.applytransform(s),this.api.dispatchaction({type:"treemaprender",from:this.uid,seriesid:this.seriesmodel.id,rootrect:{x:a.x,y:a.y,width:a.width,height:a.height}})}},_initevents:function(t){t.on("click",function(t){if("ready"===this._state){var e=this.seriesmodel.get("nodeclick",!0);if(e){var i=this.findtarget(t.offsetx,t.offsety);if(i){var n=i.node;if(n.getlayout().isleafroot)this._roottonode(i);else if("zoomtonode"===e)this._zoomtonode(i);else if("link"===e){var o=n.hosttree.data.getitemmodel(n.dataindex),a=o.get("link",!0),r=o.get("target",!0)||"blank";a&&window.open(a,r)}}}}},this)},_renderbreadcrumb:function(t,e,i){i||(i=null!=t.get("leafdepth",!0)?{node:t.getviewroot()}:this.findtarget(e.getwidth()/2,e.getheight()/2))||(i={node:t.getdata().tree.root}),(this._breadcrumb||(this._breadcrumb=new oc(this.group))).render(t,e,i.node,qt(function(e){"animating"!==this._state&&(tc(t.getviewroot(),e)?this._roottonode({node:e}):this._zoomtonode({node:e}))},this))},remove:function(){this._clearcontroller(),this._containergroup&&this._containergroup.removeall(),this._storage={nodegroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearcontroller()},_zoomtonode:function(t){this.api.dispatchaction({type:"treemapzoomtonode",from:this.uid,seriesid:this.seriesmodel.id,targetnode:t.node})},_roottonode:function(t){this.api.dispatchaction({type:"treemaproottonode",from:this.uid,seriesid:this.seriesmodel.id,targetnode:t.node})},findtarget:function(t,e){var i;return this.seriesmodel.getviewroot().eachnode({attr:"viewchildren",order:"preorder"},function(n){var o=this._storage.background[n.getrawindex()];if(o){var a=o.transformcoordtolocal(t,e),r=o.shape;if(!(r.x<=a[0]&&a[0]<=r.x+r.width&&r.y<=a[1]&&a[1]<=r.y+r.height))return!1;i={node:n,offsetx:a[0],offsety:a[1]}}},this),i}});for(var la=["treemapzoomtonode","treemaprender","treemapmove"],ua=0;ua=0&&t.call(e,i[o],o)},ca.eachedge=function(t,e){for(var i=this.edges,n=i.length,o=0;o=0&&i[o].node1.dataindex>=0&&i[o].node2.dataindex>=0&&t.call(e,i[o],o)},ca.breadthfirsttraverse=function(t,e,i,n){if(wc.isinstance(e)||(e=this._nodesmap[fc(e)]),e){for(var o="out"===i?"outedges":"in"===i?"inedges":"edges",a=0;a=0&&i.node2.dataindex>=0});for(var o=0,a=n.length;o=0&&this[t][e].setitemvisual(this.dataindex,i,n)},getvisual:function(i,n){return this[t][e].getitemvisual(this.dataindex,i,n)},setlayout:function(i,n){this.dataindex>=0&&this[t][e].setitemlayout(this.dataindex,i,n)},getlayout:function(){return this[t][e].getitemlayout(this.dataindex)},getgraphicel:function(){return this[t][e].getitemgraphicel(this.dataindex)},getrawindex:function(){return this[t][e].getrawindex(this.dataindex)}}};h(wc,la("hostgraph","data")),h(hc,la("hostgraph","edgedata")),aa.node=wc,aa.edge=hc,fi(wc),fi(hc);var ka=function(t,e,i,n,o){for(var a=new aa(n),r=0;r "+d)),u++)}var f,p=i.get("coordinatesystem");if("cartesian2d"===p||"polar"===p)f=hs(t,i);else{var g=ca.get(p),m=ci(t,{coorddimensions:(g&&"view"!==g.type?g.dimensions||[]:[]).concat(["value"])});(f=new di(m,i)).initdata(t)}var v=new di(["value"],i);return v.initdata(l,s),o&&o(f,v),bh({maindata:f,struct:a,structattr:"graph",datas:{node:f,edge:v},datasattr:{node:"data",edge:"edgedata"}}),a.update(),a},pa=ys({type:"series.graph",init:function(t){pa.superapply(this,"init",arguments),this.legenddataprovider=function(){return this._categoriesdata},this.filldatatextstyle(t.edges||t.links),this._updatecategoriesdata()},mergeoption:function(t){pa.superapply(this,"mergeoption",arguments),this.filldatatextstyle(t.edges||t.links),this._updatecategoriesdata()},mergedefaultandtheme:function(t){pa.superapply(this,"mergedefaultandtheme",arguments),mi(t,["edgelabel"],["show"])},getinitialdata:function(t,e){var i=t.edges||t.links||[],n=t.data||t.nodes||[],o=this;if(n&&i)return ka(n,i,this,!0,function(t,i){function n(t){return(t=this.parsepath(t))&&"label"===t[0]?r:this.parentmodel}t.wrapmethod("getitemmodel",function(t){var e=o._categoriesmodels[t.getshallow("category")];return e&&(e.parentmodel=t.parentmodel,t.parentmodel=e),t});var a=o.getmodel("edgelabel"),r=new wo({label:a.option},a.parentmodel,e);i.wrapmethod("getitemmodel",function(t){return t.customizegetparent(n),t})}).data},getgraph:function(){return this.getdata().graph},getedgedata:function(){return this.getgraph().edgedata},getcategoriesdata:function(){return this._categoriesdata},formattooltip:function(t,e,i){if("edge"===i){var n=this.getdata(),o=this.getdataparams(t,i),a=n.graph.getedgebyindex(t),r=n.getname(a.node1.dataindex),s=n.getname(a.node2.dataindex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=zo(l.join(" > ")),o.value&&(l+=" : "+zo(o.value)),l}return pa.superapply(this,"formattooltip",arguments)},_updatecategoriesdata:function(){var t=f(this.option.categories||[],function(t){return null!=t.value?t:a({value:0},t)}),e=new di(["value"],this);e.initdata(t),this._categoriesdata=e,this._categoriesmodels=e.maparray(function(t){return e.getitemmodel(t,!0)})},setzoom:function(t){this.option.zoom=t},setcenter:function(t){this.option.center=t},isanimationenabled:function(){return pa.supercall(this,"isanimationenabled")&&!("force"===this.get("layout")&&this.get("force.layoutanimation"))},defaultoption:{zlevel:0,z:2,coordinatesystem:"view",legendhoverlink:!0,hoveranimation:!0,layout:null,focusnodeadjacency:!1,circular:{rotatelabel:!1},force:{initlayout:null,repulsion:[0,50],gravity:.1,edgelength:30,layoutanimation:!0},left:"center",top:"center",symbol:"circle",symbolsize:10,edgesymbol:["none","none"],edgesymbolsize:10,edgelabel:{position:"middle"},draggable:!1,roam:!1,center:null,zoom:1,nodescaleratio:.6,label:{show:!1,formatter:"{b}"},itemstyle:{},linestyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),na=xb.prototype,oa=qb.prototype,ea=en({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildpath:function(t,e){(zc(e)?na:oa).buildpath(t,e)},pointat:function(t){return zc(this.shape)?na.pointat.call(this,t):oa.pointat.call(this,t)},tangentat:function(t){var e=this.shape,i=zc(e)?[e.x2-e.x1,e.y2-e.y1]:oa.tangentat.call(this,t);return q(i,i)}}),za=["fromsymbol","tosymbol"],ra=qc.prototype;ra.beforeupdate=function(){var t=this,e=t.childofname("fromsymbol"),i=t.childofname("tosymbol"),n=t.childofname("label");if(e||i||!n.ignore){for(var o=1,a=this.parent;a;)a.scale&&(o/=a.scale[0]),a=a.parent;var r=t.childofname("line");if(this.__dirty||r.__dirty){var s=r.shape.percent,l=r.pointat(0),u=r.pointat(s),h=u([],u,l);if(q(h,h),e&&(e.attr("position",l),c=r.tangentat(0),e.attr("rotation",math.pi/2-math.atan2(c[1],c[0])),e.attr("scale",[o*s,o*s])),i){i.attr("position",u);var c=r.tangentat(1);i.attr("rotation",-math.pi/2-math.atan2(c[1],c[0])),i.attr("scale",[o*s,o*s])}if(!n.ignore){n.attr("position",u);var d,f,p,g=5*o;if("end"===n.__position)d=[h[0]*g+u[0],h[1]*g+u[1]],f=h[0]>.8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";else if("middle"===n.__position){var m=s/2,v=[(c=r.tangentat(m))[1],-c[0]],y=r.pointat(m);v[1]>0&&(v[0]=-v[0],v[1]=-v[1]),d=[y[0]+v[0]*g,y[1]+v[1]*g],f="center",p="bottom";var x=-math.atan2(c[1],c[0]);u[0].8?"right":h[0]<-.8?"left":"center",p=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";n.attr({style:{textverticalalign:n.__verticalalign||p,textalign:n.__textalign||f},position:d,scale:[o,o]})}}}},ra._createline=function(t,e,i){var n=t.hostmodel,o=xc(t.getitemlayout(e));o.shape.percent=0,po(o,{shape:{percent:1}},n,e),this.add(o);var a=new zb({name:"label"});this.add(a),d(za,function(i){var n=jc(i,t,e);this.add(n),this[uc(i)]=t.getitemvisual(e,i)},this),this._updatecommonstl(t,e,i)},ra.updatedata=function(t,e,i){var n=t.hostmodel,o=this.childofname("line"),a=t.getitemlayout(e),r={shape:{}};yc(r.shape,a),fo(o,r,n,e),d(za,function(i){var n=t.getitemvisual(e,i),o=uc(i);if(this[o]!==n){this.remove(this.childofname(i));var a=jc(i,t,e);this.add(a)}this[o]=n},this),this._updatecommonstl(t,e,i)},ra._updatecommonstl=function(t,e,i){var n=t.hostmodel,o=this.childofname("line"),a=i&&i.linestyle,s=i&&i.hoverlinestyle,l=i&&i.labelmodel,u=i&&i.hoverlabelmodel;if(!i||t.hasitemoption){var h=t.getitemmodel(e);a=h.getmodel("linestyle").getlinestyle(),s=h.getmodel("emphasis.linestyle").getlinestyle(),l=h.getmodel("label"),u=h.getmodel("emphasis.label")}var c=t.getitemvisual(e,"color"),f=a(t.getitemvisual(e,"opacity"),a.opacity,1);o.usestyle(r({strokenoscale:!0,fill:"none",stroke:c,opacity:f},a)),o.hoverstyle=s,d(za,function(t){var e=this.childofname(t);e&&(e.setcolor(c),e.setstyle({opacity:f}))},this);var p,g,m,v=l.getshallow("show"),y=u.getshallow("show"),x=this.childofname("label");if(v||y){if(p=c||"#000",null==(g=n.getformattedlabel(e,"normal",t.datatype))){var _=n.getrawvalue(e);g=null==_?t.getname(e):isfinite(_)?ao(_):_}m=t(n.getformattedlabel(e,"emphasis",t.datatype),g)}if(v){var w=no(x.style,l,{text:g},{autocolor:p});x.__textalign=w.textalign,x.__verticalalign=w.textverticalalign,x.__position=l.get("position")||"middle"}else x.setstyle("text",null);x.hoverstyle=y?{text:m,textfill:u.gettextcolor(!0),fontstyle:u.getshallow("fontstyle"),fontweight:u.getshallow("fontweight"),fontsize:u.getshallow("fontsize"),fontfamily:u.getshallow("fontfamily")}:{text:null},x.ignore=!v&&!y,eo(this)},ra.highlight=function(){this.trigger("emphasis")},ra.downplay=function(){this.trigger("normal")},ra.updatelayout=function(t,e){this.setlinepoints(t.getitemlayout(e))},ra.setlinepoints=function(t){var e=this.childofname("line");yc(e.shape,t),e.dirty()},u(qc,l_);var ba=$c.prototype;ba.ispersistent=function(){return!0},ba.updatedata=function(t){var e=this,i=e.group,n=e._linedata;e._linedata=t,n||i.removeall();var o=qc(t);t.diff(n).add(function(i){kc(e,t,i,o)}).update(function(i,a){jc(e,n,t,a,i,o)}).remove(function(t){i.remove(n.getitemgraphicel(t))}).execute()},ba.updatelayout=function(){var t=this._linedata;t.eachitemgraphicel(function(e,i){e.updatelayout(t,i)},this)},ba.incrementalprepareupdate=function(t){this._seriesscope=qc(t),this._linedata=null,this.group.removeall()},ba.incrementalupdate=function(t,e){for(var i=t.start;i=o/3?1:2),l=e.y-n(r)*a*(a>=o/3?1:2);r=e.angle-math.pi/2,t.moveto(s,l),t.lineto(e.x+i(r)*a,e.y+n(r)*a),t.lineto(e.x+i(e.angle)*o,e.y+n(e.angle)*o),t.lineto(e.x-i(r)*a,e.y-n(r)*a),t.lineto(s,l)}}),$a=2*math.pi,ka=(pr.extend({type:"gauge",render:function(t,e,i){this.group.removeall();var n=t.get("axisline.linestyle.color"),o=dd(t,i);this._rendermain(t,e,i,n,o)},dispose:function(){},_rendermain:function(t,e,i,n,o){for(var a=this.group,r=t.getmodel("axisline").getmodel("linestyle"),s=t.get("clockwise"),l=-t.get("startangle")/180*math.pi,u=-t.get("endangle")/180*math.pi,h=(u-l)%$a,c=l,d=r.get("width"),f=0;f=t&&(0===e?0:n[e-1][0]).4?"bottom":"middle",textalign:t<-.4?"left":t>.4?"right":"center"},{autocolor:p}),silent:!0}))}if(g.get("show")&&d!==v){for(var n=0;n<=y;n++){var t=math.cos(w),a=math.sin(w),o=new xb({shape:{x1:t*c+u,y1:a*c+h,x2:t*(c-_)+u,y2:a*(c-_)+h},silent:!0,style:i});"auto"===i.stroke&&o.setstyle({stroke:n((d+n/y)/v)}),l.add(o),w+=s}w-=s}else w+=b}},_renderpointer:function(t,e,i,n,o,a,r,s){var l=this.group,u=this._data;if(t.get("pointer.show")){var h=[+t.get("min"),+t.get("max")],c=[a,r],d=t.getdata(),f=d.mapdimension("value");d.diff(u).add(function(e){var i=new qa({shape:{angle:a}});po(i,{shape:{angle:do(d.get(f,e),h,c,!0)}},t),l.add(i),d.setitemgraphicel(e,i)}).update(function(e,i){var n=u.getitemgraphicel(i);fo(n,{shape:{angle:do(d.get(f,e),h,c,!0)}},t),l.add(n),d.setitemgraphicel(e,n)}).remove(function(t){var e=u.getitemgraphicel(t);l.remove(e)}).execute(),d.eachitemgraphicel(function(t,e){var i=d.getitemmodel(e),a=i.getmodel("pointer");t.setshape({x:o.cx,y:o.cy,width:to(a.get("width"),o.r),r:to(a.get("length"),o.r)}),t.usestyle(i.getmodel("itemstyle").getitemstyle()),"auto"===t.style.fill&&t.setstyle("fill",n(do(d.get(f,e),h,[0,1],!0))),eo(t,i.getmodel("emphasis.itemstyle").getitemstyle())}),this._data=d}else u&&u.eachitemgraphicel(function(t){l.remove(t)})},_rendertitle:function(t,e,i,n,o){var a=t.getdata(),r=a.mapdimension("value"),s=t.getmodel("title");if(s.get("show")){var l=s.get("offsetcenter"),u=o.cx+to(l[0],o.r),h=o.cy+to(l[1],o.r),c=+t.get("min"),d=+t.get("max"),f=n(do(t.getdata().get(r,0),[c,d],[0,1],!0));this.group.add(new zb({silent:!0,style:no({},s,{x:u,y:h,text:a.getname(0),textalign:"center",textverticalalign:"middle"},{autocolor:f,forcerich:!0})}))}},_renderdetail:function(t,e,i,n,o){var a=t.getmodel("detail"),r=+t.get("min"),s=+t.get("max");if(a.get("show")){var l=a.get("offsetcenter"),u=o.cx+to(l[0],o.r),h=o.cy+to(l[1],o.r),c=to(a.get("width"),o.r),d=to(a.get("height"),o.r),f=t.getdata(),p=f.get(f.mapdimension("value"),0),g=n(do(p,[r,s],[0,1],!0));this.group.add(new zb({silent:!0,style:no({},a,{x:u,y:h,text:fd(p,a.get("formatter")),textwidth:isnan(c)?null:c,textheight:isnan(d)?null:d,textalign:"center",textverticalalign:"middle"},{autocolor:g,forcerich:!0})}))}}}),ys({type:"series.funnel",init:function(t){ka.superapply(this,"init",arguments),this.legenddataprovider=function(){return this.getrawdata()},this._defaultlabelline(t)},getinitialdata:function(t,e){return gt(this,["value"])},_defaultlabelline:function(t){mi(t,"labelline",["show"]);var e=t.labelline,i=t.emphasis.labelline;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},getdataparams:function(t){var e=this.getdata(),i=ka.supercall(this,"getdataparams",t),n=e.mapdimension("value"),o=e.getsum(n);return i.percent=o?+(e.get(n,t)/o*100).tofixed(2):0,i.$vars.push("percent"),i},defaultoption:{zlevel:0,z:2,legendhoverlink:!0,left:80,top:60,right:80,bottom:60,minsize:"0%",maxsize:"100%",sort:"descending",gap:0,funnelalign:"center",label:{show:!0,position:"outer"},labelline:{show:!0,length:20,linestyle:{width:1,type:"solid"}},itemstyle:{bordercolor:"#fff",borderwidth:1},emphasis:{label:{show:!0}}}})),ja=pd.prototype,qa=["itemstyle","opacity"];ja.updatedata=function(t,e,i){var n=this.childat(0),o=t.hostmodel,a=t.getitemmodel(e),s=t.getitemlayout(e),l=t.getitemmodel(e).get(qa);l=null==l?1:l,n.usestyle({}),i?(n.setshape({points:s.points}),n.setstyle({opacity:0}),po(n,{style:{opacity:l}},o,e)):fo(n,{style:{opacity:l},shape:{points:s.points}},o,e);var u=a.getmodel("itemstyle"),h=t.getitemvisual(e,"color");n.setstyle(r({linejoin:"round",fill:h},u.getitemstyle(["opacity"]))),n.hoverstyle=u.getmodel("emphasis").getitemstyle(),this._updatelabel(t,e),eo(this)},ja._updatelabel=function(t,e){var i=this.childat(1),n=this.childat(2),o=t.hostmodel,a=t.getitemmodel(e),r=t.getitemlayout(e).label,s=t.getitemvisual(e,"color");fo(i,{shape:{points:r.linepoints||r.linepoints}},o,e),fo(n,{style:{x:r.x,y:r.y}},o,e),n.attr({rotation:r.rotation,origin:[r.x,r.y],z2:10});var l=a.getmodel("label"),u=a.getmodel("emphasis.label"),h=a.getmodel("labelline"),c=a.getmodel("emphasis.labelline"),s=t.getitemvisual(e,"color");io(n.style,n.hoverstyle={},l,u,{labelfetcher:t.hostmodel,labeldataindex:e,defaulttext:t.getname(e),autocolor:s,useinsidestyle:!!r.inside},{textalign:r.textalign,textverticalalign:r.verticalalign}),n.ignore=n.normalignore=!l.get("show"),n.hoverignore=!u.get("show"),i.ignore=i.normalignore=!h.get("show"),i.hoverignore=!c.get("show"),i.setstyle({stroke:s}),i.setstyle(h.getmodel("linestyle").getlinestyle()),i.hoverstyle=c.getmodel("linestyle").getlinestyle()},u(pd,l_);pr.extend({type:"funnel",render:function(t,e,i){var n=t.getdata(),o=this._data,a=this.group;n.diff(o).add(function(t){var e=new pd(n,t);n.setitemgraphicel(t,e),a.add(e)}).update(function(t,e){var i=o.getitemgraphicel(e);i.updatedata(n,t),a.add(i),n.setitemgraphicel(t,i)}).remove(function(t){var e=o.getitemgraphicel(t);a.remove(e)}).execute(),this._data=n},remove:function(){this.group.removeall(),this._data=null},dispose:function(){}});fs(_t("funnel")),ds(function(t,e,i){t.eachseriesbytype("funnel",function(t){var i=t.getdata(),n=i.mapdimension("value"),o=t.get("sort"),a=gd(t,e),r=md(i,o),s=[to(t.get("minsize"),a.width),to(t.get("maxsize"),a.width)],l=i.getdataextent(n),u=t.get("min"),h=t.get("max");null==u&&(u=math.min(l[0],0)),null==h&&(h=l[1]);var c=t.get("funnelalign"),d=t.get("gap"),f=(a.height-d*(i.count()-1))/i.count(),p=a.y,g=function(t,e){var o,r=do(i.get(n,t)||0,[u,h],s,!0);switch(c){case"left":o=a.x;break;case"center":o=a.x+(a.width-r)/2;break;case"right":o=a.x+a.width-r}return[[o,e],[o+r,e]]};"ascending"===o&&(f=-f,d=-d,p+=a.height,r=r.reverse());for(var m=0;ma&&(e[1-n]=e[n]+h.sign*a),e},ic=d,nc=math.min,oc=math.max,ac=math.floor,rc=math.ceil,sc=ao,lc=math.pi;bd.prototype={type:"parallel",constructor:bd,_init:function(t,e,i){var n=t.dimensions,o=t.parallelaxisindex;ic(n,function(t,i){var n=o[i],a=e.getcomponent("parallelaxis",n),r=this._axesmap.set(t,new tc(t,cl(a),[0,0],a.get("type"),n)),s="category"===r.type;r.onband=s&&a.get("boundarygap"),r.inverse=a.get("inverse"),a.axis=r,r.model=a,r.coordinatesystem=a.coordinatesystem=this},this)},update:function(t,e){this._updateaxesfromseries(this._model,t)},containpoint:function(t){var e=this._makelayoutinfo(),i=e.axisbase,n=e.layoutbase,o=e.pixeldimindex,a=t[1-o],r=t[o];return a>=i&&a<=i+e.axislength&&r>=n&&r<=n+e.layoutlength},getmodel:function(){return this._model},_updateaxesfromseries:function(t,e){e.eachseries(function(i){if(t.contains(i,e)){var n=i.getdata();ic(this.dimensions,function(t){var e=this._axesmap.get(t);e.scale.unionextentfromdata(n,n.mapdimension(t)),hl(e.scale,e.model)},this)}},this)},resize:function(t,e){this._rect=qo(t.getboxlayoutparams(),{width:e.getwidth(),height:e.getheight()}),this._layoutaxes()},getrect:function(){return this._rect},_makelayoutinfo:function(){var t,e=this._model,i=this._rect,n=["x","y"],o=["width","height"],a=e.get("layout"),r="horizontal"===a?0:1,s=i[o[r]],l=[0,s],u=this.dimensions.length,h=sd(e.get("axisexpandwidth"),l),c=sd(e.get("axisexpandcount")||0,[0,u]),d=e.get("axisexpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,f=e.get("axisexpandwindow");f?(t=sd(f[1]-f[0],l),f[1]=f[0]+t):(t=sd(h*(c-1),l),(f=[h*(e.get("axisexpandcenter")||ac(u/2))-t/2])[1]=f[0]+t);var p=(s-t)/(u-c);p<3&&(p=0);var g=[ac(sc(f[0]/h,1))+1,rc(sc(f[1]/h,1))-1],m=p/h*f[0];return{layout:a,pixeldimindex:r,layoutbase:i[n[r]],layoutlength:s,axisbase:i[n[1-r]],axislength:i[o[1-r]],axisexpandable:d,axisexpandwidth:h,axiscollapsewidth:p,axisexpandwindow:f,axiscount:u,wininnerindices:g,axisexpandwindow0pos:m}},_layoutaxes:function(){var t=this._rect,e=this._axesmap,i=this.dimensions,n=this._makelayoutinfo(),o=n.layout;e.each(function(t){var e=[0,n.axislength],i=t.inverse?1:0;t.setextent(e[i],e[1-i])}),ic(i,function(i,a){var r=(n.axisexpandable?id:md)(a,n),s={horizontal:{x:r.position,y:n.axislength},vertical:{x:0,y:r.position}},l={horizontal:lc/2,vertical:0},u=[s[o].x+t.x,s[o].y+t.y],h=l[o],c=st();dt(c,c,h),ct(c,c,u),this._axeslayout[i]={position:u,rotation:h,transform:c,axisnameavailablewidth:r.axisnameavailablewidth,axislabelshow:r.axislabelshow,nametruncatemaxwidth:r.nametruncatemaxwidth,tickdirection:1,labeldirection:1,labelinterval:e.get(i).getlabelinterval()}},this)},getaxis:function(t){return this._axesmap.get(t)},datatopoint:function(t,e){return this.axiscoordtopoint(this._axesmap.get(e).datatocoord(t),e)},eachactivestate:function(t,e,i){for(var n=this.dimensions,o=f(n,function(e){return t.mapdimension(e)}),a=this._axesmap,r=this.hasaxisbrushed(),s=0,l=t.count();so*(1-h[0])?(l="jump",r=s-o*(1-h[2])):(r=s-o*h[1])>=0&&(r=s-o*(1-h[1]))<=0&&(r=0),(r*=e.axisexpandwidth/u)?ec(r,n,a,"all"):l="none";else{o=n[1]-n[0];(n=[oc(0,a[1]*s/o-o/2)])[1]=nc(a[1],n[0]+o),n[0]=n[1]-o}return{axisexpandwindow:n,behavior:l}}},ca.register("parallel",{create:function(t,e){var i=[];return t.eachcomponent("parallel",function(n,o){var a=new bd(n,t,e);a.name="parallel_"+o,a.resize(n,e),n.coordinatesystem=a,a.model=n,i.push(a)}),t.eachseries(function(e){if("parallel"===e.get("coordinatesystem")){var i=t.querycomponents({maintype:"parallel",index:e.get("parallelindex"),id:e.get("parallelid")})[0];e.coordinatesystem=i.coordinatesystem}}),i}});var uc=ks.extend({type:"baseparallelaxis",axis:null,activeintervals:[],getareaselectstyle:function(){return lw([["fill","color"],["linewidth","borderwidth"],["stroke","bordercolor"],["width","width"],["opacity","opacity"]])(this.getmodel("areaselectstyle"))},setactiveintervals:function(t){var e=this.activeintervals=i(t);if(e)for(var n=e.length-1;n>=0;n--)co(e[n])},getactivestate:function(t){var e=this.activeintervals;if(!e.length)return"normal";if(null==t)return"inactive";for(var i=0,n=e.length;i5)return;var n=this._model.coordinatesystem.getslidedaxisexpandwindow([t.offsetx,t.offsety]);"none"!==n.behavior&&this._dispatchexpand({axisexpandwindow:n.axisexpandwindow})}this._mousedownpoint=null},mousemove:function(t){if(!this._mousedownpoint&&gf(this,"mousemove")){var e=this._model,i=e.coordinatesystem.getslidedaxisexpandwindow([t.offsetx,t.offsety]),n=i.behavior;"jump"===n&&this._throttleddispatchexpand.debouncenextcall(e.get("axisexpanddebounce")),this._throttleddispatchexpand("none"===n?null:{axisexpandwindow:i.axisexpandwindow,animation:"jump"===n&&null})}}};ls(function(t){yd(t),xd(t)}),mm.extend({type:"series.parallel",dependencies:["parallel"],visualcoloraccesspath:"linestyle.color",getinitialdata:function(t,e){this.option.progressive&&(this.option.animation=!1);var i=this.getsource();return mf(i,this),hs(i,this)},getrawindicesbyactivestate:function(t){var e=this.coordinatesystem,i=this.getdata(),n=[];return e.eachactivestate(i,function(e,o){t===e&&n.push(i.getrawindex(o))}),n},defaultoption:{zlevel:0,z:2,coordinatesystem:"parallel",parallelindex:0,label:{show:!1},inactiveopacity:.05,activeopacity:1,linestyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:!1,smooth:!1,animationeasing:"linear"}});pr.extend({type:"parallel",init:function(){this._datagroup=new l_,this.group.add(this._datagroup),this._data},render:function(t,e,i,n){this._renderfornormal(t,n)},dispose:function(){},_renderfornormal:function(t,e){var i=this._datagroup,n=t.getdata(),o=this._data,a=t.coordinatesystem,r=a.dimensions,s=t.option.smooth?.3:null;if(n.diff(o).add(function(t){_f(n,i,t,r,a)}).update(function(i,s){var l=o.getitemgraphicel(s),u=xf(n,i,r,a);n.setitemgraphicel(i,l),fo(l,{shape:{points:u}},e&&!1===e.animation?null:t,i)}).remove(function(t){var e=o.getitemgraphicel(t);i.remove(e)}).execute(),wf(n,s),!this._data){var l=yf(a,t,function(){settimeout(function(){i.removeclippath()})});i.setclippath(l)}this._data=n},remove:function(){this._datagroup&&this._datagroup.removeall(),this._data=null}});var lc=["linestyle","normal","opacity"];fs(function(t){t.eachseriesbytype("parallel",function(e){var i=e.getmodel("itemstyle"),n=e.getmodel("linestyle"),o=t.get("color"),a=n.get("color")||i.get("color")||o[e.seriesindex%o.length],r=e.get("inactiveopacity"),s=e.get("activeopacity"),l=e.getmodel("linestyle").getlinestyle(),u=e.coordinatesystem,h=e.getdata(),c={normal:l.opacity,active:s,inactive:r};u.eachactivestate(h,function(t,e){var i=h.getitemmodel(e),n=c[t];if("normal"===t){var o=i.get(lc,!0);null!=o&&(n=o)}h.setitemvisual(e,"opacity",n)}),h.setvisual("color",a)})});var kc=mm.extend({type:"series.sankey",layoutinfo:null,getinitialdata:function(t){var e=t.edges||t.links,i=t.data||t.nodes;if(i&&e)return ka(i,e,this,!0).data},getgraph:function(){return this.getdata().graph},getedgedata:function(){return this.getgraph().edgedata},formattooltip:function(t,e,i){if("edge"===i){var n=this.getdataparams(t,i),o=n.data,a=o.source+" -- "+o.target;return n.value&&(a+=" : "+n.value),zo(a)}return kc.supercall(this,"formattooltip",t,e)},defaultoption:{zlevel:0,z:2,coordinatesystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",nodewidth:20,nodegap:8,layoutiterations:32,label:{show:!0,position:"right",color:"#000",fontsize:12},itemstyle:{borderwidth:1,bordercolor:"#333"},linestyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},linestyle:{opacity:.6}},animationeasing:"linear",animationduration:1e3}}),pc=en({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0},buildpath:function(t,e){var i=e.extent/2;t.moveto(e.x1,e.y1-i),t.beziercurveto(e.cpx1,e.cpy1-i,e.cpx2,e.cpy2-i,e.x2,e.y2-i),t.lineto(e.x2,e.y2+i),t.beziercurveto(e.cpx2,e.cpy2+i,e.cpx1,e.cpy1+i,e.x1,e.y1+i),t.closepath()}});xs({type:"sankey",_model:null,render:function(t,e,i){var n=t.getgraph(),o=this.group,a=t.layoutinfo,r=t.getdata(),s=t.getdata("edge");this._model=t,o.removeall(),o.attr("position",[a.x,a.y]),n.eachedge(function(e){var i=new pc;i.dataindex=e.dataindex,i.seriesindex=t.seriesindex,i.datatype="edge";var n=e.getmodel("linestyle"),a=n.get("curveness"),r=e.node1.getlayout(),l=e.node2.getlayout(),u=e.getlayout();i.shape.extent=math.max(1,u.dy);var h=r.x+r.dx,c=r.y+u.sy+u.dy/2,d=l.x,f=l.y+u.ty+u.dy/2,p=h*(1-a)+d*a,g=c,m=h*a+d*(1-a),v=f;switch(i.setshape({x1:h,y1:c,x2:d,y2:f,cpx1:p,cpy1:g,cpx2:m,cpy2:v}),i.setstyle(n.getitemstyle()),i.style.fill){case"source":i.style.fill=e.node1.getvisual("color");break;case"target":i.style.fill=e.node2.getvisual("color")}eo(i,e.getmodel("emphasis.linestyle").getitemstyle()),o.add(i),s.setitemgraphicel(e.dataindex,i)}),n.eachnode(function(e){var i=e.getlayout(),n=e.getmodel(),a=n.getmodel("label"),s=n.getmodel("emphasis.label"),l=new jb({shape:{x:i.x,y:i.y,width:e.getlayout().dx,height:e.getlayout().dy},style:n.getmodel("itemstyle").getitemstyle()}),u=e.getmodel("emphasis.itemstyle").getitemstyle();io(l.style,u,a,s,{labelfetcher:t,labeldataindex:e.dataindex,defaulttext:e.id,isrecttext:!0}),l.setstyle("fill",e.getvisual("color")),eo(l,u),o.add(l),r.setitemgraphicel(e.dataindex,l),l.datatype="node"}),!this._data&&t.get("animation")&&o.setclippath(sf(o.getboundingrect(),t,function(){o.removeclippath()})),this._data=t.getdata()},dispose:function(){}});ds(function(t,e,i){t.eachseriesbytype("sankey",function(t){var i=t.get("nodewidth"),n=t.get("nodegap"),o=if(t,e);t.layoutinfo=o;var a=o.width,r=o.height,s=t.getgraph(),l=s.nodes,u=s.edges;tf(l),df(l,u,i,n,a,r,0!==g(l,function(t){return 0===t.getlayout().value}).length?0:t.get("layoutiterations"))})}),fs(function(t,e){t.eachseriesbytype("sankey",function(t){var e=t.getgraph().nodes;e.sort(function(t,e){return t.getlayout().value-e.getlayout().value});var i=e[0].getlayout().value,n=e[e.length-1].getlayout().value;d(e,function(e){var o=new fa({type:"color",mappingmethod:"linear",dataextent:[i,n],visual:t.get("color")}).mapvaluetovisual(e.getlayout().value);e.setvisual("color",o);var a=e.getmodel().get("itemstyle.color");null!=a&&e.setvisual("color",a)})})});var nc=in.extend({type:"whiskerinbox",shape:{},buildpath:function(t,e){for(var i in e)if(e.hasownproperty(i)&&0===i.indexof("ends")){var n=e[i];t.moveto(n[0][0],n[0][1]),t.lineto(n[1][0],n[1][1])}}}),oc=jf.prototype;oc._createcontent=function(t,e,i){var n=t.getitemlayout(e),o="horizontal"===n.chartlayout?1:0,a=0;this.add(new zb({shape:{points:i?xf(n.bodyends,o,n):n.bodyends},style:{strokenoscale:!0},z2:100})),this.bodyindex=a++;var r=f(n.whiskerends,function(t){return i?xf(t,o,n):t});this.add(new nc({shape:yf(r),style:{strokenoscale:!0},z2:100})),this.whiskerindex=a++},oc.updatedata=function(t,e,i){var n=this._seriesmodel=t.hostmodel,o=t.getitemlayout(e),a=ss[i?"initprops":"updateprops"];a(this.childat(this.bodyindex),{shape:{points:o.bodyends}},n,e),a(this.childat(this.whiskerindex),{shape:yf(o.whiskerends)},n,e),this.styleupdater.call(null,this,t,e)},u(jf,l_);var ec=qf.prototype;ec.updatedata=function(t){var e=this.group,i=this._data,n=this.styleupdater;this._data||e.removeall(),t.diff(i).add(function(i){if(t.hasvalue(i)){var o=new jf(t,i,n,!0);t.setitemgraphicel(i,o),e.add(o)}}).update(function(o,a){var r=i.getitemgraphicel(a);t.hasvalue(o)?(r?r.updatedata(t,o):r=new jf(t,o,n),e.add(r),t.setitemgraphicel(o,r)):e.remove(r)}).remove(function(t){var n=i.getitemgraphicel(t);n&&e.remove(n)}).execute(),this._data=t},ec.incrementalprepareupdate=function(t,e,i){this.group.removeall(),this._data=null},ec.incrementalupdate=function(t,e,i,n){for(var o=e.getdata(),a=t.start;a0?jc:xc),bordercolor:e.get(n>0?zc:uc)})})})}),ds(function(t){t.eachseriesbytype("candlestick",function(t){var e,i=t.coordinatesystem,n=t.getdata(),o=ep(t,n),a=t.get("layout"),r="horizontal"===a?0:1,s=1-r,l=["x","y"],u=[];if(d(n.dimensions,function(t){var i=n.getdimensioninfo(t).coorddim;i===l[s]?u.push(t):i===l[r]&&(e=t)}),!(null==e||u.length<4)){var h=0;n.each([e].concat(u),function(){function t(t){var e=[];return e[r]=d,e[s]=t,isnan(d)||isnan(t)?[nan,nan]:i.datatopoint(e)}function e(t,e){var i=t.slice(),n=t.slice();i[r]=wn(i[r]+o/2,1,!1),n[r]=wn(n[r]-o/2,1,!0),e?m.push(i,n):m.push(n,i)}function l(t){return t[r]=wn(t[r],1),t}var c=arguments,d=c[0],f=c[u.length+1],p=c[1],g=c[2],m=c[3],v=c[4],y=math.min(p,g),x=math.max(p,g),_=t(y),w=t(x),b=t(m),s=[[l(t(v)),l(w)],[l(b),l(_)]],m=[];e(w,0),e(_,1);var i;i=p>g?-1:p0?n.getitemmodel(h-1).get()[2]<=g?1:-1:1,n.setitemlayout(f,{chartlayout:a,sign:i,initbaseline:p>g?w[s]:_[s],bodyends:m,whiskerends:s,brushrect:function(){var e=t(math.min(p,g,m,v)),i=t(math.max(p,g,m,v));return e[r]-=o/2,i[r]-=o/2,{x:e[0],y:e[1],width:s?o:i[0]-e[0],height:s?i[1]-e[1]:o}}()}),++h})}})}),mm.extend({type:"series.effectscatter",dependencies:["grid","polar"],getinitialdata:function(t,e){return hs(this.getsource(),this)},brushselector:"point",defaultoption:{coordinatesystem:"cartesian2d",zlevel:0,z:2,legendhoverlink:!0,effecttype:"ripple",progressive:0,showeffecton:"render",rippleeffect:{period:4,scale:2.5,brushtype:"fill"},symbolsize:10}});var qc=op.prototype;qc.stopeffectanimation=function(){this.childat(1).removeall()},qc.starteffectanimation=function(t){for(var e=t.symboltype,i=t.color,n=this.childat(1),o=0;o<3;o++){var a=ml(e,-1,-1,2,2,i);a.attr({style:{strokenoscale:!0},z2:99,silent:!0,scale:[.5,.5]});var r=-o/3*t.period+t.effectoffset;a.animate("",!0).when(t.period,{scale:[t.ripplescale/2,t.ripplescale/2]}).delay(r).start(),a.animatestyle(!0).when(t.period,{opacity:0}).delay(r).start(),n.add(a)}np(n,t)},qc.updateeffectanimation=function(t){for(var e=this._effectcfg,i=this.childat(1),n=["symboltype","period","ripplescale"],o=0;o "))},preventincremental:function(){return!!this.get("effect.show")},getprogressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getprogressivethreshold:function(){var t=this.option.progressivethreshold;return null==t?this.option.large?2e4:this.get("progressivethreshold"):t},defaultoption:{coordinatesystem:"geo",zlevel:0,z:2,legendhoverlink:!0,hoveranimation:!0,xaxisindex:0,yaxisindex:0,symbol:["none","none"],symbolsize:[10,10],geoindex:0,effect:{show:!1,period:4,constantspeed:0,symbol:"circle",symbolsize:3,loop:!0,traillength:.2},large:!1,largethreshold:2e3,polyline:!1,label:{show:!1,position:"end"},linestyle:{opacity:.5}}}),tl=rp.prototype;tl.createline=function(t,e,i){return new qc(t,e,i)},tl._updateeffectsymbol=function(t,e){var i=t.getitemmodel(e).getmodel("effect"),n=i.get("symbolsize"),o=i.get("symbol");y(n)||(n=[n,n]);var a=i.get("color")||t.getitemvisual(e,"color"),r=this.childat(1);this._symboltype!==o&&(this.remove(r),(r=ml(o,-.5,-.5,1,1,a)).z2=100,r.culling=!0,this.add(r)),r&&(r.setstyle("shadowcolor",a),r.setstyle(i.getitemstyle(["color"])),r.attr("scale",n),r.setcolor(a),r.attr("scale",n),this._symboltype=o,this._updateeffectanimation(t,i,e))},tl._updateeffectanimation=function(t,e,i){var n=this.childat(1);if(n){var o=this,a=t.getitemlayout(i),r=1e3*e.get("period"),s=e.get("loop"),l=e.get("constantspeed"),u=d(e.get("delay"),function(e){return e/t.count()*r/3}),h="function"==typeof u;if(n.ignore=!0,this.updateanimationpoints(n,a),l>0&&(r=this.getlinelength(n)/l*1e3),r!==this._period||s!==this._loop){n.stopanimation();var c=u;h&&(c=u(i)),n.__t>0&&(c=-r*n.__t),n.__t=0;var d=n.animate("",s).when(r,{__t:1}).delay(c).during(function(){o.updatesymbolposition(n)});s||d.done(function(){o.remove(n)}),d.start()}this._period=r,this._loop=s}},tl.getlinelength=function(t){return jx(t.__p1,t.__cp1)+jx(t.__cp1,t.__p2)},tl.updateanimationpoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},tl.updatedata=function(t,e,i){this.childat(0).updatedata(t,e,i),this._updateeffectsymbol(t,e)},tl.updatesymbolposition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t,a=t.position,r=qi,s=tn;a[0]=r(e[0],n[0],i[0],o),a[1]=r(e[1],n[1],i[1],o);var l=s(e[0],n[0],i[0],o),u=s(e[1],n[1],i[1],o);t.rotation=-math.atan2(u,l)-math.pi/2,t.ignore=!1},tl.updatelayout=function(t,e){this.childat(0).updatelayout(t,e);var i=t.getitemmodel(e).getmodel("effect");this._updateeffectanimation(t,i,e)},u(rp,l_);var el=sp.prototype;el._createpolyline=function(t,e,i){var n=t.getitemlayout(e),o=new ub({shape:{points:n}});this.add(o),this._updatecommonstl(t,e,i)},el.updatedata=function(t,e,i){var n=t.hostmodel;fo(this.childat(0),{shape:{points:t.getitemlayout(e)}},n,e),this._updatecommonstl(t,e,i)},el._updatecommonstl=function(t,e,i){var n=this.childat(0),o=t.getitemmodel(e),a=t.getitemvisual(e,"color"),s=i&&i.linestyle,l=i&&i.hoverlinestyle;i&&!t.hasitemoption||(s=o.getmodel("linestyle").getlinestyle(),l=o.getmodel("emphasis.linestyle").getlinestyle()),n.usestyle(r({strokenoscale:!0,fill:"none",stroke:a},s)),n.hoverstyle=l,eo(this)},el.updatelayout=function(t,e){this.childat(0).setshape("points",t.getitemlayout(e))},u(sp,l_);var il=lp.prototype;il.createline=function(t,e,i){return new sp(t,e,i)},il.updateanimationpoints=function(t,e){this._points=e;for(var i=[0],n=0,o=1;o=0&&!(n[r]<=e);r--);r=math.min(r,o-2)}else{for(var r=a;re);r++);r=math.min(r-1,o-2)}j(t.position,i[r],i[r+1],(e-n[r])/(n[r+1]-n[r]));var s=i[r+1][0]-i[r][0],l=i[r+1][1]-i[r][1];t.rotation=-math.atan2(l,s)-math.pi/2,this._lastframe=r,this._lastframepercent=e,t.ignore=!1}},u(lp,rp);var nl=en({shape:{polyline:!1,curveness:0,segs:[]},buildpath:function(t,e){var i=e.segs,n=e.curveness;if(e.polyline)for(r=0;r0){t.moveto(i[r++],i[r++]);for(var a=1;a0){var c=(s+u)/2-(l-h)*n,d=(l+h)/2-(u-s)*n;t.quadraticcurveto(c,d,u,h)}else t.lineto(u,h)}},finddataindex:function(t,e){var i=this.shape,n=i.segs,o=i.curveness;if(i.polyline)for(var a=0,r=0;r0)for(var l=n[r++],u=n[r++],h=1;h0){if(fn(l,u,(l+c)/2-(u-d)*o,(u+d)/2-(c-l)*o,c,d))return a}else if(cn(l,u,c,d))return a;a++}return-1}}),ol=up.prototype;ol.ispersistent=function(){return!this._incremental},ol.updatedata=function(t){this.group.removeall();var e=new nl({recthover:!0,cursor:"default"});e.setshape({segs:t.getlayout("linespoints")}),this._setcommon(e,t),this.group.add(e),this._incremental=null},ol.incrementalprepareupdate=function(t){this.group.removeall(),this._clearincremental(),t.count()>5e5?(this._incremental||(this._incremental=new on({silent:!0})),this.group.add(this._incremental)):this._incremental=null},ol.incrementalupdate=function(t,e){var i=new nl;i.setshape({segs:e.getlayout("linespoints")}),this._setcommon(i,e,!!this._incremental),this._incremental?this._incremental.adddisplayable(i,!0):(i.recthover=!0,i.cursor="default",i.__startindex=t.start,this.group.add(i))},ol.remove=function(){this._clearincremental(),this._incremental=null,this.group.removeall()},ol._setcommon=function(t,e,i){var n=e.hostmodel;t.setshape({polyline:n.get("polyline"),curveness:n.get("linestyle.curveness")}),t.usestyle(n.getmodel("linestyle").getlinestyle()),t.style.strokenoscale=!0;var o=e.getvisual("color");o&&t.setstyle("stroke",o),t.setstyle("fill"),i||(t.seriesindex=n.seriesindex,t.on("mousemove",function(e){t.dataindex=null;var i=t.finddataindex(e.offsetx,e.offsety);i>0&&(t.dataindex=i+t.__startindex)}))},ol._clearincremental=function(){var t=this._incremental;t&&t.cleardisplaybles()};var al={seriestype:"lines",plan:xm(),reset:function(t){var e=t.coordinatesystem,i=t.get("polyline"),n=t.pipelinecontext.large;return{progress:function(o,a){var r=[];if(n){var s,l=o.end-o.start;if(i){for(var u=0,h=o.start;h0){var i=a(v)?s:l;v>0&&(v=v*s+b),x[_++]=i[m],x[_++]=i[m+1],x[_++]=i[m+2],x[_++]=i[m+3]*v*256}else _+=4}return c.putimagedata(y,0,0),h},_getbrush:function(){var t=this._brushcanvas||(this._brushcanvas=vx()),e=this.pointsize+this.blursize,i=2*e;t.width=i,t.height=i;var n=t.getcontext("2d");return n.clearrect(0,0,i,i),n.shadowoffsetx=i,n.shadowblur=this.blursize,n.shadowcolor="#000",n.beginpath(),n.arc(-e,e,this.pointsize,0,2*math.pi,!0),n.closepath(),n.fill(),t},_getgradient:function(t,e,i){for(var n=this._gradientpixels,o=n[i]||(n[i]=new uint8clampedarray(1024)),a=[0,0,0,0],r=0,s=0;s<256;s++)e[i](s/255,!0,a),o[r++]=a[0],o[r++]=a[1],o[r++]=a[2],o[r++]=a[3];return o}},xs({type:"heatmap",render:function(t,e,i){var n;e.eachcomponent("visualmap",function(e){e.eachtargetseries(function(i){i===t&&(n=e)})}),this.group.removeall(),this._incrementaldisplayable=null;var o=t.coordinatesystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderoncartesianandcalendar(t,i,0,t.getdata().count()):pp(o)&&this._renderongeo(o,t,n,i)},incrementalpreparerender:function(t,e,i){this.group.removeall()},incrementalrender:function(t,e,i,n){e.coordinatesystem&&this._renderoncartesianandcalendar(e,n,t.start,t.end,!0)},_renderoncartesianandcalendar:function(t,e,i,n,o){var r,s,l=t.coordinatesystem;if("cartesian2d"===l.type){var u=l.getaxis("x"),h=l.getaxis("y");r=u.getbandwidth(),s=h.getbandwidth()}for(var c=this.group,d=t.getdata(),f=t.getmodel("itemstyle").getitemstyle(["color"]),p=t.getmodel("emphasis.itemstyle").getitemstyle(),g=t.getmodel("label"),m=t.getmodel("emphasis.label"),v=l.type,y="cartesian2d"===v?[d.mapdimension("x"),d.mapdimension("y"),d.mapdimension("value")]:[d.mapdimension("time"),d.mapdimension("value")],x=i;x=e.y&&t[1]<=e.y+e.height:i.contain(i.tolocalcoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointtodata:function(t){var e=this.getaxis();return[e.coordtodata(e.tolocalcoord(t["horizontal"===e.orient?0:1]))]},datatopoint:function(t){var e=this.getaxis(),i=this.getrect(),n=[],o="horizontal"===e.orient?0:1;return t instanceof array&&(t=t[0]),n[o]=e.toglobalcoord(e.datatocoord(+t)),n[1-o]=0===o?i.y+i.height/2:i.x+i.width/2,n}},ca.register("single",{create:function(t,e){var i=[];return t.eachcomponent("singleaxis",function(n,o){var a=new bp(n,t,e);a.name="single_"+o,a.resize(n,e),n.coordinatesystem=a,i.push(a)}),t.eachseries(function(e){if("singleaxis"===e.get("coordinatesystem")){var i=t.querycomponents({maintype:"singleaxis",index:e.get("singleaxisindex"),id:e.get("singleaxisid")})[0];e.coordinatesystem=i&&i.coordinatesystem}}),i},dimensions:bp.prototype.dimensions});var fl=qd.getinterval,pl=qd.ifignoreontick,gl=["axisline","axisticklabel","axisname"],ml=it.extend({type:"singleaxis",axispointerclass:"singleaxispointer",render:function(t,e,i,n){var o=this.group;o.removeall();var a=vp(t),r=new qd(t,a);d(gl,r.add,r),o.add(r.getgroup()),t.get("splitline.show")&&this._splitline(t,a.labelinterval),ml.supercall(this,"render",t,e,i,n)},_splitline:function(t,e){var i=t.axis;if(!i.scale.isblank()){var n=t.getmodel("splitline"),o=n.getmodel("linestyle"),a=o.get("width"),r=o.get("color"),s=fl(n,e);r=r instanceof array?r:[r];for(var l=t.coordinatesystem.getrect(),u=i.ishorizontal(),h=[],c=0,d=i.gettickscoords(),f=[],p=[],g=t.get("axislabel.showminlabel"),m=t.get("axislabel.showmaxlabel"),v=0;v=0)&&i({type:"updateaxispointer",currtrigger:t,x:e&&e.offsetx,y:e&&e.offsety})})},remove:function(t,e){ig(e.getzr(),"axispointer"),il.superapply(this._model,"remove",arguments)},dispose:function(t,e){ig("axispointer",e),il.superapply(this._model,"dispose",arguments)}}),dl=ni(),tl=i,al=m;(ng.prototype={_group:null,_lastgraphickey:null,_handle:null,_dragging:!1,_lastvalue:null,_laststatus:null,_payloadinfo:null,animationthreshold:15,render:function(t,e,i,n){var o=e.get("value"),a=e.get("status");if(this._axismodel=t,this._axispointermodel=e,this._api=i,n||this._lastvalue!==o||this._laststatus!==a){this._lastvalue=o,this._laststatus=a;var r=this._group,s=this._handle;if(!a||"hide"===a)return r&&r.hide(),void(s&&s.hide());r&&r.show(),s&&s.show();var l={};this.makeeloption(l,o,t,e,i);var u=l.graphickey;u!==this._lastgraphickey&&this.clear(i),this._lastgraphickey=u;var h=this._moveanimation=this.determineanimation(t,e);if(r){var c=v(og,e,h);this.updatepointerel(r,l,c,e),this.updatelabelel(r,l,c,e)}else r=this._group=new l_,this.createpointerel(r,l,t,e),this.createlabelel(r,l,t,e),i.getzr().add(r);lg(r,e,!0),this._renderhandle(o)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineanimation:function(t,e){var i=e.get("animation"),n=t.axis,o="category"===n.type,a=e.get("snap");if(!a&&!o)return!1;if("auto"===i||null==i){var r=this.animationthreshold;if(o&&n.getbandwidth()>r)return!0;if(a){var s=iu(t).seriesdatacount,l=n.getextent();return math.abs(l[0]-l[1])/s>r}return!1}return!0===i},makeeloption:function(t,e,i,n,o){},createpointerel:function(t,e,i,n){var o=e.pointer;if(o){var a=dl(t).pointerel=new ss[o.type](tl(e.pointer));t.add(a)}},createlabelel:function(t,e,i,n){if(e.label){var o=dl(t).labelel=new jb(tl(e.label));t.add(o),rg(o,n)}},updatepointerel:function(t,e,i){var n=dl(t).pointerel;n&&(n.setstyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updatelabelel:function(t,e,i,n){var o=dl(t).labelel;o&&(o.setstyle(e.label.style),i(o,{shape:e.label.shape,position:e.label.position}),rg(o,n))},_renderhandle:function(t){if(!this._dragging&&this.updatehandletransform){var e=this._axispointermodel,i=this._api.getzr(),n=this._handle,o=e.getmodel("handle"),a=e.get("status");if(!o.get("show")||!a||"hide"===a)return n&&i.remove(n),void(this._handle=null);var r;this._handle||(r=!0,n=this._handle=_o(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){rw(t.event)},onmousedown:al(this._onhandledragmove,this,0,0),drift:al(this._onhandledragmove,this),ondragend:al(this._onhandledragend,this)}),i.add(n)),lg(n,e,!1);var s=["color","bordercolor","borderwidth","opacity","shadowcolor","shadowblur","shadowoffsetx","shadowoffsety"];n.setstyle(o.getitemstyle(null,s));var l=o.get("size");y(l)||(l=[l,l]),n.attr("scale",[l[0]/2,l[1]/2]),_r(this,"_dodispatchaxispointer",o.get("throttle")||0,"fixrate"),this._movehandletovalue(t,r)}},_movehandletovalue:function(t,e){og(this._axispointermodel,!e&&this._moveanimation,this._handle,sg(this.gethandletransform(t,this._axismodel,this._axispointermodel)))},_onhandledragmove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updatehandletransform(sg(i),[t,e],this._axismodel,this._axispointermodel);this._payloadinfo=n,i.stopanimation(),i.attr(sg(n)),dl(i).lastprop=null,this._dodispatchaxispointer()}},_dodispatchaxispointer:function(){if(this._handle){var t=this._payloadinfo,e=this._axismodel;this._api.dispatchaction({type:"updateaxispointer",x:t.cursorpoint[0],y:t.cursorpoint[1],tooltipoption:t.tooltipoption,axesinfo:[{axisdim:e.axis.dim,axisindex:e.componentindex}]})}},_onhandledragend:function(t){if(this._dragging=!1,this._handle){var e=this._axispointermodel.get("value");this._movehandletovalue(e),this._api.dispatchaction({type:"hidetip"})}},gethandletransform:null,updatehandletransform:null,clear:function(t){this._lastvalue=null,this._laststatus=null;var e=t.getzr(),i=this._group,n=this._handle;e&&i&&(this._lastgraphickey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadinfo=null)},doclear:function(){},buildlabel:function(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}}).constructor=ng,gi(ng);var cl=ng.extend({makeeloption:function(t,e,i,n,o){var a=i.axis,r=a.grid,s=n.get("type"),l=yg(r,a).getotheraxis(a).getglobalextent(),u=a.toglobalcoord(a.datatocoord(e,!0));if(s&&"none"!==s){var h=ug(n),c=ll[s](a,u,l,h);c.style=h,t.graphickey=c.type,t.pointer=c}pg(e,t,ku(r.model,i),i,n,o)},gethandletransform:function(t,e,i){var n=ku(e.axis.grid.model,e,{labelinside:!1});return n.labelmargin=i.get("handle.margin"),{position:fg(e.axis,t,n),rotation:n.rotation+(n.labeldirection<0?math.pi:0)}},updatehandletransform:function(t,e,i,n){var o=i.axis,a=o.grid,r=o.getglobalextent(!0),s=yg(a,o).getotheraxis(o).getglobalextent(),l="x"===o.dim?0:1,u=t.position;u[l]+=e[l],u[l]=math.min(r[1],u[l]),u[l]=math.max(r[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];var d=[{verticalalign:"middle"},{align:"center"}];return{position:u,rotation:t.rotation,cursorpoint:c,tooltipoption:d[l]}}}),ll={line:function(t,e,i,n){var o=gg([e,i[0]],[e,i[1]],xg(t));return gn({shape:o,style:n}),{type:"line",shape:o}},shadow:function(t,e,i,n){var o=t.getbandwidth(),a=i[1]-i[0];return{type:"rect",shape:mg([e-o/2,i[0]],[o,a],xg(t))}}};it.registeraxispointerclass("cartesianaxispointer",cl),ls(function(t){if(t){(!t.axispointer||0===t.axispointer.length)&&(t.axispointer={});var e=t.axispointer.link;e&&!y(e)&&(t.axispointer.link=[e])}}),us(qm.processor.statistic,function(t,e){t.getcomponent("axispointer").coordsysaxesinfo=yu(t,e)}),hs({type:"updateaxispointer",event:"updateaxispointer",update:":updateaxispointer"},function(t,e,i){var n=t.currtrigger,o=[t.x,t.y],a=t,r=t.dispatchaction||m(i.dispatchaction,i),s=e.getcomponent("axispointer").coordsysaxesinfo;if(s){qp(o)&&(o=xl({seriesindex:a.seriesindex,dataindex:a.dataindex},e).point);var l=qp(o),u=a.axesinfo,h=s.axesinfo,c="leave"===n||qp(o),d={},f={},p={list:[],map:{}},g={showpointer:wl(wp,f),showtooltip:wl(hp,p)};_l(s.coordsysmap,function(t,e){var i=l||t.containpoint(o);_l(s.coordsysaxesinfo[e],function(t,e){var n=t.axis,a=xp(u,t);if(!c&&i&&(!u||a)){var r=a&&a.value;null!=r||l||(r=n.pointtodata(o)),null!=r&&gp(t,r,g,!1,d)}})});var v={};return _l(h,function(t,e){var i=t.linkgroup;i&&!f[e]&&_l(i.axesinfo,function(e,n){var o=f[n];if(e!==t&&o){var a=o.value;i.mapper&&(a=t.axis.scale.parse(i.mapper(a,yp(e),yp(t)))),v[t.key]=a}})}),_l(v,function(t,e){gp(h[e],t,g,!0,d)}),zp(f,h,d),up(p,o,t,r),jp(h,0,i),d}});var kl=["x","y"],pl=["width","height"],nl=ng.extend({makeeloption:function(t,e,i,n,o){var a=i.axis,r=a.coordinatesystem,s=wg(r,1-_g(a)),l=r.datatopoint(e)[0],u=n.get("type");if(u&&"none"!==u){var h=ug(n),c=ol[u](a,l,s,h);c.style=h,t.graphickey=c.type,t.pointer=c}pg(e,t,vp(i),i,n,o)},gethandletransform:function(t,e,i){var n=vp(e,{labelinside:!1});return n.labelmargin=i.get("handle.margin"),{position:fg(e.axis,t,n),rotation:n.rotation+(n.labeldirection<0?math.pi:0)}},updatehandletransform:function(t,e,i,n){var o=i.axis,a=o.coordinatesystem,r=_g(o),s=wg(a,r),l=t.position;l[r]+=e[r],l[r]=math.min(s[1],l[r]),l[r]=math.max(s[0],l[r]);var u=wg(a,1-r),h=(u[1]+u[0])/2,c=[h,h];return c[r]=l[r],{position:l,rotation:t.rotation,cursorpoint:c,tooltipoption:{verticalalign:"middle"}}}}),ol={line:function(t,e,i,n){var o=gg([e,i[0]],[e,i[1]],_g(t));return gn({shape:o,style:n}),{type:"line",shape:o}},shadow:function(t,e,i,n){var o=t.getbandwidth(),a=i[1]-i[0];return{type:"rect",shape:mg([e-o/2,i[0]],[o,a],_g(t))}}};it.registeraxispointerclass("singleaxispointer",nl),vs({type:"single"});var el=mm.extend({type:"series.themeriver",dependencies:["singleaxis"],namemap:null,init:function(t){el.superapply(this,"init",arguments),this.legenddataprovider=function(){return this.getrawdata()}},fixdata:function(t){for(var e=t.length,i=f(mf().key(function(t){return t[2]}).entries(t),function(t){return{name:t.key,datalist:t.values}}),n=i.length,o=-1,a=-1,r=0;ro&&(o=s,a=r)}for(var l=0;lmath.pi/2?"right":"left"):x&&"center"!==x?"left"===x?(f=u.r0+y,p>math.pi/2&&(x="right")):"right"===x&&(f=u.r-y,p>math.pi/2&&(x="left")):(f=(u.r+u.r0)/2,x="center"),d.attr("style",{text:l,textalign:x,textverticalalign:n("verticalalign")||"middle",opacity:n("opacity")});var _=f*g+u.cx,w=f*m+u.cy;d.attr("position",[_,w]);var b=n("rotate"),s=0;"radial"===b?(s=-p)<-math.pi/2&&(s+=math.pi):"tangential"===b?(s=math.pi/2-p)>math.pi/2?s-=math.pi:s<-math.pi/2&&(s+=math.pi):"number"==typeof b&&(s=b*math.pi/180),d.attr("rotation",s)},vl._initevents=function(t,e,i,n){t.off("mouseover").off("mouseout").off("emphasis").off("normal");var o=this,a=function(){o.onemphasis(n)},r=function(){o.onnormal()};i.isanimationenabled()&&t.on("mouseover",a).on("mouseout",r).on("emphasis",a).on("normal",r).on("downplay",function(){o.ondownplay()}).on("highlight",function(){o.onhighlight()})},u(dg,l_);pr.extend({type:"sunburst",init:function(){},render:function(t,e,i,n){function o(i,n){if(c||!i||i.getvalue()||(i=null),i!==l&&n!==l)if(n&&n.piece)i?(n.piece.updatedata(!1,i,"normal",t,e),s.setitemgraphicel(i.dataindex,n.piece)):a(n);else if(i){var o=new dg(i,t,e);h.add(o),s.setitemgraphicel(i.dataindex,o)}}function a(t){t&&t.piece&&(h.remove(t.piece),t.piece=null)}var r=this;this.seriesmodel=t,this.api=i,this.ecmodel=e;var s=t.getdata(),l=s.tree.root,u=t.getviewroot(),h=this.group,c=t.get("renderlabelforzerodata"),d=[];u.eachnode(function(t){d.push(t)});var f=this._oldchildren||[];if(function(t,e){function i(t){return t.getid()}function n(i,n){o(null==i?null:t[i],null==n?null:e[n])}0===t.length&&0===e.length||new bs(e,t,i,i).add(n).update(n).remove(v(n,null)).execute()}(d,f),function(i,n){if(n.depth>0){i.piece?i.piece.updatedata(!1,i,"normal",t,e):(i.piece=new dg(i,t,e),h.add(i.piece)),n.piece._onclickevent&&n.piece.off("click",n.piece._onclickevent);var o=function(t){r._roottonode(n.parentnode)};n.piece._onclickevent=o,i.piece.on("click",o)}else i.piece&&(h.remove(i.piece),i.piece=null)}(l,u),n&&n.highlight&&n.highlight.piece){var p=t.getshallow("highlightpolicy");n.highlight.piece.onemphasis(p)}else if(n&&n.unhighlight){var g=l.piece;!g&&l.children.length&&(g=l.children[0].piece),g&&g.onnormal()}this._initevents(),this._oldchildren=d},dispose:function(){},_initevents:function(){var t=this,e=function(e){var i=!1;t.seriesmodel.getviewroot().eachnode(function(n){if(!i&&n.piece&&n.piece.childat(0)===e.target){var o=n.getmodel().get("nodeclick");if("roottonode"===o)t._roottonode(n);else if("link"===o){var a=n.getmodel(),r=a.get("link");if(r){var s=a.get("target",!0)||"_blank";window.open(r,s)}}i=!0}})};this.group._onclickevent&&this.group.off("click",this.group._onclickevent),this.group.on("click",e),this.group._onclickevent=e},_roottonode:function(t){t!==this.seriesmodel.getviewroot()&&this.api.dispatchaction({type:"sunburstroottonode",from:this.uid,seriesid:this.seriesmodel.id,targetnode:t})},containpoint:function(t,e){var i=e.getdata().getitemlayout(0);if(i){var n=t[0]-i.cx,o=t[1]-i.cy,a=math.sqrt(n*n+o*o);return a<=i.r&&a>=i.r0}}});var gl="sunburstroottonode";hs({type:gl,update:"updateview"},function(t,e){e.eachcomponent({maintype:"series",subtype:"sunburst",query:t},function(e,i){var n=jh(t,[gl],e);if(n){var o=e.getviewroot();o&&(t.direction=tc(o,n.node)?"rollup":"drilldown"),e.resetviewroot(n.node)}})});var fl="sunbursthighlight";hs({type:fl,update:"updateview"},function(t,e){e.eachcomponent({maintype:"series",subtype:"sunburst",query:t},function(e,i){var n=jh(t,[fl],e);n&&(t.highlight=n.node)})});hs({type:"sunburstunhighlight",update:"updateview"},function(t,e){e.eachcomponent({maintype:"series",subtype:"sunburst",query:t},function(e,i){t.unhighlight=!0})});var wl=math.pi/180;fs(v(_t,"sunburst")),ds(v(function(t,e,i,n){e.eachseriesbytype(t,function(t){var e=t.get("center"),n=t.get("radius");y(n)||(n=[0,n]),y(e)||(e=[e,e]);var o=i.getwidth(),a=i.getheight(),r=math.min(o,a),s=to(e[0],o),l=to(e[1],a),u=to(n[0],r/2),h=to(n[1],r/2),c=-t.get("startangle")*wl,f=t.get("minangle")*wl,p=t.getdata().tree.root,g=t.getviewroot(),m=g.depth,v=t.get("sort");null!=v&&lg(g,v);var x=0;d(g.children,function(t){!isnan(t.getvalue())&&x++});var _=g.getvalue(),w=math.pi/(_||x)*2,b=g.depth>0,s=g.height-(b?-1:1),m=(h-u)/(s||1),i=t.get("clockwise"),d=t.get("stillshowzerosum"),t=i?1:-1,a=function(t,e){if(t){var i=e;if(t!==p){var n=t.getvalue(),o=0===_&&d?w:n*w;on[1]&&n.reverse(),{coordsys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:m(function(n){var o=e.datatoradius(n[0]),a=i.datatoangle(n[1]),r=t.coordtopoint([o,a]);return r.push(o,a*math.pi/180),r}),size:m(eg,t)}}},calendar:function(t){var e=t.getrect(),i=t.getrangeinfo();return{coordsys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellwidth:t.getcellwidth(),cellheight:t.getcellheight(),rangeinfo:{start:i.start,end:i.end,weeks:i.weeks,daycount:i.allday}},api:{coord:function(e,i){return t.datatopoint(e,i)}}}}};ys({type:"series.custom",dependencies:["grid","polar","geo","singleaxis","calendar"],defaultoption:{coordinatesystem:"cartesian2d",zlevel:0,z:2,legendhoverlink:!0},getinitialdata:function(t,e){return hs(this.getsource(),this)}}),xs({type:"custom",_data:null,render:function(t,e,i){var n=this._data,o=t.getdata(),a=this.group,r=vg(t,o,e,i);this.group.removeall(),o.diff(n).add(function(e){fg(null,e,r(e),t,a,o)}).update(function(e,i){fg(n.getitemgraphicel(i),e,r(e),t,a,o)}).remove(function(t){var e=n.getitemgraphicel(t);e&&a.remove(e)}).execute(),this._data=o},incrementalpreparerender:function(t,e,i){this.group.removeall(),this._data=null},incrementalrender:function(t,e,i,n){for(var o=e.getdata(),a=vg(e,o,i,n),r=t.start;r=0;l--)null==o[l]?o.splice(l,1):delete o[l].$action},_flatten:function(t,e,i){d(t,function(t){if(t){i&&(t.parentoption=i),e.push(t);var n=t.children;"group"===t.type&&n&&this._flatten(n,e,t),delete t.children}},this)},useeloptionstoupdate:function(){var t=this._eloptionstoupdate;return this._eloptionstoupdate=null,t}});vs({type:"graphic",init:function(t,e){this._elmap=z(),this._lastgraphicmodel},render:function(t,e,i){t!==this._lastgraphicmodel&&this._clear(),this._lastgraphicmodel=t,this._updateelements(t,i),this._relocate(t,i)},_updateelements:function(t,e){var i=t.useeloptionstoupdate();if(i){var n=this._elmap,o=this.group;d(i,function(t){var e=t.$action,i=t.id,a=n.get(i),r=t.parentid,s=null!=r?n.get(r):o;if("text"===t.type){var l=t.style;t.hv&&t.hv[1]&&(l.textverticalalign=l.textbaseline=null),!l.hasownproperty("textfill")&&l.fill&&(l.textfill=l.fill),!l.hasownproperty("textstroke")&&l.stroke&&(l.textstroke=l.stroke)}var u=qg(t);e&&"merge"!==e?"replace"===e?(yg(a,n),xg(i,s,u,n)):"remove"===e&&yg(a,n):a?a.attr(u):xg(i,s,u,n);var h=n.get(i);h&&(h.__ecgraphicwidth=t.width,h.__ecgraphicheight=t.height)})}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,o=this._elmap,a=i.length-1;a>=0;a--){var r=i[a],s=o.get(r.id);if(s){var l=s.parent;ta(s,r,l===n?{width:e.getwidth(),height:e.getheight()}:{width:l.__ecgraphicwidth||0,height:l.__ecgraphicheight||0},null,{hv:r.hv,boundingmode:r.bounding})}}},_clear:function(){var t=this._elmap;t.each(function(e){yg(e,t)}),this._elmap=z()},dispose:function(){this._clear()}});var $l=ms({type:"legend.plain",dependencies:["series"],layoutmode:{type:"box",ignoresize:!0},init:function(t,e,i){this.mergedefaultandtheme(t,i),t.selected=t.selected||{}},mergeoption:function(t){$l.supercall(this,"mergeoption",t)},optionupdated:function(){this._updatedata(this.ecmodel);var t=this._data;if(t[0]&&"single"===this.get("selectedmode")){for(var e=!1,i=0;i=0},defaultoption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundcolor:"rgba(0,0,0,0)",bordercolor:"#ccc",borderradius:0,borderwidth:0,padding:5,itemgap:10,itemwidth:25,itemheight:14,inactivecolor:"#ccc",textstyle:{color:"#333"},selectedmode:!0,tooltip:{show:!1}}});hs("legendtoggleselect","legendselectchanged",v(tm,"toggleselected")),hs("legendselect","legendselected",v(tm,"select")),hs("legendunselect","legendunselected",v(tm,"unselect"));var kl=v,jl=d,ql=l_,tk=vs({type:"legend.plain",newlinedisabled:!1,init:function(){this.group.add(this._contentgroup=new ql),this._backgroundel},getcontentgroup:function(){return this._contentgroup},render:function(t,e,i){if(this.resetinner(),t.get("show",!0)){var n=t.get("align");n&&"auto"!==n||(n="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderinner(n,t,e,i);var o=t.getboxlayoutparams(),a={width:i.getwidth(),height:i.getheight()},s=t.get("padding"),l=qo(o,a,s),u=this.layoutinner(t,n,l),h=qo(r({width:u.width,height:u.height},o),a,s);this.group.attr("position",[h.x-u.x,h.y-u.y]),this.group.add(this._backgroundel=im(u,t))}},resetinner:function(){this.getcontentgroup().removeall(),this._backgroundel&&this.group.remove(this._backgroundel)},renderinner:function(t,e,i,n){var o=this.getcontentgroup(),a=z(),r=e.get("selectedmode");jl(e.getdata(),function(s,l){var u=s.get("name");if(this.newlinedisabled||""!==u&&"\n"!==u){var h=i.getseriesbyname(u)[0];if(!a.get(u))if(h){var c=h.getdata(),d=c.getvisual("color");"function"==typeof d&&(d=d(h.getdataparams(0)));var f=c.getvisual("legendsymbol")||"roundrect",p=c.getvisual("symbol");this._createitem(u,l,s,e,f,p,t,d,r).on("click",kl(nm,u,n)).on("mouseover",kl(om,h,null,n)).on("mouseout",kl(am,h,null,n)),a.set(u,!0)}else i.eachrawseries(function(i){if(!a.get(u)&&i.legenddataprovider){var o=i.legenddataprovider(),h=o.indexofname(u);if(h<0)return;var c=o.getitemvisual(h,"color");this._createitem(u,l,s,e,"roundrect",null,t,c,r).on("click",kl(nm,u,n)).on("mouseover",kl(om,i,u,n)).on("mouseout",kl(am,i,u,n)),a.set(u,!0)}},this)}else o.add(new ql({newline:!0}))},this)},_createitem:function(t,e,i,n,o,r,s,l,u){var h=n.get("itemwidth"),c=n.get("itemheight"),d=n.get("inactivecolor"),f=n.isselected(t),p=new ql,g=i.getmodel("textstyle"),m=i.get("icon"),v=i.getmodel("tooltip"),y=v.parentmodel;if(o=m||o,p.add(ml(o,0,0,h,c,f?l:d,!0)),!m&&r&&(r!==o||"none"==r)){var x=.8*c;"none"===r&&(r="circle"),p.add(ml(r,(h-x)/2,(c-x)/2,x,x,f?l:d))}var _="left"===s?h+5:-5,w=s,b=n.get("formatter"),s=t;"string"==typeof b&&b?s=b.replace("{name}",null!=t?t:""):"function"==typeof b&&(s=b(t)),p.add(new zb({style:no({},g,{text:s,x:_,y:c/2,textfill:f?g.gettextcolor():d,textalign:w,textverticalalign:"middle"})}));var m=new jb({shape:p.getboundingrect(),invisible:!0,tooltip:v.get("show")?a({content:t,formatter:y.get("formatter",!0)||function(){return t},formatterparams:{componenttype:"legend",legendindex:n.componentindex,name:t,$vars:["name"]}},v.option):null});return p.add(m),p.eachchild(function(t){t.silent=!0}),m.silent=!u,this.getcontentgroup().add(p),eo(p),p.__legenddataindex=e,p},layoutinner:function(t,e,i){var n=this.getcontentgroup();as(t.get("orient"),n,t.get("itemgap"),i.width,i.height);var o=n.getboundingrect();return n.attr("position",[-o.x,-o.y]),this.group.getboundingrect()}});us(function(t){var e=t.findcomponents({maintype:"legend"});e&&e.length&&t.filterseries(function(t){for(var i=0;ii[s],f=[-h.x,-h.y];f[r]=n.position[r];var p=[0,0],g=[-c.x,-c.y],m=t(t.get("pagebuttongap",!0),t.get("itemgap",!0));d&&("end"===t.get("pagebuttonposition",!0)?g[r]+=i[s]-c[s]:p[r]+=c[s]+m),g[1-r]+=h[l]/2-c[l]/2,n.attr("position",f),o.attr("position",p),a.attr("position",g);var v=this.group.getboundingrect();if((v={x:0,y:0})[s]=d?i[s]:h[s],v[l]=math.max(h[l],c[l]),v[u]=math.min(0,c[u]+g[1-r]),o.__rectsize=i[s],d){var y={x:0,y:0};y[s]=math.max(i[s]-c[s]-m,0),y[l]=v[l],o.setclippath(new jb({shape:y})),o.__rectsize=y[s]}else a.eachchild(function(t){t.attr({invisible:!0,silent:!0})});var x=this._getpageinfo(t);return null!=x.pageindex&&fo(n,{position:x.contentposition},!!d&&t),this._updatepageinfoview(t,x),v},_pagego:function(t,e,i){var n=this._getpageinfo(e)[t];null!=n&&i.dispatchaction({type:"legendscroll",scrolldataindex:n,legendid:e.id})},_updatepageinfoview:function(t,e){var i=this._controllergroup;d(["pageprev","pagenext"],function(n){var o=null!=e[n+"dataindex"],a=i.childofname(n);a&&(a.setstyle("fill",o?t.get("pageiconcolor",!0):t.get("pageiconinactivecolor",!0)),a.cursor=o?"pointer":"default")});var n=i.childofname("pagetext"),o=t.get("pageformatter"),a=e.pageindex,r=null!=a?a+1:0,s=e.pagecount;n&&o&&n.setstyle("text",_(o)?o.replace("{current}",r).replace("{total}",s):o({current:r,total:s}))},_getpageinfo:function(t){function e(t){var e=t.getboundingrect().clone();return e[f]+=t.position[h],e}var i,n,o,a,r=t.get("scrolldataindex",!0),s=this.getcontentgroup(),l=s.getboundingrect(),u=this._containergroup.__rectsize,h=t.getorient().index,c=nk[h],d=nk[1-h],f=ok[h],p=s.position.slice();this._showcontroller?s.eachchild(function(t){t.__legenddataindex===r&&(a=t)}):a=s.childat(0);var g=u?math.ceil(l[c]/u):0;if(a){var m=a.getboundingrect(),v=a.position[h]+m[f];p[h]=-v-l[f],i=math.floor(g*(v+m[f]+u/2)/l[c]),i=l[c]&&g?math.max(0,math.min(g-1,i)):-1;var y={x:0,y:0};y[c]=u,y[d]=l[d],y[f]=-p[h]-l[f];var x,_=s.children();if(s.eachchild(function(t,i){var n=e(t);n.intersect(y)&&(null==x&&(x=i),o=t.__legenddataindex),i===_.length-1&&n[f]+n[c]<=y[f]+y[c]&&(o=null)}),null!=x){var w=e(_[x]);if(y[f]=w[f]+w[c]-y[c],x<=0&&w[f]>=y[f])n=null;else{for(;x>0&&e(_[x-1]).intersect(y);)x--;n=_[x].__legenddataindex}}}return{contentposition:p,pageindex:i,pagecount:g,pageprevdataindex:n,pagenextdataindex:o}}});hs("legendscroll","legendscroll",function(t,e){var i=t.scrolldataindex;null!=i&&e.eachcomponent({maintype:"legend",subtype:"scroll",query:t},function(t){t.setscrolldataindex(i)})}),ms({type:"tooltip",dependencies:["axispointer"],defaultoption:{zlevel:0,z:8,show:!0,showcontent:!0,trigger:"item",triggeron:"mousemove|click",alwaysshowcontent:!1,displaymode:"single",confine:!1,showdelay:0,hidedelay:100,transitionduration:.4,enterable:!1,backgroundcolor:"rgba(50,50,50,0.7)",bordercolor:"#333",borderradius:4,borderwidth:0,padding:5,extracsstext:"",axispointer:{type:"line",axis:"auto",animation:"auto",animationdurationupdate:200,animationeasingupdate:"exponentialout",crossstyle:{color:"#999",width:1,type:"dashed",textstyle:{}}},textstyle:{color:"#fff",fontsize:14}}});var rk=d,sk=ho,lk=["","-webkit-","-moz-","-o-"];hm.prototype={constructor:hm,_enterable:!0,update:function(){var t=this._container,e=t.currentstyle||document.defaultview.getcomputedstyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==e.position&&(i.position="relative")},show:function(t){cleartimeout(this._hidetimeout);var e=this.el;e.style.csstext="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+um(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extracsstext")||""),e.style.display=e.innerhtml?"block":"none",this._show=!0},setcontent:function(t){this.el.innerhtml=null==t?"":t},setenterable:function(t){this._enterable=t},getsize:function(){var t=this.el;return[t.clientwidth,t.clientheight]},moveto:function(t,e){var i,n=this._zr;n&&n.painter&&(i=n.painter.getviewportrootoffset())&&(t+=i.offsetleft,e+=i.offsettop);var o=this.el.style;o.left=t+"px",o.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hidelater:function(t){!this._show||this._incontent&&this._enterable||(t?(this._hidedelay=t,this._show=!1,this._hidetimeout=settimeout(m(this.hide,this),t)):this.hide())},isshow:function(){return this._show}};var uk=m,hk=d,ck=to,dk=new jb({shape:{x:-1,y:-1,width:2,height:2}});vs({type:"tooltip",init:function(t,e){if(!ax.node){var i=new hm(e.getdom(),e);this._tooltipcontent=i}},render:function(t,e,i){if(!ax.node&&!ax.wxa){this.group.removeall(),this._tooltipmodel=t,this._ecmodel=e,this._api=i,this._lastdatabycoordsys=null,this._alwaysshowcontent=t.get("alwaysshowcontent");var n=this._tooltipcontent;n.update(),n.setenterable(t.get("enterable")),this._initgloballistener(),this._keepshow()}},_initgloballistener:function(){var t=this._tooltipmodel.get("triggeron");$p("itemtooltip",this._api,uk(function(e,i,n){"none"!==t&&(t.indexof(e)>=0?this._tryshow(i,n):"leave"===e&&this._hide(n))},this))},_keepshow:function(){var t=this._tooltipmodel,e=this._ecmodel,i=this._api;if(null!=this._lastx&&null!=this._lasty&&"none"!==t.get("triggeron")){var n=this;cleartimeout(this._refreshupdatetimeout),this._refreshupdatetimeout=settimeout(function(){n.manuallyshowtip(t,e,i,{x:n._lastx,y:n._lasty})})}},manuallyshowtip:function(t,e,i,n){if(n.from!==this.uid&&!ax.node){var o=dm(n,i);this._ticket="";var a=n.databycoordsys;if(n.tooltip&&null!=n.x&&null!=n.y){var r=dk;r.position=[n.x,n.y],r.update(),r.tooltip=n.tooltip,this._tryshow({offsetx:n.x,offsety:n.y,target:r},o)}else if(a)this._tryshow({offsetx:n.x,offsety:n.y,position:n.position,event:{},databycoordsys:n.databycoordsys,tooltipoption:n.tooltipoption},o);else if(null!=n.seriesindex){if(this._manuallyaxisshowtip(t,e,i,n))return;var s=xl(n,e),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryshow({offsetx:l,offsety:u,position:n.position,target:s.el,event:{}},o)}else null!=n.x&&null!=n.y&&(i.dispatchaction({type:"updateaxispointer",x:n.x,y:n.y}),this._tryshow({offsetx:n.x,offsety:n.y,position:n.position,target:i.getzr().findhover(n.x,n.y).target,event:{}},o))}},manuallyhidetip:function(t,e,i,n){var o=this._tooltipcontent;!this._alwaysshowcontent&&this._tooltipmodel&&o.hidelater(this._tooltipmodel.get("hidedelay")),this._lastx=this._lasty=null,n.from!==this.uid&&this._hide(dm(n,i))},_manuallyaxisshowtip:function(t,e,i,n){var o=n.seriesindex,a=n.dataindex,r=e.getcomponent("axispointer").coordsysaxesinfo;if(null!=o&&null!=a&&null!=r){var s=e.getseriesbyindex(o);if(s&&"axis"===(t=cm([s.getdata().getitemmodel(a),s,(s.coordinatesystem||{}).model,t])).get("trigger"))return i.dispatchaction({type:"updateaxispointer",seriesindex:o,dataindex:a,position:n.position}),!0}},_tryshow:function(t,e){var i=t.target;if(this._tooltipmodel){this._lastx=t.offsetx,this._lasty=t.offsety;var n=t.databycoordsys;n&&n.length?this._showaxistooltip(n,t):i&&null!=i.dataindex?(this._lastdatabycoordsys=null,this._showseriesitemtooltip(t,i,e)):i&&i.tooltip?(this._lastdatabycoordsys=null,this._showcomponentitemtooltip(t,i,e)):(this._lastdatabycoordsys=null,this._hide(e))}},_showormove:function(t,e){var i=t.get("showdelay");e=m(e,this),cleartimeout(this._showtimout),i>0?this._showtimout=settimeout(e,i):e()},_showaxistooltip:function(t,e){var i=this._ecmodel,n=this._tooltipmodel,o=[e.offsetx,e.offsety],a=[],r=[],s=cm([e.tooltipoption,n]);hk(t,function(t){hk(t.databyaxis,function(t){var e=i.getcomponent(t.axisdim+"axis",t.axisindex),n=t.value,o=[];if(e&&null!=n){var s=dg(n,e.axis,i,t.seriesdataindices,t.valuelabelopt);d(t.seriesdataindices,function(a){var l=i.getseriesbyindex(a.seriesindex),u=a.dataindexinside,h=l&&l.getdataparams(u);h.axisdim=t.axisdim,h.axisindex=t.axisindex,h.axistype=t.axistype,h.axisid=t.axisid,h.axisvalue=pl(e.axis,n),h.axisvaluelabel=s,h&&(r.push(h),o.push(l.formattooltip(u,!0)))});var l=s;a.push((l?zo(l)+"
":"")+o.join("
"))}})},this),a.reverse(),a=a.join("

");var l=e.position;this._showormove(s,function(){this._updatecontentnotchangedonaxis(t)?this._updateposition(s,l,o[0],o[1],this._tooltipcontent,r):this._showtooltipcontent(s,a,r,math.random(),o[0],o[1],l)})},_showseriesitemtooltip:function(t,e,i){var n=this._ecmodel,o=e.seriesindex,a=n.getseriesbyindex(o),r=e.datamodel||a,s=e.dataindex,l=e.datatype,u=r.getdata(),h=cm([u.getitemmodel(s),r,a&&(a.coordinatesystem||{}).model,this._tooltipmodel]),c=h.get("trigger");if(null==c||"item"===c){var d=r.getdataparams(s,l),f=r.formattooltip(s,!1,l),p="item_"+r.name+"_"+s;this._showormove(h,function(){this._showtooltipcontent(h,f,d,p,t.offsetx,t.offsety,t.position,t.target)}),i({type:"showtip",dataindexinside:s,dataindex:u.getrawindex(s),seriesindex:o,from:this.uid})}},_showcomponentitemtooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){var o=n;n={content:o,formatter:o}}var a=new wo(n,this._tooltipmodel,this._ecmodel),r=a.get("content"),s=math.random();this._showormove(a,function(){this._showtooltipcontent(a,r,a.get("formatterparams")||{},s,t.offsetx,t.offsety,t.position,e)}),i({type:"showtip",from:this.uid})},_showtooltipcontent:function(t,e,i,n,o,a,r,s){if(this._ticket="",t.get("showcontent")&&t.get("show")){var l=this._tooltipcontent,u=t.get("formatter");r=r||t.get("position");var h=e;if(u&&"string"==typeof u)h=uo(u,i,!0);else if("function"==typeof u){var c=uk(function(e,n){e===this._ticket&&(l.setcontent(n),this._updateposition(t,r,o,a,l,i,s))},this);this._ticket=n,h=u(i,n,c)}l.setcontent(h),l.show(t),this._updateposition(t,r,o,a,l,i,s)}},_updateposition:function(t,e,i,n,o,a,r){var s=this._api.getwidth(),l=this._api.getheight();e=e||t.get("position");var u=o.getsize(),h=t.get("align"),c=t.get("verticalalign"),d=r&&r.getboundingrect().clone();if(r&&d.applytransform(r.transform),"function"==typeof e&&(e=e([i,n],a,o.el,d,{viewsize:[s,l],contentsize:u.slice()})),y(e))i=ck(e[0],s),n=ck(e[1],l);else if(w(e)){e.width=u[0],e.height=u[1];var f=qo(e,{width:s,height:l});i=f.x,n=f.y,h=null,c=null}else"string"==typeof e&&r?(i=(p=mm(e,d,u))[0],n=p[1]):(i=(p=fm(i,n,o.el,s,l,h?null:20,c?null:20))[0],n=p[1]);if(h&&(i-=vm(h)?u[0]/2:"right"===h?u[0]:0),c&&(n-=vm(c)?u[1]/2:"bottom"===c?u[1]:0),t.get("confine")){var p=pm(i,n,o.el,s,l);i=p[0],n=p[1]}o.moveto(i,n)},_updatecontentnotchangedonaxis:function(t){var e=this._lastdatabycoordsys,i=!!e&&e.length===t.length;return i&&hk(e,function(e,n){var o=e.databyaxis||{},a=(t[n]||{}).databyaxis||[];(i&=o.length===a.length)&&hk(o,function(t,e){var n=a[e]||{},o=t.seriesdataindices||[],r=n.seriesdataindices||[];(i&=t.value===n.value&&t.axistype===n.axistype&&t.axisid===n.axisid&&o.length===r.length)&&hk(o,function(t,e){var n=r[e];i&=t.seriesindex===n.seriesindex&&t.dataindex===n.dataindex})})}),this._lastdatabycoordsys=t,!!i},_hide:function(t){this._lastdatabycoordsys=null,t({type:"hidetip",from:this.uid})},dispose:function(t,e){ax.node||(this._tooltipcontent.hide(),ig("itemtooltip",e))}}),hs({type:"showtip",event:"showtip",update:"tooltip:manuallyshowtip"},function(){}),hs({type:"hidetip",event:"hidetip",update:"tooltip:manuallyhidetip"},function(){}),wm.prototype={constructor:wm,pointtodata:function(t,e){return this.polar.pointtodata(t,e)["radius"===this.dim?0:1]},datatoradius:dd.prototype.datatocoord,radiustodata:dd.prototype.coordtodata},u(wm,dd),bm.prototype={constructor:bm,pointtodata:function(t,e){return this.polar.pointtodata(t,e)["radius"===this.dim?0:1]},datatoangle:dd.prototype.datatocoord,angletodata:dd.prototype.coordtodata},u(bm,dd);var fk=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusaxis=new wm,this._angleaxis=new bm,this._radiusaxis.polar=this._angleaxis.polar=this};fk.prototype={type:"polar",axispointerenabled:!0,constructor:fk,dimensions:["radius","angle"],model:null,containpoint:function(t){var e=this.pointtocoord(t);return this._radiusaxis.contain(e[0])&&this._angleaxis.contain(e[1])},containdata:function(t){return this._radiusaxis.containdata(t[0])&&this._angleaxis.containdata(t[1])},getaxis:function(t){return this["_"+t+"axis"]},getaxes:function(){return[this._radiusaxis,this._angleaxis]},getaxesbyscale:function(t){var e=[],i=this._angleaxis,n=this._radiusaxis;return i.scale.type===t&&e.push(i),n.scale.type===t&&e.push(n),e},getangleaxis:function(){return this._angleaxis},getradiusaxis:function(){return this._radiusaxis},getotheraxis:function(t){var e=this._angleaxis;return t===e?this._radiusaxis:e},getbaseaxis:function(){return this.getaxesbyscale("ordinal")[0]||this.getaxesbyscale("time")[0]||this.getangleaxis()},gettooltipaxes:function(t){var e=null!=t&&"auto"!==t?this.getaxis(t):this.getbaseaxis();return{baseaxes:[e],otheraxes:[this.getotheraxis(e)]}},datatopoint:function(t,e){return this.coordtopoint([this._radiusaxis.datatoradius(t[0],e),this._angleaxis.datatoangle(t[1],e)])},pointtodata:function(t,e){var i=this.pointtocoord(t);return[this._radiusaxis.radiustodata(i[0],e),this._angleaxis.angletodata(i[1],e)]},pointtocoord:function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getangleaxis(),o=n.getextent(),a=math.min(o[0],o[1]),r=math.max(o[0],o[1]);n.inverse?a=r-360:r=a+360;var s=math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=math.atan2(-i,e)/math.pi*180,u=lr;)l+=360*u;return[s,l]},coordtopoint:function(t){var e=t[0],i=t[1]/180*math.pi;return[math.cos(i)*e+this.cx,-math.sin(i)*e+this.cy]}};var pk=ks.extend({type:"polaraxis",axis:null,getcoordsysmodel:function(){return this.ecmodel.querycomponents({maintype:"polar",index:this.option.polarindex,id:this.option.polarid})[0]}});n(pk.prototype,ji);var gk={angle:{startangle:90,clockwise:!0,splitnumber:12,axislabel:{rotate:!1}},radius:{splitnumber:5}};gd("angle",pk,sm,gk.angle),gd("radius",pk,sm,gk.radius),ms({type:"polar",dependencies:["polaraxis","angleaxis"],coordinatesystem:null,findaxismodel:function(t){var e;return this.ecmodel.eachcomponent(t,function(t){t.getcoordsysmodel()===this&&(e=t)},this),e},defaultoption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});var mk={dimensions:fk.prototype.dimensions,create:function(t,e){var i=[];return t.eachcomponent("polar",function(t,n){var o=new fk(n);o.update=im;var a=o.getradiusaxis(),r=o.getangleaxis(),s=t.findaxismodel("radiusaxis"),l=t.findaxismodel("angleaxis");dm(a,s),dm(r,l),mm(o,t,e),i.push(o),t.coordinatesystem=o,o.model=t}),t.eachseries(function(e){if("polar"===e.get("coordinatesystem")){var i=t.querycomponents({maintype:"polar",index:e.get("polarindex"),id:e.get("polarid")})[0];e.coordinatesystem=i.coordinatesystem}}),i}};ca.register("polar",mk);var vk=["axisline","axislabel","axistick","splitline","splitarea"];it.extend({type:"angleaxis",axispointerclass:"polaraxispointer",render:function(t,e){if(this.group.removeall(),t.get("show")){var i=t.axis,n=i.polar,o=n.getradiusaxis().getextent(),a=i.gettickscoords();"category"!==i.type&&a.pop(),d(vk,function(e){!t.get(e+".show")||i.scale.isblank()&&"axisline"!==e||this["_"+e](t,n,a,o)},this)}},_axisline:function(t,e,i,n){var o=t.getmodel("axisline.linestyle"),a=new rb({shape:{cx:e.cx,cy:e.cy,r:n[am(e)]},style:o.getlinestyle(),z2:1,silent:!0});a.style.fill=null,this.group.add(a)},_axistick:function(t,e,i,n){var o=t.getmodel("axistick"),a=(o.get("inside")?-1:1)*o.get("length"),s=n[am(e)],l=f(i,function(t){return new xb({shape:tm(e,[s,s+a],t)})});this.group.add(rs(l,{style:r(o.getmodel("linestyle").getlinestyle(),{stroke:t.get("axisline.linestyle.color")})}))},_axislabel:function(t,e,i,n){for(var o=t.axis,a=t.getcategories(),r=t.getmodel("axislabel"),s=t.getformattedlabels(),l=r.get("margin"),u=o.getlabelscoords(),h=0;hf?"left":"right",m=math.abs(d[1]-p)/c<.3?"middle":d[1]>p?"top":"bottom";a&&a[h]&&a[h].textstyle&&(r=new wo(a[h].textstyle,r,r.ecmodel));var v=new zb({silent:!0});this.group.add(v),no(v.style,r,{x:d[0],y:d[1],textfill:r.gettextcolor()||t.get("axisline.linestyle.color"),text:s[h],textalign:g,textverticalalign:m})}},_splitline:function(t,e,i,n){var o=t.getmodel("splitline").getmodel("linestyle"),a=o.get("color"),s=0;a=a instanceof array?a:[a];for(var l=[],u=0;u=0?"p":"n",t=w;_&&(a[l][i]||(a[l][i]={p:w,n:w}),t=a[l][i][d]);var a,c,l,k;if("radius"===d.dim){var p=d.datatoradius(m)-w,n=s.datatoangle(i);math.abs(p)=0},lk.findtargetinfo=function(t,e){for(var i=this._targetinfolist,n=jm(e,t),o=0;o=0||dk(n,t.getaxis("y").model)>=0)&&a.push(t)}),e.push({panelid:"grid--"+t.id,gridmodel:t,coordsysmodel:t,coordsys:a[0],coordsyses:a,getpanelrect:nk.grid,xaxisdeclared:r[t.id],yaxisdeclared:s[t.id]})}))},geo:function(t,e){ik(t.geomodels,function(t){var i=t.coordinatesystem;e.push({panelid:"geo--"+t.id,geomodel:t,coordsysmodel:t,coordsys:i,coordsyses:[i],getpanelrect:nk.geo})})}},pk=[function(t,e){var i=t.xaxismodel,n=t.yaxismodel,o=t.gridmodel;return!o&&i&&(o=i.axis.grid.model),!o&&n&&(o=n.axis.grid.model),o&&o===e.gridmodel},function(t,e){var i=t.geomodel;return i&&i===e.geomodel}],nk={grid:function(){return this.coordsys.grid.getrect().clone()},geo:function(){var t=this.coordsys,e=t.getboundingrect().clone();return e.applytransform(go(t)),e}},ok={linex:tk(xm,0),liney:tk(xm,1),rect:function(t,e,i){var n=e[ak[t]]([i[0][0],i[1][0]]),o=e[ak[t]]([i[0][1],i[1][1]]),a=[um([n[0],o[0]]),um([n[1],o[1]])];return{values:a,xyminmax:a}},polygon:function(t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]];return{values:f(i,function(i){var o=e[ak[t]](i);return n[0][0]=math.min(n[0][0],o[0]),n[1][0]=math.min(n[1][0],o[1]),n[0][1]=math.max(n[0][1],o[0]),n[1][1]=math.max(n[1][1],o[1]),o}),xyminmax:n}}},ek={linex:tk(ym,0),liney:tk(ym,1),rect:function(t,e,i){return[[t[0][0]-i[0]*e[0][0],t[0][1]-i[0]*e[0][1]],[t[1][0]-i[1]*e[1][0],t[1][1]-i[1]*e[1][1]]]},polygon:function(t,e,i){return f(t,function(t,n){return[t[0]-i[0]*e[n][0],t[1]-i[1]*e[n][1]]})}},zk=["inbrush","outofbrush"],rk="__ecbrushselect",bk="__ecinbrushselectevent",vk=qm.visual.brush;ds(vk,function(t,e,i){t.eachcomponent({maintype:"brush"},function(e){i&&"takeglobalcursor"===i.type&&e.setbrushoption("brush"===i.key?i.brushoption:{brushtype:!1}),(e.brushtargetmanager=new zm(e.option,t)).setinputranges(e.areas,t)})}),fs(vk,function(t,e,n){var o,a,s=[];t.eachcomponent({maintype:"brush"},function(e,n){function l(t){return"all"===m||v[t]}function u(t){return!!t.length}function h(t,e){var i=t.coordinatesystem;w|=i.hasaxisbrushed(),l(e)&&i.eachactivestate(t.getdata(),function(t,e){"active"===t&&(x[e]=1)})}function c(i,n,o){var a=tv(i);if(a&&!ev(e,n)&&(d(b,function(n){a[n.brushtype]&&e.brushtargetmanager.controlseries(n,i,t)&&o.push(n),w|=u(o)}),l(n)&&u(o))){var r=i.getdata();r.each(function(t){qm(a,o,r,t)&&(x[t]=1)})}}var p={brushid:e.id,brushindex:n,brushname:e.name,areas:i(e.areas),selected:[]};s.push(p);var g=e.option,m=g.brushlink,v=[],x=[],_=[],w=0;n||(o=g.throttletype,a=g.throttledelay);var b=f(e.areas,function(t){return iv(r({boundingrect:gk[t.brushtype](t)},t))}),s=om(e.option,zk,function(t){t.mappingmethod="fixed"});y(m)&&d(m,function(t){v[t]=1}),t.eachseries(function(t,e){var i=_[e]=[];"parallel"===t.subtype?h(t,e):c(t,e,i)}),t.eachseries(function(t,e){var i={seriesid:t.id,seriesindex:e,seriesname:t.name,dataindex:[]};p.selected.push(i);var n=tv(t),o=_[e],a=t.getdata(),r=l(e)?function(t){return x[t]?(i.dataindex.push(a.getrawindex(t)),"inbrush"):"outofbrush"}:function(t){return qm(n,o,a,t)?(i.dataindex.push(a.getrawindex(t)),"inbrush"):"outofbrush"};(l(e)?w:u(o))&&zm(zk,s,a,r)})}),km(e,o,a,s,n)});var gk={linex:b,liney:b,rect:function(t){return nv(t.range)},polygon:function(t){for(var e,i=t.range,n=0,o=i.length;ne[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&nv(e)}},fk=["#ddd"];ms({type:"brush",dependencies:["geo","grid","xaxis","yaxis","parallel","series"],defaultoption:{toolbox:null,brushlink:null,seriesindex:"all",geoindex:null,xaxisindex:null,yaxisindex:null,brushtype:"rect",brushmode:"single",transformable:!0,brushstyle:{borderwidth:1,color:"rgba(120,140,180,0.3)",bordercolor:"rgba(120,140,180,0.8)"},throttletype:"fixrate",throttledelay:0,removeonclick:!0,z:1e4},areas:[],brushtype:null,brushoption:{},coordinfolist:[],optionupdated:function(t,e){var i=this.option;!e&&em(i,t,["inbrush","outofbrush"]),i.inbrush=i.inbrush||{},i.outofbrush=i.outofbrush||{color:fk}},setareas:function(t){t&&(this.areas=f(t,function(t){return ov(this.option,t)},this))},setbrushoption:function(t){this.brushoption=ov(this.option,t),this.brushtype=this.brushoption.brushtype}});vs({type:"brush",init:function(t,e){this.ecmodel=t,this.api=e,this.model,(this._brushcontroller=new dd(e.getzr())).on("brush",m(this._onbrush,this)).mount()},render:function(t){return this.model=t,av.apply(this,arguments)},updatetransform:av,updateview:av,dispose:function(){this._brushcontroller.dispose()},_onbrush:function(t,e){var n=this.model.id;this.model.brushtargetmanager.setoutputranges(t,this.ecmodel),(!e.isend||e.removeonclick)&&this.api.dispatchaction({type:"brush",brushid:n,areas:i(t),$from:n})}}),hs({type:"brush",event:"brush"},function(t,e){e.eachcomponent({maintype:"brush",query:t},function(e){e.setareas(t.areas)})}),hs({type:"brushselect",event:"brushselected",update:"none"},function(){});var wk={},hk=am.toolbox.brush;lv.defaultoption={show:!0,type:["rect","polygon","linex","liney","keep","clear"],icon:{rect:"m7.3,34.7 m0.4,10v-0.2h9.8 m89.6,10v-0.2h-9.8 m0.4,60v10.2h9.8 m89.6,60v10.2h-9.8 m12.3,22.4v10.5h13.1 m33.6,10.5h7.8 m49.1,10.5h7.8 m77.5,22.4v10.5h-13 m12.3,31.1v8.2 m77.7,31.1v8.2 m12.3,47.6v11.9h13.1 m33.6,59.5h7.6 m49.1,59.5 h7.7 m77.5,47.6v11.9h-13",polygon:"m55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1s53.5,34.9,55.2,34.9z m50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 c47.3,52.4,48.7,51,50.4,51z m55.6,37.1l1.5-7.8 m60.1,13.5l1.6-8.7l-7.8,4 m59,19l-1,5.3 m24,16.1l6.4,4.9l6.4-3.3 m48.5,11.6 l-5.9,3.1 m19.1,12.8l9.7,5.1l1.1,7.7 m13.4,29.8l1,7.3l6.6,1.6 m11.6,18.4l1,6.1 m32.8,41.9 m26.6,40.4 m27.3,40.2l6.1,1.6 m49.9,52.1l-5.6-7.6l-4.9-1.2",linex:"m15.2,30 m19.7,15.6v1.9h29 m34.8,1.9h40.4 m55.3,15.6v1.9h45.9 m19.7,44.4v58.1h29 m34.8,58.1h40.4 m55.3,44.4 v58.1h45.9 m12.5,20.3l-9.4,9.6l9.6,9.8 m3.1,29.9h16.5 m62.5,20.3l9.4,9.6l62.3,39.7 m71.9,29.9h55.4",liney:"m38.8,7.7 m52.7,12h13.2v9 m65.9,26.6v32 m52.7,46.3h13.2v-9 m24.9,12h11.8v9 m11.8,26.6v32 m24.9,46.3h11.8v-9 m48.2,5.1l-9.3-9l-9.4,9.2 m38.9-3.9v12 m48.2,53.3l-9.3,9l-9.4-9.2 m38.9,62.3v46.4",keep:"m4,10.5v1h10.3 m20.7,1h6.1 m33,1h6.1 m55.4,10.5v1h45.2 m4,17.3v6.6 m55.6,17.3v6.6 m4,30.5v40h10.3 m20.7,40 h6.1 m33,40h6.1 m55.4,30.5v40h45.2 m21,18.9h62.9v48.6h21v18.9z",clear:"m22,14.7l30.9,31 m52.9,14.7l22,45.7 m4.7,16.8v4.2h13.1 m26,4.2h7.8 m41.6,4.2h7.8 m70.3,16.8v4.2h57.2 m4.7,25.9v8.6 m70.3,25.9v8.6 m4.7,43.2v12.6h13.1 m26,55.8h7.8 m41.6,55.8h7.8 m70.3,43.2v12.6h57.2"},title:i(hk.title)};var zk=lv.prototype;zk.render=zk.updateview=function(t,e,i){var n,o,a;e.eachcomponent({maintype:"brush"},function(t){n=t.brushtype,o=t.brushoption.brushmode||"single",a|=t.areas.length}),this._brushtype=n,this._brushmode=o,d(t.get("type",!0),function(e){t.seticonstatus(e,("keep"===e?"multiple"===o:"clear"===e?a:e===n)?"emphasis":"normal")})},zk.geticons=function(){var t=this.model,e=t.get("icon",!0),i={};return d(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},zk.onclick=function(t,e,i){var n=this._brushtype,o=this._brushmode;"clear"===i?(e.dispatchaction({type:"axisareaselect",intervals:[]}),e.dispatchaction({type:"brush",command:"clear",areas:[]})):e.dispatchaction({type:"takeglobalcursor",key:"brush",brushoption:{brushtype:"keep"===i?n:n!==i&&i,brushmode:"keep"===i?"multiple"===o?"single":"multiple":o}})},rv("brush",lv),ls(function(t,e){var i=t&&t.brush;if(y(i)||(i=i?[i]:[]),i.length){var n=[];d(i,function(t){var e=t.hasownproperty("toolbox")?t.toolbox:[];e instanceof array&&(n=n.concat(e))});var o=t&&t.toolbox;y(o)&&(o=o[0]),o||(o={feature:{}},t.toolbox=[o]);var a=o.feature||(o.feature={}),r=a.brush||(a.brush={}),s=r.type||(r.type=[]);s.push.apply(s,n),pm(s),e&&!s.length&&s.push.apply(s,bk)}});uv.prototype={constructor:uv,type:"calendar",dimensions:["time","value"],getdimensionsinfo:function(){return[{name:"time",type:"time"},"value"]},getrangeinfo:function(){return this._rangeinfo},getmodel:function(){return this._model},getrect:function(){return this._rect},getcellwidth:function(){return this._sw},getcellheight:function(){return this._sh},getorient:function(){return this._orient},getfirstdayofweek:function(){return this._firstdayofweek},getdateinfo:function(t){var e=(t=zo(t)).getfullyear(),i=t.getmonth()+1;i=i<10?"0"+i:i;var n=t.getdate();n=n<10?"0"+n:n;var o=t.getday();return o=math.abs((o+7-this.getfirstdayofweek())%7),{y:e,m:i,d:n,day:o,time:t.gettime(),formateddate:e+"-"+i+"-"+n,date:t}},getnextnday:function(t,e){return 0===(e=e||0)?this.getdateinfo(t):((t=new date(this.getdateinfo(t).time)).setdate(t.getdate()+e),this.getdateinfo(t))},update:function(t,e){function i(t,e){return null!=t[e]&&"auto"!==t[e]}this._firstdayofweek=+this._model.getmodel("daylabel").get("firstday"),this._orient=this._model.get("orient"),this._linewidth=this._model.getmodel("itemstyle").getitemstyle().linewidth||0,this._rangeinfo=this._getrangeinfo(this._initrangeoption());var n=this._rangeinfo.weeks||1,o=["width","height"],a=this._model.get("cellsize").slice(),r=this._model.getboxlayoutparams(),s="horizontal"===this._orient?[n,7]:[7,n];d([0,1],function(t){i(a,t)&&(r[o[t]]=a[t]*s[t])});var l={width:e.getwidth(),height:e.getheight()},u=this._rect=qo(r,l);d([0,1],function(t){i(a,t)||(a[t]=u[o[t]]/s[t])}),this._sw=a[0],this._sh=a[1]},datatopoint:function(t,e){y(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getdateinfo(t),n=this._rangeinfo,o=i.formateddate;if(e&&!(i.time>=n.start.time&&i.time<=n.end.time))return[nan,nan];var a=i.day,r=this._getrangeinfo([n.start.time,o]).nthweek;return"vertical"===this._orient?[this._rect.x+a*this._sw+this._sw/2,this._rect.y+r*this._sh+this._sh/2]:[this._rect.x+r*this._sw+this._sw/2,this._rect.y+a*this._sh+this._sh/2]},pointtodata:function(t){var e=this.pointtodate(t);return e&&e.time},datatorect:function(t,e){var i=this.datatopoint(t,e);return{contentshape:{x:i[0]-(this._sw-this._linewidth)/2,y:i[1]-(this._sh-this._linewidth)/2,width:this._sw-this._linewidth,height:this._sh-this._linewidth},center:i,tl:[i[0]-this._sw/2,i[1]-this._sh/2],tr:[i[0]+this._sw/2,i[1]-this._sh/2],br:[i[0]+this._sw/2,i[1]+this._sh/2],bl:[i[0]-this._sw/2,i[1]+this._sh/2]}},pointtodate:function(t){var e=math.floor((t[0]-this._rect.x)/this._sw)+1,i=math.floor((t[1]-this._rect.y)/this._sh)+1,n=this._rangeinfo.range;return"vertical"===this._orient?this._getdatebyweeksandday(i,e-1,n):this._getdatebyweeksandday(e,i-1,n)},converttopixel:v(hv,"datatopoint"),convertfrompixel:v(hv,"pointtodata"),_initrangeoption:function(){var t=this._model.get("range"),e=t;if(y(e)&&1===e.length&&(e=e[0]),/^\d{4}$/.test(e)&&(t=[e+"-01-01",e+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(e)){var i=this.getdateinfo(e),n=i.date;n.setmonth(n.getmonth()+1);var o=this.getnextnday(n,-1);t=[i.formateddate,o.formateddate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(e)&&(t=[e,e]);var a=this._getrangeinfo(t);return a.start.time>a.end.time&&t.reverse(),t},_getrangeinfo:function(t){var e;(t=[this.getdateinfo(t[0]),this.getdateinfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var i=math.floor(t[1].time/864e5)-math.floor(t[0].time/864e5)+1,n=new date(t[0].time),o=n.getdate(),a=t[1].date.getdate();if(n.setdate(o+i-1),n.getdate()!==a)for(var r=n.gettime()-t[1].time>0?1:-1;n.getdate()!==a&&(n.gettime()-t[1].time)*r>0;)i-=r,n.setdate(o+i-1);var s=math.floor((i+t[0].day+6)/7),l=e?1-s:s-1;return e&&t.reverse(),{range:[t[0].formateddate,t[1].formateddate],start:t[0],end:t[1],allday:i,weeks:s,nthweek:l,fweek:t[0].day,lweek:t[1].day}},_getdatebyweeksandday:function(t,e,i){var n=this._getrangeinfo(i);if(t>n.weeks||0===t&&en.lweek)return!1;var o=7*(t-1)-n.fweek+e,a=new date(n.start.time);return a.setdate(n.start.d+o),this.getdateinfo(a)}},uv.dimensions=uv.prototype.dimensions,uv.getdimensionsinfo=uv.prototype.getdimensionsinfo,uv.create=function(t,e){var i=[];return t.eachcomponent("calendar",function(n){var o=new uv(n,t,e);i.push(o),n.coordinatesystem=o}),t.eachseries(function(t){"calendar"===t.get("coordinatesystem")&&(t.coordinatesystem=i[t.get("calendarindex")||0])}),i},ca.register("calendar",uv);var uk=ks.extend({type:"calendar",coordinatesystem:null,defaultoption:{zlevel:0,z:2,left:80,top:60,cellsize:20,orient:"horizontal",splitline:{show:!0,linestyle:{color:"#000",width:1,type:"solid"}},itemstyle:{color:"#fff",borderwidth:1,bordercolor:"#ccc"},daylabel:{show:!0,firstday:0,position:"start",margin:"50%",namemap:"en",color:"#000"},monthlabel:{show:!0,position:"start",margin:5,align:"center",namemap:"en",formatter:null,color:"#000"},yearlabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontfamily:"sans-serif",fontweight:"bolder",fontsize:20}},init:function(t,e,i,n){var o=na(t);uk.superapply(this,"init",arguments),cv(t,o)},mergeoption:function(t,e){uk.superapply(this,"mergeoption",arguments),cv(this.option,t)}}),jk={en:["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],cn:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},xk={en:["s","m","t","w","t","f","s"],cn:["日","一","二","三","四","五","六"]};vs({type:"calendar",_tlpoints:null,_blpoints:null,_firstdayofmonth:null,_firstdaypoints:null,render:function(t,e,i){var n=this.group;n.removeall();var o=t.coordinatesystem,a=o.getrangeinfo(),r=o.getorient();this._renderdayrect(t,a,n),this._renderlines(t,a,r,n),this._renderyeartext(t,a,r,n),this._rendermonthtext(t,r,n),this._renderweektext(t,a,r,n)},_renderdayrect:function(t,e,i){for(var n=t.coordinatesystem,o=t.getmodel("itemstyle").getitemstyle(),a=n.getcellwidth(),r=n.getcellheight(),s=e.start.time;s<=e.end.time;s=n.getnextnday(s,1).time){var l=n.datatorect([s],!1).tl,u=new jb({shape:{x:l[0],y:l[1],width:a,height:r},cursor:"default",style:o});i.add(u)}},_renderlines:function(t,e,i,n){function o(e){a._firstdayofmonth.push(r.getdateinfo(e)),a._firstdaypoints.push(r.datatorect([e],!1).tl);var o=a._getlinepointsofoneweek(t,e,i);a._tlpoints.push(o[0]),a._blpoints.push(o[o.length-1]),l&&a._drawsplitline(o,s,n)}var a=this,r=t.coordinatesystem,s=t.getmodel("splitline.linestyle").getlinestyle(),l=t.get("splitline.show"),u=s.linewidth;this._tlpoints=[],this._blpoints=[],this._firstdayofmonth=[],this._firstdaypoints=[];for(var h=e.start,c=0;h.time<=e.end.time;c++){o(h.formateddate),0===c&&(h=r.getdateinfo(e.start.y+"-"+e.start.m));var d=h.date;d.setmonth(d.getmonth()+1),h=r.getdateinfo(d)}o(r.getnextnday(e.end.time,1).formateddate),l&&this._drawsplitline(a._getedgespoints(a._tlpoints,u,i),s,n),l&&this._drawsplitline(a._getedgespoints(a._blpoints,u,i),s,n)},_getedgespoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],o="horizontal"===i?0:1;return n[0][o]=n[0][o]-e/2,n[1][o]=n[1][o]+e/2,n},_drawsplitline:function(t,e,i){var n=new ub({z2:20,shape:{points:t},style:e});i.add(n)},_getlinepointsofoneweek:function(t,e,i){var n=t.coordinatesystem;e=n.getdateinfo(e);for(var o=[],a=0;a<7;a++){var r=n.getnextnday(e.time,a),s=n.datatorect([r.time],!1);o[2*r.day]=s.tl,o[2*r.day+1]=s["horizontal"===i?"bl":"tr"]}return o},_formatterlabel:function(t,e){return"string"==typeof t&&t?jo(t,e):"function"==typeof t?t(e):e.namemap},_yeartextpositioncontrol:function(t,e,i,n,o){e=e.slice();var a=["center","bottom"];"bottom"===n?(e[1]+=o,a=["center","top"]):"left"===n?e[0]-=o:"right"===n?(e[0]+=o,a=["center","top"]):e[1]-=o;var r=0;return"left"!==n&&"right"!==n||(r=math.pi/2),{rotation:r,position:e,style:{textalign:a[0],textverticalalign:a[1]}}},_renderyeartext:function(t,e,i,n){var o=t.getmodel("yearlabel");if(o.get("show")){var a=o.get("margin"),r=o.get("position");r||(r="horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===i?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=o.get("formatter"),p={start:e.start.y,end:e.end.y,namemap:d},g=this._formatterlabel(f,p),m=new zb({z2:30});no(m.style,o,{text:g}),m.attr(this._yeartextpositioncontrol(m,c[r],i,r,a)),n.add(m)}},_monthtextpositioncontrol:function(t,e,i,n,o){var a="left",r="top",s=t[0],l=t[1];return"horizontal"===i?(l+=o,e&&(a="center"),"start"===n&&(r="bottom")):(s+=o,e&&(r="middle"),"start"===n&&(a="right")),{x:s,y:l,textalign:a,textverticalalign:r}},_rendermonthtext:function(t,e,i){var n=t.getmodel("monthlabel");if(n.get("show")){var o=n.get("namemap"),r=n.get("margin"),s=n.get("position"),l=n.get("align"),u=[this._tlpoints,this._blpoints];_(o)&&(o=jk[o.touppercase()]||[]);var h="start"===s?0:1,c="horizontal"===e?0:1;r="start"===s?-r:r;for(var d="center"===l,f=0;f=r[0]&&t<=r[1]}if(t===this._datazoommodel){var n=this._dimname,o=this.gettargetseriesmodels(),a=t.get("filtermode"),r=this._valuewindow;"none"!==a&&$k(o,function(t){var e=t.getdata(),o=e.mapdimension(n,!0);"weakfilter"===a?e.filterself(function(t){for(var i,n,a,s=0;sr[1];if(u&&!h&&!c)return!0;u&&(a=!0),h&&(i=!0),c&&(n=!0)}return a&&i&&n}):$k(o,function(n){if("empty"===a)t.setdata(e.map(n,function(t){return i(t)?t:nan}));else{var o={};o[n]=r,e.selectrange(o)}}),$k(o,function(t){e.setapproximateextent(r,t)})})}}};var qk=d,tp=qk,ep=ms({type:"datazoom",dependencies:["xaxis","yaxis","zaxis","radiusaxis","angleaxis","singleaxis","series"],defaultoption:{zlevel:0,z:4,orient:null,xaxisindex:null,yaxisindex:null,filtermode:"filter",throttle:null,start:0,end:100,startvalue:null,endvalue:null,minspan:null,maxspan:null,minvaluespan:null,maxvaluespan:null,rangemode:null},init:function(t,e,i){this._dataintervalbyaxis={},this._datainfo={},this._axisproxies={},this.textstylemodel,this._autothrottle=!0,this._rangepropmode=["percent","percent"];var n=yv(t);this.mergedefaultandtheme(t,i),this.doinit(n)},mergeoption:function(t){var e=yv(t);n(this.option,t,!0),this.doinit(e)},doinit:function(t){var e=this.option;ax.canvassupported||(e.realtime=!1),this._setdefaultthrottle(t),xv(this,t),qk([["start","startvalue"],["end","endvalue"]],function(t,i){"value"===this._rangepropmode[i]&&(e[t[0]]=null)},this),this.textstylemodel=this.getmodel("textstyle"),this._resettarget(),this._giveaxisproxies()},_giveaxisproxies:function(){var t=this._axisproxies;this.eachtargetaxis(function(e,i,n,o){var a=this.dependentmodels[e.axis][i],r=a.__dzaxisproxy||(a.__dzaxisproxy=new jk(e.name,i,this,o));t[e.name+"_"+i]=r},this)},_resettarget:function(){var t=this.option,e=this._judgeautomode();tp(function(e){var i=e.axisindex;t[i]=si(t[i])},this),"axisindex"===e?this._autosetaxisindex():"orient"===e&&this._autosetorient()},_judgeautomode:function(){var t=this.option,e=!1;tp(function(i){null!=t[i.axisindex]&&(e=!0)},this);var i=t.orient;return null==i&&e?"orient":e?void 0:(null==i&&(t.orient="horizontal"),"axisindex")},_autosetaxisindex:function(){var t=!0,e=this.get("orient",!0),i=this.option,n=this.dependentmodels;if(t){var o="vertical"===e?"y":"x";n[o+"axis"].length?(i[o+"axisindex"]=[0],t=!1):qk(n.singleaxis,function(n){t&&n.get("orient",!0)===e&&(i.singleaxisindex=[n.componentindex],t=!1)})}t&&tp(function(e){if(t){var n=[],o=this.dependentmodels[e.axis];if(o.length&&!n.length)for(var a=0,r=o.length;a0?100:20}},getfirsttargetaxismodel:function(){var t;return tp(function(e){if(null==t){var i=this.get(e.axisindex);i.length&&(t=this.dependentmodels[e.axis][i[0]])}},this),t},eachtargetaxis:function(t,e){var i=this.ecmodel;tp(function(n){qk(this.get(n.axisindex),function(o){t.call(e,n,o,this,i)},this)},this)},getaxisproxy:function(t,e){return this._axisproxies[t+"_"+e]},getaxismodel:function(t,e){var i=this.getaxisproxy(t,e);return i&&i.getaxismodel()},setrawrange:function(t,e){var i=this.option;qk([["start","startvalue"],["end","endvalue"]],function(e){null==t[e[0]]&&null==t[e[1]]||(i[e[0]]=t[e[0]],i[e[1]]=t[e[1]])},this),!e&&xv(this,t)},getpercentrange:function(){var t=this.findrepresentativeaxisproxy();if(t)return t.getdatapercentwindow()},getvaluerange:function(t,e){if(null!=t||null!=e)return this.getaxisproxy(t,e).getdatavaluewindow();var i=this.findrepresentativeaxisproxy();return i?i.getdatavaluewindow():void 0},findrepresentativeaxisproxy:function(t){if(t)return t.__dzaxisproxy;var e=this._axisproxies;for(var i in e)if(e.hasownproperty(i)&&e[i].hostedby(this))return e[i];for(var i in e)if(e.hasownproperty(i)&&!e[i].hostedby(this))return e[i]},getrangepropmode:function(){return this._rangepropmode.slice()}}),ip=vm.extend({type:"datazoom",render:function(t,e,i,n){this.datazoommodel=t,this.ecmodel=e,this.api=i},gettargetcoordinfo:function(){function t(t,e,i,n){for(var o,a=0;a0&&e%g)p+=f;else{var i=null==t||isnan(t)||""===t,n=i?0:op(t,a,u,!0);i&&!l&&e?(c.push([c[c.length-1][0],0]),d.push([d[d.length-1][0],0])):!i&&l&&(c.push([p,0]),d.push([p,0])),c.push([p,n]),d.push([p,n]),p+=f,l=i}});var m=this.datazoommodel;this._displayables.bargroup.add(new zb({shape:{points:c},style:r({fill:m.get("databackgroundcolor")},m.getmodel("databackground.areastyle").getareastyle()),silent:!0,z2:-20})),this._displayables.bargroup.add(new ub({shape:{points:d},style:m.getmodel("databackground.linestyle").getlinestyle(),silent:!0,z2:-19}))}}},_preparedatashadowinfo:function(){var t=this.datazoommodel,e=t.get("showdatashadow");if(!1!==e){var i,n=this.ecmodel;return t.eachtargetaxis(function(o,a){d(t.getaxisproxy(o.name,a).gettargetseriesmodels(),function(t){if(!(i||!0!==e&&l(hp,t.get("type"))<0)){var r,s=n.getcomponent(o.axis,a).axis,u=_v(o.name),h=t.coordinatesystem;null!=u&&h.getotheraxis&&(r=h.getotheraxis(s).inverse),u=t.getdata().mapdimension(u),i={thisaxis:s,series:t,thisdim:o.name,otherdim:u,otheraxisinverse:r}}},this)},this),i}},_renderhandle:function(){var t=this._displayables,e=t.handles=[],i=t.handlelabels=[],n=this._displayables.bargroup,o=this._size,a=this.datazoommodel;n.add(t.filler=new np({draggable:!0,cursor:wv(this._orient),drift:rp(this._ondragmove,this,"all"),onmousemove:function(t){rw(t.event)},ondragstart:rp(this._showdatainfo,this,!0),ondragend:rp(this._ondragend,this),onmouseover:rp(this._showdatainfo,this,!0),onmouseout:rp(this._showdatainfo,this,!1),style:{fill:a.get("fillercolor"),textposition:"inside"}})),n.add(new np(fn({silent:!0,shape:{x:0,y:0,width:o[0],height:o[1]},style:{stroke:a.get("databackgroundcolor")||a.get("bordercolor"),linewidth:1,fill:"rgba(0,0,0,0)"}}))),sp([0,1],function(t){var o=_o(a.get("handleicon"),{cursor:wv(this._orient),draggable:!0,drift:rp(this._ondragmove,this,t),onmousemove:function(t){rw(t.event)},ondragend:rp(this._ondragend,this),onmouseover:rp(this._showdatainfo,this,!0),onmouseout:rp(this._showdatainfo,this,!1)},{x:-1,y:0,width:2,height:2}),r=o.getboundingrect();this._handleheight=to(a.get("handlesize"),this._size[1]),this._handlewidth=r.width/r.height*this._handleheight,o.setstyle(a.getmodel("handlestyle").getitemstyle());var s=a.get("handlecolor");null!=s&&(o.style.fill=s),n.add(e[t]=o);var l=a.textstylemodel;this.group.add(i[t]=new zb({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textverticalalign:"middle",textalign:"center",textfill:l.gettextcolor(),textfont:l.getfont()},z2:10}))},this)},_resetinterval:function(){var t=this._range=this.datazoommodel.getpercentrange(),e=this._getviewextent();this._handleends=[op(t[0],[0,100],e,!0),op(t[1],[0,100],e,!0)]},_updateinterval:function(t,e){var i=this.datazoommodel,n=this._handleends,o=this._getviewextent(),a=i.findrepresentativeaxisproxy().getminmaxspan(),r=[0,100];ec(e,n,o,i.get("zoomlock")?"all":t,null!=a.minspan?op(a.minspan,r,o,!0):null,null!=a.maxspan?op(a.maxspan,r,o,!0):null),this._range=ap([op(n[0],o,r,!0),op(n[1],o,r,!0)])},_updateview:function(t){var e=this._displayables,i=this._handleends,n=ap(i.slice()),o=this._size;sp([0,1],function(t){var n=e.handles[t],a=this._handleheight;n.attr({scale:[a/2,a/2],position:[i[t],o[1]/2-a/2]})},this),e.filler.setshape({x:n[0],y:0,width:n[1]-n[0],height:o[1]}),this._updatedatainfo(t)},_updatedatainfo:function(t){function e(t){var e=go(n.handles[t].parent,this.group),i=vo(0===t?"right":"left",e),s=this._handlewidth/2+up,l=mo([c[t]+(0===t?-s:s),this._size[1]/2],e);o[t].setstyle({x:l[0],y:l[1],textverticalalign:a===lp?"middle":i,textalign:a===lp?i:"center",text:r[t]})}var i=this.datazoommodel,n=this._displayables,o=n.handlelabels,a=this._orient,r=["",""];if(i.get("showdetail")){var s=i.findrepresentativeaxisproxy();if(s){var l=s.getaxismodel().axis,u=this._range,h=t?s.calculatedatawindow({start:u[0],end:u[1]}).valuewindow:s.getdatavaluewindow();r=[this._formatlabel(h[0],l),this._formatlabel(h[1],l)]}}var c=ap(this._handleends.slice());e.call(this,0),e.call(this,1)},_formatlabel:function(t,e){var i=this.datazoommodel,n=i.get("labelformatter"),o=i.get("labelprecision");null!=o&&"auto"!==o||(o=e.getpixelprecision());var a=null==t||isnan(t)?"":"category"===e.type||"time"===e.type?e.scale.getlabel(math.round(t)):t.tofixed(math.min(o,20));return x(n)?n(t,a):_(n)?n.replace("{value}",a):a},_showdatainfo:function(t){t=this._dragging||t;var e=this._displayables.handlelabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_ondragmove:function(t,e,i){this._dragging=!0;var n=mo([e,i],this._displayables.bargroup.getlocaltransform(),!0);this._updateinterval(t,n[0]);var o=this.datazoommodel.get("realtime");this._updateview(!o),o&&this._dispatchzoomaction()},_ondragend:function(){this._dragging=!1,this._showdatainfo(!1),!this.datazoommodel.get("realtime")&&this._dispatchzoomaction()},_onclickpanelclick:function(t){var e=this._size,i=this._displayables.bargroup.transformcoordtolocal(t.offsetx,t.offsety);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleends,o=(n[0]+n[1])/2;this._updateinterval("all",i[0]-o),this._updateview(),this._dispatchzoomaction()}},_dispatchzoomaction:function(){var t=this._range;this.api.dispatchaction({type:"datazoom",from:this.uid,datazoomid:this.datazoommodel.id,start:t[0],end:t[1]})},_findcoordrect:function(){var t;if(sp(this.gettargetcoordinfo(),function(e){if(!t&&e.length){var i=e[0].model.coordinatesystem;t=i.getrect&&i.getrect()}}),!t){var e=this.api.getwidth(),i=this.api.getheight();t={x:.2*e,y:.2*i,width:.6*e,height:.6*i}}return t}});ep.extend({type:"datazoom.inside",defaultoption:{disabled:!1,zoomlock:!1,zoomonmousewheel:!0,moveonmousemove:!0,preventdefaultmousemove:!0}});var dp=v,fp="\0_ec_datazoom_roams",pp=m,gp=ip.extend({type:"datazoom.inside",init:function(t,e){this._range},render:function(t,e,i,n){gp.superapply(this,"render",arguments),mv(n,t.id)&&(this._range=t.getpercentrange()),d(this.gettargetcoordinfo(),function(e,n){var o=f(e,function(t){return iv(t.model)});d(e,function(e){var a=e.model,r=t.option;bv(i,{coordid:iv(a),allcoordids:o,containspoint:function(t,e,i){return a.coordinatesystem.containpoint([e,i])},datazoomid:t.id,throttlerate:t.get("throttle",!0),pangetrange:pp(this._onpan,this,e,n),zoomgetrange:pp(this._onzoom,this,e,n),zoomlock:r.zoomlock,disabled:r.disabled,roamcontrolleropt:{zoomonmousewheel:r.zoomonmousewheel,moveonmousemove:r.moveonmousemove,preventdefaultmousemove:r.preventdefaultmousemove}})},this)},this)},dispose:function(){sv(this.api,this.datazoommodel.id),gp.superapply(this,"dispose",arguments),this._range=null},_onpan:function(t,e,i,n,o,a,r,s,l){var u=this._range.slice(),h=t.axismodels[0];if(h){var c=mp[e]([a,r],[s,l],h,i,t),d=c.signal*(u[1]-u[0])*c.pixel/c.pixellength;return ec(d,u,[0,100],"all"),this._range=u}},_onzoom:function(t,e,i,n,o,a){var r=this._range.slice(),s=t.axismodels[0];if(s){var l=mp[e](null,[o,a],s,i,t),u=(l.signal>0?l.pixelstart+l.pixellength-l.pixel:l.pixel-l.pixelstart)/l.pixellength*(r[1]-r[0])+r[0];n=math.max(1/n,0),r[0]=(r[0]-u)*n+u,r[1]=(r[1]-u)*n+u;var h=this.datazoommodel.findrepresentativeaxisproxy().getminmaxspan();return ec(0,r,[0,100],0,h.minspan,h.maxspan),this._range=r}}}),mp={grid:function(t,e,i,n,o){var a=i.axis,r={},s=o.model.coordinatesystem.getrect();return t=t||[0,0],"x"===a.dim?(r.pixel=e[0]-t[0],r.pixellength=s.width,r.pixelstart=s.x,r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixellength=s.height,r.pixelstart=s.y,r.signal=a.inverse?-1:1),r},polar:function(t,e,i,n,o){var a=i.axis,r={},s=o.model.coordinatesystem,l=s.getradiusaxis().getextent(),u=s.getangleaxis().getextent();return t=t?s.pointtocoord(t):[0,0],e=s.pointtocoord(e),"radiusaxis"===i.maintype?(r.pixel=e[0]-t[0],r.pixellength=l[1]-l[0],r.pixelstart=l[0],r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixellength=u[1]-u[0],r.pixelstart=u[0],r.signal=a.inverse?-1:1),r},singleaxis:function(t,e,i,n,o){var a=i.axis,r=o.model.coordinatesystem.getrect(),s={};return t=t||[0,0],"horizontal"===a.orient?(s.pixel=e[0]-t[0],s.pixellength=r.width,s.pixelstart=r.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixellength=r.height,s.pixelstart=r.y,s.signal=a.inverse?-1:1),s}};us({gettargetseries:function(t){var e=z();return t.eachcomponent("datazoom",function(t){t.eachtargetaxis(function(t,i,n){d(n.getaxisproxy(t.name,i).gettargetseriesmodels(),function(t){e.set(t.uid,t)})})}),e},isoverallfilter:!0,overallreset:function(t,e){t.eachcomponent("datazoom",function(t){t.eachtargetaxis(function(t,i,n){n.getaxisproxy(t.name,i).reset(n,e)}),t.eachtargetaxis(function(t,i,n){n.getaxisproxy(t.name,i).filterdata(n,e)})}),t.eachcomponent("datazoom",function(t){var e=t.findrepresentativeaxisproxy(),i=e.getdatapercentwindow(),n=e.getdatavaluewindow();t.setrawrange({start:i[0],end:i[1],startvalue:n[0],endvalue:n[1]},!0)})}}),hs("datazoom",function(t,e){var i=fv(m(e.eachcomponent,e,"datazoom"),qk,function(t,e){return t.get(e.axisindex)}),n=[];e.eachcomponent({maintype:"datazoom",query:t},function(t,e){n.push.apply(n,i(t).nodes)}),d(n,function(e,i){e.setrawrange({start:t.start,end:t.end,startvalue:t.startvalue,endvalue:t.endvalue})})});var vp=d,yp=function(t){var e=t&&t.visualmap;y(e)||(e=e?[e]:[]),vp(e,function(t){if(t){ov(t,"splitlist")&&!ov(t,"pieces")&&(t.pieces=t.splitlist,delete t.splitlist);var e=t.pieces;e&&y(e)&&vp(e,function(t){w(t)&&(ov(t,"start")&&!ov(t,"min")&&(t.min=t.start),ov(t,"end")&&!ov(t,"max")&&(t.max=t.end))})}})};ks.registersubtypedefaulter("visualmap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitnumber>0)&&!t.calculable?"piecewise":"continuous"});var xp=qm.visual.component;fs(xp,{createonallseries:!0,reset:function(t,e){var i=[];return e.eachcomponent("visualmap",function(e){e.istargetseries(t)&&i.push(rm(e.statelist,e.targetvisuals,m(e.getvaluestate,e),e.getdatadimension(t.getdata())))}),i}}),fs(xp,{createonallseries:!0,reset:function(t,e){var i=t.getdata(),n=[];e.eachcomponent("visualmap",function(e){if(e.istargetseries(t)){var o=e.getvisualmeta(m(ev,null,t,e))||{stops:[],outercolors:[]},a=e.getdatadimension(i),r=i.getdimensioninfo(a);null!=r&&(o.dimension=r.index,n.push(o))}}),t.getdata().setvisual("visualmeta",n)}});var _p={get:function(t,e,n){var o=i((wp[t]||{})[e]);return n&&y(o)?o[o.length-1]:o}},wp={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorhue:{active:[0,360],inactive:[0,0]},colorsaturation:{active:[.3,1],inactive:[0,0]},colorlightness:{active:[.9,.5],inactive:[0,0]},coloralpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundrect","diamond"],inactive:["none"]},symbolsize:{active:[10,50],inactive:[0,0]}},bp=fa.mapvisual,sp=fa.eachvisual,mp=y,ip=d,dp=co,tp=do,ap=b,cp=ms({type:"visualmap",dependencies:["series"],statelist:["inrange","outofrange"],replacableoptionkeys:["inrange","outofrange","target","controller","color"],databound:[-1/0,1/0],layoutmode:{type:"box",ignoresize:!0},defaultoption:{show:!0,zlevel:0,z:4,seriesindex:"all",min:0,max:200,dimension:null,inrange:null,outofrange:null,left:0,right:null,top:null,bottom:0,itemwidth:null,itemheight:null,inverse:!1,orient:"vertical",backgroundcolor:"rgba(0,0,0,0)",bordercolor:"#ccc",contentcolor:"#5793f3",inactivecolor:"#aaa",borderwidth:0,padding:5,textgap:10,precision:0,color:null,formatter:null,text:null,textstyle:{color:"#333"}},init:function(t,e,i){this._dataextent,this.targetvisuals={},this.controllervisuals={},this.textstylemodel,this.itemsize,this.mergedefaultandtheme(t,i)},optionupdated:function(t,e){var i=this.option;ax.canvassupported||(i.realtime=!1),!e&&em(i,t,this.replacableoptionkeys),this.textstylemodel=this.getmodel("textstyle"),this.resetitemsize(),this.completevisualoption()},resetvisual:function(t){var e=this.statelist;t=m(t,this),this.controllervisuals=om(this.option.controller,e,t),this.targetvisuals=om(this.option.target,e,t)},gettargetseriesindices:function(){var t=this.option.seriesindex,e=[];return null==t||"all"===t?this.ecmodel.eachseries(function(t,i){e.push(i)}):e=si(t),e},eachtargetseries:function(t,e){d(this.gettargetseriesindices(),function(i){t.call(e,this.ecmodel.getseriesbyindex(i))},this)},istargetseries:function(t){var e=!1;return this.eachtargetseries(function(i){i===t&&(e=!0)}),e},formatvaluetext:function(t,e,i){function n(t){return t===l[0]?"min":t===l[1]?"max":(+t).tofixed(math.min(s,20))}var o,a,r=this.option,s=r.precision,l=this.databound,u=r.formatter;return i=i||["<",">"],y(t)&&(t=t.slice(),o=!0),a=e?t:o?[n(t[0]),n(t[1])]:n(t),_(u)?u.replace("{value}",o?a[0]:a).replace("{value2}",o?a[1]:a):x(u)?o?u(t[0],t[1]):u(t):o?t[0]===l[0]?i[0]+" "+a[1]:t[1]===l[1]?i[1]+" "+a[0]:a[0]+" - "+a[1]:a},resetextent:function(){var t=this.option,e=dp([t.min,t.max]);this._dataextent=e},getdatadimension:function(t){var e=this.option.dimension,i=t.dimensions;if(null!=e||i.length){if(null!=e)return t.getdimension(e);for(var n=t.dimensions,o=n.length-1;o>=0;o--){var a=n[o];if(!t.getdimensioninfo(a).iscalculationcoord)return a}}},getextent:function(){return this._dataextent.slice()},completevisualoption:function(){function t(t){mp(o.color)&&!t.inrange&&(t.inrange={color:o.color.slice().reverse()}),t.inrange=t.inrange||{color:e.get("gradientcolor")},ip(this.statelist,function(e){var i=t[e];if(_(i)){var n=_p.get(i,"active",l);n?(t[e]={},t[e][i]=n):delete t[e]}},this)}var e=this.ecmodel,o=this.option,a={inrange:o.inrange,outofrange:o.outofrange},r=o.target||(o.target={}),s=o.controller||(o.controller={});n(r,a),n(s,a);var l=this.iscategory();t.call(this,r),t.call(this,s),function(t,e,i){var n=t[e],o=t[i];n&&!o&&(o=t[i]={},ip(n,function(t,e){if(fa.isvalidtype(e)){var i=_p.get(e,"inactive",l);null!=i&&(o[e]=i,"color"!==e||o.hasownproperty("opacity")||o.hasownproperty("coloralpha")||(o.opacity=[0,0]))}}))}.call(this,r,"inrange","outofrange"),function(t){var e=(t.inrange||{}).symbol||(t.outofrange||{}).symbol,n=(t.inrange||{}).symbolsize||(t.outofrange||{}).symbolsize,o=this.get("inactivecolor");ip(this.statelist,function(a){var r=this.itemsize,s=t[a];s||(s=t[a]={color:l?o:[o]}),null==s.symbol&&(s.symbol=e&&i(e)||(l?"roundrect":["roundrect"])),null==s.symbolsize&&(s.symbolsize=n&&i(n)||(l?r[0]:[r[0],r[0]])),s.symbol=bp(s.symbol,function(t){return"none"===t||"square"===t?"roundrect":t});var u=s.symbolsize;if(null!=u){var h=-1/0;sp(u,function(t){t>h&&(h=t)}),s.symbolsize=bp(u,function(t){return tp(t,[0,h],[0,r[0]],!0)})}},this)}.call(this,s)},resetitemsize:function(){this.itemsize=[parsefloat(this.get("itemwidth")),parsefloat(this.get("itemheight"))]},iscategory:function(){return!!this.option.categories},setselected:ap,getvaluestate:ap,getvisualmeta:ap}),lp=[20,140],kp=cp.extend({type:"visualmap.continuous",defaultoption:{align:"auto",calculable:!1,range:null,realtime:!0,itemheight:null,itemwidth:null,hoverlink:!0,hoverlinkdatasize:null,hoverlinkonhandle:null},optionupdated:function(t,e){kp.superapply(this,"optionupdated",arguments),this.resetextent(),this.resetvisual(function(t){t.mappingmethod="linear",t.dataextent=this.getextent()}),this._resetrange()},resetitemsize:function(){kp.superapply(this,"resetitemsize",arguments);var t=this.itemsize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isnan(t[0]))&&(t[0]=lp[0]),(null==t[1]||isnan(t[1]))&&(t[1]=lp[1])},_resetrange:function(){var t=this.getextent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):y(e)&&(e[0]>e[1]&&e.reverse(),e[0]=math.max(e[0],t[0]),e[1]=math.min(e[1],t[1]))},completevisualoption:function(){cp.prototype.completevisualoption.apply(this,arguments),d(this.statelist,function(t){var e=this.option.controller[t].symbolsize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setselected:function(t){this.option.range=t.slice(),this._resetrange()},getselected:function(){var t=this.getextent(),e=co((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inrange":"outofrange"},findtargetdataindices:function(t){var e=[];return this.eachtargetseries(function(i){var n=[],o=i.getdata();o.each(this.getdatadimension(o),function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)},this),e.push({seriesid:i.id,dataindex:n})},this),e},getvisualmeta:function(t){function e(e,i){o.push({value:e,color:t(e,i)})}for(var i=zv(0,0,this.getextent()),n=zv(0,0,this.option.range.slice()),o=[],a=0,r=0,s=n.length,l=i.length;rt[1])break;i.push({color:this.getcontrollervisual(a,"color",e),offset:o/100})}return i.push({color:this.getcontrollervisual(t[1],"color",e),offset:1}),i},_createbarpoints:function(t,e){var i=this.visualmapmodel.itemsize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createbargroup:function(t){var e=this._orient,i=this.visualmapmodel.get("inverse");return new l_("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-math.pi/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:math.pi/2})},_updatehandle:function(t,e){if(this._usehandle){var i=this._shapes,n=this.visualmapmodel,o=i.handlethumbs,a=i.handlelabels;op([0,1],function(r){var s=o[r];s.setstyle("fill",e.handlescolor[r]),s.position[1]=t[r];var l=mo(i.handlelabelpoints[r],go(s,this.group));a[r].setstyle({x:l[0],y:l[1],text:n.formatvaluetext(this._datainterval[r]),textverticalalign:"middle",textalign:this._applytransform("horizontal"===this._orient?0===r?"bottom":"top":"left",i.bargroup)})},this)}},_showindicator:function(t,e,i,n){var o=this.visualmapmodel,a=o.getextent(),r=o.itemsize,s=[0,r[1]],l=np(t,a,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setshape("points",fv(!!i,n,l,r[1]));var c={convertopacitytoalpha:!0},d=this.getcontrollervisual(t,"color",c);h.setstyle("fill",d);var f=mo(u.indicatorlabelpoint,go(h,this.group)),p=u.indicatorlabel;p.attr("invisible",!1);var g=this._applytransform("left",u.bargroup),m=this._orient;p.setstyle({text:(i||"")+o.formatvaluetext(e),textverticalalign:"horizontal"===m?g:"middle",textalign:"horizontal"===m?"center":g,x:f[0],y:f[1]})}},_enablehoverlinktoseries:function(){var t=this;this._shapes.bargroup.on("mousemove",function(e){if(t._hovering=!0,!t._dragging){var i=t.visualmapmodel.itemsize,n=t._applytransform([e.offsetx,e.offsety],t._shapes.bargroup,!0,!0);n[1]=ep(zp(0,n[1]),i[1]),t._dohoverlinktoseries(n[1],0<=n[0]&&n[0]<=i[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearhoverlinktoseries()})},_enablehoverlinkfromseries:function(){var t=this.api.getzr();this.visualmapmodel.option.hoverlink?(t.on("mouseover",this._hoverlinkfromseriesmouseover,this),t.on("mouseout",this._hideindicator,this)):this._clearhoverlinkfromseries()},_dohoverlinktoseries:function(t,e){var i=this.visualmapmodel,n=i.itemsize;if(i.option.hoverlink){var o=[0,n[1]],a=i.getextent();t=ep(zp(o[0],t),o[1]);var r=wv(i,a,o),s=[t-r,t+r],l=np(t,o,a,!0),u=[np(s[0],o,a,!0),np(s[1],o,a,!0)];s[0]o[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showindicator(l,u[1],"< ",r):u[1]===1/0?this._showindicator(l,u[0],"> ",r):this._showindicator(l,l,"≈ ",r));var h=this._hoverlinkdataindices,c=[];(e||hv(i))&&(c=this._hoverlinkdataindices=i.findtargetdataindices(u));var d=ki(h,c);this._dispatchhighdown("downplay",bv(d[0])),this._dispatchhighdown("highlight",bv(d[1]))}},_hoverlinkfromseriesmouseover:function(t){var e=t.target,i=this.visualmapmodel;if(e&&null!=e.dataindex){var n=this.ecmodel.getseriesbyindex(e.seriesindex);if(i.istargetseries(n)){var o=n.getdata(e.datatype),a=o.get(i.getdatadimension(o),e.dataindex,!0);isnan(a)||this._showindicator(a,a)}}},_hideindicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorlabel&&t.indicatorlabel.attr("invisible",!0)},_clearhoverlinktoseries:function(){this._hideindicator();var t=this._hoverlinkdataindices;this._dispatchhighdown("downplay",bv(t)),t.length=0},_clearhoverlinkfromseries:function(){this._hideindicator();var t=this.api.getzr();t.off("mouseover",this._hoverlinkfromseriesmouseover),t.off("mouseout",this._hideindicator)},_applytransform:function(t,e,i,n){var o=go(e,n?null:this.group);return ss[y(t)?"applytransform":"transformdirection"](t,o,i)},_dispatchhighdown:function(t,e){e&&e.length&&this.api.dispatchaction({type:t,batch:e})},dispose:function(){this._clearhoverlinkfromseries(),this._clearhoverlinktoseries()},remove:function(){this._clearhoverlinkfromseries(),this._clearhoverlinktoseries()}});hs({type:"selectdatarange",event:"datarangeselected",update:"update"},function(t,e){e.eachcomponent({maintype:"visualmap",query:t},function(e){e.setselected(t.selected)})}),ls(yp);var gp=cp.extend({type:"visualmap.piecewise",defaultoption:{selected:null,minopen:!1,maxopen:!1,align:"auto",itemwidth:20,itemheight:14,itemsymbol:"roundrect",piecelist:null,categories:null,splitnumber:5,selectedmode:"multiple",itemgap:10,hoverlink:!0,showlabel:null},optionupdated:function(t,e){gp.superapply(this,"optionupdated",arguments),this._piecelist=[],this.resetextent();var n=this._mode=this._determinemode();fp[this._mode].call(this),this._resetselected(t,e);var o=this.option.categories;this.resetvisual(function(t,e){"categories"===n?(t.mappingmethod="category",t.categories=i(o)):(t.dataextent=this.getextent(),t.mappingmethod="piecewise",t.piecelist=f(this._piecelist,function(t){var t=i(t);return"inrange"!==e&&(t.visual=null),t}))})},completevisualoption:function(){function t(t,e,i){return t&&t[e]&&(w(t[e])?t[e].hasownproperty(i):t[e]===i)}var e=this.option,i={},n=fa.listvisualtypes(),o=this.iscategory();d(e.pieces,function(t){d(n,function(e){t.hasownproperty(e)&&(i[e]=1)})}),d(i,function(i,n){var a=0;d(this.statelist,function(i){a|=t(e,i,n)||t(e.target,i,n)},this),!a&&d(this.statelist,function(t){(e[t]||(e[t]={}))[n]=_p.get(n,"inrange"===t?"active":"inactive",o)})},this),cp.prototype.completevisualoption.apply(this,arguments)},_resetselected:function(t,e){var i=this.option,n=this._piecelist,o=(e?i:t).selected||{};if(i.selected=o,d(n,function(t,e){var i=this.getselectedmapkey(t);o.hasownproperty(i)||(o[i]=!0)},this),"single"===i.selectedmode){var a=!1;d(n,function(t,e){var i=this.getselectedmapkey(t);o[i]&&(a?o[i]=!1:a=!0)},this)}},getselectedmapkey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getpiecelist:function(){return this._piecelist},_determinemode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitnumber"},setselected:function(t){this.option.selected=i(t)},getvaluestate:function(t){var e=fa.findpieceindex(t,this._piecelist);return null!=e&&this.option.selected[this.getselectedmapkey(this._piecelist[e])]?"inrange":"outofrange"},findtargetdataindices:function(t){var e=[];return this.eachtargetseries(function(i){var n=[],o=i.getdata();o.each(this.getdatadimension(o),function(e,i){fa.findpieceindex(e,this._piecelist)===t&&n.push(i)},this),e.push({seriesid:i.id,dataindex:n})},this),e},getrepresentvalue:function(t){var e;if(this.iscategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return e},getvisualmeta:function(t){function e(e,a){var r=o.getrepresentvalue({interval:e});a||(a=o.getvaluestate(r));var s=t(r,a);e[0]===-1/0?n[0]=s:e[1]===1/0?n[1]=s:i.push({value:e[0],color:s},{value:e[1],color:s})}if(!this.iscategory()){var i=[],n=[],o=this,a=this._piecelist.slice();if(a.length){var r=a[0].interval[0];r!==-1/0&&a.unshift({interval:[-1/0,r]}),(r=a[a.length-1].interval[1])!==1/0&&a.push({interval:[r,1/0]})}else a.push({interval:[-1/0,1/0]});var s=-1/0;return d(a,function(t){var i=t.interval;i&&(i[0]>s&&e([s,i[0]],"outofrange"),e(i.slice()),s=i[1])},this),{stops:i,outercolors:n}}}}),fp={splitnumber:function(){var t=this.option,e=this._piecelist,i=math.min(t.precision,20),n=this.getextent(),o=t.splitnumber;o=math.max(parseint(o,10),1),t.splitnumber=o;for(var a=(n[1]-n[0])/o;+a.tofixed(i)!==a&&i<5;)i++;t.precision=i,a=+a.tofixed(i);var r=0;t.minopen&&e.push({index:r++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=r+o;r","≥"][e[0]]];t.text=t.text||this.formatvaluetext(null!=t.value?t.value:t.interval,!1,i)},this)}};pp.extend({type:"visualmap.piecewise",dorender:function(){var t=this.group;t.removeall();var e=this.visualmapmodel,i=e.get("textgap"),n=e.textstylemodel,o=n.getfont(),a=n.gettextcolor(),r=this._getitemalign(),s=e.itemsize,l=this._getviewdata(),u=l.endstext,h=d(e.get("showlabel",!0),!u);u&&this._renderendstext(t,u[0],s,h,r),d(l.viewpiecelist,function(n){var l=n.piece,u=new l_;u.onclick=m(this._onitemclick,this,l),this._enablehoverlink(u,n.indexinmodelpiecelist);var c=e.getrepresentvalue(l);if(this._createitemsymbol(u,c,[0,0,s[0],s[1]]),h){var d=this.visualmapmodel.getvaluestate(c);u.add(new zb({style:{x:"right"===r?-i:s[0]+i,y:s[1]/2,text:l.text,textverticalalign:"middle",textalign:r,textfont:o,textfill:a,opacity:"outofrange"===d?.5:1}}))}t.add(u)},this),u&&this._renderendstext(t,u[1],s,h,r),as(e.get("orient"),t,e.get("itemgap")),this.renderbackground(t),this.positiongroup(t)},_enablehoverlink:function(t,e){function i(t){var i=this.visualmapmodel;i.option.hoverlink&&this.api.dispatchaction({type:t,batch:bv(i.findtargetdataindices(e))})}t.on("mouseover",m(i,this,"highlight")).on("mouseout",m(i,this,"downplay"))},_getitemalign:function(){var t=this.visualmapmodel,e=t.option;if("vertical"===e.orient)return rv(t,this.api,t.itemsize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderendstext:function(t,e,i,n,o){if(e){var a=new l_,r=this.visualmapmodel.textstylemodel;a.add(new zb({style:{x:n?"right"===o?i[0]:0:i[0]/2,y:i[1]/2,textverticalalign:"middle",textalign:n?o:"center",text:e,textfont:r.getfont(),textfill:r.gettextcolor()}})),t.add(a)}},_getviewdata:function(){var t=this.visualmapmodel,e=f(t.getpiecelist(),function(t,e){return{piece:t,indexinmodelpiecelist:e}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return("horizontal"===n?o:!o)?e.reverse():i&&(i=i.slice().reverse()),{viewpiecelist:e,endstext:i}},_createitemsymbol:function(t,e,i){t.add(ml(this.getcontrollervisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getcontrollervisual(e,"color")))},_onitemclick:function(t){var e=this.visualmapmodel,n=e.option,o=i(n.selected),a=e.getselectedmapkey(t);"single"===n.selectedmode?(o[a]=!0,d(o,function(t,e){o[e]=e===a})):o[a]=!o[a],this.api.dispatchaction({type:"selectdatarange",from:this.uid,visualmapid:this.visualmapmodel.id,selected:o})}});ls(yp);var wp=wo,hp=zo,zp=ms({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i,n){this.mergedefaultandtheme(t,i),this.mergeoption(t,i,n.createdbyself,!0)},isanimationenabled:function(){if(ax.node)return!1;var t=this.__hostseries;return this.getshallow("animation")&&t&&t.isanimationenabled()},mergeoption:function(t,e,i,n){var o=this.constructor,r=this.maintype+"model";i||e.eachseries(function(t){var i=t.get(this.maintype),s=t[r];i&&i.data?(s?s.mergeoption(i,e,!0):(n&&jv(i),d(i.data,function(t){t instanceof array?(jv(t[0]),jv(t[1])):jv(t)}),a(s=new o(i,this,e),{maintype:this.maintype,seriesindex:t.seriesindex,name:t.name,createdbyself:!0}),s.__hostseries=t),t[r]=s):t[r]=null},this)},formattooltip:function(t){var e=this.getdata(),i=this.getrawvalue(t),n=y(i)?f(i,wp).join(", "):wp(i),o=e.getname(t),a=hp(this.name);return(null!=i||o)&&(a+="
"),o&&(a+=hp(o),null!=i&&(a+=" : ")),null!=i&&(a+=hp(n)),a},getdata:function(){return this._data},setdata:function(t){this._data=t}});h(zp,fm),zp.extend({type:"markpoint",defaultoption:{zlevel:0,z:5,symbol:"pin",symbolsize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemstyle:{borderwidth:2},emphasis:{label:{show:!0}}}});var up=l,jp=v,xp={min:jp(qv,"min"),max:jp(qv,"max"),average:jp(qv,"average")},yp=vs({type:"marker",init:function(){this.markergroupmap=z()},render:function(t,e,i){var n=this.markergroupmap;n.each(function(t){t.__keep=!1});var o=this.type+"model";e.eachseries(function(t){var n=t[o];n&&this.renderseries(t,n,e,i)},this),n.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderseries:function(){}});yp.extend({type:"markpoint",updatetransform:function(t,e,i){e.eachseries(function(t){var e=t.markpointmodel;e&&(iy(e.getdata(),t,i),this.markergroupmap.get(t.id).updatelayout(e))},this)},renderseries:function(t,e,i,n){var o=t.coordinatesystem,a=t.id,r=t.getdata(),s=this.markergroupmap,l=s.get(a)||s.set(a,new al),u=ny(o,t,e);e.setdata(u),iy(e.getdata(),t,n),u.each(function(t){var i=u.getitemmodel(t),n=i.getshallow("symbolsize");"function"==typeof n&&(n=n(e.getrawvalue(t),e.getdataparams(t))),u.setitemvisual(t,{symbolsize:n,color:i.get("itemstyle.color")||r.getvisual("color"),symbol:i.getshallow("symbol")})}),l.updatedata(u),this.group.add(l.group),u.eachitemgraphicel(function(t){t.traverse(function(t){t.datamodel=e})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),ls(function(t){t.markpoint=t.markpoint||{}}),zp.extend({type:"markline",defaultoption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolsize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end"},linestyle:{type:"dashed"},emphasis:{label:{show:!0},linestyle:{width:3}},animationeasing:"linear"}});var qp=function(t,e,o,r){var s=t.getdata(),l=r.type;if(!y(r)&&("min"===l||"max"===l||"average"===l||null!=r.xaxis||null!=r.yaxis)){var u,h;if(null!=r.yaxis||null!=r.xaxis)u=null!=r.yaxis?"y":"x",e.getaxis(u),h=d(r.yaxis,r.xaxis);else{var c=kv(r,s,e,t);u=c.valuedatadim,c.valueaxis,h=ey(s,u,l)}var d="x"===u?0:1,f=1-d,p=i(r),g={};p.type=null,p.coord=[],g.coord=[],p.coord[f]=-1/0,g.coord[f]=1/0;var m=o.get("precision");m>=0&&"number"==typeof h&&(h=+h.tofixed(math.min(m,20))),p.coord[d]=g.coord[d]=h,r=[p,g,{type:l,valueindex:r.valueindex,value:h}]}return r=[$v(t,r[0]),$v(t,r[1]),a({},r[2])],r[2].type=r[2].type||"",n(r[2],r[0]),n(r[2],r[1]),r};yp.extend({type:"markline",updatetransform:function(t,e,i){e.eachseries(function(t){var e=t.marklinemodel;if(e){var n=e.getdata(),o=e.__from,a=e.__to;o.each(function(e){sy(o,e,!0,t,i),sy(a,e,!1,t,i)}),n.each(function(t){n.setitemlayout(t,[o.getitemlayout(t),a.getitemlayout(t)])}),this.markergroupmap.get(t.id).updatelayout()}},this)},renderseries:function(t,e,i,n){function o(e,i,o){var a=e.getitemmodel(i);sy(e,i,o,t,n),e.setitemvisual(i,{symbolsize:a.get("symbolsize")||g[o?0:1],symbol:a.get("symbol",!0)||p[o?0:1],color:a.get("itemstyle.color")||s.getvisual("color")})}var a=t.coordinatesystem,r=t.id,s=t.getdata(),l=this.markergroupmap,u=l.get(r)||l.set(r,new $c);this.group.add(u.group);var h=ly(a,t,e),c=h.from,d=h.to,f=h.line;e.__from=c,e.__to=d,e.setdata(f);var p=e.get("symbol"),g=e.get("symbolsize");y(p)||(p=[p,p]),"number"==typeof g&&(g=[g,g]),h.from.each(function(t){o(c,t,!0),o(d,t,!1)}),f.each(function(t){var e=f.getitemmodel(t).get("linestyle.color");f.setitemvisual(t,{color:e||c.getitemvisual(t,"color")}),f.setitemlayout(t,[c.getitemlayout(t),d.getitemlayout(t)]),f.setitemvisual(t,{fromsymbolsize:c.getitemvisual(t,"symbolsize"),fromsymbol:c.getitemvisual(t,"symbol"),tosymbolsize:d.getitemvisual(t,"symbolsize"),tosymbol:d.getitemvisual(t,"symbol")})}),u.updatedata(f),h.line.eachitemgraphicel(function(t,i){t.traverse(function(t){t.datamodel=e})}),u.__keep=!0,u.group.silent=e.get("silent")||t.get("silent")}}),ls(function(t){t.markline=t.markline||{}}),zp.extend({type:"markarea",defaultoption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemstyle:{borderwidth:0},emphasis:{label:{show:!0,position:"top"}}}});var $p=function(t,e,i,n){var a=$v(t,n[0]),r=$v(t,n[1]),s=d,l=a.coord,u=r.coord;l[0]=s(l[0],-1/0),l[1]=s(l[1],-1/0),u[0]=s(u[0],1/0),u[1]=s(u[1],1/0);var h=o([{},a,r]);return h.coord=[a.coord,r.coord],h.x0=a.x,h.y0=a.y,h.x1=r.x,h.y1=r.y,h},kp=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];yp.extend({type:"markarea",updatetransform:function(t,e,i){e.eachseries(function(t){var e=t.markareamodel;if(e){var n=e.getdata();n.each(function(e){var o=f(kp,function(o){return dy(n,e,o,t,i)});n.setitemlayout(e,o),n.getitemgraphicel(e).setshape("points",o)})}},this)},renderseries:function(t,e,i,n){var o=t.coordinatesystem,a=t.name,s=t.getdata(),l=this.markergroupmap,u=l.get(a)||l.set(a,{group:new l_});this.group.add(u.group),u.__keep=!0;var h=fy(o,t,e);e.setdata(h),h.each(function(e){h.setitemlayout(e,f(kp,function(i){return dy(h,e,i,t,n)})),h.setitemvisual(e,{color:s.getvisual("color")})}),h.diff(u.__data).add(function(t){var e=new zb({shape:{points:h.getitemlayout(t)}});h.setitemgraphicel(t,e),u.group.add(e)}).update(function(t,i){var n=u.__data.getitemgraphicel(i);fo(n,{shape:{points:h.getitemlayout(t)}},e,t),u.group.add(n),h.setitemgraphicel(t,n)}).remove(function(t){var e=u.__data.getitemgraphicel(t);u.group.remove(e)}).execute(),h.eachitemgraphicel(function(t,i){var n=h.getitemmodel(i),o=n.getmodel("label"),a=n.getmodel("emphasis.label"),s=h.getitemvisual(i,"color");t.usestyle(r(n.getmodel("itemstyle").getitemstyle(),{fill:zt(s,.4),stroke:s})),t.hoverstyle=n.getmodel("emphasis.itemstyle").getitemstyle(),io(t.style,t.hoverstyle,o,a,{labelfetcher:e,labeldataindex:i,defaulttext:h.getname(i)||"",isrecttext:!0,autocolor:s}),eo(t,{}),t.datamodel=e}),u.__data=h,u.group.silent=e.get("silent")||t.get("silent")}}),ls(function(t){t.markarea=t.markarea||{}});ks.registersubtypedefaulter("timeline",function(){return"slider"}),hs({type:"timelinechange",event:"timelinechanged",update:"prepareandupdate"},function(t,e){var i=e.getcomponent("timeline");return i&&null!=t.currentindex&&(i.setcurrentindex(t.currentindex),!i.get("loop",!0)&&i.isindexmax()&&i.setplaystate(!1)),e.resetoption("timeline"),r({currentindex:i.option.currentindex},t)}),hs({type:"timelineplaychange",event:"timelineplaychanged",update:"update"},function(t,e){var i=e.getcomponent("timeline");i&&null!=t.playstate&&i.setplaystate(t.playstate)});var jp=ks.extend({type:"timeline",layoutmode:"box",defaultoption:{zlevel:0,z:4,show:!0,axistype:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlposition:"left",autoplay:!1,rewind:!1,loop:!0,playinterval:2e3,currentindex:0,itemstyle:{},label:{color:"#000"},data:[]},init:function(t,e,i){this._data,this._names,this.mergedefaultandtheme(t,i),this._initdata()},mergeoption:function(t){jp.superapply(this,"mergeoption",arguments),this._initdata()},setcurrentindex:function(t){null==t&&(t=this.option.currentindex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentindex=t},getcurrentindex:function(){return this.option.currentindex},isindexmax:function(){return this.getcurrentindex()>=this._data.count()-1},setplaystate:function(t){this.option.autoplay=!!t},getplaystate:function(){return!!this.option.autoplay},_initdata:function(){var t=this.option,e=t.data||[],n=t.axistype,o=this._names=[];if("category"===n){var a=[];d(e,function(t,e){var n,r=ii(t);w(t)?(n=i(t)).value=e:n=e,a.push(n),_(r)||null!=r&&!isnan(r)||(r=""),o.push(r+"")}),e=a}var r={category:"ordinal",time:"time"}[n]||"number";(this._data=new di([{name:"value",type:r}],this)).initdata(e,o)},getdata:function(){return this._data},getcategories:function(){if("category"===this.get("axistype"))return this._names.slice()}});h(jp.extend({type:"timeline.slider",defaultoption:{backgroundcolor:"rgba(0,0,0,0)",bordercolor:"#ccc",borderwidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptycircle",symbolsize:10,linestyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemstyle:{color:"#304654",borderwidth:1},checkpointstyle:{symbol:"circle",symbolsize:13,color:"#c23531",borderwidth:5,bordercolor:"rgba(194,53,49, 0.5)",animation:!0,animationduration:300,animationeasing:"quinticinout"},controlstyle:{show:!0,showplaybtn:!0,showprevbtn:!0,shownextbtn:!0,itemsize:22,itemgap:12,position:"left",playicon:"path://m31.6,53c17.5,53,6,41.5,6,27.4s17.5,1.8,31.6,1.8c45.7,1.8,57.2,13.3,57.2,27.4s45.7,53,31.6,53z m31.6,3.3 c18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1c44.9,51.5,55.7,40.7,55.7,27.4c55.7,14.1,44.9,3.3,31.6,3.3z m24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2v21.3z",stopicon:"path://m30.9,53.2c16.8,53.2,5.3,41.7,5.3,27.6s16.8,2,30.9,2c45,2,56.4,13.5,56.4,27.6s45,53.2,30.9,53.2z m30.9,3.5c17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1c44.2,51.7,55,40.9,55,27.6c54.9,14.4,44.1,3.5,30.9,3.5z m36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1v19.5c0-0.6,0.4-1,0.9-1h36c0.5,0,0.9,0.4,0.9,1v35.8z m27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1v19.5c0-0.6,0.4-1,0.9-1h27c0.5,0,0.9,0.4,0.9,1l27.8,35.8l27.8,35.8z",nexticon:"path://m18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7l18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1l19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8c18.4,51.2,18.5,51,18.6,50.8z",previcon:"path://m43,52.8l20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7l42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3l18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1l41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8c43.2,53.2,43.1,53,43,52.8z",color:"#304654",bordercolor:"#304654",borderwidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemstyle:{color:"#c23531"},controlstyle:{color:"#c23531",bordercolor:"#c23531",borderwidth:2}},data:[]}}),fm);var qp=vm.extend({type:"timeline"}),tn=function(t,e,i,n){dd.call(this,t,e,i),this.type=n||"value",this._autolabelinterval,this.model=null};tn.prototype={constructor:tn,getlabelinterval:function(){var t=this.model,e=t.getmodel("label"),i=e.get("interval");return null!=i&&"auto"!=i?i:((i=this._autolabelinterval)||(i=this._autolabelinterval=dl(f(this.scale.getticks(),this.datatocoord,this),fl(this,e.get("formatter")),e.getfont(),"horizontal"===t.get("orient")?0:90,e.get("rotate"))),i)},islabelignored:function(t){if("category"===this.type){var e=this.getlabelinterval();return"function"==typeof e&&!e(t,this.scale.getlabel(t))||t%(e+1)}}},u(tn,dd);var en=m,in=d,nn=math.pi;qp.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewrect,this._timer,this._currentpointer,this._maingroup,this._labelgroup},render:function(t,e,i,n){if(this.model=t,this.api=i,this.ecmodel=e,this.group.removeall(),t.get("show",!0)){var o=this._layout(t,i),a=this._creategroup("maingroup"),r=this._creategroup("labelgroup"),s=this._axis=this._createaxis(o,t);t.formattooltip=function(t){return zo(s.scale.getlabel(t))},in(["axisline","axistick","control","currentpointer"],function(e){this["_render"+e](o,a,s,t)},this),this._renderaxislabel(o,r,s,t),this._position(o,t)}this._doplaystop()},remove:function(){this._cleartimer(),this.group.removeall()},dispose:function(){this._cleartimer()},_layout:function(t,e){var i=t.get("label.position"),n=t.get("orient"),o=vy(t,e);null==i||"auto"===i?i="horizontal"===n?o.y+o.height/2=0||"+"===i?"left":"right"},r={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},s={horizontal:0,vertical:nn/2},l="vertical"===n?o.height:o.width,u=t.getmodel("controlstyle"),h=u.get("show",!0),c=h?u.get("itemsize"):0,d=h?u.get("itemgap"):0,f=c+d,p=t.get("label.rotate")||0;p=p*nn/180;var g,m,v,y,x=u.get("position",!0),_=h&&u.get("showplaybtn",!0),w=h&&u.get("showprevbtn",!0),b=h&&u.get("shownextbtn",!0),s=0,m=l;return"left"===x||"bottom"===x?(_&&(g=[0,0],s+=f),w&&(m=[s,0],s+=f),b&&(v=[m-c,0],m-=f)):(_&&(g=[m-c,0],m-=f),w&&(m=[0,0],s+=f),b&&(v=[m-c,0],m-=f)),y=[s,m],t.get("inverse")&&y.reverse(),{viewrect:o,mainlength:l,orient:n,rotation:s[n],labelrotation:p,labelposopt:i,labelalign:t.get("label.align")||a[n],labelbaseline:t.get("label.verticalalign")||t.get("label.baseline")||r[n],playposition:g,prevbtnposition:m,nextbtnposition:v,axisextent:y,controlsize:c,controlgap:d}},_position:function(t,e){function i(t){var e=t.position;t.origin=[c[0][0]-e[0],c[1][0]-e[1]]}function n(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function o(t,e,i,n,o){t[n]+=i[n][o]-e[n][o]}var a=this._maingroup,r=this._labelgroup,s=t.viewrect;if("vertical"===t.orient){var l=st(),u=s.x,h=s.y+s.height;ct(l,l,[-u,-h]),dt(l,l,-nn/2),ct(l,l,[u,h]),(s=s.clone()).applytransform(l)}var c=n(s),d=n(a.getboundingrect()),f=n(r.getboundingrect()),p=a.position,g=r.position;g[0]=p[0]=c[0][0];var m=t.labelposopt;if(isnan(m))o(p,d,c,1,v="+"===m?0:1),o(g,f,c,1,1-v);else{var v=m>=0?0:1;o(p,d,c,1,v),g[1]=p[1]+m}a.attr("position",p),r.attr("position",g),a.rotation=r.rotation=t.rotation,i(a),i(r)},_createaxis:function(t,e){var i=e.getdata(),n=e.get("axistype"),o=cl(e,n),a=i.getdataextent("value");o.setextent(a[0],a[1]),this._customizescale(o,i),o.niceticks();var r=new tn("value",o,t.axisextent,n);return r.model=e,r},_customizescale:function(t,e){t.getticks=function(){return e.maparray(["value"],function(t){return t})},t.gettickslabels=function(){return f(this.getticks(),t.getlabel,t)}},_creategroup:function(t){var e=this["_"+t]=new l_;return this.group.add(e),e},_renderaxisline:function(t,e,i,n){var o=i.getextent();n.get("linestyle.show")&&e.add(new xb({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:a({linecap:"round"},n.getmodel("linestyle").getlinestyle()),silent:!0,z2:1}))},_renderaxistick:function(t,e,i,n){var o=n.getdata(),a=i.scale.getticks();in(a,function(t,a){var r=i.datatocoord(t),s=o.getitemmodel(a),l=s.getmodel("itemstyle"),u=s.getmodel("emphasis.itemstyle"),h={position:[r,0],onclick:en(this._changetimeline,this,a)},c=xy(s,l,e,h);eo(c,u.getitemstyle()),s.get("tooltip")?(c.dataindex=a,c.datamodel=n):c.dataindex=c.datamodel=null},this)},_renderaxislabel:function(t,e,i,n){var o=n.getmodel("label");if(o.get("show")){var a=n.getdata(),r=i.scale.getticks(),s=fl(i,o.get("formatter")),l=i.getlabelinterval();in(r,function(n,o){if(!i.islabelignored(o,l)){var r=a.getitemmodel(o),u=r.getmodel("label"),h=r.getmodel("emphasis.label"),c=i.datatocoord(n),d=new zb({position:[c,0],rotation:t.labelrotation-t.rotation,onclick:en(this._changetimeline,this,o),silent:!1});no(d.style,u,{text:s[o],textalign:t.labelalign,textverticalalign:t.labelbaseline}),e.add(d),eo(d,no({},h))}},this)}},_rendercontrol:function(t,e,i,n){function o(t,i,o,h){if(t){var c=yy(n,i,u,{position:t,origin:[a/2,0],rotation:h?-r:0,recthover:!0,style:s,onclick:o});e.add(c),eo(c,l)}}var a=t.controlsize,r=t.rotation,s=n.getmodel("controlstyle").getitemstyle(),l=n.getmodel("emphasis.controlstyle").getitemstyle(),u=[0,-a/2,a,a],h=n.getplaystate(),c=n.get("inverse",!0);o(t.nextbtnposition,"controlstyle.nexticon",en(this._changetimeline,this,c?"-":"+")),o(t.prevbtnposition,"controlstyle.previcon",en(this._changetimeline,this,c?"+":"-")),o(t.playposition,"controlstyle."+(h?"stopicon":"playicon"),en(this._handleplayclick,this,!h),!0)},_rendercurrentpointer:function(t,e,i,n){var o=n.getdata(),a=n.getcurrentindex(),r=o.getitemmodel(a).getmodel("checkpointstyle"),s=this,l={oncreate:function(t){t.draggable=!0,t.drift=en(s._handlepointerdrag,s),t.ondragend=en(s._handlepointerdragend,s),_y(t,a,i,n,!0)},onupdate:function(t){_y(t,a,i,n)}};this._currentpointer=xy(r,r,this._maingroup,{},this._currentpointer,l)},_handleplayclick:function(t){this._cleartimer(),this.api.dispatchaction({type:"timelineplaychange",playstate:t,from:this.uid})},_handlepointerdrag:function(t,e,i){this._cleartimer(),this._pointerchangetimeline([i.offsetx,i.offsety])},_handlepointerdragend:function(t){this._pointerchangetimeline([t.offsetx,t.offsety],!0)},_pointerchangetimeline:function(t,e){var i=this._toaxiscoord(t)[0],n=co(this._axis.getextent().slice());i>n[1]&&(i=n[1]),ii.getheight()&&(n.textposition="top",l=!0);var u=l?-5-o.height:s+8;a+o.width/2>i.getwidth()?(n.textposition=["100%",u],n.textalign="right"):a-o.width/2<0&&(n.textposition=[0,u],n.textalign="left")}})}},updateview:function(t,e,i,n){d(this._features,function(t){t.updateview&&t.updateview(t.model,e,i,n)})},remove:function(t,e){d(this._features,function(i){i.remove&&i.remove(t,e)}),this.group.removeall()},dispose:function(t,e){d(this._features,function(i){i.dispose&&i.dispose(t,e)})}});var an=am.toolbox.saveasimage;by.defaultoption={show:!0,icon:"m4.7,22.9l29.3,45.5l54.7,23.4m4.6,43.6l4.6,58l53.8,58l53.8,43.6m29.2,45.1l29.2,0",title:an.title,type:"png",name:"",excludecomponents:["toolbox"],pixelratio:1,lang:an.lang.slice()},by.prototype.unusable=!ax.canvassupported,by.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",o=document.createelement("a"),a=i.get("type",!0)||"png";o.download=n+"."+a,o.target="_blank";var r=e.getconnecteddataurl({type:a,backgroundcolor:i.get("backgroundcolor",!0)||t.get("backgroundcolor")||"#fff",excludecomponents:i.get("excludecomponents"),pixelratio:i.get("pixelratio")});if(o.href=r,"function"!=typeof mouseevent||ax.browser.ie||ax.browser.edge)if(window.navigator.mssaveoropenblob){for(var s=atob(r.split(",")[1]),l=s.length,u=new uint8array(l);l--;)u[l]=s.charcodeat(l);var h=new blob([u]);window.navigator.mssaveoropenblob(h,n+"."+a)}else{var c=i.get("lang"),d='';window.open().document.write(d)}else{var f=new mouseevent("click",{view:window,bubbles:!0,cancelable:!1});o.dispatchevent(f)}},rv("saveasimage",by);var rn=am.toolbox.magictype;sy.defaultoption={show:!0,type:[],icon:{line:"m4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9m4.1,58h51.4",bar:"m6.7,22.9h10v48h-10v22.9zm24.9,13h10v35h-10v13zm43.2,2h10v46h-10v2zm3.1,58h53.7",stack:"m8.2,38.4l-8.4,4.1l30.6,15.3l60,42.5l-8.1-4.1l-21.5,11l8.2,38.4z m51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9l8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2l51.9,30z m51.9,21.7l-8.1,4.2l35.7,30l-5.3,2.8l24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2l8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1l51.9,21.7zm30.4,2.2l-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1l30.4,2.2z",tiled:"m2.3,2.2h22.8v25h2.3v2.2z m35,2.2h22.8v25h35v2.2zm2.3,35h22.8v22.8h2.3v35z m35,35h22.8v22.8h35v35z"},title:i(rn.title),option:{},seriesindex:{}};var sn=sy.prototype;sn.geticons=function(){var t=this.model,e=t.get("icon"),i={};return d(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var ln={line:function(t,e,i,o){if("bar"===t)return n({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markpoint:i.get("markpoint"),markline:i.get("markline")},o.get("option.line")||{},!0)},bar:function(t,e,i,o){if("line"===t)return n({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markpoint:i.get("markpoint"),markline:i.get("markline")},o.get("option.bar")||{},!0)},stack:function(t,e,i,o){if("line"===t||"bar"===t)return n({id:e,stack:"__ec_magictype_stack__"},o.get("option.stack")||{},!0)},tiled:function(t,e,i,o){if("line"===t||"bar"===t)return n({id:e,stack:""},o.get("option.tiled")||{},!0)}},un=[["line","bar"],["stack","tiled"]];sn.onclick=function(t,e,i){var n=this.model,o=n.get("seriesindex."+i);if(ln[i]){var a={series:[]};d(un,function(t){l(t,i)>=0&&d(t,function(t){n.seticonstatus(t,"normal")})}),n.seticonstatus(i,"emphasis"),t.eachcomponent({maintype:"series",query:null==o?null:{seriesindex:o}},function(e){var o=e.subtype,s=e.id,l=ln[i](o,s,e,n);l&&(r(l,e.option),a.series.push(l));var u=e.coordinatesystem;if(u&&"cartesian2d"===u.type&&("line"===i||"bar"===i)){var h=u.getaxesbyscale("ordinal")[0];if(h){var c=h.dim+"axis",d=t.querycomponents({maintype:c,index:e.get(name+"index"),id:e.get(name+"id")})[0].componentindex;a[c]=a[c]||[];for(var f=0;f<=d;f++)a[c][d]=a[c][d]||{};a[c][d].boundarygap="bar"===i}}}),e.dispatchaction({type:"changemagictype",currenttype:i,newoption:a})}},hs({type:"changemagictype",event:"magictypechanged",update:"prepareandupdate"},function(t,e){e.mergeoption(t.newoption)}),rv("magictype",sy);var hn=am.toolbox.dataview,cn=new array(60).join("-"),dn="\t",fn=new regexp("["+dn+"]+","g");ny.defaultoption={show:!0,readonly:!1,optiontocontent:null,contenttooption:null,icon:"m17.5,17.3h33 m17.5,17.3h33 m45.4,29.5h-28 m11.5,2v56h51v14.8l38.4,2h11.5z m38.4,2.2v12.7h51 m45.4,41.7h-28",title:i(hn.title),lang:i(hn.lang),backgroundcolor:"#fff",textcolor:"#000",textareacolor:"#fff",textareabordercolor:"#333",buttoncolor:"#c23531",buttontextcolor:"#fff"},ny.prototype.onclick=function(t,e){function i(){n.removechild(a),x._dom=null}var n=e.getdom(),o=this.model;this._dom&&n.removechild(this._dom);var a=document.createelement("div");a.style.csstext="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",a.style.backgroundcolor=o.get("backgroundcolor")||"#fff";var r=document.createelement("h4"),s=o.get("lang")||[];r.innerhtml=s[0]||o.get("title"),r.style.csstext="margin: 10px 20px;",r.style.color=o.get("textcolor");var l=document.createelement("div"),u=document.createelement("textarea");l.style.csstext="display:block;width:100%;overflow:auto;";var h=o.get("optiontocontent"),c=o.get("contenttooption"),d=ty(t);if("function"==typeof h){var f=h(e.getoption());"string"==typeof f?l.innerhtml=f:m(f)&&l.appendchild(f)}else l.appendchild(u),u.readonly=o.get("readonly"),u.style.csstext="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",u.style.color=o.get("textcolor"),u.style.bordercolor=o.get("textareabordercolor"),u.style.backgroundcolor=o.get("textareacolor"),u.value=d.value;var p=d.meta,g=document.createelement("div");g.style.csstext="position:absolute;bottom:0;left:0;right:0;";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createelement("div"),y=document.createelement("div");m+=";background-color:"+o.get("buttoncolor"),m+=";color:"+o.get("buttontextcolor");var x=this;ui(v,"click",i),ui(y,"click",function(){var t;try{t="function"==typeof c?c(l,e.getoption()):py(u.value,p)}catch(t){throw i(),new error("data view format error "+t)}t&&e.dispatchaction({type:"changedataview",newoption:t}),i()}),v.innerhtml=s[1],y.innerhtml=s[2],y.style.csstext=m,v.style.csstext=m,!o.get("readonly")&&g.appendchild(y),g.appendchild(v),ui(u,"keydown",function(t){if(9===(t.keycode||t.which)){var e=this.value,i=this.selectionstart,n=this.selectionend;this.value=e.substring(0,i)+dn+e.substring(n),this.selectionstart=this.selectionend=i+1,rw(t)}}),a.appendchild(r),a.appendchild(l),a.appendchild(g),l.style.height=n.clientheight-80+"px",n.appendchild(a),this._dom=a},ny.prototype.remove=function(t,e){this._dom&&e.getdom().removechild(this._dom)},ny.prototype.dispose=function(t,e){this.remove(t,e)},rv("dataview",ny),hs({type:"changedataview",event:"dataviewchanged",update:"prepareandupdate"},function(t,e){var i=[];d(t.newoption.series,function(t){var n=e.getseriesbyname(t.name)[0];if(n){var o=n.get("data");i.push({name:t.name,data:oy(t.data,o)})}else i.push(a({type:"scatter"},t))}),e.mergeoption(r({series:i},t.newoption))});var pn=d,gn="\0_ec_hist_store";ep.extend({type:"datazoom.select"}),ip.extend({type:"datazoom.select"});var mn=am.toolbox.datazoom,vn=d,yn="\0_ec_\0toolbox-datazoom_";gy.defaultoption={show:!0,icon:{zoom:"m0,13.5h26.9 m13.5,26.9v0 m32.1,13.5h58v58h13.5 v32.1",back:"m22,1.4l9.9,13.5l12.3,12.3 m10.3,13.5h54.9v44.6 h10.3v-26"},title:i(mn.title)};var xn=gy.prototype;xn.render=function(t,e,i,n){this.model=t,this.ecmodel=e,this.api=i,hy(t,e,this,n,i),wy(t,e)},xn.onclick=function(t,e,i){_n[i].call(this)},xn.remove=function(t,e){this._brushcontroller.unmount()},xn.dispose=function(t,e){this._brushcontroller.dispose()};var _n={zoom:function(){var t=!this._iszoomactive;this.api.dispatchaction({type:"takeglobalcursor",key:"datazoomselect",datazoomselectactive:t})},back:function(){this._dispatchzoomaction(zy(this.ecmodel))}};xn._onbrush=function(t,e){function i(t,e,i){var r=e.getaxis(t),s=r.model,l=n(t,s,a),u=l.findrepresentativeaxisproxy(s).getminmaxspan();null==u.minvaluespan&&null==u.maxvaluespan||(i=ec(0,i.slice(),r.scale.getextent(),0,u.minvaluespan,u.maxvaluespan)),l&&(o[l.id]={datazoomid:l.id,startvalue:i[0],endvalue:i[1]})}function n(t,e,i){var n;return i.eachcomponent({maintype:"datazoom",subtype:"select"},function(i){i.getaxismodel(t,e.componentindex)&&(n=i)}),n}if(e.isend&&t.length){var o={},a=this.ecmodel;this._brushcontroller.updatecovers([]),new zm(fy(this.model.option),a,{include:["grid"]}).matchoutputranges(t,a,function(t,e,n){if("cartesian2d"===n.type){var o=t.brushtype;"rect"===o?(i("x",n,e[0]),i("y",n,e[1])):i({linex:"x",liney:"y"}[o],n,e)}}),ey(a,o),this._dispatchzoomaction(o)}},xn._dispatchzoomaction=function(t){var e=[];vn(t,function(t,n){e.push(i(t))}),e.length&&this.api.dispatchaction({type:"datazoom",from:this.uid,batch:e})},rv("datazoom",gy),ls(function(t){function e(t,e){if(e){var o=t+"index",a=e[o];null==a||"all"==a||y(a)||(a=!1===a||"none"===a?[]:[a]),i(t,function(e,i){if(null==a||"all"==a||-1!==l(a,i)){var r={type:"select",$fromtoolbox:!0,id:yn+t+i};r[o]=i,n.push(r)}})}}function i(e,i){var n=t[e];y(n)||(n=n?[n]:[]),vn(n,i)}if(t){var n=t.datazoom||(t.datazoom=[]);y(n)||(t.datazoom=n=[n]);var o=t.toolbox;if(o&&(y(o)&&(o=o[0]),o&&o.feature)){var a=o.feature.datazoom;e("xaxis",a),e("yaxis",a)}}});var wn=am.toolbox.restore;zy.defaultoption={show:!0,icon:"m3.8,33.4 m47,18.9h9.8v8.7 m56.3,20.1 c52.1,9,40.5,0.6,26.8,2.1c12.6,3.7,1.6,16.2,2.1,30.6 m13,41.1h3.1v10.2 m3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:wn.title},zy.prototype.onclick=function(t,e,i){ry(t),e.dispatchaction({type:"restore",from:this.uid})},rv("restore",zy),hs({type:"restore",event:"restore",update:"prepareandupdate"},function(t,e){e.resetoption("recreate")});var bn,sn="urn:schemas-microsoft-com:vml",mn="undefined"==typeof window?null:window,in=!1,dn=mn&&mn.document;if(dn&&!ax.canvassupported)try{!dn.namespaces.zrvml&&dn.namespaces.add("zrvml",sn),bn=function(t){return dn.createelement("')}}catch(t){bn=function(t){return dn.createelement("<"+t+' xmlns="'+sn+'" class="zrvml">')}}var tn=db.cmd,an=math.round,cn=math.sqrt,ln=math.abs,kn=math.cos,pn=math.sin,nn=math.max;if(!ax.canvassupported){var on=21600,en=on/2,zn=function(t){t.style.csstext="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=on+","+on,t.coordorigin="0,0"},rn=function(t){return string(t).replace(/&/g,"&").replace(/"/g,""")},bn=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},vn=function(t,e){e&&t&&e.parentnode!==t&&t.appendchild(e)},gn=function(t,e){e&&t&&e.parentnode===t&&t.removechild(e)},fn=function(t,e,i){return 1e5*(parsefloat(t)||0)+1e3*(parsefloat(e)||0)+i},wn=function(t,e){return"string"==typeof t?t.lastindexof("%")>=0?parsefloat(t)/100*e:parsefloat(t):t},hn=function(t,e,i){var n=at(e);i=+i,isnan(i)&&(i=1),n&&(t.color=bn(n[0],n[1],n[2]),t.opacity=i*n[3])},zn=function(t){var e=at(t);return[bn(e[0],e[1],e[2]),e[3]]},un=function(t,e,i){var n=e.fill;if(null!=n)if(n instanceof jb){var o,a=0,r=[0,0],s=0,l=1,u=i.getboundingrect(),h=u.width,c=u.height;if("linear"===n.type){o="gradient";var d=i.transform,f=[n.x*h,n.y*c],p=[n.x2*h,n.y2*c];d&&(q(f,f,d),q(p,p,d));var g=p[0]-f[0],m=p[1]-f[1];(a=180*math.atan2(g,m)/math.pi)<0&&(a+=360),a<1e-6&&(a=0)}else{o="gradientradial";var f=[n.x*h,n.y*c],d=i.transform,v=i.scale,y=h,x=c;r=[(f[0]-u.x)/y,(f[1]-u.y)/x],d&&q(f,f,d),y/=v[0]*on,x/=v[1]*on;var _=nn(y,x);s=0/_,l=2*n.r/_-s}var w=n.colorstops.slice();w.sort(function(t,e){return t.offset-e.offset});for(var b=w.length,s=[],m=[],i=0;i=2){var a=s[0][0],c=s[1][0],l=s[0][1]*e.opacity,k=s[1][1]*e.opacity;t.type=o,t.method="none",t.focus="100%",t.angle=a,t.color=a,t.color2=c,t.colors=m.join(","),t.opacity=k,t.opacity2=l}"radial"===o&&(t.focusposition=r.join(","))}else hn(t,n,e.opacity)},jn=function(t,e){null!=e.linedash&&(t.dashstyle=e.linedash.join(" ")),null==e.stroke||e.stroke instanceof jb||hn(t,e.stroke,e.opacity)},xn=function(t,e,i,n){var o="fill"==e,a=t.getelementsbytagname(e)[0];null!=i[e]&&"none"!==i[e]&&(o||!o&&i.linewidth)?(t[o?"filled":"stroked"]="true",i[e]instanceof jb&&gn(t,a),a||(a=uy(e)),o?un(a,i,n):jn(a,i),vn(t,a)):(t[o?"filled":"stroked"]="false",gn(t,a))},yn=[[],[],[]],qn=function(t,e){var i,n,o,a,r,s,l=tn.m,u=tn.c,h=tn.l,c=tn.a,d=tn.q,f=[],p=t.data,g=t.len();for(a=0;a.01?n&&(o+=.0125):math.abs(e-a)<1e-4?n&&ot?x-=.0125:x+=.0125:n&&ea?y+=.0125:y-=.0125),f.push(z,an(((t-c)*m+b)*on-en),",",an(((a-l)*i+s)*on-en),",",an(((t+c)*m+b)*on-en),",",an(((a+l)*i+s)*on-en),",",an((o*m+b)*on-en),",",an((e*i+s)*on-en),",",an((y*m+b)*on-en),",",an((x*i+s)*on-en)),r=y,s=x;break;case tn.r:var r=yn[0],b=yn[1];r[0]=p[a++],r[1]=p[a++],b[0]=r[0]+p[a++],b[1]=r[1]+p[a++],e&&(q(r,r,e),q(b,b,e)),r[0]=an(r[0]*on-en),b[0]=an(b[0]*on-en),r[1]=an(r[1]*on-en),b[1]=an(b[1]*on-en),f.push(" m ",r[0],",",r[1]," l ",b[0],",",r[1]," l ",b[0],",",b[1]," l ",r[0],",",b[1]);break;case tn.z:f.push(" x ")}if(i>0){f.push(n);for(var v=0;v100&&(qn=0,jn={});var i,n=to.style;try{n.font=t,i=n.fontfamily.split(",")[0]}catch(t){}e={style:n.fontstyle||"normal",variant:n.fontvariant||"normal",weight:n.fontweight||"normal",size:0|parsefloat(n.fontsize||12),family:i||"microsoft yahei"},jn[t]=e,qn++}return e};!function(t,e){$_[t]=e}("measuretext",function(t,e){var i=dn;kn||((kn=i.createelement("div")).style.csstext="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",dn.body.appendchild(kn));try{kn.style.font=e}catch(t){}return kn.innerhtml="",kn.appendchild(i.createtextnode(t)),{width:kn.offsetwidth}});for(var io=new kt,no=[tw,ke,je,in,zb],oo=0;oo=o&&u+1>=a){for(var h=[],c=0;c=o&&c+1>=a)return lx(0,s.components);l[i]=s}else l[i]=void 0}r++}();if(d)return d}},pushcomponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractcommon:function(t,e,i,n){for(var o=e.length,a=i.length,r=t.newpos,s=r-n,l=0;r+1=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},hx.prototype.update=function(t,e){if(t){var i=this.getdefs(!1);if(t[this._domname]&&i.contains(t[this._domname]))"function"==typeof e&&e(t);else{var n=this.add(t);n&&(t[this._domname]=n)}}},hx.prototype.adddom=function(t){this.getdefs(!0).appendchild(t)},hx.prototype.removedom=function(t){var e=this.getdefs(!1);e&&t[this._domname]&&(e.removechild(t[this._domname]),t[this._domname]=null)},hx.prototype.getdoms=function(){var t=this.getdefs(!1);if(!t)return[];var e=[];return d(this._tagnames,function(i){var n=t.getelementsbytagname(i);e=e.concat([].slice.call(n))}),e},hx.prototype.markallunused=function(){var t=this;d(this.getdoms(),function(e){e[t._marklabel]="0"})},hx.prototype.markused=function(t){t&&(t[this._marklabel]="1")},hx.prototype.removeunused=function(){var t=this.getdefs(!1);if(t){var e=this;d(this.getdoms(),function(i){"1"!==i[e._marklabel]&&t.removechild(i)})}},hx.prototype.getsvgproxy=function(t){return t instanceof in?vo:t instanceof je?yo:t instanceof zb?xo:vo},hx.prototype.gettextsvgelement=function(t){return t.__textsvgel},hx.prototype.getsvgelement=function(t){return t.__svgel},u(cx,hx),cx.prototype.addwithoutupdate=function(t,e){if(e&&e.style){var i=this;d(["fill","stroke"],function(n){if(e.style[n]&&("linear"===e.style[n].type||"radial"===e.style[n].type)){var o,a=e.style[n],r=i.getdefs(!0);a._dom?(o=a._dom,r.contains(a._dom)||i.adddom(o)):o=i.add(a),i.markused(e);var s=o.getattribute("id");t.setattribute(n,"url(#"+s+")")}})}},cx.prototype.add=function(t){var e;if("linear"===t.type)e=this.createelement("lineargradient");else{if("radial"!==t.type)return m_("illegal gradient type."),null;e=this.createelement("radialgradient")}return t.id=t.id||this.nextid++,e.setattribute("id","zr"+this._zrid+"-gradient-"+t.id),this.updatedom(t,e),this.adddom(e),e},cx.prototype.update=function(t){var e=this;hx.prototype.update.call(this,t,function(){var i=t.type,n=t._dom.tagname;"linear"===i&&"lineargradient"===n||"radial"===i&&"radialgradient"===n?e.updatedom(t,t._dom):(e.removedom(t),e.add(t))})},cx.prototype.updatedom=function(t,e){if("linear"===t.type)e.setattribute("x1",t.x),e.setattribute("y1",t.y),e.setattribute("x2",t.x2),e.setattribute("y2",t.y2);else{if("radial"!==t.type)return void m_("illegal gradient type.");e.setattribute("cx",t.x),e.setattribute("cy",t.y),e.setattribute("r",t.r)}t.global?e.setattribute("gradientunits","userspaceonuse"):e.setattribute("gradientunits","objectboundingbox"),e.innerhtml="";for(var i=t.colorstops,n=0,o=i.length;n0){var n,o,a=this.getdefs(!0),r=e[0],s=i?"_textdom":"_dom";r[s]?(o=r[s].getattribute("id"),n=r[s],a.contains(n)||a.appendchild(n)):(o="zr"+this._zrid+"-clip-"+this.nextid,++this.nextid,(n=this.createelement("clippath")).setattribute("id",o),a.appendchild(n),r[s]=n);var l=this.getsvgproxy(r);if(r.transform&&r.parent.invtransform&&!i){var u=array.prototype.slice.call(r.transform);ht(r.transform,r.parent.invtransform,r.transform),l.brush(r),r.transform=u}else l.brush(r);var h=this.getsvgelement(r);n.innerhtml="",n.appendchild(h.clonenode()),t.setattribute("clip-path","url(#"+o+")"),e.length>1&&this.updatedom(n,e.slice(1),i)}else t&&t.setattribute("clip-path","none")},dx.prototype.markused=function(t){var e=this;t.__clippaths&&t.__clippaths.length>0&&d(t.__clippaths,function(t){t._dom&&hx.prototype.markused.call(e,t._dom),t._textdom&&hx.prototype.markused.call(e,t._textdom)})},u(fx,hx),fx.prototype.addwithoutupdate=function(t,e){if(e&&px(e.style)){var i,n=e.style;n._shadowdom?(i=n._shadowdom,this.getdefs(!0).contains(n._shadowdom)||this.adddom(i)):i=this.add(e),this.markused(e);var o=i.getattribute("id");t.style.filter="url(#"+o+")"}},fx.prototype.add=function(t){var e=this.createelement("filter"),i=t.style;return i._shadowdomid=i._shadowdomid||this.nextid++,e.setattribute("id","zr"+this._zrid+"-shadow-"+i._shadowdomid),this.updatedom(t,e),this.adddom(e),e},fx.prototype.update=function(t,e){var i=e.style;if(px(i)){var n=this;hx.prototype.update.call(this,e,function(t){n.updatedom(e,t._shadowdom)})}else this.remove(t,i)},fx.prototype.remove=function(t,e){null!=e._shadowdomid&&(this.removedom(e),t.style.filter="")},fx.prototype.updatedom=function(t,e){var i=e.getelementsbytagname("fedropshadow");i=0===i.length?this.createelement("fedropshadow"):i[0];var n,o,a,r,s=t.style,l=t.scale?t.scale[0]||1:1,u=t.scale?t.scale[1]||1:1;if(s.shadowblur||s.shadowoffsetx||s.shadowoffsety)n=s.shadowoffsetx||0,o=s.shadowoffsety||0,a=s.shadowblur,r=s.shadowcolor;else{if(!s.textshadowblur)return void this.removedom(e,s);n=s.textshadowoffsetx||0,o=s.textshadowoffsety||0,a=s.textshadowblur,r=s.textshadowcolor}i.setattribute("dx",n/l),i.setattribute("dy",o/u),i.setattribute("flood-color",r);var h=a/2/l+" "+a/2/u;i.setattribute("stddeviation",h),e.setattribute("x","-100%"),e.setattribute("y","-100%"),e.setattribute("width",math.ceil(a/2*200)+"%"),e.setattribute("height",math.ceil(a/2*200)+"%"),e.appendchild(i),s._shadowdom=e},fx.prototype.markused=function(t){var e=t.style;e&&e._shadowdom&&hx.prototype.markused.call(this,e._shadowdom)};var mo=function(t,e,i,n){this.root=t,this.storage=e,this._opts=i=a({},i||{});var o=$y("svg");o.setattribute("xmlns","http://www.w3.org/2000/svg"),o.setattribute("version","1.1"),o.setattribute("baseprofile","full"),o.style.csstext="user-select:none;position:absolute;left:0;top:0;",this.gradientmanager=new cx(n,o),this.clippathmanager=new dx(n,o),this.shadowmanager=new fx(n,o);var r=document.createelement("div");r.style.csstext="overflow:hidden;position:relative",this._svgroot=o,this._viewport=r,t.appendchild(r),r.appendchild(o),this.resize(i.width,i.height),this._visiblelist=[]};mo.prototype={constructor:mo,gettype:function(){return"svg"},getviewportroot:function(){return this._viewport},getviewportrootoffset:function(){var t=this.getviewportroot();if(t)return{offsetleft:t.offsetleft||0,offsettop:t.offsettop||0}},refresh:function(){var t=this.storage.getdisplaylist(!0);this._paintlist(t)},setbackgroundcolor:function(t){this._viewport.style.background=t},_paintlist:function(t){this.gradientmanager.markallunused(),this.clippathmanager.markallunused(),this.shadowmanager.markallunused();var e,i=this._svgroot,n=this._visiblelist,o=t.length,a=[];for(e=0;e=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},resize:function(t,e){var i=this._viewport;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getsize(0),e=this._getsize(1),i.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var o=i.style;o.width=t+"px",o.height=e+"px";var a=this._svgroot;a.setattribute("width",t),a.setattribute("height",e)}},getwidth:function(){return this._width},getheight:function(){return this._height},_getsize:function(t){var e=this._opts,i=["width","height"][t],n=["clientwidth","clientheight"][t],o=["paddingleft","paddingtop"][t],a=["paddingright","paddingbottom"][t];if(null!=e[i]&&"auto"!==e[i])return parsefloat(e[i]);var r=this.root,s=document.defaultview.getcomputedstyle(r);return(r[n]||gx(s[i])||gx(r.style[i]))-(gx(s[o])||0)-(gx(s[a])||0)|0},dispose:function(){this.root.innerhtml="",this._svgroot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removechild(this._viewport)},pathtodataurl:function(){return this.refresh(),"data:image/svg+xml;charset=utf-8,"+this._svgroot.outerhtml}},d(["getlayer","insertlayer","eachlayer","eachbuiltinlayer","eachotherlayer","getlayers","modlayer","dellayer","clearlayer","todataurl","pathtoimage"],function(t){mo.prototype[t]=mx(t)}),wi("svg",mo),t.version="4.0.4",t.dependencies=um,t.priority=qm,t.init=function(t,e,i){var n=rs(t);if(n)return n;var o=new vr(t,e,i);return o.id="ec_"+di++,hi[o.id]=o,zi(t,pi,o.id),os(o),o},t.connect=function(t){if(y(t)){var e=t;t=null,fm(e,function(e){null!=e.group&&(t=e.group)}),t=t||"g_"+fi++,fm(e,function(e){e.group=t})}return ci[t]=!0,t},t.disconnect=as,t.disconnect=mi,t.dispose=function(t){"string"==typeof t?t=hi[t]:t instanceof vr||(t=rs(t)),t instanceof vr&&!t.isdisposed()&&t.dispose()},t.getinstancebydom=rs,t.getinstancebyid=function(t){return hi[t]},t.registertheme=ss,t.registerpreprocessor=ls,t.registerprocessor=us,t.registerpostupdate=function(t){ri.push(t)},t.registeraction=hs,t.registercoordinatesystem=cs,t.getcoordinatesystemdimensions=function(t){var e=ca.get(t);if(e)return e.getdimensionsinfo?e.getdimensionsinfo():e.dimensions.slice()},t.registerlayout=ds,t.registervisual=fs,t.registerloading=gs,t.extendcomponentmodel=ms,t.extendcomponentview=vs,t.extendseriesmodel=ys,t.extendchartview=xs,t.setcanvascreator=function(t){e("createcanvas",t)},t.registermap=function(t,e,i){e.geojson&&!e.features&&(i=e.specialareas,e=e.geojson),"string"==typeof e&&(e="undefined"!=typeof json&&json.parse?json.parse(e):new function("return ("+e+");")()),gi[t]={geojson:e,specialareas:i}},t.getmap=_s,t.datatool=vi,t.zrender=_w,t.graphic=ss,t.number=ys,t.format=ms,t.throttle=xr,t.helper=sd,t.matrix=e_,t.vector=yx,t.color=y_,t.parsegeojson=ud,t.parsegeojson=fd,t.util=pd,t.list=di,t.model=wo,t.axis=dd,t.env=ax});