import{l as t,_ as e,r as i,k as n,a8 as a,b as r,c as o,e as s,d as l,f as h,C as u,F as c,A as d,X as p}from"./index-7d881374.js";import{h as f}from"./moment-6961f857.js";var g={},m={};"undefined"!=typeof window||void 0!==t&&t.__DEV__;var v={},y=2311;var x=function(){return y++};var _="undefined"==typeof navigator?{browser:{},os:{},node:!0,canvasSupported:!0,svgSupported:!0}:function(t){var e={},i={},n=t.match(/Firefox\/([\d.]+)/),a=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),r=t.match(/Edge\/([\d.]+)/),o=/micromessenger/i.test(t);n&&(i.firefox=!0,i.version=n[1]);a&&(i.ie=!0,i.version=a[1]);r&&(i.edge=!0,i.version=r[1]);o&&(i.weChat=!0);return{browser:i,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!i.ie&&!i.edge,pointerEventsSupported:"onpointerdown"in window&&(i.edge||i.ie&&i.version>=11)}}(navigator.userAgent),b={},w={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},S={"[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},M=Object.prototype.toString,I=Array.prototype,A=I.forEach,T=I.filter,C=I.slice,L=I.map,D=I.reduce,P={};function k(t){if(null==t||"object"!=typeof t)return t;var e=t,i=M.call(t);if("[object Array]"===i){e=[];for(var n=0,a=t.length;n3&&(e=at.call(e,1));for(var n=this._$handlers[t],a=n.length,r=0;r4&&(e=at.call(e,1,e.length-1));for(var n=e[e.length-1],a=this._$handlers[t],r=a.length,o=0;o=0;r--){var o;if(n[r]!==i&&!n[r].ignore&&(o=ft(n[r],t,e))&&(!a.topTarget&&(a.topTarget=n[r]),"silent"!==o)){a.target=n[r];break}}return a}},st.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){pt.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("mosueup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||lt.dist(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}})),st.mixin(pt,ut),st.mixin(pt,ht);var gt=pt,mt={},vt="undefined"==typeof Float32Array?Array:Float32Array;function yt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}mt.create=function(){var t=new vt(6);return yt(t),t},mt.identity=yt,mt.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t},mt.mul=function(t,e,i){var n=e[0]*i[0]+e[2]*i[1],a=e[1]*i[0]+e[3]*i[1],r=e[0]*i[2]+e[2]*i[3],o=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=a,t[2]=r,t[3]=o,t[4]=s,t[5]=l,t},mt.translate=function(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t},mt.rotate=function(t,e,i){var n=e[0],a=e[2],r=e[4],o=e[1],s=e[3],l=e[5],h=Math.sin(i),u=Math.cos(i);return t[0]=n*u+o*h,t[1]=-n*h+o*u,t[2]=a*u+s*h,t[3]=-a*h+u*s,t[4]=u*r+h*l,t[5]=u*l-h*r,t},mt.scale=function(t,e,i){var n=i[0],a=i[1];return t[0]=e[0]*n,t[1]=e[1]*a,t[2]=e[2]*n,t[3]=e[3]*a,t[4]=e[4]*n,t[5]=e[5]*a,t},mt.invert=function(t,e){var i=e[0],n=e[2],a=e[4],r=e[1],o=e[3],s=e[5],l=i*o-r*n;return l?(l=1/l,t[0]=o*l,t[1]=-r*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-o*a)*l,t[5]=(r*a-i*s)*l,t):null};var xt=mt,_t=U,bt=xt.identity;function wt(t){return t>5e-5||t<-5e-5}var St=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},Mt=St.prototype;Mt.transform=null,Mt.needLocalTransform=function(){return wt(this.rotation)||wt(this.position[0])||wt(this.position[1])||wt(this.scale[0]-1)||wt(this.scale[1]-1)},Mt.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;i||e?(n=n||xt.create(),i?this.getLocalTransform(n):bt(n),e&&(i?xt.mul(n,t.transform,n):xt.copy(n,t.transform)),this.transform=n,this.invTransform=this.invTransform||xt.create(),xt.invert(this.invTransform,n)):n&&bt(n)},Mt.getLocalTransform=function(t){return St.getLocalTransform(this,t)},Mt.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)},Mt.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var It=[];Mt.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(xt.mul(It,t.invTransform,e),e=It);var i=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],a=this.position,r=this.scale;wt(i-1)&&(i=Math.sqrt(i)),wt(n-1)&&(n=Math.sqrt(n)),e[0]<0&&(i=-i),e[3]<0&&(n=-n),a[0]=e[4],a[1]=e[5],r[0]=i,r[1]=n,this.rotation=Math.atan2(-e[1]/n,e[0]/i)}},Mt.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]},Mt.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&_t.applyTransform(i,i,n),i},Mt.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&_t.applyTransform(i,i,n),i},St.getLocalTransform=function(t,e){bt(e=e||[]);var i=t.origin,n=t.scale||[1,1],a=t.rotation||0,r=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),xt.scale(e,e,n),a&&xt.rotate(e,e,a),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=r[0],e[5]+=r[1],e};var At=St,Tt={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,n=.4;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=n*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.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-Tt.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*Tt.bounceIn(2*t):.5*Tt.bounceOut(2*t-1)+.5}},Ct=Tt;function Lt(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}Lt.prototype={constructor:Lt,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,a="string"==typeof n?Ct[n]:n,r="function"==typeof a?a(i):i;return this.fire("frame",r),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 Dt=Lt,Pt={},kt=function(){this.head=null,this.tail=null,this._len=0},Ot=kt.prototype;Ot.insert=function(t){var e=new zt(t);return this.insertEntry(e),e},Ot.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++},Ot.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--},Ot.len=function(){return this._len},Ot.clear=function(){this.head=this.tail=null,this._len=0};var zt=function(t){this.value=t,this.next,this.prev},Et=function(t){this._list=new kt,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},Rt=Et.prototype;Rt.put=function(t,e){var i=this._list,n=this._map,a=null;if(null==n[t]){var r=i.len(),o=this._lastRemovedEntry;if(r>=this._maxSize&&r>0){var s=i.head;i.remove(s),delete n[s.key],a=s.value,this._lastRemovedEntry=s}o?o.value=e:o=new zt(e),o.key=t,i.insertEntry(o),n[t]=o}return a},Rt.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},Rt.clear=function(){this._list.clear(),this._map={}};var Nt=Et,Vt={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]};function Bt(t){return(t=Math.round(t))<0?0:t>255?255:t}function Gt(t){return t<0?0:t>1?1:t}function Wt(t){return t.length&&"%"===t.charAt(t.length-1)?Bt(parseFloat(t)/100*255):Bt(parseInt(t,10))}function Ht(t){return t.length&&"%"===t.charAt(t.length-1)?Gt(parseFloat(t)/100):Gt(parseFloat(t))}function Ft(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 Zt(t,e,i){return t+(e-t)*i}function Ut(t,e,i,n,a){return t[0]=e,t[1]=i,t[2]=n,t[3]=a,t}function jt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var qt=new Nt(20),Xt=null;function Yt(t,e){Xt&&jt(Xt,e),Xt=qt.put(t,Xt||e.slice())}function $t(t,e){if(t){e=e||[];var i=qt.get(t);if(i)return jt(e,i);var n,a=(t+="").replace(/ /g,"").toLowerCase();if(a in Vt)return jt(e,Vt[a]),Yt(t,e),e;if("#"===a.charAt(0))return 4===a.length?(n=parseInt(a.substr(1),16))>=0&&n<=4095?(Ut(e,(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),Yt(t,e),e):void Ut(e,0,0,0,1):7===a.length?(n=parseInt(a.substr(1),16))>=0&&n<=16777215?(Ut(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),Yt(t,e),e):void Ut(e,0,0,0,1):void 0;var r=a.indexOf("("),o=a.indexOf(")");if(-1!==r&&o+1===a.length){var s=a.substr(0,r),l=a.substr(r+1,o-(r+1)).split(","),h=1;switch(s){case"rgba":if(4!==l.length)return void Ut(e,0,0,0,1);h=Ht(l.pop());case"rgb":return 3!==l.length?void Ut(e,0,0,0,1):(Ut(e,Wt(l[0]),Wt(l[1]),Wt(l[2]),h),Yt(t,e),e);case"hsla":return 4!==l.length?void Ut(e,0,0,0,1):(l[3]=Ht(l[3]),Kt(l,e),Yt(t,e),e);case"hsl":return 3!==l.length?void Ut(e,0,0,0,1):(Kt(l,e),Yt(t,e),e);default:return}}Ut(e,0,0,0,1)}}function Kt(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=Ht(t[1]),a=Ht(t[2]),r=a<=.5?a*(n+1):a+n-a*n,o=2*a-r;return Ut(e=e||[],Bt(255*Ft(o,r,i+1/3)),Bt(255*Ft(o,r,i)),Bt(255*Ft(o,r,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Jt(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var n=t*(e.length-1),a=Math.floor(n),r=Math.ceil(n),o=e[a],s=e[r],l=n-a;return i[0]=Bt(Zt(o[0],s[0],l)),i[1]=Bt(Zt(o[1],s[1],l)),i[2]=Bt(Zt(o[2],s[2],l)),i[3]=Gt(Zt(o[3],s[3],l)),i}}var Qt=Jt;function te(t,e,i){if(e&&e.length&&t>=0&&t<=1){var n=t*(e.length-1),a=Math.floor(n),r=Math.ceil(n),o=$t(e[a]),s=$t(e[r]),l=n-a,h=ie([Bt(Zt(o[0],s[0],l)),Bt(Zt(o[1],s[1],l)),Bt(Zt(o[2],s[2],l)),Gt(Zt(o[3],s[3],l))],"rgba");return i?{color:h,leftIndex:a,rightIndex:r,value:n}:h}}var ee=te;function ie(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+")"}}Pt.parse=$t,Pt.lift=function(t,e){var i=$t(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;return ie(i,4===i.length?"rgba":"rgb")}},Pt.toHex=function(t){var e=$t(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},Pt.fastLerp=Jt,Pt.fastMapToColor=Qt,Pt.lerp=te,Pt.mapToColor=ee,Pt.modifyHSL=function(t,e,i,n){if(t=$t(t))return t=function(t){if(t){var e,i,n=t[0]/255,a=t[1]/255,r=t[2]/255,o=Math.min(n,a,r),s=Math.max(n,a,r),l=s-o,h=(s+o)/2;if(0===l)e=0,i=0;else{i=h<.5?l/(s+o):l/(2-s-o);var u=((s-n)/6+l/2)/l,c=((s-a)/6+l/2)/l,d=((s-r)/6+l/2)/l;n===s?e=d-c:a===s?e=1/3+u-d:r===s&&(e=2/3+c-u),e<0&&(e+=1),e>1&&(e-=1)}var p=[360*e,i,h];return null!=t[3]&&p.push(t[3]),p}}(t),null!=e&&(t[0]=function(t){return(t=Math.round(t))<0?0:t>360?360:t}(e)),null!=i&&(t[1]=Ht(i)),null!=n&&(t[2]=Ht(n)),ie(Kt(t),"rgba")},Pt.modifyAlpha=function(t,e){if((t=$t(t))&&null!=e)return t[3]=Gt(e),ie(t,"rgba")},Pt.stringify=ie;var ne=Dt,ae=Pt,re=b.isArrayLike,oe=Array.prototype.slice;function se(t,e){return t[e]}function le(t,e,i){t[e]=i}function he(t,e,i){return(e-t)*i+t}function ue(t,e,i){return i>.5?e:t}function ce(t,e,i,n,a){var r=t.length;if(1==a)for(var o=0;oa)t.length=a;else for(var r=n;r=0&&!(m[i]<=e);i--);i=Math.min(i,h-2)}else{for(i=L;ie);i++);i=Math.min(i-1,h-2)}L=i,D=e;var n=m[i+1]-m[i];if(0!==n)if(M=(e-m[i])/n,l)if(A=v[i],I=v[0===i?i:i-1],T=v[i>h-2?h-1:i+1],C=v[i>h-3?h-1:i+2],d)fe(I,A,T,C,M,M*M,M*M*M,o(t,a),g);else{if(p)r=fe(I,A,T,C,M,M*M,M*M*M,P,1),r=ve(P);else{if(f)return ue(A,T,M);r=ge(I,A,T,C,M,M*M,M*M*M)}s(t,a,r)}else if(d)ce(v[i],v[i+1],M,o(t,a),g);else{var r;if(p)ce(v[i],v[i+1],M,P,1),r=ve(P);else{if(f)return ue(v[i],v[i+1],M);r=he(v[i],v[i+1],M)}s(t,a,r)}},ondestroy:i});return e&&"spline"!==e&&(k.easing=e),k}}}var xe=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||se,this._setter=n||le,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};xe.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var a=this._getter(this._target,n);if(null==a)continue;0!==t&&i[n].push({time:0,value:me(a)})}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;t1&&(Ie=function(){for(var t in arguments)console.log(arguments[t])});var Ae=Ie,Te=_e,Ce=Ae,Le=b,De=Le.isString,Pe=Le.isFunction,ke=Le.isObject,Oe=Le.isArrayLike,ze=Le.indexOf,Ee=function(){this.animators=[]};Ee.prototype={constructor:Ee,animate:function(t,e){var i,n=!1,a=this,r=this.__zr;if(t){var o=t.split("."),s=a;n="shape"===o[0];for(var l=0,h=o.length;l0&&this.animate(t,!1).when(null==n?500:n,r).delay(a||0),this}};var Re=x,Ne=ot,Ve=At,Be=Ee,Ge=b,We=function(t){Ve.call(this,t),Ne.call(this,t),Be.call(this,t),this.id=t.id||Re()};We.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,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(Ge.isObject(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 Ke(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}}},Ke.create=function(t){return new Ke(t.x,t.y,t.width,t.height)};var Je=Ke,Qe=b,ti=je,ei=Je,ii=function(t){for(var e in t=t||{},ti.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};ii.prototype={constructor:ii,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 ii&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,a=Qe.indexOf(n,t);return a<0||(n.splice(a,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof ii&&t.delChildrenFromStorage(i)),e&&e.refresh()),this},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e=0;)a++;return a-e}function ri(t,e,i,n,a){for(n===e&&n++;n>>1])<0?l=r:s=r+1;var h=n-s;switch(h){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(;h>0;)t[s+h]=t[s+h-1],h--}t[s]=o}}function oi(t,e,i,n,a,r){var o=0,s=0,l=1;if(r(t,e[i+a])>0){for(s=n-a;l0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}else{for(s=a+1;ls&&(l=s);var h=o;o=a-l,l=a-h}for(o++;o>>1);r(t,e[i+u])>0?o=u+1:l=u}return l}function si(t,e,i,n,a,r){var o=0,s=0,l=1;if(r(t,e[i+a])<0){for(s=a+1;ls&&(l=s);var h=o;o=a-l,l=a-h}else{for(s=n-a;l=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}for(o++;o>>1);r(t,e[i+u])<0?l=u:o=u+1}return l}function li(t,e){var i,n,a=7,r=0;t.length;var o=[];function s(s){var l=i[s],h=n[s],u=i[s+1],c=n[s+1];n[s]=h+c,s===r-3&&(i[s+1]=i[s+2],n[s+1]=n[s+2]),r--;var d=si(t[u],t,l,h,0,e);l+=d,0!==(h-=d)&&0!==(c=oi(t[l+h-1],t,u,c,c-1,e))&&(h<=c?function(i,n,r,s){var l=0;for(l=0;l=7||p>=7);if(f)break;g<0&&(g=0),g+=2}if((a=g)<1&&(a=1),1===n){for(l=0;l=0;l--)t[p+l]=t[d+l];return void(t[c]=o[u])}var f=a;for(;;){var g=0,m=0,v=!1;do{if(e(o[u],t[h])<0){if(t[c--]=t[h--],g++,m=0,0==--n){v=!0;break}}else if(t[c--]=o[u--],m++,g=0,1==--s){v=!0;break}}while((g|m)=0;l--)t[p+l]=t[d+l];if(0===n){v=!0;break}}if(t[c--]=o[u--],1==--s){v=!0;break}if(0!==(m=s-oi(t[h],o,0,s,s-1,e))){for(s-=m,p=(c-=m)+1,d=(u-=m)+1,l=0;l=7||m>=7);if(v)break;f<0&&(f=0),f+=2}(a=f)<1&&(a=1);if(1===s){for(p=(c-=n)+1,d=(h-=n)+1,l=n-1;l>=0;l--)t[p+l]=t[d+l];t[c]=o[u]}else{if(0===s)throw new Error;for(d=c-(s-1),l=0;l1;){var t=r-2;if(t>=1&&n[t-1]<=n[t]+n[t+1]||t>=2&&n[t-2]<=n[t]+n[t-1])n[t-1]n[t+1])break;s(t)}},this.forceMergeRuns=function(){for(;r>1;){var t=r-2;t>0&&n[t-1]=32;)e|=1&t,t>>=1;return t+e}(a);do{if((r=ai(t,i,n,e))s&&(l=s),ri(t,i,i+l,i+r,e),r=l}o.pushRun(i,r),o.mergeRuns(),a-=r,i+=r}while(0!==a);o.forceMergeRuns()}}},ui=b,ci=_,di=ni,pi=hi;function fi(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var gi=function(){this._roots=[],this._displayList=[],this._displayListLen=0};gi.prototype={constructor:gi,traverse:function(t,e){for(var i=0;i=0&&(this.delFromStorage(t),this._roots.splice(a,1),t instanceof di&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t.__storage=this,t.dirty(!1),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:fi};var mi=gi,vi=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],yi=function(t,e){this.extendFrom(t,!1),this.host=e};function xi(t,e,i){var n=null==e.x?0:e.x,a=null==e.x2?1:e.x2,r=null==e.y?0:e.y,o=null==e.y2?0:e.y2;return e.global||(n=n*i.width+i.x,a=a*i.width+i.x,r=r*i.height+i.y,o=o*i.height+i.y),t.createLinearGradient(n,r,a,o)}function _i(t,e,i){var n=i.width,a=i.height,r=Math.min(n,a),o=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(o=o*n+i.x,s=s*a+i.y,l*=r),t.createRadialGradient(o,s,0,o,s,l)}for(var bi=yi.prototype={constructor:yi,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,a=i&&i.style,r=!a,o=0;o0},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?_i:xi)(t,e,i),a=e.colorStops,r=0;r5e3&&($i=0,Yi={}),$i++,Yi[i]=a,a}function tn(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function en(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function nn(t,e,i,n,a){if(!e)return"";var r=(t+"").split("\n");a=an(e,i,n,a);for(var o=0,s=r.length;o=r;s++)o-=r;var l=Qi(i);return l>o&&(i="",l=0),o=t-l,n.ellipsis=i,n.ellipsisWidth=l,n.contentWidth=o,n.containerWidth=t,n}function rn(t,e){var i=e.containerWidth,n=e.font,a=e.contentWidth;if(!i)return"";var r=Qi(t,n);if(r<=i)return t;for(var o=0;;o++){if(r<=a||o>=e.maxIterations){t+=e.ellipsis;break}var s=0===o?on(t,a,e.ascCharWidth,e.cnCharWidth):r>0?Math.floor(t.length*a/r):0;r=Qi(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function on(t,e,i,n){for(var a=0,r=0,o=t.length;rl)t="",r=[];else if(null!=h)for(var u=an(h-(i?i[1]+i[3]:0),e,n.ellipsis,{minChar:n.minChar,placeholder:n.placeholder}),c=0,d=r.length;ca&&cn(i,t.substring(a,r)),cn(i,n[2],n[1]),a=Ki.lastIndex}ap)return{lines:[],width:0,height:0};L.textWidth=Qi(L.text,b);var S=x.textWidth,M=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))L.percentWidth=S,h.push(L),S=0;else{if(M){S=L.textWidth;var I=x.textBackgroundColor,A=I&&I.image;A&&(A=Fi.findExistImage(A),Fi.isImageReady(A)&&(S=Math.max(S,A.width*w/A.height)))}var T=_?_[1]+_[3]:0;S+=T;var C=null!=d?d-v:null;null!=C&&Ch&&(i*=h/(o=i+n),n*=h/o),a+r>h&&(a*=h/(o=a+r),r*=h/o),n+a>u&&(n*=u/(o=n+a),a*=u/o),i+r>u&&(i*=u/(o=i+r),r*=u/o),t.moveTo(s+i,l),t.lineTo(s+h-n,l),0!==n&&t.quadraticCurveTo(s+h,l,s+h,l+n),t.lineTo(s+h,l+u-a),0!==a&&t.quadraticCurveTo(s+h,l+u,s+h-a,l+u),t.lineTo(s+r,l+u),0!==r&&t.quadraticCurveTo(s,l+u,s,l+u-r),t.lineTo(s,l+i),0!==i&&t.quadraticCurveTo(s,l,s+i,l)};var pn=b,fn=pn.retrieve2,gn=pn.retrieve3,mn=pn.each,vn=pn.normalizeCssArray,yn=pn.isString,xn=pn.isObject,_n=Ni,bn=dn,wn=Vi,Sn={left:1,right:1,center:1},Mn={top:1,bottom:1,middle:1};function In(t){if(t){t.font=_n.makeFont(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||Sn[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||Mn[i]?i:"top",t.textPadding&&(t.textPadding=vn(t.textPadding))}}function An(t,e,i,n,a){if(i&&e.textRotation){var r=e.textOrigin;"center"===r?(n=i.width/2+i.x,a=i.height/2+i.y):r&&(n=r[0]+i.x,a=r[1]+i.y),t.translate(n,a),t.rotate(-e.textRotation),t.translate(-n,-a)}}function Tn(t,e,i,n,a,r,o,s){var l=n.rich[i.styleName]||{},h=i.textVerticalAlign,u=r+a/2;"top"===h?u=r+i.height/2:"bottom"===h&&(u=r+a-i.height/2),!i.isLineHolder&&Cn(l)&&Ln(t,e,l,"right"===s?o-i.width:"center"===s?o-i.width/2:o,u-i.height/2,i.width,i.height);var c=i.textPadding;c&&(o=Rn(o,s,c),u-=i.height/2-c[2]-i.textHeight/2),kn(e,"shadowBlur",gn(l.textShadowBlur,n.textShadowBlur,0)),kn(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),kn(e,"shadowOffsetX",gn(l.textShadowOffsetX,n.textShadowOffsetX,0)),kn(e,"shadowOffsetY",gn(l.textShadowOffsetY,n.textShadowOffsetY,0)),kn(e,"textAlign",s),kn(e,"textBaseline","middle"),kn(e,"font",i.font||_n.DEFAULT_FONT);var d=On(l.textStroke||n.textStroke,f),p=zn(l.textFill||n.textFill),f=fn(l.textStrokeWidth,n.textStrokeWidth);d&&(kn(e,"lineWidth",f),kn(e,"strokeStyle",d),e.strokeText(i.text,o,u)),p&&(kn(e,"fillStyle",p),e.fillText(i.text,o,u))}function Cn(t){return t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor}function Ln(t,e,i,n,a,r,o){var s=i.textBackgroundColor,l=i.textBorderWidth,h=i.textBorderColor,u=yn(s);if(kn(e,"shadowBlur",i.textBoxShadowBlur||0),kn(e,"shadowColor",i.textBoxShadowColor||"transparent"),kn(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),kn(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),u||l&&h){e.beginPath();var c=i.textBorderRadius;c?bn.buildPath(e,{x:n,y:a,width:r,height:o,r:c}):e.rect(n,a,r,o),e.closePath()}if(u)kn(e,"fillStyle",s),e.fill();else if(xn(s)){var d=s.image;(d=wn.createOrUpdateImage(d,null,t,Dn,s))&&wn.isImageReady(d)&&e.drawImage(d,n,a,r,o)}l&&h&&(kn(e,"lineWidth",l),kn(e,"strokeStyle",h),e.stroke())}function Dn(t,e){e.image=t}function Pn(t,e,i){var n=e.x||0,a=e.y||0,r=e.textAlign,o=e.textVerticalAlign;if(i){var s=e.textPosition;if(s instanceof Array)n=i.x+En(s[0],i.width),a=i.y+En(s[1],i.height);else{var l=_n.adjustTextPositionOnRect(s,i,e.textDistance);n=l.x,a=l.y,r=r||l.textAlign,o=o||l.textVerticalAlign}var h=e.textOffset;h&&(n+=h[0],a+=h[1])}return{baseX:n,baseY:a,textAlign:r,textVerticalAlign:o}}function kn(t,e,i){return t[e]=i,t[e]}function On(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function zn(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function En(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function Rn(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}Ri.normalizeTextStyle=function(t){return In(t),mn(t.rich,In),t},Ri.renderText=function(t,e,i,n,a){n.rich?function(t,e,i,n,a){var r=t.__textCotentBlock;r&&!t.__dirty||(r=t.__textCotentBlock=_n.parseRichText(i,n));!function(t,e,i,n,a){var r=i.width,o=i.outerWidth,s=i.outerHeight,l=n.textPadding,h=Pn(s,n,a),u=h.baseX,c=h.baseY,d=h.textAlign,p=h.textVerticalAlign;An(e,n,a,u,c);var f=_n.adjustTextX(u,o,d),g=_n.adjustTextY(c,s,p),m=f,v=g;l&&(m+=l[3],v+=l[0]);var y=m+r;Cn(n)&&Ln(t,e,n,f,g,o,s);for(var x=0;x=0&&"right"===(_=w[L]).textAlign;)Tn(t,e,_,n,M,v,C,"right"),I-=_.width,C-=_.width,L--;for(T+=(r-(T-m)-(y-C)-I)/2;A<=L;)Tn(t,e,_=w[A],n,M,v,T+_.width/2,"center"),T+=_.width,A++;v+=M}}(t,e,r,n,a)}(t,e,i,n,a):function(t,e,i,n,a){var r=kn(e,"font",n.font||_n.DEFAULT_FONT),o=n.textPadding,s=t.__textCotentBlock;s&&!t.__dirty||(s=t.__textCotentBlock=_n.parsePlainText(i,r,o,n.truncate));var l=s.outerHeight,h=s.lines,u=s.lineHeight,c=Pn(l,n,a),d=c.baseX,p=c.baseY,f=c.textAlign,g=c.textVerticalAlign;An(e,n,a,d,p);var m=_n.adjustTextY(p,l,g),v=d,y=m,x=Cn(n);if(x||o){var _=_n.getWidth(i,r);o&&(_+=o[1]+o[3]);var b=_n.adjustTextX(d,_,f);x&&Ln(t,e,n,b,m,_,l),o&&(v=Rn(d,f,o),y+=o[0])}kn(e,"textAlign",f||"left"),kn(e,"textBaseline","middle"),kn(e,"shadowBlur",n.textShadowBlur||0),kn(e,"shadowColor",n.textShadowColor||"transparent"),kn(e,"shadowOffsetX",n.textShadowOffsetX||0),kn(e,"shadowOffsetY",n.textShadowOffsetY||0),y+=u/2;var w=n.textStrokeWidth,S=On(n.textStroke,w),M=zn(n.textFill);S&&(kn(e,"lineWidth",w),kn(e,"strokeStyle",S));M&&kn(e,"fillStyle",M);for(var I=0;I=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;i=0){if(!o){if((o=this._progressiveLayers[Math.min(l++,4)]).ctx.save(),o.renderScope={},o&&o.__progress>o.__maxProgress){p=o.__nextIdxNotProg-1;continue}s=o.__progress,o.__dirty||(c=s),o.__progress=c+1}v===c&&this._doPaintEl(g,o,!0,o.renderScope)}else this._doPaintEl(g,i,e,r);g.__dirty=!1}}o&&d(o),a&&a.restore(),this._furtherProgressive=!1,ta.each(this._progressiveLayers,(function(t){t.__maxProgress>=t.__progress&&(this._furtherProgressive=!0)}),this)},_doPaintEl:function(t,e,i,n){var a=e.ctx,r=t.transform;if((e.__dirty||i)&&!t.invisible&&0!==t.style.opacity&&(!r||r[0]||r[3])&&(!t.culling||!function(t,e,i){return ua.copy(t.getBoundingRect()),t.transform&&ua.applyTransform(t.transform),ca.width=e,ca.height=i,!ua.intersect(ca)}(t,this._width,this._height))){var o=t.__clipPaths;(n.prevClipLayer!==e||function(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i0&&t>n[0]){for(o=0;ot);o++);r=i[n[o]]}if(n.splice(o+1,0,t),i[t]=e,!e.virtual)if(r){var l=r.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 ea("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,n,a=this._zlevelList;for(n=0;n=0){o!==p&&(o=p,l++);var f=c.__frame=l-1;if(!r){var g=Math.min(s,4);(r=i[g])||(r=i[g]=new aa("progressive",this,this.dpr)).initContext(),r.__maxProgress=0}r.__dirty=r.__dirty||c.__dirty,r.elCount++,r.__maxProgress=Math.max(r.__maxProgress,f),r.__maxProgress>=r.__progress&&(d.__dirty=!0)}else c.__frame=-1,r&&(r.__nextIdxNotProg=h,s++,r=null)}r&&(s++,r.__nextIdxNotProg=h),this.eachBuiltinLayer((function(t,e){n[e]!==t.elCount&&(t.__dirty=!0)})),i.length=Math.min(s,5),ta.each(i,(function(t,e){a[e]!==t.elCount&&(c.__dirty=!0),t.__dirty&&(t.__progress=0)}))},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?ta.merge(i[t],e,!0):i[t]=e;var n=this._layers[t];n&&ta.merge(n,i[t],!0)}},delLayer:function(t){var e=this._layers,i=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],i.splice(ta.indexOf(i,t),1))},resize:function(t,e){var i=this._domRoot;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||e!=this._height){for(var a in i.style.width=t+"px",i.style.height=e+"px",this._layers)this._layers.hasOwnProperty(a)&&this._layers[a].resize(t,e);ta.each(this._progressiveLayers,(function(i){i.resize(t,e)})),this.refresh(!0)}return this._width=t,this._height=e,this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas)return this._layers[0].dom;var e=new aa("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clearColor=t.backgroundColor,e.clear();var i,n=this.storage.getDisplayList(!0),a={},r=this;function o(t,i){var n,a=r._zlevelList;null==t&&(t=-1/0);for(var o=0;ot&&s=0){var a="touchend"!=n?e.targetTouches[0]:e.changedTouches[0];a&&xa(t,a,e,i)}else xa(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var r=e.button;return null==e.which&&void 0!==r&&ya.test(e.type)&&(e.which=1&r?1:2&r?3:4&r?2:0),e},fa.addEventListener=function(t,e,i){va?t.addEventListener(e,i):t.attachEvent("on"+e,i)},fa.removeEventListener=function(t,e,i){va?t.removeEventListener(e,i):t.detachEvent("on"+e,i)},fa.stop=ba,fa.notLeftMouse=function(t){return t.which>1};var wa=b,Sa=fa.Dispatcher,Ma=Ei,Ia=_e,Aa=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,Sa.call(this)};Aa.prototype={constructor:Aa,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),i=0;i=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;i1&&a&&a.length>1){var o=Da(a)/Da(r);!isFinite(o)&&(o=1),e.pinchScale=o;var s=[((n=a)[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},ka=La,Oa=fa,za=Oa.addEventListener,Ea=Oa.removeEventListener,Ra=Oa.normalizeEvent,Na=b,Va=ot,Ba=_,Ga=ka,Wa=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Ha=["touchstart","touchend","touchmove"],Fa={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},Za=Na.map(Wa,(function(t){var e=t.replace("mouse","pointer");return Fa[e]?e:t}));function Ua(t){return"mousewheel"===t&&Ba.browser.firefox?"DOMMouseScroll":t}function ja(t,e,i){var n=t._gestureMgr;"start"===i&&n.clear();var a=n.recognize(e,t.handler.findHover(e.zrX,e.zrY,null).target,t.dom);if("end"===i&&n.clear(),a){var r=a.type;e.gestureEvent=r,t.handler.dispatchToElement({target:a.target},r,a.event)}}function qa(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout((function(){t._touching=!1}),700)}var Xa={mousemove:function(t){t=Ra(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=Ra(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=Ra(this.dom,t)).zrByTouch=!0,this._lastTouchMoment=new Date,ja(this,t,"start"),Xa.mousemove.call(this,t),Xa.mousedown.call(this,t),qa(this)},touchmove:function(t){(t=Ra(this.dom,t)).zrByTouch=!0,ja(this,t,"change"),Xa.mousemove.call(this,t),qa(this)},touchend:function(t){(t=Ra(this.dom,t)).zrByTouch=!0,ja(this,t,"end"),Xa.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&Xa.click.call(this,t),qa(this)},pointerdown:function(t){Xa.mousedown.call(this,t)},pointermove:function(t){Ya(t)||Xa.mousemove.call(this,t)},pointerup:function(t){Xa.mouseup.call(this,t)},pointerout:function(t){Ya(t)||Xa.mouseout.call(this,t)}};function Ya(t){var e=t.pointerType;return"pen"===e||"touch"===e}function $a(t){var e;function i(e,i){Na.each(e,(function(e){za(t,Ua(e),i._handlers[e])}),i)}Va.call(this),this.dom=t,this._touching=!1,this._touchTimer,this._gestureMgr=new Ga,this._handlers={},e=this,Na.each(Ha,(function(t){e._handlers[t]=Na.bind(Xa[t],e)})),Na.each(Za,(function(t){e._handlers[t]=Na.bind(Xa[t],e)})),Na.each(Wa,(function(t){var i,n;e._handlers[t]=(i=Xa[t],n=e,function(){if(!n._touching)return i.apply(n,arguments)})})),Ba.pointerEventsSupported?i(Za,this):(Ba.touchEventsSupported&&i(Ha,this),i(Wa,this))}Na.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){Xa[t]=function(e){e=Ra(this.dom,e),this.trigger(t,e)}}));var Ka=$a.prototype;Ka.dispose=function(){for(var t=Wa.concat(Ha),e=0;e0){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])/a*r+i[0]},dr.parsePercent=function(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?(i=t,i.replace(/^\s+/,"").replace(/\s+$/,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var i},dr.round=function(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t},dr.asc=function(t){return t.sort((function(t,e){return t-e})),t},dr.getPrecision=function(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},dr.getPrecisionSafe=function(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var a=e.indexOf(".");return a<0?0:e.length-1-a},dr.getPixelPrecision=function(t,e){var i=Math.log,n=Math.LN10,a=Math.floor(i(t[1]-t[0])/n),r=Math.round(i(Math.abs(e[1]-e[0]))/n),o=Math.min(Math.max(-a+r,0),20);return isFinite(o)?o:20},dr.getPercentWithPrecision=function(t,e,i){if(!t[e])return 0;var n=pr.reduce(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===n)return 0;for(var a=Math.pow(10,i),r=pr.map(t,(function(t){return(isNaN(t)?0:t)/n*a*100})),o=100*a,s=pr.map(r,(function(t){return Math.floor(t)})),l=pr.reduce(s,(function(t,e){return t+e}),0),h=pr.map(r,(function(t,e){return t-s[e]}));lu&&(u=h[d],c=d);++s[c],h[c]=0,++l}return s[e]/a},dr.MAX_SAFE_INTEGER=9007199254740991,dr.remRadian=function(t){var e=2*Math.PI;return(t%e+e)%e},dr.isRadianAroundZero=function(t){return t>-1e-4&&t<1e-4},dr.parseDate=function(t){if(t instanceof Date)return t;if("string"==typeof t){var e=fr.exec(t);if(!e)return new Date(NaN);if(e[8]){var i=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(i-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,i,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}return null==t?new Date(NaN):new Date(Math.round(t))},dr.quantity=function(t){return Math.pow(10,gr(t))},dr.nice=function(t,e){var i=gr(t),n=Math.pow(10,i),a=t/n;return t=(e?a<1.5?1:a<2.5?2:a<4?3:a<7?5:10:a<1?1:a<2?2:a<3?3:a<5?5:10)*n,i>=-20?+t.toFixed(i<0?-i:0):t},dr.reformIntervals=function(t){t.sort((function(t,e){return s(t,e,0)?-1:1}));for(var e=-1/0,i=1,n=0;n=0};var mr=b,vr=Ni,yr=dr;var xr=mr.normalizeCssArray;function _r(t){return String(t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}var br=["a","b","c","d","e","f","g"],wr=function(t,e){return"{"+t+(null==e?"":e)+"}"};var Sr=function(t){return t<10?"0"+t:t};var Mr=vr.truncateText,Ir=vr.getBoundingRect;cr.addCommas=function(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")},cr.toCamelCase=function(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},cr.normalizeCssArray=xr,cr.encodeHTML=_r,cr.formatTpl=function(t,e,i){mr.isArray(e)||(e=[e]);var n=e.length;if(!n)return"";for(var a=e[0].$vars||[],r=0;r':""},cr.formatTime=function(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=yr.parseDate(e),a=i?"UTC":"",r=n["get"+a+"FullYear"](),o=n["get"+a+"Month"]()+1,s=n["get"+a+"Date"](),l=n["get"+a+"Hours"](),h=n["get"+a+"Minutes"](),u=n["get"+a+"Seconds"]();return t=t.replace("MM",Sr(o)).replace("M",o).replace("yyyy",r).replace("yy",r%100).replace("dd",Sr(s)).replace("d",s).replace("hh",Sr(l)).replace("h",l).replace("mm",Sr(h)).replace("m",h).replace("ss",Sr(u)).replace("s",u)},cr.capitalFirst=function(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t},cr.truncateText=Mr,cr.getTextRect=Ir;var Ar={},Tr=b,Cr="___EC__COMPONENT__CONTAINER___";function Lr(t){var e={main:"",sub:""};return t&&(t=t.split("."),e.main=t[0]||"",e.sub=t[1]||""),e}function Dr(t,e){var i=Tr.slice(arguments,2);return this.superClass.prototype[e].apply(t,i)}function Pr(t,e,i){return this.superClass.prototype[e].apply(t,i)}Ar.set=function(t,e,i){return t["\0ec_\0"+e]=i},Ar.get=function(t,e){return t["\0ec_\0"+e]},Ar.hasOwn=function(t,e){return t.hasOwnProperty("\0ec_\0"+e)},Ar.parseClassType=Lr,Ar.enableClassExtend=function(t,e){t.$constructor=t,t.extend=function(t){var e=this,i=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return Tr.extend(i.prototype,t),i.extend=this.extend,i.superCall=Dr,i.superApply=Pr,Tr.inherits(i,this),i.superClass=e,i}},Ar.enableClassManagement=function(t,e){e=e||{};var i={};if(t.registerClass=function(t,e){if(e)if(function(t){Tr.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}(e),(e=Lr(e)).sub){if(e.sub!==Cr){var n=function(t){var e=i[t.main];e&&e[Cr]||((e=i[t.main]={})[Cr]=!0);return e}(e);n[e.sub]=t}}else i[e.main]=t;return t},t.getClass=function(t,e,n){var a=i[t];if(a&&a[Cr]&&(a=e?a[e]:null),n&&!a)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return a},t.getClassesByMainType=function(t){t=Lr(t);var e=[],n=i[t.main];return n&&n[Cr]?Tr.each(n,(function(t,i){i!==Cr&&e.push(t)})):e.push(n),e},t.hasClass=function(t){return t=Lr(t),!!i[t.main]},t.getAllClassMainTypes=function(){var t=[];return Tr.each(i,(function(e,i){t.push(i)})),t},t.hasSubTypes=function(t){t=Lr(t);var e=i[t.main];return e&&e[Cr]},t.parseClassType=Lr,e.registerWhenExtend){var n=t.extend;n&&(t.extend=function(e){var i=n.call(this,e);return t.registerClass(i,e.type)})}return t},Ar.setReadOnly=function(t,e){};var kr=b;var Or=function(t){for(var e=0;e=0||n&&kr.indexOf(n,o)<0)){var s=e.getShallow(o);null!=s&&(a[t[r][0]]=s)}}return a}},zr=Or([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Er={getLineStyle:function(t){var e=zr(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]}},Rr=Or([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Nr={getAreaStyle:function(t,e){return Rr(this,t,e)}},Vr={},Br={},Gr={},Wr=U,Hr=Wr.create,Fr=Wr.distSquare,Zr=Math.pow,Ur=Math.sqrt,jr=Ur(3),qr=1/3,Xr=Hr(),Yr=Hr(),$r=Hr();function Kr(t){return t>-1e-8&&t<1e-8}function Jr(t){return t>1e-8||t<-1e-8}function Qr(t,e,i,n,a){var r=1-a;return r*r*(r*t+3*a*e)+a*a*(a*n+3*r*i)}function to(t,e,i,n){var a=1-n;return a*(a*t+2*n*e)+n*n*i}Gr.cubicAt=Qr,Gr.cubicDerivativeAt=function(t,e,i,n,a){var r=1-a;return 3*(((e-t)*r+2*(i-e)*a)*r+(n-i)*a*a)},Gr.cubicRootAt=function(t,e,i,n,a,r){var o=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),h=t-a,u=s*s-3*o*l,c=s*l-9*o*h,d=l*l-3*s*h,p=0;if(Kr(u)&&Kr(c)){if(Kr(s))r[0]=0;else(M=-l/s)>=0&&M<=1&&(r[p++]=M)}else{var f=c*c-4*u*d;if(Kr(f)){var g=c/u,m=-g/2;(M=-s/o+g)>=0&&M<=1&&(r[p++]=M),m>=0&&m<=1&&(r[p++]=m)}else if(f>0){var v=Ur(f),y=u*s+1.5*o*(-c+v),x=u*s+1.5*o*(-c-v);(M=(-s-((y=y<0?-Zr(-y,qr):Zr(y,qr))+(x=x<0?-Zr(-x,qr):Zr(x,qr))))/(3*o))>=0&&M<=1&&(r[p++]=M)}else{var _=(2*u*s-3*o*c)/(2*Ur(u*u*u)),b=Math.acos(_)/3,w=Ur(u),S=Math.cos(b),M=(-s-2*w*S)/(3*o),I=(m=(-s+w*(S+jr*Math.sin(b)))/(3*o),(-s+w*(S-jr*Math.sin(b)))/(3*o));M>=0&&M<=1&&(r[p++]=M),m>=0&&m<=1&&(r[p++]=m),I>=0&&I<=1&&(r[p++]=I)}}return p},Gr.cubicExtrema=function(t,e,i,n,a){var r=6*i-12*e+6*t,o=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(Kr(o)){if(Jr(r))(u=-s/r)>=0&&u<=1&&(a[l++]=u)}else{var h=r*r-4*o*s;if(Kr(h))a[0]=-r/(2*o);else if(h>0){var u,c=Ur(h),d=(-r-c)/(2*o);(u=(-r+c)/(2*o))>=0&&u<=1&&(a[l++]=u),d>=0&&d<=1&&(a[l++]=d)}}return l},Gr.cubicSubdivide=function(t,e,i,n,a,r){var o=(e-t)*a+t,s=(i-e)*a+e,l=(n-i)*a+i,h=(s-o)*a+o,u=(l-s)*a+s,c=(u-h)*a+h;r[0]=t,r[1]=o,r[2]=h,r[3]=c,r[4]=c,r[5]=u,r[6]=l,r[7]=n},Gr.cubicProjectPoint=function(t,e,i,n,a,r,o,s,l,h,u){var c,d,p,f,g,m=.005,v=1/0;Xr[0]=l,Xr[1]=h;for(var y=0;y<1;y+=.05)Yr[0]=Qr(t,i,a,o,y),Yr[1]=Qr(e,n,r,s,y),(f=Fr(Xr,Yr))=0&&f=0&&u<=1&&(a[l++]=u)}else{var h=o*o-4*r*s;if(Kr(h))(u=-o/(2*r))>=0&&u<=1&&(a[l++]=u);else if(h>0){var u,c=Ur(h),d=(-o-c)/(2*r);(u=(-o+c)/(2*r))>=0&&u<=1&&(a[l++]=u),d>=0&&d<=1&&(a[l++]=d)}}return l},Gr.quadraticExtremum=function(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n},Gr.quadraticSubdivide=function(t,e,i,n,a){var r=(e-t)*n+t,o=(i-e)*n+e,s=(o-r)*n+r;a[0]=t,a[1]=r,a[2]=s,a[3]=s,a[4]=o,a[5]=i},Gr.quadraticProjectPoint=function(t,e,i,n,a,r,o,s,l){var h,u=.005,c=1/0;Xr[0]=o,Xr[1]=s;for(var d=0;d<1;d+=.05){Yr[0]=to(t,i,a,d),Yr[1]=to(e,n,r,d),(m=Fr(Xr,Yr))=0&&m1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(ho[0]=so(a)*i+t,ho[1]=oo(a)*n+e,uo[0]=so(r)*i+t,uo[1]=oo(r)*n+e,h(s,ho,uo),u(l,ho,uo),(a%=lo)<0&&(a+=lo),(r%=lo)<0&&(r+=lo),a>r&&!o?r+=lo:aa&&(co[0]=so(p)*i+t,co[1]=oo(p)*n+e,h(s,co,s),u(l,co,l))};var go=Gr,mo=U,vo=eo,yo=Je,xo=be.devicePixelRatio,_o={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},bo=[],wo=[],So=[],Mo=[],Io=Math.min,Ao=Math.max,To=Math.cos,Co=Math.sin,Lo=Math.sqrt,Do=Math.abs,Po="undefined"!=typeof Float32Array,ko=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};ko.prototype={constructor:ko,_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=Do(1/xo/t)||0,this._uy=Do(1/xo/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(_o.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=Do(t-this._xi)>this._ux||Do(e-this._yi)>this._uy||this._len<5;return this.addData(_o.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,a,r){return this.addData(_o.C,t,e,i,n,a,r),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,a,r):this._ctx.bezierCurveTo(t,e,i,n,a,r)),this._xi=a,this._yi=r,this},quadraticCurveTo:function(t,e,i,n){return this.addData(_o.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,a,r){return this.addData(_o.A,t,e,i,i,n,a-n,0,r?0:1),this._ctx&&this._ctx.arc(t,e,i,n,a,r),this._xi=To(a)*i+t,this._yi=Co(a)*i+t,this},arcTo:function(t,e,i,n,a){return this._ctx&&this._ctx.arcTo(t,e,i,n,a),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(_o.R,t,e,i,n),this},closePath:function(){this.addData(_o.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&&p<=t||u<0&&p>=t||0==u&&(c>0&&f<=e||c<0&&f>=e);)p+=u*(i=o[n=this._dashIdx]),f+=c*i,this._dashIdx=(n+1)%g,u>0&&pl||c>0&&fh||s[n%2?"moveTo":"lineTo"](u>=0?Io(p,t):Ao(p,t),c>=0?Io(f,e):Ao(f,e));u=p-t,c=f-e,this._dashOffset=-Lo(u*u+c*c)},_dashedBezierTo:function(t,e,i,n,a,r){var o,s,l,h,u,c=this._dashSum,d=this._dashOffset,p=this._lineDash,f=this._ctx,g=this._xi,m=this._yi,v=go.cubicAt,y=0,x=this._dashIdx,_=p.length,b=0;for(d<0&&(d=c+d),d%=c,o=0;o<1;o+=.1)s=v(g,t,i,a,o+.1)-v(g,t,i,a,o),l=v(m,e,n,r,o+.1)-v(m,e,n,r,o),y+=Lo(s*s+l*l);for(;x<_&&!((b+=p[x])>d);x++);for(o=(b-d)/y;o<=1;)h=v(g,t,i,a,o),u=v(m,e,n,r,o),x%2?f.moveTo(h,u):f.lineTo(h,u),o+=p[x]/y,x=(x+1)%_;x%2!=0&&f.lineTo(a,r),s=a-h,l=r-u,this._dashOffset=-Lo(s*s+l*l)},_dashedQuadraticTo:function(t,e,i,n){var a=i,r=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,a,r)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,Po&&(this.data=new Float32Array(t)))},getBoundingRect:function(){bo[0]=bo[1]=So[0]=So[1]=Number.MAX_VALUE,wo[0]=wo[1]=Mo[0]=Mo[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,a=0,r=0;rl||Do(o-a)>h||c===u-1)&&(t.lineTo(r,o),n=r,a=o);break;case _o.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],a=s[c-1];break;case _o.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],a=s[c-1];break;case _o.A:var p=s[c++],f=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],b=g>m?g:m,w=g>m?1:g/m,S=g>m?m/g:1,M=v+y;Math.abs(g-m)>.001?(t.translate(p,f),t.rotate(x),t.scale(w,S),t.arc(0,0,b,v,M,1-_),t.scale(1/w,1/S),t.rotate(-x),t.translate(-p,-f)):t.arc(p,f,b,v,M,1-_),1==c&&(e=To(v)*g+p,i=Co(v)*m+f),n=To(M)*g+p,a=Co(M)*m+f;break;case _o.R:e=n=s[c],i=a=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case _o.Z:t.closePath(),n=e,a=i}}}},ko.CMD=_o;var Oo=ko,zo={},Eo={};Eo.containStroke=function(t,e,i,n,a,r,o){if(0===a)return!1;var s=a,l=0;if(o>e+s&&o>n+s||ot+s&&r>i+s||re+c&&u>n+c&&u>r+c&&u>s+c||ut+c&&h>i+c&&h>a+c&&h>o+c||he+h&&l>n+h&&l>r+h||lt+h&&s>i+h&&s>a+h||si||u+ha&&(a+=Zo);var d=Math.atan2(l,s);return d<0&&(d+=Zo),d>=n&&d<=a||d+Zo>=n&&d+Zo<=a};var Uo=function(t,e,i,n,a,r){if(r>e&&r>n||ra?o:0},jo=Oo,qo=Eo,Xo=Ro,Yo=Vo,$o=Go,Ko=Wo.normalizeRadian,Jo=Gr,Qo=Uo,ts=jo.CMD,es=2*Math.PI;var is=[-1,-1,-1],ns=[-1,-1];function as(t,e,i,n,a,r,o,s,l,h){if(h>e&&h>n&&h>r&&h>s||h1&&(u=void 0,u=ns[0],ns[0]=ns[1],ns[1]=u),d=Jo.cubicAt(e,n,r,s,ns[0]),g>1&&(p=Jo.cubicAt(e,n,r,s,ns[1]))),2==g?ve&&s>n&&s>r||s=0&&h<=1){for(var u=0,c=Jo.quadraticAt(e,n,r,h),d=0;di||s<-i)return 0;var l=Math.sqrt(i*i-s*s);is[0]=-l,is[1]=l;var h=Math.abs(n-a);if(h<1e-4)return 0;if(h%es<1e-4){n=0,a=es;var u=r?1:-1;return o>=is[0]+t&&o<=is[1]+t?u:0}if(r){l=n;n=Ko(a),a=Ko(l)}else n=Ko(n),a=Ko(a);n>a&&(a+=es);for(var c=0,d=0;d<2;d++){var p=is[d];if(p+t>o){var f=Math.atan2(s,p);u=r?1:-1;f<0&&(f=es+f),(f>=n&&f<=a||f+es>=n&&f+es<=a)&&(f>Math.PI/2&&f<1.5*Math.PI&&(u=-u),c+=u)}}return c}function ss(t,e,i,n,a){for(var r,o,s=0,l=0,h=0,u=0,c=0,d=0;d1&&(i||(s+=Qo(l,h,u,c,n,a))),1==d&&(u=l=t[d],c=h=t[d+1]),p){case ts.M:l=u=t[d++],h=c=t[d++];break;case ts.L:if(i){if(qo.containStroke(l,h,t[d],t[d+1],e,n,a))return!0}else s+=Qo(l,h,t[d],t[d+1],n,a)||0;l=t[d++],h=t[d++];break;case ts.C:if(i){if(Xo.containStroke(l,h,t[d++],t[d++],t[d++],t[d++],t[d],t[d+1],e,n,a))return!0}else s+=as(l,h,t[d++],t[d++],t[d++],t[d++],t[d],t[d+1],n,a)||0;l=t[d++],h=t[d++];break;case ts.Q:if(i){if(Yo.containStroke(l,h,t[d++],t[d++],t[d],t[d+1],e,n,a))return!0}else s+=rs(l,h,t[d++],t[d++],t[d],t[d+1],n,a)||0;l=t[d++],h=t[d++];break;case ts.A:var f=t[d++],g=t[d++],m=t[d++],v=t[d++],y=t[d++],x=t[d++];t[d++];var _=1-t[d++],b=Math.cos(y)*m+f,w=Math.sin(y)*v+g;d>1?s+=Qo(l,h,b,w,n,a):(u=b,c=w);var S=(n-f)*v/m+f;if(i){if($o.containStroke(f,g,v,y,y+x,_,e,S,a))return!0}else s+=os(f,g,v,y,y+x,_,S,a);l=Math.cos(y+x)*m+f,h=Math.sin(y+x)*v+g;break;case ts.R:u=l=t[d++],c=h=t[d++];b=u+t[d++],w=c+t[d++];if(i){if(qo.containStroke(u,c,b,c,e,n,a)||qo.containStroke(b,c,b,w,e,n,a)||qo.containStroke(b,w,u,w,e,n,a)||qo.containStroke(u,w,u,c,e,n,a))return!0}else s+=Qo(b,c,b,w,n,a),s+=Qo(u,w,u,c,n,a);break;case ts.Z:if(i){if(qo.containStroke(l,h,u,c,e,n,a))return!0}else s+=Qo(l,h,u,c,n,a);l=u,h=c}}return i||(r=h,o=c,Math.abs(r-o)<1e-4)||(s+=Qo(l,h,u,c,n,a)||0),0!==s}zo.contain=function(t,e,i){return ss(t,0,!1,e,i)},zo.containStroke=function(t,e,i,n){return ss(t,e,!0,i,n)};var ls=jn,hs=b,us=Oo,cs=zo,ds=Ai.prototype.getCanvasPattern,ps=Math.abs,fs=new us(!0);function gs(t){ls.call(this,t),this.path=null}gs.prototype={constructor:gs,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var i,n=this.style,a=this.path||fs,r=n.hasStroke(),o=n.hasFill(),s=n.fill,l=n.stroke,h=o&&!!s.colorStops,u=r&&!!l.colorStops,c=o&&!!s.image,d=r&&!!l.image;(n.bind(t,this,e),this.setTransform(t),this.__dirty)&&(h&&(i=i||this.getBoundingRect(),this._fillGradient=n.getGradient(t,s,i)),u&&(i=i||this.getBoundingRect(),this._strokeGradient=n.getGradient(t,l,i)));h?t.fillStyle=this._fillGradient:c&&(t.fillStyle=ds.call(s,t)),u?t.strokeStyle=this._strokeGradient:d&&(t.strokeStyle=ds.call(l,t));var p=n.lineDash,f=n.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();a.setScale(m[0],m[1]),this.__dirtyPath||p&&!g&&r?(a.beginPath(t),p&&!g&&(a.setLineDash(p),a.setLineDashOffset(f)),this.buildPath(a,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),o&&a.fill(t),p&&g&&(t.setLineDash(p),t.lineDashOffset=f),r&&a.stroke(t),p&&g&&t.setLineDash([]),this.restoreTransform(t),null!=n.text&&this.drawRectText(t,this.getBoundingRect())},buildPath:function(t,e,i){},createPathProxy:function(){this.path=new us},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new us),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var a=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){a.copy(t);var r=e.lineWidth,o=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(r=Math.max(r,this.strokeContainThreshold||4)),o>1e-10&&(a.width+=r/o,a.height+=r/o,a.x-=r/o/2,a.y-=r/o/2)}return a}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),a=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var r=this.path.data;if(a.hasStroke()){var o=a.lineWidth,s=a.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(a.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),cs.containStroke(r,o/s,t,e)))return!0}if(a.hasFill())return cs.contain(r,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):ls.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(hs.isObject(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&&ps(t[0]-1)>1e-10&&ps(t[3]-1)>1e-10?Math.sqrt(ps(t[0]*t[3]-t[2]*t[1])):1}},gs.extend=function(t){var e=function(e){gs.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 a in i)!n.hasOwnProperty(a)&&i.hasOwnProperty(a)&&(n[a]=i[a])}t.init&&t.init.call(this,e)};for(var i in hs.inherits(e,gs),t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},hs.inherits(gs,ls);var ms=gs,vs=Oo,ys=U.applyTransform,xs=vs.CMD,_s=[[],[],[]],bs=Math.sqrt,ws=Math.atan2;var Ss=function(t,e){var i,n,a,r,o,s=t.data,l=xs.M,h=xs.C,u=xs.L,c=xs.R,d=xs.A,p=xs.Q;for(a=0,r=0;a1&&(o*=Cs(f),s*=Cs(f));var g=(a===r?-1:1)*Cs((o*o*(s*s)-o*o*(p*p)-s*s*(d*d))/(o*o*(p*p)+s*s*(d*d)))||0,m=g*o*p/s,v=g*-s*d/o,y=(t+i)/2+Ds(c)*m-Ls(c)*v,x=(e+n)/2+Ls(c)*m+Ds(c)*v,_=zs([1,0],[(d-m)/o,(p-v)/s]),b=[(d-m)/o,(p-v)/s],w=[(-1*d-m)/o,(-1*p-v)/s],S=zs(b,w);Os(b,w)<=-1&&(S=Ps),Os(b,w)>=1&&(S=0),0===r&&S>0&&(S-=2*Ps),1===r&&S<0&&(S+=2*Ps),u.addData(h,y,x,o,s,_,S,c,r)}function Rs(t,e){var i=function(t){if(!t)return[];var e,i=t.replace(/-/g," -").replace(/ /g," ").replace(/ /g,",").replace(/,,/g,",");for(e=0;e0&&""===p[0]&&p.shift();for(var f=0;f=11?function(){var e,i=this.__clipPaths,n=this.style;if(i)for(var a=0;ai-2?i-1:c+1],h=t[c>i-3?i-1:c+2]);var f=d*d,g=d*f;n.push([Qs(s[0],p[0],l[0],h[0],d,f,g),Qs(s[1],p[1],l[1],h[1],d,f,g)])}return n},el=U,il=el.min,nl=el.max,al=el.scale,rl=el.distance,ol=el.add,sl=el.clone,ll=el.sub;var hl=function(t,e,i,n){var a,r,o,s,l=[],h=[],u=[],c=[];if(n){o=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,p=t.length;d=2){if(a&&"spline"!==a){var r=cl(n,a,i,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(i?o:o-1);s++){var l=r[2*s],h=r[2*s+1],u=n[(s+1)%o];t.bezierCurveTo(l[0],l[1],h[0],h[1],u[0],u[1])}}else{"spline"===a&&(n=ul(n,i)),t.moveTo(n[0][0],n[0][1]);s=1;for(var 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 Gh(t,e,i,n,a,r){if("function"==typeof a&&(r=a,a=null),n&&n.isAnimationEnabled()){var o=t?"Update":"",s=n.getShallow("animationDuration"+o),l=n.getShallow("animationEasing"+o),h=n.getShallow("animationDelay"+o);"function"==typeof h&&(h=h(a,n.getAnimationDelayParams?n.getAnimationDelayParams(e,a):null)),"function"==typeof s&&(s=s(a)),s>0?e.animateTo(i,s,h||0,l,r,!!r):(e.stopAnimation(),e.attr(i),r&&r())}else e.stopAnimation(),e.attr(i),r&&r()}function Wh(t,e,i,n,a){Gh(!0,t,e,i,n,a)}function Hh(t,e,i){return e&&!Ul.isArrayLike(e)&&(e=Kl.getLocalTransform(e)),i&&(e=Xl.invert([],e)),Yl.applyTransform([],t,e)}Vr.extendShape=function(t){return $l.extend(t)},Vr.extendPath=function(t,e){return jl.extendFromString(t,e)},Vr.makePath=yh,Vr.makeImage=function(t,e,i){var n=new Jl({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===i){var a={width:t.width,height:t.height};n.setStyle(xh(e,a))}}});return n},Vr.mergePath=_h,Vr.resizePath=bh,Vr.subPixelOptimizeLine=function(t){var e=t.shape,i=t.style.lineWidth;return fh(2*e.x1)===fh(2*e.x2)&&(e.x1=e.x2=wh(e.x1,i,!0)),fh(2*e.y1)===fh(2*e.y2)&&(e.y1=e.y2=wh(e.y1,i,!0)),t},Vr.subPixelOptimizeRect=function(t){var e=t.shape,i=t.style.lineWidth,n=e.x,a=e.y,r=e.width,o=e.height;return e.x=wh(e.x,i,!0),e.y=wh(e.y,i,!0),e.width=Math.max(wh(n+r,i,!1)-e.x,0===r?0:1),e.height=Math.max(wh(a+o,i,!1)-e.y,0===o?0:1),t},Vr.subPixelOptimize=wh,Vr.setHoverStyle=function(t,e,i){t.__hoverSilentOnTouch=i&&i.hoverSilentOnTouch,"group"===t.type?t.traverse((function(t){"group"!==t.type&&Dh(t,e)})):Dh(t,e),t.on("mouseover",Ph).on("mouseout",kh),t.on("emphasis",Oh).on("normal",zh)},Vr.setLabelStyle=function(t,e,i,n,a,r,o){var s=(a=a||vh).labelFetcher,l=a.labelDataIndex,h=a.labelDimIndex,u=i.getShallow("show"),c=n.getShallow("show"),d=u||c?Ul.retrieve2(s?s.getFormattedLabel(l,"normal",null,h):null,a.defaultText):null,p=u?d:null,f=c?Ul.retrieve2(s?s.getFormattedLabel(l,"emphasis",null,h):null,d):null;null==p&&null==f||(Eh(t,i,r,a),Eh(e,n,o,a,!0)),t.text=p,e.text=f},Vr.setTextStyle=Eh,Vr.setText=function(t,e,i){var n,a={isRectText:!0};!1===i?n=!0:a.autoColor=i,Rh(t,e,a,n),t.host&&t.host.dirty&&t.host.dirty(!1)},Vr.getFont=function(t,e){var i=e||e.getModel("textStyle");return[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(" ")},Vr.updateProps=Wh,Vr.initProps=function(t,e,i,n,a){Gh(!1,t,e,i,n,a)},Vr.getTransform=function(t,e){for(var i=Xl.identity([]);t&&t!==e;)Xl.mul(i,t.getLocalTransform(),i),t=t.parent;return i},Vr.applyTransform=Hh,Vr.transformDirection=function(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),a=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),r=["left"===t?-n:"right"===t?n:0,"top"===t?-a:"bottom"===t?a:0];return r=Hh(r,e,i),Math.abs(r[0])>Math.abs(r[1])?r[0]>0?"right":"left":r[1]>0?"bottom":"top"},Vr.groupTransition=function(t,e,i,n){if(t&&e){var a,r=(a={},t.traverse((function(t){!t.isGroup&&t.anid&&(a[t.anid]=t)})),a);e.traverse((function(t){if(!t.isGroup&&t.anid){var e=r[t.anid];if(e){var n=o(t);t.attr(o(e)),Wh(t,n,i,t.dataIndex)}}}))}function o(t){var e={position:Yl.clone(t.position),rotation:t.rotation};return t.shape&&(e.shape=Ul.extend({},t.shape)),e}},Vr.clipPointsByRect=function(t,e){return Ul.map(t,(function(t){var i=t[0];i=gh(i,e.x),i=mh(i,e.x+e.width);var n=t[1];return n=gh(n,e.y),[i,n=mh(n,e.y+e.height)]}))},Vr.clipRectByRect=function(t,e){var i=gh(t.x,e.x),n=mh(t.x+t.width,e.x+e.width),a=gh(t.y,e.y),r=mh(t.y+t.height,e.y+e.height);if(n>=i&&r>=a)return{x:i,y:a,width:n-i,height:r-a}},Vr.createIcon=function(t,e,i){var n=(e=Ul.extend({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),Ul.defaults(n,i),new Jl(e)):yh(t.replace("path://",""),e,i,"center")};var Fh=Ni,Zh=Vr,Uh=["textStyle","color"],jh={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(Uh):null)},getFont:function(){return Zh.getFont({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return Fh.getBoundingRect(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("rich"),this.getShallow("truncateText"))}},qh=Or([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),Xh=b,Yh=_,$h=Ar,Kh=Er,Jh=Nr,Qh=jh,tu={getItemStyle:function(t,e){var i=qh(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]}},eu=Xh.mixin;function iu(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function nu(t,e,i){for(var n=0;n=i.length&&i.push({option:t})}})),i},ur.makeIdAndName=function(t){var e=ou.createHashMap();uu(t,(function(t,i){var n=t.exist;n&&e.set(n.id,t)})),uu(t,(function(t,i){var n=t.option;ou.assert(!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={})})),uu(t,(function(t,i){var n=t.exist,a=t.option,r=t.keyInfo;if(cu(a)){if(r.name=null!=a.name?a.name+"":n?n.name:"\0-",n)r.id=n.id;else if(null!=a.id)r.id=a.id+"";else{var o=0;do{r.id="\0"+r.name+"\0"+o++}while(e.get(r.id))}e.set(r.id,t)}}))},ur.isIdInner=fu,ur.compressBatches=function(t,e){var i={},n={};return a(t||[],i),a(e||[],n,i),[r(i),r(n)];function a(t,e,i){for(var n=0,a=t.length;n=0&&i.push(t)})),i}(o.originalDeps=e(r),t);o.entryCount=s.length,0===o.entryCount&&a.push(r),xu.each(s,(function(t){xu.indexOf(o.predecessor,t)<0&&o.predecessor.push(t);var e=i(n,t);xu.indexOf(e.successor,t)<0&&e.successor.push(r)}))})),{graph:n,noEntryList:a}}(n),s=o.graph,l=o.noEntryList,h={};for(xu.each(t,(function(t){h[t]=!0}));l.length;){var u=l.pop(),c=s[u],d=!!h[u];d&&(a.call(r,u,c.originalDeps.slice()),delete h[u]),xu.each(c.successor,d?f:p)}xu.each(h,(function(){throw new Error("Circle dependency may exists")}))}function p(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}function f(t){h[t]=!0,p(t)}}};var wu={},Su=b,Mu=Je,Iu=dr.parsePercent,Au=cr,Tu=Su.each,Cu=["left","right","top","bottom","width","height"],Lu=[["width","left","right"],["height","top","bottom"]];function Du(t,e,i,n,a){var r=0,o=0;null==n&&(n=1/0),null==a&&(a=1/0);var s=0;e.eachChild((function(l,h){var u,c,d=l.position,p=l.getBoundingRect(),f=e.childAt(h+1),g=f&&f.getBoundingRect();if("horizontal"===t){var m=p.width+(g?-g.x+p.x:0);(u=r+m)>n||l.newline?(r=0,u=m,o+=s+i,s=p.height):s=Math.max(s,p.height)}else{var v=p.height+(g?-g.y+p.y:0);(c=o+v)>a||l.newline?(r+=s+i,o=0,c=v,s=p.width):s=Math.max(s,p.width)}l.newline||(d[0]=r,d[1]=o,"horizontal"===t?r=u+i:o=c+i)}))}var Pu=Du,ku=Su.curry(Du,"vertical"),Ou=Su.curry(Du,"horizontal");function zu(t,e,i){i=Au.normalizeCssArray(i||0);var n=e.width,a=e.height,r=Iu(t.left,n),o=Iu(t.top,a),s=Iu(t.right,n),l=Iu(t.bottom,a),h=Iu(t.width,n),u=Iu(t.height,a),c=i[2]+i[0],d=i[1]+i[3],p=t.aspect;switch(isNaN(h)&&(h=n-s-d-r),isNaN(u)&&(u=a-l-c-o),null!=p&&(isNaN(h)&&isNaN(u)&&(p>n/a?h=.8*n:u=.8*a),isNaN(h)&&(h=p*u),isNaN(u)&&(u=h/p)),isNaN(r)&&(r=n-s-h-d),isNaN(o)&&(o=a-l-u-c),t.left||t.right){case"center":r=n/2-h/2-i[3];break;case"right":r=n-h-d}switch(t.top||t.bottom){case"middle":case"center":o=a/2-u/2-i[0];break;case"bottom":o=a-u-c}r=r||0,o=o||0,isNaN(h)&&(h=n-d-r-(s||0)),isNaN(u)&&(u=a-c-o-(l||0));var f=new Mu(r+i[3],o+i[0],h,u);return f.margin=i,f}function Eu(t,e){return e&&t&&Tu(Cu,(function(i){e.hasOwnProperty(i)&&(t[i]=e[i])})),t}wu.LOCATION_PARAMS=Cu,wu.HV_NAMES=Lu,wu.box=Pu,wu.vbox=ku,wu.hbox=Ou,wu.getAvailableSize=function(t,e,i){var n=e.width,a=e.height,r=Iu(t.x,n),o=Iu(t.y,a),s=Iu(t.x2,n),l=Iu(t.y2,a);return(isNaN(r)||isNaN(parseFloat(t.x)))&&(r=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=n),(isNaN(o)||isNaN(parseFloat(t.y)))&&(o=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=a),i=Au.normalizeCssArray(i||0),{width:Math.max(s-r-i[1]-i[3],0),height:Math.max(l-o-i[0]-i[2],0)}},wu.getLayoutRect=zu,wu.positionElement=function(t,e,i,n,a){var r=!a||!a.hv||a.hv[0],o=!a||!a.hv||a.hv[1],s=a&&a.boundingMode||"all";if(r||o){var l;if("raw"===s)l="group"===t.type?new Mu(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();(l=l.clone()).applyTransform(h)}e=zu(Su.defaults({width:l.width,height:l.height},e),i,n);var u=t.position,c=r?e.x-l.x:0,d=o?e.y-l.y:0;t.attr("position","raw"===s?[c,d]:[u[0]+c,u[1]+d])}},wu.sizeCalculable=function(t,e){return null!=t[Lu[e][0]]||null!=t[Lu[e][1]]&&null!=t[Lu[e][2]]},wu.mergeLayoutParam=function(t,e,i){!Su.isObject(i)&&(i={});var n=i.ignoreSize;!Su.isArray(n)&&(n=[n,n]);var a=o(Lu[0],0),r=o(Lu[1],1);function o(i,a){var r={},o=0,h={},u=0;if(Tu(i,(function(e){h[e]=t[e]})),Tu(i,(function(t){s(e,t)&&(r[t]=h[t]=e[t]),l(r,t)&&o++,l(h,t)&&u++})),n[a])return l(e,i[1])?h[i[2]]=null:l(e,i[2])&&(h[i[1]]=null),h;if(2!==u&&o){if(o>=2)return r;for(var c=0;c=0;a--)n=Ru.merge(n,t[a],!0);Bu.set(this,"__defaultOption",n)}return Bu.get(this,"__defaultOption")},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});Bu.enableClassManagement(Fu,{registerWhenExtend:!0}),Vu.enableSubTypeDefaulter(Fu),Vu.enableTopologicalTravel(Fu,(function(t){var e=[];return Ru.each(Fu.getClassesByMainType(t),(function(t){Hu.apply(e,t.prototype.dependencies||[])})),Ru.map(e,(function(t){return Bu.parseClassType(t).main}))})),Ru.mixin(Fu,Wu);var Zu=Fu,Uu="";"undefined"!=typeof navigator&&(Uu=navigator.platform||"");var ju={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],textStyle:{fontFamily:Uu.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},qu=Ar,Xu=qu.set,Yu=qu.get,$u={clearColorPalette:function(){Xu(this,"colorIdx",0),Xu(this,"colorNameMap",{})},getColorFromPalette:function(t,e){var i=Yu(e=e||this,"colorIdx")||0,n=Yu(e,"colorNameMap")||Xu(e,"colorNameMap",{});if(n.hasOwnProperty(t))return n[t];var a=this.get("color",!0)||[];if(a.length){var r=a[i];return t&&(n[t]=r),Xu(e,"colorIdx",(i+1)%a.length),r}}},Ku=b,Ju=ur,Qu=ru,tc=Zu,ec=ju,ic=$u,nc=Ku.each,ac=Ku.filter,rc=Ku.map,oc=Ku.isArray,sc=Ku.indexOf,lc=Ku.isObject,hc=Qu.extend({constructor:hc,init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new Qu(i),this._optionManager=n},setOption:function(t,e){Ku.assert(!("\0_ec_inner"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)):uc.call(this,n),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var a=i.getTimelineOption(this);a&&(this.mergeOption(a),e=!0)}if(!t||"recreate"===t||"media"===t){var r=i.getMediaOption(this,this._api);r.length&&nc(r,(function(t){this.mergeOption(t,e=!0)}),this)}return e},mergeOption:function(t){var e=this.option,i=this._componentsMap,n=[];nc(t,(function(t,i){null!=t&&(tc.hasClass(i)?n.push(i):e[i]=null==e[i]?Ku.clone(t):Ku.merge(e[i],t,!0))})),tc.topologicalTravel(n,tc.getAllClassMainTypes(),(function(n,a){var r=Ju.normalizeToArray(t[n]),o=Ju.mappingToExists(i.get(n),r);Ju.makeIdAndName(o),nc(o,(function(t,e){var i=t.option;lc(i)&&(t.keyInfo.mainType=n,t.keyInfo.subType=function(t,e,i){return e.type?e.type:i?i.subType:tc.determineSubType(t,e)}(n,i,t.exist))}));var s=function(t,e){Ku.isArray(e)||(e=e?[e]:[]);var i={};return nc(e,(function(e){i[e]=(t.get(e)||[]).slice()})),i}(i,a);e[n]=[],i.set(n,[]),nc(o,(function(t,a){var r=t.exist,o=t.option;if(Ku.assert(lc(o)||r,"Empty component definition"),o){var l=tc.getClass(n,t.keyInfo.subType,!0);if(r&&r instanceof l)r.name=t.keyInfo.name,r.mergeOption(o,this),r.optionUpdated(o,!1);else{var h=Ku.extend({dependentModels:s,componentIndex:a},t.keyInfo);r=new l(o,this,this,h),Ku.extend(r,h),r.init(o,this,this,h),r.optionUpdated(null,!0)}}else r.mergeOption({},this),r.optionUpdated({},!1);i.get(n)[a]=r,e[n][a]=r.option}),this),"series"===n&&(this._seriesIndices=cc(i.get("series")))}),this),this._seriesIndices=this._seriesIndices||[]},getOption:function(){var t=Ku.clone(this.option);return nc(t,(function(e,i){if(tc.hasClass(i)){for(var n=(e=Ju.normalizeToArray(e)).length-1;n>=0;n--)Ju.isIdInner(e[n])&&e.splice(n,1);t[i]=e}})),delete t["\0_ec_inner"],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,n=t.index,a=t.id,r=t.name,o=this._componentsMap.get(e);if(!o||!o.length)return[];if(null!=n)oc(n)||(n=[n]),i=ac(rc(n,(function(t){return o[t]})),(function(t){return!!t}));else if(null!=a){var s=oc(a);i=ac(o,(function(t){return s&&sc(a,t.id)>=0||!s&&t.id===a}))}else if(null!=r){var l=oc(r);i=ac(o,(function(t){return l&&sc(r,t.name)>=0||!l&&t.name===r}))}else i=o.slice();return dc(i,t)},findComponents:function(t){var e,i,n,a,r,o=t.query,s=t.mainType,l=(i=s+"Index",n=s+"Id",a=s+"Name",!(e=o)||null==e[i]&&null==e[n]&&null==e[a]?null:{mainType:s,index:e[i],id:e[n],name:e[a]}),h=l?this.queryComponents(l):this._componentsMap.get(s);return r=dc(h,t),t.filter?ac(r,t.filter):r},eachComponent:function(t,e,i){var n=this._componentsMap;if("function"==typeof t)i=e,e=t,n.each((function(t,n){nc(t,(function(t,a){e.call(i,n,t,a)}))}));else if(Ku.isString(t))nc(n.get(t),e,i);else if(lc(t)){var a=this.findComponents(t);nc(a,e,i)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return ac(e,(function(e){return e.name===t}))},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){var e=this._componentsMap.get("series");return ac(e,(function(e){return e.subType===t}))},getSeries:function(){return this._componentsMap.get("series").slice()},eachSeries:function(t,e){nc(this._seriesIndices,(function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)}),this)},eachRawSeries:function(t,e){nc(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,i){nc(this._seriesIndices,(function(n){var a=this._componentsMap.get("series")[n];a.subType===t&&e.call(i,a,n)}),this)},eachRawSeriesByType:function(t,e,i){return nc(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return Ku.indexOf(this._seriesIndices,t.componentIndex)<0},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){var i=ac(this._componentsMap.get("series"),t,e);this._seriesIndices=cc(i)},restoreData:function(){var t=this._componentsMap;this._seriesIndices=cc(t.get("series"));var e=[];t.each((function(t,i){e.push(i)})),tc.topologicalTravel(e,tc.getAllClassMainTypes(),(function(e,i){nc(t.get(e),(function(t){t.restoreData()}))}))}});function uc(t){var e,i;this.option={},this.option["\0_ec_inner"]=1,this._componentsMap=Ku.createHashMap({series:[]}),this._seriesIndices=null,e=t,i=this._theme.option,Ku.each(i,(function(t,i){tc.hasClass(i)||("object"==typeof t?e[i]=e[i]?Ku.merge(e[i],t,!1):Ku.clone(t):null==e[i]&&(e[i]=t))})),Ku.merge(t,ec,!1),this.mergeOption(t)}function cc(t){return rc(t,(function(t){return t.componentIndex}))||[]}function dc(t,e){return e.hasOwnProperty("subType")?ac(t,(function(t){return t.subType===e.subType})):t}Ku.mixin(hc,ic);var pc=hc,fc=b,gc=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];var mc=function(t){fc.each(gc,(function(e){this[e]=fc.bind(t[e],t)}),this)},vc=b,yc={};function xc(){this._coordinateSystems=[]}xc.prototype={constructor:xc,create:function(t,e){var i=[];vc.each(yc,(function(n,a){var r=n.create(t,e);i=i.concat(r||[])})),this._coordinateSystems=i},update:function(t,e){vc.each(this._coordinateSystems,(function(i){i.update&&i.update(t,e)}))},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},xc.register=function(t,e){yc[t]=e},xc.get=function(t){return yc[t]};var _c=xc,bc=b,wc=ur,Sc=Zu,Mc=bc.each,Ic=bc.clone,Ac=bc.map,Tc=bc.merge,Cc=/^(min|max)?(.+)$/;function Lc(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function Dc(t,e,i){var n,a,r=[],o=[],s=t.timeline;if(t.baseOption&&(a=t.baseOption),(s||t.options)&&(a=a||{},r=(t.options||[]).slice()),t.media){a=a||{};var l=t.media;Mc(l,(function(t){t&&t.option&&(t.query?o.push(t):n||(n=t))}))}return a||(a=t),a.timeline||(a.timeline=s),Mc([a].concat(r).concat(bc.map(o,(function(t){return t.option}))),(function(t){Mc(e,(function(e){e(t,i)}))})),{baseOption:a,timelineOptions:r,mediaDefault:n,mediaList:o}}function Pc(t,e,i){var n={width:e,height:i,aspectratio:e/i},a=!0;return bc.each(t,(function(t,e){var i=e.match(Cc);if(i&&i[1]&&i[2]){var r=i[1],o=i[2].toLowerCase();(function(t,e,i){return"min"===i?t>=e:"max"===i?t<=e:t===e})(n[o],t,r)||(a=!1)}})),a}Lc.prototype={constructor:Lc,setOption:function(t,e){t=Ic(t,!0);var i,n,a=this._optionBackup,r=Dc.call(this,t,e,!a);this._newBaseOption=r.baseOption,a?(i=a.baseOption,n=r.baseOption,Mc(n=n||{},(function(t,e){if(null!=t){var n=i[e];if(Sc.hasClass(e)){t=wc.normalizeToArray(t),n=wc.normalizeToArray(n);var a=wc.mappingToExists(n,t);i[e]=Ac(a,(function(t){return t.option&&t.exist?Tc(t.exist,t.option,!0):t.exist||t.option}))}else i[e]=Tc(n,t,!0)}})),r.timelineOptions.length&&(a.timelineOptions=r.timelineOptions),r.mediaList.length&&(a.mediaList=r.mediaList),r.mediaDefault&&(a.mediaDefault=r.mediaDefault)):this._optionBackup=r},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=Ac(e.timelineOptions,Ic),this._mediaList=Ac(e.mediaList,Ic),this._mediaDefault=Ic(e.mediaDefault),this._currentMediaIndices=[],Ic(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=Ic(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e,i,n=this._api.getWidth(),a=this._api.getHeight(),r=this._mediaList,o=this._mediaDefault,s=[],l=[];if(!r.length&&!o)return l;for(var h=0,u=r.length;h":"")+r.join(a?"
":", ")}(a):rd(od(a)),o=n.getName(t),s=n.getItemVisual(t,"color");ed.isObject(s)&&s.colorStops&&(s=(s.colorStops[0]||{}).color);var l=sd(s=s||"transparent"),h=this.name;return"\0-"===h&&(h=""),h=h?rd(h)+(e?": ":"
"):"",e?l+h+r:h+l+(o?rd(o)+": "+r:r)},isAnimationEnabled:function(){if(id.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){hd(this,"data",ud(this,"dataBeforeProcessed").cloneShallow())},getColorFromPalette:function(t,e){var i=this.ecModel,n=pd.getColorFromPalette.call(this,t,e);return n||(n=i.getColorFromPalette(t,e)),n},getAxisTooltipData:null,getTooltipPosition:null});ed.mixin(vd,cd.dataFormatMixin),ed.mixin(vd,pd);var yd=vd,xd=ni,_d=yu,bd=Ar,wd=function(){this.group=new xd,this.uid=_d.getUID("viewComponent")},Sd=wd.prototype={constructor:wd,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){}};Sd.updateView=Sd.updateLayout=Sd.updateVisual=function(t,e,i,n){},bd.enableClassExtend(wd),bd.enableClassManagement(wd,{registerWhenExtend:!0});var Md=wd,Id=b,Ad=ni,Td=yu,Cd=Ar,Ld=ur;function Dd(){this.group=new Ad,this.uid=Td.getUID("viewChart")}Dd.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){Od(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){Od(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){}};var Pd=Dd.prototype;function kd(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var i=0;i=0?c():u=setTimeout(c,-a),l=n};return d.clear=function(){u&&(clearTimeout(u),u=null)},d.debounceNextCall=function(t){s=t},d}Ed.throttle=Vd,Ed.createOrUpdate=function(t,e,i,n){var a=t[e];if(a){var r=a[Rd]||a,o=a["\0__throttleType"];if(a[Nd]!==i||o!==n){if(null==i||!n)return t[e]=r;(a=t[e]=Vd(r,i,"debounce"===n))[Rd]=r,a["\0__throttleType"]=n,a[Nd]=i}return a}},Ed.clear=function(t,e){var i=t[e];i&&i[Rd]&&(t[e]=i[Rd])};var Bd=Rl;var Gd=function(t){t.eachRawSeries((function(e){var i=(e.visualColorAccessPath||"itemStyle.normal.color").split("."),n=e.getData(),a=e.get(i)||e.getColorFromPalette(e.get("name"));n.setVisual("color",a),t.isSeriesFiltered(e)||("function"!=typeof a||a instanceof Bd||n.each((function(t){n.setItemVisual(t,"color",a(e.getDataParams(t)))})),n.each((function(t){var e=n.getItemModel(t).get(i,!0);null!=e&&n.setItemVisual(t,"color",e)})))}))},Wd=b,Hd=Vr,Fd=Math.PI;var Zd=function(t,e){e=e||{},Wd.defaults(e,{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new Hd.Rect({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),n=new Hd.Arc({shape:{startAngle:-Fd/2,endAngle:-Fd/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),a=new Hd.Rect({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*Fd/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*Fd/2}).delay(300).start("circularInOut");var r=new Hd.Group;return r.add(n),r.add(a),r.add(i),r.resize=function(){var e=t.getWidth()/2,r=t.getHeight()/2;n.setShape({cx:e,cy:r});var o=n.shape.r;a.setShape({x:e-o,y:r-o,width:2*o,height:2*o}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},r.resize(),r},Ud={},jd={};function qd(t){return t}function Xd(t,e,i,n,a){this._old=t,this._new=e,this._oldKeyGetter=i||qd,this._newKeyGetter=n||qd,this.context=a}function Yd(t,e,i,n,a){for(var r=0;r=0?a[s]=new l.constructor(r[s].length):a[s]=r[s]}return n}lp.type="list",lp.hasItemOption=!0,lp.getDimension=function(t){return isNaN(t)||(t=this.dimensions[t]||t),t},lp.getDimensionInfo=function(t){return Kd.clone(this._dimensionInfos[this.getDimension(t)])},lp.initData=function(t,e,i){t=t||[],Kd.isArray(t)&&(t=new op(t)),this._rawData=t;var n,a=this._storage={},r=this.indices=[],o=this.dimensions,s=this._dimensionInfos,l=t.count(),h=[],u={};e=e||[];for(var c=0;c0&&(x+="__ec__"+u[y]),u[y]++),x&&(h[c]=x)}this._nameList=e,this._idList=h},lp.count=function(){return this.indices.length},lp.get=function(t,e,i){var n=this._storage,a=this.indices[e];if(null==a||!n[t])return NaN;var r=n[t][a];if(i){var o=this._dimensionInfos[t];if(o&&o.stackable)for(var s=this.stackedOn;s;){var l=s.get(t,e);(r>=0&&l>0||r<=0&&l<0)&&(r+=l),s=s.stackedOn}}return r},lp.getValues=function(t,e,i){var n=[];Kd.isArray(t)||(i=e,e=t,t=this.dimensions);for(var a=0,r=t.length;al&&(l=r));return this._extent[t+!!e]=[s,l]}return[1/0,-1/0]},lp.getSum=function(t,e){var i=0;if(this._storage[t])for(var n=0,a=this.count();nt))return r;a=r-1}}return-1},lp.indicesOfNearest=function(t,e,i,n){var a=[];if(!this._storage[t])return a;null==n&&(n=1/0);for(var r=Number.MAX_VALUE,o=-1,s=0,l=this.count();s=0&&o<0)&&(r=u,o=h,a.length=0),a.push(s))}return a},lp.getRawIndex=function(t){var e=this.indices[t];return null==e?-1:e},lp.getRawDataItem=function(t){return this._rawData.getItem(this.getRawIndex(t))},lp.getName=function(t){return this._nameList[this.indices[t]]||""},lp.getId=function(t){return this._idList[this.indices[t]]||this.getRawIndex(t)+""},lp.each=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]);var a=[],r=(t=Kd.map(hp(t),this.getDimension,this)).length,o=this.indices;n=n||this;for(var s=0;sp-f&&(c=p-f,h.length=c);for(var g=0;g1){n=[];for(var s=0;s=0&&function(t){var e=function(t){for(var e=0;e=e[0]&&t<=e[1]},Vp.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},Vp.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},Vp.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},Vp.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getDataExtent(e,!0))},Vp.prototype.getExtent=function(){return this._extent.slice()},Vp.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},Vp.prototype.getTicksLabels=function(){for(var t=[],e=this.getTicks(),i=0;it[1]&&(t[0]=t[1])}Up.intervalScaleNiceTicks=function(t,e,i,n){var a={},r=t[1]-t[0],o=a.interval=jp.nice(r/e,!0);null!=i&&on&&(o=a.interval=n);var s=a.intervalPrecision=Xp(o);return $p(a.niceTickExtent=[qp(Math.ceil(t[0]/o)*o,s),qp(Math.floor(t[1]/o)*o,s)],t),a},Up.getIntervalPrecision=Xp,Up.fixExtent=$p,Up.intervalScaleGetTicks=function(t,e,i,n){var a=[];if(!t)return a;e[0]1e4)return[];return e[1]>(a.length?a[a.length-1]:i[1])&&a.push(e[1]),a};var Kp=dr,Jp=cr,Qp=Bp,tf=Up,ef=Kp.round,nf=Qp.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),nf.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=tf.getIntervalPrecision(t)},getTicks:function(){return tf.intervalScaleGetTicks(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getTicksLabels:function(){for(var t=[],e=this.getTicks(),i=0;ii&&(r=i);var o=gf.length,s=function(t,e,i,n){for(;i>>1;t[a][1]0})))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||i<=0)){var n=yf.quantity(i);for(t/i*n<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var a=[yf.round(If(e[0]/n)*n),yf.round(Mf(e[1]/n)*n)];this._interval=n,this._niceExtent=a}},niceExtent:function(t){bf.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});function Lf(t,e){return Sf(t,wf(e))}mf.each(["contain","normalize"],(function(t){Cf.prototype[t]=function(e){return e=Tf(e)/Tf(this.base),_f[t].call(this,e)}})),Cf.create=function(){return new Cf};var Df=b,Pf=Ni,kf=Zp,Of=af,zf=Bp,Ef=dr;function Rf(t,e){var i,n,a,r=t.type,o=e.getMin(),s=e.getMax(),l=null!=o,h=null!=s,u=t.getExtent();return"ordinal"===r?i=(e.get("data")||[]).length:(n=e.get("boundaryGap"),Df.isArray(n)||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=Ef.parsePercent(n[0],1),n[1]=Ef.parsePercent(n[1],1),a=u[1]-u[0]||Math.abs(u[0])),null==o&&(o="ordinal"===r?i?0:NaN:u[0]-n[0]*a),null==s&&(s="ordinal"===r?i?i-1:NaN:u[1]+n[1]*a),"dataMin"===o?o=u[0]:"function"==typeof o&&(o=o({min:u[0],max:u[1]})),"dataMax"===s?s=u[1]:"function"==typeof s&&(s=s({min:u[0],max:u[1]})),(null==o||!isFinite(o))&&(o=NaN),(null==s||!isFinite(s))&&(s=NaN),t.setBlank(Df.eqNaN(o)||Df.eqNaN(s)),e.getNeedCrossZero()&&(o>0&&s>0&&!l&&(o=0),o<0&&s<0&&!h&&(s=0)),[o,s]}function Nf(t,e){return"category"===t.type?t.scale.getLabel(e):e}Rp.getScaleExtent=Rf,Rp.niceScaleExtent=function(t,e){var i=Rf(t,e),n=null!=e.getMin(),a=null!=e.getMax(),r=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var o=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:r,fixMin:n,fixMax:a,minInterval:"interval"===o||"time"===o?e.get("minInterval"):null,maxInterval:"interval"===o||"time"===o?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)},Rp.createScaleByModel=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new kf(t.getCategories(),[1/0,-1/0]);case"value":return new Of;default:return(zf.getClass(e)||Of).create(t)}},Rp.ifAxisCrossZero=function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||i<0&&n<0)},Rp.getAxisLabelInterval=function(t,e,i,n,a){var r,o=0,s=0,l=(n-a)/180*Math.PI,h=1;e.length>40&&(h=Math.floor(e.length/40));for(var u=0;u1?h:(o+1)*h-1},Rp.getFormattedLabels=function(t,e){var i,n=t.scale,a=n.getTicksLabels(),r=n.getTicks();return"string"==typeof e?(i=e,e=function(t){return i.replace("{value}",null!=t?t:"")},Df.map(a,e)):"function"==typeof e?Df.map(r,(function(i,n){return e(Nf(t,i),n)}),this):a},Rp.getAxisRawValue=Nf;var Vf=b,Bf=Rp;function Gf(t){return Vf.isObject(t)&&null!=t.value?t.value:t+""}var Wf={getFormattedLabels:function(){return Bf.getFormattedLabels(this.axis,this.get("axisLabel.formatter"))},getCategories:function(){return"category"===this.get("type")&&Vf.map(this.get("data"),Gf)},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&&!Vf.eqNaN(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&&!Vf.eqNaN(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:Vf.noop,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},Hf={},Ff=b,Zf=Vr,Uf=Je,jf=Zf.extendShape({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,a=e.width/2,r=e.height/2;t.moveTo(i,n-r),t.lineTo(i+a,n+r),t.lineTo(i-a,n+r),t.closePath()}}),qf=Zf.extendShape({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,a=e.width/2,r=e.height/2;t.moveTo(i,n-r),t.lineTo(i+a,n),t.lineTo(i,n+r),t.lineTo(i-a,n),t.closePath()}}),Xf=Zf.extendShape({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,a=e.width/5*3,r=Math.max(a,e.height),o=a/2,s=o*o/(r-o),l=n-r+o+s,h=Math.asin(s/o),u=Math.cos(h)*o,c=Math.sin(h),d=Math.cos(h),p=.6*o,f=.7*o;t.moveTo(i-u,l+s),t.arc(i,l,o,Math.PI-h,2*Math.PI+h),t.bezierCurveTo(i+u-c*p,l+s+d*p,i,n-f,i,n),t.bezierCurveTo(i,n-f,i-u+c*p,l+s+d*p,i-u,l+s),t.closePath()}}),Yf=Zf.extendShape({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,a=e.x,r=e.y,o=n/3*2;t.moveTo(a,r),t.lineTo(a+o,r+i),t.lineTo(a,r+i/4*3),t.lineTo(a-o,r+i),t.lineTo(a,r),t.closePath()}}),$f={line:Zf.Line,rect:Zf.Rect,roundRect:Zf.Rect,square:Zf.Rect,circle:Zf.Circle,diamond:qf,pin:Xf,arrow:Yf,triangle:jf},Kf={line:function(t,e,i,n,a){a.x1=t,a.y1=e+n/2,a.x2=t+i,a.y2=e+n/2},rect:function(t,e,i,n,a){a.x=t,a.y=e,a.width=i,a.height=n},roundRect:function(t,e,i,n,a){a.x=t,a.y=e,a.width=i,a.height=n,a.r=Math.min(i,n)/4},square:function(t,e,i,n,a){var r=Math.min(i,n);a.x=t,a.y=e,a.width=r,a.height=r},circle:function(t,e,i,n,a){a.cx=t+i/2,a.cy=e+n/2,a.r=Math.min(i,n)/2},diamond:function(t,e,i,n,a){a.cx=t+i/2,a.cy=e+n/2,a.width=i,a.height=n},pin:function(t,e,i,n,a){a.x=t+i/2,a.y=e+n/2,a.width=i,a.height=n},arrow:function(t,e,i,n,a){a.x=t+i/2,a.y=e+n/2,a.width=i,a.height=n},triangle:function(t,e,i,n,a){a.cx=t+i/2,a.cy=e+n/2,a.width=i,a.height=n}},Jf={};Ff.each($f,(function(t,e){Jf[e]=new t}));var Qf=Zf.extendShape({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,a=Jf[n];"none"!==e.symbolType&&(a||(a=Jf[n="rect"]),Kf[n](e.x,e.y,e.width,e.height,a.shape),a.buildPath(t,a.shape,i))}});function tg(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)}}Hf.createSymbol=function(t,e,i,n,a,r,o){var s,l=0===t.indexOf("empty");return l&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(s=0===t.indexOf("image://")?Zf.makeImage(t.slice(8),new Uf(e,i,n,a),o?"center":"cover"):0===t.indexOf("path://")?Zf.makePath(t.slice(7),{},new Uf(e,i,n,a),o?"center":"cover"):new Qf({shape:{symbolType:t,x:e,y:i,width:n,height:a}})).__isEmptyBrush=l,s.setColor=tg,s.setColor(r),s};var eg=b,ig=Ep,ng=Rp,ag=Wf,rg=ru,og=wp;jd.completeDimensions=og;var sg=Hf;jd.createSymbol=sg.createSymbol,jd.createList=function(t){var e=t.get("data");return ig(e,t,t.ecModel)},jd.createScale=function(t,e){var i=e;e instanceof rg||(i=new rg(e),eg.mixin(i,ag));var n=ng.createScaleByModel(i);return n.setExtent(t[0],t[1]),ng.niceScaleExtent(n,i),n},jd.mixinAxisModelCommonMethods=function(t){eg.mixin(t,ag)};var lg=b,hg=dr,ug=Rp,cg=hg.linearMap;function dg(t,e){var i=(t[1]-t[0])/e/2;t[0]+=i,t[1]-=i}var pg=[0,1],fg=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1,this._labelInterval};fg.prototype={constructor:fg,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 hg.getPixelPrecision(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&&dg(i=i.slice(),n.count()),cg(t,pg,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&dg(i=i.slice(),n.count());var a=cg(t,i,pg,e);return this.scale.scale(a)},pointToData:function(t,e){},getTicksCoords:function(t){if(this.onBand&&!t){for(var e=this.getBands(),i=[],n=0;n>1^-(1&s),l=l>>1^-(1&l),a=s+=a,r=l+=r,n.push([s/i,l/i])}return n}var Cg=function(t){return function(t){if(!t.UTF8Encoding)return t;var e=t.UTF8Scale;null==e&&(e=1024);for(var i=t.features,n=0;n0})),(function(t){var e=t.properties,i=t.geometry,n=i.coordinates,a=[];"Polygon"===i.type&&a.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),"MultiPolygon"===i.type&&Ig.each(n,(function(t){t[0]&&a.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})}));var r=new Ag(e.name,a,e.cp);return r.properties=e,r}))},Lg=v;Ud.zrender=Lg;var Dg=mt;Ud.matrix=Dg;var Pg=U;Ud.vector=Pg;var kg=b,Og=Pt;Ud.color=Og;var zg=Vr;Ud.graphic=zg;var Eg=dr;Ud.number=Eg;var Rg=cr;Ud.format=Rg;var Ng=Ed;Ng.throttle,Ud.throttle=Ng.throttle;var Vg=jd;Ud.helper=Vg;var Bg=dp;Ud.List=Bg;var Gg=ru;Ud.Model=Gg;var Wg=gg;Ud.Axis=Wg;var Hg=_;Ud.env=Hg;var Fg=Cg;Ud.parseGeoJson=Fg;var Zg={};kg.each(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],(function(t){Zg[t]=kg[t]})),Ud.util=Zg,function(t){var e=v,i=b,n=Pt,a=_,r=hi,o=ot,s=pc,l=mc,h=_c,u=kc,c=td,d=Zu,p=yd,f=Md,g=zd,m=Vr,y=ur,x=Ed.throttle,w=Gd,S=Zd,M=i.each,I=d.parseClassType,A={PROCESSOR:{FILTER:1e3,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,GLOBAL:2e3,CHART:3e3,COMPONENT:4e3,BRUSH:5e3}},T="__flagInMainProcess",C=/^[a-zA-Z0-9_]+$/;function L(t){return function(e,i,n){e=e&&e.toLowerCase(),o.prototype[t].call(this,e,i,n)}}function D(){o.call(this)}function P(t,n,a){a=a||{},"string"==typeof n&&(n=it[n]),this.id,this.group,this._dom=t;var s,u,d=this._zr=e.init(t,{renderer:a.renderer||"canvas",devicePixelRatio:a.devicePixelRatio,width:a.width,height:a.height});function p(t,e){return t.prio-e.prio}this._throttledZrFlush=x(i.bind(d.flush,d),17),(n=i.clone(n))&&c(n,!0),this._theme=n,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new h,this._api=(u=(s=this)._coordSysMgr,i.extend(new l(s),{getCoordinateSystems:i.bind(u.getCoordinateSystems,u),getComponentByElement:function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return s._model.getComponent(e.mainType,e.index);t=t.parent}}})),o.call(this),this._messageCenter=new D,this._initEvents(),this.resize=i.bind(this.resize,this),this._pendingActions=[],r(et,p),r(J,p),d.animation.on("frame",this._onframe,this),i.setAsPrimitive(this)}D.prototype.on=L("on"),D.prototype.off=L("off"),D.prototype.one=L("one"),i.mixin(D,o);var k=P.prototype;function O(t,e,i){var n,a=this._model,r=this._coordSysMgr.getCoordinateSystems();e=y.parseFinder(a,e);for(var o=0;o=0&&i.each(t,(function(t){var i=t.coordinateSystem;if(i&&i.containPoint)n|=!!i.containPoint(e);else if("seriesModels"===a){var r=this._chartsMap[t.__viewId];r&&r.containPoint&&(n|=r.containPoint(e,t))}}),this)}),this),!!n},k.getVisual=function(t,e){var i=this._model,n=(t=y.parseFinder(i,t,{defaultMainType:"series"})).seriesModel.getData(),a=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?n.indexOfRawIndex(t.dataIndex):null;return null!=a?n.getItemVisual(a,e):n.getVisual(e)},k.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},k.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var z={update:function(t){var e=this._model,i=this._api,r=this._coordSysMgr,o=this._zr;if(e){e.restoreData(),r.create(this._model,this._api),W.call(this,e,i),H.call(this,e),r.update(e,i),Z.call(this,e,t),U.call(this,e,t);var s=e.get("backgroundColor")||"transparent",l=o.painter;if(l.isSingleCanvas&&l.isSingleCanvas())o.configLayer(0,{clearColor:s});else{if(!a.canvasSupported){var h=n.parse(s);s=n.stringify(h,"rgb"),0===h[3]&&(s="transparent")}s.colorStops||s.image?(o.configLayer(0,{clearColor:s}),this.__hasGradientOrPatternBg=!0,this._dom.style.background="transparent"):(this.__hasGradientOrPatternBg&&o.configLayer(0,{clearColor:null}),this.__hasGradientOrPatternBg=!1,this._dom.style.background=s)}M(tt,(function(t){t(e,i)}))}},updateView:function(t){var e=this._model;e&&(e.eachSeries((function(t){t.getData().clearAllVisual()})),Z.call(this,e,t),B.call(this,"updateView",e,t))},updateVisual:function(t){var e=this._model;e&&(e.eachSeries((function(t){t.getData().clearAllVisual()})),Z.call(this,e,t,!0),B.call(this,"updateVisual",e,t))},updateLayout:function(t){var e=this._model;e&&(F.call(this,e,t),B.call(this,"updateLayout",e,t))},prepareAndUpdate:function(t){var e=this._model;G.call(this,"component",e),G.call(this,"chart",e),z.update.call(this,t)}};function E(t,e,i,n,a){var r=t._model;if(n){var o={};o[n+"Id"]=i[n+"Id"],o[n+"Index"]=i[n+"Index"],o[n+"Name"]=i[n+"Name"];var s={mainType:n,query:o};a&&(s.subType=a),r&&r.eachComponent(s,(function(e,i){l(t["series"===n?"_chartsMap":"_componentsMap"][e.__viewId])}),t)}else M(t._componentsViews.concat(t._chartsViews),l);function l(n){n&&n.__alive&&n[e]&&n[e](n.__model,r,t._api,i)}}function R(t,e){var n=t.type,a=t.escapeConnect,r=$[n],o=r.actionInfo,s=(o.update||"update").split(":"),l=s.pop();s=null!=s[0]&&I(s[0]),this[T]=!0;var h=[t],u=!1;t.batch&&(u=!0,h=i.map(t.batch,(function(e){return(e=i.defaults(i.extend({},e),t)).batch=null,e})));var c,d=[],p="highlight"===n||"downplay"===n;M(h,(function(t){(c=(c=r.action(t,this._model,this._api))||i.extend({},t)).type=o.event||c.type,d.push(c),p?E(this,l,t,"series"):s&&E(this,l,t,s.main,s.sub)}),this),"none"===l||p||s||(this.__optionUpdated?(z.prepareAndUpdate.call(this,t),this.__optionUpdated=!1):z[l].call(this,t)),c=u?{type:o.event||n,escapeConnect:a,batch:d}:d[0],this[T]=!1,!e&&this._messageCenter.trigger(c.type,c)}function N(t){for(var e=this._pendingActions;e.length;){var i=e.shift();R.call(this,i,t)}}function V(t){!t&&this.trigger("updated")}function B(t,e,i){var n=this._api;M(this._componentsViews,(function(a){var r=a.__model;a[t](r,e,n,i),Y(r,a)}),this),e.eachSeries((function(a,r){var o=this._chartsMap[a.__viewId];o[t](a,e,n,i),Y(a,o),X(a,o)}),this),q(this._zr,e),M(tt,(function(t){t(e,n)}))}function G(t,e){for(var i="component"===t,n=i?this._componentsViews:this._chartsViews,a=i?this._componentsMap:this._chartsMap,r=this._zr,o=0;oe.get("hoverLayerThreshold")&&!a.node&&i.traverse((function(t){t.isGroup||(t.useHoverLayer=!0)}))}function X(t,e){var i=0;e.group.traverse((function(t){"group"===t.type||t.ignore||i++}));var n=+t.get("progressive"),r=i>t.get("progressiveThreshold")&&n&&!a.node;r&&e.group.traverse((function(t){t.isGroup||(t.progressive=r?Math.floor(i++/n):-1,r&&t.stopAnimation(!0))}));var o=t.get("blendMode")||null;e.group.traverse((function(t){t.isGroup||t.setStyle("blend",o)}))}function Y(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))}))}k._initEvents=function(){M(j,(function(t){this._zr.on(t,(function(e){var n,a=this.getModel(),r=e.target;if("globalout"===t)n={};else if(r&&null!=r.dataIndex){var o=r.dataModel||a.getSeriesByIndex(r.seriesIndex);n=o&&o.getDataParams(r.dataIndex,r.dataType)||{}}else r&&r.eventData&&(n=i.extend({},r.eventData));n&&(n.event=e,n.type=t,this.trigger(t,n))}),this)}),this),M(K,(function(t,e){this._messageCenter.on(e,(function(t){this.trigger(e,t)}),this)}),this)},k.isDisposed=function(){return this._disposed},k.clear=function(){this.setOption({series:[]},!0)},k.dispose=function(){if(!this._disposed){this._disposed=!0;var t=this._api,e=this._model;M(this._componentsViews,(function(i){i.dispose(e,t)})),M(this._chartsViews,(function(i){i.dispose(e,t)})),this._zr.dispose(),delete at[this.id]}},i.mixin(P,o);var $={},K={},J=[],Q=[],tt=[],et=[],it={},nt={},at={},rt={},st=new Date-0,lt=new Date-0,ht="_echarts_instance_",ut={};function ct(t){rt[t]=!1}var dt=ct;function pt(t){var e;return e=t.getAttribute?t.getAttribute(ht):t._echarts_instance_,at[e]}function ft(t){Q.push(t)}function gt(t,e,n){"function"==typeof e&&(n=e,e="");var a=i.isObject(t)?t.type:[t,t={event:e}][0];t.event=(t.event||a).toLowerCase(),e=t.event,i.assert(C.test(a)&&C.test(e)),$[a]||($[a]={action:n,actionInfo:t}),K[e]=a}function mt(t,e){"function"==typeof t&&(e=t,t=3e3),et.push({prio:t,func:e})}function vt(t,e){nt[t]=e}mt(2e3,w),ft(c),vt("default",S),gt({type:"highlight",event:"highlight",update:"highlight"},i.noop),gt({type:"downplay",event:"downplay",update:"downplay"},i.noop);t.version="3.8.5",t.dependencies={zrender:"3.7.4"},t.PRIORITY=A,t.init=function(t,e,n){var a=pt(t);if(a)return a;var r=new P(t,e,n);return r.id="ec_"+st++,at[r.id]=r,t.setAttribute?t.setAttribute(ht,r.id):t._echarts_instance_=r.id,function(t){var e="__connectUpdateStatus";function n(t,i){for(var n=0;n=0?1:-1}function gm(t,e,i){for(var n,a=t.getBaseAxis(),r=t.getOtherAxis(a),o=a.onZero?0:r.scale.getExtent()[0],s=r.dim,l="x"===s||"radius"===s?1:0,h=e.stackedOn,u=e.get(s,i);h&&fm(h.get(s,i))===fm(u);){n=h;break}var c=[];return c[l]=e.get(a.dim,i),c[1-l]=n?n.get(s,i,!0):o,t.dataToPoint(c)}var mm=function(t,e,i,n,a,r){for(var o=function(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}(t,e),s=[],l=[],h=[],u=[],c=[],d=[],p=[],f=r.dimensions,g=0;g=a||d<0)break;if(Cm(f)){if(u){d+=r;continue}break}if(d===i)t[r>0?"moveTo":"lineTo"](f[0],f[1]),Mm(Am,f);else if(l>0){var g=d+r,m=e[g];if(u)for(;m&&Cm(e[g]);)m=e[g+=r];var v=.5,y=e[c];if(!(m=e[g])||Cm(m))Mm(Tm,f);else{var x,_;if(Cm(m)&&!u&&(m=f),xm.sub(Im,m,y),"x"===h||"y"===h){var b="x"===h?0:1;x=Math.abs(f[b]-y[b]),_=Math.abs(f[b]-m[b])}else x=xm.dist(f,y),_=xm.dist(f,m);Sm(Tm,f,Im,-l*(1-(v=_/(_+x))))}bm(Am,Am,s),wm(Am,Am,o),bm(Tm,Tm,s),wm(Tm,Tm,o),t.bezierCurveTo(Am[0],Am[1],Tm[0],Tm[1],f[0],f[1]),Sm(Am,f,Im,l*v)}else t.lineTo(f[0],f[1]);c=d,d+=r}return p}function Dm(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var a=0;an[0]&&(n[0]=r[0]),r[1]>n[1]&&(n[1]=r[1])}return{min:e?i:n,max:e?n:i}}var Pm=ym.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:_m(ym.prototype.brush),buildPath:function(t,e){var i=e.points,n=0,a=i.length,r=Dm(i,e.smoothConstraint);if(e.connectNulls){for(;a>0&&Cm(i[a-1]);a--);for(;n0&&Cm(i[r-1]);r--);for(;ae[0]?1:-1;e[0]+=n*i,e[1]-=n*i}return e}function jm(t){return t>=0?1:-1}function qm(t,e,i){return"polar"===t.type?function(t,e,i){var n=t.getAngleAxis(),a=t.getRadiusAxis().getExtent(),r=n.getExtent(),o=Math.PI/180,s=new Nm.Sector({shape:{cx:t.cx,cy:t.cy,r0:a[0],r:a[1],startAngle:-r[0]*o,endAngle:-r[1]*o,clockwise:n.inverse}});return e&&(s.shape.endAngle=-r[0]*o,Nm.initProps(s,{shape:{endAngle:-r[1]*o}},i)),s}(t,e,i):function(t,e,i){var n=Um(t.getAxis("x")),a=Um(t.getAxis("y")),r=t.getBaseAxis().isHorizontal(),o=Math.min(n[0],n[1]),s=Math.min(a[0],a[1]),l=Math.max(n[0],n[1])-o,h=Math.max(a[0],a[1])-s,u=i.get("lineStyle.normal.width")||2,c=i.get("clipOverflow")?u/2:Math.max(l,h);r?(s-=c,h+=2*c):(o-=c,l+=2*c);var d=new Nm.Rect({shape:{x:o,y:s,width:l,height:h}});return e&&(d.shape[r?"width":"height"]=0,Nm.initProps(d,{shape:{width:l,height:h}},i)),d}(t,e,i)}function Xm(t,e,i){for(var n=e.getBaseAxis(),a="x"===n.dim||"radius"===n.dim?0:1,r=[],o=0;o0?a=r[0]:r[1]<0&&(a=r[1])}var o=n.dim,s="x"===o||"radius"===o?1:0;return e.mapArray([o],(function(n,r){for(var l,h=e.stackedOn;h&&jm(h.get(o,r))===jm(n);){l=h;break}var u=[];return u[s]=e.get(i.dim,r),u[1-s]=l?l.get(o,r,!0):a,t.dataToPoint(u)}),!0)}(n,r),y=t.get("showSymbol"),x=y&&!h&&!t.get("showAllSymbol")&&this._getSymbolIgnoreFunc(r,n),_=this._data;_&&_.eachItemGraphicEl((function(t,e){t.__temp&&(a.remove(t),_.setItemGraphicEl(e,null))})),y||c.remove(),a.add(f);var b=!h&&t.get("step");d&&u.type===n.type&&b===this._step?(m&&!p?p=this._newPolygon(l,v,n,g):p&&!m&&(f.remove(p),p=this._polygon=null),f.setClipPath(qm(n,!1,t)),y&&c.updateData(r,x),r.eachItemGraphicEl((function(t){t.stopAnimation(!0)})),Fm(this._stackedOnPoints,v)&&Fm(this._points,l)||(g?this._updateAnimation(r,v,n,i,b):(b&&(l=Xm(l,n,b),v=Xm(v,n,b)),d.setShape({points:l}),p&&p.setShape({points:l,stackedOnPoints:v})))):(y&&c.updateData(r,x),b&&(l=Xm(l,n,b),v=Xm(v,n,b)),d=this._newPolyline(l,n,g),m&&(p=this._newPolygon(l,v,n,g)),f.setClipPath(qm(n,!0,t)));var w=function(t,e){var i=t.getVisual("visualMeta");if(i&&i.length&&t.count()){for(var n,a=i.length-1;a>=0;a--)if(i[a].dimension<2){n=i[a];break}if(n&&"cartesian2d"===e.type){var r=n.dimension,o=t.dimensions[r],s=e.getAxis(o),l=Om.map(n.stops,(function(t){return{coord:s.toGlobalCoord(s.dataToCoord(t.value)),color:t.color}})),h=l.length,u=n.outerColors.slice();h&&l[0].coord>l[h-1].coord&&(l.reverse(),u.reverse());var c=l[0].coord-10,d=l[h-1].coord+10,p=d-c;if(p<.001)return"transparent";Om.each(l,(function(t){t.offset=(t.coord-c)/p})),l.push({offset:h?l[h-1].offset:.5,color:u[1]||"transparent"}),l.unshift({offset:h?l[0].offset:.5,color:u[0]||"transparent"});var f=new Nm.LinearGradient(0,0,0,0,l,!0);return f[o]=c,f[o+"2"]=d,f}}}(r,n)||r.getVisual("color");d.useStyle(Om.defaults(o.getLineStyle(),{fill:"none",stroke:w,lineJoin:"bevel"}));var S=t.get("smooth");if(S=Zm(t.get("smooth")),d.setShape({smooth:S,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),p){var M=r.stackedOn,I=0;if(p.useStyle(Om.defaults(s.getAreaStyle(),{fill:w,opacity:.7,lineJoin:"bevel"})),M)I=Zm(M.hostModel.get("smooth"));p.setShape({smooth:S,stackedOnSmooth:I,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=r,this._coordSys=n,this._stackedOnPoints=v,this._points=l,this._step=b},dispose:function(){},highlight:function(t,e,i,n){var a=t.getData(),r=Vm.queryDataIndex(a,n);if(!(r instanceof Array)&&null!=r&&r>=0){var o=a.getItemGraphicEl(r);if(!o){var s=a.getItemLayout(r);if(!s)return;(o=new Em(a,r)).position=s,o.setZ(t.get("zlevel"),t.get("z")),o.ignore=isNaN(s[0])||isNaN(s[1]),o.__temp=!0,a.setItemGraphicEl(r,o),o.stopSymbolAnimation(!0),this.group.add(o)}o.highlight()}else Hm.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var a=t.getData(),r=Vm.queryDataIndex(a,n);if(null!=r&&r>=0){var o=a.getItemGraphicEl(r);o&&(o.__temp?(a.setItemGraphicEl(r,null),this.group.remove(o)):o.downplay())}else Hm.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Gm({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 Wm({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 Om.bind(i.isLabelIgnored,i)},_updateAnimation:function(t,e,i,n,a){var r=this._polyline,o=this._polygon,s=t.hostModel,l=Rm(this._data,t,this._stackedOnPoints,e,this._coordSys,i),h=l.current,u=l.stackedOnCurrent,c=l.next,d=l.stackedOnNext;a&&(h=Xm(l.current,i,a),u=Xm(l.stackedOnCurrent,i,a),c=Xm(l.next,i,a),d=Xm(l.stackedOnNext,i,a)),r.shape.__points=l.current,r.shape.points=h,Nm.updateProps(r,{shape:{points:c}},s),o&&(o.setShape({points:h,stackedOnPoints:u}),Nm.updateProps(o,{shape:{points:c,stackedOnPoints:d}},s));for(var p=[],f=l.status,g=0;ge&&(e=t[i]);return e},min:function(t){for(var e=1/0,i=0;i1)"string"==typeof i?a=Km[i]:"function"==typeof i&&(a=i),a&&(e=e.downSample(o.dim,1/h,a,Jm),t.setData(e))}}),this)},tv=b;function ev(t){return this._axes[t]}var iv=function(t){this._axes={},this._dimList=[],this.name=t||""};iv.prototype={constructor:iv,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return tv.map(this._dimList,ev,this)},getAxesByScale:function(t){return t=t.toLowerCase(),tv.filter(this.getAxes(),(function(e){return e.scale.type===t}))},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var i=this._dimList,n=t instanceof Array?[]:{},a=0;ae[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},sv.inherits(hv,lv);var uv=hv,cv=b,dv={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)"]}}},pv={};pv.categoryAxis=cv.merge({boundaryGap:!0,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},dv),pv.valueAxis=cv.merge({boundaryGap:[0,0],splitNumber:5},dv),pv.timeAxis=cv.defaults({scale:!0,min:"dataMin",max:"dataMax"},pv.valueAxis),pv.logAxis=cv.defaults({scale:!0,logBase:10},pv.valueAxis);var fv=pv,gv=b,mv=fv,vv=Zu,yv=wu,xv=yv.getLayoutParams,_v=yv.mergeLayoutParam,bv=["value","category","time","log"];var wv=function(t,e,i,n){gv.each(bv,(function(a){e.extend({type:t+"Axis."+a,mergeDefaultAndTheme:function(e,n){var r=this.layoutMode,o=r?xv(e):{},s=n.getTheme();gv.merge(e,s.get(a+"Axis")),gv.merge(e,this.getDefaultOption()),e.type=i(t,e),r&&_v(e,o,r)},defaultOption:gv.mergeAll([{},mv[a+"Axis"],n],!0)})})),vv.registerSubTypeDefaulter(t+"Axis",gv.curry(i,t))},Sv=b,Mv=wv,Iv=Wf,Av=Zu.extend({type:"cartesian2dAxis",axis:null,init:function(){Av.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Av.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Av.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function Tv(t,e){return e.type||(e.data?"category":"value")}Sv.merge(Av.prototype,Iv);var Cv={offset:0};Mv("x",Av,Tv,Cv),Mv("y",Av,Tv,Cv),Zu.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 Lv=b,Dv=Je,Pv=wu.getLayoutRect,kv=Rp,Ov=ov,zv=uv,Ev=_c,Rv=Lv.each,Nv=kv.ifAxisCrossZero,Vv=kv.niceScaleExtent;function Bv(t,e,i){return t.getCoordSysModel()===e}function Gv(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}var Wv=Gv.prototype;function Hv(t,e,i){var n=t[e];if(i.onZero){var a=i.onZeroAxisIndex;if(null==a){for(var r in n){if(n.hasOwnProperty(r))if((o=n[r])&&!Fv(o)){a=+r;break}}null==a&&(i.onZero=!1),i.onZeroAxisIndex=a}else{var o;(o=n[a])&&Fv(o)&&(i.onZero=!1)}}}function Fv(t){return"category"===t.type||"time"===t.type||!Nv(t)}Wv.type="grid",Wv.axisPointerEnabled=!0,Wv.getRect=function(){return this._rect},Wv.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),Rv(i.x,(function(t){Vv(t.scale,t.model)})),Rv(i.y,(function(t){Vv(t.scale,t.model)})),Rv(i.x,(function(t){Hv(i,"y",t)})),Rv(i.y,(function(t){Hv(i,"x",t)})),this.resize(this.model,e)},Wv.resize=function(t,e,i){var n=Pv(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=n;var a=this._axesList;function r(){Rv(a,(function(t){var e=t.isHorizontal(),i=e?[0,n.width]:[0,n.height],a=t.inverse?1:0;t.setExtent(i[a],i[1-a]),function(t,e){var i=t.getExtent(),n=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}(t,e?n.x:n.y)}))}r(),!i&&t.get("containLabel")&&(Rv(a,(function(t){if(!t.model.get("axisLabel.inside")){var e=function(t){var e,i,n,a,r,o,s,l,h=t.model,u=h.getFormattedLabels(),c=h.getModel("axisLabel"),d=1,p=u.length;p>40&&(d=Math.ceil(p/40));for(var f=0;fh[1]?-1:1,c=["start"===r?h[0]-u*l:"end"===r?h[1]+u*l:(h[0]+h[1])/2,gy(r)?t.labelOffset+o*l:0],d=e.get("nameRotate");null!=d&&(d=d*sy/180),gy(r)?n=cy(t.rotation,null!=d?d:t.rotation,o):(n=function(t,e,i,n){var a,r,o=ny(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;iy(o-sy/2)?(r=l?"bottom":"top",a="center"):iy(o-1.5*sy)?(r=l?"top":"bottom",a="center"):(r="middle",a=o<1.5*sy&&o>sy/2?l?"left":"right":l?"right":"left");return{rotation:o,textAlign:a,textVerticalAlign:r}}(t,r,d||0,h),null!=(a=t.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(n.rotation)),!isFinite(a)&&(a=null)));var p=s.getFont(),f=e.get("nameTruncate",!0)||{},g=f.ellipsis,m=Xv(t.nameTruncateMaxWidth,f.maxWidth,a),v=null!=g&&null!=m?Jv.truncateText(i,m,p,g,{minChar:2,placeholder:f.placeholder}):i,y=e.get("tooltip",!0),x=e.mainType,_={componentType:x,name:i,$vars:["name"]};_[x+"Index"]=e.componentIndex;var b=new Qv.Text({anid:"name",__fullText:i,__truncatedText:v,position:c,rotation:n.rotation,silent:dy(e),z2:1,tooltip:y&&y.show?$v({content:i,formatter:function(){return i},formatterParams:_},y):null});Qv.setTextStyle(b.style,s,{text:v,textFont:p,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:n.textAlign,textVerticalAlign:n.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=ly(e),b.eventData.targetType="axisName",b.eventData.name=i),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},cy=hy.innerTextLayout=function(t,e,i){var n,a,r=ny(e-t);return iy(r)?(a=i>0?"top":"bottom",n="center"):iy(r-sy)?(a=i>0?"bottom":"top",n="center"):(a="middle",n=r>0&&r0?"right":"left":i>0?"left":"right"),{rotation:r,textAlign:n,textVerticalAlign:a}};function dy(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function py(t){t&&(t.ignore=!0)}function fy(t,e,i){var n=t&&t.getBoundingRect().clone(),a=e&&e.getBoundingRect().clone();if(n&&a){var r=ry.identity([]);return ry.rotate(r,r,-t.rotation),n.applyTransform(ry.mul([],r,t.getLocalTransform())),a.applyTransform(ry.mul([],r,e.getLocalTransform())),n.intersect(a)}}function gy(t){return"middle"===t||"center"===t}var my=hy.ifIgnoreOnTick=function(t,e,i,n,a,r){if(0===e&&a||e===n-1&&r)return!1;var o,s=t.scale;return"ordinal"===s.type&&("function"==typeof i?!i(o=s.getTicks()[e],s.getLabel(o)):e%(i+1))},vy=hy.getInterval=function(t,e){var i=t.get("interval");return null!=i&&"auto"!=i||(i=e),i};var yy=hy,xy={},_y=b,by=ru,wy=_y.each,Sy=_y.curry;function My(t,e){return"all"===t||_y.isArray(t)&&_y.indexOf(t,e)>=0||t===e}function Iy(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[Ty(t)]}function Ay(t){return!!t.get("handle.show")}function Ty(t){return t.type+"||"+t.id}xy.collect=function(t,e){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(t,e,i){var n=e.getComponent("tooltip"),a=e.getComponent("axisPointer"),r=a.get("link",!0)||[],o=[];wy(i.getCoordinateSystems(),(function(i){if(i.axisPointerEnabled){var s=Ty(i.model),l=t.coordSysAxesInfo[s]={};t.coordSysMap[s]=i;var h=i.model.getModel("tooltip",n);if(wy(i.getAxes(),Sy(p,!1,null)),i.getTooltipAxes&&n&&h.get("show")){var u="axis"===h.get("trigger"),c="cross"===h.get("axisPointer.type"),d=i.getTooltipAxes(h.get("axisPointer.axis"));(u||c)&&wy(d.baseAxes,Sy(p,!c||"cross",u)),c&&wy(d.otherAxes,Sy(p,"cross",!1))}}function p(n,s,u){var c=u.model.getModel("axisPointer",a),d=c.get("show");if(d&&("auto"!==d||n||Ay(c))){null==s&&(s=c.get("triggerTooltip")),c=n?function(t,e,i,n,a,r){var o=e.getModel("axisPointer"),s={};wy(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(t){s[t]=_y.clone(o.get(t))})),s.snap="category"!==t.type&&!!r,"cross"===o.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===a&&(l.show=!0,!r)){var h=s.lineStyle=o.get("crossStyle");h&&_y.defaults(l,h.textStyle)}return t.model.getModel("axisPointer",new by(s,i,n))}(u,h,a,e,n,s):c;var p=c.get("snap"),f=Ty(u.model),g=s||p||"category"===u.type,m=t.axesInfo[f]={key:f,axis:u,coordSys:i,axisPointerModel:c,triggerTooltip:s,involveSeries:g,snap:p,useHandle:Ay(c),seriesModels:[]};l[f]=m,t.seriesInvolved|=g;var v=function(t,e){for(var i=e.model,n=e.dim,a=0;al[1]&&l.reverse(),(null==o||o>l[1])&&(o=l[1]),o=0?"p":"n",v=g[i],y=r[s][i][m],x=o[s][i][m];c.isHorizontal()?(n=y,a=v[1]+h,l=v[0]-x,f=u,o[s][i][m]+=l,Math.abs(l)0?1:-1,o=n.height>0?1:-1;return{x:n.x+r*a/2,y:n.y+o*a/2,width:n.width-r*a,height:n.height-o*a}},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}}};function Ix(t,e,i,n,a,r,o,s){var l=e.getItemVisual(i,"color"),h=e.getItemVisual(i,"opacity"),u=n.getModel("itemStyle.normal"),c=n.getModel("itemStyle.emphasis").getBarItemStyle();s||t.setShape("r",u.get("barBorderRadius")||0),t.useStyle(gx.defaults({fill:l,opacity:h},u.getBarItemStyle()));var d=n.getShallow("cursor");d&&t.attr("cursor",d);var p=o?a.height>0?"bottom":"top":a.width>0?"left":"right";s||vx(t.style,c,n,l,r,i,p),mx.setHoverStyle(t,c)}var Ax=m,Tx=b,Cx=ox;Ax.registerLayout(Tx.curry(Cx,"bar")),Ax.registerVisual((function(t){t.eachSeriesByType("bar",(function(t){t.getData().setVisual("legendSymbol","roundRect")}))}));var Lx=b,Dx={updateSelectedMap:function(t){this._targetList=t.slice(),this._selectTargetMap=Lx.reduce(t||[],(function(t,e){return t.set(e.name,e),t}),Lx.createHashMap())},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}},Px=m,kx=dp,Ox=b,zx=ur,Ex=dr.getPercentWithPrecision,Rx=wp,Nx=Dx,Vx=Px.extendSeriesModel({type:"series.pie",init:function(t){Vx.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this.updateSelectedMap(t.data),this._defaultLabelLine(t)},mergeOption:function(t){Vx.superCall(this,"mergeOption",t),this.updateSelectedMap(this.option.data)},getInitialData:function(t,e){var i=Rx(["value"],t.data),n=new kx(i,this);return n.initData(t.data),n},getDataParams:function(t){var e=this.getData(),i=Vx.superCall(this,"getDataParams",t),n=[];return e.each("value",(function(t){n.push(t)})),i.percent=Ex(n,t,e.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(t){zx.defaultEmphasis(t.labelLine,["show"]);var e=t.labelLine.normal,i=t.labelLine.emphasis;e.show=e.show&&t.label.normal.show,i.show=i.show&&t.label.emphasis.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,label:{normal:{rotate:!1,show:!0,position:"outer"},emphasis:{}},labelLine:{normal:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}}},itemStyle:{normal:{borderWidth:1},emphasis:{}},animationType:"expansion",animationEasing:"cubicOut",data:[]}});Ox.mixin(Vx,Nx);var Bx=b,Gx=Vr,Wx=zd;function Hx(t,e,i,n){var a=e.getData(),r=this.dataIndex,o=a.getName(r),s=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:o,seriesId:e.id}),a.each((function(t){Fx(a.getItemGraphicEl(t),a.getItemLayout(t),e.isSelected(a.getName(t)),s,i)}))}function Fx(t,e,i,n,a){var r=(e.startAngle+e.endAngle)/2,o=i?n:0,s=[Math.cos(r)*o,Math.sin(r)*o];a?t.animate().when(200,{position:s}).start("bounceOut"):t.attr("position",s)}function Zx(t,e){Gx.Group.call(this);var i=new Gx.Sector({z2:2}),n=new Gx.Polyline,a=new Gx.Text;function r(){n.ignore=n.hoverIgnore,a.ignore=a.hoverIgnore}function o(){n.ignore=n.normalIgnore,a.ignore=a.normalIgnore}this.add(i),this.add(n),this.add(a),this.updateData(t,e,!0),this.on("emphasis",r).on("normal",o).on("mouseover",r).on("mouseout",o)}var Ux=Zx.prototype;Ux.updateData=function(t,e,i){var n=this.childAt(0),a=t.hostModel,r=t.getItemModel(e),o=t.getItemLayout(e),s=Bx.extend({},o);(s.label=null,i)?(n.setShape(s),"scale"===a.getShallow("animationType")?(n.shape.r=o.r0,Gx.initProps(n,{shape:{r:o.r}},a,e)):(n.shape.endAngle=o.startAngle,Gx.updateProps(n,{shape:{endAngle:o.endAngle}},a,e))):Gx.updateProps(n,{shape:s},a,e);var l=r.getModel("itemStyle"),h=t.getItemVisual(e,"color");n.useStyle(Bx.defaults({lineJoin:"bevel",fill:h},l.getModel("normal").getItemStyle())),n.hoverStyle=l.getModel("emphasis").getItemStyle();var u=r.getShallow("cursor");function c(){n.stopAnimation(!0),n.animateTo({shape:{r:o.r+a.get("hoverOffset")}},300,"elasticOut")}function d(){n.stopAnimation(!0),n.animateTo({shape:{r:o.r}},300,"elasticOut")}u&&n.attr("cursor",u),Fx(this,t.getItemLayout(e),r.get("selected"),a.get("selectedOffset"),a.get("animation")),n.off("mouseover").off("mouseout").off("emphasis").off("normal"),r.get("hoverAnimation")&&a.isAnimationEnabled()&&n.on("mouseover",c).on("mouseout",d).on("emphasis",c).on("normal",d),this._updateLabel(t,e),Gx.setHoverStyle(this)},Ux._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),a=t.hostModel,r=t.getItemModel(e),o=t.getItemLayout(e).label,s=t.getItemVisual(e,"color");Gx.updateProps(i,{shape:{points:o.linePoints||[[o.x,o.y],[o.x,o.y],[o.x,o.y]]}},a,e),Gx.updateProps(n,{style:{x:o.x,y:o.y}},a,e),n.attr({rotation:o.rotation,origin:[o.x,o.y],z2:10});var l=r.getModel("label.normal"),h=r.getModel("label.emphasis"),u=r.getModel("labelLine.normal"),c=r.getModel("labelLine.emphasis");s=t.getItemVisual(e,"color");Gx.setLabelStyle(n.style,n.hoverStyle={},l,h,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:s,useInsideStyle:!!o.inside},{textAlign:o.textAlign,textVerticalAlign:o.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),n.ignore=n.normalIgnore=!l.get("show"),n.hoverIgnore=!h.get("show"),i.ignore=i.normalIgnore=!u.get("show"),i.hoverIgnore=!c.get("show"),i.setStyle({stroke:s,opacity:t.getItemVisual(e,"opacity")}),i.setStyle(u.getModel("lineStyle").getLineStyle()),i.hoverStyle=c.getModel("lineStyle").getLineStyle();var d=u.get("smooth");d&&!0===d&&(d=.4),i.setShape({smooth:d})},Bx.inherits(Zx,Gx.Group),Wx.extend({type:"pie",init:function(){var t=new Gx.Group;this._sectorGroup=t},render:function(t,e,i,n){if(!n||n.from!==this.uid){var a=t.getData(),r=this._data,o=this.group,s=e.get("animation"),l=!r,h=t.get("animationType"),u=Bx.curry(Hx,this.uid,t,s,i),c=t.get("selectedMode");if(a.diff(r).add((function(t){var e=new Zx(a,t);l&&"scale"!==h&&e.eachChild((function(t){t.stopAnimation(!0)})),c&&e.on("click",u),a.setItemGraphicEl(t,e),o.add(e)})).update((function(t,e){var i=r.getItemGraphicEl(e);i.updateData(a,t),i.off("click"),c&&i.on("click",u),o.add(i),a.setItemGraphicEl(t,i)})).remove((function(t){var e=r.getItemGraphicEl(t);o.remove(e)})).execute(),s&&l&&a.count()>0&&"scale"!==h){var d=a.getItemLayout(0),p=Math.max(i.getWidth(),i.getHeight())/2,f=Bx.bind(o.removeClipPath,o);o.setClipPath(this._createClipPath(d.cx,d.cy,p,d.startAngle,d.clockwise,f,t))}this._data=a}},dispose:function(){},_createClipPath:function(t,e,i,n,a,r,o){var s=new Gx.Sector({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:a}});return Gx.initProps(s,{shape:{endAngle:n+(a?1:-1)*Math.PI*2}},o,r),s},containPoint:function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,a=t[1]-i.cy,r=Math.sqrt(n*n+a*a);return r<=i.r&&r>=i.r0}}});var jx=m,qx=b;var Xx=function(t,e){qx.each(e,(function(e){e.update="updateView",jx.registerAction(e,(function(i,n){var a={};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);a[i]=t.isSelected(i)||!1}))})),{name:i.name,selected:a}}))}))};var Yx=function(t,e){var i={};e.eachRawSeriesByType(t,(function(t){var n=t.getRawData(),a={};if(!e.isSeriesFiltered(t)){var r=t.getData();r.each((function(t){var e=r.getRawIndex(t);a[e]=t})),n.each((function(e){var o=a[e],s=null!=o&&r.getItemVisual(o,"color",!0);if(s)n.setItemVisual(e,"color",s);else{var l=n.getItemModel(e).get("itemStyle.normal.color")||t.getColorFromPalette(n.getName(e),i);n.setItemVisual(e,"color",l),null!=o&&r.setItemVisual(o,"color",l)}}))}}))},$x=Ni;function Kx(t,e,i,n,a,r,o){function s(e,i,n,a){for(var r=e;re&&r+1t[r].y+t[r].height)return void l(r,n/2);l(i-1,n/2)}function l(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 h(t,e,i,n,a,r){for(var o=e?Number.MAX_VALUE:0,s=0,l=t.length;s=o&&(d=o-10),!e&&d<=o&&(d=o+10),t[s].x=i+d*r,o=d}}t.sort((function(t,e){return t.y-e.y}));for(var u,c=0,d=t.length,p=[],f=[],g=0;g=i?f.push(t[g]):p.push(t[g]);h(p,!1,e,i,n,a),h(f,!0,e,i,n,a)}var Jx=function(t,e,i,n){var a,r,o=t.getData(),s=[],l=!1;o.each((function(i){var n,h,u,c,d=o.getItemLayout(i),p=o.getItemModel(i),f=p.getModel("label.normal"),g=f.get("position")||p.get("label.emphasis.position"),m=p.getModel("labelLine.normal"),v=m.get("length"),y=m.get("length2"),x=(d.startAngle+d.endAngle)/2,_=Math.cos(x),b=Math.sin(x);a=d.cx,r=d.cy;var w="inside"===g||"inner"===g;if("center"===g)n=d.cx,h=d.cy,c="center";else{var S=(w?(d.r+d.r0)/2*_:d.r*_)+a,M=(w?(d.r+d.r0)/2*b:d.r*b)+r;if(n=S+3*_,h=M+3*b,!w){var I=S+_*(v+e-d.r),A=M+b*(v+e-d.r),T=I+(_<0?-1:1)*y;n=T+(_<0?-5:5),h=A,u=[[S,M],[I,A],[T,A]]}c=w?"center":_>0?"left":"right"}var C=f.getFont(),L=f.get("rotate")?_<0?-x+Math.PI:-x:0,D=t.getFormattedLabel(i,"normal")||o.getName(i),P=$x.getBoundingRect(D,C,c,"top");l=!!L,d.label={x:n,y:h,position:g,height:P.height,len:v,len2:y,linePoints:u,textAlign:c,verticalAlign:"middle",rotation:L,inside:w},w||s.push(d.label)})),!l&&t.get("avoidLabelOverlap")&&function(t,e,i,n,a,r){for(var o=[],s=[],l=0;l=0;r--){var o=n[r],s=a[r],l=o[0]-s[0]/2,h=o[1]-s[1]/2;if(t>=l&&e>=h&&t<=l+s[0]&&e<=h+s[1])return r}return-1}});function m_(){this.group=new p_.Group,this._symbolEl=new g_({})}var v_=m_.prototype;v_.updateData=function(t){this.group.removeAll();var e=this._symbolEl,i=t.hostModel;e.setShape({points:t.mapArray(t.getItemLayout),sizes:t.mapArray((function(e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array||(i=[i,i]),i}))}),e.symbolProxy=f_(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor,e.useStyle(i.getModel("itemStyle.normal").getItemStyle(["color"]));var n=t.getVisual("color");n&&e.setColor(n),e.seriesIndex=i.seriesIndex,e.on("mousemove",(function(t){e.dataIndex=null;var i=e.findDataIndex(t.offsetX,t.offsetY);i>=0&&(e.dataIndex=i)})),this.group.add(e)},v_.updateLayout=function(t){var e=t.getData();this._symbolEl.setShape({points:e.mapArray(e.getItemLayout)})},v_.remove=function(){this.group.removeAll()};var y_=pm,x_=m_;m.extendChartView({type:"scatter",init:function(){this._normalSymbolDraw=new y_,this._largeSymbolDraw=new x_},render:function(t,e,i){var n=t.getData(),a=this._largeSymbolDraw,r=this._normalSymbolDraw,o=this.group,s=t.get("large")&&n.count()>t.get("largeThreshold")?a:r;this._symbolDraw=s,s.updateData(n),o.add(s.group),o.remove(s===a?r.group:a.group)},updateLayout:function(t){this._symbolDraw.updateLayout(t)},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e,!0)},dispose:function(){}});var __=m,b_=b,w_=Ym,S_=$m;__.registerVisual(b_.curry(w_,"scatter","circle",null)),__.registerLayout(b_.curry(S_,"scatter"));var M_=gg;function I_(t,e,i){M_.call(this,t,e,i),this.type="value",this.angle=0,this.name="",this.model}b.inherits(I_,M_);var A_=b,T_=I_,C_=af,L_=dr,D_=Rp,P_=D_.getScaleExtent,k_=D_.niceScaleExtent,O_=_c;function z_(t,e,i){this._model=t,this.dimensions=[],this._indicatorAxes=A_.map(t.getIndicatorModels(),(function(t,e){var i="indicator_"+e,n=new T_(i,new C_);return n.name=t.get("name"),n.model=t,t.axis=n,this.dimensions.push(i),n}),this),this.resize(t,i),this.cx,this.cy,this.r,this.startAngle}z_.prototype.getIndicatorAxes=function(){return this._indicatorAxes},z_.prototype.dataToPoint=function(t,e){var i=this._indicatorAxes[e];return this.coordToPoint(i.dataToCoord(t),e)},z_.prototype.coordToPoint=function(t,e){var i=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(i),this.cy-t*Math.sin(i)]},z_.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 a,r=Math.atan2(-i,e),o=1/0,s=-1,l=0;li[0]&&isFinite(c)&&isFinite(i[0]))}else{o.getTicks().length-1>a&&(h=r(h));var d=Math.round((i[0]+i[1])/2/h)*h,p=Math.round(a/2);o.setExtent(L_.round(d-p*h),L_.round(d+(a-p)*h)),o.setInterval(h)}}))},z_.dimensions=[],z_.create=function(t,e){var i=[];return t.eachComponent("radar",(function(n){var a=new z_(n,t,e);i.push(a),n.coordinateSystem=a})),t.eachSeriesByType("radar",(function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])})),i},O_.register("radar",z_);var E_=m,R_=b,N_=ru,V_=Wf,B_=fv.valueAxis;function G_(t,e){return R_.defaults({show:e},t)}E_.extendComponentModel({type:"radar",optionUpdated:function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),i=this.get("scale"),n=this.get("axisLine"),a=this.get("axisTick"),r=this.get("axisLabel"),o=this.get("name"),s=this.get("name.show"),l=this.get("name.formatter"),h=this.get("nameGap"),u=this.get("triggerEvent"),c=R_.map(this.get("indicator")||[],(function(c){null!=c.max&&c.max>0&&!c.min?c.min=0:null!=c.min&&c.min<0&&!c.max&&(c.max=0);var d=o;if(null!=c.color&&(d=R_.defaults({color:c.color},o)),c=R_.merge(R_.clone(c),{boundaryGap:t,splitNumber:e,scale:i,axisLine:n,axisTick:a,axisLabel:r,name:c.text,nameLocation:"end",nameGap:h,nameTextStyle:d,triggerEvent:u},!1),s||(c.name=""),"string"==typeof l){var p=c.name;c.name=l.replace("{value}",null!=p?p:"")}else"function"==typeof l&&(c.name=l(c.name,c));var f=R_.extend(new N_(c,null,this.ecModel),V_);return f.mainType="radar",f.componentIndex=this.componentIndex,f}),this);this.getIndicatorModels=function(){return c}},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:R_.merge({lineStyle:{color:"#bbb"}},B_.axisLine),axisLabel:G_(B_.axisLabel,!1),axisTick:G_(B_.axisTick,!1),splitLine:G_(B_.splitLine,!0),splitArea:G_(B_.splitArea,!0),indicator:[]}});var W_=b,H_=yy,F_=Vr,Z_=["axisLine","axisTickLabel","axisName"];m.extendComponentView({type:"radar",render:function(t,e,i){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem,i=e.getIndicatorAxes(),n=W_.map(i,(function(t){return new H_(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}));W_.each(n,(function(t){W_.each(Z_,t.add,t),this.group.add(t.getGroup())}),this)},_buildSplitLineAndArea:function(t){var e=t.coordinateSystem,i=e.getIndicatorAxes();if(i.length){var n=t.get("shape"),a=t.getModel("splitLine"),r=t.getModel("splitArea"),o=a.getModel("lineStyle"),s=r.getModel("areaStyle"),l=a.get("show"),h=r.get("show"),u=o.get("color"),c=s.get("color");u=W_.isArray(u)?u:[u],c=W_.isArray(c)?c:[c];var d=[],p=[];if("circle"===n)for(var f=i[0].getTicksCoords(),g=e.cx,m=e.cy,v=0;v"+X_.map(i,(function(t,i){return Y_(t.name+" : "+e[i])})).join("
")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{normal:{width:2,type:"solid"}},label:{normal:{position:"top"}},symbol:"emptyCircle",symbolSize:4}}),K_=Vr,J_=b,Q_=Hf;m.extendChartView({type:"radar",render:function(t,e,i){var n=t.coordinateSystem,a=this.group,r=t.getData(),o=this._data;function s(t,e){var i=t.getItemVisual(e,"symbol")||"circle",n=t.getItemVisual(e,"color");if("none"!==i){var a=function(t){return J_.isArray(t)||(t=[+t,+t]),t}(t.getItemVisual(e,"symbolSize")),r=Q_.createSymbol(i,-1,-1,2,2,n);return r.attr({style:{strokeNoScale:!0},z2:100,scale:[a[0]/2,a[1]/2]}),r}}function l(e,i,n,a,r,o){n.removeAll();for(var l=0;l1?(f.width=l,f.height=l/d):(f.height=l,f.width=l*d),f.y=s[1]-f.height/2,f.x=s[0]-f.width/2}else(r=t.getBoxLayoutParams()).aspect=d,f=Wb.getLayoutRect(r,{width:h,height:u});this.setViewRect(f.x,f.y,f.width,f.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function Zb(t,e){Bb.each(e.get("geoCoord"),(function(e,i){t.addGeoCoord(i,e)}))}var Ub={dimensions:Gb.prototype.dimensions,create:function(t,e){var i=[];t.eachComponent("geo",(function(t,n){var a=t.get("map"),r=Vb.getMap(a),o=new Gb(a+n,a,r&&r.geoJson,r&&r.specialAreas,t.get("nameMap"));o.zoomLimit=t.get("scaleLimit"),i.push(o),Zb(o,t),t.coordinateSystem=o,o.model=t,o.resize=Fb,o.resize(t,e)})),t.eachSeries((function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=i[e]}}));var n={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();n[e]=n[e]||[],n[e].push(t)}})),Bb.each(n,(function(t,n){var a=Vb.getMap(n),r=Bb.map(t,(function(t){return t.get("nameMap")})),o=new Gb(n,n,a&&a.geoJson,a&&a.specialAreas,Bb.mergeAll(r));o.zoomLimit=Bb.retrieve.apply(null,Bb.map(t,(function(t){return t.get("scaleLimit")}))),i.push(o),o.resize=Fb,o.resize(t[0],e),Bb.each(t,(function(t){t.coordinateSystem=o,Zb(o,t)}))})),i},getFilledRegions:function(t,e,i){var n=(t||[]).slice();i=i||{};var a=Vb.getMap(e),r=a&&a.geoJson;if(!r)return t;for(var o=Bb.createHashMap(),s=r.features,l=0;l"+Jb(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:{normal:{show:!1,color:"#000"},emphasis:{show:!0,color:"rgb(100,0,0)"}},itemStyle:{normal:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{areaColor:"rgba(255,215,0,0.8)"}}}});qb.mixin(iw,tw);var nw={},aw="\0_ec_interaction_mutex";function rw(t){return t[aw]||(t[aw]={})}m.registerAction({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},(function(){})),nw.take=function(t,e,i){rw(t)[e]=i},nw.release=function(t,e,i){var n=rw(t);n[e]===i&&(n[e]=null)},nw.isTaken=function(t,e){return!!rw(t)[e]};var ow=b,sw=ot,lw=fa,hw=nw;function uw(t){this.pointerChecker,this._zr=t,this._opt={};var e=ow.bind,i=e(cw,this),n=e(dw,this),a=e(pw,this),r=e(fw,this),o=e(gw,this);sw.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(e,s){this.disable(),this._opt=ow.defaults(ow.clone(s)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",i),t.on("mousemove",n),t.on("mouseup",a)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",r),t.on("pinch",o))},this.disable=function(){t.off("mousedown",i),t.off("mousemove",n),t.off("mouseup",a),t.off("mousewheel",r),t.off("pinch",o)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function cw(t){if(!(lw.notLeftMouse(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 dw(t){if(!lw.notLeftMouse(t)&&vw(this,"moveOnMouseMove",t)&&this._dragging&&"pinch"!==t.gestureEvent&&!hw.isTaken(this._zr,"globalPan")){var e=t.offsetX,i=t.offsetY,n=this._x,a=this._y,r=e-n,o=i-a;this._x=e,this._y=i,this._opt.preventDefaultMouseMove&&lw.stop(t.event),this.trigger("pan",r,o,n,a,e,i)}}function pw(t){lw.notLeftMouse(t)||(this._dragging=!1)}function fw(t){if(vw(this,"zoomOnMouseWheel",t)&&0!==t.wheelDelta){var e=t.wheelDelta>0?1.1:1/1.1;mw.call(this,t,e,t.offsetX,t.offsetY)}}function gw(t){if(!hw.isTaken(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;mw.call(this,t,e,t.pinchX,t.pinchY)}}function mw(t,e,i,n){this.pointerChecker&&this.pointerChecker(t,i,n)&&(lw.stop(t.event),this.trigger("zoom",e,i,n))}function vw(t,e,i){var n=t._opt[e];return n&&(!ow.isString(n)||i.event[n+"Key"])}ow.mixin(uw,sw);var yw=uw,xw={};xw.updateViewOnPan=function(t,e,i){var n=t.target,a=n.position;a[0]+=e,a[1]+=i,n.dirty()},xw.updateViewOnZoom=function(t,e,i,n){var a=t.target,r=t.zoomLimit,o=a.position,s=a.scale,l=t.zoom=t.zoom||1;if(l*=e,r){var h=r.min||0,u=r.max||1/0;l=Math.max(Math.min(u,l),h)}var c=l/t.zoom;t.zoom=l,o[0]-=(i-o[0])*(c-1),o[1]-=(n-o[1])*(c-1),s[0]*=c,s[1]*=c,a.dirty()};var _w={},bw={axisPointer:1,tooltip:1,brush:1};_w.onIrrelevantElement=function(t,e,i){var n=e.getComponentByElement(t.topTarget),a=n&&n.coordinateSystem;return n&&n!==i&&!bw[n.mainType]&&a&&a.model!==i};var ww=b,Sw=yw,Mw=xw,Iw=_w.onIrrelevantElement,Aw=Vr;function Tw(t,e){var i=t.getItemStyle(),n=t.get("areaColor");return null!=n&&(i.fill=n),i}function Cw(t,e){e.eachChild((function(e){ww.each(e.__regions,(function(i){e.trigger(t.isSelected(i.name)?"emphasis":"normal")}))}))}function Lw(t,e){var i=new Aw.Group;this._controller=new Sw(t.getZr()),this._controllerHost={target:e?i:null},this.group=i,this._updateGroup=e,this._mouseDownFlag}Lw.prototype={constructor:Lw,draw:function(t,e,i,n,a){var r="geo"===t.mainType,o=t.getData&&t.getData();r&&e.eachComponent({mainType:"series",subType:"map"},(function(e){o||e.getHostGeoModel()!==t||(o=e.getData())}));var s=t.coordinateSystem,l=this.group,h=s.scale,u={position:s.position,scale:h};!l.childAt(0)||a?l.attr(u):Aw.updateProps(l,u,t),l.removeAll();var c=["itemStyle","normal"],d=["itemStyle","emphasis"],p=["label","normal"],f=["label","emphasis"],g=ww.createHashMap();ww.each(s.regions,(function(e){var i=g.get(e.name)||g.set(e.name,new Aw.Group),n=new Aw.CompoundPath({shape:{paths:[]}});i.add(n);var a,s=(C=t.getRegionModel(e.name)||t).getModel(c),u=C.getModel(d),m=Tw(s),v=Tw(u),y=C.getModel(p),x=C.getModel(f);if(o){a=o.indexOfName(e.name);var _=o.getItemVisual(a,"color",!0);_&&(m.fill=_)}ww.each(e.geometries,(function(t){if("polygon"===t.type){n.shape.paths.push(new Aw.Polygon({shape:{points:t.exterior}}));for(var e=0;e<(t.interiors?t.interiors.length:0);e++)n.shape.paths.push(new Aw.Polygon({shape:{points:t.interiors[e]}}))}})),n.setStyle(m),n.style.strokeNoScale=!0,n.culling=!0;var b=y.get("show"),w=x.get("show"),S=o&&isNaN(o.get("value",a)),M=o&&o.getItemLayout(a);if(r||S&&(b||w)||M&&M.showLabel){var I,A=r?e.name:a;(!o||a>=0)&&(I=t);var T=new Aw.Text({position:e.center.slice(),scale:[1/h[0],1/h[1]],z2:10,silent:!0});Aw.setLabelStyle(T.style,T.hoverStyle={},y,x,{labelFetcher:I,labelDataIndex:A,defaultText:e.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),i.add(T)}if(o)o.setItemGraphicEl(a,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),Aw.setHoverStyle(i,v,{hoverSilentOnTouch:!!t.get("selectedMode")}),l.add(i)})),this._updateController(t,e,i),function(t,e,i,n,a){i.off("click"),i.off("mousedown"),e.get("selectedMode")&&(i.on("mousedown",(function(){t._mouseDownFlag=!0})),i.on("click",(function(r){if(t._mouseDownFlag){t._mouseDownFlag=!1;for(var o=r.target;!o.__regions;)o=o.parent;if(o){var s={type:("geo"===e.mainType?"geo":"map")+"ToggleSelect",batch:ww.map(o.__regions,(function(t){return{name:t.name,from:a.uid}}))};s[e.mainType+"Id"]=e.id,n.dispatchAction(s),Cw(e,i)}}})))}(this,t,l,i,n),Cw(t,l)},remove:function(){this.group.removeAll(),this._controller.dispose(),this._controllerHost={}},_updateController:function(t,e,i){var n=t.coordinateSystem,a=this._controller,r=this._controllerHost;r.zoomLimit=t.get("scaleLimit"),r.zoom=n.getZoom(),a.enable(t.get("roam")||!1);var o=t.mainType;function s(){var e={type:"geoRoam",componentType:o};return e[o+"Id"]=t.id,e}a.off("pan").on("pan",(function(t,e){this._mouseDownFlag=!1,Mw.updateViewOnPan(r,t,e),i.dispatchAction(ww.extend(s(),{dx:t,dy:e}))}),this),a.off("zoom").on("zoom",(function(t,e,n){if(this._mouseDownFlag=!1,Mw.updateViewOnZoom(r,t,e,n),i.dispatchAction(ww.extend(s(),{zoom:t,originX:e,originY:n})),this._updateGroup){var a=this.group,o=a.scale;a.traverse((function(t){"text"===t.type&&t.attr("scale",[1/o[0],1/o[1]])}))}}),this),a.setPointerChecker((function(e,a,r){return n.getViewRectAfterRoam().contain(a,r)&&!Iw(e,i,t)}))}};var Dw=Lw,Pw=b,kw=Vr,Ow=Dw;m.extendChartView({type:"map",render:function(t,e,i,n){if(!n||"mapToggleSelect"!==n.type||n.from!==this.uid){var a=this.group;if(a.removeAll(),!t.getHostGeoModel()){if(n&&"geoRoam"===n.type&&"series"===n.componentType&&n.seriesId===t.id)(r=this._mapDraw)&&a.add(r.group);else if(t.needsDrawMap){var r=this._mapDraw||new Ow(i,!0);a.add(r.group),r.draw(t,e,i,this,n),this._mapDraw=r}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,a=this.group;n.each("value",(function(e,i){if(!isNaN(e)){var r=n.getItemLayout(i);if(r&&r.point){var o=r.point,s=r.offset,l=new kw.Circle({style:{fill:t.getData().getVisual("color")},shape:{cx:o[0]+9*s,cy:o[1],r:3},silent:!0,z2:s?8:10});if(!s){var h=t.mainSeries.getData(),u=n.getName(i),c=h.indexOfName(u),d=n.getItemModel(i),p=d.getModel("label.normal"),f=d.getModel("label.emphasis"),g=h.getItemGraphicEl(c),m=Pw.retrieve2(t.getFormattedLabel(i,"normal"),u),v=Pw.retrieve2(t.getFormattedLabel(i,"emphasis"),m),y=function(){var t=kw.setTextStyle({},f,{text:f.get("show")?v:null},{isRectText:!0,useInsideStyle:!1},!0);l.style.extendFrom(t),l.__mapOriginalZ2=l.z2,l.z2+=1},x=function(){kw.setTextStyle(l.style,p,{text:p.get("show")?m:null,textPosition:p.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()}a.add(l)}}}))}});var zw={};zw.updateCenterAndZoom=function(t,e,i){var n=t.getZoom(),a=t.getCenter(),r=e.zoom,o=t.dataToPoint(a);if(null!=e.dx&&null!=e.dy){o[0]-=e.dx,o[1]-=e.dy;a=t.pointToData(o);t.setCenter(a)}if(null!=r){if(i){var s=i.min||0,l=i.max||1/0;r=Math.max(Math.min(n*r,l),s)/n}t.scale[0]*=r,t.scale[1]*=r;var h=t.position,u=(e.originX-h[0])*(r-1),c=(e.originY-h[1])*(r-1);h[0]-=u,h[1]-=c,t.updateTransform();a=t.pointToData(o);t.setCenter(a),t.setZoom(r*n)}return{center:t.getCenter(),zoom:t.getZoom()}};var Ew=m,Rw=b,Nw=zw.updateCenterAndZoom;Ew.registerAction({type:"geoRoam",event:"geoRoam",update:"updateLayout"},(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 a=Nw(n,t,e.get("scaleLimit"));e.setCenter&&e.setCenter(a.center),e.setZoom&&e.setZoom(a.zoom),"series"===i&&Rw.each(e.seriesGroup,(function(t){t.setCenter(a.center),t.setZoom(a.zoom)}))}}))}));var Vw=b;var Bw=b;var Gw=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)})),Bw.each(e,(function(t,e){for(var i,n,a,r,o=(i=Bw.map(t,(function(t){return t.getData()})),n=t[0].get("mapValueCalculation"),a={},r=["value"],Bw.each(i,(function(t){t.each(r,(function(e,i){var n="ec-"+t.getName(i);a[n]=a[n]||[],isNaN(e)||a[n].push(e)}))})),i[0].map(r,(function(t,e){for(var r="ec-"+i[0].getName(e),o=0,s=1/0,l=-1/0,h=a[r].length,u=0;ue&&(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),a=this.getLevelModel();return a||0!==this.children.length&&(0===this.children.length||!1!==this.isExpand)||(e=this.getLeavesModel()),n.getModel(t,(a||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)}},cS.prototype={constructor:cS,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;ir&&(r=t.depth)}));var o=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:r;return a.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=o})),a.data},formatTooltip:function(t){for(var e=this.getData().tree,i=e.root.children[0],n=e.getNodeByDataIndex(t),a=n.getValue(),r=n.name;n&&n!==i;)r=n.parentNode.name+"."+r,n=n.parentNode;return gS(r+(isNaN(a)||null==a?"":" : "+a))},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:{normal:{color:"#ccc",width:1.5,curveness:.5}},itemStyle:{normal:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5}},label:{normal:{show:!0,color:"#555"}},leaves:{label:{normal:{show:!0}}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});var mS={},vS=wu;function yS(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function xS(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function _S(t,e,i){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:i}function bS(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 wS(t,e){return t.parentNode===e.parentNode?1:2}mS.init=function(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,i,n=[t];e=n.pop();)if(i=e.children,e.isExpand&&i.length)for(var a=i.length-1;a>=0;a--){var r=i[a];r.hierNode={defaultAncestor:null,ancestor:r,prelim:0,modifier:0,change:0,shift:0,i:a,thread:null},n.push(r)}},mS.firstWalk=function(t,e){var i=t.isExpand?t.children:[],n=t.parentNode.children,a=t.hierNode.i?n[t.hierNode.i-1]:null;if(i.length){!function(t){var e=t.children,i=e.length,n=0,a=0;for(;--i>=0;){var r=e[i];r.hierNode.prelim+=n,r.hierNode.modifier+=n,a+=r.hierNode.change,n+=r.hierNode.shift+a}}(t);var r=(i[0].hierNode.prelim+i[i.length-1].hierNode.prelim)/2;a?(t.hierNode.prelim=a.hierNode.prelim+e(t,a),t.hierNode.modifier=t.hierNode.prelim-r):t.hierNode.prelim=r}else a&&(t.hierNode.prelim=a.hierNode.prelim+e(t,a));t.parentNode.hierNode.defaultAncestor=function(t,e,i,n){if(e){for(var a=t,r=t,o=r.parentNode.children[0],s=e,l=a.hierNode.modifier,h=r.hierNode.modifier,u=o.hierNode.modifier,c=s.hierNode.modifier;s=yS(s),r=xS(r),s&&r;){a=yS(a),o=xS(o),a.hierNode.ancestor=t;var d=s.hierNode.prelim+c-r.hierNode.prelim-h+n(s,r);d>0&&(bS(_S(s,t,i),t,d),h+=d,l+=d),c+=s.hierNode.modifier,h+=r.hierNode.modifier,l+=a.hierNode.modifier,u+=o.hierNode.modifier}s&&!yS(a)&&(a.hierNode.thread=s,a.hierNode.modifier+=c-l),r&&!xS(o)&&(o.hierNode.thread=r,o.hierNode.modifier+=h-u,i=t)}return i}(t,a,t.parentNode.hierNode.defaultAncestor||n[0],e)},mS.secondWalk=function(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier},mS.separation=function(t){return arguments.length?t:wS},mS.radialCoordinate=function(t,e){var i={};return t-=Math.PI/2,i.x=e*Math.cos(t),i.y=e*Math.sin(t),i},mS.getViewRect=function(t,e){return vS.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})};var SS=b,MS=Vr,IS=sm,AS=mS.radialCoordinate;function TS(t,e){var i=t.getItemLayout(e);return i&&!isNaN(i.x)&&!isNaN(i.y)&&"none"!==t.getItemVisual(e,"symbol")}function CS(t,e,i){return i.itemModel=e,i.itemStyle=e.getModel("itemStyle.normal").getItemStyle(),i.hoverItemStyle=e.getModel("itemStyle.emphasis").getItemStyle(),i.lineStyle=e.getModel("lineStyle.normal").getLineStyle(),i.labelModel=e.getModel("label.normal"),i.hoverLabelModel=e.getModel("label.emphasis"),!1===t.isExpand&&0!==t.children.length?i.symbolInnerColor=i.itemStyle.fill:i.symbolInnerColor="#fff",i}function LS(t,e,i,n,a,r){var o=!i,s=t.tree.getNodeByDataIndex(e),l=s.getModel(),h=(r=CS(s,l,r),t.tree.root),u=s.parentNode===h?s:s.parentNode||s,c=t.getItemGraphicEl(u.dataIndex),d=u.getLayout(),p=c?{x:c.position[0],y:c.position[1],rawX:c.__radialOldRawX,rawY:c.__radialOldRawY}:d,f=s.getLayout();o?(i=new IS(t,e,r)).attr("position",[p.x,p.y]):i.updateData(t,e,r),i.__radialOldRawX=i.__radialRawX,i.__radialOldRawY=i.__radialRawY,i.__radialRawX=f.rawX,i.__radialRawY=f.rawY,n.add(i),t.setItemGraphicEl(e,i),MS.updateProps(i,{position:[f.x,f.y]},a);var g=i.getSymbolPath();if("radial"===r.layout){var m,v,y=h.children[0],x=y.getLayout(),_=y.children.length;if(f.x===x.x&&!0===s.isExpand){var b={};b.x=(y.children[0].getLayout().x+y.children[_-1].getLayout().x)/2,b.y=(y.children[0].getLayout().y+y.children[_-1].getLayout().y)/2,(m=Math.atan2(b.y-x.y,b.x-x.x))<0&&(m=2*Math.PI+m),(v=b.xx.x)||(m-=Math.PI);var w=v?"left":"right";g.setStyle({textPosition:w,textRotation:-m,textOrigin:"center",verticalAlign:"middle"})}if(s.parentNode&&s.parentNode!==h){var S=i.__edge;S||(S=i.__edge=new MS.BezierCurve({shape:PS(r,p,p),style:SS.defaults({opacity:0},r.lineStyle)})),MS.updateProps(S,{shape:PS(r,d,f),style:{opacity:1}},a),n.add(S)}}function DS(t,e,i,n,a,r){for(var o,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,h=s.getModel(),u=(r=CS(s,h,r),s.parentNode===l?s:s.parentNode||s);null==(o=u.getLayout());)u=u.parentNode===l?u:u.parentNode||u;MS.updateProps(i,{position:[o.x+1,o.y+1]},a,(function(){n.remove(i),t.setItemGraphicEl(e,null)})),i.fadeOut(null,{keepLabel:!0});var c=i.__edge;c&&MS.updateProps(c,{shape:PS(r,o,o),style:{opacity:0}},a,(function(){n.remove(c)}))}function PS(t,e,i){var n,a,r,o,s=t.orient;if("radial"===t.layout){var l=e.rawX,h=e.rawY,u=i.rawX,c=i.rawY,d=AS(l,h),p=AS(l,h+(c-h)*t.curvature),f=AS(u,c+(h-c)*t.curvature),g=AS(u,c);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:p.x,cpy1:p.y,cpx2:f.x,cpy2:f.y}}l=e.x,h=e.y,u=i.x,c=i.y;return"horizontal"===s&&(n=l+(u-l)*t.curvature,a=h,r=u+(l-u)*t.curvature,o=c),"vertical"===s&&(n=l,a=h+(c-h)*t.curvature,r=u,o=c+(h-c)*t.curvature),{x1:l,y1:h,x2:u,y2:c,cpx1:n,cpy1:a,cpx2:r,cpy2:o}}m.extendChartView({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new MS.Group,this.group.add(this._mainGroup)},render:function(t,e,i,n){var a=t.getData(),r=t.layoutInfo,o=this._mainGroup,s=t.get("layout");"radial"===s?o.attr("position",[r.x+r.width/2,r.y+r.height/2]):o.attr("position",[r.x,r.y]);var l=this._data,h={expandAndCollapse:t.get("expandAndCollapse"),layout:s,orient:t.get("orient"),curvature:t.get("lineStyle.normal.curveness"),symbolRotate:t.get("symbolRotate"),symbolOffset:t.get("symbolOffset"),hoverAnimation:t.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};a.diff(l).add((function(e){TS(a,e)&&LS(a,e,null,o,t,h)})).update((function(e,i){var n=l.getItemGraphicEl(i);TS(a,e)?LS(a,e,n,o,t,h):n&&DS(a,e,n,o,t,h)})).remove((function(e){var i=l.getItemGraphicEl(e);DS(a,e,i,o,t,h)})).execute(),!0===h.expandAndCollapse&&a.eachItemGraphicEl((function(e,n){e.off("click").on("click",(function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:n})}))})),this._data=a},dispose:function(){},remove:function(){this._mainGroup.removeAll(),this._data=null}}),m.registerAction({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 kS={};kS.eachAfter=function(t,e,i){for(var n,a=[t],r=[];n=a.pop();)if(r.push(n),n.isExpand){var o=n.children;if(o.length)for(var s=0;s=0;r--)n.push(a[r])}};var OS=kS,zS=OS.eachAfter,ES=OS.eachBefore,RS=mS,NS=RS.init,VS=RS.firstWalk,BS=RS.secondWalk,GS=RS.separation,WS=RS.radialCoordinate,HS=RS.getViewRect;var FS=function(t,e){var i=HS(t,e);t.layoutInfo=i;var n=t.get("layout"),a=0,r=0,o=null;"radial"===n?(a=2*Math.PI,r=Math.min(i.height,i.width)/2,o=GS((function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth}))):(a=i.width,r=i.height,o=GS());var s=t.getData().tree.root,l=s.children[0];NS(s),zS(l,VS,o),s.hierNode.modifier=-l.hierNode.prelim,ES(l,BS);var h=l,u=l,c=l;ES(l,(function(t){var e=t.getLayout().x;eu.getLayout().x&&(u=t),t.depth>c.depth&&(c=t)}));var d=h===u?1:o(h,u)/2,p=d-h.getLayout().x,f=0,g=0,m=0,v=0;"radial"===n?(f=a/(u.getLayout().x+d+p),g=r/(c.depth-1||1),ES(l,(function(t){m=(t.getLayout().x+p)*f,v=(t.depth-1)*g;var e=WS(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)}))):"horizontal"===t.get("orient")?(g=r/(u.getLayout().x+d+p),f=a/(c.depth-1||1),ES(l,(function(t){v=(t.getLayout().x+p)*g,m=(t.depth-1)*f,t.setLayout({x:m,y:v},!0)}))):(f=a/(u.getLayout().x+d+p),g=r/(c.depth-1||1),ES(l,(function(t){m=(t.getLayout().x+p)*f,v=(t.depth-1)*g,t.setLayout({x:m,y:v},!0)})))},ZS=FS;var US=FS;var jS=m,qS=b,XS=Ym,YS=function(t,e){t.eachSeriesByType("tree",(function(t){ZS(t,e)}))},$S=function(t,e){t.eachSeriesByType("tree",(function(t){US(t,e)}))};jS.registerVisual(qS.curry(XS,"tree","circle",null)),jS.registerLayout(YS),jS.registerLayout($S);var KS={},JS=b;function QS(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}KS.retrieveTargetInfo=function(t,e){if(t&&("treemapZoomToNode"===t.type||"treemapRootToNode"===t.type)){var i=e.getData().tree.root,n=t.targetNode;if(n&&i.contains(n))return{node:n};var a=t.targetNodeId;if(null!=a&&(n=i.getNodeById(a)))return{node:n}}},KS.getPathToRoot=QS,KS.aboveViewRoot=function(t,e){var i=QS(t);return JS.indexOf(i,e)>=0},KS.wrapTreePathInfo=function(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};var tM=b,eM=yd,iM=dS,nM=ru,aM=cr,rM=aM.encodeHTML,oM=aM.addCommas,sM=KS.wrapTreePathInfo;function lM(t){var e=0;tM.each(t.children,(function(t){lM(t);var i=t.value;tM.isArray(i)&&(i=i[0]),e+=i}));var i=t.value;tM.isArray(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),i<0&&(i=0),tM.isArray(t.value)?t.value[0]=i:t.value=i}eM.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:{normal:{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:{normal:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0}},upperLabel:{normal:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},emphasis:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},itemStyle:{normal:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{}},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};lM(i);var n=t.levels||[];n=t.levels=function(t,e){var i,n=e.get("color");if(!n)return;if(t=t||[],tM.each(t,(function(t){var e=new nM(t),n=e.get("color");(e.get("itemStyle.normal.color")||n&&"none"!==n)&&(i=!0)})),!i){(t[0]||(t[0]={})).color=n.slice()}return t}(n,e);var a={};return a.levels=n,iM.createTree(i,this,a).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=tM.isArray(i)?oM(i[0]):oM(i),a=e.getName(t);return rM(a+": "+n)},getDataParams:function(t){var e=eM.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=sM(i,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},tM.extend(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=tM.createHashMap(),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.getData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var hM=Vr,uM=wu,cM=b,dM=KS.wrapTreePathInfo;function pM(t){this.group=new hM.Group,t.add(this.group)}function fM(t,e,i,n,a,r){var o=[[a?t:t-5,e],[t+i,e],[t+i,e+n],[a?t:t-5,e+n]];return!r&&o.splice(2,0,[t+i+5,e+n/2]),!a&&o.push([t,e+n/2]),o}function gM(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&&dM(i,e)}}pM.prototype={constructor:pM,render:function(t,e,i,n){var a=t.getModel("breadcrumb"),r=this.group;if(r.removeAll(),a.get("show")&&i){var o=a.getModel("itemStyle.normal"),s=o.getModel("textStyle"),l={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,l,s),this._renderContent(t,l,o,s,n),uM.positionElement(r,l.pos,l.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentNode){var a=n.getModel().get("name"),r=i.getTextRect(a),o=Math.max(r.width+16,e.emptyItemWidth);e.totalWidth+=o+8,e.renderList.push({node:n,text:a,width:o})}},_renderContent:function(t,e,i,n,a){for(var r=0,o=e.emptyItemWidth,s=t.get("breadcrumb.height"),l=uM.getAvailableSize(e.pos,e.box),h=e.totalWidth,u=e.renderList,c=u.length-1;c>=0;c--){var d=u[c],p=d.node,f=d.width,g=d.text;h>l.width&&(h-=f-o,f=o,g=null);var m=new hM.Polygon({shape:{points:fM(r,0,f,s,c===u.length-1,0===c)},style:cM.defaults(i.getItemStyle(),{lineJoin:"bevel",text:g,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:cM.curry(a,p)});this.group.add(m),gM(m,t,p),r+=f+8}},remove:function(){this.group.removeAll()}};var mM=pM,vM={},yM=b;vM.createWrap=function(){var t,e=[],i={};return{add:function(t,n,a,r,o){return yM.isString(r)&&(o=r,r=0),!i[t.id]&&(i[t.id]=1,e.push({el:t,target:n,time:a,delay:r,easing:o}),!0)},done:function(e){return t=e,this},start:function(){for(var n=e.length,a=0,r=e.length;a3||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 a=n.getLayout();if(!a)return;var r=new AM(a.x,a.y,a.width,a.height),o=this.seriesModel.layoutInfo;e-=o.x,i-=o.y;var s=TM.create();TM.translate(s,s,[-e,-i]),TM.scale(s,s,[t,t]),TM.translate(s,s,[e,i]),r.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:r.x,y:r.y,width:r.width,height:r.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 a=n.hostTree.data.getItemModel(n.dataIndex),r=a.get("link",!0),o=a.get("target",!0)||"blank";r&&window.open(r,o)}}}}}),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 MM(this.group))).render(t,e,i.node,DM((function(e){"animating"!==this._state&&(SM.aboveViewRoot(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 a=this._storage.background[n.getRawIndex()];if(a){var r=a.transformCoordToLocal(t,e),o=a.shape;if(!(o.x<=r[0]&&r[0]<=o.x+o.width&&o.y<=r[1]&&r[1]<=o.y+o.height))return!1;i={node:n,offsetX:r[0],offsetY:r[1]}}}),this),i}});for(var HM=m,FM=KS,ZM=function(){},UM=["treemapZoomToNode","treemapRender","treemapMove"],jM=0;jM=0;r--)null==i[r]&&(delete n[e[r]],e.pop())}(n):tI(n,!0):(qM.assert("linear"!==e||n.dataExtent),tI(n))};JM.prototype={constructor:JM,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return qM.bind(this._normalizeData,this)}};var QM=JM.visualHandlers={color:{applyVisual:nI("color"),getColorMapper:function(){var t=this.option;return qM.bind("category"===t.mappingMethod?function(t,e){return!e&&(t=this._normalizeData(t)),aI.call(this,t)}:function(e,i,n){var a=!!n;return!i&&(e=this._normalizeData(e)),n=XM.fastLerp(e,t.parsedVisual,n),a?n:XM.stringify(n,"rgba")},this)},_doMap:{linear:function(t){return XM.stringify(XM.fastLerp(t,this.option.parsedVisual),"rgba")},category:aI,piecewise:function(t,e){var i=sI.call(this,e);return null==i&&(i=XM.stringify(XM.fastLerp(t,this.option.parsedVisual),"rgba")),i},fixed:rI}},colorHue:eI((function(t,e){return XM.modifyHSL(t,e)})),colorSaturation:eI((function(t,e){return XM.modifyHSL(t,null,e)})),colorLightness:eI((function(t,e){return XM.modifyHSL(t,null,null,e)})),colorAlpha:eI((function(t,e){return XM.modifyAlpha(t,e)})),opacity:{applyVisual:nI("opacity"),_doMap:oI([0,1])},symbol:{applyVisual:function(t,e,i){var n=this.mapValueToVisual(t);if(qM.isString(n))i("symbol",n);else if(KM(n))for(var a in n)n.hasOwnProperty(a)&&i(a,n[a])},_doMap:{linear:iI,category:aI,piecewise:function(t,e){var i=sI.call(this,e);return null==i&&(i=iI.call(this,t)),i},fixed:rI}},symbolSize:{applyVisual:nI("symbolSize"),_doMap:oI([0,1])}};function tI(t,e){var i=t.visual,n=[];qM.isObject(i)?$M(i,(function(t){n.push(t)})):null!=i&&n.push(i);e||1!==n.length||{color:1,symbol:1}.hasOwnProperty(t.type)||(n[1]=n[0]),lI(t,n)}function eI(t){return{applyVisual:function(e,i,n){e=this.mapValueToVisual(e),n("color",t(i("color"),e))},_doMap:oI([0,1])}}function iI(t){var e=this.option.visual;return e[Math.round(YM(t,[0,1],[0,e.length-1],!0))]||{}}function nI(t){return function(e,i,n){n(t,this.mapValueToVisual(e))}}function aI(t){var e=this.option.visual;return e[this.option.loop&&-1!==t?t%e.length:t]}function rI(){return this.option.visual[0]}function oI(t){return{linear:function(e){return YM(e,t,this.option.visual,!0)},category:aI,piecewise:function(e,i){var n=sI.call(this,i);return null==n&&(n=YM(e,t,this.option.visual,!0)),n},fixed:rI}}function sI(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=i[JM.findPieceIndex(t,i)];if(n&&n.visual)return n.visual[this.type]}}function lI(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=qM.map(e,(function(t){return XM.parse(t)}))),e}var hI={linear:function(t){return YM(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,i=JM.findPieceIndex(t,e,!0);if(null!=i)return YM(i,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?-1:e},fixed:qM.noop};function uI(t,e,i){return t?e<=i:eh[1]&&(h[1]=l);var u=e.get("colorMappingBy"),c={type:o.name,dataExtent:h,visual:o.range};"color"!==c.type||"index"!==u&&"id"!==u?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new dI(c);return d.__drColorMappingBy=u,d}(0,o,s,0,u,p);fI.each(p,(function(t,e){if(t.depth>=a.length||t===a[t.depth]){var s=function(t,e,i,n,a,r){var o=fI.extend({},e);if(a){var s=a.type,l="color"===s&&a.__drColorMappingBy,h="index"===l?n:"id"===l?r.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));o[s]=a.mapValueToVisual(h)}return o}(o,u,t,e,f,r);mI(t,s,i,n,a,r)}}))}else l=vI(u),t.setVisual("color",l)}}function vI(t){var e=yI(t,"color");if(e){var i=yI(t,"colorAlpha"),n=yI(t,"colorSaturation");return n&&(e=pI.modifyHSL(e,null,null,n)),i&&(e=pI.modifyAlpha(e,i)),e}}function yI(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function xI(t,e){var i=t.get(e);return gI(i)&&i.length?{name:e,range:i}:null}var _I=function(t,e,i){var n={mainType:"series",subType:"treemap",query:i};t.eachComponent(n,(function(t){var e=t.getData().tree,i=e.root,n=t.getModel("itemStyle.normal");i.isRemoved()||mI(i,{},fI.map(e.levelModels,(function(t){return t?t.get("itemStyle.normal"):null})),n,t.getViewRoot().getAncestors(),t)}))},bI=b,wI=Je,SI=dr,MI=SI.parsePercent,II=SI.MAX_SAFE_INTEGER,AI=wu,TI=KS,CI=Math.max,LI=Math.min,DI=bI.retrieve,PI=bI.each,kI=["itemStyle","normal","borderWidth"],OI=["itemStyle","normal","gapWidth"],zI=["upperLabel","normal","show"],EI=["upperLabel","normal","height"];function RI(t,e,i,n){var a,r;if(!t.isRemoved()){var o=t.getLayout();a=o.width,r=o.height;var s=(p=t.getModel()).get(kI),l=p.get(OI)/2,h=GI(p),u=Math.max(s,h),c=s-l,d=u-l,p=t.getModel();t.setLayout({borderWidth:s,upperHeight:u,upperLabelHeight:h},!0);var f=(a=CI(a-2*c,0))*(r=CI(r-c-d,0)),g=function(t,e,i,n,a,r){var o=t.children||[],s=n.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=n.leafDepth&&n.leafDepth<=r;if(a&&!l)return t.viewChildren=[];o=bI.filter(o,(function(t){return!t.isRemoved()})),function(t,e){e&&t.sort((function(t,i){var n="asc"===e?t.getValue()-i.getValue():i.getValue()-t.getValue();return 0===n?"asc"===e?t.dataIndex-i.dataIndex:i.dataIndex-t.dataIndex:n}))}(o,s);var h=function(t,e,i){for(var n=0,a=0,r=e.length;as[1]&&(s[1]=e)}))}else s=[NaN,NaN];return{sum:n,dataExtent:s}}(e,o,s);if(0===h.sum)return t.viewChildren=[];if(h.sum=function(t,e,i,n,a){if(!n)return i;for(var r=t.get("visibleMin"),o=a.length,s=o,l=o-1;l>=0;l--){var h=a["asc"===n?o-l-1:l].getValue();h/i*ea&&(a=n));var l=t.area*t.area,h=e*e*i;return l?CI(h*a/l,l/(h*r)):1/0}function VI(t,e,i,n,a){var r=e===i.width?0:1,o=1-r,s=["x","y"],l=["width","height"],h=i[s[r]],u=e?t.area/e:0;(a||u>i[l[o]])&&(u=i[l[o]]);for(var c=0,d=t.length;cII&&(h=II),o=r}h=0&&t.call(e,i[a],a)},XI.eachEdge=function(t,e){for(var i=this.edges,n=i.length,a=0;a=0&&i[a].node1.dataIndex>=0&&i[a].node2.dataIndex>=0&&t.call(e,i[a],a)},XI.breadthFirstTraverse=function(t,e,i,n){if(e instanceof YI||(e=this._nodesMap[jI(e)]),e){for(var a="out"===i?"outEdges":"in"===i?"inEdges":"edges",r=0;r=0&&i.node2.dataIndex>=0}));for(a=0,r=n.length;a=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)}}};UI.mixin(YI,KI("hostGraph","data")),UI.mixin($I,KI("hostGraph","edgeData")),qI.Node=YI,qI.Edge=$I;var JI=b,QI=dp,tA=qI,eA=aS,iA=wp,nA=_c,aA=Ep;var rA=function(t,e,i,n,a){for(var r=new tA(n),o=0;o "+d)),h++)}var p,f=i.get("coordinateSystem");if("cartesian2d"===f||"polar"===f)p=aA(t,i,i.ecModel);else{var g=nA.get(f),m=iA((g&&"view"!==g.type&&g.dimensions||[]).concat(["value"]),t);(p=new QI(m,i)).initData(t)}var v=new QI(["value"],i);return v.initData(l,s),a&&a(p,v),eA({mainData:p,struct:r,structAttr:"graph",datas:{node:p,edge:v},datasAttr:{node:"data",edge:"edgeData"}}),r.update(),r},oA=m,sA=dp,lA=b,hA=ur.defaultEmphasis,uA=ru,cA=cr.encodeHTML,dA=rA,pA=oA.extendSeriesModel({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),hA(t.edgeLabel,["show"])},getInitialData:function(t,e){var i=t.edges||t.links||[],n=t.data||t.nodes||[],a=this;if(n&&i)return dA(n,i,this,!0,(function(t,i){t.wrapMethod("getItemModel",(function(t){var e=a._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));var n=a.getModel("edgeLabel"),r=new uA({label:n.option},n.parentModel,e);function o(t){return(t=this.parsePath(t))&&"label"===t[0]?r:this.parentModel}i.wrapMethod("getItemModel",(function(t){return t.customizeGetParent(o),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(),a=this.getDataParams(t,i),r=n.graph.getEdgeByIndex(t),o=n.getName(r.node1.dataIndex),s=n.getName(r.node2.dataIndex),l=[];return null!=o&&l.push(o),null!=s&&l.push(s),l=cA(l.join(" > ")),a.value&&(l+=" : "+cA(a.value)),l}return pA.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=lA.map(this.option.categories||[],(function(t){return null!=t.value?t:lA.extend({value:0},t)})),e=new sA(["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:{normal:{position:"middle"},emphasis:{}},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{normal:{show:!1,formatter:"{b}"},emphasis:{show:!0}},itemStyle:{normal:{},emphasis:{}},lineStyle:{normal:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{}}}}),fA=Vr,gA=U,mA=fA.Line.prototype,vA=fA.BezierCurve.prototype;function yA(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var xA=fA.extendShape({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){(yA(e)?mA:vA).buildPath(t,e)},pointAt:function(t){return yA(this.shape)?mA.pointAt.call(this,t):vA.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,i=yA(e)?[e.x2-e.x1,e.y2-e.y1]:vA.tangentAt.call(this,t);return gA.normalize(i,i)}}),_A=b,bA=U,wA=Hf,SA=xA,MA=Vr,IA=dr.round,AA=["fromSymbol","toSymbol"];function TA(t){return"_"+t+"Type"}function CA(t,e,i){var n=e.getItemVisual(i,"color"),a=e.getItemVisual(i,t),r=e.getItemVisual(i,t+"Size");if(a&&"none"!==a){_A.isArray(r)||(r=[r,r]);var o=wA.createSymbol(a,-r[0]/2,-r[1]/2,r[0],r[1],n);return o.name=t,o}}function LA(t,e){var i=e[0],n=e[1],a=e[2];t.x1=i[0],t.y1=i[1],t.x2=n[0],t.y2=n[1],t.percent=1,a?(t.cpx1=a[0],t.cpy1=a[1]):(t.cpx1=NaN,t.cpy1=NaN)}function DA(t,e,i){MA.Group.call(this),this._createLine(t,e,i)}var PA=DA.prototype;PA.beforeUpdate=function(){var t=this,e=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.childOfName("label");if(e||i||!n.ignore){for(var a=1,r=this.parent;r;)r.scale&&(a/=r.scale[0]),r=r.parent;var o=t.childOfName("line");if(this.__dirty||o.__dirty){var s=o.shape.percent,l=o.pointAt(0),h=o.pointAt(s),u=bA.sub([],h,l);if(bA.normalize(u,u),e){e.attr("position",l);var c=o.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(c[1],c[0])),e.attr("scale",[a*s,a*s])}if(i){i.attr("position",h);c=o.tangentAt(1);i.attr("rotation",-Math.PI/2-Math.atan2(c[1],c[0])),i.attr("scale",[a*s,a*s])}if(!n.ignore){var d,p,f;n.attr("position",h);var g=5*a;if("end"===n.__position)d=[u[0]*g+h[0],u[1]*g+h[1]],p=u[0]>.8?"left":u[0]<-.8?"right":"center",f=u[1]>.8?"top":u[1]<-.8?"bottom":"middle";else if("middle"===n.__position){var m=s/2,v=[(c=o.tangentAt(m))[1],-c[0]],y=o.pointAt(m);v[1]>0&&(v[0]=-v[0],v[1]=-v[1]),d=[y[0]+v[0]*g,y[1]+v[1]*g],p="center",f="bottom";var x=-Math.atan2(c[1],c[0]);h[0].8?"right":u[0]<-.8?"left":"center",f=u[1]>.8?"bottom":u[1]<-.8?"top":"middle";n.attr({style:{textVerticalAlign:n.__verticalAlign||f,textAlign:n.__textAlign||p},position:d,scale:[a,a]})}}}},PA._createLine=function(t,e,i){var n=t.hostModel,a=function(t){var e=new SA({name:"line"});return LA(e.shape,t),e}(t.getItemLayout(e));a.shape.percent=0,MA.initProps(a,{shape:{percent:1}},n,e),this.add(a);var r=new MA.Text({name:"label"});this.add(r),_A.each(AA,(function(i){var n=CA(i,t,e);this.add(n),this[TA(i)]=t.getItemVisual(e,i)}),this),this._updateCommonStl(t,e,i)},PA.updateData=function(t,e,i){var n=t.hostModel,a=this.childOfName("line"),r=t.getItemLayout(e),o={shape:{}};LA(o.shape,r),MA.updateProps(a,o,n,e),_A.each(AA,(function(i){var n=t.getItemVisual(e,i),a=TA(i);if(this[a]!==n){this.remove(this.childOfName(i));var r=CA(i,t,e);this.add(r)}this[a]=n}),this),this._updateCommonStl(t,e,i)},PA._updateCommonStl=function(t,e,i){var n=t.hostModel,a=this.childOfName("line"),r=i&&i.lineStyle,o=i&&i.hoverLineStyle,s=i&&i.labelModel,l=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var h=t.getItemModel(e);r=h.getModel("lineStyle.normal").getLineStyle(),o=h.getModel("lineStyle.emphasis").getLineStyle(),s=h.getModel("label.normal"),l=h.getModel("label.emphasis")}var u=t.getItemVisual(e,"color"),c=_A.retrieve3(t.getItemVisual(e,"opacity"),r.opacity,1);a.useStyle(_A.defaults({strokeNoScale:!0,fill:"none",stroke:u,opacity:c},r)),a.hoverStyle=o,_A.each(AA,(function(t){var e=this.childOfName(t);e&&(e.setColor(u),e.setStyle({opacity:c}))}),this);var d,p,f,g,m=s.getShallow("show"),v=l.getShallow("show"),y=this.childOfName("label");if(m||v){var x=n.getRawValue(e);p=null==x?p=t.getName(e):isFinite(x)?IA(x):x,d=u||"#000",f=_A.retrieve2(n.getFormattedLabel(e,"normal",t.dataType),p),g=_A.retrieve2(n.getFormattedLabel(e,"emphasis",t.dataType),f)}if(m){var _=MA.setTextStyle(y.style,s,{text:f},{autoColor:d});y.__textAlign=_.textAlign,y.__verticalAlign=_.textVerticalAlign,y.__position=s.get("position")||"middle"}else y.setStyle("text",null);y.hoverStyle=v?{text:g,textFill:l.getTextColor(!0),fontStyle:l.getShallow("fontStyle"),fontWeight:l.getShallow("fontWeight"),fontSize:l.getShallow("fontSize"),fontFamily:l.getShallow("fontFamily")}:{text:null},y.ignore=!m&&!v,MA.setHoverStyle(this)},PA.highlight=function(){this.trigger("emphasis")},PA.downplay=function(){this.trigger("normal")},PA.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},PA.setLinePoints=function(t){var e=this.childOfName("line");LA(e.shape,t),e.dirty()},_A.inherits(DA,MA.Group);var kA=DA,OA=Vr,zA=kA;function EA(t){return isNaN(t[0])||isNaN(t[1])}function RA(t){return!EA(t[0])&&!EA(t[1])}function NA(t){this._ctor=t||zA,this.group=new OA.Group}var VA=NA.prototype;VA.updateData=function(t){var e=this._lineData,i=this.group,n=this._ctor,a=t.hostModel,r={lineStyle:a.getModel("lineStyle.normal").getLineStyle(),hoverLineStyle:a.getModel("lineStyle.emphasis").getLineStyle(),labelModel:a.getModel("label.normal"),hoverLabelModel:a.getModel("label.emphasis")};t.diff(e).add((function(e){if(RA(t.getItemLayout(e))){var a=new n(t,e,r);t.setItemGraphicEl(e,a),i.add(a)}})).update((function(a,o){var s=e.getItemGraphicEl(o);RA(t.getItemLayout(a))?(s?s.updateData(t,a,r):s=new n(t,a,r),t.setItemGraphicEl(a,s),i.add(s)):i.remove(s)})).remove((function(t){i.remove(e.getItemGraphicEl(t))})).execute(),this._lineData=t},VA.updateLayout=function(){var t=this._lineData;t.eachItemGraphicEl((function(e,i){e.updateLayout(t,i)}),this)},VA.remove=function(){this.group.removeAll()};var BA=NA,GA=Gr,WA=U,HA=[],FA=[],ZA=[],UA=GA.quadraticAt,jA=WA.distSquare,qA=Math.abs;function XA(t,e,i){for(var n,a=t[0],r=t[1],o=t[2],s=1/0,l=i*i,h=.1,u=.1;u<=.9;u+=.1){HA[0]=UA(a[0],r[0],o[0],u),HA[1]=UA(a[1],r[1],o[1],u),(p=qA(jA(HA,e)-l))=0?n+=h:n-=h:f>=0?n-=h:n+=h}return n}var YA=function(t,e){var i=[],n=GA.quadraticSubdivide,a=[[],[],[]],r=[[],[]],o=[];function s(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),e}e/=2,t.eachEdge((function(t,l){var h=t.getLayout(),u=t.getVisual("fromSymbol"),c=t.getVisual("toSymbol");h.__original||(h.__original=[WA.clone(h[0]),WA.clone(h[1])],h[2]&&h.__original.push(WA.clone(h[2])));var d=h.__original;if(null!=h[2]){if(WA.copy(a[0],d[0]),WA.copy(a[1],d[2]),WA.copy(a[2],d[1]),u&&"none"!=u){var p=s(t.node1),f=XA(a,d[0],p*e);n(a[0][0],a[1][0],a[2][0],f,i),a[0][0]=i[3],a[1][0]=i[4],n(a[0][1],a[1][1],a[2][1],f,i),a[0][1]=i[3],a[1][1]=i[4]}if(c&&"none"!=c){p=s(t.node2),f=XA(a,d[1],p*e);n(a[0][0],a[1][0],a[2][0],f,i),a[1][0]=i[1],a[2][0]=i[2],n(a[0][1],a[1][1],a[2][1],f,i),a[1][1]=i[1],a[2][1]=i[2]}WA.copy(h[0],a[0]),WA.copy(h[1],a[2]),WA.copy(h[2],a[1])}else{if(WA.copy(r[0],d[0]),WA.copy(r[1],d[1]),WA.sub(o,r[1],r[0]),WA.normalize(o,o),u&&"none"!=u){p=s(t.node1);WA.scaleAndAdd(r[0],r[0],o,p*e)}if(c&&"none"!=c){p=s(t.node2);WA.scaleAndAdd(r[1],r[1],o,-p*e)}WA.copy(h[0],r[0]),WA.copy(h[1],r[1])}}))},$A=m,KA=b,JA=pm,QA=BA,tT=yw,eT=xw,iT=_w.onIrrelevantElement,nT=Vr,aT=YA,rT=["itemStyle","normal","opacity"],oT=["lineStyle","normal","opacity"];function sT(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function lT(t,e,i){var n=t.getGraphicEl(),a=sT(t,e);null!=i&&(null==a&&(a=1),a*=i),n.downplay&&n.downplay(),n.traverse((function(t){"group"!==t.type&&t.setStyle("opacity",a)}))}function hT(t,e){var i=sT(t,e),n=t.getGraphicEl();n.highlight&&n.highlight(),n.traverse((function(t){"group"!==t.type&&t.setStyle("opacity",i)}))}$A.extendChartView({type:"graph",init:function(t,e){var i=new JA,n=new QA,a=this.group;this._controller=new tT(e.getZr()),this._controllerHost={target:a},a.add(i.group),a.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._firstRender=!0},render:function(t,e,i){var n=t.coordinateSystem;this._model=t,this._nodeScaleRatio=t.get("nodeScaleRatio");var a=this._symbolDraw,r=this._lineDraw,o=this.group;if("view"===n.type){var s={position:n.position,scale:n.scale};this._firstRender?o.attr(s):nT.updateProps(o,s,t)}aT(t.getGraph(),this._getNodeGlobalScale(t));var l=t.getData();a.updateData(l);var h=t.getEdgeData();r.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,e,i),clearTimeout(this._layoutTimeout);var u=t.forceLayout,c=t.get("force.layoutAnimation");u&&this._startForceLayoutIteration(u,c),l.eachItemGraphicEl((function(e,n){var a=l.getItemModel(n);e.off("drag").off("dragend");var r=l.getItemModel(n).get("draggable");r&&e.on("drag",(function(){u&&(u.warmUp(),!this._layouting&&this._startForceLayoutIteration(u,c),u.setFixed(n),l.setItemLayout(n,e.position))}),this).on("dragend",(function(){u&&u.setUnfixed(n)}),this),e.setDraggable(r&&u),e.off("mouseover",e.__focusNodeAdjacency),e.off("mouseout",e.__unfocusNodeAdjacency),a.get("focusNodeAdjacency")&&(e.on("mouseover",e.__focusNodeAdjacency=function(){i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex})}),e.on("mouseout",e.__unfocusNodeAdjacency=function(){i.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t.id})}))}),this),l.graph.eachEdge((function(e){var n=e.getGraphicEl();n.off("mouseover",n.__focusNodeAdjacency),n.off("mouseout",n.__unfocusNodeAdjacency),e.getModel().get("focusNodeAdjacency")&&(n.on("mouseover",n.__focusNodeAdjacency=function(){i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex})}),n.on("mouseout",n.__unfocusNodeAdjacency=function(){i.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t.id})}))}));var d="circular"===t.get("layout")&&t.get("circular.rotateLabel"),p=l.getLayout("cx"),f=l.getLayout("cy");l.eachItemGraphicEl((function(t,e){var i=t.getSymbolPath();if(d){var n=l.getItemLayout(e),a=Math.atan2(n[1]-f,n[0]-p);a<0&&(a=2*Math.PI+a);var r=n[0]=a/3?1:2),l=e.y-n(o)*r*(r>=a/3?1:2);o=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+i(o)*r,e.y+n(o)*r),t.lineTo(e.x+i(e.angle)*a,e.y+n(e.angle)*a),t.lineTo(e.x-i(o)*r,e.y-n(o)*r),t.lineTo(s,l)}}),QT=Vr,tC=zd,eC=dr,iC=eC.parsePercent,nC=eC.round,aC=eC.linearMap;function rC(t,e){return e&&("string"==typeof e?t=e.replace("{value}",null!=t?t:""):"function"==typeof e&&(t=e(t))),t}var oC=2*Math.PI;tC.extend({type:"gauge",render:function(t,e,i){this.group.removeAll();var n=t.get("axisLine.lineStyle.color"),a=function(t,e){var i=t.get("center"),n=e.getWidth(),a=e.getHeight(),r=Math.min(n,a);return{cx:iC(i[0],e.getWidth()),cy:iC(i[1],e.getHeight()),r:iC(t.get("radius"),r/2)}}(t,i);this._renderMain(t,e,i,n,a)},dispose:function(){},_renderMain:function(t,e,i,n,a){for(var r=this.group,o=t.getModel("axisLine").getModel("lineStyle"),s=t.get("clockwise"),l=-t.get("startAngle")/180*Math.PI,h=((p=-t.get("endAngle")/180*Math.PI)-l)%oC,u=l,c=o.get("width"),d=0;d=t&&(0===e?0:n[e-1][0]).4?"bottom":"middle",textAlign:T<-.4?"left":T>.4?"right":"center"},{autoColor:k}),silent:!0}))}if(g.get("show")&&A!==v){for(var O=0;O<=y;O++){T=Math.cos(b),C=Math.sin(b);var z=new QT.Line({shape:{x1:T*c+h,y1:C*c+u,x2:T*(c-_)+h,y2:C*(c-_)+u},silent:!0,style:I});"auto"===I.stroke&&z.setStyle({stroke:n((A+O/y)/v)}),l.add(z),b+=S}b-=S}else b+=w}},_renderPointer:function(t,e,i,n,a,r,o,s){var l=this.group,h=this._data;if(t.get("pointer.show")){var u=[+t.get("min"),+t.get("max")],c=[r,o],d=t.getData();d.diff(h).add((function(e){var i=new JT({shape:{angle:r}});QT.initProps(i,{shape:{angle:aC(d.get("value",e),u,c,!0)}},t),l.add(i),d.setItemGraphicEl(e,i)})).update((function(e,i){var n=h.getItemGraphicEl(i);QT.updateProps(n,{shape:{angle:aC(d.get("value",e),u,c,!0)}},t),l.add(n),d.setItemGraphicEl(e,n)})).remove((function(t){var e=h.getItemGraphicEl(t);l.remove(e)})).execute(),d.eachItemGraphicEl((function(t,e){var i=d.getItemModel(e),r=i.getModel("pointer");t.setShape({x:a.cx,y:a.cy,width:iC(r.get("width"),a.r),r:iC(r.get("length"),a.r)}),t.useStyle(i.getModel("itemStyle.normal").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",n(aC(d.get("value",e),u,[0,1],!0))),QT.setHoverStyle(t,i.getModel("itemStyle.emphasis").getItemStyle())})),this._data=d}else h&&h.eachItemGraphicEl((function(t){l.remove(t)}))},_renderTitle:function(t,e,i,n,a){var r=t.getModel("title");if(r.get("show")){var o=r.get("offsetCenter"),s=a.cx+iC(o[0],a.r),l=a.cy+iC(o[1],a.r),h=+t.get("min"),u=+t.get("max"),c=t.getData().get("value",0),d=n(aC(c,[h,u],[0,1],!0));this.group.add(new QT.Text({silent:!0,style:QT.setTextStyle({},r,{x:s,y:l,text:t.getData().getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:d,forceRich:!0})}))}},_renderDetail:function(t,e,i,n,a){var r=t.getModel("detail"),o=+t.get("min"),s=+t.get("max");if(r.get("show")){var l=r.get("offsetCenter"),h=a.cx+iC(l[0],a.r),u=a.cy+iC(l[1],a.r),c=iC(r.get("width"),a.r),d=iC(r.get("height"),a.r),p=t.getData().get("value",0),f=n(aC(p,[o,s],[0,1],!0));this.group.add(new QT.Text({silent:!0,style:QT.setTextStyle({},r,{x:h,y:u,text:rC(p,r.get("formatter")),textWidth:isNaN(c)?null:c,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:f,forceRich:!0})}))}}});var sC=m,lC=dp,hC=ur.defaultEmphasis,uC=wp,cC=sC.extendSeriesModel({type:"series.funnel",init:function(t){cC.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this._defaultLabelLine(t)},getInitialData:function(t,e){var i=uC(["value"],t.data),n=new lC(i,this);return n.initData(t.data),n},_defaultLabelLine:function(t){hC(t.labelLine,["show"]);var e=t.labelLine.normal,i=t.labelLine.emphasis;e.show=e.show&&t.label.normal.show,i.show=i.show&&t.label.emphasis.show},getDataParams:function(t){var e=this.getData(),i=cC.superCall(this,"getDataParams",t),n=e.getSum("value");return i.percent=n?+(e.get("value",t)/n*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:{normal:{show:!0,position:"outer"},emphasis:{show:!0}},labelLine:{normal:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},emphasis:{}},itemStyle:{normal:{borderColor:"#fff",borderWidth:1},emphasis:{}}}}),dC=Vr,pC=b,fC=zd;function gC(t,e){dC.Group.call(this);var i=new dC.Polygon,n=new dC.Polyline,a=new dC.Text;function r(){n.ignore=n.hoverIgnore,a.ignore=a.hoverIgnore}function o(){n.ignore=n.normalIgnore,a.ignore=a.normalIgnore}this.add(i),this.add(n),this.add(a),this.updateData(t,e,!0),this.on("emphasis",r).on("normal",o).on("mouseover",r).on("mouseout",o)}var mC=gC.prototype,vC=["itemStyle","normal","opacity"];mC.updateData=function(t,e,i){var n=this.childAt(0),a=t.hostModel,r=t.getItemModel(e),o=t.getItemLayout(e),s=t.getItemModel(e).get(vC);s=null==s?1:s,n.useStyle({}),i?(n.setShape({points:o.points}),n.setStyle({opacity:0}),dC.initProps(n,{style:{opacity:s}},a,e)):dC.updateProps(n,{style:{opacity:s},shape:{points:o.points}},a,e);var l=r.getModel("itemStyle"),h=t.getItemVisual(e,"color");n.setStyle(pC.defaults({lineJoin:"round",fill:h},l.getModel("normal").getItemStyle(["opacity"]))),n.hoverStyle=l.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),dC.setHoverStyle(this)},mC._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),a=t.hostModel,r=t.getItemModel(e),o=t.getItemLayout(e).label,s=t.getItemVisual(e,"color");dC.updateProps(i,{shape:{points:o.linePoints||o.linePoints}},a,e),dC.updateProps(n,{style:{x:o.x,y:o.y}},a,e),n.attr({rotation:o.rotation,origin:[o.x,o.y],z2:10});var l=r.getModel("label.normal"),h=r.getModel("label.emphasis"),u=r.getModel("labelLine.normal"),c=r.getModel("labelLine.emphasis");s=t.getItemVisual(e,"color");dC.setLabelStyle(n.style,n.hoverStyle={},l,h,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:s,useInsideStyle:!!o.inside},{textAlign:o.textAlign,textVerticalAlign:o.verticalAlign}),n.ignore=n.normalIgnore=!l.get("show"),n.hoverIgnore=!h.get("show"),i.ignore=i.normalIgnore=!u.get("show"),i.hoverIgnore=!c.get("show"),i.setStyle({stroke:s}),i.setStyle(u.getModel("lineStyle").getLineStyle()),i.hoverStyle=c.getModel("lineStyle").getLineStyle()},pC.inherits(gC,dC.Group),fC.extend({type:"funnel",render:function(t,e,i){var n=t.getData(),a=this._data,r=this.group;n.diff(a).add((function(t){var e=new gC(n,t);n.setItemGraphicEl(t,e),r.add(e)})).update((function(t,e){var i=a.getItemGraphicEl(e);i.updateData(n,t),r.add(i),n.setItemGraphicEl(t,i)})).remove((function(t){var e=a.getItemGraphicEl(t);r.remove(e)})).execute(),this._data=n},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});var yC=wu,xC=dr,_C=xC.parsePercent,bC=xC.linearMap;var wC=function(t,e,i){t.eachSeriesByType("funnel",(function(t){var i=t.getData(),n=t.get("sort"),a=function(t,e){return yC.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),r=function(t,e){for(var i=t.mapArray("value",(function(t){return t})),n=[],a="ascending"===e,r=0,o=t.count();r0?-1:i<0?1:e?-1:1}}function EC(t,e){return Math.min(e[1],Math.max(e[0],t))}OC.prototype={constructor:OC,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},PC.inherits(OC,kC);var RC=function(t,e,i,n,a,r){e[0]=EC(e[0],i),e[1]=EC(e[1],i),t=t||0;var o=i[1]-i[0];null!=a&&(a=EC(a,[0,o])),null!=r&&(r=Math.max(r,null!=a?a:0)),"all"===n&&(a=r=Math.abs(e[1]-e[0]),n=0);var s=zC(e,n);e[n]+=t;var l=a||0,h=i.slice();s.sign<0?h[0]+=l:h[1]-=l,e[n]=EC(e[n],h);var u=zC(e,n);return null!=a&&(u.sign!==s.sign||u.spanr&&(e[1-n]=e[n]+u.sign*r),e},NC=b,VC=mt,BC=wu,GC=Rp,WC=OC,HC=Vr,FC=dr,ZC=RC,UC=NC.each,jC=Math.min,qC=Math.max,XC=Math.floor,YC=Math.ceil,$C=FC.round,KC=Math.PI;function JC(t,e,i){this._axesMap=NC.createHashMap(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,i)}function QC(t,e){return jC(qC(t,e[0]),e[1])}function tL(t,e){var i=e.layoutLength/(e.axisCount-1);return{position:i*t,axisNameAvailableWidth:i,axisLabelShow:!0}}function eL(t,e){var i,n,a=e.layoutLength,r=e.axisExpandWidth,o=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,h=s,u=!1;return t=i&&r<=i+e.axisLength&&o>=n&&o<=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();UC(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,t),GC.niceScaleExtent(e.scale,e.model)}),this)}}),this)},resize:function(t,e){this._rect=BC.getLayoutRect(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"],a=["width","height"],r=e.get("layout"),o="horizontal"===r?0:1,s=i[a[o]],l=[0,s],h=this.dimensions.length,u=QC(e.get("axisExpandWidth"),l),c=QC(e.get("axisExpandCount")||0,[0,h]),d=e.get("axisExpandable")&&h>3&&h>c&&c>1&&u>0&&s>0,p=e.get("axisExpandWindow");p?(t=QC(p[1]-p[0],l),p[1]=p[0]+t):(t=QC(u*(c-1),l),(p=[u*(e.get("axisExpandCenter")||XC(h/2))-t/2])[1]=p[0]+t);var f=(s-t)/(h-c);f<3&&(f=0);var g=[XC($C(p[0]/u,1))+1,YC($C(p[1]/u,1))-1],m=f/u*p[0];return{layout:r,pixelDimIndex:o,layoutBase:i[n[o]],layoutLength:s,axisBase:i[n[1-o]],axisLength:i[a[1-o]],axisExpandable:d,axisExpandWidth:u,axisCollapseWidth:f,axisExpandWindow:p,axisCount:h,winInnerIndices:g,axisExpandWindow0Pos:m}},_layoutAxes:function(){var t=this._rect,e=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),a=n.layout;e.each((function(t){var e=[0,n.axisLength],i=t.inverse?1:0;t.setExtent(e[i],e[1-i])})),UC(i,(function(i,r){var o=(n.axisExpandable?eL:tL)(r,n),s={horizontal:{x:o.position,y:n.axisLength},vertical:{x:0,y:o.position}},l={horizontal:KC/2,vertical:0},h=[s[a].x+t.x,s[a].y+t.y],u=l[a],c=VC.create();VC.rotate(c,c,u),VC.translate(c,c,h),this._axesLayout[i]={position:h,rotation:u,transform:c,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.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,a=this._axesMap,r=this.hasAxisBrushed(),o=0,s=t.count();oa*(1-u[0])?(l="jump",o=s-a*(1-u[2])):(o=s-a*u[1])>=0&&(o=s-a*(1-u[1]))<=0&&(o=0),(o*=e.axisExpandWidth/h)?ZC(o,n,r,"all"):l="none";else{a=n[1]-n[0];(n=[qC(0,r[1]*s/a-a/2)])[1]=jC(r[1],n[0]+a),n[0]=n[1]-a}return{axisExpandWindow:n,behavior:l}}};var iL=JC;_c.register("parallel",{create:function(t,e){var i=[];return t.eachComponent("parallel",(function(n,a){var r=new iL(n,t,e);r.name="parallel_"+a,r.resize(n,e),n.coordinateSystem=r,r.model=n,i.push(r)})),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 nL=b,aL=Or,rL=wv,oL=dr,sL=Wf,lL=Zu.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return aL([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=nL.clone(t);if(e)for(var i=e.length-1;i>=0;i--)oL.asc(e[i])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t)return"inactive";for(var i=0,n=e.length;i1)return("e"===(i=[UL(t,(e=e.split(""))[0]),UL(t,e[1])])[0]||"w"===i[0])&&i.reverse(),i.join("");var i=fL.transformDirection({w:"left",e:"right",n:"top",s:"bottom"}[e],function(t){return fL.getTransform(t.group)}(t));return{left:"w",right:"e",top:"n",bottom:"s"}[i]}function jL(t,e,i,n,a,r,o,s){var l=n.__brushOption,h=t(l.range),u=XL(i,r,o);yL(a.split(""),(function(t){var e=SL[t];h[e[0]][e[1]]+=u[e[0]]})),l.range=e(ZL(h[0][0],h[1][0],h[0][1],h[1][1])),kL(i,n),NL(i,{isEnd:!1})}function qL(t,e,i,n,a){var r=e.__brushOption.range,o=XL(t,i,n);yL(r,(function(t){t[0]+=o[0],t[1]+=o[1]})),kL(t,e),NL(t,{isEnd:!1})}function XL(t,e,i){var n=t.group,a=n.transformCoordToLocal(e,i),r=n.transformCoordToLocal(0,0);return[a[0]-r[0],a[1]-r[1]]}function YL(t,e,i){var n=EL(t,e);return n&&!0!==n?n.clipPath(i,t._transform):dL.clone(i)}function $L(t){var e=t.event;e.preventDefault&&e.preventDefault()}function KL(t,e,i){return t.childOfName("main").contain(e,i)}function JL(t,e,i,n){var a,r=t._creatingCover,o=t._creatingPanel,s=t._brushOption;if(t._track.push(i.slice()),function(t){var e=t._track;if(!e.length)return!1;var i=e[e.length-1],n=e[0],a=i[0]-n[0],r=i[1]-n[1];return wL(a*a+r*r,.5)>6}(t)||r){if(o&&!r){"single"===s.brushMode&&RL(t);var l=dL.clone(s);l.brushType=QL(l.brushType,o),l.panelId=!0===o?null:o.panelId,r=t._creatingCover=CL(t,l),t._covers.push(r)}if(r){var h=iD[QL(t._brushType,o)];r.__brushOption.range=h.getCreatingRange(YL(t,r,t._track)),n&&(LL(t,r),h.updateCommon(t,r)),DL(t,r),a={isEnd:n}}}else n&&"single"===s.brushMode&&s.removeOnClick&&zL(t,e,i)&&RL(t)&&(a={isEnd:n,removeOnClick:!0});return a}function QL(t,e){return"auto"===t?e.defaultBrushType:t}TL.prototype={constructor:TL,enableBrush:function(t){var e,i;return this._brushType&&(i=(e=this)._zr,gL.release(i,"globalPan",e._uid),yL(e._handlers,(function(t,e){i.off(e,t)})),e._brushType=e._brushOption=null),t.brushType&&function(t,e){var i=t._zr;t._enableGlobalPan||gL.take(i,"globalPan",t._uid);yL(t._handlers,(function(t,e){i.on(e,t)})),t._brushType=e.brushType,t._brushOption=dL.merge(dL.clone(IL),e,!0)}(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};dL.each(t,(function(t){e[t.panelId]=dL.clone(t)}))}else this._panels=null;return this},mount:function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getLocalTransform(),this},eachCover:function(t,e){yL(this._covers,t,e)},updateCovers:function(t){t=dL.map(t,(function(t){return dL.merge(dL.clone(IL),t,!0)}));var e=this._covers,i=this._covers=[],n=this,a=this._creatingCover;return new mL(e,t,(function(t,e){return r(t.__brushOption,e)}),r).add(o).update(o).remove((function(t){e[t]!==a&&n.group.remove(e[t])})).execute(),this;function r(t,e){return(null!=t.id?t.id:"\0-brush-index-"+e)+"-"+t.brushType}function o(r,o){var s=t[r];if(null!=o&&e[o]===a)i[r]=e[o];else{var l=i[r]=null!=o?(e[o].__brushOption=s,e[o]):LL(n,CL(n,s));kL(n,l)}}},unmount:function(){return this.enableBrush(!1),RL(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},dL.mixin(TL,pL);var tD={mousedown:function(t){if(this._dragging)eD.call(this,t);else if(!t.target||!t.target.draggable){$L(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=zL(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);if(function(t,e,i){if(t._brushType){var n=t._zr,a=t._covers,r=zL(t,e,i);if(!t._dragging)for(var o=0;o5)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&&SD(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})}}};function SD(t,e){var i=t._model;return i.get("axisExpandable")&&i.get("axisExpandTriggerOn")===e}yD.registerPreprocessor(bD);var MD=dp,ID=b,AD=wp;function TD(t){return+t.replace("dim","")}yd.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.normal.color",getInitialData:function(t,e){var i=e.getComponent("parallel",this.get("parallelIndex")),n=i.parallelAxisIndex,a=t.data,r=i.dimensions,o=function(t,e){var i=0;ID.each(t,(function(t){var e=TD(t);e>i&&(i=e)}));var n=e[0];n&&n.length-1>i&&(i=n.length-1);for(var a=[],r=0;r<=i;r++)a.push("dim"+r);return a}(r,a),s=ID.map(o,(function(t,i){var o=ID.indexOf(r,t),s=o>=0&&e.getComponent("parallelAxis",n[o]);return s&&"category"===s.get("type")?(function(t,e,i){var n=t.get("data"),a=TD(e);n&&n.length&&ID.each(i,(function(t){if(t){var e=ID.indexOf(n,t[a]);t[a]=e>=0?e:NaN}}))}(s,t,a),{name:t,type:"ordinal"}):o<0&&AD.guessOrdinal(a,i)?{name:t,type:"ordinal"}:t})),l=new MD(s,this);return l.initData(a),this.option.progressive&&(this.option.animation=!1),l},getRawIndicesByActiveState:function(t){var e=this.coordinateSystem,i=this.getData(),n=[];return e.eachActiveState(i,(function(e,a){t===e&&n.push(i.getRawIndex(a))})),n},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{normal:{show:!1},emphasis:{show:!1}},inactiveOpacity:.05,activeOpacity:1,lineStyle:{normal:{width:1,opacity:.45,type:"solid"}},progressive:!1,smooth:!1,animationEasing:"linear"}});var CD=Vr,LD=b;function DD(t,e,i,n){for(var a,r=[],o=0;o=t.length)return e;for(var a=-1,r=e.length,o=t[n++],s={},l={};++a=t.length)return i;var r=[],o=e[a++];return BD.each(i,(function(t,e){r.push({key:e,values:n(t,a)})})),o?r.sort((function(t,e){return o(t.key,e.key)})):r}return{key:function(e){return t.push(e),this},sortKeys:function(i){return e[t.length-1]=i,this},entries:function(t){return n(i(t,0),0)}}},WD=wu,HD=GD,FD=b;function ZD(t,e,i){FD.each(t,(function(t){var n,a,r,o=0,s=t.length;for(t.sort(QD),r=0;r0){var l=n.getLayout().y+a;n.setLayout({y:l},!0)}o=n.getLayout().y+n.getLayout().dy+e}if((a=o-e-i)>0){l=n.getLayout().y-a;for(n.setLayout({y:l},!0),o=n.getLayout().y,r=s-2;r>=0;--r)(a=(n=t[r]).getLayout().y+n.getLayout().dy+e-o)>0&&(l=n.getLayout().y-a,n.setLayout({y:l},!0)),o=n.getLayout().y}}))}function UD(t,e){FD.each(t.slice().reverse(),(function(t){FD.each(t,(function(t){if(t.outEdges.length){var i=KD(t.outEdges,jD)/KD(t.outEdges,eP),n=t.getLayout().y+(i-JD(t))*e;t.setLayout({y:n},!0)}}))}))}function jD(t){return JD(t.node2)*t.getValue()}function qD(t,e){FD.each(t,(function(t){FD.each(t,(function(t){if(t.inEdges.length){var i=KD(t.inEdges,XD)/KD(t.inEdges,eP),n=t.getLayout().y+(i-JD(t))*e;t.setLayout({y:n},!0)}}))}))}function XD(t){return JD(t.node1)*t.getValue()}function YD(t,e){return t.node2.getLayout().y-e.node2.getLayout().y}function $D(t,e){return t.node1.getLayout().y-e.node1.getLayout().y}function KD(t,e){for(var i=0,n=t.length,a=-1;++ae?1:t===e?0:NaN}function eP(t){return t.getValue()}var iP=function(t,e,i){t.eachSeriesByType("sankey",(function(t){var i=t.get("nodeWidth"),n=t.get("nodeGap"),a=function(t,e){return WD.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=a;var r=a.width,o=a.height,s=t.getGraph(),l=s.nodes,h=s.edges;!function(t){FD.each(t,(function(t){var e=KD(t.outEdges,eP),i=KD(t.inEdges,eP),n=Math.max(e,i);t.setLayout({value:n},!0)}))}(l),function(t,e,i,n,a,r,o){(function(t,e,i){var n=t,a=null,r=0;for(;n.length;){a=[];for(var o=0,s=n.length;o0;a--)UD(r,o*=.99),ZD(r,n,i),qD(r,o),ZD(r,n,i)}(t,e,r,n,o),function(t){FD.each(t,(function(t){t.outEdges.sort(YD),t.inEdges.sort($D)})),FD.each(t,(function(t){var e=0,i=0;FD.each(t.outEdges,(function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy})),FD.each(t.inEdges,(function(t){t.setLayout({ty:i},!0),i+=t.getLayout().dy}))}))}(t)}(l,h,i,n,r,o,0!==FD.filter(l,(function(t){return 0===t.getLayout().value})).length?0:t.get("layoutIterations"))}))},nP=cI,aP=b;var rP=m,oP=iP,sP=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;aP.each(e,(function(e){var a=new nP({type:"color",mappingMethod:"linear",dataExtent:[i,n],visual:t.get("color")}).mapValueToVisual(e.getLayout().value);e.setVisual("color",a);var r=e.getModel().get("itemStyle.normal.color");null!=r&&e.setVisual("color",r)}))}))};rP.registerLayout(oP),rP.registerVisual(sP);var lP={},hP=b,uP=Vr,cP=ms.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])}}});function dP(t,e,i,n){uP.Group.call(this),this.bodyIndex,this.whiskerIndex,this.styleUpdater=i,this._createContent(t,e,n),this.updateData(t,e,n),this._seriesModel}var pP=dP.prototype;function fP(t,e,i){return hP.map(t,(function(t){return(t=t.slice())[e]=i.initBaseline,t}))}function gP(t){var e={};return hP.each(t,(function(t,i){e["ends"+i]=t})),e}function mP(t){this.group=new uP.Group,this.styleUpdater=t}pP._createContent=function(t,e,i){var n=t.getItemLayout(e),a="horizontal"===n.chartLayout?1:0,r=0;this.add(new uP.Polygon({shape:{points:i?fP(n.bodyEnds,a,n):n.bodyEnds},style:{strokeNoScale:!0},z2:100})),this.bodyIndex=r++;var o=hP.map(n.whiskerEnds,(function(t){return i?fP(t,a,n):t}));this.add(new cP({shape:gP(o),style:{strokeNoScale:!0},z2:100})),this.whiskerIndex=r++},pP.updateData=function(t,e,i){var n=this._seriesModel=t.hostModel,a=t.getItemLayout(e),r=uP[i?"initProps":"updateProps"];r(this.childAt(this.bodyIndex),{shape:{points:a.bodyEnds}},n,e),r(this.childAt(this.whiskerIndex),{shape:gP(a.whiskerEnds)},n,e),this.styleUpdater.call(null,this,t,e)},hP.inherits(dP,uP.Group);var vP=mP.prototype;vP.updateData=function(t){var e=this.group,i=this._data,n=this.styleUpdater;t.diff(i).add((function(i){if(t.hasValue(i)){var a=new dP(t,i,n,!0);t.setItemGraphicEl(i,a),e.add(a)}})).update((function(a,r){var o=i.getItemGraphicEl(r);t.hasValue(a)?(o?o.updateData(t,a):o=new dP(t,a,n),e.add(o),t.setItemGraphicEl(a,o)):e.remove(o)})).remove((function(t){var n=i.getItemGraphicEl(t);n&&e.remove(n)})).execute(),this._data=t},vP.remove=function(){var t=this.group,e=this._data;this._data=null,e&&e.eachItemGraphicEl((function(e){e&&t.remove(e)}))};var yP=dp,xP=wp,_P=mP,bP=b,wP={_baseAxisDim:null,getInitialData:function(t,e){var i,n,a=e.getComponent("xAxis",this.get("xAxisIndex")),r=e.getComponent("yAxis",this.get("yAxisIndex")),o=a.get("type"),s=r.get("type");"category"===o?(t.layout="horizontal",i=a.getCategories(),n=!0):"category"===s?(t.layout="vertical",i=r.getCategories(),n=!0):t.layout=t.layout||"horizontal";var l=["x","y"],h="horizontal"===t.layout?0:1,u=this._baseAxisDim=l[h],c=l[1-h],d=t.data;n&&bP.each(d,(function(t,e){t.value&&bP.isArray(t.value)?t.value.unshift(e):bP.isArray(t)&&t.unshift(e)}));var p=this.defaultValueDimensions,f=[{name:u,otherDims:{tooltip:!1},dimsDef:["base"]},{name:c,dimsDef:p.slice()}];f=xP(f,d,{encodeDef:this.get("encode"),dimsDef:this.get("dimensions"),dimCount:p.length+1});var g=new yP(f,this);return g.initData(d,i?i.slice():null),g},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}},SP={init:function(){var t=this._whiskerBoxDraw=new _P(this.getStyleUpdater());this.group.add(t.group)},render:function(t,e,i){this._whiskerBoxDraw.updateData(t.getData())},remove:function(t){this._whiskerBoxDraw.remove()}};lP.seriesModelMixin=wP,lP.viewMixin=SP;var MP=b,IP=yd,AP=lP.seriesModelMixin,TP=IP.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:["min","Q1","median","Q3","max"],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{normal:{color:"#fff",borderWidth:1},emphasis:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}});MP.mixin(TP,AP,!0);var CP=b,LP=zd,DP=Vr,PP=lP.viewMixin,kP=LP.extend({type:"boxplot",getStyleUpdater:function(){return EP},dispose:CP.noop});CP.mixin(kP,PP,!0);var OP=["itemStyle","normal"],zP=["itemStyle","emphasis"];function EP(t,e,i){var n=e.getItemModel(i),a=n.getModel(OP),r=e.getItemVisual(i,"color"),o=a.getItemStyle(["borderColor"]),s=t.childAt(t.whiskerIndex);s.style.set(o),s.style.stroke=r,s.dirty();var l=t.childAt(t.bodyIndex);l.style.set(o),l.style.stroke=r,l.dirty();var h=n.getModel(zP).getItemStyle();DP.setHoverStyle(t,h)}var RP=["itemStyle","normal","borderColor"];var NP=function(t,e){var i=t.get("color");t.eachRawSeriesByType("boxplot",(function(e){var n=i[e.seriesIndex%i.length],a=e.getData();a.setVisual({legendSymbol:"roundRect",color:e.get(RP)||n}),t.isSeriesFiltered(e)||a.each((function(t){var e=a.getItemModel(t);a.setItemVisual(t,{color:e.get(RP,!0)})}))}))},VP=b,BP=dr.parsePercent,GP=VP.each;var WP=m,HP=NP,FP=function(t){var e=function(t){var e=[],i=[];return t.eachSeriesByType("boxplot",(function(t){var n=t.getBaseAxis(),a=VP.indexOf(i,n);a<0&&(a=i.length,i[a]=n,e[a]={axis:n,seriesModels:[]}),e[a].seriesModels.push(t)})),e}(t);GP(e,(function(t){var e=t.seriesModels;e.length&&(!function(t){var e,i,n=t.axis,a=t.seriesModels,r=a.length,o=t.boxWidthList=[],s=t.boxOffsetList=[],l=[];if("category"===n.type)i=n.getBandWidth();else{var h=0;GP(a,(function(t){h=Math.max(h,t.getData().count())})),e=n.getExtent(),Math.abs(e[1]-e[0])}GP(a,(function(t){var e=t.get("boxWidth");VP.isArray(e)||(e=[e,e]),l.push([BP(e[0],i)||0,BP(e[1],i)||0])}));var u=.8*i-2,c=u/r*.3,d=(u-c*(r-1))/r,p=d/2-u/2;GP(a,(function(t,e){s.push(p),p+=c+d,o.push(Math.min(Math.max(d,l[e][0]),l[e][1]))}))}(t),GP(e,(function(e,i){!function(t,e,i){var n,a=t.coordinateSystem,r=t.getData(),o=i/2,s=t.get("layout"),l="horizontal"===s?0:1,h=1-l,u=["x","y"],c=[];if(VP.each(r.dimensions,(function(t){var e=r.getDimensionInfo(t).coordDim;e===u[h]?c.push(t):e===u[l]&&(n=t)})),null==n||c.length<5)return;r.each([n].concat(c),(function(){var t=arguments,i=t[0],n=t[c.length+1],u=m(t[3]),d=m(t[1]),p=m(t[5]),f=[[d,m(t[2])],[p,m(t[4])]];y(d),y(p),y(u);var g=[];function m(t){var n,r=[];return r[l]=i,r[h]=t,isNaN(i)||isNaN(t)?n=[NaN,NaN]:(n=a.dataToPoint(r))[l]+=e,n}function v(t,e){var i=t.slice(),n=t.slice();i[l]+=o,n[l]-=o,e?g.push(i,n):g.push(n,i)}function y(t){var e=[t.slice(),t.slice()];e[0][l]-=o,e[1][l]+=o,f.push(e)}v(f[0][1],0),v(f[1][1],1),r.setItemLayout(n,{chartLayout:s,initBaseline:u[h],median:u,bodyEnds:g,whiskerEnds:f})}))}(e,t.boxOffsetList[i],t.boxWidthList[i])})))}))};WP.registerVisual(HP),WP.registerLayout(FP);var ZP=b,UP=yd,jP=lP.seriesModelMixin,qP=UP.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:["open","close","lowest","highest"],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,itemStyle:{normal:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(t,e,i){var n=e.getItemLayout(t);return i.rect(n.brushRect)}});ZP.mixin(qP,jP,!0);var XP=b,YP=zd,$P=Vr,KP=lP.viewMixin,JP=YP.extend({type:"candlestick",getStyleUpdater:function(){return ek},dispose:XP.noop});XP.mixin(JP,KP,!0);var QP=["itemStyle","normal"],tk=["itemStyle","emphasis"];function ek(t,e,i){var n=e.getItemModel(i),a=n.getModel(QP),r=e.getItemVisual(i,"color"),o=e.getItemVisual(i,"borderColor")||r,s=a.getItemStyle(["color","color0","borderColor","borderColor0"]),l=t.childAt(t.whiskerIndex);l.useStyle(s),l.style.stroke=o;var h=t.childAt(t.bodyIndex);h.useStyle(s),h.style.fill=r,h.style.stroke=o;var u=n.getModel(tk).getItemStyle();$P.setHoverStyle(t,u)}var ik=b;var nk=function(t){t&&ik.isArray(t.series)&&ik.each(t.series,(function(t){ik.isObject(t)&&"k"===t.type&&(t.type="candlestick")}))},ak=["itemStyle","normal","borderColor"],rk=["itemStyle","normal","borderColor0"],ok=["itemStyle","normal","color"],sk=["itemStyle","normal","color0"];var lk=function(t,e){t.eachRawSeriesByType("candlestick",(function(e){var i=e.getData();i.setVisual({legendSymbol:"roundRect"}),t.isSeriesFiltered(e)||i.each((function(t){var e=i.getItemModel(t),n=i.getItemLayout(t).sign;i.setItemVisual(t,{color:e.get(n>0?ok:sk),borderColor:e.get(n>0?ak:rk)})}))}))},hk=b,uk=dr.parsePercent,ck=Vr.subPixelOptimize,dk=hk.retrieve2;var pk=m,fk=nk,gk=lk,mk=function(t){t.eachSeriesByType("candlestick",(function(t){var e,i=t.coordinateSystem,n=t.getData(),a=function(t,e){var i,n=t.getBaseAxis(),a="category"===n.type?n.getBandWidth():(i=n.getExtent(),Math.abs(i[1]-i[0])/e.count()),r=uk(dk(t.get("barMaxWidth"),a),a),o=uk(dk(t.get("barMinWidth"),1),a),s=t.get("barWidth");return null!=s?uk(s,a):Math.max(Math.min(a/2,r),o)}(t,n),r=t.get("layout"),o="horizontal"===r?0:1,s=1-o,l=["x","y"],h=[];if(hk.each(n.dimensions,(function(t){var i=n.getDimensionInfo(t).coordDim;i===l[s]?h.push(t):i===l[o]&&(e=t)})),!(null==e||h.length<4)){var u=0;n.each([e].concat(h),(function(){var t,e=arguments,l=e[0],c=e[h.length+1],d=e[1],p=e[2],f=e[3],g=e[4],m=Math.min(d,p),v=Math.max(d,p),y=M(m),x=M(v),_=M(f),b=M(g),w=[[T(b),T(x)],[T(_),T(y)]],S=[];function M(t){var e=[];return e[o]=l,e[s]=t,isNaN(l)||isNaN(t)?[NaN,NaN]:i.dataToPoint(e)}function I(t,e){var i=t.slice(),n=t.slice();i[o]=ck(i[o]+a/2,1,!1),n[o]=ck(n[o]-a/2,1,!0),e?S.push(i,n):S.push(n,i)}function A(){var t=M(Math.min(d,p,f,g)),e=M(Math.max(d,p,f,g));return t[o]-=a/2,e[o]-=a/2,{x:t[0],y:t[1],width:s?a:e[0]-t[0],height:s?e[1]-t[1]:a}}function T(t){return t[o]=ck(t[o],1),t}I(x,0),I(y,1),t=d>p?-1:d0?n.getItemModel(u-1).get()[2]<=p?1:-1:1,n.setItemLayout(c,{chartLayout:r,sign:t,initBaseline:d>p?x[s]:y[s],bodyEnds:S,whiskerEnds:w,brushRect:A()}),++u}),!0)}}))};pk.registerPreprocessor(fk),pk.registerVisual(gk),pk.registerLayout(mk);var vk=Ep;yd.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){return vk(t.data,this,e)},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 yk=b,xk=Hf.createSymbol,_k=Vr.Group,bk=dr.parsePercent,wk=sm;function Sk(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 Mk(t,e){_k.call(this);var i=new wk(t,e),n=new _k;this.add(i),this.add(n),n.beforeUpdate=function(){this.attr(i.getScale())},this.updateData(t,e)}var Ik=Mk.prototype;Ik.stopEffectAnimation=function(){this.childAt(1).removeAll()},Ik.startEffectAnimation=function(t){for(var e=t.symbolType,i=t.color,n=this.childAt(1),a=0;a<3;a++){var r=xk(e,-1,-1,2,2,i);r.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var o=-a/3*t.period+t.effectOffset;r.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(o).start(),r.animateStyle(!0).when(t.period,{opacity:0}).delay(o).start(),n.add(r)}Sk(n,t)},Ik.updateEffectAnimation=function(t){for(var e=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale"],a=0;a "))},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:{normal:{show:!1,position:"end"}},lineStyle:{normal:{opacity:.5}}}}),Vk=Vr,Bk=kA,Gk=b,Wk=Hf.createSymbol,Hk=U,Fk=Gr;function Zk(t,e,i){Vk.Group.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}var Uk=Zk.prototype;Uk.createLine=function(t,e,i){return new Bk(t,e,i)},Uk._updateEffectSymbol=function(t,e){var i=t.getItemModel(e).getModel("effect"),n=i.get("symbolSize"),a=i.get("symbol");Gk.isArray(n)||(n=[n,n]);var r=i.get("color")||t.getItemVisual(e,"color"),o=this.childAt(1);this._symbolType!==a&&(this.remove(o),(o=Wk(a,-.5,-.5,1,1,r)).z2=100,o.culling=!0,this.add(o)),o&&(o.setStyle("shadowColor",r),o.setStyle(i.getItemStyle(["color"])),o.attr("scale",n),o.setColor(r),o.attr("scale",n),this._symbolType=a,this._updateEffectAnimation(t,i,e))},Uk._updateEffectAnimation=function(t,e,i){var n=this.childAt(1);if(n){var a=this,r=t.getItemLayout(i),o=1e3*e.get("period"),s=e.get("loop"),l=e.get("constantSpeed"),h=Gk.retrieve(e.get("delay"),(function(e){return e/t.count()*o/3})),u="function"==typeof h;if(n.ignore=!0,this.updateAnimationPoints(n,r),l>0&&(o=this.getLineLength(n)/l*1e3),o!==this._period||s!==this._loop){n.stopAnimation();var c=h;u&&(c=h(i)),n.__t>0&&(c=-o*n.__t),n.__t=0;var d=n.animate("",s).when(o,{__t:1}).delay(c).during((function(){a.updateSymbolPosition(n)}));s||d.done((function(){a.remove(n)})),d.start()}this._period=o,this._loop=s}},Uk.getLineLength=function(t){return Hk.dist(t.__p1,t.__cp1)+Hk.dist(t.__cp1,t.__p2)},Uk.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]},Uk.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},Uk.updateSymbolPosition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,a=t.__t,r=t.position,o=Fk.quadraticAt,s=Fk.quadraticDerivativeAt;r[0]=o(e[0],n[0],i[0],a),r[1]=o(e[1],n[1],i[1],a);var l=s(e[0],n[0],i[0],a),h=s(e[1],n[1],i[1],a);t.rotation=-Math.atan2(h,l)-Math.PI/2,t.ignore=!1},Uk.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var i=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,i,e)},Gk.inherits(Zk,Vk.Group);var jk=Zk,qk=Vr,Xk=b;function Yk(t,e,i){qk.Group.call(this),this._createPolyline(t,e,i)}var $k=Yk.prototype;$k._createPolyline=function(t,e,i){var n=t.getItemLayout(e),a=new qk.Polyline({shape:{points:n}});this.add(a),this._updateCommonStl(t,e,i)},$k.updateData=function(t,e,i){var n=t.hostModel,a=this.childAt(0),r={shape:{points:t.getItemLayout(e)}};qk.updateProps(a,r,n,e),this._updateCommonStl(t,e,i)},$k._updateCommonStl=function(t,e,i){var n=this.childAt(0),a=t.getItemModel(e),r=t.getItemVisual(e,"color"),o=i&&i.lineStyle,s=i&&i.hoverLineStyle;i&&!t.hasItemOption||(o=a.getModel("lineStyle.normal").getLineStyle(),s=a.getModel("lineStyle.emphasis").getLineStyle()),n.useStyle(Xk.defaults({strokeNoScale:!0,fill:"none",stroke:r},o)),n.hoverStyle=s,qk.setHoverStyle(this)},$k.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},Xk.inherits(Yk,qk.Group);var Kk=Yk,Jk=Kk,Qk=b,tO=jk,eO=U;function iO(t,e,i){tO.call(this,t,e,i),this._lastFrame=0,this._lastFramePercent=0}var nO=iO.prototype;nO.createLine=function(t,e,i){return new Jk(t,e,i)},nO.updateAnimationPoints=function(t,e){this._points=e;for(var i=[0],n=0,a=1;a=0&&!(n[o]<=e);o--);o=Math.min(o,a-2)}else{for(var o=r;oe);o++);o=Math.min(o-1,a-2)}eO.lerp(t.position,i[o],i[o+1],(e-n[o])/(n[o+1]-n[o]));var s=i[o+1][0]-i[o][0],l=i[o+1][1]-i[o][1];t.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=e,t.ignore=!1}},Qk.inherits(iO,tO);var aO=iO,rO=Vr,oO=Eo,sO=Vo,lO=rO.extendShape({shape:{polyline:!1,segs:[]},buildPath:function(t,e){for(var i=e.segs,n=e.polyline,a=0;a2?t.quadraticCurveTo(r[2][0],r[2][1],r[1][0],r[1][1]):t.lineTo(r[1][0],r[1][1])}},findDataIndex:function(t,e){for(var i=this.shape,n=i.segs,a=i.polyline,r=Math.max(this.style.lineWidth,1),o=0;o2){if(sO.containStroke(s[0][0],s[0][1],s[2][0],s[2][1],s[1][0],s[1][1],r,t,e))return o}else if(oO.containStroke(s[0][0],s[0][1],s[1][0],s[1][1],r,t,e))return o}return-1}});function hO(){this.group=new rO.Group,this._lineEl=new lO}var uO=hO.prototype;uO.updateData=function(t){this.group.removeAll();var e=this._lineEl,i=t.hostModel;e.setShape({segs:t.mapArray(t.getItemLayout),polyline:i.get("polyline")}),e.useStyle(i.getModel("lineStyle.normal").getLineStyle());var n=t.getVisual("color");n&&e.setStyle("stroke",n),e.setStyle("fill"),e.seriesIndex=i.seriesIndex,e.on("mousemove",(function(t){e.dataIndex=null;var i=e.findDataIndex(t.offsetX,t.offsetY);i>0&&(e.dataIndex=i)})),this.group.add(e)},uO.updateLayout=function(t){var e=t.getData();this._lineEl.setShape({segs:e.mapArray(e.getItemLayout)})},uO.remove=function(){this.group.removeAll()};var cO=BA,dO=jk,pO=kA,fO=Kk,gO=aO,mO=hO;m.extendChartView({type:"lines",init:function(){},render:function(t,e,i){var n=t.getData(),a=this._lineDraw,r=t.get("effect.show"),o=t.get("polyline"),s=t.get("large")&&n.count()>=t.get("largeThreshold");r===this._hasEffet&&o===this._isPolyline&&s===this._isLarge||(a&&a.remove(),a=this._lineDraw=s?new mO:new cO(o?r?gO:fO:r?dO:pO),this._hasEffet=r,this._isPolyline=o,this._isLarge=s);var l=t.get("zlevel"),h=t.get("effect.trailLength"),u=i.getZr(),c="svg"===u.painter.getType();c||u.painter.getLayer(l).clear(!0),null==this._lastZlevel||c||u.configLayer(this._lastZlevel,{motionBlur:!1}),r&&h&&(c||u.configLayer(l,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(h/10+.9,1),0)})),this.group.add(a.group),a.updateData(n),this._lastZlevel=l},updateLayout:function(t,e,i){this._lineDraw.updateLayout(t);var n=i.getZr();"svg"===n.painter.getType()||n.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(e,!0);var i=e.getZr();"svg"===i.painter.getType()||i.painter.getLayer(this._lastZlevel).clear(!0)},dispose:function(){}});var vO=function(t){t.eachSeriesByType("lines",(function(t){var e=t.coordinateSystem,i=t.getData();i.each((function(n){var a=i.getItemModel(n),r=a.option instanceof Array?a.option:a.get("coords"),o=[];if(t.get("polyline"))for(var s=0;s0){var I=r(v)?s:l;v>0&&(v=v*S+w),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),u},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=SO.createCanvas()),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,a=n[i]||(n[i]=new Uint8ClampedArray(1024)),r=[0,0,0,0],o=0,s=0;s<256;s++)e[i](s/255,!0,r),a[o++]=r[0],a[o++]=r[1],a[o++]=r[2],a[o++]=r[3];return a}};var IO=Vr,AO=MO,TO=b;m.extendChartView({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();var a=t.coordinateSystem;"cartesian2d"===a.type||"calendar"===a.type?this._renderOnCartesianAndCalendar(a,t,i):function(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}(a)&&this._renderOnGeo(a,t,n,i)},dispose:function(){},_renderOnCartesianAndCalendar:function(t,e,i){if("cartesian2d"===t.type)var n=t.getAxis("x"),a=t.getAxis("y"),r=n.getBandWidth(),o=a.getBandWidth();var s=this.group,l=e.getData(),h="itemStyle.normal",u="itemStyle.emphasis",c=e.getModel(h).getItemStyle(["color"]),d=e.getModel(u).getItemStyle(),p=e.getModel("label.normal"),f=e.getModel("label.emphasis"),g=t.type,m="cartesian2d"===g?[e.coordDimToDataDim("x")[0],e.coordDimToDataDim("y")[0],e.coordDimToDataDim("value")[0]]:[e.coordDimToDataDim("time")[0],e.coordDimToDataDim("value")[0]];l.each((function(i){var n;if("cartesian2d"===g){if(isNaN(l.get(m[2],i)))return;var a=t.dataToPoint([l.get(m[0],i),l.get(m[1],i)]);n=new IO.Rect({shape:{x:a[0]-r/2,y:a[1]-o/2,width:r,height:o},style:{fill:l.getItemVisual(i,"color"),opacity:l.getItemVisual(i,"opacity")}})}else{if(isNaN(l.get(m[1],i)))return;n=new IO.Rect({z2:1,shape:t.dataToRect([l.get(m[0],i)]).contentShape,style:{fill:l.getItemVisual(i,"color"),opacity:l.getItemVisual(i,"opacity")}})}var v=l.getItemModel(i);l.hasItemOption&&(c=v.getModel(h).getItemStyle(["color"]),d=v.getModel(u).getItemStyle(),p=v.getModel("label.normal"),f=v.getModel("label.emphasis"));var y=e.getRawValue(i),x="-";y&&null!=y[2]&&(x=y[2]),IO.setLabelStyle(c,d,p,f,{labelFetcher:e,labelDataIndex:i,defaultText:x,isRectText:!0}),n.setStyle(c),IO.setHoverStyle(n,l.hasItemOption?d:TO.extend({},d)),s.add(n),l.setItemGraphicEl(i,n)}))},_renderOnGeo:function(t,e,i,n){var a=i.targetVisuals.inRange,r=i.targetVisuals.outOfRange,o=e.getData(),s=this._hmLayer||this._hmLayer||new AO;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),h=t.getRoamTransform().transform;l.applyTransform(h);var u=Math.max(l.x,0),c=Math.max(l.y,0),d=Math.min(l.width+l.x,n.getWidth()),p=Math.min(l.height+l.y,n.getHeight()),f=d-u,g=p-c,m=o.mapArray(["lng","lat","value"],(function(e,i,n){var a=t.dataToPoint([e,i]);return a[0]-=u,a[1]-=c,a.push(n),a})),v=i.getExtent(),y="visualMap.continuous"===i.type?function(t,e){var i=t[1]-t[0];return e=[(e[0]-t[0])/i,(e[1]-t[0])/i],function(t){return t>=e[0]&&t<=e[1]}}(v,i.option.range):function(t,e,i){var n=t[1]-t[0],a=(e=TO.map(e,(function(e){return{interval:[(e.interval[0]-t[0])/n,(e.interval[1]-t[0])/n]}}))).length,r=0;return function(t){for(var n=r;n=0;n--){var o;if((o=e[n].interval)[0]<=t&&t<=o[1]){r=n;break}}return n>=0&&n0?1:r<0?-1:0}(i,r,a,n,c),function(t,e,i,n,a,r,o,s,l,h){var u=l.valueDim,c=l.categoryDim,d=Math.abs(i[c.wh]),p=t.getItemVisual(e,"symbolSize");DO.isArray(p)?p=p.slice():(null==p&&(p="100%"),p=[p,p]);p[c.index]=zO(p[c.index],d),p[u.index]=zO(p[u.index],n?d:Math.abs(r)),h.symbolSize=p,(h.symbolScale=[p[0]/s,p[1]/s])[u.index]*=(l.isHorizontal?-1:1)*o}(t,e,a,r,0,c.boundingLength,c.pxSign,h,n,c),function(t,e,i,n,a){var r=t.get(NO)||0;r&&(BO.attr({scale:e.slice(),rotation:i}),BO.updateTransform(),r/=BO.getLineScale(),r*=e[n.valueDim.index]);a.valueLineWidth=r}(i,c.symbolScale,l,n,c);var d=c.symbolSize,p=i.get("symbolOffset");return DO.isArray(p)&&(p=[zO(p[0],d[0]),zO(p[1],d[1])]),function(t,e,i,n,a,r,o,s,l,h,u,c){var d=u.categoryDim,p=u.valueDim,f=c.pxSign,g=Math.max(e[p.index]+s,0),m=g;if(n){var v=Math.abs(l),y=DO.retrieve(t.get("symbolMargin"),"15%")+"",x=!1;y.lastIndexOf("!")===y.length-1&&(x=!0,y=y.slice(0,y.length-1)),y=zO(y,e[p.index]);var _=Math.max(g+2*y,0),b=x?0:2*y,w=EO(n),S=w?n:nz((v+b)/_);_=g+2*(y=(v-S*g)/2/(x?S:S-1)),b=x?0:2*y,w||"fixed"===n||(S=h?nz((Math.abs(h)+b)/_):0),m=S*_-b,c.repeatTimes=S,c.symbolMargin=y}var M=f*(m/2),I=c.pathPosition=[];I[d.index]=i[d.wh]/2,I[p.index]="start"===o?M:"end"===o?l-M:l/2,r&&(I[0]+=r[0],I[1]+=r[1]);var A=c.bundlePosition=[];A[d.index]=i[d.xy],A[p.index]=i[p.xy];var T=c.barRectShape=DO.extend({},i);T[p.wh]=f*Math.max(Math.abs(i[p.wh]),Math.abs(I[p.index]+M)),T[d.wh]=i[d.wh];var C=c.clipShape={};C[d.xy]=-i[d.xy],C[d.wh]=u.ecSize[d.wh],C[p.xy]=0,C[p.wh]=i[p.wh]}(i,d,a,r,0,p,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,n,c),c}function WO(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function HO(t){var e=t.symbolPatternSize,i=kO(t.symbolType,-e/2,-e/2,e,e,t.color);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function FO(t,e,i,n){var a=t.__pictorialBundle,r=i.symbolSize,o=i.valueLineWidth,s=i.pathPosition,l=e.valueDim,h=i.repeatTimes||0,u=0,c=r[e.valueDim.index]+o+2*i.symbolMargin;for(tz(t,(function(t){t.__pictorialAnimationIndex=u,t.__pictorialRepeatTimes=h,u0:n<0)&&(a=h-1-t),e[l.index]=c*(a-h/2+.5)+s[l.index],{position:e,scale:i.symbolScale.slice(),rotation:i.rotation}}function g(){tz(t,(function(t){t.trigger("emphasis")}))}function m(){tz(t,(function(t){t.trigger("normal")}))}}function ZO(t,e,i,n){var a=t.__pictorialBundle,r=t.__pictorialMainPath;r?ez(r,null,{position:i.pathPosition.slice(),scale:i.symbolScale.slice(),rotation:i.rotation},i,n):(r=t.__pictorialMainPath=HO(i),a.add(r),ez(r,{position:i.pathPosition.slice(),scale:[0,0],rotation:i.rotation},{scale:i.symbolScale.slice()},i,n),r.on("mouseover",(function(){this.trigger("emphasis")})).on("mouseout",(function(){this.trigger("normal")}))),$O(r,i)}function UO(t,e,i){var n=DO.extend({},e.barRectShape),a=t.__pictorialBarRect;a?ez(a,null,{shape:n},e,i):(a=t.__pictorialBarRect=new PO.Rect({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(a))}function jO(t,e,i,n){if(i.symbolClip){var a=t.__pictorialClipPath,r=DO.extend({},i.clipShape),o=e.valueDim,s=i.animationModel,l=i.dataIndex;if(a)PO.updateProps(a,{shape:r},s,l);else{r[o.wh]=0,a=new PO.Rect({shape:r}),t.__pictorialBundle.setClipPath(a),t.__pictorialClipPath=a;var h={};h[o.wh]=i.clipShape[o.wh],PO[n?"updateProps":"initProps"](a,{shape:h},s,l)}}}function qO(t,e){var i=t.getItemModel(e);return i.getAnimationDelayParams=XO,i.isAnimationEnabled=YO,i}function XO(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function YO(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function $O(t,e){t.off("emphasis").off("normal");var i=e.symbolScale.slice();e.hoverAnimation&&t.on("emphasis",(function(){this.animateTo({scale:[1.1*i[0],1.1*i[1]]},400,"elasticOut")})).on("normal",(function(){this.animateTo({scale:i.slice()},400,"elasticOut")}))}function KO(t,e,i,n){var a=new PO.Group,r=new PO.Group;return a.add(r),a.__pictorialBundle=r,r.attr("position",i.bundlePosition.slice()),i.symbolRepeat?FO(a,e,i):ZO(a,0,i),UO(a,i,n),jO(a,e,i,n),a.__pictorialShapeStr=QO(t,i),a.__pictorialSymbolMeta=i,a}function JO(t,e,i,n){var a=n.__pictorialBarRect;a&&(a.style.text=null);var r=[];tz(n,(function(t){r.push(t)})),n.__pictorialMainPath&&r.push(n.__pictorialMainPath),n.__pictorialClipPath&&(i=null),DO.each(r,(function(t){PO.updateProps(t,{scale:[0,0]},i,e,(function(){n.parent&&n.parent.remove(n)}))})),t.setItemGraphicEl(e,null)}function QO(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function tz(t,e,i){DO.each(t.__pictorialBundle.children(),(function(n){n!==t.__pictorialBarRect&&e.call(i,n)}))}function ez(t,e,i,n,a,r){e&&t.attr(e),n.symbolClip&&!a?i&&t.attr(i):i&&PO[a?"updateProps":"initProps"](t,i,n.animationModel,n.dataIndex,r)}function iz(t,e,i){var n=i.color,a=i.dataIndex,r=i.itemModel,o=r.getModel("itemStyle.normal").getItemStyle(["color"]),s=r.getModel("itemStyle.emphasis").getItemStyle(),l=r.getShallow("cursor");tz(t,(function(t){t.setColor(n),t.setStyle(DO.defaults({fill:n,opacity:i.opacity},o)),PO.setHoverStyle(t,s),l&&(t.cursor=l),t.z2=i.z2}));var h={},u=e.valueDim.posDesc[+(i.boundingLength>0)],c=t.__pictorialBarRect;RO(c.style,h,r,n,e.seriesModel,a,u),PO.setHoverStyle(c,h)}function nz(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}LO.extendChartView({type:"pictorialBar",render:function(t,e,i){var n=this.group,a=t.getData(),r=this._data,o=t.coordinateSystem,s=!!o.getBaseAxis().isHorizontal(),l=o.grid.getRect(),h={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:o,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:VO[+s],categoryDim:VO[1-s]};return a.diff(r).add((function(t){if(a.hasValue(t)){var e=qO(a,t),i=GO(a,t,e,h),r=KO(a,h,i);a.setItemGraphicEl(t,r),n.add(r),iz(r,h,i)}})).update((function(t,e){var i=r.getItemGraphicEl(e);if(a.hasValue(t)){var o=qO(a,t),s=GO(a,t,o,h),l=QO(a,s);i&&l!==i.__pictorialShapeStr&&(n.remove(i),a.setItemGraphicEl(t,null),i=null),i?function(t,e,i){var n=i.animationModel,a=i.dataIndex,r=t.__pictorialBundle;PO.updateProps(r,{position:i.bundlePosition.slice()},n,a),i.symbolRepeat?FO(t,e,i,!0):ZO(t,e,i,!0);UO(t,i,!0),jO(t,e,i,!0)}(i,h,s):i=KO(a,h,s,!0),a.setItemGraphicEl(t,i),i.__pictorialSymbolMeta=s,n.add(i),iz(i,h,s)}else n.remove(i)})).remove((function(t){var e=r.getItemGraphicEl(t);e&&JO(r,t,e.__pictorialSymbolMeta.animationModel,e)})).execute(),this._data=a,this.group},dispose:DO.noop,remove:function(t,e){var i=this.group,n=this._data;t.get("animation")?n&&n.eachItemGraphicEl((function(e){JO(n,e.dataIndex,t,e)})):i.removeAll()}});var az=m,rz=b,oz=ox,sz=Ym;az.registerLayout(rz.curry(oz,"pictorialBar")),az.registerVisual(rz.curry(sz,"pictorialBar","roundRect",null));var lz=b,hz=gg,uz=function(t,e,i,n,a){hz.call(this,t,e,i),this.type=n||"value",this.position=a||"bottom",this.orient=null,this._labelInterval=null};uz.prototype={constructor:uz,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},pointToData:function(t,e){return this.coordinateSystem.pointToData(t,e)[0]},toGlobalCoord:null,toLocalCoord:null},lz.inherits(uz,hz);var cz=uz,dz=Rp,pz=wu.getLayoutRect;function fz(t,e,i){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,i),this.model=t}fz.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:fz,_init:function(t,e,i){var n=this.dimension,a=new cz(n,dz.createScaleByModel(t),[0,0],t.get("type"),t.get("position")),r="category"===a.type;a.onBand=r&&t.get("boundaryGap"),a.inverse=t.get("inverse"),a.orient=t.get("orient"),t.axis=a,a.model=t,a.coordinateSystem=this,this._axis=a},update:function(t,e){t.eachSeries((function(t){if(t.coordinateSystem===this){var e=t.getData(),i=this.dimension;this._axis.scale.unionExtentFromData(e,t.coordDimToDataDim(i)),dz.niceScaleExtent(this._axis.scale,this._axis.model)}}),this)},resize:function(t,e){this._rect=pz({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var t=this._rect,e=this._axis,i=e.isHorizontal(),n=i?[0,t.width]:[0,t.height],a=e.reverse?1:0;e.setExtent(n[a],n[1-a]),this._updateAxisTransform(e,i?t.x:t.y)},_updateAxisTransform:function(t,e){var i=t.getExtent(),n=i[0]+i[1],a=t.isHorizontal();t.toGlobalCoord=a?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord=a?function(t){return t-e}:function(t){return n-t+e}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(t){var e=this.getRect(),i=this.getAxis();return"horizontal"===i.orient?i.contain(i.toLocalCoord(t[0]))&&t[1]>=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=[],a="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[a]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-a]=0===a?i.y+i.height/2:i.x+i.width/2,n}};var gz=fz;_c.register("single",{create:function(t,e){var i=[];return t.eachComponent("singleAxis",(function(n,a){var r=new gz(n,t,e);r.name="single_"+a,r.resize(n,e),n.coordinateSystem=r,i.push(r)})),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:gz.prototype.dimensions});var mz={},vz=b;mz.layout=function(t,e){e=e||{};var i=t.coordinateSystem,n=t.axis,a={},r=n.position,o=n.orient,s=i.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],h={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};a.position=["vertical"===o?h.vertical[r]:l[0],"horizontal"===o?h.horizontal[r]:l[3]],a.rotation=Math.PI/2*{horizontal:0,vertical:1}[o],a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,right:1,left:-1}[r],t.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),vz.retrieve(e.labelInside,t.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var u=e.rotate;return null==u&&(u=t.get("axisLabel.rotate")),a.labelRotation="top"===r?-u:u,a.labelInterval=n.getLabelInterval(),a.z2=1,a};var yz=b,xz=yy,_z=Vr,bz=mz,wz=Oy,Sz=xz.getInterval,Mz=xz.ifIgnoreOnTick,Iz=["axisLine","axisTickLabel","axisName"],Az=wz.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,i,n){var a=this.group;a.removeAll();var r=bz.layout(t),o=new xz(t,r);yz.each(Iz,o.add,o),a.add(o.getGroup()),t.get("splitLine.show")&&this._splitLine(t,r.labelInterval),Az.superCall(this,"render",t,e,i,n)},_splitLine:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitLine"),a=n.getModel("lineStyle"),r=a.get("width"),o=a.get("color"),s=Sz(n,e);o=o instanceof Array?o:[o];for(var l=t.coordinateSystem.getRect(),h=i.isHorizontal(),u=[],c=0,d=i.getTicksCoords(),p=[],f=[],g=t.get("axisLabel.showMinLabel"),m=t.get("axisLabel.showMaxLabel"),v=0;v=0&&s<0)&&(o=f,s=p,a=h,r.length=0),Vz(u,(function(t){r.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:r,snapToValue:a}}(e,t),s=o.payloadBatch,l=o.snapToValue;s[0]&&null==a.seriesIndex&&zz.extend(a,s[0]),!n&&t.snap&&r.containData(l)&&null!=l&&(e=l),i.showPointer(t,e,s,a),i.showTooltip(t,o,l)}else i.showPointer(t,e)}function Hz(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function Fz(t,e,i,n){var a=i.payloadBatch,r=e.axis,o=r.model,s=e.axisPointerModel;if(e.triggerTooltip&&a.length){var l=e.coordSys.model,h=Rz.makeKey(l),u=t.map[h];u||(u=t.map[h]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(u)),u.dataByAxis.push({axisDim:r.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:a.slice()})}}function Zz(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 Uz(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}var jz=function(t,e,i){var n=t.currTrigger,a=[t.x,t.y],r=t,o=t.dispatchAction||zz.bind(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Uz(a)&&(a=Nz({seriesIndex:r.seriesIndex,dataIndex:r.dataIndex},e).point);var l=Uz(a),h=r.axesInfo,u=s.axesInfo,c="leave"===n||Uz(a),d={},p={},f={list:[],map:{}},g={showPointer:Bz(Hz,p),showTooltip:Bz(Fz,f)};Vz(s.coordSysMap,(function(t,e){var i=l||t.containPoint(a);Vz(s.coordSysAxesInfo[e],(function(t,e){var n=t.axis,r=function(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}}(h,t);if(!c&&i&&(!h||r)){var o=r&&r.value;null!=o||l||(o=n.pointToData(a)),null!=o&&Wz(t,o,g,!1,d)}}))}));var m={};return Vz(u,(function(t,e){var i=t.linkGroup;i&&!p[e]&&Vz(i.axesInfo,(function(e,n){var a=p[n];if(e!==t&&a){var r=a.value;i.mapper&&(r=t.axis.scale.parse(i.mapper(r,Zz(e),Zz(t)))),m[t.key]=r}}))})),Vz(m,(function(t,e){Wz(u[e],t,g,!0,d)})),function(t,e,i){var n=i.axesInfo=[];Vz(e,(function(e,i){var a=e.axisPointerModel.option,r=t[i];r?(!e.useHandle&&(a.status="show"),a.value=r.value,a.seriesDataIndices=(r.payloadBatch||[]).slice()):!e.useHandle&&(a.status="hide"),"show"===a.status&&n.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:a.value})}))}(p,u,d),function(t,e,i,n){if(Uz(e)||!t.list.length)return void n({type:"hideTip"});var a=((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:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:t.list})}(f,a,t,o),function(t,e,i){var n=i.getZr(),a="axisPointerLastHighlights",r=Gz(n)[a]||{},o=Gz(n)[a]={};Vz(t,(function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&Vz(i.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;o[e]=t}))}));var s=[],l=[];zz.each(r,(function(t,e){!o[e]&&l.push(t)})),zz.each(o,(function(t,e){!r[e]&&s.push(t)})),l.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}(u,0,i),d}};m.extendComponentModel({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}});var qz={},Xz=b,Yz=_,$z=ur.makeGetter(),Kz=Xz.each;function Jz(t,e,i){t.handler("leave",null,i)}function Qz(t,e,i,n){e.handler(t,i,n)}qz.register=function(t,e,i){if(!Yz.node){var n=e.getZr();$z(n).records||($z(n).records={}),function(t,e){if($z(t).initialized)return;function i(i,n){t.on(i,(function(i){var a=function(t){var e={showTip:[],hideTip:[]},i=function(n){var a=e[n.type];a?a.push(n):(n.dispatchAction=i,t.dispatchAction(n))};return{dispatchAction:i,pendings:e}}(e);Kz($z(t).records,(function(t){t&&n(t,i,a.dispatchAction)})),function(t,e){var i,n=t.showTip.length,a=t.hideTip.length;n?i=t.showTip[n-1]:a&&(i=t.hideTip[a-1]);i&&(i.dispatchAction=null,e.dispatchAction(i))}(a.pendings,e)}))}$z(t).initialized=!0,i("click",Xz.curry(Qz,"click")),i("mousemove",Xz.curry(Qz,"mousemove")),i("globalout",Jz)}(n,e),($z(n).records[t]||($z(n).records[t]={})).handler=i}},qz.unregister=function(t,e){if(!Yz.node){var i=e.getZr();($z(i).records||{})[t]&&($z(i).records[t]=null)}};var tE=qz,eE=m.extendComponentView({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),a=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";tE.register("axisPointer",i,(function(t,e,i){"none"!==a&&("leave"===t||a.indexOf(t)>=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},remove:function(t,e){tE.unregister(e.getZr(),"axisPointer"),eE.superApply(this._model,"remove",arguments)},dispose:function(t,e){tE.unregister("axisPointer",e),eE.superApply(this._model,"dispose",arguments)}}),iE=b,nE=Ar,aE=Vr,rE=xy,oE=fa,sE=Ed,lE=ur.makeGetter(),hE=iE.clone,uE=iE.bind;function cE(){}function dE(t,e,i,n){pE(lE(i).lastProp,n)||(lE(i).lastProp=n,e?aE.updateProps(i,n,t):(i.stopAnimation(),i.attr(n)))}function pE(t,e){if(iE.isObject(t)&&iE.isObject(e)){var i=!0;return iE.each(e,(function(e,n){i=i&&pE(t[n],e)})),!!i}return t===e}function fE(t,e){t[e.get("label.show")?"show":"hide"]()}function gE(t){return{position:t.position.slice(),rotation:t.rotation||0}}function mE(t,e,i){var n=e.get("z"),a=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=a&&(t.zlevel=a),t.silent=i)}))}cE.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,n){var a=e.get("value"),r=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==a||this._lastStatus!==r){this._lastValue=a,this._lastStatus=r;var o=this._group,s=this._handle;if(!r||"hide"===r)return o&&o.hide(),void(s&&s.hide());o&&o.show(),s&&s.show();var l={};this.makeElOption(l,a,t,e,i);var h=l.graphicKey;h!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=h;var u=this._moveAnimation=this.determineAnimation(t,e);if(o){var c=iE.curry(dE,e,u);this.updatePointerEl(o,l,c,e),this.updateLabelEl(o,l,c,e)}else o=this._group=new aE.Group,this.createPointerEl(o,l,t,e),this.createLabelEl(o,l,t,e),i.getZr().add(o);mE(o,e,!0),this._renderHandle(a)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,a="category"===n.type,r=e.get("snap");if(!r&&!a)return!1;if("auto"===i||null==i){var o=this.animationThreshold;if(a&&n.getBandWidth()>o)return!0;if(r){var s=rE.getAxisInfo(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1}return!0===i},makeElOption:function(t,e,i,n,a){},createPointerEl:function(t,e,i,n){var a=e.pointer;if(a){var r=lE(t).pointerEl=new aE[a.type](hE(e.pointer));t.add(r)}},createLabelEl:function(t,e,i,n){if(e.label){var a=lE(t).labelEl=new aE.Rect(hE(e.label));t.add(a),fE(a,n)}},updatePointerEl:function(t,e,i){var n=lE(t).pointerEl;n&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var a=lE(t).labelEl;a&&(a.setStyle(e.label.style),i(a,{shape:e.label.shape,position:e.label.position}),fE(a,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,i=this._axisPointerModel,n=this._api.getZr(),a=this._handle,r=i.getModel("handle"),o=i.get("status");if(!r.get("show")||!o||"hide"===o)return a&&n.remove(a),void(this._handle=null);this._handle||(e=!0,a=this._handle=aE.createIcon(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){oE.stop(t.event)},onmousedown:uE(this._onHandleDragMove,this,0,0),drift:uE(this._onHandleDragMove,this),ondragend:uE(this._onHandleDragEnd,this)}),n.add(a)),mE(a,i,!1);a.setStyle(r.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=r.get("size");iE.isArray(s)||(s=[s,s]),a.attr("scale",[s[0]/2,s[1]/2]),sE.createOrUpdate(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){dE(this._axisPointerModel,!e&&this._moveAnimation,this._handle,gE(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(gE(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(gE(n)),lE(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{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}},cE.prototype.constructor=cE,nE.enableClassExtend(cE);var vE=cE,yE={},xE=b,_E=Vr,bE=Ni,wE=cr,SE=mt,ME=Rp,IE=yy;function AE(t,e,i,n,a){var r=TE(i.get("value"),e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),o=i.getModel("label"),s=wE.normalizeCssArray(o.get("padding")||0),l=o.getFont(),h=bE.getBoundingRect(r,l),u=a.position,c=h.width+s[1]+s[3],d=h.height+s[0]+s[2],p=a.align;"right"===p&&(u[0]-=c),"center"===p&&(u[0]-=c/2);var f=a.verticalAlign;"bottom"===f&&(u[1]-=d),"middle"===f&&(u[1]-=d/2),function(t,e,i,n){var a=n.getWidth(),r=n.getHeight();t[0]=Math.min(t[0]+e,a)-e,t[1]=Math.min(t[1]+i,r)-i,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(u,c,d,n);var g=o.get("backgroundColor");g&&"auto"!==g||(g=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:d,r:o.get("borderRadius")},position:u.slice(),style:{text:r,textFont:l,textFill:o.getTextColor(),textPosition:"inside",fill:g,stroke:o.get("borderColor")||"transparent",lineWidth:o.get("borderWidth")||0,shadowBlur:o.get("shadowBlur"),shadowColor:o.get("shadowColor"),shadowOffsetX:o.get("shadowOffsetX"),shadowOffsetY:o.get("shadowOffsetY")},z2:10}}function TE(t,e,i,n,a){var r=e.scale.getLabel(t,{precision:a.precision}),o=a.formatter;if(o){var s={value:ME.getAxisRawValue(e,t),seriesData:[]};xE.each(n,(function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,a=e&&e.getDataParams(n);a&&s.seriesData.push(a)})),xE.isString(o)?r=o.replace("{value}",r):xE.isFunction(o)&&(r=o(s))}return r}function CE(t,e,i){var n=SE.create();return SE.rotate(n,n,i.rotation),SE.translate(n,n,i.position),_E.applyTransform([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}yE.buildElStyle=function(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},yE.buildLabelElOption=AE,yE.getValueLabel=TE,yE.getTransformedPosition=CE,yE.buildCartesianSingleLabelElOption=function(t,e,i,n,a,r){var o=IE.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=a.get("label.margin"),AE(e,n,a,r,{position:CE(n.axis,t,i),align:o.textAlign,verticalAlign:o.textVerticalAlign})},yE.makeLineShape=function(t,e,i){return{x1:t[i=i||0],y1:t[1-i],x2:e[i],y2:e[1-i]}},yE.makeRectShape=function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}},yE.makeSectorShape=function(t,e,i,n,a,r){return{cx:t,cy:e,r0:i,r:n,startAngle:a,endAngle:r,clockwise:!0}};var LE=Vr,DE=yE,PE=zy,kE=Oy,OE=vE.extend({makeElOption:function(t,e,i,n,a){var r=i.axis,o=r.grid,s=n.get("type"),l=zE(o,r).getOtherAxis(r).getGlobalExtent(),h=r.toGlobalCoord(r.dataToCoord(e,!0));if(s&&"none"!==s){var u=DE.buildElStyle(n),c=EE[s](r,h,l,u);c.style=u,t.graphicKey=c.type,t.pointer=c}var d=PE.layout(o.model,i);DE.buildCartesianSingleLabelElOption(e,t,d,i,n,a)},getHandleTransform:function(t,e,i){var n=PE.layout(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:DE.getTransformedPosition(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var a=i.axis,r=a.grid,o=a.getGlobalExtent(!0),s=zE(r,a).getOtherAxis(a).getGlobalExtent(),l="x"===a.dim?0:1,h=t.position;h[l]+=e[l],h[l]=Math.min(o[1],h[l]),h[l]=Math.max(o[0],h[l]);var u=(s[1]+s[0])/2,c=[u,u];c[l]=h[l];return{position:h,rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}});function zE(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}var EE={line:function(t,e,i,n){var a=DE.makeLineShape([e,i[0]],[e,i[1]],RE(t));return LE.subPixelOptimizeLine({shape:a,style:n}),{type:"Line",shape:a}},shadow:function(t,e,i,n){var a=t.getBandWidth(),r=i[1]-i[0];return{type:"Rect",shape:DE.makeRectShape([e-a/2,i[0]],[a,r],RE(t))}}};function RE(t){return"x"===t.dim?0:1}kE.registerAxisPointerClass("CartesianAxisPointer",OE);var NE=m,VE=b,BE=xy,GE=jz;NE.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!VE.isArray(e)&&(t.axisPointer.link=[e])}})),NE.registerProcessor(NE.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=BE.collect(t,e)})),NE.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},GE);var WE=Vr,HE=yE,FE=mz,ZE=Oy,UE=["x","y"],jE=["width","height"],qE=vE.extend({makeElOption:function(t,e,i,n,a){var r=i.axis,o=r.coordinateSystem,s=$E(o,1-YE(r)),l=o.dataToPoint(e)[0],h=n.get("type");if(h&&"none"!==h){var u=HE.buildElStyle(n),c=XE[h](r,l,s,u);c.style=u,t.graphicKey=c.type,t.pointer=c}var d=FE.layout(i);HE.buildCartesianSingleLabelElOption(e,t,d,i,n,a)},getHandleTransform:function(t,e,i){var n=FE.layout(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:HE.getTransformedPosition(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var a=i.axis,r=a.coordinateSystem,o=YE(a),s=$E(r,o),l=t.position;l[o]+=e[o],l[o]=Math.min(s[1],l[o]),l[o]=Math.max(s[0],l[o]);var h=$E(r,1-o),u=(h[1]+h[0])/2,c=[u,u];return c[o]=l[o],{position:l,rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}}}),XE={line:function(t,e,i,n){var a=HE.makeLineShape([e,i[0]],[e,i[1]],YE(t));return WE.subPixelOptimizeLine({shape:a,style:n}),{type:"Line",shape:a}},shadow:function(t,e,i,n){var a=t.getBandWidth(),r=i[1]-i[0];return{type:"Rect",shape:HE.makeRectShape([e-a/2,i[0]],[a,r],YE(t))}}};function YE(t){return t.isHorizontal()?0:1}function $E(t,e){var i=t.getRect();return[i[UE[e]],i[UE[e]]+i[jE[e]]]}ZE.registerAxisPointerClass("SingleAxisPointer",qE),m.extendComponentView({type:"single"});var KE=wp,JE=yd,QE=dp,tR=b,eR=cr.encodeHTML,iR=GD,nR=JE.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){nR.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},fixData:function(t){for(var e=t.length,i=iR().key((function(t){return t[2]})).entries(t),n=tR.map(i,(function(t){return{name:t.key,dataList:t.values}})),a=n.length,r=-1,o=-1,s=0;sr&&(r=l,o=s)}for(var h=0;hr&&(r=h),n.push(h)}for(var u=0;ur&&(r=d)}return o.y0=a,o.max=r,o}(o),l=s.y0,h=i/s.max,u=r.length,c=r[0].indices.length,d=0;dn[1]&&n.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:DR.bind((function(n){var a=e.dataToRadius(n[0]),r=i.dataToAngle(n[1]),o=t.coordToPoint([a,r]);return o.push(a,r*Math.PI/180),o})),size:DR.bind(PR,t)}}},OR=b;var zR=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:OR.bind(t.dataToPoint,t)}}},ER=m,RR=b,NR=Vr,VR=jg.findLabelValueDim,BR=Ep,GR=ox,WR=$d,HR=["itemStyle","normal"],FR=["itemStyle","emphasis"],ZR=["label","normal"],UR=["label","emphasis"],jR={cartesian2d:SR,geo:AR,singleAxis:LR,polar:kR,calendar:zR};function qR(t,e,i,n,a){null==i[t]||a||(e[t]=i[t],i[t]=n[t])}function XR(t){var e={};return RR.each(t.dimensions,(function(i,n){var a=t.getDimensionInfo(i);if(!a.isExtraCoord){var r=a.coordDim;(e[r]=e[r]||[])[a.coordDimIndex]=n}})),e}function YR(t,e,i,n,a,r){(t=$R(t,e,i,n,a,r))&&r.setItemGraphicEl(e,t)}function $R(t,e,i,n,a,r){var o=i.type;if(!t||o===t.__customGraphicType||"path"===o&&i.pathData===t.__customPathData||"image"===o&&i.style.image===t.__customImagePath||"text"===o&&i.style.text===t.__customText||(a.remove(t),t=null),null!=o){var s,l=!t;if(!t&&(t=function(t){var e,i=t.type;if("path"===i){var n=t.shape;(e=NR.makePath(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 NR.Image({})).__customImagePath=t.style.image:"text"===i?(e=new NR.Text({})).__customText=t.style.text:e=new(0,NR[i.charAt(0).toUpperCase()+i.slice(1)]);return e.__customGraphicType=i,e.name=t.name,e}(i)),function(t,e,i,n,a,r){var o={},s=i.style||{};if(i.shape&&(o.shape=RR.clone(i.shape)),i.position&&(o.position=i.position.slice()),i.scale&&(o.scale=i.scale.slice()),i.origin&&(o.origin=i.origin.slice()),i.rotation&&(o.rotation=i.rotation),"image"===t.type&&i.style){var l=o.style={};RR.each(["x","y","width","height"],(function(e){qR(e,l,s,t.style,r)}))}"text"===t.type&&i.style&&(l=o.style={},RR.each(["x","y"],(function(e){qR(e,l,s,t.style,r)})),!s.hasOwnProperty("textFill")&&s.fill&&(s.textFill=s.fill),!s.hasOwnProperty("textStroke")&&s.stroke&&(s.textStroke=s.stroke));if("group"!==t.type&&(t.useStyle(s),r)){t.style.opacity=0;var h=s.opacity;null==h&&(h=1),NR.initProps(t,{style:{opacity:h}},n,e)}r?t.attr(o):NR.updateProps(t,o,n,e),t.attr({z2:i.z2||0,silent:i.silent}),!1!==i.styleEmphasis&&NR.setHoverStyle(t,i.styleEmphasis)}(t,e,i,n,0,l),"group"===o){var h=t.children()||[],u=i.children||[];if(i.diffChildrenByName)new WR((s={oldChildren:h,newChildren:u,dataIndex:e,animatableModel:n,group:t,data:r}).oldChildren,s.newChildren,KR,KR,s).add(JR).update(JR).remove(QR).execute();else{for(var c=0;c=0;l--)null==a[l]?a.splice(l,1):delete a[l].$action},_flatten:function(t,e,i){eN.each(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}});function oN(t,e,i,n){var a=i.type,r=new(0,nN[a.charAt(0).toUpperCase()+a.slice(1)])(i);e.add(r),n.set(t,r),r.__ecGraphicId=t}function sN(t,e){var i=t&&t.parent;i&&("group"===t.type&&t.traverse((function(t){sN(t,e)})),e.removeKey(t.__ecGraphicId),i.remove(t))}function lN(t,e){var i;return eN.each(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(i=!0)})),i}tN.extendComponentView({type:"graphic",init:function(t,e){this._elMap=eN.createHashMap(),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,a=this.group;eN.each(i,(function(t){var e=t.$action,i=t.id,r=n.get(i),o=t.parentId,s=null!=o?n.get(o):a;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 h=function(t){return t=eN.extend({},t),eN.each(["id","parentId","$action","hv","bounding"].concat(aN.LOCATION_PARAMS),(function(e){delete t[e]})),t}(t);e&&"merge"!==e?"replace"===e?(sN(r,n),oN(i,s,h,n)):"remove"===e&&sN(r,n):r?r.attr(h):oN(i,s,h,n);var u=n.get(i);u&&(u.__ecGraphicWidth=t.width,u.__ecGraphicHeight=t.height)}))}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,a=this._elMap,r=i.length-1;r>=0;r--){var o=i[r],s=a.get(o.id);if(s){var l=s.parent,h=l===n?{width:e.getWidth(),height:e.getHeight()}:{width:l.__ecGraphicWidth||0,height:l.__ecGraphicHeight||0};aN.positionElement(s,o,h,null,{hv:o.hv,boundingMode:o.bounding})}}},_clear:function(){var t=this._elMap;t.each((function(e){sN(e,t)})),this._elMap=eN.createHashMap()},dispose:function(){this._clear()}});var hN=b,uN=ru,cN=m.extendComponentModel({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){cN.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}}}),dN=cN,pN=m,fN=b;function gN(t,e,i){var n,a={},r="toggleSelected"===t;return i.eachComponent("legend",(function(i){r&&null!=n?i[n?"select":"unSelect"](e.name):(i[t](e.name),n=i.isSelected(e.name));var o=i.getData();fN.each(o,(function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);a.hasOwnProperty(e)?a[e]=a[e]&&n:a[e]=n}}))})),{name:e.name,selected:a}}pN.registerAction("legendToggleSelect","legendselectchanged",fN.curry(gN,"toggleSelected")),pN.registerAction("legendSelect","legendselected",fN.curry(gN,"select")),pN.registerAction("legendUnSelect","legendunselected",fN.curry(gN,"unSelect"));var mN={},vN=wu,yN=vN.getLayoutRect,xN=vN.box,_N=vN.positionElement,bN=cr,wN=Vr;mN.layout=function(t,e,i){var n=e.getBoxLayoutParams(),a=e.get("padding"),r={width:i.getWidth(),height:i.getHeight()},o=yN(n,r,a);xN(e.get("orient"),t,e.get("itemGap"),o.width,o.height),_N(t,n,r,a)},mN.makeBackground=function(t,e){var i=bN.normalizeCssArray(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),t=new wN.Rect({shape:{x:t.x-i[3],y:t.y-i[0],width:t.width+i[1]+i[3],height:t.height+i[0]+i[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1})};var SN=m,MN=b,IN=Hf.createSymbol,AN=Vr,TN=mN.makeBackground,CN=wu,LN=MN.curry,DN=MN.each,PN=AN.Group;function kN(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function ON(t,e,i){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||t.get("legendHoverLink")&&i.dispatchAction({type:"highlight",seriesName:t.name,name:e})}function zN(t,e,i){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||t.get("legendHoverLink")&&i.dispatchAction({type:"downplay",seriesName:t.name,name:e})}var EN=SN.extendComponentView({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new PN),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 a=t.getBoxLayoutParams(),r={width:i.getWidth(),height:i.getHeight()},o=t.get("padding"),s=CN.getLayoutRect(a,r,o),l=this.layoutInner(t,n,s),h=CN.getLayoutRect(MN.defaults({width:l.width,height:l.height},a),r,o);this.group.attr("position",[h.x-l.x,h.y-l.y]),this.group.add(this._backgroundEl=TN(l,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(t,e,i,n){var a=this.getContentGroup(),r=MN.createHashMap(),o=e.get("selectedMode");DN(e.getData(),(function(s,l){var h=s.get("name");if(this.newlineDisabled||""!==h&&"\n"!==h){var u=i.getSeriesByName(h)[0];if(!r.get(h))if(u){var c=u.getData(),d=c.getVisual("color");"function"==typeof d&&(d=d(u.getDataParams(0)));var p=c.getVisual("legendSymbol")||"roundRect",f=c.getVisual("symbol");this._createItem(h,l,s,e,p,f,t,d,o).on("click",LN(kN,h,n)).on("mouseover",LN(ON,u,null,n)).on("mouseout",LN(zN,u,null,n)),r.set(h,!0)}else i.eachRawSeries((function(i){if(!r.get(h)&&i.legendDataProvider){var a=i.legendDataProvider(),u=a.indexOfName(h);if(u<0)return;var c=a.getItemVisual(u,"color");this._createItem(h,l,s,e,"roundRect",null,t,c,o).on("click",LN(kN,h,n)).on("mouseover",LN(ON,i,h,n)).on("mouseout",LN(zN,i,h,n)),r.set(h,!0)}}),this)}else a.add(new PN({newline:!0}))}),this)},_createItem:function(t,e,i,n,a,r,o,s,l){var h=n.get("itemWidth"),u=n.get("itemHeight"),c=n.get("inactiveColor"),d=n.isSelected(t),p=new PN,f=i.getModel("textStyle"),g=i.get("icon"),m=i.getModel("tooltip"),v=m.parentModel;if(a=g||a,p.add(IN(a,0,0,h,u,d?s:c,!0)),!g&&r&&(r!==a||"none"==r)){var y=.8*u;"none"===r&&(r="circle"),p.add(IN(r,(h-y)/2,(u-y)/2,y,y,d?s:c))}var x="left"===o?h+5:-5,_=o,b=n.get("formatter"),w=t;"string"==typeof b&&b?w=b.replace("{name}",null!=t?t:""):"function"==typeof b&&(w=b(t)),p.add(new AN.Text({style:AN.setTextStyle({},f,{text:w,x:x,y:u/2,textFill:d?f.getTextColor():c,textAlign:_,textVerticalAlign:"middle"})}));var S=new AN.Rect({shape:p.getBoundingRect(),invisible:!0,tooltip:m.get("show")?MN.extend({content:t,formatter:v.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},m.option):null});return p.add(S),p.eachChild((function(t){t.silent=!0})),S.silent=!l,this.getContentGroup().add(p),AN.setHoverStyle(p),p.__legendDataIndex=e,p},layoutInner:function(t,e,i){var n=this.getContentGroup();CN.box(t.get("orient"),n,t.get("itemGap"),i.width,i.height);var a=n.getBoundingRect();return n.attr("position",[-a.x,-a.y]),this.group.getBoundingRect()}});var RN=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries((function(t){for(var i=0;ii[s],p=[-u.x,-u.y];p[o]=n.position[o];var f=[0,0],g=[-c.x,-c.y],m=ZN.retrieve2(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?g[o]+=i[s]-c[s]:f[o]+=c[s]+m);g[1-o]+=u[l]/2-c[l]/2,n.attr("position",p),a.attr("position",f),r.attr("position",g);var v=this.group.getBoundingRect();if((v={x:0,y:0})[s]=d?i[s]:u[s],v[l]=Math.max(u[l],c[l]),v[h]=Math.min(0,c[h]+g[1-o]),a.__rectSize=i[s],d){var y={x:0,y:0};y[s]=Math.max(i[s]-c[s]-m,0),y[l]=v[l],a.setClipPath(new UN.Rect({shape:y})),a.__rectSize=y[s]}else r.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var x=this._getPageInfo(t);return null!=x.pageIndex&&UN.updateProps(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;ZN.each(["pagePrev","pageNext"],(function(n){var a=null!=e[n+"DataIndex"],r=i.childOfName(n);r&&(r.setStyle("fill",a?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),r.cursor=a?"pointer":"default")}));var n=i.childOfName("pageText"),a=t.get("pageFormatter"),r=e.pageIndex,o=null!=r?r+1:0,s=e.pageCount;n&&a&&n.setStyle("text",ZN.isString(a)?a.replace("{current}",o).replace("{total}",s):a({current:o,total:s}))},_getPageInfo:function(t){var e,i,n,a,r=t.get("scrollDataIndex",!0),o=this.getContentGroup(),s=o.getBoundingRect(),l=this._containerGroup.__rectSize,h=t.getOrient().index,u=YN[h],c=YN[1-h],d=$N[h],p=o.position.slice();this._showController?o.eachChild((function(t){t.__legendDataIndex===r&&(a=t)})):a=o.childAt(0);var f=l?Math.ceil(s[u]/l):0;if(a){var g=a.getBoundingRect(),m=a.position[h]+g[d];p[h]=-m-s[d],e=Math.floor(f*(m+g[d]+l/2)/s[u]),e=s[u]&&f?Math.max(0,Math.min(f-1,e)):-1;var v,y={x:0,y:0};y[u]=l,y[c]=s[c],y[d]=-p[h]-s[d];var x=o.children();if(o.eachChild((function(t,e){var i=b(t);i.intersect(y)&&(null==v&&(v=e),n=t.__legendDataIndex),e===x.length-1&&i[d]+i[u]<=y[d]+y[u]&&(n=null)})),null!=v){var _=b(x[v]);if(y[d]=_[d]+_[u]-y[u],v<=0&&_[d]>=y[d])i=null;else{for(;v>0&&b(x[v-1]).intersect(y);)v--;i=x[v].__legendDataIndex}}}return{contentPosition:p,pageIndex:e,pageCount:f,pagePrevDataIndex:i,pageNextDataIndex:n};function b(t){var e=t.getBoundingRect().clone();return e[d]+=t.position[h],e}}});m.registerAction("legendScroll","legendscroll",(function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(i)}))})),m.extendComponentModel({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 JN=b,QN=Pt,tV=fa,eV=_,iV=cr,nV=JN.each,aV=iV.toCamelCase,rV=["","-webkit-","-moz-","-o-"];function oV(t){var e,i,n,a=[],r=t.get("transitionDuration"),o=t.get("backgroundColor"),s=t.getModel("textStyle"),l=t.get("padding");return r&&a.push((n="left "+(e=r)+"s "+(i="cubic-bezier(0.23, 1, 0.32, 1)")+",top "+e+"s "+i,JN.map(rV,(function(t){return t+"transition:"+n})).join(";"))),o&&(eV.canvasSupported?a.push("background-Color:"+o):(a.push("background-Color:#"+QN.toHex(o)),a.push("filter:alpha(opacity=70)"))),nV(["width","color","radius"],(function(e){var i="border-"+e,n=aV(i),r=t.get(n);null!=r&&a.push(i+":"+r+("color"===e?"":"px"))})),a.push(function(t){var e=[],i=t.get("fontSize"),n=t.getTextColor();return n&&e.push("color:"+n),e.push("font:"+t.getFont()),i&&e.push("line-height:"+Math.round(3*i/2)+"px"),nV(["decoration","align"],(function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)})),e.join(";")}(s)),null!=l&&a.push("padding:"+iV.normalizeCssArray(l).join("px ")+"px"),a.join(";")+";"}function sV(t,e){var i=document.createElement("div"),n=this._zr=e.getZr();this.el=i,this._x=e.getWidth()/2,this._y=e.getHeight()/2,t.appendChild(i),this._container=t,this._show=!1,this._hideTimeout;var a=this;i.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},i.onmousemove=function(e){if(e=e||window.event,!a._enterable){var i=n.handler;tV.normalizeEvent(t,e,!0),i.dispatch("mousemove",e)}},i.onmouseleave=function(){a._enterable&&a._show&&a.hideLater(a._hideDelay),a._inContent=!1}}sV.prototype={constructor:sV,_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;"+oV(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 a=this.el.style;a.left=t+"px",a.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(JN.bind(this.hide,this),t)):this.hide())},isShow:function(){return this._show}};var lV=m,hV=b,uV=_,cV=sV,dV=cr,pV=dr,fV=Vr,gV=Oz,mV=wu,vV=ru,yV=qz,xV=Rp,_V=yE,bV=hV.bind,wV=hV.each,SV=pV.parsePercent,MV=new fV.Rect({shape:{x:-1,y:-1,width:2,height:2}});function IV(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(i instanceof vV&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new vV(i,e,e.ecModel))}return e}function AV(t,e){return t.dispatchAction||hV.bind(e.dispatchAction,e)}function TV(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 CV(t){return"center"===t||"middle"===t}lV.extendComponentView({type:"tooltip",init:function(t,e){if(!uV.node){var i=new cV(e.getDom(),e);this._tooltipContent=i}},render:function(t,e,i){if(!uV.node){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");yV.register("itemTooltip",this._api,bV((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&&!uV.node){var a=AV(n,i);this._ticket="";var r=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var o=MV;o.position=[n.x,n.y],o.update(),o.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:o},a)}else if(r)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,event:{},dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},a);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var s=gV(n,e),l=s.point[0],h=s.point[1];null!=l&&null!=h&&this._tryShow({offsetX:l,offsetY:h,position:n.position,target:s.el,event:{}},a)}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:{}},a))}},manuallyHideTip:function(t,e,i,n){var a=this._tooltipContent;this._alwaysShowContent||a.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(AV(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var a=n.seriesIndex,r=n.dataIndex,o=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=a&&null!=r&&null!=o){var s=e.getSeriesByIndex(a);if(s)if("axis"===(t=IV([s.getData().getItemModel(r),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:a,dataIndex:r,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=hV.bind(e,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var i=this._ecModel,n=this._tooltipModel,a=[e.offsetX,e.offsetY],r=[],o=[],s=IV([e.tooltipOption,n]);wV(t,(function(t){wV(t.dataByAxis,(function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),n=t.value,a=[];if(e&&null!=n){var s=_V.getValueLabel(n,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);hV.each(t.seriesDataIndices,(function(r){var l=i.getSeriesByIndex(r.seriesIndex),h=r.dataIndexInside,u=l&&l.getDataParams(h);u.axisDim=t.axisDim,u.axisIndex=t.axisIndex,u.axisType=t.axisType,u.axisId=t.axisId,u.axisValue=xV.getAxisRawValue(e.axis,n),u.axisValueLabel=s,u&&(o.push(u),a.push(l.formatTooltip(h,!0)))}));var l=s;r.push((l?dV.encodeHTML(l)+"
":"")+a.join("
"))}}))}),this),r.reverse(),r=r.join("

");var l=e.position;this._showOrMove(s,(function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(s,l,a[0],a[1],this._tooltipContent,o):this._showTooltipContent(s,r,o,Math.random(),a[0],a[1],l)}))},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,a=e.seriesIndex,r=n.getSeriesByIndex(a),o=e.dataModel||r,s=e.dataIndex,l=e.dataType,h=o.getData(),u=IV([h.getItemModel(s),o,r&&(r.coordinateSystem||{}).model,this._tooltipModel]),c=u.get("trigger");if(null==c||"item"===c){var d=o.getDataParams(s,l),p=o.formatTooltip(s,!1,l),f="item_"+o.name+"_"+s;this._showOrMove(u,(function(){this._showTooltipContent(u,p,d,f,t.offsetX,t.offsetY,t.position,t.target)})),i({type:"showTip",dataIndexInside:s,dataIndex:h.getRawIndex(s),seriesIndex:a,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){n={content:n,formatter:n}}var a=new vV(n,this._tooltipModel,this._ecModel),r=a.get("content"),o=Math.random();this._showOrMove(a,(function(){this._showTooltipContent(a,r,a.get("formatterParams")||{},o,t.offsetX,t.offsetY,t.position,e)})),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,a,r,o,s){if(this._ticket="",t.get("showContent")&&t.get("show")){var l=this._tooltipContent,h=t.get("formatter");o=o||t.get("position");var u=e;if(h&&"string"==typeof h)u=dV.formatTpl(h,i,!0);else if("function"==typeof h){var c=bV((function(e,n){e===this._ticket&&(l.setContent(n),this._updatePosition(t,o,a,r,l,i,s))}),this);this._ticket=n,u=h(i,n,c)}l.setContent(u),l.show(t),this._updatePosition(t,o,a,r,l,i,s)}},_updatePosition:function(t,e,i,n,a,r,o){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var h=a.getSize(),u=t.get("align"),c=t.get("verticalAlign"),d=o&&o.getBoundingRect().clone();if(o&&d.applyTransform(o.transform),"function"==typeof e&&(e=e([i,n],r,a.el,d,{viewSize:[s,l],contentSize:h.slice()})),hV.isArray(e))i=SV(e[0],s),n=SV(e[1],l);else if(hV.isObject(e)){e.width=h[0],e.height=h[1];var p=mV.getLayoutRect(e,{width:s,height:l});i=p.x,n=p.y,u=null,c=null}else if("string"==typeof e&&o){var f=function(t,e,i){var n=i[0],a=i[1],r=5,o=0,s=0,l=e.width,h=e.height;switch(t){case"inside":o=e.x+l/2-n/2,s=e.y+h/2-a/2;break;case"top":o=e.x+l/2-n/2,s=e.y-a-r;break;case"bottom":o=e.x+l/2-n/2,s=e.y+h+r;break;case"left":o=e.x-n-r,s=e.y+h/2-a/2;break;case"right":o=e.x+l+r,s=e.y+h/2-a/2}return[o,s]}(e,d,h);i=f[0],n=f[1]}else{f=function(t,e,i,n,a,r,o){var s=TV(i),l=s.width,h=s.height;null!=r&&(t+l+r>n?t-=l+r:t+=r);null!=o&&(e+h+o>a?e-=h+o:e+=o);return[t,e]}(i,n,a.el,s,l,u?null:20,c?null:20);i=f[0],n=f[1]}if(u&&(i-=CV(u)?h[0]/2:"right"===u?h[0]:0),c&&(n-=CV(c)?h[1]/2:"bottom"===c?h[1]:0),t.get("confine")){f=function(t,e,i,n,a){var r=TV(i),o=r.width,s=r.height;return t=Math.min(t+o,n)-o,e=Math.min(e+s,a)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(i,n,a.el,s,l);i=f[0],n=f[1]}a.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&wV(e,(function(e,n){var a=e.dataByAxis||{},r=(t[n]||{}).dataByAxis||[];(i&=a.length===r.length)&&wV(a,(function(t,e){var n=r[e]||{},a=t.seriesDataIndices||[],o=n.seriesDataIndices||[];(i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&a.length===o.length)&&wV(a,(function(t,e){var n=o[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){uV.node||(this._tooltipContent.hide(),yV.unregister("itemTooltip",e))}});var LV=m;LV.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},(function(){})),LV.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},(function(){}));var DV=b,PV=dr.parsePercent;function kV(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function OV(t){return t.dim}var zV=function(t,e,i){var n=i.getWidth(),a=i.getHeight(),r={},o={},s=function(t,e){var i={};DV.each(t,(function(t,e){var n=t.getData(),a=t.coordinateSystem.getBaseAxis(),r=a.getExtent(),o="category"===a.type?a.getBandWidth():Math.abs(r[1]-r[0])/n.count(),s=i[OV(a)]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},l=s.stacks;i[OV(a)]=s;var h=kV(t);l[h]||s.autoWidthCount++,l[h]=l[h]||{width:0,maxWidth:0};var u=PV(t.get("barWidth"),o),c=PV(t.get("barMaxWidth"),o),d=t.get("barGap"),p=t.get("barCategoryGap");u&&!l[h].width&&(u=Math.min(s.remainedWidth,u),l[h].width=u,s.remainedWidth-=u),c&&(l[h].maxWidth=c),null!=d&&(s.gap=d),null!=p&&(s.categoryGap=p)}));var n={};return DV.each(i,(function(t,e){n[e]={};var i=t.stacks,a=t.bandWidth,r=PV(t.categoryGap,a),o=PV(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,h=(s-r)/(l+(l-1)*o);h=Math.max(h,0),DV.each(i,(function(t,e){var i=t.maxWidth;i&&i=0?"p":"n",S=i.pointToCoord(M[n]),I=o[u][n][g];if("radius"===f.dim)a=I,s=S[0],c=(h=(-S[1]+d)*Math.PI/180)+p*Math.PI/180,Math.abs(s)0?C=T[1]:C===T[1]&&t<0&&(C=T[0]),o[u][n][g]=C}e.setItemLayout(n,{cx:m,cy:v,r0:a,r:s,startAngle:h,endAngle:c})}}),!0)}}),this)},EV=b,RV=gg;function NV(t,e){RV.call(this,"radius",t,e),this.type="category"}NV.prototype={constructor:NV,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:RV.prototype.dataToCoord,radiusToData:RV.prototype.coordToData},EV.inherits(NV,RV);var VV=NV,BV=b,GV=gg;function WV(t,e){e=e||[0,360],GV.call(this,"angle",t,e),this.type="category"}WV.prototype={constructor:WV,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:GV.prototype.dataToCoord,angleToData:GV.prototype.coordToData},BV.inherits(WV,GV);var HV=VV,FV=WV,ZV=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new HV,this._angleAxis=new FV,this._radiusAxis.polar=this._angleAxis.polar=this};ZV.prototype={type:"polar",axisPointerEnabled:!0,constructor:ZV,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(),a=n.getExtent(),r=Math.min(a[0],a[1]),o=Math.max(a[0],a[1]);n.inverse?r=o-360:o=r+360;var s=Math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=Math.atan2(-i,e)/Math.PI*180,h=lo;)l+=360*h;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 UV=ZV,jV=b,qV=wv,XV=Wf,YV=Zu.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});jV.merge(YV.prototype,XV);var $V={splitNumber:5};function KV(t,e){return e.type||(e.data?"category":"value")}qV("angle",YV,KV,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),qV("radius",YV,KV,$V),m.extendComponentModel({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 JV=UV,QV=dr.parsePercent,tB=Rp,eB=tB.createScaleByModel,iB=tB.niceScaleExtent,nB=_c;function aB(t,e){var i=this,n=i.getAngleAxis(),a=i.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),t.eachSeries((function(t){if(t.coordinateSystem===i){var e=t.getData();a.scale.unionExtentFromData(e,"radius"),n.scale.unionExtentFromData(e,"angle")}})),iB(n.scale,n.model),iB(a.scale,a.model),"category"===n.type&&!n.onBand){var r=n.getExtent(),o=360/n.scale.count();n.inverse?r[1]+=o:r[1]-=o,n.setExtent(r[0],r[1])}}function rB(t,e){if(t.type=e.get("type"),t.scale=eB(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType){t.inverse^=e.get("clockwise");var i=e.get("startAngle");t.setExtent(i,i+(t.inverse?-360:360))}e.axis=t,t.model=e}var oB={dimensions:JV.prototype.dimensions,create:function(t,e){var i=[];return t.eachComponent("polar",(function(t,n){var a=new JV(n);a.update=aB;var r=a.getRadiusAxis(),o=a.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");rB(r,s),rB(o,l),function(t,e,i){var n=e.get("center"),a=i.getWidth(),r=i.getHeight();t.cx=QV(n[0],a),t.cy=QV(n[1],r);var o=t.getRadiusAxis(),s=Math.min(a,r)/2,l=QV(e.get("radius"),s);o.inverse?o.setExtent(l,0):o.setExtent(0,l)}(a,t,e),i.push(a),t.coordinateSystem=a,a.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}};nB.register("polar",oB);var sB=b,lB=Vr,hB=ru,uB=["axisLine","axisLabel","axisTick","splitLine","splitArea"];function cB(t,e,i){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),a=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:a[0],y2:a[1]}}function dB(t){return t.getRadiusAxis().inverse?0:1}Oy.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),t.get("show")){var i=t.axis,n=i.polar,a=n.getRadiusAxis().getExtent(),r=i.getTicksCoords();"category"!==i.type&&r.pop(),sB.each(uB,(function(e){!t.get(e+".show")||i.scale.isBlank()&&"axisLine"!==e||this["_"+e](t,n,r,a)}),this)}},_axisLine:function(t,e,i,n){var a=t.getModel("axisLine.lineStyle"),r=new lB.Circle({shape:{cx:e.cx,cy:e.cy,r:n[dB(e)]},style:a.getLineStyle(),z2:1,silent:!0});r.style.fill=null,this.group.add(r)},_axisTick:function(t,e,i,n){var a=t.getModel("axisTick"),r=(a.get("inside")?-1:1)*a.get("length"),o=n[dB(e)],s=sB.map(i,(function(t){return new lB.Line({shape:cB(e,[o,o+r],t)})}));this.group.add(lB.mergePath(s,{style:sB.defaults(a.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_axisLabel:function(t,e,i,n){for(var a=t.axis,r=t.get("data"),o=t.getModel("axisLabel"),s=t.getFormattedLabels(),l=o.get("margin"),h=a.getLabelsCoords(),u=0;up?"left":"right",m=Math.abs(d[1]-f)/c<.3?"middle":d[1]>f?"top":"bottom";r&&r[u]&&r[u].textStyle&&(o=new hB(r[u].textStyle,o,o.ecModel));var v=new lB.Text({silent:!0});this.group.add(v),lB.setTextStyle(v.style,o,{x:d[0],y:d[1],textFill:o.getTextColor()||t.get("axisLine.lineStyle.color"),text:s[u],textAlign:g,textVerticalAlign:m})}},_splitLine:function(t,e,i,n){var a=t.getModel("splitLine").getModel("lineStyle"),r=a.get("color"),o=0;r=r instanceof Array?r:[r];for(var s=[],l=0;lm?"left":"right",u=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:h,verticalAlign:u}}(e,i,0,s,n.get("label.margin"));_B.buildLabelElOption(t,i,n,a,d)}});var IB={line:function(t,e,i,n,a){return"angle"===t.dim?{type:"Line",shape:_B.makeLineShape(e.coordToPoint([n[0],i]),e.coordToPoint([n[1],i]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:i}}},shadow:function(t,e,i,n,a){var r=t.getBandWidth(),o=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:_B.makeSectorShape(e.cx,e.cy,n[0],n[1],(-i-r/2)*o,(r/2-i)*o)}:{type:"Sector",shape:_B.makeSectorShape(e.cx,e.cy,i-r/2,i+r/2,0,2*Math.PI)}}};SB.registerAxisPointerClass("PolarAxisPointer",MB);var AB=m,TB=b,CB=zV;AB.registerLayout(TB.curry(CB,"bar")),AB.extendComponentView({type:"polar"});var LB=b,DB=ur,PB=Zu,kB=ru,OB=Dx,zB=jb,EB=PB.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){PB.prototype.init.apply(this,arguments),DB.defaultEmphasis(t.label,["show"])},optionUpdated:function(){var t=this.option,e=this;t.regions=zB.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=LB.reduce(t.regions||[],(function(t,i){return i.name&&t.set(i.name,new kB(i,e)),t}),LB.createHashMap()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:.75,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{normal:{show:!1,color:"#000"},emphasis:{show:!0,color:"rgb(100,0,0)"}},itemStyle:{normal:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new kB(null,this,this.ecModel)},getFormattedLabel:function(t,e){var i=this.getRegionModel(t).get("label."+e+".formatter"),n={name:t};return"function"==typeof i?(n.status=e,i(n)):"string"==typeof i?i.replace("{a}",null!=t?t:""):void 0},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}});LB.mixin(EB,OB);var RB=Dw;m.extendComponentView({type:"geo",init:function(t,e){var i=new RB(e,!0);this._mapDraw=i,this.group.add(i.group)},render:function(t,e,i,n){if(!n||"geoToggleSelect"!==n.type||n.from!==this.uid){var a=this._mapDraw;t.get("show")?a.draw(t,e,i,this,n):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}});var NB=m,VB=b;function BB(t,e){e.update="updateView",NB.registerAction(e,(function(e,i){var n={};return i.eachComponent({mainType:"geo",query:e},(function(i){i[t](e.name);var a=i.coordinateSystem;VB.each(a.regions,(function(t){n[t.name]=i.isSelected(t.name)||!1}))})),{selected:n,name:e.name}}))}BB("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),BB("select",{type:"geoSelect",event:"geoselected"}),BB("unSelect",{type:"geoUnSelect",event:"geounselected"});var GB=b,WB=["rect","polygon","keep","clear"];var HB=function(t,e){var i=t&&t.brush;if(GB.isArray(i)||(i=i?[i]:[]),i.length){var n=[];GB.each(i,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))}));var a=t&&t.toolbox;GB.isArray(a)&&(a=a[0]),a||(a={feature:{}},t.toolbox=[a]);var r,o,s=a.feature||(a.feature={}),l=s.brush||(s.brush={}),h=l.type||(l.type=[]);h.push.apply(h,n),r=h,o={},GB.each(r,(function(t){o[t]=1})),r.length=0,GB.each(o,(function(t,e){r.push(e)})),e&&!h.length&&h.push.apply(h,WB)}},FB={},ZB=b,UB=cI,jB=ZB.each;function qB(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}FB.createVisualMappings=function(t,e,i){var n={};return jB(e,(function(e){var a,r=n[e]=((a=function(){}).prototype.__hidden=a.prototype,new a);jB(t[e],(function(t,n){if(UB.isValidType(n)){var a={type:n,visual:t};i&&i(a,e),r[n]=new UB(a),"opacity"===n&&((a=ZB.clone(a)).type="colorAlpha",r.__hidden.__alphaForOpacity=new UB(a))}}))})),n},FB.replaceVisualOption=function(t,e,i){var n;ZB.each(i,(function(t){e.hasOwnProperty(t)&&qB(e[t])&&(n=!0)})),n&&ZB.each(i,(function(i){e.hasOwnProperty(i)&&qB(e[i])?t[i]=ZB.clone(e[i]):delete t[i]}))},FB.applyVisual=function(t,e,i,n,a,r){var o,s={};function l(t){return i.getItemVisual(o,t)}function h(t,e){i.setItemVisual(o,t,e)}function u(t,u){o=null==r?t:u;var c=i.getRawDataItem(o);if(!c||!1!==c.visualMap)for(var d=n.call(a,t),p=e[d],f=s[d],g=0,m=f.length;g=-1e-6)return!1;var u=eG(a-t,a-o,r-e,r-s)/h;if(u<0||u>1)return!1;var c=eG(i-t,a-t,n-e,r-e)/h;return!(c<0||c>1)}function eG(t,e,i,n){return t*n-e*i}var iG=$B,nG=b,aG=Vr,rG=ur,oG=rD,sG=nG.each,lG=nG.indexOf,hG=nG.curry,uG=["dataToPoint","pointToData"],cG=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function dG(t,e,i){var n=this._targetInfoList=[],a={},r=gG(e,t);sG(mG,(function(t,e){(!i||!i.include||lG(i.include,e)>=0)&&t(r,n,a)}))}var pG=dG.prototype;function fG(t){return t[0]>t[1]&&t.reverse(),t}function gG(t,e){return rG.parseFinder(t,e,{includeMainTypes:cG})}pG.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,(function(t,e,i){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var n=xG[t.brushType](0,i,e);t.__rangeOffset={offset:bG[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}}))},pG.matchOutputRanges=function(t,e,i){sG(t,(function(t){var n=this.findTargetInfo(t,e);n&&!0!==n&&nG.each(n.coordSyses,(function(n){var a=xG[t.brushType](1,n,t.range);i(t,a.values,n,e)}))}),this)},pG.setInputRanges=function(t,e){sG(t,(function(t){var i,n,a,r,o,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=xG[t.brushType](0,s.coordSys,t.coordRange),h=t.__rangeOffset;t.range=h?bG[t.brushType](l.values,h.offset,(i=l.xyMinMax,n=h.xyMinMax,a=SG(i),r=SG(n),o=[a[0]/r[0],a[1]/r[1]],isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o)):l.values}}),this)},pG.makePanelOpts=function(t,e){return nG.map(this._targetInfoList,(function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:e&&e(i),clipPath:oG.makeRectPanelClipPath(n),isTargetByCursor:oG.makeRectIsTargetByCursor(n,t,i.coordSysModel),getLinearBrushOtherExtent:oG.makeLinearBrushOtherExtent(n)}}))},pG.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return!0===n||n&&lG(n.coordSyses,e.coordinateSystem)>=0},pG.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=gG(e,t),a=0;a=0||lG(n,t.getAxis("y").model)>=0)&&r.push(t)})),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:r[0],coordSyses:r,getPanelRect:yG.grid,xAxisDeclared:o[t.id],yAxisDeclared:s[t.id]})})))},geo:function(t,e){sG(t.geoModels,(function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:yG.geo})}))}},vG=[function(t,e){var i=t.xAxisModel,n=t.yAxisModel,a=t.gridModel;return!a&&i&&(a=i.axis.grid.model),!a&&n&&(a=n.axis.grid.model),a&&a===e.gridModel},function(t,e){var i=t.geoModel;return i&&i===e.geoModel}],yG={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(aG.getTransform(t)),e}},xG={lineX:hG(_G,0),lineY:hG(_G,1),rect:function(t,e,i){var n=e[uG[t]]([i[0][0],i[1][0]]),a=e[uG[t]]([i[0][1],i[1][1]]),r=[fG([n[0],a[0]]),fG([n[1],a[1]])];return{values:r,xyMinMax:r}},polygon:function(t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]];return{values:nG.map(i,(function(i){var a=e[uG[t]](i);return n[0][0]=Math.min(n[0][0],a[0]),n[1][0]=Math.min(n[1][0],a[1]),n[0][1]=Math.max(n[0][1],a[0]),n[1][1]=Math.max(n[1][1],a[1]),a})),xyMinMax:n}}};function _G(t,e,i,n){var a=i.getAxis(["x","y"][t]),r=fG(nG.map([0,1],(function(t){return e?a.coordToData(a.toLocalCoord(n[t])):a.toGlobalCoord(a.dataToCoord(n[t]))}))),o=[];return o[t]=r,o[1-t]=[NaN,NaN],{values:r,xyMinMax:o}}var bG={lineX:hG(wG,0),lineY:hG(wG,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 nG.map(t,(function(t,n){return[t[0]-i[0]*e[n][0],t[1]-i[1]*e[n][1]]}))}};function wG(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function SG(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var MG=dG,IG=m,AG=b,TG=Je,CG=FB,LG=iG,DG=Ed,PG=MG,kG=["inBrush","outOfBrush"],OG="__ecInBrushSelectEvent",zG=IG.PRIORITY.VISUAL.BRUSH;function EG(t,e){if(!t.isDisposed()){var i=t.getZr();i[OG]=!0,t.dispatchAction({type:"brushSelect",batch:e}),i[OG]=!1}}function RG(t,e,i,n){for(var a=0,r=e.length;ae[0][1]&&(e[0][1]=r[0]),r[1]e[1][1]&&(e[1][1]=r[1])}return e&&BG(e)}};function BG(t){return new TG(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var GG=b,WG=FB,HG=ru,FG=["#ddd"];function ZG(t,e){return GG.merge({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new HG(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}m.extendComponentModel({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&&WG.replaceVisualOption(i,t,["inBrush","outOfBrush"]),i.inBrush=i.inBrush||{},i.outOfBrush=i.outOfBrush||{color:FG}},setAreas:function(t){t&&(this.areas=GG.map(t,(function(t){return ZG(this.option,t)}),this))},setBrushOption:function(t){this.brushOption=ZG(this.option,t),this.brushType=this.brushOption.brushType}});var UG=b,jG=aD;function qG(t,e,i,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}m.extendComponentView({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new jG(e.getZr())).on("brush",UG.bind(this._onBrush,this)).mount()},render:function(t){return this.model=t,qG.apply(this,arguments)},updateView:qG,updateLayout:qG,updateVisual:qG,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var i=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:i,areas:UG.clone(t),$from:i})}});var XG=m;XG.registerAction({type:"brush",event:"brush",update:"updateView"},(function(t,e){e.eachComponent({mainType:"brush",query:t},(function(e){e.setAreas(t.areas)}))})),XG.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},(function(){}));var YG={},$G={};YG.register=function(t,e){$G[t]=e},YG.get=function(t){return $G[t]};var KG={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:["右键另存为图片"]}}},JG=b,QG=YG,tW=KG.toolbox.brush;function eW(t,e,i){this.model=t,this.ecModel=e,this.api=i,this._brushType,this._brushMode}eW.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:JG.clone(tW.title)};var iW=eW.prototype;iW.render=iW.updateView=iW.updateLayout=function(t,e,i){var n,a,r;e.eachComponent({mainType:"brush"},(function(t){n=t.brushType,a=t.brushOption.brushMode||"single",r|=t.areas.length})),this._brushType=n,this._brushMode=a,JG.each(t.get("type",!0),(function(e){t.setIconStatus(e,("keep"===e?"multiple"===a:"clear"===e?r:e===n)?"emphasis":"normal")}))},iW.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return JG.each(t.get("type",!0),(function(t){e[t]&&(i[t]=e[t])})),i},iW.onclick=function(t,e,i){var n=this._brushType,a=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"===a?"single":"multiple":a}})},QG.register("brush",eW),m.registerPreprocessor(HB);var nW=b,aW=wu,rW=dr,oW=_c;function sW(t,e,i){this._model=t}function lW(t,e,i,n){var a=i.calendarModel,r=i.seriesModel,o=a?a.coordinateSystem:r?r.coordinateSystem:null;return o===this?o[t](n):null}sW.prototype={constructor:sW,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"}]},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=rW.parseDate(t)).getFullYear(),i=t.getMonth()+1;i=i<10?"0"+i:i;var n=t.getDate();n=n<10?"0"+n:n;var a=t.getDay();return{y:e,m:i,d:n,day:a=Math.abs((a+7-this.getFirstDayOfWeek())%7),time:t.getTime(),formatedDate:e+"-"+i+"-"+n,date:t}},getNextNDay:function(t,e){return 0===(e=e||0)||(t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t)},update:function(t,e){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle.normal").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var i=this._rangeInfo.weeks||1,n=["width","height"],a=this._model.get("cellSize").slice(),r=this._model.getBoxLayoutParams(),o="horizontal"===this._orient?[i,7]:[7,i];nW.each([0,1],(function(t){h(a,t)&&(r[n[t]]=a[t]*o[t])}));var s={width:e.getWidth(),height:e.getHeight()},l=this._rect=aW.getLayoutRect(r,s);function h(t,e){return null!=t[e]&&"auto"!==t[e]}nW.each([0,1],(function(t){h(a,t)||(a[t]=l[n[t]]/o[t])})),this._sw=a[0],this._sh=a[1]},dataToPoint:function(t,e){nW.isArray(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getDateInfo(t),n=this._rangeInfo,a=i.formatedDate;if(e&&!(i.time>=n.start.time&&i.time<=n.end.time))return[NaN,NaN];var r=i.day,o=this._getRangeInfo([n.start.time,a]).nthWeek;return"vertical"===this._orient?[this._rect.x+r*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]:[this._rect.x+o*this._sw+this._sw/2,this._rect.y+r*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:nW.curry(lW,"dataToPoint"),convertFromPixel:nW.curry(lW,"pointToData"),_initRangeOption:function(){var t=this._model.get("range"),e=t;if(nW.isArray(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 a=this.getNextNDay(n,-1);t=[i.formatedDate,a.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(e)&&(t=[e,e]);var r=this._getRangeInfo(t);return r.start.time>r.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),a=n.getDate(),r=t[1].date.getDate();if(n.setDate(a+i-1),n.getDate()!==r)for(var o=n.getTime()-t[1].time>0?1:-1;n.getDate()!==r&&(n.getTime()-t[1].time)*o>0;)i-=o,n.setDate(a+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 a=7*(t-1)-n.fweek+e,r=new Date(n.start.time);return r.setDate(n.start.d+a),this.getDateInfo(r)}},sW.dimensions=sW.prototype.dimensions,sW.getDimensionsInfo=sW.prototype.getDimensionsInfo,sW.create=function(t,e){var i=[];return t.eachComponent("calendar",(function(t){var e=new sW(t);i.push(e),t.coordinateSystem=e})),t.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])})),i},oW.register("calendar",sW);var hW=b,uW=Zu,cW=wu,dW=cW.getLayoutParams,pW=cW.sizeCalculable,fW=cW.mergeLayoutParam,gW=uW.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:{normal:{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 a=dW(t);gW.superApply(this,"init",arguments),mW(t,a)},mergeOption:function(t,e){gW.superApply(this,"mergeOption",arguments),mW(this.option,t)}});function mW(t,e){var i=t.cellSize;hW.isArray(i)?1===i.length&&(i[1]=i[0]):i=t.cellSize=[i,i];var n=hW.map([0,1],(function(t){return pW(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]}));fW(t,e,{type:"box",ignoreSize:n})}var vW=b,yW=Vr,xW=cr,_W=dr,bW={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},wW={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};m.extendComponentView({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,i){var n=this.group;n.removeAll();var a=t.coordinateSystem,r=a.getRangeInfo(),o=a.getOrient();this._renderDayRect(t,r,n),this._renderLines(t,r,o,n),this._renderYearText(t,r,o,n),this._renderMonthText(t,o,n),this._renderWeekText(t,r,o,n)},_renderDayRect:function(t,e,i){for(var n=t.coordinateSystem,a=t.getModel("itemStyle.normal").getItemStyle(),r=n.getCellWidth(),o=n.getCellHeight(),s=e.start.time;s<=e.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,h=new yW.Rect({shape:{x:l[0],y:l[1],width:r,height:o},cursor:"default",style:a});i.add(h)}},_renderLines:function(t,e,i,n){var a=this,r=t.coordinateSystem,o=t.getModel("splitLine.lineStyle").getLineStyle(),s=t.get("splitLine.show"),l=o.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=e.start,u=0;h.time<=e.end.time;u++){d(h.formatedDate),0===u&&(h=r.getDateInfo(e.start.y+"-"+e.start.m));var c=h.date;c.setMonth(c.getMonth()+1),h=r.getDateInfo(c)}function d(e){a._firstDayOfMonth.push(r.getDateInfo(e)),a._firstDayPoints.push(r.dataToRect([e],!1).tl);var l=a._getLinePointsOfOneWeek(t,e,i);a._tlpoints.push(l[0]),a._blpoints.push(l[l.length-1]),s&&a._drawSplitline(l,o,n)}d(r.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,l,i),o,n),s&&this._drawSplitline(a._getEdgesPoints(a._blpoints,l,i),o,n)},_getEdgesPoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],a="horizontal"===i?0:1;return n[0][a]=n[0][a]-e/2,n[1][a]=n[1][a]+e/2,n},_drawSplitline:function(t,e,i){var n=new yW.Polyline({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 a=[],r=0;r<7;r++){var o=n.getNextNDay(e.time,r),s=n.dataToRect([o.time],!1);a[2*o.day]=s.tl,a[2*o.day+1]=s["horizontal"===i?"bl":"tr"]}return a},_formatterLabel:function(t,e){return"string"==typeof t&&t?xW.formatTplSimple(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,i,n,a){e=e.slice();var r=["center","bottom"];"bottom"===n?(e[1]+=a,r=["center","top"]):"left"===n?e[0]-=a:"right"===n?(e[0]+=a,r=["center","top"]):e[1]-=a;var o=0;return"left"!==n&&"right"!==n||(o=Math.PI/2),{rotation:o,position:e,style:{textAlign:r[0],textVerticalAlign:r[1]}}},_renderYearText:function(t,e,i,n){var a=t.getModel("yearLabel");if(a.get("show")){var r=a.get("margin"),o=a.get("position");o||(o="horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,h=(s[0][1]+s[1][1])/2,u="horizontal"===i?0:1,c={top:[l,s[u][1]],bottom:[l,s[1-u][1]],left:[s[1-u][0],h],right:[s[u][0],h]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var p=a.get("formatter"),f={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(p,f),m=new yW.Text({z2:30});yW.setTextStyle(m.style,a,{text:g}),m.attr(this._yearTextPositionControl(m,c[o],i,o,r)),n.add(m)}},_monthTextPositionControl:function(t,e,i,n,a){var r="left",o="top",s=t[0],l=t[1];return"horizontal"===i?(l+=a,e&&(r="center"),"start"===n&&(o="bottom")):(s+=a,e&&(o="middle"),"start"===n&&(r="right")),{x:s,y:l,textAlign:r,textVerticalAlign:o}},_renderMonthText:function(t,e,i){var n=t.getModel("monthLabel");if(n.get("show")){var a=n.get("nameMap"),r=n.get("margin"),o=n.get("position"),s=n.get("align"),l=[this._tlpoints,this._blpoints];vW.isString(a)&&(a=bW[a.toUpperCase()]||[]);var h="start"===o?0:1,u="horizontal"===e?0:1;r="start"===o?-r:r;for(var c="center"===s,d=0;d=0},AW.createNameEach=DW,AW.eachAxisDim=PW,AW.createLinkedNodesFinder=function(t,e,i){return function(a){var r,o={nodes:[],records:{}};if(e((function(t){o.records[t.name]={}})),!a)return o;n(a,o);do{r=!1,t(s)}while(r);function s(t){!function(t,e){return TW.indexOf(e.nodes,t)>=0}(t,o)&&function(t,n){var a=!1;return e((function(e){TW.each(i(t,e)||[],(function(t){n.records[e.name][t]&&(a=!0)}))})),a}(t,o)&&(n(t,o),r=!0)}return o};function n(t,n){n.nodes.push(t),e((function(e){TW.each(i(t,e)||[],(function(t){n.records[e.name][t]=!0}))}))}};var kW=b,OW=dr,zW=AW,EW=kW.each,RW=OW.asc,NW=function(t,e,i,n){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=n,this._dataZoomModel=i};function VW(t,e){var i=t.getAxisModel(),n=t._percentWindow,a=t._valueWindow;if(n){var r=OW.getPixelPrecision(a,[0,500]);r=Math.min(r,20);var o=e||0===n[0]&&100===n[1];i.setRange(o?null:+a[0].toFixed(r),o?null:+a[1].toFixed(r))}}NW.prototype={constructor:NW,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var t=[],e=this.ecModel;return e.eachSeries((function(i){if(zW.isCoordSupported(i.get("coordinateSystem"))){var n=this._dimName,a=e.queryComponents({mainType:n+"Axis",index:i.get(n+"AxisIndex"),id:i.get(n+"AxisId")})[0];this._axisIndex===(a&&a.componentIndex)&&t.push(i)}}),this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,i,n=this._dimName,a=this.ecModel,r=this.getAxisModel();return"x"===n||"y"===n?(e="gridIndex",t="x"===n?"y":"x"):(e="polarIndex",t="angle"===n?"radius":"angle"),a.eachComponent(t+"Axis",(function(t){(t.get(e)||0)===(r.get(e)||0)&&(i=t)})),i},getMinMaxSpan:function(){return kW.clone(this._minMaxSpan)},calculateDataWindow:function(t){var e=this._dataExtent,i=this.getAxisModel().axis.scale,n=this._dataZoomModel.getRangePropMode(),a=[0,100],r=[t.start,t.end],o=[];return EW(["startValue","endValue"],(function(e){o.push(null!=t[e]?i.parse(t[e]):null)})),EW([0,1],(function(t){var s=o[t],l=r[t];"percent"===n[t]?(null==l&&(l=a[t]),s=i.parse(OW.linearMap(l,a,e,!0))):l=OW.linearMap(s,e,a,!0),o[t]=s,r[t]=l})),{valueWindow:RW(o),percentWindow:RW(r)}},reset:function(t){if(t===this._dataZoomModel){this._dataExtent=function(t,e,i){var n=[1/0,-1/0];EW(i,(function(t){var i=t.getData();i&&EW(t.coordDimToDataDim(e),(function(t){var e=i.getDataExtent(t);e[0]n[1]&&(n[1]=e[1])}))})),n[1]0?0:NaN);var o=i.getMax(!0);null!=o&&"dataMax"!==o&&"function"!=typeof o?e[1]=o:a&&(e[1]=r>0?r-1:NaN);i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0))}(t,n),n}(this,this._dimName,this.getTargetSeriesModels());var e=this.calculateDataWindow(t.option);this._valueWindow=e.valueWindow,this._percentWindow=e.percentWindow,function(t){var e=t._minMaxSpan={},i=t._dataZoomModel;EW(["min","max"],(function(n){e[n+"Span"]=i.get(n+"Span");var a=i.get(n+"ValueSpan");if(null!=a&&(e[n+"ValueSpan"]=a,null!=(a=t.getAxisModel().axis.scale.parse(a)))){var r=t._dataExtent;e[n+"Span"]=OW.linearMap(r[0]+a,r,[0,100],!0)}}))}(this),VW(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,VW(this,!0))},filterData:function(t){if(t===this._dataZoomModel){var e=this._dimName,i=this.getTargetSeriesModels(),n=t.get("filterMode"),a=this._valueWindow;if("none"!==n){var r=this.getOtherAxisModel();t.get("$fromToolbox")&&r&&"category"===r.get("type")&&(n="empty"),EW(i,(function(t){var i=t.getData(),r=t.coordDimToDataDim(e);"weakFilter"===n?i&&i.filterSelf((function(t){for(var e,n,o,s=0;sa[1];if(h&&!u&&!c)return!0;h&&(o=!0),u&&(e=!0),c&&(n=!0)}return o&&e&&n})):i&&EW(r,(function(e){"empty"===n?t.setData(i.map(e,(function(t){return o(t)?t:NaN}))):i.filterSelf(e,o)}))}))}}function o(t){return t>=a[0]&&t<=a[1]}}};var BW=m,GW=b,WW=_,HW=ur,FW=AW,ZW=NW,UW=GW.each,jW=FW.eachAxisDim,qW=BW.extendComponentModel({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=XW(t);this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=XW(t);GW.merge(this.option,t,!0),this.doInit(e)},doInit:function(t){var e=this.option;WW.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),YW(this,t),UW([["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,a){var r=this.dependentModels[e.axis][i],o=r.__dzAxisProxy||(r.__dzAxisProxy=new ZW(e.name,i,this,a));t[e.name+"_"+i]=o}),this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();jW((function(e){var i=e.axisIndex;t[i]=HW.normalizeToArray(t[i])}),this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;jW((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 a="vertical"===e?"y":"x";n[a+"Axis"].length?(i[a+"AxisIndex"]=[0],t=!1):UW(n.singleAxis,(function(n){t&&n.get("orient",!0)===e&&(i.singleAxisIndex=[n.componentIndex],t=!1)}))}t&&jW((function(e){if(t){var n=[],a=this.dependentModels[e.axis];if(a.length&&!n.length)for(var r=0,o=a.length;r0?100:20}},getFirstTargetAxisModel:function(){var t;return jW((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;jW((function(n){UW(this.get(n.axisIndex),(function(a){t.call(e,n,a,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;UW([["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&&YW(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()}});function XW(t){var e={};return UW(["start","end","startValue","endValue","throttle"],(function(i){t.hasOwnProperty(i)&&(e[i]=t[i])})),e}function YW(t,e){var i=t._rangePropMode,n=t.get("rangeMode");UW([["start","startValue"],["end","endValue"]],(function(t,a){var r=null!=e[t[0]],o=null!=e[t[1]];r&&!o?i[a]="percent":!r&&o?i[a]="value":n?i[a]=n[a]:r&&(i[a]="percent")}))}var $W=qW,KW=Md.extend({type:"dataZoom",render:function(t,e,i,n){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetCoordInfo:function(){var t=this.dataZoomModel,e=this.ecModel,i={};return t.eachTargetAxis((function(t,n){var a=e.getComponent(t.axis,n);if(a){var r=a.getCoordSysModel();r&&function(t,e,i,n){for(var a,r=0;r0&&e%f)p+=d;else{var i=null==t||isNaN(t)||""===t,n=i?0:lH(t,r,l,!0);i&&!s&&e?(u.push([u[u.length-1][0],0]),c.push([c[c.length-1][0],0])):!i&&s&&(u.push([p,0]),c.push([p,0])),u.push([p,n]),c.push([p,n]),p+=d,s=i}}));var g=this.dataZoomModel;this._displayables.barGroup.add(new eH.Polygon({shape:{points:u},style:QW.defaults({fill:g.get("dataBackgroundColor")},g.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new eH.Polyline({shape:{points:c},style:g.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(a,r){var o=t.getAxisProxy(a.name,r).getTargetSeriesModels();QW.each(o,(function(t){if(!(i||!0!==e&&QW.indexOf(dH,t.get("type"))<0)){var o,s=n.getComponent(a.axis,r).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[a.name],h=t.coordinateSystem;null!=l&&h.getOtherAxis&&(o=h.getOtherAxis(s).inverse),i={thisAxis:s,series:t,thisDim:a.name,otherDim:l,otherAxisInverse:o}}}),this)}),this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,a=this._size,r=this.dataZoomModel;n.add(t.filler=new sH({draggable:!0,cursor:fH(this._orient),drift:uH(this._onDragMove,this,"all"),onmousemove:function(t){tH.stop(t.event)},ondragstart:uH(this._showDataInfo,this,!0),ondragend:uH(this._onDragEnd,this),onmouseover:uH(this._showDataInfo,this,!0),onmouseout:uH(this._showDataInfo,this,!1),style:{fill:r.get("fillerColor"),textPosition:"inside"}})),n.add(new sH(eH.subPixelOptimizeRect({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{stroke:r.get("dataBackgroundColor")||r.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}}))),cH([0,1],(function(t){var a=eH.createIcon(r.get("handleIcon"),{cursor:fH(this._orient),draggable:!0,drift:uH(this._onDragMove,this,t),onmousemove:function(t){tH.stop(t.event)},ondragend:uH(this._onDragEnd,this),onmouseover:uH(this._showDataInfo,this,!0),onmouseout:uH(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),o=a.getBoundingRect();this._handleHeight=aH.parsePercent(r.get("handleSize"),this._size[1]),this._handleWidth=o.width/o.height*this._handleHeight,a.setStyle(r.getModel("handleStyle").getItemStyle());var s=r.get("handleColor");null!=s&&(a.style.fill=s),n.add(e[t]=a);var l=r.textStyleModel;this.group.add(i[t]=new eH.Text({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=[lH(t[0],[0,100],e,!0),lH(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,a=this._getViewExtent(),r=i.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];oH(e,n,a,i.get("zoomLock")?"all":t,null!=r.minSpan?lH(r.minSpan,o,a,!0):null,null!=r.maxSpan?lH(r.maxSpan,o,a,!0):null),this._range=hH([lH(n[0],a,o,!0),lH(n[1],a,o,!0)])},_updateView:function(t){var e=this._displayables,i=this._handleEnds,n=hH(i.slice()),a=this._size;cH([0,1],(function(t){var n=e.handles[t],r=this._handleHeight;n.attr({scale:[r/2,r/2],position:[i[t],a[1]/2-r/2]})}),this),e.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:a[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){var e=this.dataZoomModel,i=this._displayables,n=i.handleLabels,a=this._orient,r=["",""];if(e.get("showDetail")){var o=e.findRepresentativeAxisProxy();if(o){var s=o.getAxisModel().axis,l=this._range,h=t?o.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:o.getDataValueWindow();r=[this._formatLabel(h[0],s),this._formatLabel(h[1],s)]}}var u=hH(this._handleEnds.slice());function c(t){var e=eH.getTransform(i.handles[t].parent,this.group),o=eH.transformDirection(0===t?"right":"left",e),s=this._handleWidth/2+5,l=eH.applyTransform([u[t]+(0===t?-s:s),this._size[1]/2],e);n[t].setStyle({x:l[0],y:l[1],textVerticalAlign:"horizontal"===a?"middle":o,textAlign:"horizontal"===a?o:"center",text:r[t]})}c.call(this,0),c.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter"),a=i.get("labelPrecision");null!=a&&"auto"!==a||(a=e.getPixelPrecision());var r=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(a,20));return QW.isFunction(n)?n(t,r):QW.isString(n)?n.replace("{value}",r):r},_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=this._displayables.barGroup.getLocalTransform(),a=eH.applyTransform([e,i],n,!0);this._updateInterval(t,a[0]);var r=this.dataZoomModel.get("realtime");this._updateView(!r),r&&r&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),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,a=(n[0]+n[1])/2;this._updateInterval("all",i[0]-a),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(cH(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}});function fH(t){return"vertical"===t?"ns-resize":"ew-resize"}$W.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,preventDefaultMouseMove:!0}});var gH={},mH=b,vH=yw,yH=Ed,xH=mH.curry,_H="\0_ec_dataZoom_roams";function bH(t){var e=t.getZr();return e[_H]||(e[_H]={})}function wH(t){mH.each(t,(function(e,i){e.count||(e.controller.dispose(),delete t[i])}))}function SH(t,e,i,n,a,r,o){IH(t,(function(s){return s.panGetRange(t.controller,e,i,n,a,r,o)}))}function MH(t,e,i,n){IH(t,(function(a){return a.zoomGetRange(t.controller,e,i,n)}))}function IH(t,e){var i=[];mH.each(t.dataZoomInfos,(function(t){var n=e(t);!t.disabled&&n&&i.push({dataZoomId:t.dataZoomId,start:n[0],end:n[1]})})),t.dispatchAction(i)}function AH(t,e){t.dispatchAction({type:"dataZoom",batch:e})}gH.register=function(t,e){var i=bH(t),n=e.dataZoomId,a=e.coordId;mH.each(i,(function(t,i){var r=t.dataZoomInfos;r[n]&&mH.indexOf(e.allCoordIds,a)<0&&(delete r[n],t.count--)})),wH(i);var r=i[a];r||((r=i[a]={coordId:a,dataZoomInfos:{},count:0}).controller=function(t,e){var i=new vH(t.getZr());return i.on("pan",xH(SH,e)),i.on("zoom",xH(MH,e)),i}(t,r),r.dispatchAction=mH.curry(AH,t)),!r.dataZoomInfos[n]&&r.count++,r.dataZoomInfos[n]=e;var o,s,l,h,u=(o=r.dataZoomInfos,l={},h={true:2,move:1,false:0,undefined:-1},mH.each(o,(function(t){var e=!t.disabled&&(!t.zoomLock||"move");h[e]>h[s]&&(s=e),mH.extend(l,t.roamControllerOpt)})),{controlType:s,opt:l});r.controller.enable(u.controlType,u.opt),r.controller.setPointerChecker(e.containsPoint),yH.createOrUpdate(r,"dispatchAction",e.throttleRate,"fixRate")},gH.unregister=function(t,e){var i=bH(t);mH.each(i,(function(t){t.controller.dispose();var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)})),wH(i)},gH.shouldRecordRange=function(t,e){if(t&&"dataZoom"===t.type&&t.batch)for(var i=0,n=t.batch.length;i0?l.pixelStart+l.pixelLength-l.pixel:l.pixel-l.pixelStart)/l.pixelLength*(o[1]-o[0])+o[0];n=Math.max(1/n,0),o[0]=(o[0]-h)*n+h,o[1]=(o[1]-h)*n+h;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return LH(0,o,[0,100],0,u.minSpan,u.maxSpan),this._range=o}}}),OH={grid:function(t,e,i,n,a){var r=i.axis,o={},s=a.model.coordinateSystem.getRect();return t=t||[0,0],"x"===r.dim?(o.pixel=e[0]-t[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=r.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=r.inverse?-1:1),o},polar:function(t,e,i,n,a){var r=i.axis,o={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),h=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===i.mainType?(o.pixel=e[0]-t[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=r.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=h[1]-h[0],o.pixelStart=h[0],o.signal=r.inverse?-1:1),o},singleAxis:function(t,e,i,n,a){var r=i.axis,o=a.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===r.orient?(s.pixel=e[0]-t[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=r.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=r.inverse?-1:1),s}};function zH(t,e,i){i.getAxisProxy(t.name,e).reset(i)}function EH(t,e,i){i.getAxisProxy(t.name,e).filterData(i)}m.registerProcessor((function(t,e){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis(zH),t.eachTargetAxis(EH)})),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)}))}));var RH=b,NH=AW;m.registerAction("dataZoom",(function(t,e){var i=NH.createLinkedNodesFinder(RH.bind(e.eachComponent,e,"dataZoom"),NH.eachAxisDim,(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)})),RH.each(n,(function(e,i){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}));var VH=b,BH=VH.each;function GH(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}var WH=function(t){var e=t&&t.visualMap;VH.isArray(e)||(e=e?[e]:[]),BH(e,(function(t){if(t){GH(t,"splitList")&&!GH(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&VH.isArray(e)&&BH(e,(function(t){VH.isObject(t)&&(GH(t,"start")&&!GH(t,"min")&&(t.min=t.start),GH(t,"end")&&!GH(t,"max")&&(t.max=t.end))}))}}))};Zu.registerSubTypeDefaulter("visualMap",(function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"}));var HH=m,FH=b,ZH=FB,UH=cI;function jH(t,e,i,n){for(var a=e.targetVisuals[n],r=UH.prepareVisualTypes(a),o={color:t.getData().getVisual("color")},s=0,l=r.length;s"],JH.isArray(t)&&(t=t.slice(),n=!0),a=e?t:n?[h(t[0]),h(t[1])]:h(t),JH.isString(l)?l.replace("{value}",n?a[0]:a).replace("{value2}",n?a[1]:a):JH.isFunction(l)?n?l(t[0],t[1]):l(t):n?t[0]===s[0]?i[0]+" "+a[1]:t[1]===s[1]?i[1]+" "+a[0]:a[0]+" - "+a[1]:a;function h(t){return t===s[0]?"min":t===s[1]?"max":(+t).toFixed(Math.min(o,20))}},resetExtent:function(){var t=this.option,e=hF([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension;return null!=e?e:t.dimensions.length-1},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var t=this.option,e={inRange:t.inRange,outOfRange:t.outOfRange},i=t.target||(t.target={}),n=t.controller||(t.controller={});JH.merge(i,e),JH.merge(n,e);var a=this.isCategory();function r(e){sF(t.color)&&!e.inRange&&(e.inRange={color:t.color.slice().reverse()}),e.inRange=e.inRange||{color:dF},lF(this.stateList,(function(t){var i=e[t];if(JH.isString(i)){var n=tF.get(i,"active",a);n?(e[t]={},e[t][i]=n):delete e[t]}}),this)}r.call(this,i),r.call(this,n),function(t,e,i){var n=t[e],r=t[i];n&&!r&&(r=t[i]={},lF(n,(function(t,e){if(eF.isValidType(e)){var i=tF.get(e,"inactive",a);null!=i&&(r[e]=i,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}})))}.call(this,i,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,i=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,n=this.get("inactiveColor");lF(this.stateList,(function(r){var o=this.itemSize,s=t[r];s||(s=t[r]={color:a?n:[n]}),null==s.symbol&&(s.symbol=e&&JH.clone(e)||(a?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=i&&JH.clone(i)||(a?o[0]:[o[0],o[0]])),s.symbol=rF(s.symbol,(function(t){return"none"===t||"square"===t?"roundRect":t}));var l=s.symbolSize;if(null!=l){var h=-1/0;oF(l,(function(t){t>h&&(h=t)})),s.symbolSize=rF(l,(function(t){return uF(t,[0,h],[0,o[0]],!0)}))}}),this)}.call(this,n)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:cF,getValueState:cF,getVisualMeta:cF}),fF=pF,gF=b,mF=fF,vF=dr,yF=[20,140],xF=mF.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){xF.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},resetItemSize:function(){xF.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=yF[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=yF[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):gF.isArray(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(){mF.prototype.completeVisualOption.apply(this,arguments),gF.each(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=vF.asc((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=[],a=i.getData();a.each(this.getDataDimension(a),(function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)}),!0,this),e.push({seriesId:i.id,dataIndex:n})}),this),e},getVisualMeta:function(t){var e=_F(this,"outOfRange",this.getExtent()),i=_F(this,"inRange",this.option.range.slice()),n=[];function a(e,i){n.push({value:e,color:t(e,i)})}for(var r=0,o=0,s=i.length,l=e.length;ot[1])break;i.push({color:this.getControllerVisual(r,"color",e),offset:a/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 zF.Group("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,a=i.handleThumbs,r=i.handleLabels;BF([0,1],(function(o){var s=a[o];s.setStyle("fill",e.handlesColor[o]),s.position[1]=t[o];var l=zF.applyTransform(i.handleLabelPoints[o],zF.getTransform(s,this.group));r[o].setStyle({x:l[0],y:l[1],text:n.formatValueText(this._dataInterval[o]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===o?"bottom":"top":"left",i.barGroup)})}),this)}},_showIndicator:function(t,e,i,n){var a=this.visualMapModel,r=a.getExtent(),o=a.itemSize,s=[0,o[1]],l=VF(t,r,s,!0),h=this._shapes,u=h.indicator;if(u){u.position[1]=l,u.attr("invisible",!1),u.setShape("points",function(t,e,i,n){return t?[[0,-GF(e,WF(i,0))],[6,0],[0,GF(e,WF(n-i,0))]]:[[0,0],[5,-5],[5,5]]}(!!i,n,l,o[1]));var c=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0});u.setStyle("fill",c);var d=zF.applyTransform(h.indicatorLabelPoint,zF.getTransform(u,this.group)),p=h.indicatorLabel;p.attr("invisible",!1);var f=this._applyTransform("left",h.barGroup),g=this._orient;p.setStyle({text:(i||"")+a.formatValueText(e),textVerticalAlign:"horizontal"===g?f:"middle",textAlign:"horizontal"===g?"center":f,x:d[0],y:d[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]=GF(WF(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 a=[0,n[1]],r=i.getExtent();t=GF(WF(a[0],t),a[1]);var o=function(t,e,i){var n=6,a=t.get("hoverLinkDataSize");a&&(n=VF(a,e,i,!0)/2);return n}(i,r,a),s=[t-o,t+o],l=VF(t,a,r,!0),h=[VF(s[0],a,r,!0),VF(s[1],a,r,!0)];s[0]a[1]&&(h[1]=1/0),e&&(h[0]===-1/0?this._showIndicator(l,h[1],"< ",o):h[1]===1/0?this._showIndicator(l,h[0],"> ",o):this._showIndicator(l,l,"≈ ",o));var u=this._hoverLinkDataIndices,c=[];(e||ZF(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(h));var d=NF.compressBatches(u,c);this._dispatchHighDown("downplay",RF.convertDataIndex(d[0])),this._dispatchHighDown("highlight",RF.convertDataIndex(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 a=n.getData(e.dataType),r=a.getDimension(i.getDataDimension(a)),o=a.get(r,e.dataIndex,!0);isNaN(o)||this._showIndicator(o,o)}}},_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",RF.convertDataIndex(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 a=zF.getTransform(e,n?null:this.group);return zF[DF.isArray(t)?"applyTransform":"transformDirection"](t,a,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()}});function FF(t,e,i,n){return new zF.Polygon({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){kF.stop(t.event)},ondragend:n})}function ZF(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function UF(t){return"vertical"===t?"ns-resize":"ew-resize"}m.registerAction({type:"selectDataRange",event:"dataRangeSelected",update:"update"},(function(t,e){e.eachComponent({mainType:"visualMap",query:t},(function(e){e.setSelected(t.selected)}))})),m.registerPreprocessor(WH);var jF=b,qF=fF,XF=cI,YF=$H,$F=dr.reformIntervals,KF=qF.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){KF.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var i=this._mode=this._determineMode();JF[this._mode].call(this),this._resetSelected(t,e);var n=this.option.categories;this.resetVisual((function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=jF.clone(n)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=jF.map(this._pieceList,(function(t){t=jF.clone(t);return"inRange"!==e&&(t.visual=null),t})))}))},completeVisualOption:function(){var t=this.option,e={},i=XF.listVisualTypes(),n=this.isCategory();function a(t,e,i){return t&&t[e]&&(jF.isObject(t[e])?t[e].hasOwnProperty(i):t[e]===i)}jF.each(t.pieces,(function(t){jF.each(i,(function(i){t.hasOwnProperty(i)&&(e[i]=1)}))})),jF.each(e,(function(e,i){var r=0;jF.each(this.stateList,(function(e){r|=a(t,e,i)||a(t.target,e,i)}),this),!r&&jF.each(this.stateList,(function(e){(t[e]||(t[e]={}))[i]=YF.get(i,"inRange"===e?"active":"inactive",n)}))}),this),qF.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i=this.option,n=this._pieceList,a=(e?i:t).selected||{};if(i.selected=a,jF.each(n,(function(t,e){var i=this.getSelectedMapKey(t);a.hasOwnProperty(i)||(a[i]=!0)}),this),"single"===i.selectedMode){var r=!1;jF.each(n,(function(t,e){var i=this.getSelectedMapKey(t);a[i]&&(r?a[i]=!1:r=!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=jF.clone(t)},getValueState:function(t){var e=XF.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=[],a=i.getData();a.each(this.getDataDimension(a),(function(e,i){XF.findPieceIndex(e,this._pieceList)===t&&n.push(i)}),!0,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){if(!this.isCategory()){var e=[],i=[],n=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 o=-1/0;return jF.each(a,(function(t){var e=t.interval;e&&(e[0]>o&&s([o,e[0]],"outOfRange"),s(e.slice()),o=e[1])}),this),{stops:e,outerColors:i}}function s(a,r){var o=n.getRepresentValue({interval:a});r||(r=n.getValueState(o));var s=t(o,r);a[0]===-1/0?i[0]=s:a[1]===1/0?i[1]=s:e.push({value:a[0],color:s},{value:a[1],color:s})}}}),JF={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),a=t.splitNumber;a=Math.max(parseInt(a,10),1),t.splitNumber=a;for(var r=(n[1]-n[0])/a;+r.toFixed(i)!==r&&i<5;)i++;t.precision=i,r=+r.toFixed(i);var o=0;t.minOpen&&e.push({index:o++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=o+a;o","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)}),this)}};function QF(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}var tZ=b,eZ=AF,iZ=Vr,nZ=Hf.createSymbol,aZ=wu,rZ=TF;eZ.extend({type:"visualMap.piecewise",doRender:function(){var t=this.group;t.removeAll();var e=this.visualMapModel,i=e.get("textGap"),n=e.textStyleModel,a=n.getFont(),r=n.getTextColor(),o=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),h=l.endsText,u=tZ.retrieve(e.get("showLabel",!0),!h);h&&this._renderEndsText(t,h[0],s,u,o),tZ.each(l.viewPieceList,(function(n){var l=n.piece,h=new iZ.Group;h.onclick=tZ.bind(this._onItemClick,this,l),this._enableHoverLink(h,n.indexInModelPieceList);var c=e.getRepresentValue(l);if(this._createItemSymbol(h,c,[0,0,s[0],s[1]]),u){var d=this.visualMapModel.getValueState(c);h.add(new iZ.Text({style:{x:"right"===o?-i:s[0]+i,y:s[1]/2,text:l.text,textVerticalAlign:"middle",textAlign:o,textFont:a,textFill:r,opacity:"outOfRange"===d?.5:1}}))}t.add(h)}),this),h&&this._renderEndsText(t,h[1],s,u,o),aZ.box(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:rZ.convertDataIndex(i.findTargetDataIndices(e))})}t.on("mouseover",tZ.bind(i,this,"highlight")).on("mouseout",tZ.bind(i,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return rZ.getItemAlign(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,a){if(e){var r=new iZ.Group,o=this.visualMapModel.textStyleModel;r.add(new iZ.Text({style:{x:n?"right"===a?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?a:"center",text:e,textFont:o.getFont(),textFill:o.getTextColor()}})),t.add(r)}},_getViewData:function(){var t=this.visualMapModel,e=tZ.map(t.getPieceList(),(function(t,e){return{piece:t,indexInModelPieceList:e}})),i=t.get("text"),n=t.get("orient"),a=t.get("inverse");return("horizontal"===n?a:!a)?e.reverse():i&&(i=i.slice().reverse()),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(nZ(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,i=e.option,n=tZ.clone(i.selected),a=e.getSelectedMapKey(t);"single"===i.selectedMode?(n[a]=!0,tZ.each(n,(function(t,e){n[e]=e===a}))):n[a]=!n[a],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:n})}}),m.registerPreprocessor(WH);var oZ=m,sZ=b,lZ=_,hZ=ur,uZ=cr,cZ=uZ.addCommas,dZ=uZ.encodeHTML;function pZ(t){hZ.defaultEmphasis(t.label,["show"])}var fZ=oZ.extendComponentModel({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(lZ.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e,i,n){var a=this.constructor,r=this.mainType+"Model";i||e.eachSeries((function(t){var i=t.get(this.mainType),o=t[r];i&&i.data?(o?o.mergeOption(i,e,!0):(n&&pZ(i),sZ.each(i.data,(function(t){t instanceof Array?(pZ(t[0]),pZ(t[1])):pZ(t)})),o=new a(i,this,e),sZ.extend(o,{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),o.__hostSeries=t),t[r]=o):t[r]=null}),this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=sZ.isArray(i)?sZ.map(i,cZ).join(", "):cZ(i),a=e.getName(t),r=dZ(this.name);return(null!=i||a)&&(r+="
"),a&&(r+=dZ(a),null!=i&&(r+=" : ")),null!=i&&(r+=dZ(n)),r},getData:function(){return this._data},setData:function(t){this._data=t}});sZ.mixin(fZ,hZ.dataFormatMixin);var gZ=fZ;gZ.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{normal:{show:!0,position:"inside"},emphasis:{show:!0}},itemStyle:{normal:{borderWidth:2}}}});var mZ={},vZ=b,yZ=dr,xZ=vZ.indexOf;function _Z(t,e,i,n,a,r){var o=[],s=MZ(e,n,t),l=e.indicesOfNearest(n,s,!0)[0];o[a]=e.get(i,l,!0),o[r]=e.get(n,l,!0);var h=function(t,e,i){var n=-1;do{n=Math.max(yZ.getPrecision(t.get(e,i)),n),t=t.stackedOn}while(t);return n}(e,n,l);return(h=Math.min(h,20))>=0&&(o[r]=+o[r].toFixed(h)),o}var bZ=vZ.curry,wZ={min:bZ(_Z,"min"),max:bZ(_Z,"max"),average:bZ(_Z,"average")};function SZ(t,e,i,n){var a={};return null!=t.valueIndex||null!=t.valueDim?(a.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,a.valueAxis=i.getAxis(n.dataDimToCoordDim(a.valueDataDim)),a.baseAxis=i.getOtherAxis(a.valueAxis),a.baseDataDim=n.coordDimToDataDim(a.baseAxis.dim)[0]):(a.baseAxis=n.getBaseAxis(),a.valueAxis=i.getOtherAxis(a.baseAxis),a.baseDataDim=n.coordDimToDataDim(a.baseAxis.dim)[0],a.valueDataDim=n.coordDimToDataDim(a.valueAxis.dim)[0]),a}function MZ(t,e,i){if("average"===i){var n=0,a=0;return t.each(e,(function(t,e){isNaN(t)||(n+=t,a++)}),!0),n/a}return t.getDataExtent(e,!0)["max"===i?1:0]}mZ.dataTransform=function(t,e){var i=t.getData(),n=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!vZ.isArray(e.coord)&&n){var a=n.dimensions,r=SZ(e,i,n,t);if((e=vZ.clone(e)).type&&wZ[e.type]&&r.baseAxis&&r.valueAxis){var o=xZ(a,r.baseAxis.dim),s=xZ(a,r.valueAxis.dim);e.coord=wZ[e.type](i,r.baseDataDim,r.valueDataDim,o,s),e.value=e.coord[s]}else{for(var l=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)if(wZ[l[h]]){var u=t.coordDimToDataDim(a[h])[0];l[h]=MZ(i,u,l[h])}e.coord=l}}return e},mZ.getAxisInfo=SZ,mZ.dataFilter=function(t,e){return!(t&&t.containData&&e.coord&&!function(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}(e))||t.containData(e.coord)},mZ.dimValueGetter=function(t,e,i,n){return n<2?t.coord&&t.coord[n]:t.value},mZ.numCalculate=MZ;var IZ=b,AZ=m.extendComponentView({type:"marker",init:function(){this.markerGroupMap=IZ.createHashMap()},render:function(t,e,i){var n=this.markerGroupMap;n.each((function(t){t.__keep=!1}));var a=this.type+"Model";e.eachSeries((function(t){var n=t[a];n&&this.renderSeries(t,n,e,i)}),this),n.each((function(t){!t.__keep&&this.group.remove(t.group)}),this)},renderSeries:function(){}}),TZ=b,CZ=pm,LZ=dr,DZ=dp,PZ=mZ;function kZ(t,e,i){var n=e.coordinateSystem;t.each((function(a){var r,o=t.getItemModel(a),s=LZ.parsePercent(o.get("x"),i.getWidth()),l=LZ.parsePercent(o.get("y"),i.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)r=e.getMarkerPosition(t.getValues(t.dimensions,a));else if(n){var h=t.get(n.dimensions[0],a),u=t.get(n.dimensions[1],a);r=n.dataToPoint([h,u])}}else r=[s,l];isNaN(s)||(r[0]=s),isNaN(l)||(r[1]=l),t.setItemLayout(a,r)}))}AZ.extend({type:"markPoint",updateLayout:function(t,e,i){e.eachSeries((function(t){var e=t.markPointModel;e&&(kZ(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout(e))}),this)},renderSeries:function(t,e,i,n){var a=t.coordinateSystem,r=t.id,o=t.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,new CZ),h=function(t,e,i){var n;n=t?TZ.map(t&&t.dimensions,(function(t){var i=e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0])||{};return i.name=t,i})):[{name:"value",type:"float"}];var a=new DZ(n,i),r=TZ.map(i.get("data"),TZ.curry(PZ.dataTransform,e));t&&(r=TZ.filter(r,TZ.curry(PZ.dataFilter,t)));return a.initData(r,null,t?PZ.dimValueGetter:function(t){return t.value}),a}(a,t,e);e.setData(h),kZ(e.getData(),t,n),h.each((function(t){var i=h.getItemModel(t),n=i.getShallow("symbolSize");"function"==typeof n&&(n=n(e.getRawValue(t),e.getDataParams(t))),h.setItemVisual(t,{symbolSize:n,color:i.get("itemStyle.normal.color")||o.getVisual("color"),symbol:i.getShallow("symbol")})})),l.updateData(h),this.group.add(l.group),h.eachItemGraphicEl((function(t){t.traverse((function(t){t.dataModel=e}))})),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),m.registerPreprocessor((function(t){t.markPoint=t.markPoint||{}})),gZ.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{normal:{show:!0,position:"end"},emphasis:{show:!0}},lineStyle:{normal:{type:"dashed"},emphasis:{width:3}},animationEasing:"linear"}});var OZ=b,zZ=dp,EZ=dr,RZ=mZ,NZ=BA,VZ=function(t,e,i,n){var a=t.getData(),r=n.type;if(!OZ.isArray(n)&&("min"===r||"max"===r||"average"===r||null!=n.xAxis||null!=n.yAxis)){var o,s;if(null!=n.yAxis||null!=n.xAxis)o=null!=n.yAxis?"y":"x",e.getAxis(o),s=OZ.retrieve(n.yAxis,n.xAxis);else{var l=RZ.getAxisInfo(n,a,e,t);o=l.valueDataDim,l.valueAxis,s=RZ.numCalculate(a,o,r)}var h="x"===o?0:1,u=1-h,c=OZ.clone(n),d={};c.type=null,c.coord=[],d.coord=[],c.coord[u]=-1/0,d.coord[u]=1/0;var p=i.get("precision");p>=0&&"number"==typeof s&&(s=+s.toFixed(Math.min(p,20))),c.coord[h]=d.coord[h]=s,n=[c,d,{type:r,valueIndex:n.valueIndex,value:s}]}return(n=[RZ.dataTransform(t,n[0]),RZ.dataTransform(t,n[1]),OZ.extend({},n[2])])[2].type=n[2].type||"",OZ.merge(n[2],n[0]),OZ.merge(n[2],n[1]),n};function BZ(t){return!isNaN(t)&&!isFinite(t)}function GZ(t,e,i,n){var a=1-t,r=n.dimensions[t];return BZ(e[a])&&BZ(i[a])&&e[t]===i[t]&&n.getAxis(r).containData(e[t])}function WZ(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(GZ(1,i,n,t)||GZ(0,i,n,t)))return!0}return RZ.dataFilter(t,e[0])&&RZ.dataFilter(t,e[1])}function HZ(t,e,i,n,a){var r,o=n.coordinateSystem,s=t.getItemModel(e),l=EZ.parsePercent(s.get("x"),a.getWidth()),h=EZ.parsePercent(s.get("y"),a.getHeight());if(isNaN(l)||isNaN(h)){if(n.getMarkerPosition)r=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var u=o.dimensions,c=t.get(u[0],e),d=t.get(u[1],e);r=o.dataToPoint([c,d])}if("cartesian2d"===o.type){var p=o.getAxis("x"),f=o.getAxis("y");u=o.dimensions;BZ(t.get(u[0],e))?r[0]=p.toGlobalCoord(p.getExtent()[i?0:1]):BZ(t.get(u[1],e))&&(r[1]=f.toGlobalCoord(f.getExtent()[i?0:1]))}isNaN(l)||(r[0]=l),isNaN(h)||(r[1]=h)}else r=[l,h];t.setItemLayout(e,r)}AZ.extend({type:"markLine",updateLayout:function(t,e,i){e.eachSeries((function(t){var e=t.markLineModel;if(e){var n=e.getData(),a=e.__from,r=e.__to;a.each((function(e){HZ(a,e,!0,t,i),HZ(r,e,!1,t,i)})),n.each((function(t){n.setItemLayout(t,[a.getItemLayout(t),r.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},renderSeries:function(t,e,i,n){var a=t.coordinateSystem,r=t.id,o=t.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,new NZ);this.group.add(l.group);var h=function(t,e,i){var n;n=t?OZ.map(t&&t.dimensions,(function(t){var i=e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0])||{};return i.name=t,i})):[{name:"value",type:"float"}];var a=new zZ(n,i),r=new zZ(n,i),o=new zZ([],i),s=OZ.map(i.get("data"),OZ.curry(VZ,e,t,i));t&&(s=OZ.filter(s,OZ.curry(WZ,t)));var l=t?RZ.dimValueGetter:function(t){return t.value};return a.initData(OZ.map(s,(function(t){return t[0]})),null,l),r.initData(OZ.map(s,(function(t){return t[1]})),null,l),o.initData(OZ.map(s,(function(t){return t[2]}))),o.hasItemOption=!0,{from:a,to:r,line:o}}(a,t,e),u=h.from,c=h.to,d=h.line;e.__from=u,e.__to=c,e.setData(d);var p=e.get("symbol"),f=e.get("symbolSize");function g(e,i,a){var r=e.getItemModel(i);HZ(e,i,a,t,n),e.setItemVisual(i,{symbolSize:r.get("symbolSize")||f[a?0:1],symbol:r.get("symbol",!0)||p[a?0:1],color:r.get("itemStyle.normal.color")||o.getVisual("color")})}OZ.isArray(p)||(p=[p,p]),"number"==typeof f&&(f=[f,f]),h.from.each((function(t){g(u,t,!0),g(c,t,!1)})),d.each((function(t){var e=d.getItemModel(t).get("lineStyle.normal.color");d.setItemVisual(t,{color:e||u.getItemVisual(t,"color")}),d.setItemLayout(t,[u.getItemLayout(t),c.getItemLayout(t)]),d.setItemVisual(t,{fromSymbolSize:u.getItemVisual(t,"symbolSize"),fromSymbol:u.getItemVisual(t,"symbol"),toSymbolSize:c.getItemVisual(t,"symbolSize"),toSymbol:c.getItemVisual(t,"symbol")})})),l.updateData(d),h.line.eachItemGraphicEl((function(t,i){t.traverse((function(t){t.dataModel=e}))})),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),m.registerPreprocessor((function(t){t.markLine=t.markLine||{}})),gZ.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{normal:{show:!0,position:"top"},emphasis:{show:!0,position:"top"}},itemStyle:{normal:{borderWidth:0}}}});var FZ=b,ZZ=Pt,UZ=dp,jZ=dr,qZ=Vr,XZ=mZ,YZ=function(t,e,i,n){var a=XZ.dataTransform(t,n[0]),r=XZ.dataTransform(t,n[1]),o=FZ.retrieve,s=a.coord,l=r.coord;s[0]=o(s[0],-1/0),s[1]=o(s[1],-1/0),l[0]=o(l[0],1/0),l[1]=o(l[1],1/0);var h=FZ.mergeAll([{},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};function $Z(t){return!isNaN(t)&&!isFinite(t)}function KZ(t,e,i,n){var a=1-t;return $Z(e[a])&&$Z(i[a])}function JZ(t,e){var i=e.coord[0],n=e.coord[1];return!("cartesian2d"!==t.type||!i||!n||!KZ(1,i,n)&&!KZ(0,i,n))||(XZ.dataFilter(t,{coord:i,x:e.x0,y:e.y0})||XZ.dataFilter(t,{coord:n,x:e.x1,y:e.y1}))}function QZ(t,e,i,n,a){var r,o=n.coordinateSystem,s=t.getItemModel(e),l=jZ.parsePercent(s.get(i[0]),a.getWidth()),h=jZ.parsePercent(s.get(i[1]),a.getHeight());if(isNaN(l)||isNaN(h)){if(n.getMarkerPosition)r=n.getMarkerPosition(t.getValues(i,e));else{var u=t.get(i[0],e),c=t.get(i[1],e);r=o.dataToPoint([u,c],!0)}if("cartesian2d"===o.type){var d=o.getAxis("x"),p=o.getAxis("y");u=t.get(i[0],e),c=t.get(i[1],e);$Z(u)?r[0]=d.toGlobalCoord(d.getExtent()["x0"===i[0]?0:1]):$Z(c)&&(r[1]=p.toGlobalCoord(p.getExtent()["y0"===i[1]?0:1]))}isNaN(l)||(r[0]=l),isNaN(h)||(r[1]=h)}else r=[l,h];return r}var tU=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];AZ.extend({type:"markArea",updateLayout:function(t,e,i){e.eachSeries((function(t){var e=t.markAreaModel;if(e){var n=e.getData();n.each((function(e){var a=FZ.map(tU,(function(a){return QZ(n,e,a,t,i)}));n.setItemLayout(e,a),n.getItemGraphicEl(e).setShape("points",a)}))}}),this)},renderSeries:function(t,e,i,n){var a=t.coordinateSystem,r=t.name,o=t.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,{group:new qZ.Group});this.group.add(l.group),l.__keep=!0;var h=function(t,e,i){var n,a,r=["x0","y0","x1","y1"];t?(n=FZ.map(t&&t.dimensions,(function(t){var i=e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0])||{};return i.name=t,i})),a=new UZ(FZ.map(r,(function(t,e){return{name:t,type:n[e%2].type}})),i)):a=new UZ(n=[{name:"value",type:"float"}],i);var o=FZ.map(i.get("data"),FZ.curry(YZ,e,t,i));t&&(o=FZ.filter(o,FZ.curry(JZ,t)));var s=t?function(t,e,i,n){return t.coord[Math.floor(n/2)][n%2]}:function(t){return t.value};return a.initData(o,null,s),a.hasItemOption=!0,a}(a,t,e);e.setData(h),h.each((function(e){h.setItemLayout(e,FZ.map(tU,(function(i){return QZ(h,e,i,t,n)}))),h.setItemVisual(e,{color:o.getVisual("color")})})),h.diff(l.__data).add((function(t){var e=new qZ.Polygon({shape:{points:h.getItemLayout(t)}});h.setItemGraphicEl(t,e),l.group.add(e)})).update((function(t,i){var n=l.__data.getItemGraphicEl(i);qZ.updateProps(n,{shape:{points:h.getItemLayout(t)}},e,t),l.group.add(n),h.setItemGraphicEl(t,n)})).remove((function(t){var e=l.__data.getItemGraphicEl(t);l.group.remove(e)})).execute(),h.eachItemGraphicEl((function(t,i){var n=h.getItemModel(i),a=n.getModel("label.normal"),r=n.getModel("label.emphasis"),o=h.getItemVisual(i,"color");t.useStyle(FZ.defaults(n.getModel("itemStyle.normal").getItemStyle(),{fill:ZZ.modifyAlpha(o,.4),stroke:o})),t.hoverStyle=n.getModel("itemStyle.emphasis").getItemStyle(),qZ.setLabelStyle(t.style,t.hoverStyle,a,r,{labelFetcher:e,labelDataIndex:i,defaultText:h.getName(i)||"",isRectText:!0,autoColor:o}),qZ.setHoverStyle(t,{}),t.dataModel=e})),l.__data=h,l.group.silent=e.get("silent")||t.get("silent")}}),m.registerPreprocessor((function(t){t.markArea=t.markArea||{}}));var eU=b;function iU(t){var e=t.itemStyle||(t.itemStyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},a=n.normal||(n.normal={}),r={normal:1,emphasis:1};eU.each(n,(function(t,e){r[e]||nU(a,e)||(a[e]=t)})),i.label&&!nU(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function nU(t,e){return t.hasOwnProperty(e)}var aU=function(t){var e=t&&t.timeline;eU.isArray(e)||(e=e?[e]:[]),eU.each(e,(function(t){t&&function(t){var e=t.type,i={number:"value",time:"time"};i[e]&&(t.axisType=i[e],delete t.type);if(iU(t),nU(t,"controlPosition")){var n=t.controlStyle||(t.controlStyle={});nU(n,"position")||(n.position=t.controlPosition),"none"!==n.position||nU(n,"show")||(n.show=!1,delete n.position),delete t.controlPosition}eU.each(t.data||[],(function(t){eU.isObject(t)&&!eU.isArray(t)&&(!nU(t,"value")&&nU(t,"name")&&(t.value=t.name),iU(t))}))}(t)}))};Zu.registerSubTypeDefaulter("timeline",(function(){return"slider"}));var rU=m,oU=b;rU.registerAction({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"),oU.defaults({currentIndex:i.option.currentIndex},t)})),rU.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},(function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)}));var sU=b,lU=dp,hU=ur,uU=Zu.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:{normal:{},emphasis:{}},label:{normal:{color:"#000"},emphasis:{}},data:[]},init:function(t,e,i){this._data,this._names,this.mergeDefaultAndTheme(t,i),this._initData()},mergeOption:function(t){uU.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||[],i=t.axisType,n=this._names=[];if("category"===i){var a=[];sU.each(e,(function(t,e){var i,r=hU.getDataItemValue(t);sU.isObject(t)?(i=sU.clone(t)).value=e:i=e,a.push(i),sU.isString(r)||null!=r&&!isNaN(r)||(r=""),n.push(r+"")})),e=a}var r={category:"ordinal",time:"time"}[i]||"number";(this._data=new lU([{name:"value",type:r}],this)).initData(e,n)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}}),cU=b,dU=ur,pU=uU.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",normal:{show:!0,interval:"auto",rotate:0,color:"#304654"},emphasis:{show:!0,color:"#c23531"}},itemStyle:{normal:{color:"#304654",borderWidth:1},emphasis:{color:"#c23531"}},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",normal:{color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}});cU.mixin(pU,dU.dataFormatMixin);var fU=Md.extend({type:"timeline"}),gU=b,mU=gg,vU=Rp,yU=function(t,e,i,n){mU.call(this,t,e,i),this.type=n||"value",this._autoLabelInterval,this.model=null};yU.prototype={constructor:yU,getLabelInterval:function(){var t,e=this.model,i=e.getModel("label.normal");return null!=(t=i.get("interval"))&&"auto"!=t||(t=this._autoLabelInterval)||(t=this._autoLabelInterval=vU.getAxisLabelInterval(gU.map(this.scale.getTicks(),this.dataToCoord,this),vU.getFormattedLabels(this,i.get("formatter")),i.getFont(),"horizontal"===e.get("orient")?0:90,i.get("rotate"))),t},isLabelIgnored:function(t){if("category"===this.type){var e=this.getLabelInterval();return"function"==typeof e&&!e(t,this.scale.getLabel(t))||t%(e+1)}}},gU.inherits(yU,mU);var xU=b,_U=Je,bU=mt,wU=Vr,SU=wu,MU=fU,IU=yU,AU=Hf.createSymbol,TU=Rp,CU=dr,LU=cr.encodeHTML,DU=xU.bind,PU=xU.each,kU=Math.PI;function OU(t,e,i,n,a,r){var o=e.get("color");if(a)a.setColor(o),i.add(a),r&&r.onUpdate(a);else{var s=t.get("symbol");(a=AU(s,-1,-1,2,2,o)).setStyle("strokeNoScale",!0),i.add(a),r&&r.onCreate(a)}var l=e.getItemStyle(["color","symbol","symbolSize"]);a.setStyle(l),n=xU.merge({rectHover:!0,z2:100},n,!0);var h=t.get("symbolSize");(h=h instanceof Array?h.slice():[+h,+h])[0]/=2,h[1]/=2,n.scale=h;var u=t.get("symbolOffset");if(u){var c=n.position=n.position||[0,0];c[0]+=CU.parsePercent(u[0],h[0]),c[1]+=CU.parsePercent(u[1],h[1])}var d=t.get("symbolRotate");return n.rotation=(d||0)*Math.PI/180||0,a.attr(n),a.updateTransform(),a}function zU(t,e,i,n,a){if(!t.dragging){var r=n.getModel("checkpointStyle"),o=i.dataToCoord(n.getData().get(["value"],e));a||!r.get("animation",!0)?t.attr({position:[o,0]}):(t.stopAnimation(!0),t.animateTo({position:[o,0]},r.get("animationDuration",!0),r.get("animationEasing",!0)))}}MU.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 a=this._layout(t,i),r=this._createGroup("mainGroup"),o=this._createGroup("labelGroup"),s=this._axis=this._createAxis(a,t);t.formatTooltip=function(t){return LU(s.scale.getLabel(t))},PU(["AxisLine","AxisTick","Control","CurrentPointer"],(function(e){this["_render"+e](a,r,s,t)}),this),this._renderAxisLabel(a,o,s,t),this._position(a,t)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.normal.position"),n=t.get("orient"),a=function(t,e){return SU.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e);null==i||"auto"===i?i="horizontal"===n?a.y+a.height/2=0||"+"===i?"left":"right"},u={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:kU/2},d="vertical"===n?a.height:a.width,p=t.getModel("controlStyle"),f=(y=p.get("show"))?p.get("itemSize"):0,g=y?p.get("itemGap"):0,m=f+g,v=t.get("label.normal.rotate")||0;v=v*kU/180;var y,x=p.get("position",!0),_=(y=p.get("show",!0))&&p.get("showPlayBtn",!0),b=y&&p.get("showPrevBtn",!0),w=y&&p.get("showNextBtn",!0),S=0,M=d;return"left"===x||"bottom"===x?(_&&(r=[0,0],S+=m),b&&(o=[S,0],S+=m),w&&(s=[M-f,0],M-=m)):(_&&(r=[M-f,0],M-=m),b&&(o=[0,0],S+=m),w&&(s=[M-f,0],M-=m)),l=[S,M],t.get("inverse")&&l.reverse(),{viewRect:a,mainLength:d,orient:n,rotation:c[n],labelRotation:v,labelPosOpt:i,labelAlign:t.get("label.normal.align")||h[n],labelBaseline:t.get("label.normal.verticalAlign")||t.get("label.normal.baseline")||u[n],playPosition:r,prevBtnPosition:o,nextBtnPosition:s,axisExtent:l,controlSize:f,controlGap:g}},_position:function(t,e){var i=this._mainGroup,n=this._labelGroup,a=t.viewRect;if("vertical"===t.orient){var r=bU.create(),o=a.x,s=a.y+a.height;bU.translate(r,r,[-o,-s]),bU.rotate(r,r,-kU/2),bU.translate(r,r,[o,s]),(a=a.clone()).applyTransform(r)}var l=m(a),h=m(i.getBoundingRect()),u=m(n.getBoundingRect()),c=i.position,d=n.position;d[0]=c[0]=l[0][0];var p,f=t.labelPosOpt;isNaN(f)?(v(c,h,l,1,p="+"===f?0:1),v(d,u,l,1,1-p)):(v(c,h,l,1,p=f>=0?0:1),d[1]=c[1]+f);function g(t){var e=t.position;t.origin=[l[0][0]-e[0],l[1][0]-e[1]]}function m(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function v(t,e,i,n,a){t[n]+=i[n][a]-e[n][a]}i.attr("position",c),n.attr("position",d),i.rotation=n.rotation=t.rotation,g(i),g(n)},_createAxis:function(t,e){var i=e.getData(),n=e.get("axisType"),a=TU.createScaleByModel(e,n),r=i.getDataExtent("value");a.setExtent(r[0],r[1]),this._customizeScale(a,i),a.niceTicks();var o=new IU("value",a,t.axisExtent,n);return o.model=e,o},_customizeScale:function(t,e){t.getTicks=function(){return e.mapArray(["value"],(function(t){return t}))},t.getTicksLabels=function(){return xU.map(this.getTicks(),t.getLabel,t)}},_createGroup:function(t){var e=this["_"+t]=new wU.Group;return this.group.add(e),e},_renderAxisLine:function(t,e,i,n){var a=i.getExtent();n.get("lineStyle.show")&&e.add(new wU.Line({shape:{x1:a[0],y1:0,x2:a[1],y2:0},style:xU.extend({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,i,n){var a=n.getData(),r=i.scale.getTicks();PU(r,(function(t,r){var o=i.dataToCoord(t),s=a.getItemModel(r),l=s.getModel("itemStyle.normal"),h=s.getModel("itemStyle.emphasis"),u={position:[o,0],onclick:DU(this._changeTimeline,this,r)},c=OU(s,l,e,u);wU.setHoverStyle(c,h.getItemStyle()),s.get("tooltip")?(c.dataIndex=r,c.dataModel=n):c.dataIndex=c.dataModel=null}),this)},_renderAxisLabel:function(t,e,i,n){var a=n.getModel("label.normal");if(a.get("show")){var r=n.getData(),o=i.scale.getTicks(),s=TU.getFormattedLabels(i,a.get("formatter")),l=i.getLabelInterval();PU(o,(function(n,a){if(!i.isLabelIgnored(a,l)){var o=r.getItemModel(a),h=o.getModel("label.normal"),u=o.getModel("label.emphasis"),c=i.dataToCoord(n),d=new wU.Text({position:[c,0],rotation:t.labelRotation-t.rotation,onclick:DU(this._changeTimeline,this,a),silent:!1});wU.setTextStyle(d.style,h,{text:s[a],textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(d),wU.setHoverStyle(d,wU.setTextStyle({},u))}}),this)}},_renderControl:function(t,e,i,n){var a=t.controlSize,r=t.rotation,o=n.getModel("controlStyle.normal").getItemStyle(),s=n.getModel("controlStyle.emphasis").getItemStyle(),l=[0,-a/2,a,a],h=n.getPlayState(),u=n.get("inverse",!0);function c(t,i,h,u){if(t){var c=function(t,e,i,n){return wU.makePath(t.get(e).replace(/^path:\/\//,""),xU.clone(n||{}),new _U(i[0],i[1],i[2],i[3]),"center")}(n,i,l,{position:t,origin:[a/2,0],rotation:u?-r:0,rectHover:!0,style:o,onclick:h});e.add(c),wU.setHoverStyle(c,s)}}c(t.nextBtnPosition,"controlStyle.nextIcon",DU(this._changeTimeline,this,u?"-":"+")),c(t.prevBtnPosition,"controlStyle.prevIcon",DU(this._changeTimeline,this,u?"+":"-")),c(t.playPosition,"controlStyle."+(h?"stopIcon":"playIcon"),DU(this._handlePlayClick,this,!h),!0)},_renderCurrentPointer:function(t,e,i,n){var a=n.getData(),r=n.getCurrentIndex(),o=a.getItemModel(r).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=DU(s._handlePointerDrag,s),t.ondragend=DU(s._handlePointerDragend,s),zU(t,r,i,n,!0)},onUpdate:function(t){zU(t,r,i,n)}};this._currentPointer=OU(o,o,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=this._axis,a=CU.asc(n.getExtent().slice());i>a[1]&&(i=a[1]),ii.getHeight()&&(n.textPosition="top",l=!0);var h=l?-5-o.height:r+8;s+o.width/2>i.getWidth()?(n.textPosition=["100%",h],n.textAlign="right"):s-o.width/2<0&&(n.textPosition=[0,h],n.textAlign="left")}}))}function h(h,u){var c,d=l[h],p=l[u],f=o[d],g=new HU(f,t,t.ecModel);if(d&&!p){if(function(t){return 0===t.indexOf("my")}(d))c={model:g,onclick:g.option.onclick,featureName:d};else{var m=GU.get(d);if(!m)return;c=new m(g,e,i)}s[d]=c}else{if(!(c=s[p]))return;c.model=g,c.ecModel=e,c.api=i}d||!p?g.get("show")&&!c.unusable?(!function(n,o,s){var l=n.getModel("iconStyle"),h=o.getIcons?o.getIcons():n.get("icon"),u=n.get("title")||{};if("string"==typeof h){var c=h,d=u;u={},(h={})[s]=c,u[s]=d}var p=n.iconPaths={};VU.each(h,(function(s,h){var c=WU.createIcon(s,{},{x:-r/2,y:-r/2,width:r,height:r});c.setStyle(l.getModel("normal").getItemStyle()),c.hoverStyle=l.getModel("emphasis").getItemStyle(),WU.setHoverStyle(c),t.get("showTitle")&&(c.__title=u[h],c.on("mouseover",(function(){var t=l.getModel("emphasis").getItemStyle();c.setStyle({text:u[h],textPosition:t.textPosition||"bottom",textFill:t.fill||t.stroke||"#000",textAlign:t.textAlign||"center"})})).on("mouseout",(function(){c.setStyle({textFill:null})}))),c.trigger(n.get("iconStatus."+h)||"normal"),a.add(c),c.on("click",VU.bind(o.onclick,o,e,i,h)),p[h]=c}))}(g,c,d),g.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},c.render&&c.render(g,e,i,n)):c.remove&&c.remove(e,i):c.dispose&&c.dispose(e,i)}},updateView:function(t,e,i,n){VU.each(this._features,(function(t){t.updateView&&t.updateView(t.model,e,i,n)}))},updateLayout:function(t,e,i,n){VU.each(this._features,(function(t){t.updateLayout&&t.updateLayout(t.model,e,i,n)}))},remove:function(t,e){VU.each(this._features,(function(i){i.remove&&i.remove(t,e)})),this.group.removeAll()},dispose:function(t,e){VU.each(this._features,(function(i){i.dispose&&i.dispose(t,e)}))}});var UU=_,jU=YG,qU=KG.toolbox.saveAsImage;function XU(t){this.model=t}XU.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:qU.title,type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:qU.lang.slice()},XU.prototype.unusable=!UU.canvasSupported,XU.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",a=document.createElement("a"),r=i.get("type",!0)||"png";a.download=n+"."+r,a.target="_blank";var o=e.getConnectedDataURL({type:r,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if(a.href=o,"function"!=typeof MouseEvent||UU.browser.ie||UU.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(o.split(",")[1]),l=s.length,h=new Uint8Array(l);l--;)h[l]=s.charCodeAt(l);var u=new Blob([h]);window.navigator.msSaveOrOpenBlob(u,n+"."+r)}else{var c=i.get("lang"),d='';window.open().document.write(d)}else{var p=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});a.dispatchEvent(p)}},jU.register("saveAsImage",XU);var YU=m,$U=b,KU=YG,JU=KG.toolbox.magicType;function QU(t){this.model=t}QU.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:$U.clone(JU.title),option:{},seriesIndex:{}};var tj=QU.prototype;tj.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return $U.each(t.get("type"),(function(t){e[t]&&(i[t]=e[t])})),i};var ej={line:function(t,e,i,n){if("bar"===t)return $U.merge({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0)},bar:function(t,e,i,n){if("line"===t)return $U.merge({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0)},stack:function(t,e,i,n){if("line"===t||"bar"===t)return $U.merge({id:e,stack:"__ec_magicType_stack__"},n.get("option.stack")||{},!0)},tiled:function(t,e,i,n){if("line"===t||"bar"===t)return $U.merge({id:e,stack:""},n.get("option.tiled")||{},!0)}},ij=[["line","bar"],["stack","tiled"]];tj.onclick=function(t,e,i){var n=this.model,a=n.get("seriesIndex."+i);if(ej[i]){var r={series:[]};$U.each(ij,(function(t){$U.indexOf(t,i)>=0&&$U.each(t,(function(t){n.setIconStatus(t,"normal")}))})),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==a?null:{seriesIndex:a}},(function(e){var a=e.subType,o=e.id,s=ej[i](a,o,e,n);s&&($U.defaults(s,e.option),r.series.push(s));var l=e.coordinateSystem;if(l&&"cartesian2d"===l.type&&("line"===i||"bar"===i)){var h=l.getAxesByScale("ordinal")[0];if(h){var u=h.dim+"Axis",c=t.queryComponents({mainType:u,index:e.get(name+"Index"),id:e.get(name+"Id")})[0].componentIndex;r[u]=r[u]||[];for(var d=0;d<=c;d++)r[u][c]=r[u][c]||{};r[u][c].boundaryGap="bar"===i}}})),e.dispatchAction({type:"changeMagicType",currentType:i,newOption:r})}},YU.registerAction({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)})),KU.register("magicType",QU);var nj=m,aj=b,rj=fa,oj=YG,sj=KG.toolbox.dataView,lj=new Array(60).join("-");function hj(t){return aj.map(t,(function(t){var e=t.getRawData(),i=[t.name],n=[];return e.each(e.dimensions,(function(){for(var t=arguments.length,a=arguments[t-1],r=e.getName(a),o=0;o=0)return!0}(t)){var a=function(t){for(var e=t.split(/\n+/g),i=uj(e.shift()).split(cj),n=[],a=aj.map(i,(function(t){return{name:t,data:[]}})),r=0;r=0;a--){if(i[a][n])break}if(a<0){var r=t.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(r){var o=r.getPercentRange();i[0][n]={dataZoomId:n,start:o[0],end:o[1]}}}})),i.push(e)},gj.pop=function(t){var e=yj(t),i=e[e.length-1];e.length>1&&e.pop();var n={};return mj(i,(function(t,i){for(var a=e.length-1;a>=0;a--){if(t=e[a][i]){n[i]=t;break}}})),n},gj.clear=function(t){t[vj]=null},gj.count=function(t){return yj(t).length},$W.extend({type:"dataZoom.select"}),JW.extend({type:"dataZoom.select"});var xj=m,_j=b,bj=aD,wj=MG,Sj=gj,Mj=RC,Ij=YG,Aj=KG.toolbox.dataZoom,Tj=_j.each;function Cj(t,e,i){(this._brushController=new bj(i.getZr())).on("brush",_j.bind(this._onBrush,this)).mount(),this._isZoomActive}Cj.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:_j.clone(Aj.title)};var Lj=Cj.prototype;Lj.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,function(t,e,i,n,a){var r=i._isZoomActive;n&&"takeGlobalCursor"===n.type&&(r="dataZoomSelect"===n.key&&n.dataZoomSelectActive);i._isZoomActive=r,t.setIconStatus("zoom",r?"emphasis":"normal");var o=new wj(Pj(t.option),e,{include:["grid"]});i._brushController.setPanels(o.makePanelOpts(a,(function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"}))).enableBrush(!!r&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}})}(t,e,this,n,i),function(t,e){t.setIconStatus("back",Sj.count(e)>1?"emphasis":"normal")}(t,e)},Lj.onclick=function(t,e,i){Dj[i].call(this)},Lj.remove=function(t,e){this._brushController.unmount()},Lj.dispose=function(t,e){this._brushController.dispose()};var Dj={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(Sj.pop(this.ecModel))}};function Pj(t){var e={};return _j.each(["xAxisIndex","yAxisIndex"],(function(i){e[i]=t[i],null==e[i]&&(e[i]="all"),(!1===e[i]||"none"===e[i])&&(e[i]=[])})),e}Lj._onBrush=function(t,e){if(e.isEnd&&t.length){var i={},n=this.ecModel;this._brushController.updateCovers([]),new wj(Pj(this.model.option),n,{include:["grid"]}).matchOutputRanges(t,n,(function(t,e,i){if("cartesian2d"===i.type){var n=t.brushType;"rect"===n?(a("x",i,e[0]),a("y",i,e[1])):a({lineX:"x",lineY:"y"}[n],i,e)}})),Sj.push(n,i),this._dispatchZoomAction(i)}function a(t,e,a){var r=e.getAxis(t),o=r.model,s=function(t,e,i){var n;return i.eachComponent({mainType:"dataZoom",subType:"select"},(function(i){i.getAxisModel(t,e.componentIndex)&&(n=i)})),n}(t,o,n),l=s.findRepresentativeAxisProxy(o).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(a=Mj(0,a.slice(),r.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(i[s.id]={dataZoomId:s.id,startValue:a[0],endValue:a[1]})}},Lj._dispatchZoomAction=function(t){var e=[];Tj(t,(function(t,i){e.push(_j.clone(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},Ij.register("dataZoom",Cj),xj.registerPreprocessor((function(t){if(t){var e=t.dataZoom||(t.dataZoom=[]);_j.isArray(e)||(t.dataZoom=e=[e]);var i=t.toolbox;if(i&&(_j.isArray(i)&&(i=i[0]),i&&i.feature)){var n=i.feature.dataZoom;a("xAxis",n),a("yAxis",n)}}function a(i,n){if(n){var a=i+"Index",r=n[a];null==r||"all"==r||_j.isArray(r)||(r=!1===r||"none"===r?[]:[r]),function(e,i){var n=t[e];_j.isArray(n)||(n=n?[n]:[]);Tj(n,i)}(i,(function(t,n){if(null==r||"all"==r||-1!==_j.indexOf(r,n)){var o={type:"select",$fromToolbox:!0,id:"\0_ec_\0toolbox-dataZoom_"+i+n};o[a]=n,e.push(o)}}))}}}));var kj=m,Oj=gj,zj=YG,Ej=KG.toolbox.restore;function Rj(t){this.model=t}Rj.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:Ej.title},Rj.prototype.onclick=function(t,e,i){Oj.clear(t),e.dispatchAction({type:"restore",from:this.uid})},zj.register("restore",Rj),kj.registerAction({type:"restore",event:"restore",update:"prepareAndUpdate"},(function(t,e){e.resetOption("recreate")}));var Nj,Vj={},Bj=_,Gj="urn:schemas-microsoft-com:vml",Wj="undefined"==typeof window?null:window,Hj=!1,Fj=Wj&&Wj.document;if(Fj&&!Bj.canvasSupported)try{!Fj.namespaces.zrvml&&Fj.namespaces.add("zrvml",Gj),Nj=function(t){return Fj.createElement("')}}catch(PY){Nj=function(t){return Fj.createElement("<"+t+' xmlns="'+Gj+'" class="zrvml">')}}Vj.doc=Fj,Vj.createNode=function(t){return Nj(t)},Vj.initVML=function(){if(!Hj&&Fj){Hj=!0;var t=Fj.styleSheets;t.length<31?Fj.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}};var Zj=_,Uj=U.applyTransform,jj=Je,qj=Pt,Xj=Ni,Yj=Ri,$j=Gn,Kj=jn,Jj=Jn,Qj=Hs,tq=ms,eq=Oo,iq=Rl,nq=Vj,aq=eq.CMD,rq=Math.round,oq=Math.sqrt,sq=Math.abs,lq=Math.cos,hq=Math.sin,uq=Math.max;if(!Zj.canvasSupported){var cq=21600,dq=cq/2,pq=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=cq+","+cq,t.coordorigin="0,0"},fq=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},gq=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},mq=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},vq=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},yq=function(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t},xq=function(t,e,i){var n=qj.parse(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=fq(n[0],n[1],n[2]),t.opacity=i*n[3])},_q=function(t){var e=qj.parse(t);return[fq(e[0],e[1],e[2]),e[3]]},bq=function(t,e,i,n){var a="fill"==e,r=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(a||!a&&i.lineWidth)?(t[a?"filled":"stroked"]="true",i[e]instanceof iq&&mq(t,r),r||(r=nq.createNode(e)),a?function(t,e,i){var n=e.fill;if(null!=n)if(n instanceof iq){var a,r=0,o=[0,0],s=0,l=1,h=i.getBoundingRect(),u=h.width,c=h.height;if("linear"===n.type){a="gradient";var d=i.transform,p=[n.x*u,n.y*c],f=[n.x2*u,n.y2*c];d&&(Uj(p,p,d),Uj(f,f,d));var g=f[0]-p[0],m=f[1]-p[1];(r=180*Math.atan2(g,m)/Math.PI)<0&&(r+=360),r<1e-6&&(r=0)}else{a="gradientradial",p=[n.x*u,n.y*c],d=i.transform;var v=i.scale,y=u,x=c;o=[(p[0]-h.x)/y,(p[1]-h.y)/x],d&&Uj(p,p,d),y/=v[0]*cq,x/=v[1]*cq;var _=uq(y,x);s=0/_,l=2*n.r/_-s}var b=n.colorStops.slice();b.sort((function(t,e){return t.offset-e.offset}));for(var w=b.length,S=[],M=[],I=0;I=2){var C=S[0][0],L=S[1][0],D=S[0][1]*e.opacity,P=S[1][1]*e.opacity;t.type=a,t.method="none",t.focus="100%",t.angle=r,t.color=C,t.color2=L,t.colors=M.join(","),t.opacity=P,t.opacity2=D}"radial"===a&&(t.focusposition=o.join(","))}else xq(t,n,e.opacity)}(r,i,n):function(t,e){null!=e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof iq||xq(t,e.stroke,e.opacity)}(r,i),gq(t,r)):(t[a?"filled":"stroked"]="false",mq(t,r))},wq=[[],[],[]];tq.prototype.brushVML=function(t){var e=this.style,i=this._vmlEl;i||(i=nq.createNode("shape"),pq(i),this._vmlEl=i),bq(i,"fill",e,this),bq(i,"stroke",e,this);var n=this.transform,a=null!=n,r=i.getElementsByTagName("stroke")[0];if(r){var o=e.lineWidth;if(a&&!e.strokeNoScale){var s=n[0]*n[3]-n[1]*n[2];o*=oq(sq(s))}r.weight=o+"px"}var l=this.path||(this.path=new eq);this.__dirtyPath&&(l.beginPath(),this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),i.path=function(t,e){var i,n,a,r,o,s,l=aq.M,h=aq.C,u=aq.L,c=aq.A,d=aq.Q,p=[],f=t.data,g=t.len();for(r=0;r.01?O&&(z+=270/cq):Math.abs(E-C)<1e-4?O&&zT?x-=270/cq:x+=270/cq:O&&EC?y+=270/cq:y-=270/cq),p.push(R,rq(((T-L)*M+w)*cq-dq),",",rq(((C-D)*I+S)*cq-dq),",",rq(((T+L)*M+w)*cq-dq),",",rq(((C+D)*I+S)*cq-dq),",",rq((z*M+w)*cq-dq),",",rq((E*I+S)*cq-dq),",",rq((y*M+w)*cq-dq),",",rq((x*I+S)*cq-dq)),o=y,s=x;break;case aq.R:var N=wq[0],V=wq[1];N[0]=f[r++],N[1]=f[r++],V[0]=N[0]+f[r++],V[1]=N[1]+f[r++],e&&(Uj(N,N,e),Uj(V,V,e)),N[0]=rq(N[0]*cq-dq),V[0]=rq(V[0]*cq-dq),N[1]=rq(N[1]*cq-dq),V[1]=rq(V[1]*cq-dq),p.push(" m ",N[0],",",N[1]," l ",V[0],",",N[1]," l ",V[0],",",V[1]," l ",N[0],",",V[1]);break;case aq.Z:p.push(" x ")}if(i>0){p.push(n);for(var B=0;B100&&(Iq=0,Mq={});var i,n=Aq.style;try{n.font=t,i=n.fontFamily.split(",")[0]}catch(PY){}e={style:n.fontStyle||"normal",variant:n.fontVariant||"normal",weight:n.fontWeight||"normal",size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},Mq[t]=e,Iq++}return e}(a.font),m=g.style+" "+g.variant+" "+g.weight+" "+g.size+'px "'+g.family+'"';i=i||Xj.getBoundingRect(r,m,p,f);var v=this.transform;if(v&&!n&&(Tq.copy(e),Tq.applyTransform(v),e=Tq),n)c=e.x,d=e.y;else{var y=a.textPosition,x=a.textDistance;if(y instanceof Array)c=e.x+yq(y[0],e.width),d=e.y+yq(y[1],e.height),p=p||"left";else{var _=Xj.adjustTextPositionOnRect(y,e,x);c=_.x,d=_.y,p=p||_.textAlign,f=f||_.textVerticalAlign}}c=Xj.adjustTextX(c,i.width,p),d=Xj.adjustTextY(d,i.height,f),d+=i.height/2;var b,w,S,M=nq.createNode,I=this._textVmlEl;I?w=(b=(S=I.firstChild).nextSibling).nextSibling:(I=M("line"),b=M("path"),w=M("textpath"),S=M("skew"),w.style["v-text-align"]="left",pq(I),b.textpathok=!0,w.on=!0,I.from="0 0",I.to="1000 0.05",gq(I,S),gq(I,b),gq(I,w),this._textVmlEl=I);var A=[c,d],T=I.style;v&&n?(Uj(A,A,v),S.on=!0,S.matrix=v[0].toFixed(3)+","+v[2].toFixed(3)+","+v[1].toFixed(3)+","+v[3].toFixed(3)+",0,0",S.offset=(rq(A[0])||0)+","+(rq(A[1])||0),S.origin="0 0",T.left="0px",T.top="0px"):(S.on=!1,T.left=rq(c)+"px",T.top=rq(d)+"px"),w.string=String(r).replace(/&/g,"&").replace(/"/g,""");try{w.style.font=m}catch(PY){}bq(I,"fill",{fill:a.textFill,opacity:a.opacity},this),bq(I,"stroke",{stroke:a.textStroke,opacity:a.opacity,lineDash:a.lineDash},this),I.style.zIndex=vq(this.zlevel,this.z,this.z2),gq(t,I)}},Lq=function(t){mq(t,this._textVmlEl),this._textVmlEl=null},Dq=function(t){gq(t,this._textVmlEl)},Pq=[$j,Kj,Jj,tq,Qj],kq=0;kq-1e-4}function aX(t,e){e&&rX(t,"transform","matrix("+Xq.call(e,",")+")")}function rX(t,e,i){(!i||"linear"!==i.type&&"radial"!==i.type)&&t.setAttribute(e,i)}function oX(t,e,i){if(function(t,e){var i=e?t.textFill:t.fill;return null!=i&&i!==Yq}(e,i)){var n=i?e.textFill:e.fill;n="transparent"===n?Yq:n,"none"!==t.getAttribute("clip-path")&&n===Yq&&(n="rgba(0, 0, 0, 0.002)"),rX(t,"fill",n),rX(t,"fill-opacity",e.opacity)}else rX(t,"fill",Yq);if(function(t,e){var i=e?t.textStroke:t.stroke;return null!=i&&i!==Yq}(e,i)){var a=i?e.textStroke:e.stroke;rX(t,"stroke",a="transparent"===a?Yq:a),rX(t,"stroke-width",(i?e.textStrokeWidth:e.lineWidth)/(e.strokeNoScale?e.host.getLineScale():1)),rX(t,"paint-order","stroke"),rX(t,"stroke-opacity",e.opacity),e.lineDash?(rX(t,"stroke-dasharray",e.lineDash.join(",")),rX(t,"stroke-dashoffset",$q(e.lineDashOffset||0))):rX(t,"stroke-dasharray",""),e.lineCap&&rX(t,"stroke-linecap",e.lineCap),e.lineJoin&&rX(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&rX(t,"stroke-miterlimit",e.miterLimit)}else rX(t,"stroke",Yq)}var sX={};sX.brush=function(t){var e=t.style,i=t.__svgEl;i||(i=Hq("path"),t.__svgEl=i),t.path||t.createPathProxy();var n=t.path;if(t.__dirtyPath){n.beginPath(),t.buildPath(n,t.shape),t.__dirtyPath=!1;var a=function(t){for(var e=[],i=t.data,n=t.len(),a=0;a=tX||!nX(g)&&(d>-Qq&&d<0||d>Qq)==!!f;var y=iX(s+h*Jq(c)),x=iX(l+u*Kq(c));m&&(d=f?tX-1e-4:1e-4-tX,v=!0,9===a&&e.push("M",y,x));var _=iX(s+h*Jq(c+d)),b=iX(l+u*Kq(c+d));e.push("A",iX(h),iX(u),$q(p*eX),+v,+f,_,b);break;case qq.Z:r="Z";break;case qq.R:_=iX(i[a++]),b=iX(i[a++]);var w=iX(i[a++]),S=iX(i[a++]);e.push("M",_,b,"L",_+w,b,"L",_+w,b+S,"L",_,b+S,"L",_,b)}r&&e.push(r);for(var M=0;M=a&&h+1>=r){for(var u=[],c=0;c=a&&c+1>=r)return fX(n,s.components);l[i]=s}else l[i]=void 0}var f;o++}for(;o<=s;){var p=d();if(p)return p}},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 a=e.length,r=i.length,o=t.newPos,s=o-n,l=0;o+1=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},AX.prototype.update=function(t,e){if(t){var i=this.getDefs(!1);if(t._dom&&i.contains(t._dom))"function"==typeof e&&e();else{var n=this.add(t);n&&(t._dom=n)}}},AX.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},AX.prototype.removeDom=function(t){this.getDefs(!1).removeChild(t._dom)},AX.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return yX.each(this._tagNames,(function(i){var n=t.getElementsByTagName(i);e=e.concat([].slice.call(n))})),e},AX.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;yX.each(t,(function(t){t[e._markLabel]="0"}))},AX.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},AX.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this.getDoms(),i=this;yX.each(e,(function(e){"1"!==e[i._markLabel]&&t.removeChild(e)}))}},AX.prototype.getSvgProxy=function(t){return t instanceof xX?SX:t instanceof _X?MX:t instanceof bX?IX:SX},AX.prototype.getTextSvgElement=function(t){return t.__textSvgEl},AX.prototype.getSvgElement=function(t){return t.__svgEl};var TX=AX,CX=TX,LX=b,DX=Ae;function PX(t){CX.call(this,t,["linearGradient","radialGradient"],"__gradient_in_use__")}LX.inherits(PX,CX),PX.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var i=this;LX.each(["fill","stroke"],(function(n){if(e.style[n]&&("linear"===e.style[n].type||"radial"===e.style[n].type)){var a,r=e.style[n],o=i.getDefs(!0);r._dom?(a=r._dom,o.contains(r._dom)||i.addDom(a)):a=i.add(r),i.markUsed(e);var s=a.getAttribute("id");t.setAttribute(n,"url(#"+s+")")}}))}},PX.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return DX("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},PX.prototype.update=function(t){var e=this;CX.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))}))},PX.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 DX("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,a=i.length;n0){var n,a,r=this.getDefs(!0),o=e[0],s=i?"_textDom":"_dom";o[s]?(a=o[s].getAttribute("id"),n=o[s],r.contains(n)||r.appendChild(n)):(a="zr-clip-"+this.nextId,++this.nextId,(n=this.createElement("clipPath")).setAttribute("id",a),r.appendChild(n),o[s]=n);var l=this.getSvgProxy(o);if(o.transform&&o.parent.invTransform&&!i){var h=Array.prototype.slice.call(o.transform);EX.mul(o.transform,o.parent.invTransform,o.transform),l.brush(o),o.transform=h}else l.brush(o);var u=this.getSvgElement(o);n.appendChild(u.cloneNode()),t.setAttribute("clip-path","url(#"+a+")"),e.length>1&&this.updateDom(n,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},RX.prototype.markUsed=function(t){var e=this;t.__clipPaths&&t.__clipPaths.length>0&&zX.each(t.__clipPaths,(function(t){t._dom&&OX.prototype.markUsed.call(e,t._dom),t._textDom&&OX.prototype.markUsed.call(e,t._textDom)}))};var NX=RX,VX=Wq.createElement,BX=b,GX=BX.each,WX=Ae,HX=ms,FX=Jn,ZX=Hs,UX=mX,jX=kX,qX=NX,XX=Gq,YX=XX.path,$X=XX.image,KX=XX.text;function JX(t){return parseInt(t,10)}function QX(t,e){return e&&t&&e.parentNode!==t}function tY(t,e,i){if(QX(t,e)&&i){var n=i.nextSibling;n?t.insertBefore(e,n):t.appendChild(e)}}function eY(t,e){if(QX(t,e)){var i=t.firstChild;i?t.insertBefore(e,i):t.appendChild(e)}}function iY(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function nY(t){return t.__textSvgEl}function aY(t){return t.__svgEl}var rY=function(t,e,i){this.root=t,this.storage=e,this._opts=i=BX.extend({},i||{});var n=VX("svg");n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.setAttribute("version","1.1"),n.setAttribute("baseProfile","full"),n.style["user-select"]="none",n.style.cssText="position:absolute;left:0;top:0;",this.gradientManager=new jX(n),this.clipPathManager=new qX(n);var a=document.createElement("div");a.style.cssText="overflow:hidden;position:relative",this._svgRoot=n,this._viewport=a,t.appendChild(a),a.appendChild(n),this.resize(i.width,i.height),this._visibleList=[]};rY.prototype={constructor:rY,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)},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused();var e,i,n=this._svgRoot,a=this._visibleList,r=t.length,o=[];for(e=0;e=0;--n)if(i[n]===t)return!0;return!1}),e):null:e[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 a=i.style;a.width=t+"px",a.height=e+"px";var r=this._svgRoot;r.setAttribute("width",t),r.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],a=["paddingLeft","paddingTop"][t],r=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[n]||JX(s[i])||JX(o.style[i]))-(JX(s[a])||0)-(JX(s[r])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},pathToSvg:function(){this.refresh();var t=this._svgRoot.outerHTML;return"data:img/svg+xml;utf-8,"+unescape(t)}},GX(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],(function(t){var e;rY.prototype[t]=(e=t,function(){WX('In SVG mode painter not support method "'+e+'"')})}));var oY=rY;(0,v.registerPainter)("svg",oY),function(t){var e=m;!function(){for(var i in e){if(null==e||!e.hasOwnProperty(i)||"default"===i||"__esModule"===i)return;t[i]=e[i]}}();var i=Ud;!function(){for(var e in i){if(null==i||!i.hasOwnProperty(e)||"default"===e||"__esModule"===e)return;t[e]=i[e]}}()}(g);const sY={class:"market-temperature"},lY={class:"container"},hY={class:"border3"},uY={class:"chart-section"},cY={class:"border4"},dY={class:"border1"},pY={class:"title"},fY=["src"],gY={class:"titleContent"},mY={class:"secondTitle"},vY={class:"secondTitleItem"},yY={class:"calendar"},xY={key:0,class:"month"},_Y={class:"monthContent"},bY={class:"calendarItemTitle"},wY={key:1,class:"calendarItemContent"},SY=["src"],MY={key:2,class:"calendarItemContent"},IY={key:3,class:"calendarItemContent"},AY={key:0},TY={key:1},CY={__name:"marketTemperature",props:{companyName:{type:String,default:""},stockCode:{type:String,default:""}},setup(t,{expose:e}){const m=t,v=i(["#32A3FF","#2BD977","#A239FF","#FF7945","#FF5289","#5791CB"]),y=i(["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]),x=i(),_=i(["周一","周二","周三","周四","周五","周六","周日"]),b=i(),w=i([]),S=i([]);let M=null;const I=["NDX","DJIA","SPX","STI","KLSE","TSX","N225","KS11","JKSE","1A0001","HSI","I63","VNINDE"],A=n((()=>I.includes(m.stockCode))),T=i([]);function C(){const t=document.querySelector(".border4 .el-table");if(t){const e=t.offsetWidth/7,i=Math.min(.15*e,20),n=document.querySelectorAll(".WDRL_date"),a=document.querySelectorAll(".WDRL_data");n.forEach((t=>{t.style.fontSize=`${i}px`})),a.forEach((t=>{t.style.fontSize=.8*i+"px"}))}}return a((()=>{M&&(M.dispose(),M=null),window.marketTempResizeHandler&&(window.removeEventListener("resize",window.marketTempResizeHandler),window.marketTempResizeHandler=null),window.marketTempContainerObserver&&(window.marketTempContainerObserver.disconnect(),window.marketTempContainerObserver=null)})),e({initChart:function(t,e,n){if(!t||!e||!n)return void console.error("initChart: raw, klineDataRawValue or WDRLValue is undefined");console.log(m),M&&(M.dispose(),M=null);const a=e.map((t=>[t[1],t[2],t[3],t[4]]));let r=1/0,o=-1/0;e.forEach((t=>{const e=t[3],i=t[4];r=Math.min(r,e),o=Math.max(o,i)}));const s=Math.floor(r),l=Math.ceil(o);w.value=n,S.value=e,(()=>{const t=i([]);T.value=JSON.parse(JSON.stringify(w.value));for(let i=0;it[0])),u=t.map((t=>Math.round(t[1]))),c=t.map((t=>Math.round(t[2]))),d=c.every(((t,e)=>t===u[e])),p=d?c.map((()=>null)):c;M=g.init(b.value),M.setOption({tooltip:{trigger:"axis",confine:!0,position:function(t,e,i,n,a){const r=a.viewSize[0],o=a.viewSize[1],s=a.contentSize[0],l=a.contentSize[1];if(window.innerWidth<=768)return{top:10,left:Math.max(10,(r-s)/2)};{let e=t[0],i=t[1];return e+s>r&&(e=r-s-10),i+l>o&&(i=o-l-10),[Math.max(10,e),Math.max(10,i)]}},axisPointer:{type:"cross",crossStyle:{color:"#999",width:1,type:"dashed"},lineStyle:{color:"#999",width:1,type:"dashed"}},backgroundColor:"#646E71",borderColor:"#fff",borderWidth:1,padding:[8,12],textStyle:{color:"#fff",fontSize:window.innerWidth<=768?10:12},extraCssText:window.innerWidth<=768?"max-width: 280px; word-wrap: break-word; white-space: normal; box-shadow: 0 2px 8px rgba(0,0,0,0.3);":"max-width: 350px; word-wrap: break-word; white-space: normal; box-shadow: 0 2px 8px rgba(0,0,0,0.3);",formatter:function(t){if(t&&t.length>0){const e=window.innerWidth<=768,i=e?"10px":"12px",n=e?"1.3":"1.5",a=e?"4px":"6px";let r=`
日期: ${t[0].name}
`;return t.forEach((t=>{if("candlestick"===t.seriesType){const o=t.data[1],s=t.data[2],l=t.data[3],h=t.data[4];e?(r+=`
`,r+=`
${t.seriesName}
`,r+=`
开盘价:${o}
`,r+=`
收盘价:${s}
`,r+=`
最低价:${l}
`,r+=`
最高价:${h}
`,r+="
"):(r+=`
`,r+=`
${t.seriesName}
`,r+=`
开盘价: ${o}
`,r+=`
收盘价: ${s}
`,r+=`
最低价: ${l}
`,r+=`
最高价: ${h}
`,r+="
")}else"line"===t.seriesType&&(r+=`
${t.seriesName}: ${t.value}
`)})),r}return""}},legend:{data:["K线","股票温度","市场温度"],textStyle:{color:"white",fontSize:window.innerWidth<=768?14:18}},grid:{left:window.innerWidth<=768?"15%":"100px",right:window.innerWidth<=768?"40px":"100px",top:window.innerWidth<=768?"40px":"60px",bottom:window.innerWidth<=768?"60px":"80px",containLabel:!1,height:window.innerWidth<=768?"200px":"300px",width:window.innerWidth<=768?"70%":"80%"},xAxis:{type:"category",data:h,axisLine:{lineStyle:{color:"#00BFFF"}},axisLabel:{color:"#FFFFFF",fontSize:12,fontWeight:"bold"},axisTick:{show:!0,alignWithLabel:!0,lineStyle:{color:"white",width:1,type:"dashed"}},axisPointer:{show:!0,type:"line",lineStyle:{color:"#999",width:1,type:"dashed"},label:{show:!0,color:"black"}},splitLine:{show:!1,lineStyle:{color:"#999",width:1,type:"dashed",opacity:.3}}},yAxis:[{min:s,max:l,axisLine:{lineStyle:{color:"#00FF7F"}},axisLabel:{color:"#FFFFFF",fontSize:window.innerWidth<=768?10:12,fontWeight:"bold",formatter:function(t){return t.toString()},margin:8},axisTick:{lineStyle:{color:"#00FF7F"}},splitLine:{show:!1,lineStyle:{color:"#333333",type:"solid",opacity:.3}},axisPointer:{show:!0,type:"line",label:{show:!0,color:"black"},lineStyle:{color:"#999",width:1,type:"dashed"}}},{min:0,max:100,position:"right",axisLabel:{color:"#FFFF00",fontSize:window.innerWidth<=768?10:12,fontWeight:"bold",margin:8},axisLine:{lineStyle:{color:"#FF1493",width:2}},axisTick:{lineStyle:{color:"#FF1493"}},splitLine:{show:!1,lineStyle:{color:"#444444",type:"solid",opacity:.3}},axisPointer:{show:!0,type:"line",lineStyle:{color:"#999",width:1,type:"dashed"},label:{show:!0,color:"black"}}}],color:["#f00","white"],series:[{name:"K线",type:"candlestick",data:a,z:1,itemStyle:{normal:{color:"#00FF00",color0:"#FF0000",borderColor:"#00FF00",borderColor0:"#FF0000"}}},{name:"股票温度",type:"line",yAxisIndex:1,data:p,z:2,connectNulls:!1,lineStyle:{width:2},symbol:"circle",symbolSize:4},{name:"市场温度",type:"line",yAxisIndex:1,data:u,z:3,lineStyle:{width:2},symbol:"circle",symbolSize:4}],dataZoom:[{type:"slider",xAxisIndex:0,filterMode:"filter",textStyle:{color:"white"},start:50,end:100,bottom:"0%"},{type:"inside",xAxisIndex:0,filterMode:"filter"}]}),M&&(M.on("dataZoom",(()=>{window.handleChartInteractionStart&&window.handleChartInteractionStart()})),M.on("mousewheel",(()=>{window.handleChartInteractionStart&&window.handleChartInteractionStart()})),M.on("mousedown",(()=>{window.handleChartInteractionStart&&window.handleChartInteractionStart()})),M.on("mouseup",(()=>{window.handleChartInteractionEnd&&window.handleChartInteractionEnd()})),M.on("click",(()=>{window.handleChartInteractionStart&&window.handleChartInteractionStart()})));const y=(t,e)=>{let i;return function(...n){clearTimeout(i),i=setTimeout((()=>{clearTimeout(i),t(...n)}),e)}},_=y((()=>{if(M&&!M.isDisposed())try{M.resize(),C(),console.log("股市温度计图表已重新调整大小")}catch(t){console.error("股市温度计图表resize失败:",t)}}),100);window.marketTempResizeHandler&&window.removeEventListener("resize",window.marketTempResizeHandler),window.addEventListener("resize",_),window.marketTempResizeHandler=_;const I=document.querySelector(".KlineClass");if(I&&window.ResizeObserver){const t=new ResizeObserver(y((()=>{if(M&&!M.isDisposed())try{M.resize(),console.log("股市温度计容器大小变化,图表已调整")}catch(t){console.error("股市温度计容器resize失败:",t)}}),100));t.observe(I),window.marketTempContainerObserver=t}C()}}),(t,e)=>(r(),o("div",sY,[s("div",lY,[s("div",hY,[s("section",uY,[s("div",null,[l('
\r\n {{ companyName }}\r\n {{ stockCode }}\r\n
'),s("div",{ref_key:"KlineCanvs",ref:b,class:"KlineClass"},null,512)])])]),s("div",cY,[s("div",dY,[s("div",pY,[s("img",{src:h("/aixiaocaishen/static/images/标题-d851a441.png"),alt:"标题",class:"titleImg"},null,8,fY),s("div",gY,u(x.value),1)]),s("div",mY,[(r(!0),o(c,null,d(_.value,(t=>(r(),o("div",{key:t,class:"secondTitleItems"},[s("div",vY,u(t),1)])))),128))]),s("div",yY,[(r(),o(c,null,d(5,(t=>s("div",{key:t,class:"calendarCol"},[(r(!0),o(c,null,d(T.value.slice(7*(t-1),7*t),(t=>(r(),o("div",{key:t,class:"calendarRow"},[s("div",{class:"calendarItem",style:p({backgroundColor:t.color})},[t.month?(r(),o("div",xY,[s("div",_Y,u(y.value[t.month-1]),1)])):l("v-if",!0),s("div",bY,u(t.day),1),""==t.stock_temperature?(r(),o("div",wY,[s("img",{src:h("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAgCAYAAACcuBHKAAAAAXNSR0IArs4c6QAAAj5JREFUWEftl7FrFEEUxr93im/mbjEolkpQQdRCJHaCCgrxHzBYphJsRAKKgq2FhQGxsFY7UVtBE0GxtbEQBEEjKkEQDIi3M4e7n6zkjs3e3d7c7QkWN+XOe9/+eG/eezOCIZf3fj/JcwBOAZgGYACsisirNE3vW2ufDykJCXUgqd77RQDnAWwq8VtKkmS+0WishmoHQawDPAFwMlD4K8lj1tqPIfZBEM65WwAuhgjmbN6q6oyItAb5DYRwzu0F8A7A5pzYZxG52mq1lqMo8nEcH6zVagsA5go/vGyMuVkZwnt/jeT1nNAaycPW2k9FcefcbQAXct/fG2P2VYZwzj0EcCYntGiMudRLmOSU9/4bAG3vq+o2EVkrAwlJxwsAJ9oiIjKnqo/6iTrnXgM40t4nudtau1IV4iWA4zmR08aYZyUQWZ/oVBHJPYOqJCQSRYhZY8xSCcTyeiP7azKByJ2J6ukgWS+06VhEfvdLRw/7XyKSjnQwSW4BUBtU40PsexFhL/uugxnH8bSIPAYwA4QPuACYHyQXrLX3irZdEN77uyTnA0RHMWmp6g4R+Zl37oJwzm1oTqP8qTT/IgdUNZtFnTWB6IyCYugm6WhHZBKJSST+1+p4CmB23J2yrZem6a56vf5lUMe8AeDKP4L4YIzJnhAbVlfbbjabO0XkjYhsHzMIReSsqma393KIbNd7f4jkHQBHxzTOV7LHkqo+CLpP5I1Ibo3jeKpKRJIkcVEUfe93ocm0B962qwCE+v4BZnoUMEqdbwsAAAAASUVORK5CYII="),alt:"锁定",class:"ciImg"},null,8,SY)])):"休市"==t.stock_temperature?(r(),o("div",MY," 休市 ")):(r(),o("div",IY,[A.value?(r(),o("div",AY,u(t.market_temperature),1)):(r(),o("div",TY,u(t.market_temperature)+" | "+u(t.stock_temperature),1))]))],4)])))),128))]))),64))])]),l(' \r\n \r\n \r\n\r\n ')])])]))}};var LY=e(CY,[["__scopeId","data-v-5d79aa79"],["__file","C:/Users/Administrator/Desktop/AIxiaocaishen/src/views/components/marketTemperature.vue"]]),DY=Object.freeze(Object.defineProperty({__proto__:null,default:LY},Symbol.toStringTag,{value:"Module"}));export{DY as a,g as e,LY as m};