/*! For license information please see LICENSES */ !function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="ed89ea77-1cf2-4e22-bdad-3b0b69376b87",t._sentryDebugIdIdentifier="sentry-dbid-ed89ea77-1cf2-4e22-bdad-3b0b69376b87")}catch(t){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"14f6a097859d0d8b3d6211949e2cbf557516f71e"},(window.webpackJsonp=window.webpackJsonp||[]).push([[47],{1309:function(t,e,n){"use strict";n.r(e),n.d(e,"guid",(function(){return S})),n.d(e,"logError",(function(){return M})),n.d(e,"clone",(function(){return O})),n.d(e,"merge",(function(){return I})),n.d(e,"mergeAll",(function(){return T})),n.d(e,"extend",(function(){return C})),n.d(e,"defaults",(function(){return A})),n.d(e,"createCanvas",(function(){return D})),n.d(e,"indexOf",(function(){return k})),n.d(e,"inherits",(function(){return L})),n.d(e,"mixin",(function(){return j})),n.d(e,"isArrayLike",(function(){return P})),n.d(e,"each",(function(){return N})),n.d(e,"map",(function(){return map})),n.d(e,"reduce",(function(){return R})),n.d(e,"filter",(function(){return filter})),n.d(e,"find",(function(){return E})),n.d(e,"keys",(function(){return z})),n.d(e,"bind",(function(){return V})),n.d(e,"curry",(function(){return B})),n.d(e,"isArray",(function(){return F})),n.d(e,"isFunction",(function(){return G})),n.d(e,"isString",(function(){return H})),n.d(e,"isStringSafe",(function(){return W})),n.d(e,"isNumber",(function(){return Y})),n.d(e,"isObject",(function(){return X})),n.d(e,"isBuiltInObject",(function(){return U})),n.d(e,"isTypedArray",(function(){return Z})),n.d(e,"isDom",(function(){return K})),n.d(e,"isGradientObject",(function(){return $})),n.d(e,"isImagePatternObject",(function(){return J})),n.d(e,"isRegExp",(function(){return Q})),n.d(e,"eqNaN",(function(){return tt})),n.d(e,"retrieve",(function(){return et})),n.d(e,"retrieve2",(function(){return nt})),n.d(e,"retrieve3",(function(){return it})),n.d(e,"slice",(function(){return ot})),n.d(e,"normalizeCssArray",(function(){return at})),n.d(e,"assert",(function(){return st})),n.d(e,"trim",(function(){return lt})),n.d(e,"setAsPrimitive",(function(){return ct})),n.d(e,"isPrimitive",(function(){return ht})),n.d(e,"HashMap",(function(){return gt})),n.d(e,"createHashMap",(function(){return yt})),n.d(e,"concatArray",(function(){return vt})),n.d(e,"createObject",(function(){return mt})),n.d(e,"disableUserSelect",(function(){return xt})),n.d(e,"hasOwn",(function(){return bt})),n.d(e,"noop",(function(){return _t})),n.d(e,"RADIAN_TO_DEGREE",(function(){return wt}));var r=n(1324),o=R(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],(function(t,e){return t["[object "+e+"]"]=!0,t}),{}),l=R(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(t,e){return t["[object "+e+"Array]"]=!0,t}),{}),c=Object.prototype.toString,h=Array.prototype,d=h.forEach,f=h.filter,y=h.slice,v=h.map,m=function(){}.constructor,x=m?m.prototype:null,_="__proto__",w=2311;function S(){return w++}function M(){for(var t=[],e=0;e18);c&&(n.weChat=!0);e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="undefined"!=typeof document;var style=document.documentElement.style;e.transform3dSupported=(n.ie&&"transition"in style||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in style)&&!("OTransition"in style),e.transformSupported=e.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,o),e.a=o},1323:function(t,e,n){"use strict";n.r(e),n.d(e,"parse",(function(){return S})),n.d(e,"lift",(function(){return O})),n.d(e,"toHex",(function(){return I})),n.d(e,"fastLerp",(function(){return T})),n.d(e,"fastMapToColor",(function(){return C})),n.d(e,"lerp",(function(){return A})),n.d(e,"mapToColor",(function(){return D})),n.d(e,"modifyHSL",(function(){return k})),n.d(e,"modifyAlpha",(function(){return L})),n.d(e,"stringify",(function(){return j})),n.d(e,"lum",(function(){return P})),n.d(e,"random",(function(){return N}));var r=n(1396),o={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 l(i){return(i=Math.round(i))<0?0:i>255?255:i}function c(t){return t<0?0:t>1?1:t}function h(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?l(parseFloat(e)/100*255):l(parseInt(e,10))}function d(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?c(parseFloat(e)/100):c(parseFloat(e))}function f(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function y(a,b,p){return a+(b-a)*p}function v(t,e,g,b,a){return t[0]=e,t[1]=g,t[2]=b,t[3]=a,t}function m(t,a){return t[0]=a[0],t[1]=a[1],t[2]=a[2],t[3]=a[3],t}var x=new r.a(20),_=null;function w(t,e){_&&m(_,e),_=x.put(t,_||e.slice())}function S(t,e){if(t){e=e||[];var n=x.get(t);if(n)return m(e,n);var r=(t+="").replace(/ /g,"").toLowerCase();if(r in o)return m(e,o[r]),w(t,e),e;var l,c=r.length;if("#"===r.charAt(0))return 4===c||5===c?(l=parseInt(r.slice(1,4),16))>=0&&l<=4095?(v(e,(3840&l)>>4|(3840&l)>>8,240&l|(240&l)>>4,15&l|(15&l)<<4,5===c?parseInt(r.slice(4),16)/15:1),w(t,e),e):void v(e,0,0,0,1):7===c||9===c?(l=parseInt(r.slice(1,7),16))>=0&&l<=16777215?(v(e,(16711680&l)>>16,(65280&l)>>8,255&l,9===c?parseInt(r.slice(7),16)/255:1),w(t,e),e):void v(e,0,0,0,1):void 0;var f=r.indexOf("("),y=r.indexOf(")");if(-1!==f&&y+1===c){var _=r.substr(0,f),S=r.substr(f+1,y-(f+1)).split(","),O=1;switch(_){case"rgba":if(4!==S.length)return 3===S.length?v(e,+S[0],+S[1],+S[2],1):v(e,0,0,0,1);O=d(S.pop());case"rgb":return S.length>=3?(v(e,h(S[0]),h(S[1]),h(S[2]),3===S.length?O:d(S[3])),w(t,e),e):void v(e,0,0,0,1);case"hsla":return 4!==S.length?void v(e,0,0,0,1):(S[3]=d(S[3]),M(S,e),w(t,e),e);case"hsl":return 3!==S.length?void v(e,0,0,0,1):(M(S,e),w(t,e),e);default:return}}v(e,0,0,0,1)}}function M(t,e){var n=(parseFloat(t[0])%360+360)%360/360,s=d(t[1]),r=d(t[2]),o=r<=.5?r*(s+1):r+s-r*s,c=2*r-o;return v(e=e||[],l(255*f(c,o,n+1/3)),l(255*f(c,o,n)),l(255*f(c,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function O(t,e){var n=S(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return j(n,4===n.length?"rgba":"rgb")}}function I(t){var e=S(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function T(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var r=t*(e.length-1),o=Math.floor(r),h=Math.ceil(r),d=e[o],f=e[h],v=r-o;return n[0]=l(y(d[0],f[0],v)),n[1]=l(y(d[1],f[1],v)),n[2]=l(y(d[2],f[2],v)),n[3]=c(y(d[3],f[3],v)),n}}var C=T;function A(t,e,n){if(e&&e.length&&t>=0&&t<=1){var r=t*(e.length-1),o=Math.floor(r),h=Math.ceil(r),d=S(e[o]),f=S(e[h]),v=r-o,m=j([l(y(d[0],f[0],v)),l(y(d[1],f[1],v)),l(y(d[2],f[2],v)),c(y(d[3],f[3],v))],"rgba");return n?{color:m,leftIndex:o,rightIndex:h,value:r}:m}}var D=A;function k(t,e,s,n){var i,r=S(t);if(t)return r=function(t){if(t){var e,n,r=t[0]/255,o=t[1]/255,l=t[2]/255,c=Math.min(r,o,l),h=Math.max(r,o,l),d=h-c,f=(h+c)/2;if(0===d)e=0,n=0;else{n=f<.5?d/(h+c):d/(2-h-c);var y=((h-r)/6+d/2)/d,v=((h-o)/6+d/2)/d,m=((h-l)/6+d/2)/d;r===h?e=m-v:o===h?e=1/3+y-m:l===h&&(e=2/3+v-y),e<0&&(e+=1),e>1&&(e-=1)}var x=[360*e,n,f];return null!=t[3]&&x.push(t[3]),x}}(r),null!=e&&(r[0]=(i=e,(i=Math.round(i))<0?0:i>360?360:i)),null!=s&&(r[1]=d(s)),null!=n&&(r[2]=d(n)),j(M(r),"rgba")}function L(t,e){var n=S(t);if(n&&null!=e)return n[3]=c(e),j(n,"rgba")}function j(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function P(t,e){var n=S(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}function N(){return j([Math.round(255*Math.random()),Math.round(255*Math.random()),Math.round(255*Math.random())],"rgb")}},1324:function(t,e,n){"use strict";n.d(e,"c",(function(){return r})),n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return l})),n.d(e,"d",(function(){return f})),n.d(e,"e",(function(){return y}));var r=12,o="sans-serif",l=r+"px "+o;var c,h,d=function(t){var map={};if("undefined"==typeof JSON)return map;for(var i=0;i=0)o=n*text.length;else for(var i=0;i-1){var n=Object(o.parse)(t);n&&(t="rgb("+n[0]+","+n[1]+","+n[2]+")",e=n[3])}}else t="none";return{color:t,opacity:null==e?1:e}}var d=1e-4;function f(t){return t-d}function y(t){return c(1e3*t)/1e3}function v(t){return c(1e4*t)/1e4}function m(t){return"matrix("+y(t[0])+","+y(t[1])+","+y(t[2])+","+y(t[3])+","+v(t[4])+","+v(t[5])+")"}var x={left:"start",right:"end",center:"middle",middle:"middle"};function _(t,e,n){return"top"===n?t+=e/2:"bottom"===n&&(t-=e/2),t}function w(style){return style&&(style.shadowBlur||style.shadowOffsetX||style.shadowOffsetY)}function S(t){var style=t.style,e=t.getGlobalScale();return[style.shadowColor,(style.shadowBlur||0).toFixed(2),(style.shadowOffsetX||0).toFixed(2),(style.shadowOffsetY||0).toFixed(2),e[0],e[1]].join(",")}function M(t){return t&&!!t.image}function O(t){return M(t)||function(t){return t&&!!t.svgElement}(t)}function I(t){return"linear"===t.type}function T(t){return"radial"===t.type}function C(t){return t&&("linear"===t.type||"radial"===t.type)}function A(t){return"url(#"+t+")"}function D(t){var e=t.getGlobalScale(),n=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function k(t){var e=t.x||0,n=t.y||0,o=(t.rotation||0)*r.RADIAN_TO_DEGREE,l=Object(r.retrieve2)(t.scaleX,1),h=Object(r.retrieve2)(t.scaleY,1),d=t.skewX||0,f=t.skewY||0,y=[];return(e||n)&&y.push("translate("+e+"px,"+n+"px)"),o&&y.push("rotate("+o+")"),1===l&&1===h||y.push("scale("+l+","+h+")"),(d||f)&&y.push("skew("+c(d*r.RADIAN_TO_DEGREE)+"deg, "+c(f*r.RADIAN_TO_DEGREE)+"deg)"),y.join(" ")}var L=l.a.hasGlobalWindow&&Object(r.isFunction)(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:void 0!==t?function(e){return t.from(e).toString("base64")}:function(t){return null}}).call(this,n(359).Buffer)},1396:function(t,e,n){"use strict";var r=function(t){this.value=t},o=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new r(t);return this.insertEntry(e),e},t.prototype.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++},t.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),l=function(){function t(t){this._list=new o,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var n=this._list,map=this._map,o=null;if(null==map[t]){var l=n.len(),c=this._lastRemovedEntry;if(l>=this._maxSize&&l>0){var h=n.head;n.remove(h),delete map[h.key],o=h.value,this._lastRemovedEntry=h}c?c.value=e:c=new r(e),c.key=t,n.insertEntry(c),map[t]=c}return o},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}();e.a=l},1809:function(t,e,n){"use strict";n.r(e),n.d(e,"version",(function(){return Jy})),n.d(e,"dependencies",(function(){return Qy})),n.d(e,"PRIORITY",(function(){return ov})),n.d(e,"init",(function(){return Kv})),n.d(e,"connect",(function(){return $v})),n.d(e,"disConnect",(function(){return Jv})),n.d(e,"disconnect",(function(){return Qv})),n.d(e,"dispose",(function(){return tm})),n.d(e,"getInstanceByDom",(function(){return nm})),n.d(e,"getInstanceById",(function(){return im})),n.d(e,"registerTheme",(function(){return rm})),n.d(e,"registerPreprocessor",(function(){return om})),n.d(e,"registerProcessor",(function(){return am})),n.d(e,"registerPostInit",(function(){return sm})),n.d(e,"registerPostUpdate",(function(){return lm})),n.d(e,"registerUpdateLifecycle",(function(){return um})),n.d(e,"registerAction",(function(){return cm})),n.d(e,"registerCoordinateSystem",(function(){return hm})),n.d(e,"getCoordinateSystemDimensions",(function(){return dm})),n.d(e,"registerLocale",(function(){return Wl})),n.d(e,"registerLayout",(function(){return pm})),n.d(e,"registerVisual",(function(){return fm})),n.d(e,"registerLoading",(function(){return vm})),n.d(e,"setCanvasCreator",(function(){return mm})),n.d(e,"registerMap",(function(){return xm})),n.d(e,"getMap",(function(){return bm})),n.d(e,"registerTransform",(function(){return _m})),n.d(e,"dataTool",(function(){return wm})),n.d(e,"zrender",(function(){return l})),n.d(e,"matrix",(function(){return o})),n.d(e,"vector",(function(){return r})),n.d(e,"zrUtil",(function(){return w})),n.d(e,"color",(function(){return Ge})),n.d(e,"throttle",(function(){return sg})),n.d(e,"helper",(function(){return h})),n.d(e,"use",(function(){return use})),n.d(e,"setPlatformAPI",(function(){return Wn.e})),n.d(e,"parseGeoJSON",(function(){return zb})),n.d(e,"parseGeoJson",(function(){return zb})),n.d(e,"number",(function(){return d})),n.d(e,"time",(function(){return f})),n.d(e,"graphic",(function(){return y})),n.d(e,"format",(function(){return v})),n.d(e,"util",(function(){return m})),n.d(e,"env",(function(){return _.a})),n.d(e,"List",(function(){return Jm})),n.d(e,"Model",(function(){return Pl})),n.d(e,"Axis",(function(){return $b})),n.d(e,"ComponentModel",(function(){return Uu})),n.d(e,"ComponentView",(function(){return Xd})),n.d(e,"SeriesModel",(function(){return Wd})),n.d(e,"ChartView",(function(){return ig})),n.d(e,"innerDrawElementOnCanvas",(function(){return By})),n.d(e,"extendComponentModel",(function(){return Jb})),n.d(e,"extendComponentView",(function(){return Qb})),n.d(e,"extendSeriesModel",(function(){return t_})),n.d(e,"extendChartView",(function(){return e_}));var r={};n.r(r),n.d(r,"create",(function(){return S})),n.d(r,"copy",(function(){return M})),n.d(r,"clone",(function(){return O})),n.d(r,"set",(function(){return I})),n.d(r,"add",(function(){return T})),n.d(r,"scaleAndAdd",(function(){return C})),n.d(r,"sub",(function(){return sub})),n.d(r,"len",(function(){return A})),n.d(r,"length",(function(){return D})),n.d(r,"lenSquare",(function(){return k})),n.d(r,"lengthSquare",(function(){return L})),n.d(r,"mul",(function(){return j})),n.d(r,"div",(function(){return div})),n.d(r,"dot",(function(){return P})),n.d(r,"scale",(function(){return N})),n.d(r,"normalize",(function(){return R})),n.d(r,"distance",(function(){return E})),n.d(r,"dist",(function(){return z})),n.d(r,"distanceSquare",(function(){return V})),n.d(r,"distSquare",(function(){return B})),n.d(r,"negate",(function(){return F})),n.d(r,"lerp",(function(){return G})),n.d(r,"applyTransform",(function(){return H})),n.d(r,"min",(function(){return W})),n.d(r,"max",(function(){return Y}));var o={};n.r(o),n.d(o,"create",(function(){return wt})),n.d(o,"identity",(function(){return St})),n.d(o,"copy",(function(){return Mt})),n.d(o,"mul",(function(){return Ot})),n.d(o,"translate",(function(){return It})),n.d(o,"rotate",(function(){return Tt})),n.d(o,"scale",(function(){return Ct})),n.d(o,"invert",(function(){return At})),n.d(o,"clone",(function(){return Dt}));var l={};n.r(l),n.d(l,"init",(function(){return vi})),n.d(l,"dispose",(function(){return mi})),n.d(l,"disposeAll",(function(){return xi})),n.d(l,"getInstance",(function(){return bi})),n.d(l,"registerPainter",(function(){return _i})),n.d(l,"version",(function(){return wi}));var c={};n.r(c),n.d(c,"updateProps",(function(){return Ks})),n.d(c,"initProps",(function(){return $s})),n.d(c,"removeElement",(function(){return Qs})),n.d(c,"removeElementWithFadeOut",(function(){return el})),n.d(c,"isElementRemoved",(function(){return Js})),n.d(c,"extendShape",(function(){return wf})),n.d(c,"extendPath",(function(){return Mf})),n.d(c,"registerShape",(function(){return Of})),n.d(c,"getShapeClass",(function(){return If})),n.d(c,"makePath",(function(){return Tf})),n.d(c,"makeImage",(function(){return Cf})),n.d(c,"mergePath",(function(){return Df})),n.d(c,"resizePath",(function(){return kf})),n.d(c,"subPixelOptimizeLine",(function(){return Lf})),n.d(c,"subPixelOptimizeRect",(function(){return jf})),n.d(c,"subPixelOptimize",(function(){return Pf})),n.d(c,"getTransform",(function(){return Nf})),n.d(c,"applyTransform",(function(){return Rf})),n.d(c,"transformDirection",(function(){return Ef})),n.d(c,"groupTransition",(function(){return Vf})),n.d(c,"clipPointsByRect",(function(){return Bf})),n.d(c,"clipRectByRect",(function(){return Ff})),n.d(c,"createIcon",(function(){return Gf})),n.d(c,"linePolygonIntersect",(function(){return Hf})),n.d(c,"lineLineIntersect",(function(){return Wf})),n.d(c,"setTooltipConfig",(function(){return Xf})),n.d(c,"traverseElements",(function(){return Zf})),n.d(c,"Group",(function(){return pi})),n.d(c,"Image",(function(){return ma})),n.d(c,"Text",(function(){return Ga})),n.d(c,"Circle",(function(){return vp})),n.d(c,"Ellipse",(function(){return bp})),n.d(c,"Sector",(function(){return Rp})),n.d(c,"Ring",(function(){return Vp})),n.d(c,"Polygon",(function(){return Hp})),n.d(c,"Polyline",(function(){return Xp})),n.d(c,"Rect",(function(){return Ia})),n.d(c,"Line",(function(){return Kp})),n.d(c,"BezierCurve",(function(){return ef})),n.d(c,"Arc",(function(){return of})),n.d(c,"IncrementalDisplayable",(function(){return mf})),n.d(c,"CompoundPath",(function(){return sf})),n.d(c,"LinearGradient",(function(){return uf})),n.d(c,"RadialGradient",(function(){return cf})),n.d(c,"BoundingRect",(function(){return Bt})),n.d(c,"OrientedBoundingRect",(function(){return gf})),n.d(c,"Point",(function(){return kt})),n.d(c,"Path",(function(){return ha}));var h={};n.r(h),n.d(h,"createList",(function(){return bb})),n.d(h,"getLayoutRect",(function(){return Vu})),n.d(h,"createDimensions",(function(){return Qm})),n.d(h,"dataStack",(function(){return _b})),n.d(h,"createSymbol",(function(){return fy})),n.d(h,"createScale",(function(){return wb})),n.d(h,"mixinAxisModelCommonMethods",(function(){return Sb})),n.d(h,"getECData",(function(){return Ha})),n.d(h,"enableHoverEmphasis",(function(){return Es})),n.d(h,"createTextStyle",(function(){return Mb}));var d={};n.r(d),n.d(d,"linearMap",(function(){return Oi})),n.d(d,"round",(function(){return Ti})),n.d(d,"asc",(function(){return Ci})),n.d(d,"getPrecision",(function(){return Ai})),n.d(d,"getPrecisionSafe",(function(){return Di})),n.d(d,"getPixelPrecision",(function(){return ki})),n.d(d,"getPercentWithPrecision",(function(){return Li})),n.d(d,"MAX_SAFE_INTEGER",(function(){return Ni})),n.d(d,"remRadian",(function(){return Ri})),n.d(d,"isRadianAroundZero",(function(){return Ei})),n.d(d,"parseDate",(function(){return Vi})),n.d(d,"quantity",(function(){return Bi})),n.d(d,"quantityExponent",(function(){return Fi})),n.d(d,"nice",(function(){return Gi})),n.d(d,"quantile",(function(){return Hi})),n.d(d,"reformIntervals",(function(){return Wi})),n.d(d,"isNumeric",(function(){return Xi})),n.d(d,"numericToNumber",(function(){return Yi}));var f={};n.r(f),n.d(f,"parse",(function(){return Vi})),n.d(f,"format",(function(){return ou}));var y={};n.r(y),n.d(y,"extendShape",(function(){return wf})),n.d(y,"extendPath",(function(){return Mf})),n.d(y,"makePath",(function(){return Tf})),n.d(y,"makeImage",(function(){return Cf})),n.d(y,"mergePath",(function(){return Df})),n.d(y,"resizePath",(function(){return kf})),n.d(y,"createIcon",(function(){return Gf})),n.d(y,"updateProps",(function(){return Ks})),n.d(y,"initProps",(function(){return $s})),n.d(y,"getTransform",(function(){return Nf})),n.d(y,"clipPointsByRect",(function(){return Bf})),n.d(y,"clipRectByRect",(function(){return Ff})),n.d(y,"registerShape",(function(){return Of})),n.d(y,"getShapeClass",(function(){return If})),n.d(y,"Group",(function(){return pi})),n.d(y,"Image",(function(){return ma})),n.d(y,"Text",(function(){return Ga})),n.d(y,"Circle",(function(){return vp})),n.d(y,"Ellipse",(function(){return bp})),n.d(y,"Sector",(function(){return Rp})),n.d(y,"Ring",(function(){return Vp})),n.d(y,"Polygon",(function(){return Hp})),n.d(y,"Polyline",(function(){return Xp})),n.d(y,"Rect",(function(){return Ia})),n.d(y,"Line",(function(){return Kp})),n.d(y,"BezierCurve",(function(){return ef})),n.d(y,"Arc",(function(){return of})),n.d(y,"IncrementalDisplayable",(function(){return mf})),n.d(y,"CompoundPath",(function(){return sf})),n.d(y,"LinearGradient",(function(){return uf})),n.d(y,"RadialGradient",(function(){return cf})),n.d(y,"BoundingRect",(function(){return Bt}));var v={};n.r(v),n.d(v,"addCommas",(function(){return wu})),n.d(v,"toCamelCase",(function(){return Su})),n.d(v,"normalizeCssArray",(function(){return Mu})),n.d(v,"encodeHTML",(function(){return st})),n.d(v,"formatTpl",(function(){return Cu})),n.d(v,"getTooltipMarker",(function(){return Au})),n.d(v,"formatTime",(function(){return Du})),n.d(v,"capitalFirst",(function(){return ku})),n.d(v,"truncateText",(function(){return Hr})),n.d(v,"getTextRect",(function(){return Vb}));var m={};n.r(m),n.d(m,"map",(function(){return w.map})),n.d(m,"each",(function(){return w.each})),n.d(m,"indexOf",(function(){return w.indexOf})),n.d(m,"inherits",(function(){return w.inherits})),n.d(m,"reduce",(function(){return w.reduce})),n.d(m,"filter",(function(){return w.filter})),n.d(m,"bind",(function(){return w.bind})),n.d(m,"curry",(function(){return w.curry})),n.d(m,"isArray",(function(){return w.isArray})),n.d(m,"isString",(function(){return w.isString})),n.d(m,"isObject",(function(){return w.isObject})),n.d(m,"isFunction",(function(){return w.isFunction})),n.d(m,"extend",(function(){return w.extend})),n.d(m,"defaults",(function(){return w.defaults})),n.d(m,"clone",(function(){return w.clone})),n.d(m,"merge",(function(){return w.merge}));var x=n(1310),_=n(1318),w=n(1309);function S(t,e){return null==t&&(t=0),null==e&&(e=0),[t,e]}function M(t,e){return t[0]=e[0],t[1]=e[1],t}function O(t){return[t[0],t[1]]}function I(t,a,b){return t[0]=a,t[1]=b,t}function T(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function C(t,e,n,a){return t[0]=e[0]+n[0]*a,t[1]=e[1]+n[1]*a,t}function sub(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function A(t){return Math.sqrt(k(t))}var D=A;function k(t){return t[0]*t[0]+t[1]*t[1]}var L=k;function j(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function div(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function P(t,e){return t[0]*e[0]+t[1]*e[1]}function N(t,e,s){return t[0]=e[0]*s,t[1]=e[1]*s,t}function R(t,e){var n=A(e);return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t}function E(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var z=E;function V(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var B=V;function F(t,e){return t[0]=-e[0],t[1]=-e[1],t}function G(t,e,n,r){return t[0]=e[0]+r*(n[0]-e[0]),t[1]=e[1]+r*(n[1]-e[1]),t}function H(t,e,n){var r=e[0],o=e[1];return t[0]=n[0]*r+n[2]*o+n[4],t[1]=n[1]*r+n[3]*o+n[5],t}function W(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function Y(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}var X=function(t,e){this.target=t,this.topTarget=e&&e.topTarget},U=function(){function t(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return t.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent||e.__hostTarget;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new X(e,t),"dragstart",t.event))},t.prototype._drag=function(t){var e=this._draggingTarget;if(e){var n=t.offsetX,r=t.offsetY,o=n-this._x,l=r-this._y;this._x=n,this._y=r,e.drift(o,l,t),this.handler.dispatchToElement(new X(e,t),"drag",t.event);var c=this.handler.findHover(n,r,e).target,h=this._dropTarget;this._dropTarget=c,e!==c&&(h&&c!==h&&this.handler.dispatchToElement(new X(h,t),"dragleave",t.event),c&&c!==h&&this.handler.dispatchToElement(new X(c,t),"dragenter",t.event))}},t.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new X(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new X(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},t}(),Z=function(){function t(t){t&&(this._$eventProcessor=t)}return t.prototype.on=function(t,e,n,r){this._$handlers||(this._$handlers={});var o=this._$handlers;if("function"==typeof e&&(r=n,n=e,e=null),!n||!t)return this;var l=this._$eventProcessor;null!=e&&l&&l.normalizeQuery&&(e=l.normalizeQuery(e)),o[t]||(o[t]=[]);for(var i=0;i>1)%2;marker.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[l]+":0",o[c]+":0",r[1-l]+":auto",o[1-c]+":auto",""].join("!important;"),t.appendChild(marker),n.push(marker)}return n}(e,l),h=function(t,e,n){for(var r=n?"invTrans":"trans",o=e[r],l=e.srcCoords,c=[],h=[],d=!0,i=0;i<4;i++){var rect=t[i].getBoundingClientRect(),f=2*i,y=rect.left,v=rect.top;c.push(y,v),d=d&&l&&y===l[f]&&v===l[f+1],h.push(t[i].offsetLeft,t[i].offsetTop)}return d&&o?o:(e.srcCoords=c,e[r]=n?Q(h,c):Q(c,h))}(c,l,o);if(h)return h(t,n,r),!0}return!1}function it(t){return"CANVAS"===t.nodeName.toUpperCase()}var ot=/([&<>"'])/g,at={"&":"&","<":"<",">":">",'"':""","'":"'"};function st(source){return null==source?"":(source+"").replace(ot,(function(t,e){return at[e]}))}var lt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ut=[],ct=_.a.browser.firefox&&+_.a.browser.version.split(".")[0]<39;function ht(t,e,n,r){return n=n||{},r?pt(t,e,n):ct&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):pt(t,e,n),n}function pt(t,e,n){if(_.a.domSupported&&t.getBoundingClientRect){var r=e.clientX,o=e.clientY;if(it(t)){var l=t.getBoundingClientRect();return n.zrX=r-l.left,void(n.zrY=o-l.top)}if(nt(ut,t,r,o))return n.zrX=ut[0],void(n.zrY=ut[1])}n.zrX=n.zrY=0}function ft(t){return t||window.event}function gt(t,e,n){if(null!=(e=ft(e)).zrX)return e;var r=e.type;if(r&&r.indexOf("touch")>=0){var o="touchend"!==r?e.targetTouches[0]:e.changedTouches[0];o&&ht(t,o,e,n)}else{ht(t,e,e,n);var l=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,r=t.deltaY;if(null==n||null==r)return e;return 3*(0!==r?Math.abs(r):Math.abs(n))*(r>0?-1:r<0?1:n>0?-1:1)}(e);e.zrDelta=l?l/120:-(e.detail||0)/3}var button=e.button;return null==e.which&&void 0!==button&<.test(e.type)&&(e.which=1&button?1:2&button?3:4&button?2:0),e}function yt(t,e,n,r){t.addEventListener(e,n,r)}var vt=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function mt(t){return 2===t.which||3===t.which}var xt=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,n){var r=t.touches;if(r){for(var o={points:[],touches:[],target:e,event:t},i=0,l=r.length;i1&&o&&o.length>1){var c=bt(o)/bt(l);!isFinite(c)&&(c=1),e.pinchScale=c;var h=[((r=o)[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2];return e.pinchX=h[0],e.pinchY=h[1],{type:"pinch",target:t[0].target,event:e}}}}};function wt(){return[1,0,0,1,0,0]}function St(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function Mt(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}function Ot(t,e,n){var r=e[0]*n[0]+e[2]*n[1],o=e[1]*n[0]+e[3]*n[1],l=e[0]*n[2]+e[2]*n[3],c=e[1]*n[2]+e[3]*n[3],h=e[0]*n[4]+e[2]*n[5]+e[4],d=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=r,t[1]=o,t[2]=l,t[3]=c,t[4]=h,t[5]=d,t}function It(t,a,e){return t[0]=a[0],t[1]=a[1],t[2]=a[2],t[3]=a[3],t[4]=a[4]+e[0],t[5]=a[5]+e[1],t}function Tt(t,a,e){var n=a[0],r=a[2],o=a[4],l=a[1],c=a[3],h=a[5],d=Math.sin(e),f=Math.cos(e);return t[0]=n*f+l*d,t[1]=-n*d+l*f,t[2]=r*f+c*d,t[3]=-r*d+f*c,t[4]=f*o+d*h,t[5]=f*h-d*o,t}function Ct(t,a,e){var n=e[0],r=e[1];return t[0]=a[0]*n,t[1]=a[1]*r,t[2]=a[2]*n,t[3]=a[3]*r,t[4]=a[4]*n,t[5]=a[5]*r,t}function At(t,a){var e=a[0],n=a[2],r=a[4],o=a[1],l=a[3],c=a[5],h=e*l-o*n;return h?(h=1/h,t[0]=l*h,t[1]=-o*h,t[2]=-n*h,t[3]=e*h,t[4]=(n*c-l*r)*h,t[5]=(o*r-e*c)*h,t):null}function Dt(a){var b=[1,0,0,1,0,0];return Mt(b,a),b}var kt=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(input){this.x=input[0],this.y=input[1]},t.set=function(p,t,e){p.x=t,p.y=e},t.copy=function(p,t){p.x=t.x,p.y=t.y},t.len=function(p){return Math.sqrt(p.x*p.x+p.y*p.y)},t.lenSquare=function(p){return p.x*p.x+p.y*p.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},t.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},t.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},t.scaleAndAdd=function(t,e,n,r){t.x=e.x+n.x*r,t.y=e.y+n.y*r},t.lerp=function(t,e,n,r){var o=1-r;t.x=o*e.x+r*n.x,t.y=o*e.y+r*n.y},t}(),Lt=Math.min,jt=Math.max,Pt=new kt,Nt=new kt,Rt=new kt,rt=new kt,Et=new kt,zt=new kt,Vt=function(){function t(t,e,n,r){n<0&&(t+=n,n=-n),r<0&&(e+=r,r=-r),this.x=t,this.y=e,this.width=n,this.height=r}return t.prototype.union=function(t){var e=Lt(t.x,this.x),n=Lt(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=jt(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=jt(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(b){var a=this,t=b.width/a.width,e=b.height/a.height,n=[1,0,0,1,0,0];return It(n,n,[-a.x,-a.y]),Ct(n,n,[t,e]),It(n,n,[b.x,b.y]),n},t.prototype.intersect=function(b,e){if(!b)return!1;b instanceof t||(b=t.create(b));var a=this,n=a.x,r=a.x+a.width,o=a.y,l=a.y+a.height,c=b.x,h=b.x+b.width,d=b.y,f=b.y+b.height,y=!(rm&&(m=M,x<_?kt.set(zt,-x,0):kt.set(zt,_,0)):Mm&&(m=O,w=rect.x&&t<=rect.x+rect.width&&e>=rect.y&&e<=rect.y+rect.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(rect){return new t(rect.x,rect.y,rect.width,rect.height)},t.copy=function(t,source){t.x=source.x,t.y=source.y,t.width=source.width,t.height=source.height},t.applyTransform=function(e,source,n){if(n){if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],o=n[3],l=n[4],c=n[5];return e.x=source.x*r+l,e.y=source.y*o+c,e.width=source.width*r,e.height=source.height*o,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}Pt.x=Rt.x=source.x,Pt.y=rt.y=source.y,Nt.x=rt.x=source.x+source.width,Nt.y=Rt.y=source.y+source.height,Pt.transform(n),rt.transform(n),Nt.transform(n),Rt.transform(n),e.x=Lt(Pt.x,Nt.x,Rt.x,rt.x),e.y=Lt(Pt.y,Nt.y,Rt.y,rt.y);var h=jt(Pt.x,Nt.x,Rt.x,rt.x),d=jt(Pt.y,Nt.y,Rt.y,rt.y);e.width=h-e.x,e.height=d-e.y}else e!==source&&t.copy(e,source)},t}(),Bt=Vt,Ft="silent";function Gt(){vt(this.event)}var Ht=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return Object(x.a)(e,t),e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(K),Wt=function(t,e){this.x=t,this.y=e},Yt=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Xt=new Bt(0,0,0,0),Ut=function(t){function e(e,n,r,o,l){var c=t.call(this)||this;return c._hovered=new Wt(0,0),c.storage=e,c.painter=n,c.painterRoot=o,c._pointerSize=l,r=r||new Ht,c.proxy=null,c.setHandlerProxy(r),c._draggingMgr=new U(c),c}return Object(x.a)(e,t),e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(w.each(Yt,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,r=Kt(this,e,n),o=this._hovered,l=o.target;l&&!l.__zr&&(l=(o=this.findHover(o.x,o.y)).target);var c=this._hovered=r?new Wt(e,n):this.findHover(e,n),h=c.target,d=this.proxy;d.setCursor&&d.setCursor(h?h.cursor:"default"),l&&h!==l&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(c,"mousemove",t),h&&h!==l&&this.dispatchToElement(c,"mouseover",t)},e.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new Wt(0,0)},e.prototype.dispatch=function(t,e){var n=this[t];n&&n.call(this,e)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},e.prototype.dispatchToElement=function(t,e,n){var r=(t=t||{}).target;if(!r||!r.silent){for(var o="on"+e,l=function(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:Gt}}(e,t,n);r&&(r[o]&&(l.cancelBubble=!!r[o].call(r,l)),r.trigger(e,l),r=r.__hostTarget?r.__hostTarget:r.parent,!l.cancelBubble););l.cancelBubble||(this.trigger(e,l),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(t){"function"==typeof t[o]&&t[o].call(t,l),t.trigger&&t.trigger(e,l)})))}},e.prototype.findHover=function(t,e,n){var r=this.storage.getDisplayList(),o=new Wt(t,e);if(qt(r,o,t,e,n),this._pointerSize&&!o.target){for(var l=[],c=this._pointerSize,h=c/2,d=new Bt(t-h,e-h,c,c),i=r.length-1;i>=0;i--){var f=r[i];f===n||f.ignore||f.ignoreCoarsePointer||f.parent&&f.parent.ignoreCoarsePointer||(Xt.copy(f.getBoundingRect()),f.transform&&Xt.applyTransform(f.transform),Xt.intersect(d)&&l.push(f))}if(l.length)for(var y=Math.PI/12,v=2*Math.PI,m=0;m=0;i--){var l=t[i],c=void 0;if(l!==o&&!l.ignore&&(c=Zt(l,n,r))&&(!e.topTarget&&(e.topTarget=l),c!==Ft)){e.target=l;break}}}function Kt(t,e,n){var r=t.painter;return e<0||e>r.getWidth()||n<0||n>r.getHeight()}w.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){Ut.prototype[t]=function(e){var n,r,o=e.zrX,l=e.zrY,c=Kt(this,o,l);if("mouseup"===t&&c||(r=(n=this.findHover(o,l)).target),"mousedown"===t)this._downEl=r,this._downPoint=[e.zrX,e.zrY],this._upEl=r;else if("mouseup"===t)this._upEl=r;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||z(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}));var $t=Ut,Jt=32,Qt=7;function te(t,e,n,r){var o=e+1;if(o===n)return 1;if(r(t[o++],t[e])<0){for(;o=0;)o++;return o-e}function ee(t,e,n,r,o){for(r===e&&r++;r>>1])<0?d=l:h=l+1;var f=r-h;switch(f){case 3:t[h+3]=t[h+2];case 2:t[h+2]=t[h+1];case 1:t[h+1]=t[h];break;default:for(;f>0;)t[h+f]=t[h+f-1],f--}t[h]=c}}function ne(t,e,n,r,o,l){var c=0,h=0,d=1;if(l(t,e[n+o])>0){for(h=r-o;d0;)c=d,(d=1+(d<<1))<=0&&(d=h);d>h&&(d=h),c+=o,d+=o}else{for(h=o+1;dh&&(d=h);var f=c;c=o-d,d=o-f}for(c++;c>>1);l(t,e[n+y])>0?c=y+1:d=y}return d}function ie(t,e,n,r,o,l){var c=0,h=0,d=1;if(l(t,e[n+o])<0){for(h=o+1;dh&&(d=h);var f=c;c=o-d,d=o-f}else{for(h=r-o;d=0;)c=d,(d=1+(d<<1))<=0&&(d=h);d>h&&(d=h),c+=o,d+=o}for(c++;c>>1);l(t,e[n+y])<0?d=y:c=y+1}return d}function re(t,e){var n,r,o,l=Qt,c=0;n=t.length;var h=[];function d(i){var n=r[i],d=o[i],f=r[i+1],y=o[i+1];o[i]=d+y,i===c-3&&(r[i+1]=r[i+2],o[i+1]=o[i+2]),c--;var v=ie(t[f],t,n,d,0,e);n+=v,0!==(d-=v)&&0!==(y=ne(t[n+d-1],t,f,y,y-1,e))&&(d<=y?function(n,r,o,c){var i=0;for(i=0;i=Qt||m>=Qt);if(x)break;_<0&&(_=0),_+=2}if((l=_)<1&&(l=1),1===r){for(i=0;i=0;i--)t[m+i]=t[v+i];return void(t[y]=h[f])}var x=l;for(;;){var _=0,w=0,S=!1;do{if(e(h[f],t[d])<0){if(t[y--]=t[d--],_++,w=0,0==--r){S=!0;break}}else if(t[y--]=h[f--],w++,_=0,1==--c){S=!0;break}}while((_|w)=0;i--)t[m+i]=t[v+i];if(0===r){S=!0;break}}if(t[y--]=h[f--],1==--c){S=!0;break}if(0!==(w=c-ne(t[d],h,0,c,c-1,e))){for(c-=w,m=(y-=w)+1,v=(f-=w)+1,i=0;i=Qt||w>=Qt);if(S)break;x<0&&(x=0),x+=2}(l=x)<1&&(l=1);if(1===c){for(m=(y-=r)+1,v=(d-=r)+1,i=r-1;i>=0;i--)t[m+i]=t[v+i];t[y]=h[f]}else{if(0===c)throw new Error;for(v=y-(c-1),i=0;i1;){var t=c-2;if(t>=1&&o[t-1]<=o[t]+o[t+1]||t>=2&&o[t-2]<=o[t]+o[t-1])o[t-1]o[t+1])break;d(t)}},forceMergeRuns:function(){for(;c>1;){var t=c-2;t>0&&o[t-1]=Jt;)e|=1&t,t>>=1;return t+e}(o);do{if((l=te(t,n,r,e))h&&(d=h),ee(t,n,n+d,n+l,e),l=d}c.pushRun(n,l),c.mergeRuns(),o-=l,n+=l}while(0!==o);c.forceMergeRuns()}}}var ae=1,se=4,le=!1;function ue(){le||(le=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function ce(a,b){return a.zlevel===b.zlevel?a.z===b.z?a.z2-b.z2:a.z-b.z:a.zlevel-b.zlevel}var he=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=ce}return t.prototype.traverse=function(t,e){for(var i=0;i0&&(d.__clipPaths=[]),isNaN(d.z)&&(ue(),d.z=0),isNaN(d.z2)&&(ue(),d.z2=0),isNaN(d.zlevel)&&(ue(),d.zlevel=0),this._displayList[this._displayListLen++]=d}var f=t.getDecalElement&&t.getDecalElement();f&&this._updateAndAddDisplayable(f,e,n);var y=t.getTextGuideLine();y&&this._updateAndAddDisplayable(y,e,n);var v=t.getTextContent();v&&this._updateAndAddDisplayable(v,e,n)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var i=0,e=t.length;i=0&&this._roots.splice(n,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),de=_.a.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)},pe={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 s,a=.1;return 0===t?0:1===t?1:(!a||a<1?(a=1,s=.1):s=.4*Math.asin(1/a)/(2*Math.PI),-a*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/.4))},elasticOut:function(t){var s,a=.1;return 0===t?0:1===t?1:(!a||a<1?(a=1,s=.1):s=.4*Math.asin(1/a)/(2*Math.PI),a*Math.pow(2,-10*t)*Math.sin((t-s)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var s,a=.1,p=.4;return 0===t?0:1===t?1:(!a||a<1?(a=1,s=.1):s=p*Math.asin(1/a)/(2*Math.PI),(t*=2)<1?a*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/p)*-.5:a*Math.pow(2,-10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/p)*.5+1)},backIn:function(t){var s=1.70158;return t*t*((s+1)*t-s)},backOut:function(t){var s=1.70158;return--t*t*((s+1)*t+s)+1},backInOut:function(t){var s=2.5949095;return(t*=2)<1?t*t*((s+1)*t-s)*.5:.5*((t-=2)*t*((s+1)*t+s)+2)},bounceIn:function(t){return 1-pe.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*pe.bounceIn(2*t):.5*pe.bounceOut(2*t-1)+.5}},fe=pe,ge=Math.pow,ye=Math.sqrt,ve=1e-8,me=1e-4,xe=ye(3),be=1/3,_e=S(),we=S(),Se=S();function Me(t){return t>-ve&&tve||t<-ve}function Ie(t,e,n,r,o){var l=1-o;return l*l*(l*t+3*o*e)+o*o*(o*r+3*l*n)}function Te(t,e,n,r,o){var l=1-o;return 3*(((e-t)*l+2*(n-e)*o)*l+(r-n)*o*o)}function Ce(t,e,n,r,o,l){var a=r+3*(e-n)-t,b=3*(n-2*e+t),c=3*(e-t),h=t-o,d=b*b-3*a*c,f=b*c-9*a*h,y=c*c-3*b*h,v=0;if(Me(d)&&Me(f)){if(Me(b))l[0]=0;else(A=-c/b)>=0&&A<=1&&(l[v++]=A)}else{var m=f*f-4*d*y;if(Me(m)){var x=f/d,_=-x/2;(A=-b/a+x)>=0&&A<=1&&(l[v++]=A),_>=0&&_<=1&&(l[v++]=_)}else if(m>0){var w=ye(m),S=d*b+1.5*a*(-f+w),M=d*b+1.5*a*(-f-w);(A=(-b-((S=S<0?-ge(-S,be):ge(S,be))+(M=M<0?-ge(-M,be):ge(M,be))))/(3*a))>=0&&A<=1&&(l[v++]=A)}else{var O=(2*d*b-3*a*f)/(2*ye(d*d*d)),I=Math.acos(O)/3,T=ye(d),C=Math.cos(I),A=(-b-2*T*C)/(3*a),D=(_=(-b+T*(C+xe*Math.sin(I)))/(3*a),(-b+T*(C-xe*Math.sin(I)))/(3*a));A>=0&&A<=1&&(l[v++]=A),_>=0&&_<=1&&(l[v++]=_),D>=0&&D<=1&&(l[v++]=D)}}return v}function Ae(t,e,n,r,o){var b=6*n-12*e+6*t,a=9*e+3*r-3*t-9*n,l=3*e-3*t,c=0;if(Me(a)){if(Oe(b))(d=-l/b)>=0&&d<=1&&(o[c++]=d)}else{var h=b*b-4*a*l;if(Me(h))o[0]=-b/(2*a);else if(h>0){var d,f=ye(h),y=(-b-f)/(2*a);(d=(-b+f)/(2*a))>=0&&d<=1&&(o[c++]=d),y>=0&&y<=1&&(o[c++]=y)}}return c}function De(t,e,n,r,o,l){var c=(e-t)*o+t,h=(n-e)*o+e,d=(r-n)*o+n,f=(h-c)*o+c,y=(d-h)*o+h,v=(y-f)*o+f;l[0]=t,l[1]=c,l[2]=f,l[3]=v,l[4]=v,l[5]=y,l[6]=d,l[7]=r}function ke(t,e,n,r,o,l,c,h,d,f,y){var v,m,x,_,w,S=.005,M=1/0;_e[0]=d,_e[1]=f;for(var O=0;O<1;O+=.05)we[0]=Ie(t,n,o,c,O),we[1]=Ie(e,r,l,h,O),(_=B(_e,we))=0&&_=0&&w=1?1:Ce(0,r,l,1,p,h)&&Ie(0,o,c,1,h[0])}}}var Fe=function(){function t(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||w.noop,this.ondestroy=t.ondestroy||w.noop,this.onrestart=t.onrestart||w.noop,t.easing&&this.setEasing(t.easing)}return t.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var n=this._life,r=t-this._startTime-this._pausedTime,o=r/n;o<0&&(o=0),o=Math.min(o,1);var l=this.easingFunc,c=l?l(o):o;if(this.onframe(c),1===o){if(!this.loop)return!0;var h=r%n;this._startTime=t-h,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=e},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(t){this.easing=t,this.easingFunc=Object(w.isFunction)(t)?t:fe[t]||Be(t)},t}(),Ge=n(1323),He=n(1371),We=Array.prototype.slice;function Ye(t,e,n){return(e-t)*n+t}function Xe(t,e,n,r){for(var o=e.length,i=0;ir?e:t,l=Math.min(n,r),c=o[l-1]||{color:[0,0,0,0],offset:0},i=l;ic)r.length=c;else for(var i=l;i=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(time,t,e){this._needsSort=!0;var n=this.keyframes,r=n.length,o=!1,l=6,c=t;if(Object(w.isArrayLike)(t)){var h=function(t){return Object(w.isArrayLike)(t&&t[0])?2:1}(t);l=h,(1===h&&!Object(w.isNumber)(t[0])||2===h&&!Object(w.isNumber)(t[0][0]))&&(o=!0)}else if(Object(w.isNumber)(t)&&!Object(w.eqNaN)(t))l=0;else if(Object(w.isString)(t))if(isNaN(+t)){var d=Ge.parse(t);d&&(c=d,l=3)}else l=0;else if(Object(w.isGradientObject)(t)){var f=Object(w.extend)({},c);f.colorStops=Object(w.map)(t.colorStops,(function(t){return{offset:t.offset,color:Ge.parse(t.color)}})),Object(He.m)(t)?l=4:Object(He.o)(t)&&(l=5),c=f}0===r?this.valType=l:l===this.valType&&6!==l||(o=!0),this.discrete=this.discrete||o;var y={time:time,value:c,rawValue:t,percent:0};return e&&(y.easing=e,y.easingFunc=Object(w.isFunction)(e)?e:fe[e]||Be(e)),n.push(y),y},t.prototype.prepare=function(t,e){var n=this.keyframes;this._needsSort&&n.sort((function(a,b){return a.time-b.time}));for(var r=this.valType,o=n.length,l=n[o-1],c=this.discrete,h=tn(r),d=Qe(r),i=0;i=0&&!(d[n].percent<=e);n--);n=x(n,f-2)}else{for(n=m;ne);n++);n=x(n-1,f-2)}o=d[n+1],r=d[n]}if(r&&o){this._lastFr=n,this._lastFrP=e;var _=o.percent-r.percent,S=0===_?1:x((e-r.percent)/_,1);o.easingFunc&&(S=o.easingFunc(S));var M=l?this._additiveValue:v?en:t[y];if(!tn(h)&&!v||M||(M=this._additiveValue=[]),this.discrete)t[y]=S<1?r.rawValue:o.rawValue;else if(tn(h))1===h?Xe(M,r[c],o[c],S):function(t,e,n,r){for(var o=e.length,l=o&&e[0].length,i=0;i0&&track.addKeyframe(0,$e(l),n),this._trackKeys.push(o)}track.addKeyframe(time,$e(t[o]),n)}return this._maxTime=Math.max(this._maxTime,time),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,i=0;i0)){this._started=1;for(var e=this,n=[],r=this._maxTime||0,i=0;i1){var o=r.pop();track.addKeyframe(o.time,t[n]),track.prepare(this._maxTime,track.getAdditiveTrack())}}}},t}(),on=rn;function an(){return(new Date).getTime()}var sn,ln,un=function(t){function e(e){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n}return Object(x.a)(e,t),e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},e.prototype.removeClip=function(t){if(t.animation){var e=t.prev,n=t.next;e?e.next=n:this._head=n,n?n.prev=e:this._tail=e,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},e.prototype.update=function(t){for(var time=an()-this._pausedTime,e=time-this._time,n=this._head;n;){var r=n.next;n.step(time,e)?(n.ondestroy(),this.removeClip(n),n=r):n=r}this._time=time,t||(this.trigger("frame",e),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0,de((function e(){t._running&&(de(e),!t._paused&&t.update())}))},e.prototype.start=function(){this._running||(this._time=an(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=an(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=an()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._head=this._tail=null},e.prototype.isFinished=function(){return null==this._head},e.prototype.animate=function(t,e){e=e||{},this.start();var n=new on(t,e.loop);return this.addAnimator(n),n},e}(K),cn=un,hn=_.a.domSupported,dn=(ln={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:sn=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:w.map(sn,(function(t){var e=t.replace("mouse","pointer");return ln.hasOwnProperty(e)?e:t}))}),pn=["mousemove","mouseup"],fn=["pointermove","pointerup"],gn=!1;function yn(t){var e=t.pointerType;return"pen"===e||"touch"===e}function vn(t){t&&(t.zrByTouch=!0)}function mn(t,e){for(var n=e,r=!1;n&&9!==n.nodeType&&!(r=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return r}var xn=function(t,e){this.stopPropagation=w.noop,this.stopImmediatePropagation=w.noop,this.preventDefault=w.noop,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},bn={mousedown:function(t){t=gt(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=gt(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=gt(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){mn(this,(t=gt(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){gn=!0,t=gt(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){gn||(t=gt(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){vn(t=gt(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),bn.mousemove.call(this,t),bn.mousedown.call(this,t)},touchmove:function(t){vn(t=gt(this.dom,t)),this.handler.processGesture(t,"change"),bn.mousemove.call(this,t)},touchend:function(t){vn(t=gt(this.dom,t)),this.handler.processGesture(t,"end"),bn.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&bn.click.call(this,t)},pointerdown:function(t){bn.mousedown.call(this,t)},pointermove:function(t){yn(t)||bn.mousemove.call(this,t)},pointerup:function(t){bn.mouseup.call(this,t)},pointerout:function(t){yn(t)||bn.mouseout.call(this,t)}};w.each(["click","dblclick","contextmenu"],(function(t){bn[t]=function(e){e=gt(this.dom,e),this.trigger(t,e)}}));var _n={pointermove:function(t){yn(t)||_n.mousemove.call(this,t)},pointerup:function(t){_n.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function wn(t,e){var n=e.domHandlers;_.a.pointerEventsSupported?w.each(dn.pointer,(function(r){Mn(e,r,(function(e){n[r].call(t,e)}))})):(_.a.touchEventsSupported&&w.each(dn.touch,(function(r){Mn(e,r,(function(o){n[r].call(t,o),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}(e)}))})),w.each(dn.mouse,(function(r){Mn(e,r,(function(o){o=ft(o),e.touching||n[r].call(t,o)}))})))}function Sn(t,e){function n(n){Mn(e,n,(function(r){r=ft(r),mn(t,r.target)||(r=function(t,e){return gt(t.dom,new xn(t,e),!0)}(t,r),e.domHandlers[n].call(t,r))}),{capture:!0})}_.a.pointerEventsSupported?w.each(fn,n):_.a.touchEventsSupported||w.each(pn,n)}function Mn(t,e,n,r){t.mounted[e]=n,t.listenerOpts[e]=r,yt(t.domTarget,e,n,r)}function On(t){var e,n,r,o,l=t.mounted;for(var c in l)l.hasOwnProperty(c)&&(e=t.domTarget,n=c,r=l[c],o=t.listenerOpts[c],e.removeEventListener(n,r,o));t.mounted={}}var In=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e},Tn=function(t){function e(e,n){var r=t.call(this)||this;return r.__pointerCapturing=!1,r.dom=e,r.painterRoot=n,r._localHandlerScope=new In(e,bn),hn&&(r._globalHandlerScope=new In(document,_n)),wn(r,r._localHandlerScope),r}return Object(x.a)(e,t),e.prototype.dispose=function(){On(this._localHandlerScope),hn&&On(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,hn&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?Sn(this,e):On(e)}},e}(K),Cn=1;_.a.hasGlobalWindow&&(Cn=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var An=Cn,Dn="#333",kn="#ccc",Ln=St,jn=5e-5;function Pn(t){return t>jn||t<-5e-5}var Nn=[],Rn=[],En=[1,0,0,1,0,0],zn=Math.abs,Vn=function(){function t(){}var e;return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return Pn(this.rotation)||Pn(this.x)||Pn(this.y)||Pn(this.scaleX-1)||Pn(this.scaleY-1)||Pn(this.skewX)||Pn(this.skewY)},t.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),n=this.transform;e||t?(n=n||[1,0,0,1,0,0],e?this.getLocalTransform(n):Ln(n),t&&(e?Ot(n,t,n):Mt(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&Ln(n)},t.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(null!=e&&1!==e){this.getGlobalScale(Nn);var n=Nn[0]<0?-1:1,r=Nn[1]<0?-1:1,o=((Nn[0]-n)*e+n)/Nn[0]||0,l=((Nn[1]-r)*e+r)/Nn[1]||0;t[0]*=o,t[1]*=o,t[2]*=l,t[3]*=l}this.invTransform=this.invTransform||[1,0,0,1,0,0],At(this.invTransform,t)},t.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],r=Math.atan2(t[1],t[0]),o=Math.PI/2+r-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(o),e=Math.sqrt(e),this.skewX=o,this.skewY=0,this.rotation=-r,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(Ot(Rn,t.invTransform,e),e=Rn);var n=this.originX,r=this.originY;(n||r)&&(En[4]=n,En[5]=r,Ot(Rn,e,En),Rn[4]-=n,Rn[5]-=r,e=Rn),this.setLocalTransform(e)}},t.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},t.prototype.transformCoordToLocal=function(t,e){var n=[t,e],r=this.invTransform;return r&&H(n,n,r),n},t.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],r=this.transform;return r&&H(n,n,r),n},t.prototype.getLineScale=function(){var t=this.transform;return t&&zn(t[0]-1)>1e-10&&zn(t[3]-1)>1e-10?Math.sqrt(zn(t[0]*t[3]-t[2]*t[1])):1},t.prototype.copyTransform=function(source){Fn(this,source)},t.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,r=t.originY||0,o=t.scaleX,l=t.scaleY,c=t.anchorX,h=t.anchorY,d=t.rotation||0,f=t.x,y=t.y,v=t.skewX?Math.tan(t.skewX):0,m=t.skewY?Math.tan(-t.skewY):0;if(n||r||c||h){var x=n+c,_=r+h;e[4]=-x*o-v*_*l,e[5]=-_*l-m*x*o}else e[4]=e[5]=0;return e[0]=o,e[3]=l,e[1]=m*o,e[2]=v*l,d&&Tt(e,e,d),e[4]+=n+f,e[5]+=r+y,e},t.initDefaultProps=((e=t.prototype).scaleX=e.scaleY=e.globalScaleRatio=1,void(e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0)),t}(),Bn=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Fn(t,source){for(var i=0;i=0?parseFloat(t)/100*e:parseFloat(t):t}function Qn(t,e,rect){var n=e.position||"inside",r=null!=e.distance?e.distance:5,o=rect.height,l=rect.width,c=o/2,h=rect.x,d=rect.y,f="left",y="top";if(n instanceof Array)h+=Jn(n[0],rect.width),d+=Jn(n[1],rect.height),f=null,y=null;else switch(n){case"left":h-=r,d+=c,f="right",y="middle";break;case"right":h+=r+l,d+=c,y="middle";break;case"top":h+=l/2,d-=r,f="center",y="bottom";break;case"bottom":h+=l/2,d+=o+r,f="center";break;case"inside":h+=l/2,d+=c,f="center",y="middle";break;case"insideLeft":h+=r,d+=c,y="middle";break;case"insideRight":h+=l-r,d+=c,f="right",y="middle";break;case"insideTop":h+=l/2,d+=r,f="center";break;case"insideBottom":h+=l/2,d+=o-r,f="center",y="bottom";break;case"insideTopLeft":h+=r,d+=r;break;case"insideTopRight":h+=l-r,d+=r,f="right";break;case"insideBottomLeft":h+=r,d+=o-r,y="bottom";break;case"insideBottomRight":h+=l-r,d+=o-r,f="right",y="bottom"}return(t=t||{}).x=h,t.y=d,t.align=f,t.verticalAlign=y,t}var ti="__zr_normal__",ei=Bn.concat(["ignore"]),ni=Object(w.reduce)(Bn,(function(t,e){return t[e]=!0,t}),{ignore:!1}),ii={},ri=new Bt(0,0,0,0),oi=function(){function t(t){this.id=Object(w.guid)(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=t,r[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,r=n.local,o=e.innerTransformable,l=void 0,c=void 0,h=!1;o.parent=r?this:null;var d=!1;if(o.copyTransform(e),null!=n.position){var f=ri;n.layoutRect?f.copy(n.layoutRect):f.copy(this.getBoundingRect()),r||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(ii,n,f):Qn(ii,n,f),o.x=ii.x,o.y=ii.y,l=ii.align,c=ii.verticalAlign;var y=n.origin;if(y&&null!=n.rotation){var v=void 0,m=void 0;"center"===y?(v=.5*f.width,m=.5*f.height):(v=Jn(y[0],f.width),m=Jn(y[1],f.height)),d=!0,o.originX=-o.x+v+(r?0:f.x),o.originY=-o.y+m+(r?0:f.y)}}null!=n.rotation&&(o.rotation=n.rotation);var x=n.offset;x&&(o.x+=x[0],o.y+=x[1],d||(o.originX=-x[0],o.originY=-x[1]));var _=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,w=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),S=void 0,M=void 0,O=void 0;_&&this.canBeInsideText()?(S=n.insideFill,M=n.insideStroke,null!=S&&"auto"!==S||(S=this.getInsideTextFill()),null!=M&&"auto"!==M||(M=this.getInsideTextStroke(S),O=!0)):(S=n.outsideFill,M=n.outsideStroke,null!=S&&"auto"!==S||(S=this.getOutsideFill()),null!=M&&"auto"!==M||(M=this.getOutsideStroke(S),O=!0)),(S=S||"#000")===w.fill&&M===w.stroke&&O===w.autoStroke&&l===w.align&&c===w.verticalAlign||(h=!0,w.fill=S,w.stroke=M,w.autoStroke=O,w.align=l,w.verticalAlign=c,e.setDefaultTextStyle(w)),e.__dirty|=ae,h&&e.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?kn:Dn},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&Object(Ge.parse)(e);n||(n=[255,255,255,1]);for(var r=n[3],o=this.__zr.isDarkMode(),i=0;i<3;i++)n[i]=n[i]*r+(o?0:255)*(1-r);return n[3]=1,Object(Ge.stringify)(n,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},Object(w.extend)(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(Object(w.isObject)(t))for(var n=t,r=Object(w.keys)(n),i=0;i0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState(ti,!1,t)},t.prototype.useState=function(t,e,n,r){var o=t===ti;if(this.hasState()||!o){var l=this.currentStates,c=this.stateTransition;if(!(Object(w.indexOf)(l,t)>=0)||!e&&1!==l.length){var h;if(this.stateProxy&&!o&&(h=this.stateProxy(t)),h||(h=this.states&&this.states[t]),h||o){o||this.saveCurrentToNormalState(h);var d=!!(h&&h.hoverLayer||r);d&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,h,this._normalState,e,!n&&!this.__inHover&&c&&c.duration>0,c);var f=this._textContent,y=this._textGuide;return f&&f.useState(t,e,n,d),y&&y.useState(t,e,n,d),o?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ae),h}Object(w.logError)("State "+t+" not exists.")}}},t.prototype.useStates=function(t,e,n){if(t.length){var r=[],o=this.currentStates,l=t.length,c=l===o.length;if(c)for(var i=0;i0,m);var x=this._textContent,_=this._textGuide;x&&x.useStates(t,e,y),_&&_.useStates(t,e,y),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!y&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ae)}else this.clearStates()},t.prototype._updateAnimationTargets=function(){for(var i=0;i=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},t.prototype.replaceState=function(t,e,n){var r=this.currentStates.slice(),o=Object(w.indexOf)(r,t),l=Object(w.indexOf)(r,e)>=0;o>=0?l?r.splice(o,1):r[o]=e:n&&!l&&r.push(e),this.useStates(r)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,n={},i=0;i=0&&e.splice(n,1)})),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var n=this.animators,r=n.length,o=[],i=0;i0&&n.during&&l[0].during((function(t,e){n.during(e)}));for(var i=0;i0||o.force&&!c.length){var A,D=void 0,k=void 0,L=void 0;if(h){k={},m&&(D={});for(i=0;i=0&&(n.splice(r,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,e){var n=w.indexOf(this._children,t);return n>=0&&this.replaceAt(e,n),this},e.prototype.replaceAt=function(t,e){var n=this._children,r=n[e];if(t&&t!==this&&t.parent!==this&&t!==r){n[e]=t,r.parent=null;var o=this.__zr;o&&r.removeSelfFromZr(o),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,n=this._children,r=w.indexOf(n,t);return r<0||(n.splice(r,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},e.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,i=0;i0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},t.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},t.prototype.clearAnimation=function(){this.animation.clear()},t.prototype.getWidth=function(){return this.painter.getWidth()},t.prototype.getHeight=function(){return this.painter.getHeight()},t.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},t.prototype.on=function(t,e,n){return this.handler.on(t,e,n),this},t.prototype.off=function(t,e){this.handler.off(t,e)},t.prototype.trigger=function(t,e){this.handler.trigger(t,e)},t.prototype.clear=function(){for(var t=this.storage.getRoots(),i=0;i0){if(t<=o)return c;if(t>=l)return h}else{if(t>=o)return c;if(t<=l)return h}else{if(t===o)return c;if(t===l)return h}return(t-o)/d*f+c}function Ii(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 w.isString(t)?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n}function Ti(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),Mi),t=(+t).toFixed(e),n?t:+t}function Ci(t){return t.sort((function(a,b){return a-b})),t}function Ai(t){if(t=+t,isNaN(t))return 0;if(t>1e-14)for(var e=1,i=0;i<15;i++,e*=10)if(Math.round(t*e)/e===t)return i;return Di(t)}function Di(t){var e=t.toString().toLowerCase(),n=e.indexOf("e"),r=n>0?+e.slice(n+1):0,o=n>0?n:e.length,l=e.indexOf("."),c=l<0?0:o-1-l;return Math.max(0,c-r)}function ki(t,e){var n=Math.log,r=Math.LN10,o=Math.floor(n(t[1]-t[0])/r),l=Math.round(n(Math.abs(e[1]-e[0]))/r),c=Math.min(Math.max(-o+l,0),20);return isFinite(c)?c:20}function Li(t,e,n){return t[e]&&ji(t,n)[e]||0}function ji(t,e){var n=w.reduce(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===n)return[];for(var r=Math.pow(10,e),o=w.map(t,(function(t){return(isNaN(t)?0:t)/n*r*100})),l=100*r,c=w.map(o,(function(t){return Math.floor(t)})),h=w.reduce(c,(function(t,e){return t+e}),0),d=w.map(o,(function(t,e){return t-c[e]}));hf&&(f=d[i],y=i);++c[y],d[y]=0,++h}return w.map(c,(function(t){return t/r}))}function Pi(t,e){var n=Math.max(Ai(t),Ai(e)),r=t+e;return n>Mi?r:Ti(r,n)}var Ni=9007199254740991;function Ri(t){var e=2*Math.PI;return(t%e+e)%e}function Ei(t){return t>-Si&&t=10&&e++,e}function Gi(t,e){var n=Fi(t),r=Math.pow(10,n),o=t/r;return t=(e?o<1.5?1:o<2.5?2:o<4?3:o<7?5:10:o<1?1:o<2?2:o<3?3:o<5?5:10)*r,n>=-20?+t.toFixed(n<0?-n:0):t}function Hi(t,p){var e=(t.length-1)*p+1,n=Math.floor(e),r=+t[n-1],o=e-n;return o?r+o*(t[n]-r):r}function Wi(t){t.sort((function(a,b){return c(a,b,0)?-1:1}));for(var e=-1/0,n=1,i=0;i=0||o&&w.indexOf(o,l)<0)){var c=n.getShallow(l,e);null!=c&&(style[t[i][0]]=c)}}return style}}var Nr=Pr([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Rr=function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return Nr(this,t,e)},t}(),Er=new Hn.a(50);function zr(t){if("string"==typeof t){var e=Er.get(t);return e&&e.image}return t}function Vr(t,image,e,n,r){if(t){if("string"==typeof t){if(image&&image.__zrImageSrc===t||!e)return image;var o=Er.get(t),l={hostEl:e,cb:n,cbPayload:r};return o?!Fr(image=o.image)&&o.pending.push(l):((image=Wn.d.loadImage(t,Br,Br)).__zrImageSrc=t,Er.put(t,image.__cachedImgObj={image:image,pending:[l]})),image}return t}return image}function Br(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var i=0;i=c;i++)h-=c;var d=Xn(n,e);return d>h&&(n="",d=0),h=t-d,o.ellipsis=n,o.ellipsisWidth=d,o.contentWidth=h,o.containerWidth=t,o}function Yr(t,e){var n=e.containerWidth,r=e.font,o=e.contentWidth;if(!n)return"";var l=Xn(t,r);if(l<=n)return t;for(var c=0;;c++){if(l<=o||c>=e.maxIterations){t+=e.ellipsis;break}var h=0===c?Xr(t,o,e.ascCharWidth,e.cnCharWidth):l>0?Math.floor(t.length*o/l):0;l=Xn(t=t.substr(0,h),r)}return""===t&&(t=e.placeholder),t}function Xr(text,t,e,n){for(var r=0,i=0,o=text.length;i0&&x+n.accumWidth>n.width&&(o=e.split("\n"),y=!0),n.accumWidth=x}else{var _=Qr(e,f,n.width,n.breakAll,n.accumWidth);n.accumWidth=_.accumWidth+m,l=_.linesWidths,o=_.lines}}else o=e.split("\n");for(var i=0;i=33&&code<=383}(t)||!!$r[t]}function Qr(text,t,e,n,r){for(var o=[],l=[],line="",c="",h=0,d=0,i=0;ie:r+d+y>e)?d?(line||c)&&(v?(line||(line=c,c="",d=h=0),o.push(line),l.push(d-h),c+=f,line="",d=h+=y):(c&&(line+=c,c="",h=0),o.push(line),l.push(d),line=f,d=y)):v?(o.push(c),l.push(h),c=f,h=y):(o.push(f),l.push(y)):(d+=y,v?(c+=f,h+=y):(c&&(line+=c,c="",h=0),line+=f))}else c&&(line+=c,d+=h),o.push(line),l.push(d),line="",c="",h=0,d=0}return o.length||line||(line=text,c="",h=0),c&&(line+=c),line&&(o.push(line),l.push(d)),1===o.length&&(d+=r),{accumWidth:d,lines:o,linesWidths:l}}var to="__zr_style_"+Math.round(10*Math.random()),eo={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},no={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};eo[to]=!0;var io=["z","z2","invisible"],ro=["invisible"],oo=function(t){function e(e){return t.call(this,e)||this}var n;return Object(x.a)(e,t),e.prototype._init=function(e){for(var n=Object(w.keys)(e),i=0;i1e-4)return h[0]=t-n,h[1]=e-r,d[0]=t+n,void(d[1]=e+r);if(go[0]=po(o)*n+t,go[1]=ho(o)*r+e,yo[0]=po(l)*n+t,yo[1]=ho(l)*r+e,f(h,go,yo),y(d,go,yo),(o%=fo)<0&&(o+=fo),(l%=fo)<0&&(l+=fo),o>l&&!c?l+=fo:oo&&(vo[0]=po(x)*n+t,vo[1]=ho(x)*r+e,f(h,vo,h),y(d,vo,d))}var Oo={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Io=[],To=[],Co=[],Ao=[],Do=[],ko=[],Lo=Math.min,jo=Math.max,Po=Math.cos,No=Math.sin,Ro=Math.abs,Eo=Math.PI,zo=2*Eo,Vo="undefined"!=typeof Float32Array,Bo=[];function Fo(t){return Math.round(t/Eo*1e8)/1e8%2*Eo}function Go(t,e){var n=Fo(t[0]);n<0&&(n+=zo);var r=n-t[0],o=t[1];o+=r,!e&&o-n>=zo?o=n+zo:e&&n-o>=zo?o=n-zo:!e&&n>o?o=n+(zo-Fo(n-o)):e&&n0&&(this._ux=Ro(n/An/t)||0,this._uy=Ro(n/An/e)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(Oo.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineTo=function(t,e){var n=Ro(t-this._xi),r=Ro(e-this._yi),o=n>this._ux||r>this._uy;if(this.addData(Oo.L,t,e),this._ctx&&o&&this._ctx.lineTo(t,e),o)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var l=n*n+r*r;l>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=l)}return this},t.prototype.bezierCurveTo=function(t,e,n,r,o,l){return this._drawPendingPt(),this.addData(Oo.C,t,e,n,r,o,l),this._ctx&&this._ctx.bezierCurveTo(t,e,n,r,o,l),this._xi=o,this._yi=l,this},t.prototype.quadraticCurveTo=function(t,e,n,r){return this._drawPendingPt(),this.addData(Oo.Q,t,e,n,r),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,r),this._xi=n,this._yi=r,this},t.prototype.arc=function(t,e,n,r,o,l){this._drawPendingPt(),Bo[0]=r,Bo[1]=o,Go(Bo,l),r=Bo[0];var c=(o=Bo[1])-r;return this.addData(Oo.A,t,e,n,n,r,c,0,l?0:1),this._ctx&&this._ctx.arc(t,e,n,r,o,l),this._xi=Po(o)*n+t,this._yi=No(o)*n+e,this},t.prototype.arcTo=function(t,e,n,r,o){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,r,o),this},t.prototype.rect=function(t,e,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,r),this.addData(Oo.R,t,e,n,r),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(Oo.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&t.closePath(),this._xi=e,this._yi=n,this},t.prototype.fill=function(t){t&&t.fill(),this.toStatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(data){var t=data.length;this.data&&this.data.length===t||!Vo||(this.data=new Float32Array(t));for(var i=0;idata.length&&(this._expandData(),data=this.data);for(var i=0;i0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],i=0;i11&&(this.data=new Float32Array(data)))}},t.prototype.getBoundingRect=function(){Co[0]=Co[1]=Do[0]=Do[1]=Number.MAX_VALUE,Ao[0]=Ao[1]=ko[0]=ko[1]=-Number.MAX_VALUE;var i,data=this.data,t=0,e=0,n=0,r=0;for(i=0;ie||Ro(_)>n||i===t-1)&&(m=Math.sqrt(P*P+_*_),r=x,o=M);break;case Oo.C:var w=data[i++],S=data[i++],M=(x=data[i++],data[i++]),O=data[i++],I=data[i++];m=Le(r,o,w,S,x,M,O,I,10),r=O,o=I;break;case Oo.Q:m=ze(r,o,w=data[i++],S=data[i++],x=data[i++],M=data[i++],10),r=x,o=M;break;case Oo.A:var T=data[i++],C=data[i++],A=data[i++],D=data[i++],k=data[i++],L=data[i++],j=L+k;i+=1;data[i++];v&&(l=Po(k)*A+T,c=No(k)*D+C),m=jo(A,D)*Lo(zo,Math.abs(L)),r=Po(j)*A+T,o=No(j)*D+C;break;case Oo.R:l=r=data[i++],c=o=data[i++],m=2*data[i++]+2*data[i++];break;case Oo.Z:var P=l-r;_=c-o;m=Math.sqrt(P*P+_*_),r=l,o=c}m>=0&&(h[f++]=m,d+=m)}return this._pathLen=d,d},t.prototype.rebuildPath=function(t,e){var n,r,o,l,c,h,d,f,y,v,m=this.data,x=this._ux,_=this._uy,w=this._len,S=e<1,M=0,O=0,I=0;if(!S||(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,f=e*this._pathLen))t:for(var i=0;i0&&(t.lineTo(y,v),I=0),T){case Oo.M:n=o=m[i++],r=l=m[i++],t.moveTo(o,l);break;case Oo.L:c=m[i++],h=m[i++];var A=Ro(c-o),D=Ro(h-l);if(A>x||D>_){if(S){if(M+(et=d[O++])>f){var k=(f-M)/et;t.lineTo(o*(1-k)+c*k,l*(1-k)+h*k);break t}M+=et}t.lineTo(c,h),o=c,l=h,I=0}else{var L=A*A+D*D;L>I&&(y=c,v=h,I=L)}break;case Oo.C:var j=m[i++],P=m[i++],N=m[i++],R=m[i++],E=m[i++],z=m[i++];if(S){if(M+(et=d[O++])>f){De(o,j,N,E,k=(f-M)/et,Io),De(l,P,R,z,k,To),t.bezierCurveTo(Io[1],To[1],Io[2],To[2],Io[3],To[3]);break t}M+=et}t.bezierCurveTo(j,P,N,R,E,z),o=E,l=z;break;case Oo.Q:j=m[i++],P=m[i++],N=m[i++],R=m[i++];if(S){if(M+(et=d[O++])>f){Re(o,j,N,k=(f-M)/et,Io),Re(l,P,R,k,To),t.quadraticCurveTo(Io[1],To[1],Io[2],To[2]);break t}M+=et}t.quadraticCurveTo(j,P,N,R),o=N,l=R;break;case Oo.A:var V=m[i++],B=m[i++],F=m[i++],G=m[i++],H=m[i++],W=m[i++],Y=m[i++],X=!m[i++],U=F>G?F:G,Z=Ro(F-G)>.001,K=H+W,$=!1;if(S)M+(et=d[O++])>f&&(K=H+W*(f-M)/et,$=!0),M+=et;if(Z&&t.ellipse?t.ellipse(V,B,F,G,Y,H,K,X):t.arc(V,B,U,H,K,X),$)break t;C&&(n=Po(H)*F+V,r=No(H)*G+B),o=Po(K)*F+V,l=No(K)*G+B;break;case Oo.R:n=o=m[i],r=l=m[i+1],c=m[i++],h=m[i++];var J=m[i++],Q=m[i++];if(S){if(M+(et=d[O++])>f){var tt=f-M;t.moveTo(c,h),t.lineTo(c+Lo(tt,J),h),(tt-=J)>0&&t.lineTo(c+J,h+Lo(tt,Q)),(tt-=Q)>0&&t.lineTo(c+jo(J-tt,0),h+Q),(tt-=J)>0&&t.lineTo(c,h+jo(Q-tt,0));break t}M+=et}t.rect(c,h,J,Q);break;case Oo.Z:if(S){var et;if(M+(et=d[O++])>f){k=(f-M)/et;t.lineTo(o*(1-k)+n*k,l*(1-k)+r*k);break t}M+=et}t.closePath(),o=n,l=r}}},t.prototype.clone=function(){var e=new t,data=this.data;return e.data=data.slice?data.slice():Array.prototype.slice.call(data),e._len=this._len,e},t.CMD=Oo,t.initDefaultProps=((e=t.prototype)._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,void(e._version=0)),t}(),Wo=Ho;function Yo(t,e,n,r,o,l,c){if(0===o)return!1;var h=o,d=0;if(c>e+h&&c>r+h||ct+h&&l>n+h||le+v&&y>r+v&&y>l+v&&y>h+v||yt+v&&f>n+v&&f>o+v&&f>c+v||fe+f&&d>r+f&&d>l+f||dt+f&&h>n+f&&h>o+f||hn||y+fo&&(o+=Ko);var m=Math.atan2(d,h);return m<0&&(m+=Ko),m>=r&&m<=o||m+Ko>=r&&m+Ko<=o}function Jo(t,e,n,r,o,l){if(l>e&&l>r||lo?h:0}var Qo=Wo.CMD,ta=2*Math.PI,ea=1e-4;var na=[-1,-1,-1],ia=[-1,-1];function ra(t,e,n,r,o,l,c,h,d,f){if(f>e&&f>r&&f>l&&f>h||f1&&(y=void 0,y=ia[0],ia[0]=ia[1],ia[1]=y),_=Ie(e,r,l,h,ia[0]),x>1&&(w=Ie(e,r,l,h,ia[1]))),2===x?Se&&h>r&&h>l||h=0&&d<=1&&(o[c++]=d);else{var h=b*b-4*a*l;if(Me(h))(d=-b/(2*a))>=0&&d<=1&&(o[c++]=d);else if(h>0){var d,f=ye(h),y=(-b-f)/(2*a);(d=(-b+f)/(2*a))>=0&&d<=1&&(o[c++]=d),y>=0&&y<=1&&(o[c++]=y)}}return c}(e,r,l,h,na);if(0===d)return 0;var f=Ne(e,r,l);if(f>=0&&f<=1){for(var y=0,v=je(e,r,l,f),i=0;in||h<-n)return 0;var d=Math.sqrt(n*n-h*h);na[0]=-d,na[1]=d;var f=Math.abs(r-o);if(f<1e-4)return 0;if(f>=ta-1e-4){r=0,o=ta;var y=l?1:-1;return c>=na[0]+t&&c<=na[1]+t?y:0}if(r>o){var v=r;r=o,o=v}r<0&&(r+=ta,o+=ta);for(var m=0,i=0;i<2;i++){var x=na[i];if(x+t>c){var _=Math.atan2(h,x);y=l?1:-1;_<0&&(_=ta+_),(_>=r&&_<=o||_+ta>=r&&_+ta<=o)&&(_>Math.PI/2&&_<1.5*Math.PI&&(y=-y),m+=y)}}return m}function sa(path,t,e,n,r){for(var o,l,a,b,data=path.data,c=path.len(),h=0,d=0,f=0,y=0,v=0,i=0;i1&&(e||(h+=Jo(d,f,y,v,n,r))),x&&(y=d=data[i],v=f=data[i+1]),m){case Qo.M:d=y=data[i++],f=v=data[i++];break;case Qo.L:if(e){if(Yo(d,f,data[i],data[i+1],t,n,r))return!0}else h+=Jo(d,f,data[i],data[i+1],n,r)||0;d=data[i++],f=data[i++];break;case Qo.C:if(e){if(Xo(d,f,data[i++],data[i++],data[i++],data[i++],data[i],data[i+1],t,n,r))return!0}else h+=ra(d,f,data[i++],data[i++],data[i++],data[i++],data[i],data[i+1],n,r)||0;d=data[i++],f=data[i++];break;case Qo.Q:if(e){if(Uo(d,f,data[i++],data[i++],data[i],data[i+1],t,n,r))return!0}else h+=oa(d,f,data[i++],data[i++],data[i],data[i+1],n,r)||0;d=data[i++],f=data[i++];break;case Qo.A:var _=data[i++],w=data[i++],S=data[i++],M=data[i++],O=data[i++],I=data[i++];i+=1;var T=!!(1-data[i++]);o=Math.cos(O)*S+_,l=Math.sin(O)*M+w,x?(y=o,v=l):h+=Jo(d,f,o,l,n,r);var C=(n-_)*M/S+_;if(e){if($o(_,w,M,O,O+I,T,t,C,r))return!0}else h+=aa(_,w,M,O,O+I,T,C,r);d=Math.cos(O+I)*S+_,f=Math.sin(O+I)*M+w;break;case Qo.R:if(y=d=data[i++],v=f=data[i++],o=y+data[i++],l=v+data[i++],e){if(Yo(y,v,o,v,t,n,r)||Yo(o,v,o,l,t,n,r)||Yo(o,l,y,l,t,n,r)||Yo(y,l,y,v,t,n,r))return!0}else h+=Jo(o,v,o,l,n,r),h+=Jo(y,l,y,v,n,r);break;case Qo.Z:if(e){if(Yo(d,f,y,v,t,n,r))return!0}else h+=Jo(d,f,y,v,n,r);d=y,f=v}}return e||(a=f,b=v,Math.abs(a-b).5?Dn:e>.2?"#eee":kn}if(t)return kn}return Dn},e.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(Object(w.isString)(e)){var n=this.__zr;if(!(!n||!n.isDarkMode())===Object(Ge.lum)(t,0)<.4)return e}},e.prototype.buildPath=function(t,e,n){},e.prototype.pathUpdated=function(){this.__dirty&=~se},e.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},e.prototype.createPathProxy=function(){this.path=new Wo(!1)},e.prototype.hasStroke=function(){var style=this.style,t=style.stroke;return!(null==t||"none"===t||!(style.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.getBoundingRect=function(){var rect=this._rect,style=this.style,t=!rect;if(t){var e=!1;this.path||(e=!0,this.createPathProxy());var path=this.path;(e||this.__dirty&se)&&(path.beginPath(),this.buildPath(path,this.shape,!1),this.pathUpdated()),rect=path.getBoundingRect()}if(this._rect=rect,this.hasStroke()&&this.path&&this.path.len()>0){var n=this._rectStroke||(this._rectStroke=rect.clone());if(this.__dirty||t){n.copy(rect);var r=style.strokeNoScale?this.getLineScale():1,o=style.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;o=Math.max(o,null==l?4:l)}r>1e-10&&(n.width+=o/r,n.height+=o/r,n.x-=o/r/2,n.y-=o/r/2)}return n}return rect},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),rect=this.getBoundingRect(),style=this.style;if(t=n[0],e=n[1],rect.contain(t,e)){var r=this.path;if(this.hasStroke()){var o=style.lineWidth,l=style.strokeNoScale?this.getLineScale():1;if(l>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),function(t,e,n,r){return sa(t,e,!0,n,r)}(r,o/l,t,e)))return!0}if(this.hasFill())return function(t,e,n){return sa(t,0,!1,e,n)}(r,t,e)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=se,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(e,n){"shape"===e?this.setShape(n):t.prototype.attrKV.call(this,e,n)},e.prototype.setShape=function(t,e){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=e:Object(w.extend)(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&se)},e.prototype.createStyle=function(t){return Object(w.createObject)(la,t)},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=Object(w.extend)({},this.shape))},e.prototype._applyStateObj=function(e,n,r,o,l,c){t.prototype._applyStateObj.call(this,e,n,r,o,l,c);var h,d=!(n&&o);if(n&&n.shape?l?o?h=n.shape:(h=Object(w.extend)({},r.shape),Object(w.extend)(h,n.shape)):(h=Object(w.extend)({},o?this.shape:r.shape),Object(w.extend)(h,n.shape)):d&&(h=r.shape),h)if(l){this.shape=Object(w.extend)({},this.shape);for(var f={},y=Object(w.keys)(h),i=0;i0},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.createStyle=function(t){return Object(w.createObject)(da,t)},e.prototype.setBoundingRect=function(rect){this._rect=rect},e.prototype.getBoundingRect=function(){var style=this.style;if(!this._rect){var text=style.text;null!=text?text+="":text="";var rect=Zn(text,style.font,style.textAlign,style.textBaseline);if(rect.x+=style.x||0,rect.y+=style.y||0,this.hasStroke()){var t=style.lineWidth;rect.x-=t/2,rect.y-=t/2,rect.width+=t,rect.height+=t}this._rect=rect}return this._rect},e.initDefaultProps=void(e.prototype.dirtyRectTolerance=10),e}(lo);pa.prototype.type="tspan";var fa=pa,ga=Object(w.defaults)({x:0,y:0},eo),ya={style:Object(w.defaults)({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},no.style)};var va=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(x.a)(e,t),e.prototype.createStyle=function(t){return Object(w.createObject)(ga,t)},e.prototype._getSize=function(t){var style=this.style,e=style[t];if(null!=e)return e;var source,n=(source=style.image)&&"string"!=typeof source&&source.width&&source.height?style.image:this.__image;if(!n)return 0;var r="width"===t?"height":"width",o=style[r];return null==o?n[t]:n[t]/n[r]*o},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return ya},e.prototype.getBoundingRect=function(){var style=this.style;return this._rect||(this._rect=new Bt(style.x||0,style.y||0,this.getWidth(),this.getHeight())),this._rect},e}(lo);va.prototype.type="image";var ma=va;var xa=Math.round;function ba(t,e,style){if(e){var n=e.x1,r=e.x2,o=e.y1,l=e.y2;t.x1=n,t.x2=r,t.y1=o,t.y2=l;var c=style&&style.lineWidth;return c?(xa(2*n)===xa(2*r)&&(t.x1=t.x2=wa(n,c,!0)),xa(2*o)===xa(2*l)&&(t.y1=t.y2=wa(o,c,!0)),t):t}}function _a(t,e,style){if(e){var n=e.x,r=e.y,o=e.width,l=e.height;t.x=n,t.y=r,t.width=o,t.height=l;var c=style&&style.lineWidth;return c?(t.x=wa(n,c,!0),t.y=wa(r,c,!0),t.width=Math.max(wa(n+o,c,!1)-t.x,0===o?0:1),t.height=Math.max(wa(r+l,c,!1)-t.y,0===l?0:1),t):t}}function wa(t,e,n){if(!e)return t;var r=xa(2*t);return(r+xa(e))%2==0?r/2:(r+(n?1:-1))/2}var Sa=function(){this.x=0,this.y=0,this.width=0,this.height=0},Ma={},Oa=function(t){function e(e){return t.call(this,e)||this}return Object(x.a)(e,t),e.prototype.getDefaultShape=function(){return new Sa},e.prototype.buildPath=function(t,e){var n,r,o,l;if(this.subPixelOptimize){var c=_a(Ma,e,this.style);n=c.x,r=c.y,o=c.width,l=c.height,c.r=e.r,e=c}else n=e.x,r=e.y,o=e.width,l=e.height;e.r?function(t,e){var n,r,o,l,c,h=e.x,d=e.y,f=e.width,y=e.height,v=e.r;f<0&&(h+=f,f=-f),y<0&&(d+=y,y=-y),"number"==typeof v?n=r=o=l=v:v instanceof Array?1===v.length?n=r=o=l=v[0]:2===v.length?(n=o=v[0],r=l=v[1]):3===v.length?(n=v[0],r=l=v[1],o=v[2]):(n=v[0],r=v[1],o=v[2],l=v[3]):n=r=o=l=0,n+r>f&&(n*=f/(c=n+r),r*=f/c),o+l>f&&(o*=f/(c=o+l),l*=f/c),r+o>y&&(r*=y/(c=r+o),o*=y/c),n+l>y&&(n*=y/(c=n+l),l*=y/c),t.moveTo(h+n,d),t.lineTo(h+f-r,d),0!==r&&t.arc(h+f-r,d+r,r,-Math.PI/2,0),t.lineTo(h+f,d+y-o),0!==o&&t.arc(h+f-o,d+y-o,o,0,Math.PI/2),t.lineTo(h+l,d+y),0!==l&&t.arc(h+l,d+y-l,l,Math.PI/2,Math.PI),t.lineTo(h,d+n),0!==n&&t.arc(h+n,d+n,n,Math.PI,1.5*Math.PI)}(t,e):t.rect(n,r,o,l)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(ha);Oa.prototype.type="rect";var Ia=Oa,Ta={fill:"#000"},Ca={style:Object(w.defaults)({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},no.style)},Aa=function(t){function e(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=Ta,n.attr(e),n}return Object(x.a)(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var i=0;iv&&d){var m=Math.floor(v/c);t=t.slice(0,m)}if(text&&o&&null!=f)for(var x=Wr(f,r,style.ellipsis,{minChar:style.truncateMinChar,placeholder:style.placeholder}),i=0;i0,L=null!=style.width&&("truncate"===style.overflow||"break"===style.overflow||"breakAll"===style.overflow),j=n.calculatedLineHeight,i=0;ic&&Kr(t,text.substring(c,h),style,l),Kr(t,e[2],style,l,e[1]),c=Gr.lastIndex}cr){O>0?(line.tokens=line.tokens.slice(0,O),_(line,M,S),t.lines=t.lines.slice(0,i+1)):t.lines=t.lines.slice(0,i);break t}var k=I.width,L=null==k||"auto"===k;if("string"==typeof k&&"%"===k.charAt(k.length-1))R.percentWidth=k,d.push(R),R.contentWidth=Xn(R.text,A);else{if(L){var j=I.backgroundColor,P=j&&j.image;P&&Fr(P=zr(P))&&(R.width=Math.max(R.width,P.width*D/P.height))}var N=m&&null!=n?n-M:null;null!=N&&N=0&&"right"===(L=M[k]).align;)this._placeToken(L,style,I,x,D,"right",S),T-=L.width,D-=L.width,k--;for(A+=(e-(A-m)-(_-D)-T)/2;C<=k;)L=M[C],this._placeToken(L,style,I,x,A+L.width/2,"center",S),A+=L.width,C++;x+=I}},e.prototype._placeToken=function(t,style,e,n,r,o,l){var c=style.rich[t.styleName]||{};c.text=t.text;var h=t.verticalAlign,d=n+e/2;"top"===h?d=n+t.height/2:"bottom"===h&&(d=n+e-t.height/2),!t.isLineHolder&&Fa(c)&&this._renderBackground(c,style,"right"===o?r-t.width:"center"===o?r-t.width/2:r,d-t.height/2,t.width,t.height);var f=!!c.backgroundColor,y=t.textPadding;y&&(r=Va(r,o,y),d-=t.height/2-y[0]-t.innerHeight/2);var v=this._getOrCreateChild(fa),m=v.createStyle();v.useStyle(m);var x=this._defaultStyle,_=!1,S=0,M=za("fill"in c?c.fill:"fill"in style?style.fill:(_=!0,x.fill)),O=Ea("stroke"in c?c.stroke:"stroke"in style?style.stroke:f||l||x.autoStroke&&!_?null:(S=2,x.stroke)),I=c.textShadowBlur>0||style.textShadowBlur>0;m.text=t.text,m.x=r,m.y=d,I&&(m.shadowBlur=c.textShadowBlur||style.textShadowBlur||0,m.shadowColor=c.textShadowColor||style.textShadowColor||"transparent",m.shadowOffsetX=c.textShadowOffsetX||style.textShadowOffsetX||0,m.shadowOffsetY=c.textShadowOffsetY||style.textShadowOffsetY||0),m.textAlign=o,m.textBaseline="middle",m.font=t.font||Wn.a,m.opacity=Object(w.retrieve3)(c.opacity,style.opacity,1),Pa(m,c),O&&(m.lineWidth=Object(w.retrieve3)(c.lineWidth,style.lineWidth,S),m.lineDash=Object(w.retrieve2)(c.lineDash,style.lineDash),m.lineDashOffset=style.lineDashOffset||0,m.stroke=O),M&&(m.fill=M);var T=t.contentWidth,C=t.contentHeight;v.setBoundingRect(new Bt(qn(m.x,T,m.textAlign),Kn(m.y,C,m.textBaseline),T,C))},e.prototype._renderBackground=function(style,t,e,n,r,o){var l,c,h,d=style.backgroundColor,f=style.borderWidth,y=style.borderColor,v=d&&d.image,m=d&&!v,x=style.borderRadius,_=this;if(m||style.lineHeight||f&&y){(l=this._getOrCreateChild(Ia)).useStyle(l.createStyle()),l.style.fill=null;var S=l.shape;S.x=e,S.y=n,S.width=r,S.height=o,S.r=x,l.dirtyShape()}if(m)(h=l.style).fill=d||null,h.fillOpacity=Object(w.retrieve2)(style.fillOpacity,1);else if(v){(c=this._getOrCreateChild(ma)).onload=function(){_.dirtyStyle()};var M=c.style;M.image=d.image,M.x=e,M.y=n,M.width=r,M.height=o}f&&y&&((h=l.style).lineWidth=f,h.stroke=y,h.strokeOpacity=Object(w.retrieve2)(style.strokeOpacity,1),h.lineDash=style.borderDash,h.lineDashOffset=style.borderDashOffset||0,l.strokeContainThreshold=0,l.hasFill()&&l.hasStroke()&&(h.strokeFirst=!0,h.lineWidth*=2));var O=(l||c).style;O.shadowBlur=style.shadowBlur||0,O.shadowColor=style.shadowColor||"transparent",O.shadowOffsetX=style.shadowOffsetX||0,O.shadowOffsetY=style.shadowOffsetY||0,O.opacity=Object(w.retrieve3)(style.opacity,t.opacity,1)},e.makeFont=function(style){var t="";return Na(style)&&(t=[style.fontStyle,style.fontWeight,ja(style.fontSize),style.fontFamily||"sans-serif"].join(" ")),t&&Object(w.trim)(t)||style.textFont||style.font},e}(lo),Da={left:!0,right:1,center:1},ka={top:1,bottom:1,middle:1},La=["fontStyle","fontWeight","fontSize","fontFamily"];function ja(t){return"string"!=typeof t||-1===t.indexOf("px")&&-1===t.indexOf("rem")&&-1===t.indexOf("em")?isNaN(+t)?Wn.c+"px":t+"px":t}function Pa(t,e){for(var i=0;i=0,l=!1;if(t instanceof ha){var c=Ua(t),h=o&&c.selectFill||c.normalFill,d=o&&c.selectStroke||c.normalStroke;if(ss(h)||ss(d)){var f=(r=r||{}).style||{};"inherit"===f.fill?(l=!0,r=Object(w.extend)({},r),(f=Object(w.extend)({},f)).fill=h):!ss(f.fill)&&ss(h)?(l=!0,r=Object(w.extend)({},r),(f=Object(w.extend)({},f)).fill=us(h)):!ss(f.stroke)&&ss(d)&&(l||(r=Object(w.extend)({},r),f=Object(w.extend)({},f)),f.stroke=us(d)),r.style=f}}if(r&&null==r.z2){l||(r=Object(w.extend)({},r));var y=t.z2EmphasisLift;r.z2=t.z2+(null!=y?y:ts)}return r}(this,0,e,n);if("blur"===t)return function(t,e,n){var r=Object(w.indexOf)(t.currentStates,e)>=0,o=t.style.opacity,l=r?null:function(t,e,n,r){for(var style=t.style,o={},i=0;i0){var l={dataIndex:o,seriesIndex:t.seriesIndex};null!=r&&(l.dataType=r),e.push(l)}}))})),e}function Es(t,e,n){Hs(t,!0),ms(t,_s),Vs(t,e,n)}function zs(t,e,n,r){r?function(t){Hs(t,!1)}(t):Es(t,e,n)}function Vs(t,e,n){var r=Ha(t);null!=e?(r.focus=e,r.blurScope=n):r.focus&&(r.focus=null)}var Bs=["emphasis","blur","select"],Fs={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Gs(t,e,n,r){n=n||"itemStyle";for(var i=0;i0){var v={duration:y.duration,delay:y.delay||0,easing:y.easing,done:l,force:!!l||!!c,setToFinal:!f,scope:t,during:c};d?e.animateFrom(n,v):e.animateTo(n,v)}else e.stopAnimation(),!d&&e.attr(n),c&&c(1),l&&l()}function Ks(t,e,n,r,o,l){qs("update",t,e,n,r,o,l)}function $s(t,e,n,r,o,l){qs("enter",t,e,n,r,o,l)}function Js(t){if(!t.__zr)return!0;for(var i=0;i-1?zl:Bl;function Wl(t,e){t=t.toUpperCase(),Gl[t]=new Pl(e),Fl[t]=e}function Yl(t){return Gl[t]}Wl(Vl,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),Wl(zl,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});var Xl=1e3,Ul=60*Xl,Zl=60*Ul,ql=24*Zl,Kl=365*ql,$l={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},Jl="{yyyy}-{MM}-{dd}",Ql={year:"{yyyy}",month:"{yyyy}-{MM}",day:Jl,hour:Jl+" "+$l.hour,minute:Jl+" "+$l.minute,second:Jl+" "+$l.second,millisecond:$l.none},tu=["year","month","day","hour","minute","second","millisecond"],eu=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function nu(t,e){return"0000".substr(0,e-(t+="").length)+t}function iu(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function ru(t){return t===iu(t)}function ou(time,template,t,e){var n=Vi(time),r=n[lu(t)](),o=n[uu(t)]()+1,q=Math.floor((o-1)/3)+1,l=n[cu(t)](),c=n["get"+(t?"UTC":"")+"Day"](),h=n[hu(t)](),d=(h-1)%12+1,f=n[du(t)](),s=n[pu(t)](),y=n[fu(t)](),v=(e instanceof Pl?e:Yl(e||Hl)||Gl[Bl]).getModel("time"),m=v.get("month"),x=v.get("monthAbbr"),_=v.get("dayOfWeek"),w=v.get("dayOfWeekAbbr");return(template||"").replace(/{yyyy}/g,r+"").replace(/{yy}/g,r%100+"").replace(/{Q}/g,q+"").replace(/{MMMM}/g,m[o-1]).replace(/{MMM}/g,x[o-1]).replace(/{MM}/g,nu(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,nu(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,_[c]).replace(/{ee}/g,w[c]).replace(/{e}/g,c+"").replace(/{HH}/g,nu(h,2)).replace(/{H}/g,h+"").replace(/{hh}/g,nu(d+"",2)).replace(/{h}/g,d+"").replace(/{mm}/g,nu(f,2)).replace(/{m}/g,f+"").replace(/{ss}/g,nu(s,2)).replace(/{s}/g,s+"").replace(/{SSS}/g,nu(y,3)).replace(/{S}/g,y+"")}function au(t,e){var n=Vi(t),r=n[uu(e)]()+1,o=n[cu(e)](),l=n[hu(e)](),c=n[du(e)](),s=n[pu(e)](),h=0===n[fu(e)](),d=h&&0===s,f=d&&0===c,y=f&&0===l,v=y&&1===o;return v&&1===r?"year":v?"month":y?"day":f?"hour":d?"minute":h?"second":"millisecond"}function su(t,e,n){var r=w.isNumber(t)?Vi(t):t;switch(e=e||au(t,n)){case"year":return r[lu(n)]();case"half-year":return r[uu(n)]()>=6?1:0;case"quarter":return Math.floor((r[uu(n)]()+1)/4);case"month":return r[uu(n)]();case"day":return r[cu(n)]();case"half-day":return r[hu(n)]()/24;case"hour":return r[hu(n)]();case"minute":return r[du(n)]();case"second":return r[pu(n)]();case"millisecond":return r[fu(n)]()}}function lu(t){return t?"getUTCFullYear":"getFullYear"}function uu(t){return t?"getUTCMonth":"getMonth"}function cu(t){return t?"getUTCDate":"getDate"}function hu(t){return t?"getUTCHours":"getHours"}function du(t){return t?"getUTCMinutes":"getMinutes"}function pu(t){return t?"getUTCSeconds":"getSeconds"}function fu(t){return t?"getUTCMilliseconds":"getMilliseconds"}function gu(t){return t?"setUTCFullYear":"setFullYear"}function yu(t){return t?"setUTCMonth":"setMonth"}function vu(t){return t?"setUTCDate":"setDate"}function mu(t){return t?"setUTCHours":"setHours"}function xu(t){return t?"setUTCMinutes":"setMinutes"}function bu(t){return t?"setUTCSeconds":"setSeconds"}function _u(t){return t?"setUTCMilliseconds":"setMilliseconds"}function wu(t){if(!Xi(t))return w.isString(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function Su(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}var Mu=w.normalizeCssArray;function Ou(t,e,n){function r(t){return t&&w.trim(t)?t:"-"}function o(t){return!(null==t||isNaN(t)||!isFinite(t))}var l="time"===e,c=t instanceof Date;if(l||c){var h=l?Vi(t):t;if(!isNaN(+h))return ou(h,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(c)return"-"}if("ordinal"===e)return w.isStringSafe(t)?r(t):w.isNumber(t)&&o(t)?t+"":"-";var d=Yi(t);return o(d)?wu(d):w.isStringSafe(t)?r(t):"boolean"==typeof t?t+"":"-"}var Iu=["a","b","c","d","e","f","g"],Tu=function(t,e){return"{"+t+(null==e?"":e)+"}"};function Cu(t,e,n){w.isArray(e)||(e=[e]);var r=e.length;if(!r)return"";for(var o=e[0].$vars||[],i=0;i':'':{renderMode:l,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===o?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:""}function Du(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var r=Vi(e),o=n?"getUTC":"get",l=r[o+"FullYear"](),c=r[o+"Month"]()+1,h=r[o+"Date"](),d=r[o+"Hours"](),f=r[o+"Minutes"](),s=r[o+"Seconds"](),y=r[o+"Milliseconds"]();return t=t.replace("MM",nu(c,2)).replace("M",c).replace("yyyy",l).replace("yy",nu(l%100+"",2)).replace("dd",nu(h,2)).replace("d",h).replace("hh",nu(d,2)).replace("h",d).replace("mm",nu(f,2)).replace("m",f).replace("ss",nu(s,2)).replace("s",s).replace("SSS",nu(y,3))}function ku(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}function Lu(t,e){return e=e||"transparent",w.isString(t)?t:w.isObject(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function ju(link,t){if("_blank"===t||"blank"===t){var e=window.open();e.opener=null,e.location.href=link}else window.open(link,t)}var Pu=w.each,Nu=["left","right","top","bottom","width","height"],Ru=[["width","left","right"],["height","top","bottom"]];function Eu(t,e,n,r,o){var l=0,c=0;null==r&&(r=1/0),null==o&&(o=1/0);var h=0;e.eachChild((function(d,f){var y,v,rect=d.getBoundingRect(),m=e.childAt(f+1),x=m&&m.getBoundingRect();if("horizontal"===t){var _=rect.width+(x?-x.x+rect.x:0);(y=l+_)>r||d.newline?(l=0,y=_,c+=h+n,h=rect.height):h=Math.max(h,rect.height)}else{var w=rect.height+(x?-x.y+rect.y:0);(v=c+w)>o||d.newline?(l+=h+n,c=0,v=w,h=rect.width):h=Math.max(h,rect.width)}d.newline||(d.x=l,d.y=c,d.markRedraw(),"horizontal"===t?l=y+n:c=v+n)}))}var zu=Eu;w.curry(Eu,"vertical"),w.curry(Eu,"horizontal");function Vu(t,e,n){n=Mu(n||0);var r=e.width,o=e.height,l=Ii(t.left,r),c=Ii(t.top,o),h=Ii(t.right,r),d=Ii(t.bottom,o),f=Ii(t.width,r),y=Ii(t.height,o),v=n[2]+n[0],m=n[1]+n[3],x=t.aspect;switch(isNaN(f)&&(f=r-h-m-l),isNaN(y)&&(y=o-d-v-c),null!=x&&(isNaN(f)&&isNaN(y)&&(x>r/o?f=.8*r:y=.8*o),isNaN(f)&&(f=x*y),isNaN(y)&&(y=f/x)),isNaN(l)&&(l=r-h-f-m),isNaN(c)&&(c=o-d-y-v),t.left||t.right){case"center":l=r/2-f/2-n[3];break;case"right":l=r-f-m}switch(t.top||t.bottom){case"middle":case"center":c=o/2-y/2-n[0];break;case"bottom":c=o-y-v}l=l||0,c=c||0,isNaN(f)&&(f=r-m-l-(h||0)),isNaN(y)&&(y=o-v-c-(d||0));var rect=new Bt(l+n[3],c+n[0],f,y);return rect.margin=n,rect}function Bu(t,e,n,r,o,l){var rect,c=!o||!o.hv||o.hv[0],h=!o||!o.hv||o.hv[1],d=o&&o.boundingMode||"all";if((l=l||t).x=t.x,l.y=t.y,!c&&!h)return!1;if("raw"===d)rect="group"===t.type?new Bt(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(rect=t.getBoundingRect(),t.needLocalTransform()){var f=t.getLocalTransform();(rect=rect.clone()).applyTransform(f)}var y=Vu(w.defaults({width:rect.width,height:rect.height},e),n,r),v=c?y.x-rect.x:0,m=h?y.y-rect.y:0;return"raw"===d?(l.x=v,l.y=m):(l.x+=v,l.y+=m),l===t&&t.markRedraw(),!0}function Fu(ins){var t=ins.layoutMode||ins.constructor.layoutMode;return w.isObject(t)?t:t?{type:t}:null}function Gu(t,e,n){var r=n&&n.ignoreSize;!w.isArray(r)&&(r=[r,r]);var o=c(Ru[0],0),l=c(Ru[1],1);function c(n,o){var l={},c=0,f={},y=0;if(Pu(n,(function(e){f[e]=t[e]})),Pu(n,(function(t){h(e,t)&&(l[t]=f[t]=e[t]),d(l,t)&&c++,d(f,t)&&y++})),r[o])return d(e,n[1])?f[n[2]]=null:d(e,n[2])&&(f[n[1]]=null),f;if(2!==y&&c){if(c>=2)return l;for(var i=0;i=0;i--)l=w.merge(l,n[i],!0);e.defaultOption=l}return e.defaultOption},e.prototype.getReferringComponents=function(t,e){var n=t+"Index",r=t+"Id";return xr(this.ecModel,t,{index:this.get(n,!0),id:this.get(r,!0)},e)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=((n=e.prototype).type="component",n.id="",n.name="",n.mainType="",n.subType="",void(n.componentIndex=0)),e}(Pl);Ar(Xu,Pl),jr(Xu),function(t){var e={};t.registerSubTypeDefaulter=function(t,n){var r=Tr(t);e[r.main]=n},t.determineSubType=function(n,option){var r=option.type;if(!r){var o=Tr(n).main;t.hasSubTypes(n)&&e[o]&&(r=e[o](option))}return r}}(Xu),function(t,e){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,r,o,l){if(t.length){var c=function(t){var r={},o=[];return w.each(t,(function(l){var c=n(r,l),h=function(t,e){var n=[];return w.each(t,(function(t){w.indexOf(e,t)>=0&&n.push(t)})),n}(c.originalDeps=e(l),t);c.entryCount=h.length,0===c.entryCount&&o.push(l),w.each(h,(function(t){w.indexOf(c.predecessor,t)<0&&c.predecessor.push(t);var e=n(r,t);w.indexOf(e.successor,t)<0&&e.successor.push(l)}))})),{graph:r,noEntryList:o}}(r),h=c.graph,d=c.noEntryList,f={};for(w.each(t,(function(t){f[t]=!0}));d.length;){var y=d.pop(),v=h[y],m=!!f[y];m&&(o.call(l,y,v.originalDeps.slice()),delete f[y]),w.each(v.successor,m?_:x)}w.each(f,(function(){throw new Error("")}))}function x(t){h[t].entryCount--,0===h[t].entryCount&&d.push(t)}function _(t){f[t]=!0,x(t)}}}(Xu,(function(t){var e=[];w.each(Xu.getClassesByMainType(t),(function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])})),e=w.map(e,(function(t){return Tr(t).main})),"dataset"!==t&&w.indexOf(e,"dataset")<=0&&e.unshift("dataset");return e}));var Uu=Xu,Zu="";"undefined"!=typeof navigator&&(Zu=navigator.platform||"");var qu="rgba(0, 0, 0, 0.2)",Ku={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:qu,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:qu,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:qu,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:qu,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:qu,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:qu,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Zu.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},$u=Object(w.createHashMap)(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),Ju="original",Qu="arrayRows",tc="objectRows",ec="keyedColumns",nc="typedArray",ic="unknown",rc="column",oc="row",ac={Must:1,Might:2,Not:3},sc=pr();function lc(t,e,source){var n={},r=cc(e);if(!r||!t)return n;var o,l,c=[],h=[],d=e.ecModel,f=sc(d).datasetMap,y=r.uid+"_"+source.seriesLayoutBy;t=t.slice(),Object(w.each)(t,(function(e,r){var c=Object(w.isObject)(e)?e:t[r]={name:e};"ordinal"===c.type&&null==o&&(o=r,l=x(c)),n[c.name]=[]}));var v=f.get(y)||f.set(y,{categoryWayDim:l,valueWayDim:0});function m(t,e,n){for(var i=0;ie)return t[i];return t[n-1]}(r,c):n;if((y=y||n)&&y.length){var v=y[d];return o&&(f[o]=v),h.paletteIdx=(d+1)%y.length,v}}var xc,bc,_c;"undefined"!=typeof console&&console.warn&&console.log;function wc(t){0}function Sc(t){throw new Error(t)}var Mc="\0_ec_inner";var Oc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(x.a)(e,t),e.prototype.init=function(option,t,e,n,r,o){n=n||{},this.option=null,this._theme=new Pl(n),this._locale=new Pl(r),this._optionManager=o},e.prototype.setOption=function(option,t,e){var n=Cc(t);this._optionManager.setOption(option,e,n),this._resetOption(null,n)},e.prototype.resetOption=function(t,e){return this._resetOption(t,Cc(e))},e.prototype._resetOption=function(t,e){var n=!1,r=this._optionManager;if(!t||"recreate"===t){var o=r.mountOption("recreate"===t);0,this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(o,e)):_c(this,o),n=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var l=r.getTimelineOption(this);l&&(n=!0,this._mergeOption(l,e))}if(!t||"recreate"===t||"media"===t){var c=r.getMediaOption(this);c.length&&Object(w.each)(c,(function(t){n=!0,this._mergeOption(t,e)}),this)}return n},e.prototype.mergeOption=function(option){this._mergeOption(option,null)},e.prototype._mergeOption=function(t,e){var option=this.option,n=this._componentsMap,r=this._componentsCount,o=[],l=Object(w.createHashMap)(),c=e&&e.replaceMergeMainTypeMap;sc(this).datasetMap=Object(w.createHashMap)(),Object(w.each)(t,(function(t,e){null!=t&&(Uu.hasClass(e)?e&&(o.push(e),l.set(e,!0)):option[e]=null==option[e]?Object(w.clone)(t):Object(w.merge)(option[e],t,!0))})),c&&c.each((function(t,e){Uu.hasClass(e)&&!l.get(e)&&(o.push(e),l.set(e,!0))})),Uu.topologicalTravel(o,Uu.getAllClassMainTypes(),(function(e){var o=function(t,e,n){var r=pc.get(e);if(!r)return n;var o=r(t);return o?n.concat(o):n}(this,e,Qi(t[e])),l=n.get(e),h=l?c&&c.get(e)?"replaceMerge":"normalMerge":"replaceAll",d=or(l,o,h);(function(t,e,n){Object(w.each)(t,(function(t){var r=t.newOption;Object(w.isObject)(r)&&(t.keyInfo.mainType=e,t.keyInfo.subType=function(t,e,n,r){return e.type?e.type:n?n.subType:r.determineSubType(t,e)}(e,r,t.existing,n))}))})(d,e,Uu),option[e]=null,n.set(e,null),r.set(e,0);var f,y=[],v=[],m=0;Object(w.each)(d,(function(t,n){var r=t.existing,o=t.newOption;if(o){var l="series"===e,c=Uu.getClass(e,t.keyInfo.subType,!l);if(!c)return;if("tooltip"===e){if(f)return void 0;f=!0}if(r&&r.constructor===c)r.name=t.keyInfo.name,r.mergeOption(o,this),r.optionUpdated(o,!1);else{var h=Object(w.extend)({componentIndex:n},t.keyInfo);r=new c(o,this,this,h),Object(w.extend)(r,h),t.brandNew&&(r.__requireNewView=!0),r.init(o,this,this),r.optionUpdated(null,!0)}}else r&&(r.mergeOption({},this),r.optionUpdated({},!1));r?(y.push(r.option),v.push(r),m++):(y.push(void 0),v.push(void 0))}),this),option[e]=y,n.set(e,v),r.set(e,m),"series"===e&&xc(this)}),this),this._seriesIndices||xc(this)},e.prototype.getOption=function(){var option=Object(w.clone)(this.option);return Object(w.each)(option,(function(t,e){if(Uu.hasClass(e)){for(var n=Qi(t),r=n.length,o=!1,i=r-1;i>=0;i--)n[i]&&!cr(n[i])?o=!0:(n[i]=null,!o&&r--);n.length=r,option[e]=n}})),delete option[Mc],option},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){var r=n[e||0];if(r)return r;if(null==e)for(var i=0;i=e:"max"===n?t<=e:t===e})(r[c],t,l)||(o=!1)}})),o}var Ec=function(){function t(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return t.prototype.setOption=function(t,e,n){t&&(Object(w.each)(Qi(t.series),(function(t){t&&t.data&&Object(w.isTypedArray)(t.data)&&Object(w.setAsPrimitive)(t.data)})),Object(w.each)(Qi(t.dataset),(function(t){t&&t.source&&Object(w.isTypedArray)(t.source)&&Object(w.setAsPrimitive)(t.source)}))),t=Object(w.clone)(t);var r=this._optionBackup,o=function(t,e,n){var r,o,l=[],c=t.baseOption,h=t.timeline,d=t.options,f=t.media,y=!!t.media,v=!!(d||h||c&&c.timeline);c?(o=c).timeline||(o.timeline=h):((v||y)&&(t.options=t.media=null),o=t);y&&Object(w.isArray)(f)&&Object(w.each)(f,(function(t){t&&t.option&&(t.query?l.push(t):r||(r=t))}));function m(option){Object(w.each)(e,(function(t){t(option,n)}))}return m(o),Object(w.each)(d,(function(option){return m(option)})),Object(w.each)(l,(function(t){return m(t.option)})),{baseOption:o,timelineOptions:d||[],mediaDefault:r,mediaList:l}}(t,e,!r);this._newBaseOption=o.baseOption,r?(o.timelineOptions.length&&(r.timelineOptions=o.timelineOptions),o.mediaList.length&&(r.mediaList=o.mediaList),o.mediaDefault&&(r.mediaDefault=o.mediaDefault)):this._optionBackup=o},t.prototype.mountOption=function(t){var e=this._optionBackup;return this._timelineOptions=e.timelineOptions,this._mediaList=e.mediaList,this._mediaDefault=e.mediaDefault,this._currentMediaIndices=[],Object(w.clone)(t?e.baseOption:this._newBaseOption)},t.prototype.getTimelineOption=function(t){var option,e=this._timelineOptions;if(e.length){var n=t.getComponent("timeline");n&&(option=Object(w.clone)(e[n.getCurrentIndex()]))}return option},t.prototype.getMediaOption=function(t){var e,n,r=this._api.getWidth(),o=this._api.getHeight(),l=this._mediaList,c=this._mediaDefault,h=[],d=[];if(!l.length&&!c)return d;for(var i=0,f=l.length;i=0;w--){var S=t[w];if(h||(m=S.data.rawIndexOf(S.stackedByDimension,v)),m>=0){var M=S.data.getByRawIndex(S.stackResultDimension,m);if("all"===d||"positive"===d&&M>0||"negative"===d&&M<0||"samesign"===d&&x>=0&&M>0||"samesign"===d&&x<=0&&M<0){x=Pi(x,M),_=M;break}}}return r[0]=x,r[1]=_,r}))}))}var ah,sh,lh,uh,ch,hh=function(t){this.data=t.data||(t.sourceFormat===ec?{}:[]),this.sourceFormat=t.sourceFormat||ic,this.seriesLayoutBy=t.seriesLayoutBy||rc,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var i=0;id&&(d=v)}c[0]=h,c[1]=d}},r=function(){return this._data?this._data.length/this._dimSize:0};function o(t){for(var i=0;i=0&&(c=l.interpolatedValue[h])}return null!=c?c+"":""})):void 0},t.prototype.getRawValue=function(t,e){return Dh(this.getData(e),t)},t.prototype.formatTooltip=function(t,e,n){},t}();function jh(t){var e,n;return w.isObject(t)?t.type&&(n=t):e=t,{text:e,frag:n}}function Ph(t){return new Nh(t)}var Nh=function(){function t(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return t.prototype.perform=function(t){var e,n=this._upstream,r=t&&t.skip;if(this._dirty&&n){var o=this.context;o.data=o.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!r&&(e=this._plan(this.context));var l,c=y(this._modBy),h=this._modDataCount||0,d=y(t&&t.modBy),f=t&&t.modDataCount||0;function y(t){return!(t>=1)&&(t=1),t}c===d&&h===f||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,l=this._doReset(r)),this._modBy=d,this._modDataCount=f;var v=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var m=this._dueIndex,x=Math.min(null!=v?this._dueIndex+v:1/0,this._dueEnd);if(!r&&(l||m1&&r>0?h:c}};return l;function c(){return e=t?null:le},gte:function(t,e){return t>=e}},Fh=function(){function t(t,e){if(!Object(w.isNumber)(e)){0,Sc("")}this._opFn=Bh[t],this._rvalFloat=Yi(e)}return t.prototype.evaluate=function(t){return Object(w.isNumber)(t)?this._opFn(t,this._rvalFloat):this._opFn(Yi(t),this._rvalFloat)},t}(),Gh=function(){function t(t,e){var n="desc"===t;this._resultLT=n?1:-1,null==e&&(e=n?"min":"max"),this._incomparable="min"===e?-1/0:1/0}return t.prototype.evaluate=function(t,e){var n=Object(w.isNumber)(t)?t:Yi(t),r=Object(w.isNumber)(e)?e:Yi(e),o=isNaN(n),l=isNaN(r);if(o&&(n=this._incomparable),l&&(r=this._incomparable),o&&l){var c=Object(w.isString)(t),h=Object(w.isString)(e);c&&(n=h?t:0),h&&(r=c?e:0)}return nr?-this._resultLT:0},t}(),Hh=function(){function t(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=Yi(e)}return t.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(e=Yi(t)===this._rvalFloat)}return this._isEQ?e:!e},t}();function Wh(t,e){return"eq"===t||"ne"===t?new Hh("eq"===t,e):Object(w.hasOwn)(Bh,t)?new Fh(t,e):null}var Yh=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(t){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(t){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(t,e){},t.prototype.retrieveValueFromItem=function(t,e){},t.prototype.convertValue=function(t,e){return Eh(t,e)},t}();function Xh(t){if(!Jh(t.sourceFormat)){0,Sc("")}return t.data}function Uh(t){var e=t.sourceFormat,data=t.data;if(!Jh(e)){0,Sc("")}if(e===Qu){for(var n=[],i=0,r=data.length;i65535?nd:id}function ld(t,e,n,r,o){var l=ad[n||"float"];if(o){var c=t[e],h=c&&c.length;if(h!==r){for(var d=new l(r),f=0;f_[1]&&(_[1]=x)}return this._rawCount=this._count=h,{start:c,end:h}},t.prototype._initDataFromProvider=function(t,e,n){for(var r=this._provider,o=this._chunks,l=this._dimensions,c=l.length,h=this._rawExtent,d=Object(w.map)(l,(function(t){return t.property})),i=0;iS[1]&&(S[1]=_)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=e,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return l;o=l-1}}return-1},t.prototype.indicesOfNearest=function(t,e,n){var r=this._chunks[t],o=[];if(!r)return o;null==n&&(n=1/0);for(var l=1/0,c=-1,h=0,i=0,d=this.count();i=0&&c<0)&&(l=y,c=f,h=0),f===c&&(o[h++]=i))}return o.length=h,o},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,r=this._count;if(n===Array){t=new n(r);for(var i=0;i=f&&I<=y||isNaN(I))&&(c[h++]=x),x++}m=!0}else if(2===o){_=v[r[0]];var S=v[r[1]],M=t[r[1]][0],O=t[r[1]][1];for(i=0;i=f&&I<=y||isNaN(I))&&(T>=M&&T<=O||isNaN(T))&&(c[h++]=x),x++}m=!0}}if(!m)if(1===o)for(i=0;i=f&&I<=y||isNaN(I))&&(c[h++]=C)}else for(i=0;it[k][1])&&(A=!1)}A&&(c[h++]=e.getRawIndex(i))}return hw[1]&&(w[1]=_)}}}},t.prototype.lttbDownSample=function(t,e){var n,area,r,o=this.clone([t],!0),l=o._chunks[t],c=this.count(),h=0,d=Math.floor(1/e),f=this.getRawIndex(0),y=new(sd(this._rawCount))(Math.min(2*(Math.ceil(c/d)+2),c));y[h++]=f;for(var i=1;in&&(n=area,r=D)}A>0&&Af-i&&(h=f-i,c.length=h);for(var x=0;xy[1]&&(y[1]=w),v[m++]=S}return o._count=m,o._indices=v,o._updateGetRawIdx(),o},t.prototype.each=function(t,e){if(this._count)for(var n=t.length,r=this._chunks,i=0,o=this.count();ic&&(c=h)}return r=[l,c],this._extent[t]=r,r},t.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],r=this._chunks,i=0;i=0?this._indices[t]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function t(t,e,n,r){return Eh(t[r],this._dimensions[r])}Qh={arrayRows:t,objectRows:function(t,e,n,r){return Eh(t[e],this._dimensions[r])},keyedColumns:t,original:function(t,e,n,r){var o=t&&(null==t.value?t:t.value);return Eh(o instanceof Array?o[r]:o,this._dimensions[r])},typedArray:function(t,e,n,r){return t[r]}}}(),t}(),cd=ud,hd=function(){function t(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n=this._sourceHost,r=this._getUpstreamSourceManagers(),o=!!r.length;if(fd(n)){var l=n,data=void 0,c=void 0,h=void 0;if(o){var d=r[0];d.prepareSource(),data=(h=d.getSource()).data,c=h.sourceFormat,e=[d._getVersionSign()]}else data=l.get("data",!0),c=Object(w.isTypedArray)(data)?nc:Ju,e=[];var f=this._getSourceMetaRawOption()||{},y=h&&h.metaRawOption||{},v=Object(w.retrieve2)(f.seriesLayoutBy,y.seriesLayoutBy)||null,m=Object(w.retrieve2)(f.sourceHeader,y.sourceHeader),x=Object(w.retrieve2)(f.dimensions,y.dimensions);t=v!==y.seriesLayoutBy||!!m!=!!y.sourceHeader||x?[ph(data,{seriesLayoutBy:v,sourceHeader:m,dimensions:x},c)]:[]}else{var _=n;if(o){var S=this._applyTransform(r);t=S.sourceList,e=S.upstreamSignList}else{t=[ph(_.get("source",!0),this._getSourceMetaRawOption(),null)],e=[]}}this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,n=this._sourceHost,r=n.get("transform",!0),o=n.get("fromTransformResult",!0);if(null!=o){1!==t.length&&gd("")}var source,l=[],c=[];return Object(w.each)(t,(function(t){t.prepareSource();var e=t.getSource(o||0);null==o||e||gd(""),l.push(e),c.push(t._getVersionSign())})),r?e=function(t,e,n){var r=Qi(t),o=r.length;o||Sc("");for(var i=0,l=o;i1||n>0&&!t.noHeader;return Object(w.each)(t.blocks,(function(t){var n=Sd(t);n>=e&&(e=n+ +(r&&(!n||_d(t)&&!t.noHeader)))})),e}return 0}function Md(t,e,n,r){var o,l=e.noHeader,c=(o=Sd(e),{html:md[o],richText:xd[o]}),h=[],d=e.blocks||[];Object(w.assert)(!d||Object(w.isArray)(d)),d=d||[];var f=t.orderMode;if(e.sortBlocks&&f){d=d.slice();var y={valueAsc:"asc",valueDesc:"desc"};if(Object(w.hasOwn)(y,f)){var v=new Gh(y[f],null);d.sort((function(a,b){return v.evaluate(a.sortParam,b.sortParam)}))}else"seriesDesc"===f&&d.reverse()}Object(w.each)(d,(function(n,o){var l=e.valueFormatter,d=wd(n)(l?Object(w.extend)(Object(w.extend)({},t),{valueFormatter:l}):t,n,o>0?c.html:0,r);null!=d&&h.push(d)}));var m="richText"===t.renderMode?h.join(c.richText):Td(h.join(""),l?n:c.html);if(l)return m;var x=Ou(e.header,"ordinal",t.useUTC),_=vd(r,t.renderMode).nameStyle;return"richText"===t.renderMode?Cd(t,x,_)+c.richText+m:Td('
'+st(x)+"
"+m,n)}function Od(t,e,n,r){var o=t.renderMode,l=e.noName,c=e.noValue,h=!e.markerType,d=e.name,f=t.useUTC,y=e.valueFormatter||t.valueFormatter||function(t){return t=Object(w.isArray)(t)?t:[t],Object(w.map)(t,(function(t,e){return Ou(t,Object(w.isArray)(x)?x[e]:x,f)}))};if(!l||!c){var v=h?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",o),m=l?"":Ou(d,"ordinal",f),x=e.valueType,_=c?[]:y(e.value),S=!h||!l,M=!h&&l,O=vd(r,o),I=O.nameStyle,T=O.valueStyle;return"richText"===o?(h?"":v)+(l?"":Cd(t,m,I))+(c?"":function(t,e,n,r,style){var o=[style],l=r?10:20;return n&&o.push({padding:[0,0,0,l],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(Object(w.isArray)(e)?e.join(" "):e,o)}(t,_,S,M,T)):Td((h?"":v)+(l?"":function(t,e,style){return''+st(t)+""}(m,!h,I))+(c?"":function(t,e,n,style){var r=n?"10px":"20px",o=e?"float:right;margin-left:"+r:"";return t=Object(w.isArray)(t)?t:[t],''+Object(w.map)(t,(function(t){return st(t)})).join("  ")+""}(_,S,M,T)),n)}}function Id(t,e,n,r,o,l){if(t)return wd(t)({useUTC:o,renderMode:n,orderMode:r,markupStyleCreator:e,valueFormatter:t.valueFormatter},t,0,l)}function Td(t,e){return'
'+t+'
'}function Cd(t,e,style){return t.markupStyleCreator.wrapRichTextStyle(e,style)}function Ad(t,e){return Lu(t.getData().getItemVisual(e,"style")[t.visualDrawType])}function Dd(t,e){var n=t.get("padding");return null!=n?n:"richText"===e?[8,10]:10}var kd=function(){function t(){this.richTextStyles={},this._nextStyleNameId=Ui()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,e,n){var r="richText"===n?this._generateStyleName():null,marker=Au({color:e,type:t,renderMode:n,markerId:r});return Object(w.isString)(marker)?marker:(this.richTextStyles[r]=marker.style,marker.content)},t.prototype.wrapRichTextStyle=function(text,t){var e={};Object(w.isArray)(t)?Object(w.each)(t,(function(t){return Object(w.extend)(e,t)})):Object(w.extend)(e,t);var n=this._generateStyleName();return this.richTextStyles[n]=e,"{"+n+"|"+text+"}"},t}();function Ld(t){var e,n,r,o,l=t.series,c=t.dataIndex,h=t.multipleSeries,data=l.getData(),d=data.mapDimensionsAll("defaultedTooltip"),f=d.length,y=l.getRawValue(c),v=Object(w.isArray)(y),m=Ad(l,c);if(f>1||v&&!f){var x=function(t,e,n,r,o){var data=e.getData(),l=Object(w.reduce)(t,(function(t,e,n){var r=data.getDimensionInfo(n);return t||r&&!1!==r.tooltip&&null!=r.displayName}),!1),c=[],h=[],d=[];function f(t,e){var n=data.getDimensionInfo(e);n&&!1!==n.otherDims.tooltip&&(l?d.push(bd("nameValue",{markerType:"subItem",markerColor:o,name:n.displayName,value:t,valueType:n.type})):(c.push(t),h.push(n.type)))}return r.length?Object(w.each)(r,(function(t){f(Dh(data,n,t),t)})):Object(w.each)(t,f),{inlineValues:c,inlineValueTypes:h,blocks:d}}(y,l,c,d,m);e=x.inlineValues,n=x.inlineValueTypes,r=x.blocks,o=x.inlineValues[0]}else if(f){var _=data.getDimensionInfo(d[0]);o=e=Dh(data,c,d[0]),n=_.type}else o=e=v?y[0]:y;var S=ur(l),M=S&&l.name||"",O=data.getName(c),I=h?M:O;return bd("section",{header:M,noHeader:h||!S,sortParam:o,blocks:[bd("nameValue",{markerType:"item",markerColor:m,name:I,noName:!Object(w.trim)(I),value:e,valueType:n})].concat(r||[])})}var jd=pr();function Pd(data,t){return data.getName(t)||data.getId(t)}var Nd="__universalTransitionEnabled",Rd=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}var n;return Object(x.a)(e,t),e.prototype.init=function(option,t,e){this.seriesIndex=this.componentIndex,this.dataTask=Ph({count:zd,reset:Vd}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(option,e),(jd(this).sourceManager=new hd(this)).prepareSource();var data=this.getInitialData(option,e);Fd(data,this),this.dataTask.context.data=data,jd(this).dataBeforeProcessed=data,Ed(this),this._initSelectedMapFromData(data)},e.prototype.mergeDefaultAndTheme=function(option,t){var e=Fu(this),n=e?Hu(option):{},r=this.subType;Uu.hasClass(r)&&(r+="Series"),w.merge(option,t.getTheme().get(this.subType)),w.merge(option,this.getDefaultOption()),er(option,"label",["show"]),this.fillDataTextStyle(option.data),e&&Gu(option,n,e)},e.prototype.mergeOption=function(t,e){t=w.merge(this.option,t,!0),this.fillDataTextStyle(t.data);var n=Fu(this);n&&Gu(this.option,t,n);var r=jd(this).sourceManager;r.dirty(),r.prepareSource();var data=this.getInitialData(t,e);Fd(data,this),this.dataTask.dirty(),this.dataTask.context.data=data,jd(this).dataBeforeProcessed=data,Ed(this),this._initSelectedMapFromData(data)},e.prototype.fillDataTextStyle=function(data){if(data&&!w.isTypedArray(data))for(var t=["show"],i=0;ithis.getShallow("animationThreshold")&&(e=!1),!!e},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,e,n){var r=this.ecModel,o=yc.prototype.getColorFromPalette.call(this,t,e,n);return o||(o=r.getColorFromPalette(t,e,n)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},e.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,data=this.getData(e);if("series"===r||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var i=0;i=0&&n.push(r)}return n},e.prototype.isSelected=function(t,e){var n=this.option.selectedMap;if(!n)return!1;var data=this.getData(e);return("all"===n||n[Pd(data,t)])&&!data.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Nd])return!0;var t=this.option.universalTransition;return!!t&&(!0===t||t&&t.enabled)},e.prototype._innerSelect=function(data,t){var e,n,option=this.option,r=option.selectedMode,o=t.length;if(r&&o)if("series"===r)option.selectedMap="all";else if("multiple"===r){w.isObject(option.selectedMap)||(option.selectedMap={});for(var l=option.selectedMap,i=0;i0&&this._innerSelect(data,t)}},e.registerClass=function(t){return Uu.registerClass(t)},e.protoInitialize=((n=e.prototype).type="series.__base__",n.seriesIndex=0,n.ignoreStyleOnData=!1,n.hasSymbolVisual=!1,n.defaultSymbol="circle",n.visualStyleAccessPath="itemStyle",void(n.visualDrawType="fill")),e}(Uu);function Ed(t){var e=t.name;ur(t)||(t.name=function(t){var data=t.getRawData(),e=data.mapDimensionsAll("seriesName"),n=[];return w.each(e,(function(t){var e=data.getDimensionInfo(t);e.displayName&&n.push(e.displayName)})),n.join(" ")}(t)||e)}function zd(t){return t.model.getRawData().count()}function Vd(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Bd}function Bd(param,t){t.outputData&¶m.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Fd(data,t){w.each(w.concatArray(data.CHANGABLE_METHODS,data.DOWNSAMPLE_METHODS),(function(e){data.wrapMethod(e,w.curry(Gd,t))}))}function Gd(t,e){var n=Hd(t);return n&&n.setOutputEnd((e||this).count()),e}function Hd(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var r=n.currentTask;if(r){var o=r.agentStubMap;o&&(r=o.get(t.uid))}return r}}w.mixin(Rd,Lh),w.mixin(Rd,yc),Ar(Rd,Uu);var Wd=Rd,Yd=function(){function t(){this.group=new pi,this.uid=Rl("viewComponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,r){},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,r){},t.prototype.updateLayout=function(t,e,n,r){},t.prototype.updateVisual=function(t,e,n,r){},t.prototype.toggleBlurSeries=function(t,e,n){},t.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},t}();Cr(Yd),jr(Yd);var Xd=Yd;function Ud(){var t=pr();return function(e){var n=t(e),r=e.pipelineContext,o=!!n.large,l=!!n.progressiveRender,c=n.large=!(!r||!r.large),h=n.progressiveRender=!(!r||!r.progressiveRender);return!(o===c&&l===h)&&"reset"}}var Zd=Wo.CMD,qd=[[],[],[]],Kd=Math.sqrt,$d=Math.atan2;function Jd(path,t){if(t){var e,n,i,r,o,p,data=path.data,l=path.len(),c=Zd.M,h=Zd.C,d=Zd.L,f=Zd.R,y=Zd.A,v=Zd.Q;for(i=0,r=0;i1&&(c*=Qd(x),h*=Qd(x));var _=(o===l?-1:1)*Qd((c*c*(h*h)-c*c*(m*m)-h*h*(v*v))/(c*c*(m*m)+h*h*(v*v)))||0,w=_*c*m/h,S=_*-h*v/c,M=(t+n)/2+ep(y)*w-tp(y)*S,O=(e+r)/2+tp(y)*w+ep(y)*S,I=ap([1,0],[(v-w)/c,(m-S)/h]),u=[(v-w)/c,(m-S)/h],T=[(-1*v-w)/c,(-1*m-S)/h],C=ap(u,T);if(op(u,T)<=-1&&(C=np),op(u,T)>=1&&(C=0),C<0){var A=Math.round(C/np*1e6)/1e6;C=2*np+A%2*np}path.addData(f,M,O,c,h,I,C,y,l)}var lp=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,up=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var cp=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(x.a)(e,t),e.prototype.applyTransform=function(t){},e}(ha);function hp(path){return null!=path.setData}function dp(t,e){var n=function(data){var path=new Wo;if(!data)return path;var t,e=0,n=0,r=e,o=n,l=Wo.CMD,c=data.match(lp);if(!c)return path;for(var h=0;hR*R+E*E&&(D=L,k=j),{cx:D,cy:k,x0:-y,y0:-v,x1:D*(o/C-1),y1:k*(o/C-1)}}function jp(t,e){var n,r=Ap(e.r,0),o=Ap(e.r0||0,0),l=r>0;if(l||o>0){if(l||(r=o,o=0),o>r){var c=r;r=o,o=c}var h=e.startAngle,d=e.endAngle;if(!isNaN(h)&&!isNaN(d)){var f=e.cx,y=e.cy,v=!!e.clockwise,m=Tp(d-h),x=m>wp&&m%wp;if(x>kp&&(m=x),r>kp)if(m>wp-kp)t.moveTo(f+r*Mp(h),y+r*Sp(h)),t.arc(f,y,r,h,d,!v),o>kp&&(t.moveTo(f+o*Mp(d),y+o*Sp(d)),t.arc(f,y,o,d,h,v));else{var _=void 0,S=void 0,M=void 0,O=void 0,I=void 0,T=void 0,C=void 0,A=void 0,D=void 0,k=void 0,L=void 0,j=void 0,P=void 0,N=void 0,R=void 0,E=void 0,z=r*Mp(h),V=r*Sp(h),B=o*Mp(d),F=o*Sp(d),G=m>kp;if(G){var H=e.cornerRadius;H&&(_=(n=function(t){var e;if(Object(w.isArray)(t)){var n=t.length;if(!n)return t;e=1===n?[t[0],t[0],0,0]:2===n?[t[0],t[0],t[1],t[1]]:3===n?t.concat(t[2]):t}else e=[t,t,t,t];return e}(H))[0],S=n[1],M=n[2],O=n[3]);var W=Tp(r-o)/2;if(I=Dp(W,M),T=Dp(W,O),C=Dp(W,_),A=Dp(W,S),L=D=Ap(I,T),j=k=Ap(C,A),(D>kp||k>kp)&&(P=r*Mp(d),N=r*Sp(d),R=o*Mp(h),E=o*Sp(h),m<_p)){var Y=function(t,e,n,r,o,l,c,h){var d=n-t,f=r-e,y=c-o,v=h-l,m=v*d-y*f;if(!(m*mkp){var $=Dp(M,L),J=Dp(O,L),Q=Lp(R,E,z,V,r,$,v),tt=Lp(P,N,B,F,r,J,v);t.moveTo(f+Q.cx+Q.x0,y+Q.cy+Q.y0),L0&&t.arc(f+Q.cx,y+Q.cy,$,Ip(Q.y0,Q.x0),Ip(Q.y1,Q.x1),!v),t.arc(f,y,r,Ip(Q.cy+Q.y1,Q.cx+Q.x1),Ip(tt.cy+tt.y1,tt.cx+tt.x1),!v),J>0&&t.arc(f+tt.cx,y+tt.cy,J,Ip(tt.y1,tt.x1),Ip(tt.y0,tt.x0),!v))}else t.moveTo(f+z,y+V),t.arc(f,y,r,h,d,!v);else t.moveTo(f+z,y+V);if(o>kp&&G)if(j>kp){$=Dp(_,j),Q=Lp(B,F,P,N,o,-(J=Dp(S,j)),v),tt=Lp(z,V,R,E,o,-$,v);t.lineTo(f+Q.cx+Q.x0,y+Q.cy+Q.y0),j0&&t.arc(f+Q.cx,y+Q.cy,J,Ip(Q.y0,Q.x0),Ip(Q.y1,Q.x1),!v),t.arc(f,y,o,Ip(Q.cy+Q.y1,Q.cx+Q.x1),Ip(tt.cy+tt.y1,tt.cx+tt.x1),v),$>0&&t.arc(f+tt.cx,y+tt.cy,$,Ip(tt.y1,tt.x1),Ip(tt.y0,tt.x0),!v))}else t.lineTo(f+B,y+F),t.arc(f,y,o,d,h,v);else t.lineTo(f+B,y+F)}else t.moveTo(f,y);t.closePath()}}}var Pp=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},Np=function(t){function e(e){return t.call(this,e)||this}return Object(x.a)(e,t),e.prototype.getDefaultShape=function(){return new Pp},e.prototype.buildPath=function(t,e){jp(t,e)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(ha);Np.prototype.type="sector";var Rp=Np,Ep=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},zp=function(t){function e(e){return t.call(this,e)||this}return Object(x.a)(e,t),e.prototype.getDefaultShape=function(){return new Ep},e.prototype.buildPath=function(t,e){var n=e.cx,r=e.cy,o=2*Math.PI;t.moveTo(n+e.r,r),t.arc(n,r,e.r,0,o,!1),t.moveTo(n+e.r0,r),t.arc(n,r,e.r0,0,o,!0)},e}(ha);zp.prototype.type="ring";var Vp=zp;function Bp(t,e,n){var r=e.smooth,o=e.points;if(o&&o.length>=2){if(r){var l=function(t,e,n,r){var o,l,c,h,d=[],f=[],y=[],v=[];if(r){c=[1/0,1/0],h=[-1/0,-1/0];for(var i=0,m=t.length;idf[1]){if(c=!1,o)return c;var d=Math.abs(df[0]-hf[1]),f=Math.abs(hf[0]-df[1]);Math.min(d,f)>r.len()&&(dMath.abs(l[1])?l[0]>0?"right":"left":l[1]>0?"bottom":"top"}function zf(t){return!t.isGroup}function Vf(t,e,n){if(t&&e){var r,o=(r={},t.traverse((function(t){zf(t)&&t.anid&&(r[t.anid]=t)})),r);e.traverse((function(t){if(zf(t)&&t.anid){var e=o[t.anid];if(e){var r=l(t);t.attr(l(e)),Ks(t,r,n,Ha(t).dataIndex)}}}))}function l(t){var e={x:t.x,y:t.y,rotation:t.rotation};return function(t){return null!=t.shape}(t)&&(e.shape=Object(w.extend)({},t.shape)),e}}function Bf(t,rect){return Object(w.map)(t,(function(t){var e=t[0];e=xf(e,rect.x),e=bf(e,rect.x+rect.width);var n=t[1];return n=xf(n,rect.y),[e,n=bf(n,rect.y+rect.height)]}))}function Ff(t,rect){var e=xf(t.x,rect.x),n=bf(t.x+t.width,rect.x+rect.width),r=xf(t.y,rect.y),o=bf(t.y+t.height,rect.y+rect.height);if(n>=e&&o>=r)return{x:e,y:r,width:n-e,height:o-r}}function Gf(t,e,rect){var n=Object(w.extend)({rectHover:!0},e),style=n.style={strokeNoScale:!0};if(rect=rect||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(style.image=t.slice(8),Object(w.defaults)(style,rect),new ma(n)):Tf(t.replace("path://",""),n,rect,"center")}function Hf(t,e,n,r,o){for(var i=0,l=o[o.length-1];i=-1e-6)return!1;var _=t-o,w=e-l,q=Yf(_,w,f,y)/x;if(q<0||q>1)return!1;var p=Yf(_,w,v,m)/x;return!(p<0||p>1)}function Yf(t,e,n,r){return t*r-n*e}function Xf(t){var e=t.itemTooltipOption,n=t.componentModel,r=t.itemName,o=Object(w.isString)(e)?{formatter:e}:e,l=n.mainType,c=n.componentIndex,h={componentType:l,name:r,$vars:["name"]};h[l+"Index"]=c;var d=t.formatterParamsExtra;d&&Object(w.each)(Object(w.keys)(d),(function(t){Object(w.hasOwn)(h,t)||(h[t]=d[t],h.$vars.push(t))}));var f=Ha(t.el);f.componentMainType=l,f.componentIndex=c,f.tooltipConfig={name:r,option:Object(w.defaults)({content:r,formatterParams:h},o)}}function Uf(t,e){var n;t.isGroup&&(n=e(t)),n||t.traverse(e)}function Zf(t,e){if(t)if(Object(w.isArray)(t))for(var i=0;i=0?v():y=setTimeout(v,-o),d=r};return m.clear=function(){y&&(clearTimeout(y),y=null)},m.debounceNextCall=function(t){h=t},m}function lg(t,e,n,r){var o=t[e];if(o){var l=o[rg]||o,c=o[ag];if(o[og]!==n||c!==r){if(null==n||!r)return t[e]=l;(o=t[e]=sg(l,n,"debounce"===r))[rg]=l,o[ag]=r,o[og]=n}return o}}function ug(t,e){var n=t[e];n&&n[rg]&&(n.clear&&n.clear(),t[e]=n[rg])}var cg=pr(),hg={itemStyle:Pr(Dl,!0),lineStyle:Pr(Tl,!0)},dg={lineStyle:"stroke",itemStyle:"fill"};function pg(t,e){var n=t.visualStyleMapper||hg[e];return n||(console.warn("Unknown style type '"+e+"'."),hg.itemStyle)}function fg(t,e){var n=t.visualDrawType||dg[e];return n||(console.warn("Unknown style type '"+e+"'."),"fill")}var gg={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var data=t.getData(),n=t.visualStyleAccessPath||"itemStyle",r=t.getModel(n),o=pg(t,n)(r),l=r.getShallow("decal");l&&(data.setVisual("decal",l),l.dirty=!0);var c=fg(t,n),h=o[c],d=Object(w.isFunction)(h)?h:null,f="auto"===o.fill||"auto"===o.stroke;if(!o[c]||d||f){var y=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[c]||(o[c]=y,data.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||Object(w.isFunction)(o.fill)?y:o.fill,o.stroke="auto"===o.stroke||Object(w.isFunction)(o.stroke)?y:o.stroke}if(data.setVisual("style",o),data.setVisual("drawType",c),!e.isSeriesFiltered(t)&&d)return data.setVisual("colorFromPalette",!1),{dataEach:function(data,e){var n=t.getDataParams(e),r=Object(w.extend)({},o);r[c]=d(n),data.setItemVisual(e,"style",r)}}}},yg=new Pl,vg={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var data=t.getData(),n=t.visualStyleAccessPath||"itemStyle",r=pg(t,n),o=data.getVisual("drawType");return{dataEach:data.hasItemOption?function(data,t){var e=data.getRawDataItem(t);if(e&&e[n]){yg.option=e[n];var style=r(yg),l=data.ensureUniqueItemVisual(t,"style");Object(w.extend)(l,style),yg.option.decal&&(data.setItemVisual(t,"decal",yg.option.decal),yg.option.decal.dirty=!0),o in style&&data.setItemVisual(t,"colorFromPalette",!1)}}:null}}}},mg={performRawSeries:!0,overallReset:function(t){var e=Object(w.createHashMap)();t.eachSeries((function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var r=t.type+"-"+n,o=e.get(r);o||(o={},e.set(r,o)),cg(t).scope=o}})),t.eachSeries((function(e){if(!e.isColorBySeries()&&!t.isSeriesFiltered(e)){var n=e.getRawData(),r={},data=e.getData(),o=cg(e).scope,l=e.visualStyleAccessPath||"itemStyle",c=fg(e,l);data.each((function(t){var e=data.getRawIndex(t);r[e]=t})),n.each((function(t){var l=r[t];if(data.getItemVisual(l,"colorFromPalette")){var h=data.ensureUniqueItemVisual(l,"style"),d=n.getName(t)||t+"",f=n.count();h[c]=e.getColorFromPalette(d,o,f)}}))}}))}},xg=Math.PI;var bg=function(){function t(t,e,n,r){this._stageTaskMap=Object(w.createHashMap)(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),r=n.context,o=!e&&n.progressiveEnabled&&(!r||r.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,l=r&&r.modDataCount;return{step:o,modBy:null!=l?Math.ceil(l/o):null,modDataCount:l}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,view){var e=this._pipelineMap.get(t.uid),n=t.getData().count(),r=e.progressiveEnabled&&view.incrementalPrepareRender&&n>=e.threshold,o=t.get("large")&&n>=t.get("largeThreshold"),l="mod"===t.get("progressiveChunkMode")?n:null;t.pipelineContext=e.context={progressiveRender:r,modDataCount:l,large:o}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=Object(w.createHashMap)();t.eachSeries((function(t){var r=t.getProgressive(),o=t.uid;n.set(o,{id:o,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:r&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),e._pipe(t,t.dataTask)}))},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;Object(w.each)(this._allHandlers,(function(r){var o=t.get(r.uid)||t.set(r.uid,{});Object(w.assert)(!(r.reset&&r.overallReset),""),r.reset&&this._createSeriesStageTask(r,o,e,n),r.overallReset&&this._createOverallStageTask(r,o,e,n)}),this)},t.prototype.prepareView=function(view,t,e,n){var r=view.renderTask,o=r.context;o.model=t,o.ecModel=e,o.api=n,r.__block=!view.incrementalPrepareRender,this._pipe(t,r)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,r){r=r||{};var o=!1,l=this;function c(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}Object(w.each)(t,(function(t,h){if(!r.visualType||r.visualType===t.visualType){var d=l._stageTaskMap.get(t.uid),f=d.seriesTaskMap,y=d.overallTask;if(y){var v,m=y.agentStubMap;m.each((function(t){c(r,t)&&(t.dirty(),v=!0)})),v&&y.dirty(),l.updatePayload(y,n);var x=l.getPerformArgs(y,r.block);m.each((function(t){t.perform(x)})),y.perform(x)&&(o=!0)}else f&&f.each((function(h,d){c(r,h)&&h.dirty();var f=l.getPerformArgs(h,r.block);f.skip=!t.performRawSeries&&e.isSeriesFiltered(h.context.model),l.updatePayload(h,n),h.perform(f)&&(o=!0)}))}})),this.unfinished=o||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e=t.dataTask.perform()||e})),this.unfinished=e||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each((function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)}))},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,r){var o=this,l=e.seriesTaskMap,c=e.seriesTaskMap=Object(w.createHashMap)(),h=t.seriesType,d=t.getTargetSeries;function f(e){var h=e.uid,d=c.set(h,l&&l.get(h)||Ph({plan:Og,reset:Ig,count:Ag}));d.context={model:e,ecModel:n,api:r,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:o},o._pipe(e,d)}t.createOnAllSeries?n.eachRawSeries(f):h?n.eachRawSeriesByType(h,f):d&&d(n,r).each(f)},t.prototype._createOverallStageTask=function(t,e,n,r){var o=this,l=e.overallTask=e.overallTask||Ph({reset:_g});l.context={ecModel:n,api:r,overallReset:t.overallReset,scheduler:o};var c=l.agentStubMap,h=l.agentStubMap=Object(w.createHashMap)(),d=t.seriesType,f=t.getTargetSeries,y=!0,v=!1;function m(t){var e=t.uid,n=h.set(e,c&&c.get(e)||(v=!0,Ph({reset:wg,onDirty:Mg})));n.context={model:t,overallProgress:y},n.agent=l,n.__block=y,o._pipe(t,n)}Object(w.assert)(!t.createOnAllSeries,""),d?n.eachRawSeriesByType(d,m):f?f(n,r).each(m):(y=!1,Object(w.each)(n.getSeries(),m)),v&&l.dirty()},t.prototype._pipe=function(t,e){var n=t.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=e),r.tail&&r.tail.pipe(e),r.tail=e,e.__idxInPipeline=r.count++,e.__pipeline=r},t.wrapStageHandler=function(t,e){return Object(w.isFunction)(t)&&(t={overallReset:t,seriesType:Dg(t)}),t.uid=Rl("stageHandler"),e&&(t.visualType=e),t},t}();function _g(t){t.overallReset(t.ecModel,t.api,t.payload)}function wg(t){return t.overallProgress&&Sg}function Sg(){this.agent.dirty(),this.getDownstream().dirty()}function Mg(){this.agent&&this.agent.dirty()}function Og(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Ig(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Qi(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?Object(w.map)(e,(function(t,e){return Cg(e)})):Tg}var Tg=Cg(0);function Cg(t){return function(e,n){var data=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var i=e.start;i0&&f===o.length-d.length){var y=o.slice(0,f);"data"!==y&&(e.mainType=y,e[d.toLowerCase()]=t,h=!0)}}c.hasOwnProperty(o)&&(n[o]=t,h=!0),h||(r[o]=t)}))}return{cptQuery:e,dataQuery:n,otherQuery:r}},t.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,o=n.packedEvent,l=n.model,view=n.view;if(!l||!view)return!0;var c=e.cptQuery,h=e.dataQuery;return d(c,l,"mainType")&&d(c,l,"subType")&&d(c,l,"index","componentIndex")&&d(c,l,"name")&&d(c,l,"id")&&d(h,o,"name")&&d(h,o,"dataIndex")&&d(h,o,"dataType")&&(!view.filterForExposedEvent||view.filterForExposedEvent(t,e.otherQuery,r,o));function d(t,e,n,r){return null==t[n]||e[r||n]===t[n]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),Yg=["symbol","symbolSize","symbolRotate","symbolOffset"],Xg=Yg.concat(["symbolKeepAspect"]),Ug={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var data=t.getData();if(t.legendIcon&&data.setVisual("legendIcon",t.legendIcon),t.hasSymbolVisual){for(var n={},r={},o=!1,i=0;i=0&&vy(h)?h:.5,t.createRadialGradient(l,c,0,l,c,h)}(t,e,rect):function(t,e,rect){var n=null==e.x?0:e.x,r=null==e.x2?1:e.x2,o=null==e.y?0:e.y,l=null==e.y2?0:e.y2;return e.global||(n=n*rect.width+rect.x,r=r*rect.width+rect.x,o=o*rect.height+rect.y,l=l*rect.height+rect.y),n=vy(n)?n:0,r=vy(r)?r:1,o=vy(o)?o:0,l=vy(l)?l:0,t.createLinearGradient(n,o,r,l)}(t,e,rect),r=e.colorStops,i=0;i0&&(e=style.lineDash,n=style.lineWidth,e&&"solid"!==e&&n>0?"dashed"===e?[4*n,2*n]:"dotted"===e?[n]:Object(w.isNumber)(e)?[e]:Object(w.isArray)(e)?e:null:null),o=style.lineDashOffset;if(r){var l=style.strokeNoScale&&t.getLineScale?t.getLineScale():1;l&&1!==l&&(r=Object(w.map)(r,(function(t){return t/l})),o/=l)}return[r,o]}var wy=new Wo(!0);function Sy(style){var t=style.stroke;return!(null==t||"none"===t||!(style.lineWidth>0))}function My(t){return"string"==typeof t&&"none"!==t}function Oy(style){var t=style.fill;return null!=t&&"none"!==t}function Iy(t,style){if(null!=style.fillOpacity&&1!==style.fillOpacity){var e=t.globalAlpha;t.globalAlpha=style.fillOpacity*style.opacity,t.fill(),t.globalAlpha=e}else t.fill()}function Ty(t,style){if(null!=style.strokeOpacity&&1!==style.strokeOpacity){var e=t.globalAlpha;t.globalAlpha=style.strokeOpacity*style.opacity,t.stroke(),t.globalAlpha=e}else t.stroke()}function Cy(t,pattern,e){var image=Vr(pattern.image,pattern.__image,e);if(Fr(image)){var n=t.createPattern(image,pattern.repeat||"repeat");if("function"==typeof DOMMatrix&&n&&n.setTransform){var r=new DOMMatrix;r.translateSelf(pattern.x||0,pattern.y||0),r.rotateSelf(0,0,(pattern.rotation||0)*w.RADIAN_TO_DEGREE),r.scaleSelf(pattern.scaleX||1,pattern.scaleY||1),n.setTransform(r)}return n}}var Ay=["shadowBlur","shadowOffsetX","shadowOffsetY"],Dy=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function ky(t,style,e,n,r){var o=!1;if(!n&&style===(e=e||{}))return!1;if(n||style.opacity!==e.opacity){zy(t,r),o=!0;var l=Math.max(Math.min(style.opacity,1),0);t.globalAlpha=isNaN(l)?eo.opacity:l}(n||style.blend!==e.blend)&&(o||(zy(t,r),o=!0),t.globalCompositeOperation=style.blend||eo.blend);for(var i=0;i0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(option,t,e){if(!this[av])if(this._disposed)Ev(this.id);else{var n,r,o;if(Object(w.isObject)(t)&&(e=t.lazyUpdate,n=t.silent,r=t.replaceMerge,o=t.transition,t=t.notMerge),this[av]=!0,!this._model||t){var l=new Ec(this._api),c=this._theme,h=this._model=new Ac;h.scheduler=this._scheduler,h.ssr=this._ssr,h.init(null,null,null,c,this._locale,l)}this._model.setOption(option,{replaceMerge:r},Fv);var d={seriesTransition:o,optionChanged:!0};if(e)this[sv]={silent:n,updateParams:d},this[av]=!1,this.getZr().wakeUp();else{try{fv(this),vv.update.call(this,null,d)}catch(t){throw this[sv]=null,this[av]=!1,t}this._ssr||this._zr.flush(),this[sv]=null,this[av]=!1,_v.call(this,n),wv.call(this,n)}}},e.prototype.setTheme=function(){wc()},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||_.a.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){return t=t||{},this._zr.painter.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){return t=t||{},this._zr.painter.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(_.a.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return Object(w.each)(e,(function(t){t.stopAnimation(null,!0)})),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,r=[],o=this;Object(w.each)(e,(function(t){n.eachComponent({mainType:t},(function(component){var view=o._componentsMap[component.__viewId];view.group.ignore||(r.push(view),view.group.ignore=!0)}))}));var l="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return Object(w.each)(r,(function(view){view.group.ignore=!1})),l}Ev(this.id)},e.prototype.getConnectedDataURL=function(t){if(!this._disposed){var e="svg"===t.type,n=this.group,r=Math.min,o=Math.max,l=1/0;if(Xv[n]){var c=l,h=l,d=-1/0,f=-1/0,y=[],v=t&&t.pixelRatio||this.getDevicePixelRatio();Object(w.each)(Yv,(function(l,v){if(l.group===n){var canvas=e?l.getZr().painter.getSvgDom().innerHTML:l.renderToCanvas(Object(w.clone)(t)),m=l.getDom().getBoundingClientRect();c=r(m.left,c),h=r(m.top,h),d=o(m.right,d),f=o(m.bottom,f),y.push({dom:canvas,left:m.left,top:m.top})}}));var m=(d*=v)-(c*=v),x=(f*=v)-(h*=v),_=Wn.d.createCanvas(),S=vi(_,{renderer:e?"svg":"canvas"});if(S.resize({width:m,height:x}),e){var M="";return Object(w.each)(y,(function(t){var e=t.left-c,n=t.top-h;M+=''+t.dom+""})),S.painter.getSvgRoot().innerHTML=M,t.connectedBackgroundColor&&S.painter.setBackgroundColor(t.connectedBackgroundColor),S.refreshImmediately(),S.painter.toDataURL()}return t.connectedBackgroundColor&&S.add(new Ia({shape:{x:0,y:0,width:m,height:x},style:{fill:t.connectedBackgroundColor}})),Object(w.each)(y,(function(t){var img=new ma({style:{x:t.left*v-c,y:t.top*v-h,image:t.dom}});S.add(img)})),S.refreshImmediately(),_.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}Ev(this.id)},e.prototype.convertToPixel=function(t,e){return mv(this,"convertToPixel",t,e)},e.prototype.convertFromPixel=function(t,e){return mv(this,"convertFromPixel",t,e)},e.prototype.containPixel=function(t,e){if(!this._disposed){var n,r=gr(this._model,t);return Object(w.each)(r,(function(t,r){r.indexOf("Models")>=0&&Object(w.each)(t,(function(t){var o=t.coordinateSystem;if(o&&o.containPoint)n=n||!!o.containPoint(e);else if("seriesModels"===r){var view=this._chartsMap[t.__viewId];view&&view.containPoint&&(n=n||view.containPoint(e,t))}else 0}),this)}),this),!!n}Ev(this.id)},e.prototype.getVisual=function(t,e){var n=gr(this._model,t,{defaultMainType:"series"});var data=n.seriesModel.getData(),r=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?data.indexOfRawIndex(n.dataIndex):null;return null!=r?qg(data,r,e):Kg(data,e)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t,e,n,r=this;Object(w.each)(Rv,(function(t){var e=function(e){var n,o=r.getModel(),l=e.target;if("globalout"===t?n={}:l&&ty(l,(function(t){var e=Ha(t);if(e&&null!=e.dataIndex){var r=e.dataModel||o.getSeriesByIndex(e.seriesIndex);return n=r&&r.getDataParams(e.dataIndex,e.dataType)||{},!0}if(e.eventData)return n=Object(w.extend)({},e.eventData),!0}),!0),n){var c=n.componentType,h=n.componentIndex;"markLine"!==c&&"markPoint"!==c&&"markArea"!==c||(c="series",h=n.seriesIndex);var d=c&&null!=h&&o.getComponent(c,h),view=d&&r["series"===d.mainType?"_chartsMap":"_componentsMap"][d.__viewId];0,n.event=e,n.type=t,r._$eventProcessor.eventInfo={targetEl:l,packedEvent:n,model:d,view:view},r.trigger(t,n)}};e.zrEventfulCallAtLast=!0,r._zr.on(t,e,r)})),Object(w.each)(Vv,(function(t,e){r._messageCenter.on(e,(function(t){this.trigger(e,t)}),r)})),Object(w.each)(["selectchanged"],(function(t){r._messageCenter.on(t,(function(e){this.trigger(t,e)}),r)})),t=this._messageCenter,e=this,n=this._api,t.on("selectchanged",(function(t){var r=n.getModel();t.isFromClick?(Qg("map","selectchanged",e,r,t),Qg("pie","selectchanged",e,r,t)):"select"===t.fromAction?(Qg("map","selected",e,r,t),Qg("pie","selected",e,r,t)):"unselect"===t.fromAction&&(Qg("map","unselected",e,r,t),Qg("pie","unselected",e,r,t))}))},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?Ev(this.id):this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)Ev(this.id);else{this._disposed=!0,this.getDom()&&_r(this.getDom(),qv,"");var t=this,e=t._api,n=t._model;Object(w.each)(t._componentsViews,(function(component){component.dispose(n,e)})),Object(w.each)(t._chartsViews,(function(t){t.dispose(n,e)})),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete Yv[t.id]}},e.prototype.resize=function(t){if(!this[av])if(this._disposed)Ev(this.id);else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),r=t&&t.silent;this[sv]&&(null==r&&(r=this[sv].silent),n=!0,this[sv]=null),this[av]=!0;try{n&&fv(this),vv.update.call(this,{type:"resize",animation:Object(w.extend)({duration:0},t&&t.animation)})}catch(t){throw this[av]=!1,t}this[av]=!1,_v.call(this,r),wv.call(this,r)}}},e.prototype.showLoading=function(t,e){if(this._disposed)Ev(this.id);else if(Object(w.isObject)(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Wv[t]){var n=Wv[t](this._api,e),r=this._zr;this._loadingFX=n,r.add(n)}},e.prototype.hideLoading=function(){this._disposed?Ev(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=Object(w.extend)({},t);return e.type=Vv[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed)Ev(this.id);else if(Object(w.isObject)(e)||(e={silent:!!e}),zv[t.type]&&this._model)if(this[av])this._pendingActions.push(t);else{var n=e.silent;bv.call(this,t,n);var r=e.flush;r?this._zr.flush():!1!==r&&_.a.browser.weChat&&this._throttledZrFlush(),_v.call(this,n),wv.call(this,n)}},e.prototype.updateLabelLayout=function(){qy.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed)Ev(this.id);else{var e=t.seriesIndex;0,this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},e.internalField=function(){function t(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))}function e(t){for(var e=[],n=t.currentStates,i=0;i0?{duration:o,delay:n.get("delay"),easing:n.get("easing")}:null;view.eachRendered((function(t){if(t.states&&t.states.emphasis){if(Js(t))return;if(t instanceof ha&&function(t){var e=Ua(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var n=t.states.select||{};e.selectFill=n.style&&n.style.fill||null,e.selectStroke=n.style&&n.style.stroke||null}(t),t.__dirty){var n=t.prevStates;n&&t.useStates(n)}if(r){t.stateTransition=l;var o=t.getTextContent(),c=t.getTextGuideLine();o&&(o.stateTransition=l),c&&(c.stateTransition=l)}t.__dirty&&e(t)}}))}fv=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),gv(t,!0),gv(t,!1),e.plan()},gv=function(t,e){for(var n=t._model,r=t._scheduler,o=e?t._componentsViews:t._chartsViews,l=e?t._componentsMap:t._chartsMap,c=t._zr,h=t._api,i=0;ie.get("hoverLayerThreshold")&&!_.a.node&&!_.a.worker&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.eachRendered((function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)}))}}))}(t,e),qy.trigger("series:afterupdate",e,r,h)},Dv=function(t){t[lv]=!0,t.getZr().wakeUp()},kv=function(t){t[lv]&&(t.getZr().storage.traverse((function(t){Js(t)||e(t)})),t[lv]=!1)},Cv=function(t){return new(function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return Object(x.a)(n,e),n.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}},n.prototype.enterEmphasis=function(e,n){Ms(e,n),Dv(t)},n.prototype.leaveEmphasis=function(e,n){Os(e,n),Dv(t)},n.prototype.enterBlur=function(e){Is(e),Dv(t)},n.prototype.leaveBlur=function(e){Ts(e),Dv(t)},n.prototype.enterSelect=function(e){Cs(e),Dv(t)},n.prototype.leaveSelect=function(e){As(e),Dv(t)},n.prototype.getModel=function(){return t.getModel()},n.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},n.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},n}(kc))(t)},Av=function(t){function e(t,e){for(var i=0;i=0)){gm.push(n);var l=Ng.wrapStageHandler(n,o);l.__prio=e,l.__raw=n,t.push(l)}}function vm(t,e){Wv[t]=e}function mm(t){Object(Wn.e)({createCanvas:t})}function xm(t,e,n){var r=$y("registerMap");r&&r(t,e,n)}function bm(t){var e=$y("getMap");return e&&e(t)}var _m=function(t){var e=(t=Object(w.clone)(t)).type;e||Sc("");var n=e.split(":");2!==n.length&&Sc("");var r=!1;"echarts"===n[0]&&(e=n[1],r=!0),t.__isBuiltIn=r,Kh.set(e,t)};fm(nv,gg),fm(rv,vg),fm(rv,mg),fm(nv,Ug),fm(rv,Zg),fm(7e3,(function(t,e){t.eachRawSeries((function(n){if(!t.isSeriesFiltered(n)){var data=n.getData();data.hasItemVisual()&&data.each((function(t){var n=data.getItemVisual(t,"decal");n&&(data.ensureUniqueItemVisual(t,"style").decal=Yy(n,e))}));var r=data.getVisual("decal");if(r)data.getVisual("style").decal=Yy(r,e)}}))})),om(rh),am(900,(function(t){var e=Object(w.createHashMap)();t.eachSeries((function(t){var n=t.get("stack");if(n){var r=e.get(n)||e.set(n,[]),data=t.getData(),o={stackResultDimension:data.getCalculationInfo("stackResultDimension"),stackedOverDimension:data.getCalculationInfo("stackedOverDimension"),stackedDimension:data.getCalculationInfo("stackedDimension"),stackedByDimension:data.getCalculationInfo("stackedByDimension"),isStackedByIndex:data.getCalculationInfo("isStackedByIndex"),data:data,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;r.length&&data.setCalculationInfo("stackedOnSeries",r[r.length-1].seriesModel),r.push(o)}})),e.each(oh)})),vm("default",(function(t,e){e=e||{},w.defaults(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new pi,mask=new Ia({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(mask);var r,o=new Ga({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),l=new Ia({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(l),e.showSpinner&&((r=new of({shape:{startAngle:-xg/2,endAngle:-xg/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*xg/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*xg/2}).delay(300).start("circularInOut"),n.add(r)),n.resize=function(){var n=o.getBoundingRect().width,c=e.showSpinner?e.spinnerRadius:0,h=(t.getWidth()-2*c-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner&&n?0:5+n/2)+(e.showSpinner?0:n/2)+(n?0:c),d=t.getHeight()/2;e.showSpinner&&r.setShape({cx:h,cy:d}),l.setShape({x:h-c,y:d-c,width:2*c,height:2*c}),mask.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n})),cm({type:ns,event:ns,update:ns},w.noop),cm({type:is,event:is,update:is},w.noop),cm({type:rs,event:rs,update:rs},w.noop),cm({type:os,event:os,update:os},w.noop),cm({type:as,event:as,update:as},w.noop),rm("light",Eg),rm("dark",Hg);var wm={},Sm=[],Mm={registerPreprocessor:om,registerProcessor:am,registerPostInit:sm,registerPostUpdate:lm,registerUpdateLifecycle:um,registerAction:cm,registerCoordinateSystem:hm,registerLayout:pm,registerVisual:fm,registerTransform:_m,registerLoading:vm,registerMap:xm,registerImpl:function(t,e){Ky[t]=e},PRIORITY:ov,ComponentModel:Uu,ComponentView:Xd,SeriesModel:Wd,ChartView:ig,registerComponentModel:function(t){Uu.registerClass(t)},registerComponentView:function(t){Xd.registerClass(t)},registerSeriesModel:function(t){Wd.registerClass(t)},registerChartView:function(t){ig.registerClass(t)},registerSubTypeDefaulter:function(t,e){Uu.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){_i(t,e)}};function use(t){Object(w.isArray)(t)?Object(w.each)(t,(function(t){use(t)})):Object(w.indexOf)(Sm,t)>=0||(Sm.push(t),Object(w.isFunction)(t)&&(t={install:t}),t.install(Mm))}function Om(t){return null==t?0:t.length||1}function Im(t){return t}var Tm=function(){function t(t,e,n,r,o,l){this._old=t,this._new=e,this._oldKeyGetter=n||Im,this._newKeyGetter=r||Im,this.context=o,this._diffModeMultiple="multiple"===l}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},r=new Array(t.length),o=new Array(e.length);this._initIndexMap(t,null,r,"_oldKeyGetter"),this._initIndexMap(e,n,o,"_newKeyGetter");for(var i=0;i1){var d=c.shift();1===c.length&&(n[l]=c[0]),this._update&&this._update(d,i)}else 1===h?(n[l]=null,this._update&&this._update(c,i)):this._remove&&this._remove(i)}this._performRestAdd(o,n)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},r={},o=[],l=[];this._initIndexMap(t,n,o,"_oldKeyGetter"),this._initIndexMap(e,r,l,"_newKeyGetter");for(var i=0;i1&&1===y)this._updateManyToOne&&this._updateManyToOne(d,h),r[c]=null;else if(1===f&&y>1)this._updateOneToMany&&this._updateOneToMany(d,h),r[c]=null;else if(1===f&&1===y)this._update&&this._update(d,h),r[c]=null;else if(f>1&&y>1)this._updateManyToMany&&this._updateManyToMany(d,h),r[c]=null;else if(f>1)for(var v=0;v1)for(var l=0;l30}var Vm,Bm,Fm,Gm,Hm,Wm,Ym,Xm=w.isObject,Um=w.map,Zm="undefined"==typeof Int32Array?Array:Int32Array,qm=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],Km=["_approximateExtent"],$m=function(){function t(t,e){var n;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var r=!1;Nm(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(r=!0,n=t),n=n||["x","y"];for(var o={},l=[],c={},h=!1,d={},i=0;i=e)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,o=this._idList;if(n.getSource().sourceFormat===Ju&&!n.pure)for(var l=[],c=t;c0},t.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,r=n[t];r||(r=n[t]={});var o=r[e];return null==o&&(o=this.getVisual(e),w.isArray(o)?o=o.slice():Xm(o)&&(o=w.extend({},o)),r[e]=o),o},t.prototype.setItemVisual=function(t,e,n){var r=this._itemVisuals[t]||{};this._itemVisuals[t]=r,Xm(e)?w.extend(r,e):r[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){Xm(t)?w.extend(this._layout,t):this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?w.extend(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;Wa(n,this.dataType,t,e),this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){w.each(this._graphicEls,(function(n,r){n&&t&&t.call(e,n,r)}))},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:Um(this.dimensions,this._getDimInfo,this),this.hostModel)),Hm(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(t,e){var n=this[t];w.isFunction(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(w.slice(arguments)))})},t.internalField=(Vm=function(data){var t=data._invertedIndicesMap;w.each(t,(function(e,n){var r=data._dimInfos[n],o=r.ordinalMeta,l=data._store;if(o){e=t[n]=new Zm(o.categories.length);for(var i=0;i1&&(c+="__ec__"+d),n[t]=c}})),t}(),Jm=$m;function Qm(source,t){return tx(source,t).dimensions}function tx(source,t){dh(source)||(source=fh(source));var e=(t=t||{}).coordDimensions||[],n=t.dimensionsDefine||source.dimensionsDefine||[],r=Object(w.createHashMap)(),o=[],l=function(source,t,e,n){var r=Math.max(source.dimensionsDetectedCount||1,t.length,e.length,n||0);return Object(w.each)(t,(function(t){var e;Object(w.isObject)(t)&&(e=t.dimsDef)&&(r=Math.max(r,e.length))})),r}(source,e,n,t.dimensionsCount),c=t.canOmitUnusedDimensions&&zm(l),h=n===source.dimensionsDefine,d=h?Em(source):Rm(n),f=t.encodeDefine;!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(source,l));for(var y=Object(w.createHashMap)(f),v=new rd(l),i=0;i0&&(n.name=r+(o-1)),o++,e.set(r,o)}}(o),new Pm({source:source,dimensions:o,fullDimensionCount:l,dimensionOmitted:c})}function ex(t,map,e){if(e||map.hasKey(t)){for(var i=0;map.hasKey(t+i);)i++;t+=i}return map.set(t,!0),t}var nx=function(t){this.coordSysDims=[],this.axisMap=Object(w.createHashMap)(),this.categoryAxisMap=Object(w.createHashMap)(),this.coordSysName=t};var ix={cartesian2d:function(t,e,n,r){var o=t.getReferringComponents("xAxis",vr).models[0],l=t.getReferringComponents("yAxis",vr).models[0];e.coordSysDims=["x","y"],n.set("x",o),n.set("y",l),rx(o)&&(r.set("x",o),e.firstCategoryDimIndex=0),rx(l)&&(r.set("y",l),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,r){var o=t.getReferringComponents("singleAxis",vr).models[0];e.coordSysDims=["single"],n.set("single",o),rx(o)&&(r.set("single",o),e.firstCategoryDimIndex=0)},polar:function(t,e,n,r){var o=t.getReferringComponents("polar",vr).models[0],l=o.findAxisModel("radiusAxis"),c=o.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",l),n.set("angle",c),rx(l)&&(r.set("radius",l),e.firstCategoryDimIndex=0),rx(c)&&(r.set("angle",c),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,n,r){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,r){var o=t.ecModel,l=o.getComponent("parallel",t.get("parallelIndex")),c=e.coordSysDims=l.dimensions.slice();Object(w.each)(l.parallelAxisIndex,(function(t,l){var h=o.getComponent("parallelAxis",t),d=c[l];n.set(d,h),rx(h)&&(r.set(d,h),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=l))}))}};function rx(t){return"category"===t.get("type")}function ox(t,e,n){var r,o,l,c=(n=n||{}).byIndex,h=n.stackedCoordDimension;!function(t){return!Nm(t.schema)}(e)?(o=e.schema,r=o.dimensions,l=e.store):r=e;var d,f,y,v,m=!(!t||!t.get("stack"));if(Object(w.each)(r,(function(t,e){Object(w.isString)(t)&&(r[e]=t={name:t}),m&&!t.isExtraCoord&&(c||d||!t.ordinalMeta||(d=t),f||"ordinal"===t.type||"time"===t.type||h&&h!==t.coordDim||(f=t))})),!f||c||d||(c=!0),f){y="__\0ecstackresult_"+t.id,v="__\0ecstackedover_"+t.id,d&&(d.createInvertedIndices=!0);var x=f.coordDim,_=f.type,S=0;Object(w.each)(r,(function(t){t.coordDim===x&&S++}));var M={name:y,coordDim:x,coordDimIndex:S,type:_,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length},O={name:v,coordDim:v,coordDimIndex:S+1,type:_,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length+1};o?(l&&(M.storeDimIndex=l.ensureCalculationDimension(v,_),O.storeDimIndex=l.ensureCalculationDimension(y,_)),o.appendCalculationDimension(M),o.appendCalculationDimension(O)):(r.push(M),r.push(O))}return{stackedDimension:f&&f.name,stackedByDimension:d&&d.name,isStackedByIndex:c,stackedOverDimension:v,stackResultDimension:y}}function ax(data,t){return!!t&&t===data.getCalculationInfo("stackedDimension")}function sx(data,t){return ax(data,t)?data.getCalculationInfo("stackResultDimension"):t}var lx=function(t,e,n){n=n||{};var source,r=e.getSourceManager(),o=!1;t?(o=!0,source=fh(t)):o=(source=r.getSource()).sourceFormat===Ju;var l=function(t){var e=t.get("coordinateSystem"),n=new nx(e),r=ix[e];if(r)return r(t,n,n.axisMap,n.categoryAxisMap),n}(e),c=function(t,e){var n,r=t.get("coordinateSystem"),o=Pc.get(r);return e&&e.coordSysDims&&(n=w.map(e.coordSysDims,(function(t){var n={name:t},r=e.axisMap.get(t);if(r){var o=r.get("type");n.type=Dm(o)}return n}))),n||(n=o&&(o.getDimensionsInfo?o.getDimensionsInfo():o.dimensions.slice())||["x","y"]),n}(e,l),h=n.useEncodeDefaulter,d=w.isFunction(h)?h:h?w.curry(lc,c,e):null,f=tx(source,{coordDimensions:c,generateCoord:n.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:d,canOmitUnusedDimensions:!o}),y=function(t,e,n){var r,o;return n&&w.each(t,(function(t,l){var c=t.coordDim,h=n.categoryAxisMap.get(c);h&&(null==r&&(r=l),t.ordinalMeta=h.getOrdinalMeta(),e&&(t.createInvertedIndices=!0)),null!=t.otherDims.itemName&&(o=!0)})),o||null==r||(t[r].otherDims.itemName=0),r}(f.dimensions,n.createInvertedIndices,l),v=o?null:r.getSharedDataStore(f),m=ox(e,{schema:f,store:v}),data=new Jm(f,e);data.setCalculationInfo(m);var x=null!=y&&function(source){if(source.sourceFormat===Ju){var t=function(t){var i=0;for(;ie[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(data,t){this.unionExtent(data.getApproximateExtent(t))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();jr(ux);var cx=ux,hx=0;function dx(t){return Object(w.isObject)(t)&&null!=t.value?t.value:t+""}var px=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++hx}return t.createByAxisModel=function(e){var option=e.option,data=option.data,n=data&&Object(w.map)(data,dx);return new t({categories:n,needCollect:!n,deduplication:!1!==option.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!Object(w.isString)(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var map=this._getOrCreateMap();return null==(e=map.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,map.set(t,e)):e=NaN),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=Object(w.createHashMap)(this.categories))},t}();function fx(t){return"interval"===t.type||"log"===t.type}function gx(t,e,n,r){var o={},span=t[1]-t[0],l=o.interval=Gi(span/e,!0);null!=n&&lr&&(l=o.interval=r);var c=o.intervalPrecision=vx(l);return function(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),mx(t,0,e),mx(t,1,e),t[0]>t[1]&&(t[0]=t[1])}(o.niceTickExtent=[Ti(Math.ceil(t[0]/l)*l,c),Ti(Math.floor(t[1]/l)*l,c)],t),o}function yx(t){var e=Math.pow(10,Fi(t)),n=t/e;return n?2===n?n=3:3===n?n=5:n*=2:n=1,Ti(n*e)}function vx(t){return Ai(t)+2}function mx(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function xx(t,e){return t>=e[0]&&t<=e[1]}function bx(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function _x(t,e){return t*(e[1]-e[0])+e[0]}var wx=function(t){function e(e){var n=t.call(this,e)||this;n.type="ordinal";var r=n.getSetting("ordinalMeta");return r||(r=new px({})),Object(w.isArray)(r)&&(r=new px({categories:Object(w.map)(r,(function(t){return Object(w.isObject)(t)?t.value:t}))})),n._ordinalMeta=r,n._extent=n.getSetting("extent")||[0,r.categories.length-1],n}return Object(x.a)(e,t),e.prototype.parse=function(t){return null==t?NaN:Object(w.isString)(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return xx(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},e.prototype.normalize=function(t){return bx(t=this._getTickNumber(this.parse(t)),this._extent)},e.prototype.scale=function(t){return t=Math.round(_x(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],o=0,l=this._ordinalMeta.categories.length,c=Math.min(l,e.length);o=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(cx);cx.registerClass(wx);var Sx=wx,Mx=Ti,Ox=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return Object(x.a)(e,t),e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return xx(t,this._extent)},e.prototype.normalize=function(t){return bx(t,this._extent)},e.prototype.scale=function(t){return _x(t,this._extent)},e.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},e.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=vx(t)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,r=this._niceExtent,o=this._intervalPrecision,l=[];if(!e)return l;n[0]1e4)return[];var h=l.length?l[l.length-1].value:r[1];return n[1]>h&&(t?l.push({value:Mx(h+e,o)}):l.push({value:n[1]})),l},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],r=this.getExtent(),i=1;ir[0]&&f0&&(l=null===l?h:Math.min(l,h))}n[r]=l}}return n}(t),n=[];return Object(w.each)(t,(function(t){var r,o=t.coordinateSystem.getBaseAxis(),l=o.getExtent();if("category"===o.type)r=o.getBandWidth();else if("value"===o.type||"time"===o.type){var c=o.dim+"_"+o.index,h=e[c],d=Math.abs(l[1]-l[0]),f=o.scale.getExtent(),y=Math.abs(f[1]-f[0]);r=h?d/y*h:d}else{var data=t.getData();r=Math.abs(l[1]-l[0])/data.count()}var v=Ii(t.get("barWidth"),r),m=Ii(t.get("barMaxWidth"),r),x=Ii(t.get("barMinWidth")||(Vx(t)?.5:1),r),_=t.get("barGap"),w=t.get("barCategoryGap");n.push({bandWidth:r,barWidth:v,barMaxWidth:m,barMinWidth:x,barGap:_,barCategoryGap:w,axisKey:Lx(o),stackId:kx(t)})})),Nx(n)}function Nx(t){var e={};Object(w.each)(t,(function(t,n){var r=t.axisKey,o=t.bandWidth,l=e[r]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},c=l.stacks;e[r]=l;var h=t.stackId;c[h]||l.autoWidthCount++,c[h]=c[h]||{width:0,maxWidth:0};var d=t.barWidth;d&&!c[h].width&&(c[h].width=d,d=Math.min(l.remainedWidth,d),l.remainedWidth-=d);var f=t.barMaxWidth;f&&(c[h].maxWidth=f);var y=t.barMinWidth;y&&(c[h].minWidth=y);var v=t.barGap;null!=v&&(l.gap=v);var m=t.barCategoryGap;null!=m&&(l.categoryGap=m)}));var n={};return Object(w.each)(e,(function(t,e){n[e]={};var r=t.stacks,o=t.bandWidth,l=t.categoryGap;if(null==l){var c=Object(w.keys)(r).length;l=Math.max(35-4*c,15)+"%"}var h=Ii(l,o),d=Ii(t.gap,1),f=t.remainedWidth,y=t.autoWidthCount,v=(f-h)/(y+(y-1)*d);v=Math.max(v,0),Object(w.each)(r,(function(t){var e=t.maxWidth,n=t.minWidth;if(t.width){r=t.width;e&&(r=Math.min(r,e)),n&&(r=Math.max(r,n)),t.width=r,f-=r+d*r,y--}else{var r=v;e&&er&&(r=n),r!==v&&(t.width=r,f-=r+d*r,y--)}})),v=(f-h)/(y+(y-1)*d),v=Math.max(v,0);var m,x=0;Object(w.each)(r,(function(t,e){t.width||(t.width=v),m=t,x+=t.width*(1+d)})),m&&(x-=m.width*d);var _=-x/2;Object(w.each)(r,(function(t,r){n[e][r]=n[e][r]||{bandWidth:o,offset:_,width:t.width},_+=t.width*(1+d)}))})),n}function Rx(t,e){var n=jx(t,e),r=Px(n);Object(w.each)(n,(function(t){var data=t.getData(),e=t.coordinateSystem.getBaseAxis(),n=kx(t),o=r[Lx(e)][n],l=o.offset,c=o.width;data.setLayout({bandWidth:o.bandWidth,offset:l,size:c})}))}function Ex(t){return{seriesType:t,plan:Ud(),reset:function(t){if(zx(t)){var data=t.getData(),e=t.coordinateSystem,n=e.getBaseAxis(),r=e.getOtherAxis(n),o=data.getDimensionIndex(data.mapDimension(r.dim)),l=data.getDimensionIndex(data.mapDimension(n.dim)),c=t.get("showBackground",!0),h=data.mapDimension(r.dim),d=data.getCalculationInfo("stackResultDimension"),f=ax(data,h)&&!!data.getCalculationInfo("stackedOnSeries"),y=r.isHorizontal(),v=function(t,e){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}(0,r),m=Vx(t),x=t.get("barMinHeight")||0,_=d&&data.getDimensionIndex(d),w=data.getLayout("size"),S=data.getLayout("offset");return{progress:function(t,data){for(var n,r=t.count,h=m&&Ax(3*r),d=m&&c&&Ax(3*r),M=m&&Ax(r),O=e.master.getRect(),I=y?O.width:O.height,T=data.getStore(),C=0;null!=(n=t.next());){var A=T.get(f?_:o,n),D=T.get(l,n),k=v,L=void 0;f&&(L=+A-T.get(o,n));var j=void 0,P=void 0,N=void 0,R=void 0;if(y){var E=e.dataToPoint([A,D]);if(f)k=e.dataToPoint([L,D])[0];j=k,P=E[1]+S,N=E[0]-k,R=w,Math.abs(N)0)for(var i=0;i=0;--i)if(c[h]){template=c[h];break}template=template||l.none}if(w.isArray(template)){var d=null==t.level?0:t.level>=0?t.level:template.length+t.level;template=template[d=Math.min(d,template.length-1)]}}return ou(new Date(t.value),template,o,r)}(t,e,n,this.getSetting("locale"),r)},e.prototype.getTicks=function(){var t=this._interval,e=this._extent,n=[];if(!t)return n;n.push({value:e[0],level:0});var r=this.getSetting("useUTC"),o=function(t,e,n,r){var o=1e4,l=eu,c=0;function h(t,e,n,o,l,c,h){for(var d=new Date(e),f=e,y=d[o]();f1&&0===i&&l.unshift({value:l[0].value-v})}}for(i=0;i=r[0]&&M<=r[1]&&v++)}var O=(r[1]-r[0])/e;if(v>1.5*O&&m>O/1.5)break;if(f.push(_),v>O||t===l[i])break}y=[]}}0;var I=Object(w.filter)(Object(w.map)(f,(function(t){return Object(w.filter)(t,(function(t){return t.value>=r[0]&&t.value<=r[1]&&!t.notAdd}))})),(function(t){return t.length>0})),T=[],C=I.length-1;for(i=0;in&&(this._approxInterval=n);var o=Fx.length,l=Math.min(function(a,t,e,n){for(;e>>1;a[r][1]16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function Hx(t){return(t/=30*ql)>6?6:t>3?3:t>2?2:1}function Wx(t){return(t/=Zl)>12?12:t>6?6:t>3.5?4:t>2?2:1}function Yx(t,e){return(t/=e?Ul:Xl)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function Xx(t){return Gi(t,!0)}function Ux(t,e,n){var r=new Date(t);switch(iu(e)){case"year":case"month":r[yu(n)](0);case"day":r[vu(n)](1);case"hour":r[mu(n)](0);case"minute":r[xu(n)](0);case"second":r[bu(n)](0),r[_u(n)](0)}return r.getTime()}cx.registerClass(Bx);var Zx=Bx,qx=cx.prototype,Kx=Ix.prototype,$x=Ti,Jx=Math.floor,Qx=Math.ceil,tb=Math.pow,eb=Math.log,nb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new Ix,e._interval=0,e}return Object(x.a)(e,t),e.prototype.getTicks=function(t){var e=this._originalScale,n=this._extent,r=e.getExtent(),o=Kx.getTicks.call(this,t);return w.map(o,(function(t){var e=t.value,o=Ti(tb(this.base,e));return o=e===n[0]&&this._fixMin?rb(o,r[0]):o,{value:o=e===n[1]&&this._fixMax?rb(o,r[1]):o}}),this)},e.prototype.setExtent=function(t,e){var base=eb(this.base);t=eb(Math.max(0,t))/base,e=eb(Math.max(0,e))/base,Kx.setExtent.call(this,t,e)},e.prototype.getExtent=function(){var base=this.base,t=qx.getExtent.call(this);t[0]=tb(base,t[0]),t[1]=tb(base,t[1]);var e=this._originalScale.getExtent();return this._fixMin&&(t[0]=rb(t[0],e[0])),this._fixMax&&(t[1]=rb(t[1],e[1])),t},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var base=this.base;t[0]=eb(t[0])/eb(base),t[1]=eb(t[1])/eb(base),qx.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(data,t){this.unionExtent(data.getApproximateExtent(t))},e.prototype.calcNiceTicks=function(t){t=t||10;var e=this._extent,span=e[1]-e[0];if(!(span===1/0||span<=0)){var n=Bi(span);for(t/span*n<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var r=[Ti(Qx(e[0]/n)*n),Ti(Jx(e[1]/n)*n)];this._interval=n,this._niceExtent=r}},e.prototype.calcNiceExtent=function(t){Kx.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return xx(t=eb(t)/eb(this.base),this._extent)},e.prototype.normalize=function(t){return bx(t=eb(t)/eb(this.base),this._extent)},e.prototype.scale=function(t){return t=_x(t,this._extent),tb(this.base,t)},e.type="log",e}(cx),ib=nb.prototype;function rb(t,e){return $x(t,Ai(e))}ib.getMinorTicks=Kx.getMinorTicks,ib.getLabel=Kx.getLabel,cx.registerClass(nb);var ob=nb,ab=function(){function t(t,e,n){this._prepareParams(t,e,n)}return t.prototype._prepareParams=function(t,e,n){n[1]0&&c>0&&!h&&(l=0),l<0&&c<0&&!d&&(c=0));var y=this._determinedMin,v=this._determinedMax;return null!=y&&(l=y,h=!0),null!=v&&(c=v,d=!0),{min:l,max:c,minFixed:h,maxFixed:d,isBlank:f}},t.prototype.modifyDataMinMax=function(t,e){this[lb[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){this[sb[t]]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),sb={min:"_determinedMin",max:"_determinedMax"},lb={min:"_dataMin",max:"_dataMax"};function ub(t,e,n){var r=t.rawExtentInfo;return r||(r=new ab(t,e,n),t.rawExtentInfo=r,r)}function cb(t,e){return null==e?null:Object(w.eqNaN)(e)?NaN:t.parse(e)}function hb(t,e){var n=t.type,r=ub(t,e,t.getExtent()).calculate();t.setBlank(r.isBlank);var o=r.min,l=r.max,c=e.ecModel;if(c&&"time"===n){var h=jx("bar",c),d=!1;if(w.each(h,(function(t){d=d||t.getBaseAxis()===e.axis})),d){var f=Px(h),y=function(t,e,n,r){var o=n.axis.getExtent(),l=o[1]-o[0],c=function(t,e,n){if(t&&e){var r=t[Lx(e)];return null!=r&&null!=n?r[kx(n)]:r}}(r,n.axis);if(void 0===c)return{min:t,max:e};var h=1/0;w.each(c,(function(t){h=Math.min(t.offset,h)}));var d=-1/0;w.each(c,(function(t){d=Math.max(t.offset+t.width,d)})),h=Math.abs(h),d=Math.abs(d);var f=h+d,y=e-t,v=y/(1-(h+d)/l)-y;return e+=v*(d/f),t-=v*(h/f),{min:t,max:e}}(o,l,e,f);o=y.min,l=y.max}}return{extent:[o,l],fixMin:r.minFixed,fixMax:r.maxFixed}}function db(t,e){var n=e,r=hb(t,n),o=r.extent,l=n.get("splitNumber");t instanceof ob&&(t.base=n.get("logBase"));var c=t.type,h=n.get("interval"),d="interval"===c||"time"===c;t.setExtent(o[0],o[1]),t.calcNiceExtent({splitNumber:l,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:d?n.get("minInterval"):null,maxInterval:d?n.get("maxInterval"):null}),null!=h&&t.setInterval&&t.setInterval(h)}function pb(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Sx({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new Zx({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(cx.getClass(e)||Ix)}}function fb(t){var e,n,r=t.getLabelModel().get("formatter"),o="category"===t.type?t.scale.getExtent()[0]:null;return"time"===t.scale.type?(n=r,function(e,r){return t.scale.getFormattedLabel(e,r,n)}):w.isString(r)?function(e){return function(n){var label=t.scale.getLabel(n);return e.replace("{value}",null!=label?label:"")}}(r):w.isFunction(r)?(e=r,function(n,r){return null!=o&&(r=n.value-o),e(gb(t,n),r,null!=n.level?{level:n.level}:null)}):function(e){return t.scale.getLabel(e)}}function gb(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function yb(t){var e=t.get("interval");return null==e?"auto":e}function vb(t){return"category"===t.type&&0===yb(t.getLabelModel())}function mb(data,t){var e={};return w.each(data.mapDimensionsAll(t),(function(t){e[sx(data,t)]=!0})),w.keys(e)}var xb=function(){function t(){}return t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}();function bb(t){return lx(null,t)}var _b={isDimensionStacked:ax,enableDataStack:ox,getStackedDimension:sx};function wb(t,option){var e=option;option instanceof Pl||(e=new Pl(option));var n=pb(e);return n.setExtent(t[0],t[1]),db(n,e),n}function Sb(t){w.mixin(t,xb)}function Mb(t,e){return cl(t,null,null,"normal"!==(e=e||{}).state)}var Ob=1e-8;function Ib(a,b){return Math.abs(a-b)n&&(t=r,n=l)}if(t)return function(t){for(var e=0,n=0,r=0,o=t.length,l=t[o-1][0],c=t[o-1][1],i=0;i>1^-(1&c),h=h>>1^-(1&h),o=c+=o,l=h+=l,r.push([c/n,h/n])}return r}function zb(t,e){return t=function(t){if(!t.UTF8Encoding)return t;var e=t,n=e.UTF8Scale;null==n&&(n=1024);var r=e.features;return w.each(r,(function(t){var e=t.geometry,r=e.encodeOffsets,o=e.coordinates;if(r)switch(e.type){case"LineString":e.coordinates=Eb(o,r,n);break;case"Polygon":case"MultiLineString":Rb(o,r,n);break;case"MultiPolygon":w.each(o,(function(t,e){return Rb(t,r[e],n)}))}})),e.UTF8Encoding=!1,e}(t),w.map(w.filter(t.features,(function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0})),(function(t){var n=t.properties,r=t.geometry,o=[];switch(r.type){case"Polygon":var l=r.coordinates;o.push(new Lb(l[0],l.slice(1)));break;case"MultiPolygon":w.each(r.coordinates,(function(t){t[0]&&o.push(new Lb(t[0],t.slice(1)))}));break;case"LineString":o.push(new jb([r.coordinates]));break;case"MultiLineString":o.push(new jb(r.coordinates))}var c=new Pb(n[e||"name"],o,n.cp);return c.properties=n,c}))}function Vb(text,t,e,n,r,o,l,c){return new Ga({style:{text:text,font:t,align:e,verticalAlign:n,padding:r,rich:o,overflow:l?"truncate":null,lineHeight:c}}).getBoundingRect()}var Bb=pr();function Fb(t){return"category"===t.type?function(t){var e=t.getLabelModel(),n=Hb(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(t):function(t){var e=t.scale.getTicks(),n=fb(t);return{labels:w.map(e,(function(e,r){return{level:e.level,formattedLabel:n(e,r),rawLabel:t.scale.getLabel(e),tickValue:e.value}}))}}(t)}function Gb(t,e){return"category"===t.type?function(t,e){var n,r,o=Wb(t,"ticks"),l=yb(e),c=Yb(o,l);if(c)return c;e.get("show")&&!t.scale.isBlank()||(n=[]);if(w.isFunction(l))n=Zb(t,l,!0);else if("auto"===l){var h=Hb(t,t.getLabelModel());r=h.labelCategoryInterval,n=w.map(h.labels,(function(t){return t.tickValue}))}else n=Ub(t,r=l,!0);return Xb(o,l,{ticks:n,tickCategoryInterval:r})}(t,e):{ticks:w.map(t.scale.getTicks(),(function(t){return t.value}))}}function Hb(t,e){var n,r,o=Wb(t,"labels"),l=yb(e),c=Yb(o,l);return c||(w.isFunction(l)?n=Zb(t,l):(r="auto"===l?function(t){var e=Bb(t).autoInterval;return null!=e?e:Bb(t).autoInterval=t.calculateCategoryInterval()}(t):l,n=Ub(t,r)),Xb(o,l,{labels:n,labelCategoryInterval:r}))}function Wb(t,e){return Bb(t)[e]||(Bb(t)[e]=[])}function Yb(t,e){for(var i=0;i1&&y/d>2&&(f=Math.round(Math.ceil(f/d)*d));var v=vb(t),m=c.get("showMinLabel")||v,x=c.get("showMaxLabel")||v;m&&f!==l[0]&&w(l[0]);for(var _=f;_<=l[1];_+=d)w(_);function w(t){var e={value:t};h.push(n?t:{formattedLabel:r(e),rawLabel:o.getLabel(e),tickValue:t})}return x&&_-d!==l[1]&&w(l[1]),h}function Zb(t,e,n){var r=t.scale,o=fb(t),l=[];return w.each(r.getTicks(),(function(t){var c=r.getLabel(t),h=t.value;e(t.value,c)&&l.push(n?h:{formattedLabel:o(t),rawLabel:c,tickValue:h})})),l}var qb=[0,1];function Kb(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}var $b=function(){function t(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),r=Math.max(e[0],e[1]);return t>=n&&t<=r},t.prototype.containData=function(data){return this.scale.contain(data)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return ki(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.dataToCoord=function(data,t){var e=this._extent,n=this.scale;return data=n.normalize(data),this.onBand&&"ordinal"===n.type&&Kb(e=e.slice(),n.count()),Oi(data,qb,e,t)},t.prototype.coordToData=function(t,e){var n=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&Kb(n=n.slice(),r.count());var o=Oi(t,n,qb,e);return this.scale.scale(o)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=Gb(this,e).ticks,r=Object(w.map)(n,(function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}}),this);return function(t,e,n,r){var o=e.length;if(!t.onBand||n||!o)return;var l,c,h=t.getExtent();if(1===o)e[0].coord=h[0],l=e[1]={coord:h[0]};else{var d=e[o-1].tickValue-e[0].tickValue,f=(e[o-1].coord-e[0].coord)/d;Object(w.each)(e,(function(t){t.coord-=f/2})),c=1+t.scale.getExtent()[1]-e[o-1].tickValue,l={coord:e[o-1].coord+f*c},e.push(l)}var y=h[0]>h[1];v(e[0].coord,h[0])&&(r?e[0].coord=h[0]:e.shift());r&&v(h[0],e[0].coord)&&e.unshift({coord:h[0]});v(h[1],l.coord)&&(r?l.coord=h[1]:e.pop());r&&v(l.coord,h[1])&&e.push({coord:h[1]});function v(a,b){return a=Ti(a),b=Ti(b),y?a>b:a0&&t<100||(t=5);var e=this.scale.getMinorTicks(t);return Object(w.map)(e,(function(t){return Object(w.map)(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},t.prototype.getViewLabels=function(){return Fb(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var r=Math.abs(t[1]-t[0]);return Math.abs(r)/n},t.prototype.calculateCategoryInterval=function(){return function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),n=fb(t),r=(e.axisRotate-e.labelRotate)/180*Math.PI,o=t.scale,l=o.getExtent(),c=o.count();if(l[1]-l[0]<1)return 0;var h=1;c>40&&(h=Math.max(1,Math.floor(c/40)));for(var d=l[0],f=t.dataToCoord(d+1)-t.dataToCoord(d),y=Math.abs(f*Math.cos(r)),v=Math.abs(f*Math.sin(r)),m=0,x=0;d<=l[1];d+=h){var _,w,rect=Zn(n({value:d}),e.font,"center","top");_=1.3*rect.width,w=1.3*rect.height,m=Math.max(m,_,7),x=Math.max(x,w,7)}var S=m/y,M=x/v;isNaN(S)&&(S=1/0),isNaN(M)&&(M=1/0);var O=Math.max(0,Math.floor(Math.min(S,M))),I=Bb(t.model),T=t.getExtent(),C=I.lastAutoInterval,A=I.lastTickCount;return null!=C&&null!=A&&Math.abs(C-O)<=1&&Math.abs(A-c)<=1&&C>O&&I.axisExtent0===T[0]&&I.axisExtent1===T[1]?O=C:(I.lastTickCount=c,I.lastAutoInterval=O,I.axisExtent0=T[0],I.axisExtent1=T[1]),O}(this)},t}();function Jb(t){var e=Uu.extend(t);return Uu.registerClass(e),e}function Qb(t){var e=Xd.extend(t);return Xd.registerClass(e),e}function t_(t){var e=Wd.extend(t);return Wd.registerClass(e),e}function e_(t){var e=ig.extend(t);return ig.registerClass(e),e}var n_=2*Math.PI,i_=Wo.CMD,r_=["top","right","bottom","left"];function o_(t,e,rect,n,r){var o=rect.width,l=rect.height;switch(t){case"top":n.set(rect.x+o/2,rect.y-e),r.set(0,-1);break;case"bottom":n.set(rect.x+o/2,rect.y+l+e),r.set(0,1);break;case"left":n.set(rect.x-e,rect.y+l/2),r.set(-1,0);break;case"right":n.set(rect.x+o+e,rect.y+l/2),r.set(1,0)}}function a_(t,e,n,r,o,l,c,h,d){c-=t,h-=e;var f=Math.sqrt(c*c+h*h),y=(c/=f)*n+t,v=(h/=f)*n+e;if(Math.abs(r-o)%n_<1e-4)return d[0]=y,d[1]=v,f-n;if(l){var m=r;r=qo(o),o=qo(m)}else r=qo(r),o=qo(o);r>o&&(o+=n_);var x=Math.atan2(h,c);if(x<0&&(x+=n_),x>=r&&x<=o||x+n_>=r&&x+n_<=o)return d[0]=y,d[1]=v,f-n;var _=n*Math.cos(r)+t,w=n*Math.sin(r)+e,S=n*Math.cos(o)+t,M=n*Math.sin(o)+e,O=(_-c)*(_-c)+(w-h)*(w-h),I=(S-c)*(S-c)+(M-h)*(M-h);return O0){e=e/180*Math.PI,d_.fromArray(t[0]),p_.fromArray(t[1]),f_.fromArray(t[2]),kt.sub(g_,d_,p_),kt.sub(y_,f_,p_);var n=g_.len(),r=y_.len();if(!(n<.001||r<.001)){g_.scale(1/n),y_.scale(1/r);var o=g_.dot(y_);if(Math.cos(e)1&&kt.copy(x_,f_),x_.toArray(t[1])}}}}function __(t,e,n){if(n<=180&&n>0){n=n/180*Math.PI,d_.fromArray(t[0]),p_.fromArray(t[1]),f_.fromArray(t[2]),kt.sub(g_,p_,d_),kt.sub(y_,f_,p_);var r=g_.len(),o=y_.len();if(!(r<.001||o<.001))if(g_.scale(1/r),y_.scale(1/o),g_.dot(e)=c)kt.copy(x_,f_);else{x_.scaleAndAdd(y_,l/Math.tan(Math.PI/2-h));var d=f_.x!==p_.x?(x_.x-p_.x)/(f_.x-p_.x):(x_.y-p_.y)/(f_.y-p_.y);if(isNaN(d))return;d<0?kt.copy(x_,p_):d>1&&kt.copy(x_,f_)}x_.toArray(t[1])}}}function w_(t,e,n,r){var o="normal"===n,l=o?t:t.ensureState(n);l.ignore=e;var c=r.get("smooth");c&&!0===c&&(c=.3),l.shape=l.shape||{},c>0&&(l.shape.smooth=c);var h=r.getModel("lineStyle").getLineStyle();o?t.useStyle(h):l.style=h}function S_(path,t){var e=t.smooth,n=t.points;if(n)if(path.moveTo(n[0][0],n[0][1]),e>0&&n.length>=3){var r=z(n[0],n[1]),o=z(n[1],n[2]);if(!r||!o)return path.lineTo(n[1][0],n[1][1]),void path.lineTo(n[2][0],n[2][1]);var l=Math.min(r,o)*e,c=G([],n[1],n[0],l/r),h=G([],n[1],n[2],l/o),d=G([],c,h,.5);path.bezierCurveTo(c[0],c[1],c[0],c[1],d[0],d[1]),path.bezierCurveTo(h[0],h[1],h[0],h[1],n[2][0],n[2][1])}else for(var i=1;i0&&l&&T(-v/c,0,c);var _,w,S=t[0],M=t[c-1];return O(),_<0&&C(-_,.8),w<0&&C(w,.8),O(),I(_,w,1),I(w,_,-1),O(),_<0&&A(-_),w<0&&A(w),f}function O(){_=S.rect[e]-r,w=o-M.rect[e]-M.rect[n]}function I(t,e,n){if(t<0){var r=Math.min(e,-t);if(r>0){T(r*n,0,c);var o=r+t;o<0&&C(-o*n,1)}else C(-t*n,1)}}function T(n,r,o){0!==n&&(f=!0);for(var i=r;i0)for(i=0;i0;i--){T(-(l[i-1]*y),i,c)}}}function A(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(c-1)),i=0;i0?T(n,0,i+1):T(-n,c-i-1,c),(t-=n)<=0)return}}function C_(t,e,n,r){return T_(t,"y","height",e,n,r)}function A_(t){var e=[];t.sort((function(a,b){return b.priority-a.priority}));var n=new Bt(0,0,0,0);function r(t){if(!t.ignore){var e=t.ensureState("emphasis");null==e.ignore&&(e.ignore=!1)}t.ignore=!0}for(var i=0;i=0&&n.attr(m.oldLayoutSelect),Object(w.indexOf)(d,"emphasis")>=0&&n.attr(m.oldLayoutEmphasis)),Ks(n,h,e,c)}else if(n.attr(h),!ml(n).valueAnimation){var f=Object(w.retrieve2)(n.style.opacity,1);n.style.opacity=0,$s(n,{style:{opacity:f}},e,c)}if(m.oldLayout=h,n.states.select){var y=m.oldLayoutSelect={};R_(y,h,E_),R_(y,n.states.select,E_)}if(n.states.emphasis){var v=m.oldLayoutEmphasis={};R_(v,h,E_),R_(v,n.states.emphasis,E_)}bl(n,c,data,e,e)}if(r&&!r.ignore&&!r.invisible){o=(m=N_(r)).oldLayout;var m,x={points:r.shape.points};o?(r.attr({shape:o}),Ks(r,{shape:x},e)):(r.setShape(x),r.style.strokePercent=0,$s(r,{style:{strokePercent:1}},e)),m.oldLayout=x}},t}(),V_=pr();function B_(t){t.registerUpdateLifecycle("series:beforeupdate",(function(t,e,n){var r=V_(e).labelManager;r||(r=V_(e).labelManager=new z_),r.clearLabels()})),t.registerUpdateLifecycle("series:layoutlabels",(function(t,e,n){var r=V_(e).labelManager;n.updatedSeries.forEach((function(t){r.addLabelsOfSeries(e.getViewOfSeriesModel(t))})),r.updateLayoutConfig(e),r.layout(e),r.processLabelsOverall()}))}function F_(t,e,n){var r=Wn.d.createCanvas(),o=e.getWidth(),l=e.getHeight(),c=r.style;return c&&(c.position="absolute",c.left="0",c.top="0",c.width=o+"px",c.height=l+"px",r.setAttribute("data-zr-dom-id",t)),r.width=o*n,r.height=l*n,r}use(B_);var G_=function(t){function e(e,n,r){var o,l=t.call(this)||this;l.motionBlur=!1,l.lastFrameAlpha=.7,l.dpr=1,l.virtual=!1,l.config={},l.incremental=!1,l.zlevel=0,l.maxRepaintRectCount=5,l.__dirty=!0,l.__firstTimePaint=!0,l.__used=!1,l.__drawIndex=0,l.__startIndex=0,l.__endIndex=0,l.__prevStartIndex=null,l.__prevEndIndex=null,r=r||An,"string"==typeof e?o=F_(e,n,r):w.isObject(e)&&(e=(o=e).id),l.id=e,l.dom=o;var c=o.style;return c&&(w.disableUserSelect(o),o.onselectstart=function(){return!1},c.padding="0",c.margin="0",c.borderWidth="0"),l.painter=n,l.dpr=r,l}return Object(x.a)(e,t),e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=F_("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,e,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o,l=[],c=this.maxRepaintRectCount,h=!1,d=new Bt(0,0,0,0);function f(rect){if(rect.isFinite()&&!rect.isZero())if(0===l.length){(t=new Bt(0,0,0,0)).copy(rect),l.push(t)}else{for(var t,e=!1,n=1/0,r=0,i=0;i=c)}}for(var i=this.__startIndex;i15)break}n.prevElClipPaths&&d.restore()};if(v)if(0===v.length)i=h.__endIndex;else for(var I=m.dpr,T=0;T0&&t>r[0]){for(i=0;it);i++);c=n[r[i]]}if(r.splice(i+1,0,t),n[t]=e,!e.virtual)if(c){var h=c.dom;h.nextSibling?l.insertBefore(e.dom,h.nextSibling):l.appendChild(e.dom)}else l.firstChild?l.insertBefore(e.dom,l.firstChild):l.appendChild(e.dom);e.__painter=this}},t.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i0?Y_:0),this._needsManuallyCompositing),d.__builtin__||w.logError("ZLevel "+h+" has been used by unkown layer "+d.id),d!==o&&(d.__used=!0,d.__startIndex!==i&&(d.__dirty=!0),d.__startIndex=i,d.incremental?d.__drawIndex=-1:d.__drawIndex=i,e(i),o=d),c.__dirty&ae&&!c.__inHover&&(d.__dirty=!0,d.incremental&&d.__drawIndex<0&&(d.__drawIndex=i))}e(i),this.eachBuiltinLayer((function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,w.each(this._layers,(function(t){t.setUnpainted()}))},t.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?w.merge(n[t],e,!0):n[t]=e;for(var i=0;i=K_:-d>=K_),m=d>0?d%K_:d%K_+K_,x=!1;x=!!v||!Object(He.j)(y)&&m>=q_==!!f;var _=t+n*Z_(l),w=e+r*U_(l);this._start&&this._add("M",_,w);var S=Math.round(o*$_);if(v){var p=1/this._p,M=(f?1:-1)*(K_-p);this._add("A",n,r,S,1,+f,t+n*Z_(l+M),e+r*U_(l+M)),p>.01&&this._add("A",n,r,S,0,+f,_,w)}else{var O=t+n*Z_(c),I=e+r*U_(c);this._add("A",n,r,S,+x,+f,O,I)}},t.prototype.rect=function(t,e,n,r){this._add("M",t,e),this._add("l",n,0),this._add("l",0,r),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,a,b,e,n,r,o,g,l){for(var c=[],p=this._p,i=1;i"}(o,e.attrs)+st(e.text)+(r?""+n+Object(w.map)(r,(function(e){return t(e)})).join(n)+n:"")+("")}(t)}function dw(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function pw(t,e,n,r){return cw("svg","root",{width:t,height:e,xmlns:ow,"xmlns:xlink":aw,version:"1.1",baseProfile:"full",viewBox:!!r&&"0 0 "+t+" "+e},n)}var fw={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},gw="transform-origin";function yw(t,e,path){var n=Object(w.extend)({},t.shape);Object(w.extend)(n,e),t.buildPath(path,n);var r=new Q_;return r.reset(Object(He.f)(t)),path.rebuildPath(r,1),r.generateStr(),r.getStr()}function vw(t,e){var n=e.originX,r=e.originY;(n||r)&&(t[gw]=n+"px "+r+"px")}var mw={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function xw(t,e){var n=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[n]=t,n}function bw(t){return Object(w.isString)(t)?fw[t]?"cubic-bezier("+fw[t]+")":Be(t)?t:"":""}function _w(t,e,n,r){var o=t.animators,l=o.length,c=[];if(t instanceof sf){var h=function(t,e,n){var r,o,l=t.shape.paths,c={};if(Object(w.each)(l,(function(path){var t=dw(n.zrId);t.animation=!0,_w(path,{},t,!0);var e=t.cssAnims,l=t.cssNodes,h=Object(w.keys)(e),d=h.length;if(d){var f=e[o=h[d-1]];for(var y in f){var v=f[y];c[y]=c[y]||{d:""},c[y].d+=v.d||""}for(var m in l){var x=l[m].animation;x.indexOf(o)>=0&&(r=x)}}})),r){e.d=!1;var h=xw(c,n);return r.replace(o,h)}}(t,e,n);if(h)c.push(h);else if(!l)return}else if(!l)return;for(var d={},i=0;i0})).length)return xw(f,n)+" "+o[0]+" both"}for(var S in d){(h=_(d[S]))&&c.push(h)}if(c.length){var M=n.zrId+"-cls-"+n.cssClassIdx++;n.cssNodes["."+M]={animation:c.join(",")},e.class=M}}var ww=Math.round;function Sw(t){return t&&Object(w.isString)(t.src)}function Mw(t){return t&&Object(w.isFunction)(t.toDataURL)}function Ow(t,style,e,n){rw((function(r,o){var l="fill"===r||"stroke"===r;l&&Object(He.k)(o)?Pw(style,t,r,n):l&&Object(He.n)(o)?Nw(e,t,r,n):t[r]=o}),style,e,!1),function(t,e,n){var style=t.style;if(Object(He.i)(style)){var r=Object(He.h)(t),o=n.shadowCache,l=o[r];if(!l){var c=t.getGlobalScale(),h=c[0],d=c[1];if(!h||!d)return;var f=style.shadowOffsetX||0,y=style.shadowOffsetY||0,v=style.shadowBlur,m=Object(He.p)(style.shadowColor),x=m.opacity,_=m.color,w=v/2/h+" "+v/2/d;l=n.zrId+"-s"+n.shadowIdx++,n.defs[l]=cw("filter",l,{id:l,x:"-100%",y:"-100%",width:"300%",height:"300%"},[cw("feDropShadow","",{dx:f/h,dy:y/d,stdDeviation:w,"flood-color":_,"flood-opacity":x})]),o[r]=l}e.filter=Object(He.d)(l)}}(e,t,n)}function Iw(t){return Object(He.j)(t[0]-1)&&Object(He.j)(t[1])&&Object(He.j)(t[2])&&Object(He.j)(t[3]-1)}function Tw(t,e,n){if(e&&(!function(t){return Object(He.j)(t[4])&&Object(He.j)(t[5])}(e)||!Iw(e))){var r=n?10:1e4;t.transform=Iw(e)?"translate("+ww(e[4]*r)/r+" "+ww(e[5]*r)/r+")":Object(He.e)(e)}}function Cw(t,e,n){for(var r=t.points,o=[],i=0;id?Jw(t,null==n[v+1]?null:n[v+1].elm,n,h,v):Qw(t,e,c,d))}(n,r,o):Zw(o)?(Zw(t.text)&&Hw(n,""),Jw(n,null,o,0,o.length-1)):Zw(r)?Qw(n,r,0,r.length-1):Zw(t.text)&&Hw(n,""):t.text!==e.text&&(Zw(r)&&Qw(n,r,0,r.length-1),Hw(n,e.text)))}var nS=0;var iS=function(){function t(t,e,n){if(this.type="svg",this.refreshHover=function(){0},this.configLayer=function(){0},this.storage=e,this._opts=n=Object(w.extend)({},n),this.root=t,this._id="zr"+nS++,this._oldVNode=pw(n.width,n.height),t&&!n.ssr){var r=this._viewport=document.createElement("div");r.style.cssText="position:relative;overflow:hidden";var o=this._svgDom=this._oldVNode.elm=uw("svg");tS(null,this._oldVNode),r.appendChild(o),t.appendChild(r)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",function(t,e){if(Kw(t,e))eS(t,e);else{var n=t.elm,r=Fw(n);$w(e),null!==r&&(zw(r,e.elm,Gw(n)),Qw(r,[t],0,0))}}(this._oldVNode,t),this._oldVNode=t}},t.prototype.renderOneToVNode=function(t){return jw(t,dw(this._id))},t.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),n=this._width,r=this._height,o=dw(this._id);o.animation=t.animation,o.willUpdate=t.willUpdate,o.compress=t.compress;var l=[],c=this._bgVNode=function(t,e,n,r){var o;if(n&&"none"!==n)if(o=cw("rect","bg",{width:t,height:e,x:"0",y:"0",id:"0"}),Object(He.k)(n))Pw({fill:n},o.attrs,"fill",r);else if(Object(He.n)(n))Nw({style:{fill:n},dirty:w.noop,getBoundingRect:function(){return{width:t,height:e}}},o.attrs,"fill",r);else{var l=Object(He.p)(n),c=l.color,h=l.opacity;o.attrs.fill=c,h<1&&(o.attrs["fill-opacity"]=h)}return o}(n,r,this._backgroundColor,o);c&&l.push(c);var h=t.compress?null:this._mainVNode=cw("g","main",{},[]);this._paintList(e,o,h?h.children:l),h&&l.push(h);var defs=Object(w.map)(Object(w.keys)(o.defs),(function(t){return o.defs[t]}));if(defs.length&&l.push(cw("defs","defs",{},defs)),t.animation){var d=function(t,e,n){var r=(n=n||{}).newline?"\n":"",o=" {"+r,l=r+"}",c=Object(w.map)(Object(w.keys)(t),(function(e){return e+o+Object(w.map)(Object(w.keys)(t[e]),(function(n){return n+":"+t[e][n]+";"})).join(r)+l})).join(r),h=Object(w.map)(Object(w.keys)(e),(function(t){return"@keyframes "+t+o+Object(w.map)(Object(w.keys)(e[t]),(function(n){return n+o+Object(w.map)(Object(w.keys)(e[t][n]),(function(r){var o=e[t][n][r];return"d"===r&&(o='path("'+o+'")'),r+":"+o+";"})).join(r)+l})).join(r)+l})).join(r);return c||h?[""].join(r):""}(o.cssNodes,o.cssAnims,{newline:!0});if(d){var f=cw("style","stl",{},[],d);l.push(f)}}return pw(n,r,l,t.useViewBox)},t.prototype.renderToString=function(t){return t=t||{},hw(this.renderToVNode({animation:Object(w.retrieve2)(t.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:Object(w.retrieve2)(t.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(t,e,n){for(var r,o,l=t.length,c=[],h=0,d=0,i=0;i=0&&(!y||!o||y[x]!==o[x]);x--);for(var _=m-1;_>x;_--)r=c[--h-1];for(var w=x+1;w-1&&(symbol.style.stroke=symbol.style.fill,symbol.style.fill="#fff",symbol.style.lineWidth=2),e},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(Wd),oS=rS;function aS(data,t){var e=data.mapDimensionsAll("defaultedLabel"),n=e.length;if(1===n){var r=Dh(data,t,e[0]);return null!=r?r+"":null}if(n){for(var o=[],i=0;i=0&&n.push(t[r])}return n.join(" ")}var lS=function(t){function e(data,e,n,r){var o=t.call(this)||this;return o.updateData(data,e,n,r),o}return Object(x.a)(e,t),e.prototype._createSymbol=function(t,data,e,n,r){this.removeAll();var o=fy(t,-1,-1,2,2,null,r);o.attr({z2:100,culling:!0,scaleX:n[0]/2,scaleY:n[1]/2}),o.drift=uS,this._symbolType=t,this.add(o)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){Ms(this.childAt(0))},e.prototype.downplay=function(){Os(this.childAt(0))},e.prototype.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},e.prototype.setDraggable=function(t,e){var n=this.childAt(0);n.draggable=t,n.cursor=!e&&t?"move":n.cursor},e.prototype.updateData=function(data,t,n,r){this.silent=!1;var o=data.getItemVisual(t,"symbol")||"circle",l=data.hostModel,c=e.getSymbolSize(data,t),h=o!==this._symbolType,d=r&&r.disableAnimation;if(h){var f=data.getItemVisual(t,"symbolKeepAspect");this._createSymbol(o,data,t,c,f)}else{(v=this.childAt(0)).silent=!1;var y={scaleX:c[0]/2,scaleY:c[1]/2};d?v.attr(y):Ks(v,y,l,t),nl(v)}if(this._updateCommon(data,t,c,n,r),h){var v=this.childAt(0);if(!d){y={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:v.style.opacity}};v.scaleX=v.scaleY=0,v.style.opacity=0,$s(v,y,l,t)}}d&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(data,t,e,n,r){var o,l,c,h,d,f,y,v,m,x=this.childAt(0),_=data.hostModel;if(n&&(o=n.emphasisItemStyle,l=n.blurItemStyle,c=n.selectItemStyle,h=n.focus,d=n.blurScope,y=n.labelStatesModels,v=n.hoverScale,m=n.cursorStyle,f=n.emphasisDisabled),!n||data.hasItemOption){var S=n&&n.itemModel?n.itemModel:data.getItemModel(t),M=S.getModel("emphasis");o=M.getModel("itemStyle").getItemStyle(),c=S.getModel(["select","itemStyle"]).getItemStyle(),l=S.getModel(["blur","itemStyle"]).getItemStyle(),h=M.get("focus"),d=M.get("blurScope"),f=M.get("disabled"),y=ll(S),v=M.getShallow("scale"),m=S.getShallow("cursor")}var O=data.getItemVisual(t,"symbolRotate");x.attr("rotation",(O||0)*Math.PI/180||0);var I=yy(data.getItemVisual(t,"symbolOffset"),e);I&&(x.x=I[0],x.y=I[1]),m&&x.attr("cursor",m);var T=data.getItemVisual(t,"style"),C=T.fill;if(x instanceof ma){var A=x.style;x.useStyle(Object(w.extend)({image:A.image,x:A.x,y:A.y,width:A.width,height:A.height},T))}else x.__isEmptyBrush?x.useStyle(Object(w.extend)({},T)):x.useStyle(T),x.style.decal=null,x.setColor(C,r&&r.symbolInnerColor),x.style.strokeNoScale=!0;var D=data.getItemVisual(t,"liftZ"),k=this._z2;null!=D?null==k&&(this._z2=x.z2,x.z2+=D):null!=k&&(x.z2=k,this._z2=null);var L=r&&r.useNameLabel;sl(x,y,{labelFetcher:_,labelDataIndex:t,defaultText:function(t){return L?data.getName(t):aS(data,t)},inheritColor:C,defaultOpacity:T.opacity}),this._sizeX=e[0]/2,this._sizeY=e[1]/2;var j=x.ensureState("emphasis");j.style=o,x.ensureState("select").style=c,x.ensureState("blur").style=l;var P=null==v||!0===v?Math.max(1.1,3/this._sizeY):isFinite(v)&&v>0?+v:1;j.scaleX=this._sizeX*P,j.scaleY=this._sizeY*P,this.setSymbolScale(1),zs(this,h,d,f)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,e,n){var r=this.childAt(0),o=Ha(this).dataIndex,l=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var c=r.getTextContent();c&&Qs(c,{style:{opacity:0}},e,{dataIndex:o,removeOpt:l,cb:function(){r.removeTextContent()}})}else r.removeTextContent();Qs(r,{style:{opacity:0},scaleX:0,scaleY:0},e,{dataIndex:o,cb:t,removeOpt:l})},e.getSymbolSize=function(data,t){return gy(data.getItemVisual(t,"symbolSize"))},e}(pi);function uS(t,e){this.parent.drift(t,e)}var cS=lS;function hS(data,t,e,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n.isIgnore&&n.isIgnore(e))&&!(n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&"none"!==data.getItemVisual(e,"symbol")}function dS(t){return null==t||Object(w.isObject)(t)||(t={isIgnore:t}),t||{}}function pS(data){var t=data.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:ll(t),cursorStyle:t.get("cursor")}}var fS=function(){function t(t){this.group=new pi,this._SymbolCtor=t||cS}return t.prototype.updateData=function(data,t){this._progressiveEls=null,t=dS(t);var e=this.group,n=data.hostModel,r=this._data,o=this._SymbolCtor,l=t.disableAnimation,c=pS(data),h={disableAnimation:l},d=t.getSymbolPoint||function(t){return data.getItemLayout(t)};r||e.removeAll(),data.diff(r).add((function(n){var r=d(n);if(hS(data,r,n,t)){var l=new o(data,n,c,h);l.setPosition(r),data.setItemGraphicEl(n,l),e.add(l)}})).update((function(f,y){var v=r.getItemGraphicEl(y),m=d(f);if(hS(data,m,f,t)){var x=data.getItemVisual(f,"symbol")||"circle",_=v&&v.getSymbolType&&v.getSymbolType();if(!v||_&&_!==x)e.remove(v),(v=new o(data,f,c,h)).setPosition(m);else{v.updateData(data,f,c,h);var w={x:m[0],y:m[1]};l?v.attr(w):Ks(v,w,n)}e.add(v),data.setItemGraphicEl(f,v)}else e.remove(v)})).remove((function(t){var o=r.getItemGraphicEl(t);o&&o.fadeOut((function(){e.remove(o)}),n)})).execute(),this._getSymbolPoint=d,this._data=data},t.prototype.updateLayout=function(){var t=this,data=this._data;data&&data.eachItemGraphicEl((function(e,n){var r=t._getSymbolPoint(n);e.setPosition(r),e.markRedraw()}))},t.prototype.incrementalPrepareUpdate=function(data){this._seriesScope=pS(data),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,data,e){function n(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],e=dS(e);for(var r=t.start;r0?n=r[0]:r[1]<0&&(n=r[1]);return n}(r,e),l=n.dim,c=r.dim,h=data.mapDimension(c),d=data.mapDimension(l),f="x"===c||"radius"===c?1:0,y=Object(w.map)(t.dimensions,(function(t){return data.mapDimension(t)})),v=!1,m=data.getCalculationInfo("stackResultDimension");return ax(data,y[0])&&(v=!0,y[0]=m),ax(data,y[1])&&(v=!0,y[1]=m),{dataDimsForPoint:y,valueStart:o,valueAxisDim:c,baseAxisDim:l,stacked:!!v,valueDim:h,baseDim:d,baseDataOffset:f,stackedOverDimension:data.getCalculationInfo("stackedOverDimension")}}function vS(t,e,data,n){var r=NaN;t.stacked&&(r=data.get(data.getCalculationInfo("stackedOverDimension"),n)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,l=[];return l[o]=data.get(t.baseDim,n),l[1-o]=r,e.dataToPoint(l)}var mS=Math.min,xS=Math.max;function bS(t,e){return isNaN(t)||isNaN(e)}function _S(t,e,n,r,o,l,c,h,d){for(var f,y,v,m,x,_,w=n,S=0;S=o||w<0)break;if(bS(M,O)){if(d){w+=l;continue}break}if(w===n)t[l>0?"moveTo":"lineTo"](M,O),v=M,m=O;else{var I=M-f,T=O-y;if(I*I+T*T<.5){w+=l;continue}if(c>0){for(var C=w+l,A=e[2*C],D=e[2*C+1];A===M&&D===O&&S=r||bS(A,D))x=M,_=O;else{j=A-f,P=D-y;var E=M-f,z=A-M,V=O-y,B=D-O,F=void 0,G=void 0;if("x"===h){var H=j>0?1:-1;x=M-H*(F=Math.abs(E))*c,_=O,N=M+H*(G=Math.abs(z))*c,R=O}else if("y"===h){var W=P>0?1:-1;x=M,_=O-W*(F=Math.abs(V))*c,N=M,R=O+W*(G=Math.abs(B))*c}else F=Math.sqrt(E*E+V*V),x=M-j*c*(1-(L=(G=Math.sqrt(z*z+B*B))/(G+F))),_=O-P*c*(1-L),R=O+P*c*L,N=mS(N=M+j*c*L,xS(A,M)),R=mS(R,xS(D,O)),N=xS(N,mS(A,M)),_=O-(P=(R=xS(R,mS(D,O)))-O)*F/G,x=mS(x=M-(j=N-M)*F/G,xS(f,M)),_=mS(_,xS(y,O)),N=M+(j=M-(x=xS(x,mS(f,M))))*G/F,R=O+(P=O-(_=xS(_,mS(y,O))))*G/F}t.bezierCurveTo(v,m,x,_,M,O),v=N,m=R}else t.lineTo(M,O)}f=M,y=O,w+=l}return S}var wS=function(){this.smooth=0,this.smoothConstraint=!0},SS=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return Object(x.a)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new wS},e.prototype.buildPath=function(t,e){var n=e.points,i=0,r=n.length/2;if(e.connectNulls){for(;r>0&&bS(n[2*r-2],n[2*r-1]);r--);for(;i=0){var _=l?(d-r)*x+r:(h-n)*x+n;return l?[t,_]:[_,t]}n=h,r=d;break;case o.C:h=data[i++],d=data[i++],f=data[i++],y=data[i++],v=data[i++],m=data[i++];var w=l?Ce(n,h,f,v,t,c):Ce(r,d,y,m,t,c);if(w>0)for(var S=0;S=0){_=l?Ie(r,d,y,m,M):Ie(n,h,f,v,M);return l?[t,_]:[_,t]}}n=v,r=m}}},e}(ha),MS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(x.a)(e,t),e}(wS),OS=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return Object(x.a)(e,t),e.prototype.getDefaultShape=function(){return new MS},e.prototype.buildPath=function(t,e){var n=e.points,r=e.stackedOnPoints,i=0,o=n.length/2,l=e.smoothMonotone;if(e.connectNulls){for(;o>0&&bS(n[2*o-2],n[2*o-1]);o--);for(;i=0;i--){var l=data.getDimensionInfo(n[i].dimension);if("x"===(r=l&&l.coordDim)||"y"===r){o=n[i];break}}if(o){var c=t.getAxis(r),h=w.map(o.stops,(function(t){return{coord:c.toGlobalCoord(c.dataToCoord(t.value)),color:t.color}})),d=h.length,f=o.outerColors.slice();d&&h[0].coord>h[d-1].coord&&(h.reverse(),f.reverse());var y=function(t,e){var n,r,o=[],l=t.length;function c(t,e,n){var r=t.coord,p=(n-r)/(e.coord-r);return{coord:n,color:Object(Ge.lerp)(p,[t.color,e.color])}}for(var i=0;ie){r?o.push(c(r,h,e)):n&&o.push(c(n,h,0),c(n,h,e));break}n&&(o.push(c(n,h,0)),n=null),o.push(h),r=h}}return o}(h,"x"===r?e.getWidth():e.getHeight()),v=y.length;if(!v&&d)return h[0].coord<0?f[1]?f[1]:h[d-1].color:f[0]?f[0]:h[0].color;var m=y[0].coord-10,x=y[v-1].coord+10,_=x-m;if(_<.001)return"transparent";w.each(y,(function(t){t.offset=(t.coord-m)/_})),y.push({offset:v?y[v-1].offset:.5,color:f[1]||"transparent"}),y.unshift({offset:v?y[0].offset:.5,color:f[0]||"transparent"});var S=new uf(0,0,0,0,y,!0);return S[r]=m,S[r+"2"]=x,S}}}function RS(t,data,e){var n=t.get("showAllSymbol"),r="auto"===n;if(!n||r){var o=e.getAxesByScale("ordinal")[0];if(o&&(!r||!function(t,data){var e=t.getExtent(),n=Math.abs(e[1]-e[0])/t.scale.count();isNaN(n)&&(n=0);for(var r=data.count(),o=Math.max(1,Math.round(r/5)),l=0;ln)return!1;return!0}(o,data))){var l=data.mapDimension(o.dim),c={};return w.each(o.getViewLabels(),(function(t){var e=o.scale.getRawOrdinalNumber(t.tickValue);c[e]=1})),function(t){return!c.hasOwnProperty(data.get(l,t))}}}}function ES(t,e){return[t[2*e],t[2*e+1]]}function zS(t){if(t.get(["endLabel","show"]))return!0;for(var i=0;i0&&"bolder"===t.get(["emphasis","lineStyle","width"]))&&(polyline.getState("emphasis").style.lineWidth=+polyline.style.lineWidth+1);Ha(polyline).seriesIndex=t.seriesIndex,zs(polyline,N,R,E);var z=jS(t.get("smooth")),V=t.get("smoothMonotone");if(polyline.setShape({smooth:z,smoothMonotone:V,connectNulls:T}),polygon){var B=data.getCalculationInfo("stackedOnSeries"),F=0;polygon.useStyle(w.defaults(h.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:data.getVisual("style").decal})),B&&(F=jS(B.get("smooth"))),polygon.setShape({smooth:z,stackedOnSmooth:F,smoothMonotone:V,connectNulls:T}),Gs(polygon,t,"areaStyle"),Ha(polygon).seriesIndex=t.seriesIndex,zs(polygon,N,R,E)}var G=function(t){r._changePolyState(t)};data.eachItemGraphicEl((function(t){t&&(t.onHoverStateChange=G)})),this._polyline.onHoverStateChange=G,this._data=data,this._coordSys=o,this._stackedOnPoints=O,this._points=d,this._step=k,this._valueOrigin=S,t.get("triggerLineEvent")&&(this.packEventData(t,polyline),polygon&&this.packEventData(t,polygon))},e.prototype.packEventData=function(t,e){Ha(e).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,e,n,r){var data=t.getData(),o=dr(data,r);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var l=data.getLayout("points"),symbol=data.getItemGraphicEl(o);if(!symbol){var c=l[2*o],h=l[2*o+1];if(isNaN(c)||isNaN(h))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,h))return;var d=t.get("zlevel")||0,f=t.get("z")||0;(symbol=new cS(data,o)).x=c,symbol.y=h,symbol.setZ(d,f);var y=symbol.getSymbolPath().getTextContent();y&&(y.zlevel=d,y.z=f,y.z2=this._polyline.z2+1),symbol.__temp=!0,data.setItemGraphicEl(o,symbol),symbol.stopSymbolAnimation(!0),this.group.add(symbol)}symbol.highlight()}else ig.prototype.highlight.call(this,t,e,n,r)},e.prototype.downplay=function(t,e,n,r){var data=t.getData(),o=dr(data,r);if(this._changePolyState("normal"),null!=o&&o>=0){var symbol=data.getItemGraphicEl(o);symbol&&(symbol.__temp?(data.setItemGraphicEl(o,null),this.group.remove(symbol)):symbol.downplay())}else ig.prototype.downplay.call(this,t,e,n,r)},e.prototype._changePolyState=function(t){var polygon=this._polygon;xs(this._polyline,t),polygon&&xs(polygon,t)},e.prototype._newPolyline=function(t){var polyline=this._polyline;return polyline&&this._lineGroup.remove(polyline),polyline=new SS({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(polyline),this._polyline=polyline,polyline},e.prototype._newPolygon=function(t,e){var polygon=this._polygon;return polygon&&this._lineGroup.remove(polygon),polygon=new OS({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(polygon),this._polygon=polygon,polygon},e.prototype._initSymbolLabelAnimation=function(data,t,e){var n,r,o=t.getBaseAxis(),l=o.inverse;"cartesian2d"===t.type?(n=o.isHorizontal(),r=!1):"polar"===t.type&&(n="angle"===o.dim,r=!0);var c=data.hostModel,h=c.get("animationDuration");w.isFunction(h)&&(h=h(null));var d=c.get("animationDelay")||0,f=w.isFunction(d)?d(null):d;data.eachItemGraphicEl((function(symbol,o){var c=symbol;if(c){var y=[symbol.x,symbol.y],v=void 0,m=void 0,x=void 0;if(e)if(r){var _=e,S=t.pointToCoord(y);n?(v=_.startAngle,m=_.endAngle,x=-S[1]/180*Math.PI):(v=_.r0,m=_.r,x=S[0])}else{var M=e;n?(v=M.x,m=M.x+M.width,x=symbol.x):(v=M.y+M.height,m=M.y,x=symbol.y)}var O=m===v?0:(x-v)/(m-v);l&&(O=1-O);var I=w.isFunction(d)?d(o):h*O+f,T=c.getSymbolPath(),text=T.getTextContent();c.attr({scaleX:0,scaleY:0}),c.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:I}),text&&text.animateFrom({style:{opacity:0}},{duration:300,delay:I}),T.disableLabelAnimation=!0}}))},e.prototype._initOrUpdateEndLabel=function(t,e,n){var r=t.getModel("endLabel");if(zS(t)){var o=t.getData(),polyline=this._polyline,l=o.getLayout("points");if(!l)return polyline.removeTextContent(),void(this._endLabel=null);var c=this._endLabel;c||((c=this._endLabel=new Ga({z2:200})).ignoreClip=!0,polyline.setTextContent(this._endLabel),polyline.disableLabelAnimation=!0);var h=function(t){for(var e,n,r=t.length/2;r>0&&(e=t[2*r-2],n=t[2*r-1],isNaN(e)||isNaN(n));r--);return r-1}(l);h>=0&&(sl(polyline,ll(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:h,defaultText:function(t,e,n){return null!=n?sS(o,n):aS(o,t)},enableTextSetter:!0},function(t,e){var n=e.getBaseAxis(),r=n.isHorizontal(),o=n.inverse,l=r?o?"right":"left":"center",c=r?"middle":o?"top":"bottom";return{normal:{align:t.get("align")||l,verticalAlign:t.get("verticalAlign")||c}}}(r,e)),polyline.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,e,data,n,r,o,l){var c=this._endLabel,polyline=this._polyline;if(c){t<1&&null==n.originalX&&(n.originalX=c.x,n.originalY=c.y);var h=data.getLayout("points"),d=data.hostModel,f=d.get("connectNulls"),y=o.get("precision"),v=o.get("distance")||0,m=l.getBaseAxis(),x=m.isHorizontal(),_=m.inverse,w=e.shape,S=_?x?w.x:w.y+w.height:x?w.x+w.width:w.y,M=(x?v:0)*(_?-1:1),O=(x?0:-v)*(_?-1:1),I=x?"x":"y",T=function(t,e,n){for(var a,b,r=t.length/2,o="x"===n?0:1,l=0,c=-1,i=0;i=e||a>=e&&b<=e){c=i;break}l=i,a=b}else a=b;return{range:[l,c],t:(e-a)/(b-a)}}(h,S,I),C=T.range,A=C[1]-C[0],D=void 0;if(A>=1){if(A>1&&!f){var k=ES(h,C[0]);c.attr({x:k[0]+M,y:k[1]+O}),r&&(D=d.getRawValue(C[0]))}else{(k=polyline.getPointOn(S,I))&&c.attr({x:k[0]+M,y:k[1]+O});var L=d.getRawValue(C[0]),j=d.getRawValue(C[1]);r&&(D=Sr(data,y,L,j,T.t))}n.lastFrameIndex=C[0]}else{var P=1===t||n.lastFrameIndex>0?C[0]:0;k=ES(h,P);r&&(D=d.getRawValue(P)),c.attr({x:k[0]+M,y:k[1]+O})}r&&ml(c).setLabelText(D)}},e.prototype._doUpdateAnimation=function(data,t,e,n,r,o,l){var polyline=this._polyline,polygon=this._polygon,c=data.hostModel,h=function(t,e,n,r,o,l,c,h){for(var d=function(t,e){var n=[];return e.diff(t).add((function(t){n.push({cmd:"+",idx:t})})).update((function(t,e){n.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){n.push({cmd:"-",idx:t})})).execute(),n}(t,e),f=[],y=[],v=[],m=[],x=[],_=[],w=[],S=yS(o,e,c),M=t.getLayout("points")||[],O=e.getLayout("points")||[],i=0;i3e3||polygon&&LS(f,v)>3e3)return polyline.stopAnimation(),polyline.setShape({points:y}),void(polygon&&(polygon.stopAnimation(),polygon.setShape({points:y,stackedOnPoints:v})));polyline.shape.__points=h.current,polyline.shape.points=d;var m={shape:{points:y}};h.current!==d&&(m.shape.__points=h.next),polyline.stopAnimation(),Ks(polyline,m,c),polygon&&(polygon.setShape({points:d,stackedOnPoints:f}),polygon.stopAnimation(),Ks(polygon,{shape:{stackedOnPoints:v}},c),polyline.shape.points!==polygon.shape.points&&(polygon.shape.points=polyline.shape.points));for(var x=[],_=h.status,i=0;i<_.length;i++){if("="===_[i].cmd){var w=data.getItemGraphicEl(_[i].idx1);w&&x.push({el:w,ptIdx:i})}}polyline.animators&&polyline.animators.length&&polyline.animators[0].during((function(){polygon&&polygon.dirtyShape();for(var t=polyline.shape.__points,i=0;ie&&(e=t[i]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,i=0;i10&&"cartesian2d"===o.type&&r){var c=o.getBaseAxis(),h=o.getOtherAxis(c),d=c.getExtent(),f=n.getDevicePixelRatio(),y=Math.abs(d[1]-d[0])*(f||1),v=Math.round(l/y);if(isFinite(v)&&v>1){"lttb"===r&&t.setData(data.lttbDownSample(data.mapDimension(h.dim),1/v));var m=void 0;Object(w.isString)(r)?m=HS[r]:Object(w.isFunction)(r)&&(m=r),m&&t.setData(data.downSample(data.mapDimension(h.dim),1/v,m,WS))}}}}}var XS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.getInitialData=function(option,t){return lx(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,e,n){var r=this.coordinateSystem;if(r&&r.clampData){var o=r.dataToPoint(r.clampData(t));if(n)Object(w.each)(r.getAxes(),(function(n,l){if("category"===n.type){var c=n.getTicksCoords(),h=r.clampData(t)[l];!e||"x1"!==e[l]&&"y1"!==e[l]||(h+=1),h>c.length-1&&(h=c.length-1),h<0&&(h=0),c[h]&&(o[l]=n.toGlobalCoord(c[h].coord))}}));else{var data=this.getData(),l=data.getLayout("offset"),c=data.getLayout("size"),h=r.getBaseAxis().isHorizontal()?0:1;o[h]+=l+c/2}return o}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(Wd);Wd.registerClass(XS);var US=XS,ZS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.getInitialData=function(){return lx(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},e.prototype.brushSelector=function(t,data,e){return e.rect(data.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=El(US.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(US),qS=ZS,KS=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},$S=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return Object(x.a)(e,t),e.prototype.getDefaultShape=function(){return new KS},e.prototype.buildPath=function(t,e){var n=e.cx,r=e.cy,o=Math.max(e.r0||0,0),l=Math.max(e.r,0),c=.5*(l-o),h=o+c,d=e.startAngle,f=e.endAngle,y=e.clockwise,v=2*Math.PI,m=y?f-do)return!0;o=d}return!1},e.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,r=n.getExtent(),o=Math.max(0,r[0]),l=Math.min(r[1],n.getOrdinalMeta().categories.length-1);o<=l;++o)if(t.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(data,t,e,n){if(this._isOrderChangedWithinSameData(data,t,e)){var r=this._dataSort(data,e,t);this._isOrderDifferentInView(r,e)&&(this._removeOnRenderedListener(n),n.dispatchAction({type:"changeAxisOrder",componentType:e.dim+"Axis",axisId:e.index,sortInfo:r}))}},e.prototype._dispatchInitSort=function(data,t,e){var n=t.baseAxis,r=this._dataSort(data,n,(function(e){return data.get(data.mapDimension(t.otherAxis.dim),e)}));e.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",isInitSort:!0,axisId:n.index,sortInfo:r})},e.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},e.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var e=this.group,data=this._data;t&&t.isAnimationEnabled()&&data&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],data.eachItemGraphicEl((function(e){el(e,t,Ha(e).dataIndex)}))):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(ig),iM={cartesian2d:function(t,e){var n=e.width<0?-1:1,r=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),r<0&&(e.y+=e.height,e.height=-e.height);var o=t.x+t.width,l=t.y+t.height,c=tM(e.x,t.x),h=eM(e.x+e.width,o),d=tM(e.y,t.y),f=eM(e.y+e.height,l),y=ho?h:c,e.y=v&&d>l?f:d,e.width=y?0:h-c,e.height=v?0:f-d,n<0&&(e.x+=e.width,e.width=-e.width),r<0&&(e.y+=e.height,e.height=-e.height),y||v},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var r=e.r;e.r=e.r0,e.r0=r}var o=eM(e.r,t.r),l=tM(e.r0,t.r0);e.r=o,e.r0=l;var c=o-l<0;if(n<0){r=e.r;e.r=e.r0,e.r0=r}return c}},rM={cartesian2d:function(t,data,e,n,r,o,l,c,h){var rect=new Ia({shape:Object(w.extend)({},n),z2:1});(rect.__dataIndex=e,rect.name="item",o)&&(rect.shape[r?"height":"width"]=0);return rect},polar:function(t,data,e,n,r,o,l,c,h){var d=!r&&h?$S:Rp,f=new d({shape:n,z2:1});f.name="item";var y,v,m=hM(r);if(f.calculateTextPosition=(y=m,v=({isRoundCap:d===$S}||{}).isRoundCap,function(t,e,n){var r=e.position;if(!r||r instanceof Array)return Qn(t,e,n);var o=y(r),l=null!=e.distance?e.distance:5,c=this.shape,h=c.cx,d=c.cy,f=c.r,m=c.r0,x=(f+m)/2,_=c.startAngle,w=c.endAngle,S=(_+w)/2,M=v?Math.abs(f-m)/2:0,O=Math.cos,I=Math.sin,T=h+f*O(_),C=d+f*I(_),A="left",D="top";switch(o){case"startArc":T=h+(m-l)*O(S),C=d+(m-l)*I(S),A="center",D="top";break;case"insideStartArc":T=h+(m+l)*O(S),C=d+(m+l)*I(S),A="center",D="bottom";break;case"startAngle":T=h+x*O(_)+JS(_,l+M,!1),C=d+x*I(_)+QS(_,l+M,!1),A="right",D="middle";break;case"insideStartAngle":T=h+x*O(_)+JS(_,-l+M,!1),C=d+x*I(_)+QS(_,-l+M,!1),A="left",D="middle";break;case"middle":T=h+x*O(S),C=d+x*I(S),A="center",D="middle";break;case"endArc":T=h+(f+l)*O(S),C=d+(f+l)*I(S),A="center",D="bottom";break;case"insideEndArc":T=h+(f-l)*O(S),C=d+(f-l)*I(S),A="center",D="top";break;case"endAngle":T=h+x*O(w)+JS(w,l+M,!0),C=d+x*I(w)+QS(w,l+M,!0),A="left",D="middle";break;case"insideEndAngle":T=h+x*O(w)+JS(w,-l+M,!0),C=d+x*I(w)+QS(w,-l+M,!0),A="right",D="middle";break;default:return Qn(t,e,n)}return(t=t||{}).x=T,t.y=C,t.align=A,t.verticalAlign=D,t}),o){var x=r?"r":"endAngle",_={};f.shape[x]=r?0:n.startAngle,_[x]=n[x],(c?Ks:$s)(f,{shape:_},o)}return f}};function oM(t,e,n,r,o,l,c,h){var d,f;l?(f={x:r.x,width:r.width},d={y:r.y,height:r.height}):(f={y:r.y,height:r.height},d={x:r.x,width:r.width}),h||(c?Ks:$s)(n,{shape:d},e,o,null),(c?Ks:$s)(n,{shape:f},e?t.baseAxis.model:null,o)}function aM(t,e){for(var i=0;i0?1:-1,l=n.height>0?1:-1;return{x:n.x+o*r/2,y:n.y+l*r/2,width:n.width-o*r,height:n.height-l*r}},polar:function(data,t,e){var n=data.getItemLayout(t);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function hM(t){return function(t){var e=t?"Arc":"Angle";return function(t){switch(t){case"start":case"insideStart":case"end":case"insideEnd":return t+e;default:return t}}}(t)}function dM(t,data,e,n,r,o,l,c){var style=data.getItemVisual(e,"style");c||t.setShape("r",n.get(["itemStyle","borderRadius"])||0),t.useStyle(style);var h=n.getShallow("cursor");h&&t.attr("cursor",h);var d=c?l?r.r>=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":l?r.height>=0?"bottom":"top":r.width>=0?"right":"left",f=ll(n);sl(t,f,{labelFetcher:o,labelDataIndex:e,defaultText:aS(o.getData(),e),inheritColor:style.fill,defaultOpacity:style.opacity,defaultOutsidePosition:d});var label=t.getTextContent();if(c&&label){var y=n.get(["label","position"]);t.textConfig.inside="middle"===y||null,function(t,e,n,r){if(Object(w.isNumber)(r))t.setTextConfig({rotation:r});else if(Object(w.isArray)(e))t.setTextConfig({rotation:0});else{var o,l=t.shape,c=l.clockwise?l.startAngle:l.endAngle,h=l.clockwise?l.endAngle:l.startAngle,d=(c+h)/2,f=n(e);switch(f){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":o=d;break;case"startAngle":case"insideStartAngle":o=c;break;case"endAngle":case"insideEndAngle":o=h;break;default:return void t.setTextConfig({rotation:0})}var y=1.5*Math.PI-o;"middle"===f&&y>Math.PI/2&&y<1.5*Math.PI&&(y-=Math.PI),t.setTextConfig({rotation:y})}}(t,"outside"===y?d:y,hM(l),n.get(["label","rotate"]))}xl(label,f,o.getRawValue(e),(function(t){return sS(data,t)}));var v=n.getModel(["emphasis"]);zs(t,v.get("focus"),v.get("blurScope"),v.get("disabled")),Gs(t,n),function(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}(r)&&(t.style.fill="none",t.style.stroke="none",Object(w.each)(t.states,(function(t){t.style&&(t.style.fill=t.style.stroke="none")})))}var pM=function(){},fM=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return Object(x.a)(e,t),e.prototype.getDefaultShape=function(){return new pM},e.prototype.buildPath=function(t,e){for(var n=e.points,r=this.baseDimIdx,o=1-this.baseDimIdx,l=[],c=[],h=this.barWidth,i=0;i=h[0]&&e<=h[0]+d[0]&&n>=h[1]&&n<=h[1]+d[1])return c[i]}return-1}(this,t.offsetX,t.offsetY);Ha(this).dataIndex=e>=0?e:null}),30,!1);function vM(t,e,n){if(AS(n,"cartesian2d")){var r=e,o=n.getArea();return{x:t?r.x:o.x,y:t?o.y:r.y,width:t?r.width:o.width,height:t?o.height:r.height}}var l=e;return{cx:(o=n.getArea()).cx,cy:o.cy,r0:t?o.r0:l.r0,r:t?o.r:l.r,startAngle:t?l.startAngle:0,endAngle:t?l.endAngle:2*Math.PI}}var mM=nM;var xM=2*Math.PI,bM=Math.PI/180;function _M(t,e){return Vu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function wM(t,e){var n=_M(t,e),r=t.get("center"),o=t.get("radius");w.isArray(o)||(o=[0,o]);var l,c,h=Ii(n.width,e.getWidth()),d=Ii(n.height,e.getHeight()),f=Math.min(h,d),y=Ii(o[0],f/2),v=Ii(o[1],f/2),m=t.coordinateSystem;if(m){var x=m.dataToPoint(r);l=x[0]||0,c=x[1]||0}else w.isArray(r)||(r=[r,r]),l=Ii(r[0],h)+n.x,c=Ii(r[1],d)+n.y;return{cx:l,cy:c,r0:y,r:v}}function SM(t,e,n){e.eachSeriesByType(t,(function(t){var data=t.getData(),e=data.mapDimension("value"),r=_M(t,n),o=wM(t,n),l=o.cx,c=o.cy,h=o.r,d=o.r0,f=-t.get("startAngle")*bM,y=t.get("minAngle")*bM,v=0;data.each(e,(function(t){!isNaN(t)&&v++}));var m=data.getSum(e),x=Math.PI/(m||v)*2,_=t.get("clockwise"),w=t.get("roseType"),S=t.get("stillShowZeroSum"),M=data.getDataExtent(e);M[0]=0;var O=xM,I=0,T=f,C=_?1:-1;if(data.setLayout({viewRect:r,r:h}),data.each(e,(function(t,e){var n;if(isNaN(t))data.setItemLayout(e,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:l,cy:c,r0:d,r:w?NaN:h});else{(n="area"!==w?0===m&&S?x:t*x:xM/v)n?c:l,f=Math.abs(h.label.y-n);if(f>=d.maxY){var y=h.label.x-e-h.len2*o,v=r+h.len,x=Math.abs(y)t.unconstrainedWidth?null:v:null;label.setStyle("width",m)}var x=label.getBoundingRect();r.width=x.width;var _=(label.style.margin||0)+2.1;r.height=x.height+_,r.y-=(r.height-f)/2}}}function CM(t){return"center"===t.position}function AM(t){var e,n,data=t.getData(),r=[],o=!1,l=(t.get("minShowLabelAngle")||0)*OM,c=data.getLayout("viewRect"),h=data.getLayout("r"),d=c.width,f=c.x,y=c.y,v=c.height;function m(t){t.ignore=!0}data.each((function(t){var c=data.getItemGraphicEl(t),y=c.shape,label=c.getTextContent(),v=c.getTextGuideLine(),x=data.getItemModel(t),_=x.getModel("label"),S=_.get("position")||x.get(["emphasis","label","position"]),M=_.get("distanceToLabelLine"),O=_.get("alignTo"),I=Ii(_.get("edgeDistance"),d),T=_.get("bleedMargin"),C=x.getModel("labelLine"),A=C.get("length");A=Ii(A,d);var D=C.get("length2");if(D=Ii(D,d),Math.abs(y.endAngle-y.startAngle)0?"right":"left":R>0?"left":"right"}var W=Math.PI,Y=0,X=_.get("rotate");if(Object(w.isNumber)(X))Y=X*(W/180);else if("center"===S)Y=0;else if("radial"===X||!0===X){Y=R<0?-N+W:-N}else if("tangential"===X&&"outside"!==S&&"outer"!==S){var U=Math.atan2(R,E);U<0&&(U=2*W+U),E>0&&(U=W+U),Y=U-W}if(o=!!Y,label.x=k,label.y=L,label.rotation=Y,label.setStyle({verticalAlign:"middle"}),z){label.setStyle({align:P});var Z=label.states.select;Z&&(Z.x+=label.x,Z.y+=label.y)}else{var K=label.getBoundingRect().clone();K.applyTransform(label.getComputedTransform());var $=(label.style.margin||0)+2.1;K.y-=$/2,K.height+=$,r.push({label:label,labelLine:v,position:S,len:A,len2:D,minTurnAngle:C.get("minTurnAngle"),maxSurfaceAngle:C.get("maxSurfaceAngle"),surfaceNormal:new kt(R,E),linePoints:j,textAlign:P,labelDistance:M,labelAlignTo:O,edgeDistance:I,bleedMargin:T,rect:K,unconstrainedWidth:K.width,labelStyleWidth:label.style.width})}c.setTextConfig({inside:z})}})),!o&&t.get("avoidLabelOverlap")&&function(t,e,n,r,o,l,c,h){for(var d=[],f=[],y=Number.MAX_VALUE,v=-Number.MAX_VALUE,i=0;i0){for(var h=data.getItemLayout(0),s=1;isNaN(h&&h.startAngle)&&s=n.r0}},e.type="pie",e}(ig),jM=LM;function PM(t,e,n){e=Object(w.isArray)(e)&&{coordDimensions:e}||Object(w.extend)({encodeDefine:t.getEncode()},e);var source=t.getSource(),r=tx(source,e).dimensions,o=new Jm(r,t);return o.initData(source,n),o}var NM=function(){function t(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},t.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},t.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},t}(),RM=NM,EM=pr(),zM=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(x.a)(e,t),e.prototype.init=function(option){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new RM(w.bind(this.getData,this),w.bind(this.getRawData,this)),this._defaultLabelLine(option)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return PM(this,{coordDimensions:["value"],encodeDefaulter:w.curry(uc,this)})},e.prototype.getDataParams=function(e){var data=this.getData(),n=EM(data),r=n.seats;if(!r){var o=[];data.each(data.mapDimension("value"),(function(t){o.push(t)})),r=n.seats=ji(o,data.hostModel.get("percentPrecision"))}var l=t.prototype.getDataParams.call(this,e);return l.percent=r[e]||0,l.$vars.push("percent"),l},e.prototype._defaultLabelLine=function(option){er(option,"labelLine",["show"]);var t=option.labelLine,e=option.emphasis.labelLine;t.show=t.show&&option.label.show,e.show=e.show&&option.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(Wd),VM=zM;var BM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return Object(x.a)(e,t),e.prototype.getInitialData=function(option,t){return lx(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,data,e){return e.point(data.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(Wd),FM=BM,GM=function(){},HM=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return Object(x.a)(e,t),e.prototype.getDefaultShape=function(){return new GM},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(path,t){var i,e=t.points,n=t.size,r=this.symbolProxy,o=r.shape,l=path.getContext?path.getContext():path,c=l&&n[0]<4,h=this.softClipShape;if(c)this._ctx=l;else{for(this._ctx=null,i=this._off;i=0;h--){var i=2*h,d=r[i]-l/2,f=r[i+1]-c/2;if(t>=d&&e>=f&&t<=d+l&&e<=f+c)return h}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),rect=this.getBoundingRect();return t=n[0],e=n[1],rect.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var rect=this._rect;if(!rect){for(var t=this.shape,e=t.points,n=t.size,r=n[0],o=n[1],l=1/0,c=1/0,h=-1/0,d=-1/0,i=0;i=0&&(h.dataIndex=n+(t.startIndex||0))}))},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),YM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.render=function(t,e,n){var data=t.getData();this._updateSymbolDraw(data,t).updateData(data,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var data=t.getData();this._updateSymbolDraw(data,t).incrementalPrepareUpdate(data),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},e.prototype.updateTransform=function(t,e,n){var data=t.getData();if(this.group.dirty(),!this._finished||data.count()>1e4)return{update:!0};var r=GS("").reset(t,e,n);r.progress&&r.progress({start:0,end:data.count(),count:data.count()},data),this._symbolDraw.updateLayout(data)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){var e=t.coordinateSystem,n=e&&e.getArea&&e.getArea();return t.get("clip",!0)?n:null},e.prototype._updateSymbolDraw=function(data,t){var e=this._symbolDraw,n=t.pipelineContext.large;return e&&n===this._isLargeDraw||(e&&e.remove(),e=this._symbolDraw=n?new WM:new gS,this._isLargeDraw=n,this.group.removeAll()),this.group.add(e.group),e},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(ig),XM=YM,UM=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(x.a)(e,t),e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(Uu),ZM=UM,qM=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(x.a)(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",vr).models[0]},e.type="cartesian2dAxis",e}(Uu);w.mixin(qM,xb);var KM={show:!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:"#6E7079",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:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},$M=w.merge({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},KM),JM=w.merge({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},KM),QM={category:$M,value:JM,time:w.merge({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},JM),log:w.defaults({logBase:10},JM)},tO={value:1,category:1,time:1,log:1};function eO(t,e,n,r){Object(w.each)(tO,(function(o,l){var c=Object(w.merge)(Object(w.merge)({},QM[l],!0),r,!0),h=function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e+"Axis."+l,n}return Object(x.a)(n,t),n.prototype.mergeDefaultAndTheme=function(option,t){var e=Fu(this),n=e?Hu(option):{},r=t.getTheme();Object(w.merge)(option,r.get(l+"Axis")),Object(w.merge)(option,this.getDefaultOption()),option.type=nO(option),e&&Gu(option,n,e)},n.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=px.createByAxisModel(this))},n.prototype.getCategories=function(t){var option=this.option;if("category"===option.type)return t?option.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.type=e+"Axis."+l,n.defaultOption=c,n}(n);t.registerComponentModel(h)})),t.registerSubTypeDefaulter(e+"Axis",nO)}function nO(option){return option.type||(option.data?"category":"value")}var iO=function(){function t(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return t.prototype.getAxis=function(t){return this._axes[t]},t.prototype.getAxes=function(){return w.map(this._dimList,(function(t){return this._axes[t]}),this)},t.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),w.filter(this.getAxes(),(function(e){return e.scale.type===t}))},t.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},t}(),rO=["x","y"];function oO(t){return"interval"===t.type||"time"===t.type}var aO=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=rO,e}return Object(x.a)(e,t),e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,e=this.getAxis("y").scale;if(oO(t)&&oO(e)){var n=t.getExtent(),r=e.getExtent(),o=this.dataToPoint([n[0],r[0]]),l=this.dataToPoint([n[1],r[1]]),c=n[1]-n[0],h=r[1]-r[0];if(c&&h){var d=(l[0]-o[0])/c,f=(l[1]-o[1])/h,y=o[0]-n[0]*d,v=o[1]-r[0]*f,m=this._transform=[d,0,0,f,y,v];this._invTransform=At([],m)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(data){return this.getAxis("x").containData(data[0])&&this.getAxis("y").containData(data[1])},e.prototype.containZone=function(t,e){var n=this.dataToPoint(t),r=this.dataToPoint(e),area=this.getArea(),o=new Bt(n[0],n[1],r[0]-n[0],r[1]-n[1]);return area.intersect(o)},e.prototype.dataToPoint=function(data,t,e){e=e||[];var n=data[0],r=data[1];if(this._transform&&null!=n&&isFinite(n)&&null!=r&&isFinite(r))return H(e,data,this._transform);var o=this.getAxis("x"),l=this.getAxis("y");return e[0]=o.toGlobalCoord(o.dataToCoord(n,t)),e[1]=l.toGlobalCoord(l.dataToCoord(r,t)),e},e.prototype.clampData=function(data,t){var e=this.getAxis("x").scale,n=this.getAxis("y").scale,r=e.getExtent(),o=n.getExtent(),l=e.parse(data[0]),c=n.parse(data[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(r[0],r[1]),l),Math.max(r[0],r[1])),t[1]=Math.min(Math.max(Math.min(o[0],o[1]),c),Math.max(o[0],o[1])),t},e.prototype.pointToData=function(t,e){var n=[];if(this._invTransform)return H(n,t,this._invTransform);var r=this.getAxis("x"),o=this.getAxis("y");return n[0]=r.coordToData(r.toLocalCoord(t[0]),e),n[1]=o.coordToData(o.toLocalCoord(t[1]),e),n},e.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},e.prototype.getArea=function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),n=Math.min(t[0],t[1]),r=Math.min(e[0],e[1]),o=Math.max(t[0],t[1])-n,l=Math.max(e[0],e[1])-r;return new Bt(n,r,o,l)},e}(iO),sO=aO,lO=function(t){function e(e,n,r,o,l){var c=t.call(this,e,n,r)||this;return c.index=0,c.type=o||"value",c.position=l||"bottom",c}return Object(x.a)(e,t),e.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.getGlobalExtent=function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},e.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},e.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}($b),uO=lO;function cO(t,e,n){n=n||{};var r=t.coordinateSystem,o=e.axis,l={},c=o.getAxesOnZeroOf()[0],h=o.position,d=c?"onZero":h,f=o.dim,rect=r.getRect(),y=[rect.x,rect.x+rect.width,rect.y,rect.y+rect.height],v={left:0,right:1,top:0,bottom:1,onZero:2},m=e.get("offset")||0,x="x"===f?[y[2]-m,y[3]+m]:[y[0]-m,y[1]+m];if(c){var _=c.toGlobalCoord(c.dataToCoord(0));x[v.onZero]=Math.max(Math.min(_,x[1]),x[0])}l.position=["y"===f?x[v[d]]:y[0],"x"===f?x[v[d]]:y[3]],l.rotation=Math.PI/2*("x"===f?0:1);l.labelDirection=l.tickDirection=l.nameDirection={top:-1,bottom:1,left:-1,right:1}[h],l.labelOffset=c?x[v[h]]-x[v.onZero]:0,e.get(["axisTick","inside"])&&(l.tickDirection=-l.tickDirection),w.retrieve(n.labelInside,e.get(["axisLabel","inside"]))&&(l.labelDirection=-l.labelDirection);var S=e.get(["axisLabel","rotate"]);return l.labelRotate="top"===d?-S:S,l.z2=1,l}function hO(t){return"cartesian2d"===t.get("coordinateSystem")}function dO(t){var e={xAxisModel:null,yAxisModel:null};return w.each(e,(function(n,r){var o=r.replace(/Model$/,""),l=t.getReferringComponents(o,vr).models[0];e[r]=l})),e}var pO=Math.log;function fO(t,e,n){var r=Ix.prototype,o=r.getTicks.call(n),l=r.getTicks.call(n,!0),c=o.length-1,h=r.getInterval.call(n),d=hb(t,e),f=d.extent,y=d.fixMin,v=d.fixMax;if("log"===t.type){var m=pO(t.base);f=[pO(f[0])/m,pO(f[1])/m]}t.setExtent(f[0],f[1]),t.calcNiceExtent({splitNumber:c,fixMin:y,fixMax:v});var x=r.getExtent.call(t);y&&(f[0]=x[0]),v&&(f[1]=x[1]);var _=r.getInterval.call(t),w=f[0],S=f[1];if(y&&v)_=(S-w)/c;else if(y)for(S=f[0]+_*c;Sf[0]&&isFinite(w)&&isFinite(f[0]);)_=yx(_),w=f[1]-_*c;else{t.getTicks().length-1>c&&(_=yx(_));var M=_*c;(w=Ti((S=Math.ceil(f[1]/_)*_)-M))<0&&f[0]>=0?(w=0,S=Ti(M)):S>0&&f[1]<=0&&(S=0,w=-Ti(M))}var O=(o[0].value-l[0].value)/h,I=(o[c].value-l[c].value)/h;r.setExtent.call(t,w+_*O,S+_*I),r.setInterval.call(t,_),(O||I)&&r.setNiceExtent.call(t,w+_,S-_)}var gO=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=rO,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesMap;function r(t){var e,n=Object(w.keys)(t),r=n.length;if(r){for(var o=[],i=r-1;i>=0;i--){var l=t[+n[i]],c=l.model,h=l.scale;fx(h)&&c.get("alignTicks")&&null==c.get("interval")?o.push(l):(db(h,c),fx(h)&&(e=l))}o.length&&(e||db((e=o.pop()).scale,e.model),Object(w.each)(o,(function(t){fO(t.scale,t.model,e.scale)})))}}this._updateScale(t,this.model),r(n.x),r(n.y);var o={};Object(w.each)(n.x,(function(t){vO(n,"y",t,o)})),Object(w.each)(n.y,(function(t){vO(n,"x",t,o)})),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var r=t.getBoxLayoutParams(),o=!n&&t.get("containLabel"),l=Vu(r,{width:e.getWidth(),height:e.getHeight()});this._rect=l;var c=this._axesList;function h(){Object(w.each)(c,(function(t){var e=t.isHorizontal(),n=e?[0,l.width]:[0,l.height],r=t.inverse?1:0;t.setExtent(n[r],n[1-r]),function(t,e){var n=t.getExtent(),r=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return r-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return r-t+e}}(t,e?l.x:l.y)}))}h(),o&&(Object(w.each)(c,(function(t){if(!t.model.get(["axisLabel","inside"])){var e=function(t){var e=t.model,n=t.scale;if(e.get(["axisLabel","show"])&&!n.isBlank()){var r,o,l=n.getExtent();o=n instanceof Sx?n.count():(r=n.getTicks()).length;var rect,c,h,d,f,y,v,m=t.getLabelModel(),x=fb(t),_=1;o>40&&(_=Math.ceil(o/40));for(var i=0;i0&&r>0||n<0&&r<0)}(t)}var xO=gO,bO=Math.PI,_O=function(){function t(t,e){this.group=new pi,this.opt=e,this.axisModel=t,Object(w.defaults)(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new pi({x:e.position[0],y:e.position[1],rotation:e.rotation});n.updateTransform(),this._transformGroup=n}return t.prototype.hasBuilder=function(t){return!!wO[t]},t.prototype.add=function(t){wO[t](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(t,e,n){var r,o,l=Ri(e-t);return Ei(l)?(o=n>0?"top":"bottom",r="center"):Ei(l-bO)?(o=n>0?"bottom":"top",r="center"):(o="middle",r=l>0&&l0?"right":"left":n>0?"left":"right"),{rotation:l,textAlign:r,textVerticalAlign:o}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),wO={axisLine:function(t,e,n,r){var o=e.get(["axisLine","show"]);if("auto"===o&&t.handleAutoShown&&(o=t.handleAutoShown("axisLine")),o){var l=e.axis.getExtent(),c=r.transform,h=[l[0],0],d=[l[1],0],f=h[0]>d[0];c&&(H(h,h,c),H(d,d,c));var y=Object(w.extend)({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),line=new Kp({shape:{x1:h[0],y1:h[1],x2:d[0],y2:d[1]},style:y,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});Lf(line.shape,line.style.lineWidth),line.anid="line",n.add(line);var v=e.get(["axisLine","symbol"]);if(null!=v){var m=e.get(["axisLine","symbolSize"]);Object(w.isString)(v)&&(v=[v,v]),(Object(w.isString)(m)||Object(w.isNumber)(m))&&(m=[m,m]);var x=yy(e.get(["axisLine","symbolOffset"])||0,m),_=m[0],S=m[1];Object(w.each)([{rotate:t.rotation+Math.PI/2,offset:x[0],r:0},{rotate:t.rotation-Math.PI/2,offset:x[1],r:Math.sqrt((h[0]-d[0])*(h[0]-d[0])+(h[1]-d[1])*(h[1]-d[1]))}],(function(e,r){if("none"!==v[r]&&null!=v[r]){var symbol=fy(v[r],-_/2,-S/2,_,S,y.stroke,!0),o=e.r+e.offset,l=f?d:h;symbol.attr({rotation:e.rotate,x:l[0]+o*Math.cos(t.rotation),y:l[1]-o*Math.sin(t.rotation),silent:!0,z2:11}),n.add(symbol)}}))}}},axisTickLabel:function(t,e,n,r){var o=function(t,e,n,r){var o=n.axis,l=n.getModel("axisTick"),c=l.get("show");"auto"===c&&r.handleAutoShown&&(c=r.handleAutoShown("axisTick"));if(!c||o.scale.isBlank())return;for(var h=l.getModel("lineStyle"),d=r.tickDirection*l.get("length"),f=IO(o.getTicksCoords(),e.transform,d,Object(w.defaults)(h.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),i=0;iv[1]?-1:1,x=["start"===h?v[0]-m*y:"end"===h?v[1]+m*y:(v[0]+v[1])/2,OO(h)?t.labelOffset+d*y:0],_=e.get("nameRotate");null!=_&&(_=_*bO/180),OO(h)?l=_O.innerTextLayout(t.rotation,null!=_?_:t.rotation,d):(l=function(t,e,n,r){var o,l,c=Ri(n-t),h=r[0]>r[1],d="start"===e&&!h||"start"!==e&&h;Ei(c-bO/2)?(l=d?"bottom":"top",o="center"):Ei(c-1.5*bO)?(l=d?"top":"bottom",o="center"):(l="middle",o=c<1.5*bO&&c>bO/2?d?"left":"right":d?"right":"left");return{rotation:c,textAlign:o,textVerticalAlign:l}}(t.rotation,h,_||0,v),null!=(c=t.axisNameAvailableWidth)&&(c=Math.abs(c/Math.sin(l.rotation)),!isFinite(c)&&(c=null)));var S=f.getFont(),M=e.get("nameTruncate",!0)||{},O=M.ellipsis,I=Object(w.retrieve)(t.nameTruncateMaxWidth,M.maxWidth,c),T=new Ga({x:x[0],y:x[1],rotation:l.rotation,silent:_O.isLabelSilent(e),style:cl(f,{text:o,font:S,overflow:"truncate",width:I,ellipsis:O,fill:f.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:f.get("align")||l.textAlign,verticalAlign:f.get("verticalAlign")||l.textVerticalAlign}),z2:1});if(Xf({el:T,componentModel:e,itemName:o}),T.__fullText=o,T.anid="name",e.get("triggerEvent")){var C=_O.makeAxisEventDataBase(e);C.targetType="axisName",C.name=o,Ha(T).eventData=C}r.add(T),T.updateTransform(),n.add(T),T.decomposeTransform()}}};function SO(t){t&&(t.ignore=!0)}function MO(t,e){var n=t&&t.getBoundingRect().clone(),r=e&&e.getBoundingRect().clone();if(n&&r){var o=St([]);return Tt(o,o,-t.rotation),n.applyTransform(Ot([],o,t.getLocalTransform())),r.applyTransform(Ot([],o,e.getLocalTransform())),n.intersect(r)}}function OO(t){return"middle"===t||"center"===t}function IO(t,e,n,r,o){for(var l=[],c=[],h=[],i=0;i=0||t===e}function DO(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[LO(t)]}function kO(t){return!!t.get(["handle","show"])}function LO(t){return t.type+"||"+t.id}var jO={},PO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.render=function(e,n,r,o){this.axisPointerClass&&function(t){var e=DO(t);if(e){var n=e.axisPointerModel,r=e.axis.scale,option=n.option,o=n.get("status"),l=n.get("value");null!=l&&(l=r.parse(l));var c=kO(n);null==o&&(option.status=c?"show":"hide");var h=r.getExtent().slice();h[0]>h[1]&&h.reverse(),(null==l||l>h[1])&&(l=h[1]),l0&&!v.min?v.min=0:null!=v.min&&v.min<0&&!v.max&&(v.max=0);var m=c;null!=v.color&&(m=w.defaults({color:v.color},c));var x=w.merge(w.clone(v),{boundaryGap:t,splitNumber:e,scale:n,axisLine:r,axisTick:o,axisLabel:l,name:v.text,showName:h,nameLocation:"end",nameGap:f,nameTextStyle:m,triggerEvent:y},!1);if(w.isString(d)){var _=x.name;x.name=d.replace("{value}",null!=_?_:"")}else w.isFunction(d)&&(x.name=d(x.name,x));var S=new Pl(x,null,this.ecModel);return w.mixin(S,xb.prototype),S.mainType="radar",S.componentIndex=this.componentIndex,S}),this);this._indicatorModels=v},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:w.merge({lineStyle:{color:"#bbb"}},nI.axisLine),axisLabel:iI(nI.axisLabel,!1),axisTick:iI(nI.axisTick,!1),splitLine:iI(nI.splitLine,!0),splitArea:iI(nI.splitArea,!0),indicator:[]},e}(Uu),oI=rI,aI=["axisLine","axisTickLabel","axisName"],sI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.render=function(t,e,n){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes(),r=w.map(n,(function(t){var n=t.model.get("showName")?t.name:"";return new TO(t.model,{axisName:n,position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}));w.each(r,(function(t){w.each(aI,t.add,t),this.group.add(t.getGroup())}),this)},e.prototype._buildSplitLineAndArea=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes();if(n.length){var r=t.get("shape"),o=t.getModel("splitLine"),l=t.getModel("splitArea"),c=o.getModel("lineStyle"),h=l.getModel("areaStyle"),d=o.get("show"),f=l.get("show"),y=c.get("color"),v=h.get("color"),m=w.isArray(y)?y:[y],x=w.isArray(v)?v:[v],_=[],S=[];if("circle"===r)for(var M=n[0].getTicksCoords(),O=e.cx,I=e.cy,i=0;i3?1.4:o>1?1.2:1.1;gI(this,"zoom","zoomOnMouseWheel",t,{scale:r>0?h:1/h,originX:l,originY:c,isAvailableBehavior:null})}if(n){var d=Math.abs(r);gI(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(r>0?1:-1)*(d>3?.4:d>1?.15:.05),originX:l,originY:c,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){pI(this._zr,"globalPan")||gI(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})},e}(K);function xI(t,e,n){var r=t.target;r.x+=e,r.y+=n,r.dirty()}function bI(t,e,n,r){var o=t.target,l=t.zoomLimit,c=t.zoom=t.zoom||1;if(c*=e,l){var h=l.min||0,d=l.max||1/0;c=Math.max(Math.min(d,c),h)}var f=c/t.zoom;t.zoom=c,o.x-=(n-o.x)*(f-1),o.y-=(r-o.y)*(f-1),o.scaleX*=f,o.scaleY*=f,o.dirty()}var _I,wI={axisPointer:1,tooltip:1,brush:1};function SI(t,e,n){var r=e.getComponentByElement(t.topTarget),o=r&&r.coordinateSystem;return r&&r!==n&&!wI.hasOwnProperty(r.mainType)&&o&&o.model!==n}function MI(svg){Object(w.isString)(svg)&&(svg=(new DOMParser).parseFromString(svg,"text/xml"));var t=svg;for(9===t.nodeType&&(t=t.firstChild);"svg"!==t.nodeName.toLowerCase()||1!==t.nodeType;)t=t.nextSibling;return t}var OI={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},II=Object(w.keys)(OI),TI={"alignment-baseline":"textBaseline","stop-color":"stopColor"},CI=Object(w.keys)(TI),AI=function(){function t(){this._defs={},this._root=null}return t.prototype.parse=function(t,e){e=e||{};var svg=MI(t);this._defsUsePending=[];var n=new pi;this._root=n;var r=[],o=svg.getAttribute("viewBox")||"",l=parseFloat(svg.getAttribute("width")||e.width),c=parseFloat(svg.getAttribute("height")||e.height);isNaN(l)&&(l=null),isNaN(c)&&(c=null),NI(svg,n,null,!0,!1);for(var h,d,f=svg.firstChild;f;)this._parseNode(f,n,r,null,!1,!1),f=f.nextSibling;if(function(defs,t){for(var i=0;i=4&&(h={x:parseFloat(y[0]||0),y:parseFloat(y[1]||0),width:parseFloat(y[2]),height:parseFloat(y[3])})}if(h&&null!=l&&null!=c&&(d=WI(h,{x:0,y:0,width:l,height:c}),!e.ignoreViewBox)){var v=n;(n=new pi).add(v),v.scaleX=v.scaleY=d.scale,v.x=d.x,v.y=d.y}return e.ignoreRootClip||null==l||null==c||n.setClipPath(new Ia({shape:{x:0,y:0,width:l,height:c}})),{root:n,width:l,height:c,viewBoxRect:h,viewBoxTransform:d,named:r}},t.prototype._parseNode=function(t,e,n,r,o,l){var c,h=t.nodeName.toLowerCase(),d=r;if("defs"===h&&(o=!0),"text"===h&&(l=!0),"defs"===h||"switch"===h)c=e;else{if(!o){var f=_I[h];if(f&&Object(w.hasOwn)(_I,h)){c=f.call(this,t,e);var y=t.getAttribute("name");if(y){var v={name:y,namedFrom:null,svgNodeTagLower:h,el:c};n.push(v),"g"===h&&(d=v)}else r&&n.push({name:r.name,namedFrom:r,svgNodeTagLower:h,el:c});e.add(c)}}var m=DI[h];if(m&&Object(w.hasOwn)(DI,h)){var x=m.call(this,t),_=t.getAttribute("id");_&&(this._defs[_]=x)}}if(c&&c.isGroup)for(var S=t.firstChild;S;)1===S.nodeType?this._parseNode(S,c,n,d,o,l):3===S.nodeType&&l&&this._parseText(S,c),S=S.nextSibling},t.prototype._parseText=function(t,e){var text=new fa({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});jI(e,text),NI(t,text,this._defsUsePending,!1,!1),function(text,t){var e=t.__selfStyle;if(e){var n=e.textBaseline,r=n;n&&"auto"!==n?"baseline"===n?r="alphabetic":"before-edge"===n||"text-before-edge"===n?r="top":"after-edge"===n||"text-after-edge"===n?r="bottom":"central"!==n&&"mathematical"!==n||(r="middle"):r="alphabetic",text.style.textBaseline=r}var o=t.__inheritedStyle;if(o){var l=o.textAlign,c=l;l&&("middle"===l&&(c="center"),text.style.textAlign=c)}}(text,e);var n=text.style,r=n.fontSize;r&&r<9&&(n.fontSize=9,text.scaleX*=r/9,text.scaleY*=r/9);var o=(n.fontSize||n.fontFamily)&&[n.fontStyle,n.fontWeight,(n.fontSize||12)+"px",n.fontFamily||"sans-serif"].join(" ");n.font=o;var rect=text.getBoundingRect();return this._textX+=rect.width,e.add(text),text},t.internalField=void(_I={g:function(t,e){var g=new pi;return jI(e,g),NI(t,g,this._defsUsePending,!1,!1),g},rect:function(t,e){var rect=new Ia;return jI(e,rect),NI(t,rect,this._defsUsePending,!1,!1),rect.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),rect.silent=!0,rect},circle:function(t,e){var circle=new vp;return jI(e,circle),NI(t,circle,this._defsUsePending,!1,!1),circle.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),circle.silent=!0,circle},line:function(t,e){var line=new Kp;return jI(e,line),NI(t,line,this._defsUsePending,!1,!1),line.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),line.silent=!0,line},ellipse:function(t,e){var ellipse=new bp;return jI(e,ellipse),NI(t,ellipse,this._defsUsePending,!1,!1),ellipse.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),ellipse.silent=!0,ellipse},polygon:function(t,e){var n,r=t.getAttribute("points");r&&(n=PI(r));var polygon=new Hp({shape:{points:n||[]},silent:!0});return jI(e,polygon),NI(t,polygon,this._defsUsePending,!1,!1),polygon},polyline:function(t,e){var n,r=t.getAttribute("points");r&&(n=PI(r));var polyline=new Xp({shape:{points:n||[]},silent:!0});return jI(e,polyline),NI(t,polyline,this._defsUsePending,!1,!1),polyline},image:function(t,e){var img=new ma;return jI(e,img),NI(t,img,this._defsUsePending,!1,!1),img.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),img.silent=!0,img},text:function(t,e){var n=t.getAttribute("x")||"0",r=t.getAttribute("y")||"0",o=t.getAttribute("dx")||"0",l=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(o),this._textY=parseFloat(r)+parseFloat(l);var g=new pi;return jI(e,g),NI(t,g,this._defsUsePending,!1,!0),g},tspan:function(t,e){var n=t.getAttribute("x"),r=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=r&&(this._textY=parseFloat(r));var o=t.getAttribute("dx")||"0",l=t.getAttribute("dy")||"0",g=new pi;return jI(e,g),NI(t,g,this._defsUsePending,!1,!0),this._textX+=parseFloat(o),this._textY+=parseFloat(l),g},path:function(t,e){var path=pp(t.getAttribute("d")||"");return jI(e,path),NI(t,path,this._defsUsePending,!1,!1),path.silent=!0,path}}),t}(),DI={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),n=parseInt(t.getAttribute("y1")||"0",10),r=parseInt(t.getAttribute("x2")||"10",10),o=parseInt(t.getAttribute("y2")||"0",10),l=new uf(e,n,r,o);return kI(t,l),LI(t,l),l},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),n=parseInt(t.getAttribute("cy")||"0",10),r=parseInt(t.getAttribute("r")||"0",10),o=new cf(e,n,r);return kI(t,o),LI(t,o),o}};function kI(t,e){"userSpaceOnUse"===t.getAttribute("gradientUnits")&&(e.global=!0)}function LI(t,e){for(var n=t.firstChild;n;){if(1===n.nodeType&&"stop"===n.nodeName.toLocaleLowerCase()){var r=n.getAttribute("offset"),o=void 0;o=r&&r.indexOf("%")>0?parseInt(r,10)/100:r?parseFloat(r):0;var l={};HI(n,l,l);var c=l.stopColor||n.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:o,color:c})}n=n.nextSibling}}function jI(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),Object(w.defaults)(e.__inheritedStyle,t.__inheritedStyle))}function PI(t){for(var e=VI(t),n=[],i=0;i0;i-=2){var l=r[i],c=r[i-1],h=VI(l);switch(o=o||[1,0,0,1,0,0],c){case"translate":It(o,o,[parseFloat(h[0]),parseFloat(h[1]||"0")]);break;case"scale":Ct(o,o,[parseFloat(h[0]),parseFloat(h[1]||h[0])]);break;case"rotate":Tt(o,o,-parseFloat(h[0])*FI);break;case"skewX":Ot(o,[1,0,Math.tan(parseFloat(h[0])*FI),1,0,0],o);break;case"skewY":Ot(o,[1,Math.tan(parseFloat(h[0])*FI),0,1,0,0],o);break;case"matrix":o[0]=parseFloat(h[0]),o[1]=parseFloat(h[1]),o[2]=parseFloat(h[2]),o[3]=parseFloat(h[3]),o[4]=parseFloat(h[4]),o[5]=parseFloat(h[5])}}e.setLocalTransform(o)}}(t,e),HI(t,c,h),r||function(t,e,n){for(var i=0;i0,x={api:n,geo:c,mapOrGeoModel:t,data:data,isVisualEncodedByVisualMap:m,isGeo:l,transformInfoRaw:y};"geoJSON"===c.resourceType?this._buildGeoJSON(x):"geoSVG"===c.resourceType&&this._buildSVG(x),this._updateController(t,e,n),this._updateMapSelectHandler(t,h,n,r)},t.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=w.createHashMap(),n=w.createHashMap(),r=this._regionsGroup,o=t.transformInfoRaw,l=t.mapOrGeoModel,data=t.data,c=t.geo.projection,h=c&&c.stream;function d(t,e){return e&&(t=e(t)),t&&[t[0]*o.scaleX+o.x,t[1]*o.scaleY+o.y]}function f(t){for(var e=[],n=!h&&c&&c.project,i=0;i=0)&&(v=o);var m=c?{normal:{align:"center",verticalAlign:"middle"}}:null;sl(e,ll(r),{labelFetcher:v,labelDataIndex:y,defaultText:n},m);var x=e.getTextContent();if(x&&(lT(x).ignore=x.ignore,e.textConfig&&c)){var rect=e.getBoundingRect().clone();e.textConfig.layoutRect=rect,e.textConfig.position=[(c[0]-rect.x)/rect.width*100+"%",(c[1]-rect.y)/rect.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function fT(t,e,n,r,o,l){t.data?t.data.setItemGraphicEl(l,e):Ha(e).eventData={componentType:"geo",componentIndex:o.componentIndex,geoIndex:o.componentIndex,name:n,region:r&&r.option||{}}}function gT(t,e,n,r,o){t.data||Xf({el:e,componentModel:o,itemName:n,itemTooltipOption:r.get("tooltip")})}function yT(t,e,n,r,o){e.highDownSilentOnTouch=!!o.get("selectedMode");var l=r.getModel("emphasis"),c=l.get("focus");return zs(e,c,l.get("blurScope"),l.get("disabled")),t.isGeo&&function(t,e,n){var r=Ha(t);r.componentMainType=e.mainType,r.componentIndex=e.componentIndex,r.componentHighDownName=n}(e,o,n),c}function vT(t,e,n){var r,o=[];function l(){r=[]}function c(){r.length&&(o.push(r),r=[])}var h=e({polygonStart:l,polygonEnd:c,lineStart:l,lineEnd:c,point:function(t,e){isFinite(t)&&isFinite(e)&&r.push([t,e])},sphere:function(){}});return!n&&h.polygonStart(),w.each(t,(function(t){h.lineStart();for(var i=0;i-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(Wd),wT=_T;function ST(t){var e={};t.eachSeriesByType("map",(function(t){var n=t.getHostGeoModel(),r=n?"o"+n.id:"i"+t.getMapType();(e[r]=e[r]||[]).push(t)})),w.each(e,(function(t,e){for(var n,r,o,data=(n=w.map(t,(function(t){return t.getData()})),r=t[0].get("mapValueCalculation"),o={},w.each(n,(function(data){data.each(data.mapDimension("value"),(function(t,e){var n="ec-"+data.getName(e);o[n]=o[n]||[],isNaN(t)||o[n].push(t)}))})),n[0].map(n[0].mapDimension("value"),(function(t,e){for(var l="ec-"+n[0].getName(e),c=0,h=1/0,d=-1/0,f=o[l].length,i=0;i1?(x.width=m,x.height=m/O):(x.height=m,x.width=m*O),x.y=v[1]-x.height/2,x.x=v[0]-x.width/2;else{var T=t.getBoxLayoutParams();T.aspect=O,x=Vu(T,{width:S,height:M})}this.setViewRect(x.x,x.y,x.width,x.height),this.setCenter(t.get("center"),e),this.setZoom(t.get("zoom"))}var PT=function(){function t(){this.dimensions=AT}return t.prototype.create=function(t,e){var n=[];function r(t){return{nameProperty:t.get("nameProperty"),aspectScale:t.get("aspectScale"),projection:t.get("projection")}}t.eachComponent("geo",(function(t,o){var l=t.get("map"),c=new LT(l+o,l,w.extend({nameMap:t.get("nameMap")},r(t)));c.zoomLimit=t.get("scaleLimit"),n.push(c),t.coordinateSystem=c,c.model=t,c.resize=jT,c.resize(t,e)})),t.eachSeries((function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=n[e]}}));var o={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();o[e]=o[e]||[],o[e].push(t)}})),w.each(o,(function(t,o){var l=w.map(t,(function(t){return t.get("nameMap")})),c=new LT(o,o,w.extend({nameMap:w.mergeAll(l)},r(t[0])));c.zoomLimit=w.retrieve.apply(null,w.map(t,(function(t){return t.get("scaleLimit")}))),n.push(c),c.resize=jT,c.resize(t[0],e),w.each(t,(function(t){t.coordinateSystem=c,function(t,e){w.each(e.get("geoCoord"),(function(e,n){t.addGeoCoord(n,e)}))}(c,t)}))})),n},t.prototype.getFilledRegions=function(t,e,n,r){for(var o=(t||[]).slice(),l=w.createHashMap(),i=0;i=0;){var l=e[n];l.hierNode.prelim+=r,l.hierNode.modifier+=r,o+=l.hierNode.change,r+=l.hierNode.shift+o}}(t);var l=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;o?(t.hierNode.prelim=o.hierNode.prelim+e(t,o),t.hierNode.modifier=t.hierNode.prelim-l):t.hierNode.prelim=l}else o&&(t.hierNode.prelim=o.hierNode.prelim+e(t,o));t.parentNode.hierNode.defaultAncestor=function(t,e,n,r){if(e){for(var o=t,l=t,c=l.parentNode.children[0],h=e,d=o.hierNode.modifier,f=l.hierNode.modifier,y=c.hierNode.modifier,v=h.hierNode.modifier;h=ZT(h),l=qT(l),h&&l;){o=ZT(o),c=qT(c),o.hierNode.ancestor=t;var m=h.hierNode.prelim+v-l.hierNode.prelim-f+r(h,l);m>0&&($T(KT(h,t,n),t,m),f+=m,d+=m),v+=h.hierNode.modifier,f+=l.hierNode.modifier,d+=o.hierNode.modifier,y+=c.hierNode.modifier}h&&!ZT(o)&&(o.hierNode.thread=h,o.hierNode.modifier+=v-d),l&&!qT(c)&&(c.hierNode.thread=l,c.hierNode.modifier+=f-y,n=t)}return n}(t,o,t.parentNode.hierNode.defaultAncestor||r[0],e)}function YT(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function XT(t){return arguments.length?t:JT}function UT(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function ZT(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function qT(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function KT(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}function $T(t,e,n){var r=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=r,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=r}function JT(t,e){return t.parentNode===e.parentNode?1:2}var QT=function(){this.parentPoint=[],this.childPoints=[]},tC=function(t){function e(e){return t.call(this,e)||this}return Object(x.a)(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new QT},e.prototype.buildPath=function(t,e){var n=e.childPoints,r=n.length,o=e.parentPoint,l=n[0],c=n[r-1];if(1===r)return t.moveTo(o[0],o[1]),void t.lineTo(l[0],l[1]);var h=e.orient,d="TB"===h||"BT"===h?0:1,f=1-d,y=Ii(e.forkPosition,1),v=[];v[d]=o[d],v[f]=o[f]+(c[f]-o[f])*y,t.moveTo(o[0],o[1]),t.lineTo(v[0],v[1]),t.moveTo(l[0],l[1]),v[d]=l[d],t.lineTo(v[0],v[1]),v[d]=c[d],t.lineTo(v[0],v[1]),t.lineTo(c[0],c[1]);for(var i=1;iM.x)||(I-=Math.PI);var A=T?"left":"right",D=c.getModel("label"),k=D.get("rotate"),L=k*(Math.PI/180),j=_.getTextContent();j&&(_.setTextConfig({position:D.get("position")||A,rotation:null==k?-I:L,origin:"center"}),j.setStyle("verticalAlign","middle"))}var P=c.get(["emphasis","focus"]),N="relative"===P?w.concatArray(l.getAncestorsIndices(),l.getDescendantIndices()):"ancestor"===P?l.getAncestorsIndices():"descendant"===P?l.getDescendantIndices():null;N&&(Ha(e).focus=N),function(t,e,n,r,o,l,c,h){var d=e.getModel(),f=t.get("edgeShape"),y=t.get("layout"),v=t.getOrient(),m=t.get(["lineStyle","curveness"]),x=t.get("edgeForkPosition"),_=d.getModel("lineStyle").getLineStyle(),S=r.__edge;if("curve"===f)e.parentNode&&e.parentNode!==n&&(S||(S=r.__edge=new ef({shape:sC(y,v,m,o,o)})),Ks(S,{shape:sC(y,v,m,l,c)},t));else if("polyline"===f)if("orthogonal"===y){if(e!==n&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var M=e.children,O=[],i=0;ie&&(e=n.height)}this.height=e+1},t.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var i=0,e=this.children,n=e.length;i=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(path){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(path)},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},t.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,i=0;i=0){var r=n.getData().tree.root,o=t.targetNode;if(w.isString(o)&&(o=r.getNodeById(o)),o&&r.contains(o))return{node:o};var l=t.targetNodeId;if(null!=l&&(o=r.getNodeById(l)))return{node:o}}}function _C(t){for(var path=[];t;)(t=t.parentNode)&&path.push(t);return path.reverse()}function wC(t,e){var n=_C(t);return w.indexOf(n,e)>=0}function SC(t,e){for(var n=[];t;){var r=t.dataIndex;n.push({name:t.name,dataIndex:r,value:e.getRawValue(r)}),t=t.parentNode}return n.reverse(),n}var MC=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return Object(x.a)(e,t),e.prototype.getInitialData=function(option){var t={name:option.name,children:option.data},e=option.leaves||{},n=new Pl(e,this,this.ecModel),r=xC.createTree(t,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var o=r.getNodeByDataIndex(e);return o&&o.children.length&&o.isExpand||(t.parentModel=n),t}))}));var o=0;r.eachNode("preorder",(function(t){t.depth>o&&(o=t.depth)}));var l=option.expandAndCollapse&&option.initialTreeDepth>=0?option.initialTreeDepth:o;return r.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=l})),r.data},e.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,e,n){for(var r=this.getData().tree,o=r.root.children[0],l=r.getNodeByDataIndex(t),c=l.getValue(),h=l.name;l&&l!==o;)h=l.parentNode.name+"."+h,l=l.parentNode;return bd("nameValue",{name:h,value:c,noValue:isNaN(c)||null==c})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=SC(r,this),n.collapsed=!r.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(Wd),OC=MC;function IC(t,e){for(var n,r=[t];n=r.pop();)if(e(n),n.isExpand){var o=n.children;if(o.length)for(var i=o.length-1;i>=0;i--)r.push(o[i])}}function TC(t,e){t.eachSeriesByType("tree",(function(t){!function(t,e){var n=function(t,e){return Vu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=n;var r=t.get("layout"),o=0,l=0,c=null;"radial"===r?(o=2*Math.PI,l=Math.min(n.height,n.width)/2,c=XT((function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth}))):(o=n.width,l=n.height,c=XT());var h=t.getData().tree.root,d=h.children[0];if(d){!function(t){var e=t;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,r,o=[e];n=o.pop();)if(r=n.children,n.isExpand&&r.length)for(var i=r.length-1;i>=0;i--){var l=r[i];l.hierNode={defaultAncestor:null,ancestor:l,prelim:0,modifier:0,change:0,shift:0,i:i,thread:null},o.push(l)}}(h),function(t,e,n){for(var r,o=[t],l=[];r=o.pop();)if(l.push(r),r.isExpand){var c=r.children;if(c.length)for(var i=0;iy.getLayout().x&&(y=t),t.depth>v.depth&&(v=t)}));var m=f===y?1:c(f,y)/2,x=m-f.getLayout().x,_=0,w=0,S=0,M=0;if("radial"===r)_=o/(y.getLayout().x+m+x),w=l/(v.depth-1||1),IC(d,(function(t){S=(t.getLayout().x+x)*_,M=(t.depth-1)*w;var e=UT(S,M);t.setLayout({x:e.x,y:e.y,rawX:S,rawY:M},!0)}));else{var O=t.getOrient();"RL"===O||"LR"===O?(w=l/(y.getLayout().x+m+x),_=o/(v.depth-1||1),IC(d,(function(t){M=(t.getLayout().x+x)*w,S="LR"===O?(t.depth-1)*_:o-(t.depth-1)*_,t.setLayout({x:S,y:M},!0)}))):"TB"!==O&&"BT"!==O||(_=o/(y.getLayout().x+m+x),w=l/(v.depth-1||1),IC(d,(function(t){S=(t.getLayout().x+x)*_,M="TB"===O?(t.depth-1)*w:l-(t.depth-1)*w,t.setLayout({x:S,y:M},!0)})))}}}(t,e)}))}function CC(t){t.eachSeriesByType("tree",(function(t){var data=t.getData();data.tree.eachNode((function(t){var style=t.getModel().getModel("itemStyle").getItemStyle(),e=data.ensureUniqueItemVisual(t.dataIndex,"style");Object(w.extend)(e,style)}))}))}var AC=["treemapZoomToNode","treemapRender","treemapMove"];function DC(t){var e=t.getData().tree,n={};e.eachNode((function(e){for(var r=e;r&&r.depth>1;)r=r.parentNode;var o=vc(t.ecModel,r.name||r.dataIndex+"",n);e.setVisual("decal",o)}))}var kC=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventUsingHoverLayer=!0,n}return Object(x.a)(e,t),e.prototype.getInitialData=function(option,t){var e={name:option.name,children:option.data};LC(e);var n=option.levels||[],r=this.designatedVisualItemStyle={},o=new Pl({itemStyle:r},this,t);n=option.levels=function(t,e){var n,r,o=Qi(e.get("color")),l=Qi(e.get(["aria","decal","decals"]));if(!o)return;t=t||[],w.each(t,(function(t){var e=new Pl(t),o=e.get("color"),l=e.get("decal");(e.get(["itemStyle","color"])||o&&"none"!==o)&&(n=!0),(e.get(["itemStyle","decal"])||l&&"none"!==l)&&(r=!0)}));var c=t[0]||(t[0]={});n||(c.color=o.slice());!r&&l&&(c.decal=l.slice());return t}(n,t);var l=w.map(n||[],(function(e){return new Pl(e,o,t)}),this),c=xC.createTree(e,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=c.getNodeByDataIndex(e),r=n?l[n.depth]:null;return t.parentModel=r||o,t}))}));return c.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,e,n){var data=this.getData(),r=this.getRawValue(t);return bd("nameValue",{name:data.getName(t),value:r})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=SC(r,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},w.extend(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=w.createHashMap(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){DC(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(Wd);function LC(t){var e=0;w.each(t.children,(function(t){LC(t);var n=t.value;w.isArray(n)&&(n=n[0]),e+=n}));var n=t.value;w.isArray(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),w.isArray(t.value)?t.value[0]=n:t.value=n}var jC=kC;function PC(t,e,n,r,head,o){var l=[[head?t:t-5,e],[t+n,e],[t+n,e+r],[head?t:t-5,e+r]];return!o&&l.splice(2,0,[t+n+5,e+r/2]),!head&&l.push([t,e+r/2]),l}function NC(t,e,n){Ha(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&SC(n,e)}}var RC=function(){function t(t){this.group=new pi,t.add(this.group)}return t.prototype.render=function(t,e,n,r){var o=t.getModel("breadcrumb"),l=this.group;if(l.removeAll(),o.get("show")&&n){var c=o.getModel("itemStyle"),h=o.getModel("emphasis"),d=c.getModel("textStyle"),f=h.getModel(["itemStyle","textStyle"]),y={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:o.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,y,d),this._renderContent(t,y,c,h,d,f,r),Bu(l,y.pos,y.box)}},t.prototype._prepare=function(t,e,n){for(var r=t;r;r=r.parentNode){var text=lr(r.getModel().get("name"),""),o=n.getTextRect(text),l=Math.max(o.width+16,e.emptyItemWidth);e.totalWidth+=l+8,e.renderList.push({node:r,text:text,width:l})}},t.prototype._renderContent=function(t,e,n,r,o,l,c){for(var h,d,f,y,v,m,x,_,S,M=0,O=e.emptyItemWidth,I=t.get(["breadcrumb","height"]),T=(h=e.pos,d=e.box,y=d.width,v=d.height,m=Ii(h.left,y),x=Ii(h.top,v),_=Ii(h.right,y),S=Ii(h.bottom,v),(isNaN(m)||isNaN(parseFloat(h.left)))&&(m=0),(isNaN(_)||isNaN(parseFloat(h.right)))&&(_=y),(isNaN(x)||isNaN(parseFloat(h.top)))&&(x=0),(isNaN(S)||isNaN(parseFloat(h.bottom)))&&(S=v),f=Mu(f||0),{width:Math.max(_-m-f[1]-f[3],0),height:Math.max(S-x-f[0]-f[2],0)}),C=e.totalWidth,A=e.renderList,D=r.getModel("itemStyle").getItemStyle(),i=A.length-1;i>=0;i--){var k=A[i],L=k.node,j=k.width,text=k.text;C>T.width&&(C-=j-O,j=O,text=null);var P=new Hp({shape:{points:PC(M,0,j,I,i===A.length-1,0===i)},style:Object(w.defaults)(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Ga({style:cl(o,{text:text})}),textConfig:{position:"inside"},z2:1e4*ts,onclick:Object(w.curry)(c,L)});P.disableLabelAnimation=!0,P.getTextContent().ensureState("emphasis").style=cl(l,{text:text}),P.ensureState("emphasis").style=D,zs(P,r.get("focus"),r.get("blurScope"),r.get("disabled")),this.group.add(P),NC(P,t,L),M+=j+8}},t.prototype.remove=function(){this.group.removeAll()},t}(),EC=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(t,e,n,r,o){return!this._elExistsMap[t.id]&&(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:r,easing:o}),!0)},t.prototype.finished=function(t){return this._finishedCallback=t,this},t.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){--e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,r=this._storage.length;i3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var n=e.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var e=t.originX,n=t.originY;if("animating"!==this._state){var r=this.seriesModel.getData().tree.root;if(!r)return;var o=r.getLayout();if(!o)return;var rect=new Bt(o.x,o.y,o.width,o.height),l=this.seriesModel.layoutInfo,c=[1,0,0,1,0,0];It(c,c,[-(e-=l.x),-(n-=l.y)]),Ct(c,c,[t.scale,t.scale]),It(c,c,[e,n]),rect.applyTransform(c),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:rect.x,y:rect.y,width:rect.width,height:rect.height}})}},e.prototype._initEvents=function(t){var e=this;t.on("click",(function(t){if("ready"===e._state){var n=e.seriesModel.get("nodeClick",!0);if(n){var r=e.findTarget(t.offsetX,t.offsetY);if(r){var o=r.node;if(o.getLayout().isLeafRoot)e._rootToNode(r);else if("zoomToNode"===n)e._zoomToNode(r);else if("link"===n){var l=o.hostTree.data.getItemModel(o.dataIndex),link=l.get("link",!0),c=l.get("target",!0)||"blank";link&&ju(link,c)}}}}}),this)},e.prototype._renderBreadcrumb=function(t,e,n){var r=this;n||(n=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(n={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new RC(this.group))).render(t,e,n.node,(function(e){"animating"!==r._state&&(wC(t.getViewRoot(),e)?r._rootToNode({node:e}):r._zoomToNode({node:e}))}))},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,e){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(r){var o=this._storage.background[r.getRawIndex()];if(o){var l=o.transformCoordToLocal(t,e),c=o.shape;if(!(c.x<=l[0]&&l[0]<=c.x+c.width&&c.y<=l[1]&&l[1]<=c.y+c.height))return!1;n={node:r,offsetX:l[0],offsetY:l[1]}}}),this),n},e.type="treemap",e}(ig);var qC=ZC,KC=w.each,$C=w.isObject,JC=-1,QC=function(){function t(option){var e=option.mappingMethod,n=option.type,r=this.option=w.clone(option);this.type=n,this.mappingMethod=e,this._normalizeData=uA[e];var o=t.visualHandlers[n];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[e],"piecewise"===e?(tA(r),function(t){var e=t.pieceList;t.hasSpecialVisual=!1,w.each(e,(function(e,n){e.originIndex=n,null!=e.visual&&(t.hasSpecialVisual=!0)}))}(r)):"category"===e?r.categories?function(t){var e=t.categories,n=t.categoryMap={},r=t.visual;if(KC(e,(function(t,e){n[t]=e})),!w.isArray(r)){var o=[];w.isObject(r)?KC(r,(function(t,e){var r=n[e];o[null!=r?r:JC]=t})):o[JC]=r,r=lA(t,o)}for(var i=e.length-1;i>=0;i--)null==r[i]&&(delete n[e[i]],e.pop())}(r):tA(r,!0):(w.assert("linear"!==e||r.dataExtent),tA(r))}return t.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},t.prototype.getNormalizer=function(){return w.bind(this._normalizeData,this)},t.listVisualTypes=function(){return w.keys(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(t,e,n){w.isObject(t)?w.each(t,e,n):e.call(n,t)},t.mapVisual=function(e,n,r){var o,l=w.isArray(e)?[]:w.isObject(e)?{}:(o=!0,null);return t.eachVisual(e,(function(t,e){var c=n.call(r,t,e);o?l=c:l[e]=c})),l},t.retrieveVisuals=function(e){var n,r={};return e&&KC(t.visualHandlers,(function(t,o){e.hasOwnProperty(o)&&(r[o]=e[o],n=!0)})),n?r:null},t.prepareVisualTypes=function(t){if(w.isArray(t))t=t.slice();else{if(!$C(t))return[];var e=[];KC(t,(function(t,n){e.push(n)})),t=e}return t.sort((function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1})),t},t.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},t.findPieceIndex=function(t,e,n){for(var r,o=1/0,i=0,l=e.length;if[1]&&(f[1]=d);var y=e.get("colorMappingBy"),v={type:c.name,dataExtent:f,visual:c.range};"color"!==v.type||"index"!==y&&"id"!==y?v.mappingMethod="linear":(v.mappingMethod="category",v.loop=!0);var m=new hA(v);return dA(m).drColorMappingBy=y,m}(0,o,l,0,d,m);Object(w.each)(m,(function(t,e){if(t.depth>=n.length||t===n[t.depth]){var l=function(t,e,n,r,o,l){var c=Object(w.extend)({},e);if(o){var h=o.type,d="color"===h&&dA(o).drColorMappingBy,f="index"===d?r:"id"===d?l.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension"));c[h]=o.mapValueToVisual(f)}return c}(o,d,t,e,x,r);fA(t,l,n,r)}}))}else c=gA(d),f.fill=c}}function gA(t){var e=yA(t,"color");if(e){var n=yA(t,"colorAlpha"),r=yA(t,"colorSaturation");return r&&(e=Object(Ge.modifyHSL)(e,null,null,r)),n&&(e=Object(Ge.modifyAlpha)(e,n)),e}}function yA(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function vA(t,e){var n=t.get(e);return Object(w.isArray)(n)&&n.length?{name:e,range:n}:null}var mA=Math.max,xA=Math.min,bA=w.retrieve,_A=w.each,wA=["itemStyle","borderWidth"],SA=["itemStyle","gapWidth"],MA=["upperLabel","show"],OA=["upperLabel","height"],IA={seriesType:"treemap",reset:function(t,e,n,r){var o=n.getWidth(),l=n.getHeight(),c=t.option,h=Vu(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),d=c.size||[],f=Ii(bA(h.width,d[0]),o),y=Ii(bA(h.height,d[1]),l),v=r&&r.type,m=bC(r,["treemapZoomToNode","treemapRootToNode"],t),x="treemapRender"===v||"treemapMove"===v?r.rootRect:null,_=t.getViewRoot(),S=_C(_);if("treemapMove"!==v){var M="treemapZoomToNode"===v?function(t,e,n,r,o){var l,c=(e||{}).node,h=[r,o];if(!c||c===n)return h;var d=r*o,area=d*t.option.zoomToNodeRatio;for(;l=c.parentNode;){for(var f=0,y=l.children,i=0,v=y.length;iNi&&(area=Ni),c=l}areal[1]&&(l[1]=e)}))):l=[NaN,NaN];return{sum:r,dataExtent:l}}(e,c,h);if(0===f.sum)return t.viewChildren=[];if(f.sum=function(t,e,n,r,o){if(!r)return n;for(var l=t.get("visibleMin"),c=o.length,h=c,i=c-1;i>=0;i--){var d=o["asc"===r?c-i-1:i].getValue();d/n*er&&(r=area));var c=t.area*t.area,h=e*e*n;return c?mA(h*r/c,c/(h*o)):1/0}function AA(t,e,rect,n,r){var o=e===rect.width?0:1,l=1-o,c=["x","y"],h=["width","height"],d=rect[c[o]],f=e?t.area/e:0;(r||f>rect[h[l]])&&(f=rect[h[l]]);for(var i=0,y=t.length;ir&&(r=e);var l=r%2?r+2:r+3;o=[];for(var i=0;i0&&(S[0]=-S[0],S[1]=-S[1]);var O=w[0]<0?-1:1;if("start"!==label.__position&&"end"!==label.__position){var I=-Math.atan2(w[1],w[0]);h[0].8?"left":d[0]<-.8?"right":"center",y=d[1]>.8?"top":d[1]<-.8?"bottom":"middle";break;case"start":label.x=-d[0]*m+c[0],label.y=-d[1]*x+c[1],f=d[0]>.8?"right":d[0]<-.8?"left":"center",y=d[1]>.8?"bottom":d[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":label.x=m*O+c[0],label.y=c[1]+T,f=w[0]<0?"right":"left",label.originX=-m*O,label.originY=-T;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":label.x=M[0],label.y=M[1]+T,f="center",label.originY=-T;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":label.x=-m*O+h[0],label.y=h[1]+T,f=w[0]>=0?"right":"left",label.originX=m*O,label.originY=-T}label.scaleX=label.scaleY=r,label.setStyle({verticalAlign:label.__verticalAlign||y,align:label.__align||f})}}}function C(symbol,t){var e=symbol.__specifiedRotation;if(null==e){var n=line.tangentAt(t);symbol.attr("rotation",(1===t?-1:1)*Math.PI/2-Math.atan2(n[1],n[0]))}else symbol.attr("rotation",e)}},e}(pi),gD=fD;function yD(t){var e=t.hostModel,n=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:n.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:n.get("disabled"),blurScope:n.get("blurScope"),focus:n.get("focus"),labelStatesModels:ll(e)}}function vD(t){return isNaN(t[0])||isNaN(t[1])}function mD(t){return t&&!vD(t[0])&&!vD(t[1])}var xD=function(){function t(t){this.group=new pi,this._LineCtor=t||gD}return t.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var n=this,r=n.group,o=n._lineData;n._lineData=t,o||r.removeAll();var l=yD(t);t.diff(o).add((function(n){e._doAdd(t,n,l)})).update((function(n,r){e._doUpdate(o,t,r,n,l)})).remove((function(t){r.remove(o.getItemGraphicEl(t))})).execute()},t.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl((function(e,n){e.updateLayout(t,n)}),this)},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=yD(t),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e){function n(t){t.isGroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var r=t.start;r=0?r+=f:r-=f:x>=0?r-=f:r+=f}return r}function TD(t,e){var n=[],r=Re,o=[[],[],[]],l=[[],[]],c=[];e/=2,t.eachEdge((function(t,h){var d=t.getLayout(),f=t.getVisual("fromSymbol"),y=t.getVisual("toSymbol");d.__original||(d.__original=[O(d[0]),O(d[1])],d[2]&&d.__original.push(O(d[2])));var v=d.__original;if(null!=d[2]){if(M(o[0],v[0]),M(o[1],v[2]),M(o[2],v[1]),f&&"none"!==f){var m=qA(t.node1),x=ID(o,v[0],m*e);r(o[0][0],o[1][0],o[2][0],x,n),o[0][0]=n[3],o[1][0]=n[4],r(o[0][1],o[1][1],o[2][1],x,n),o[0][1]=n[3],o[1][1]=n[4]}if(y&&"none"!==y){m=qA(t.node2),x=ID(o,v[1],m*e);r(o[0][0],o[1][0],o[2][0],x,n),o[1][0]=n[1],o[2][0]=n[2],r(o[0][1],o[1][1],o[2][1],x,n),o[1][1]=n[1],o[2][1]=n[2]}M(d[0],o[0]),M(d[1],o[2]),M(d[2],o[1])}else{if(M(l[0],v[0]),M(l[1],v[1]),sub(c,l[1],l[0]),R(c,c),f&&"none"!==f){m=qA(t.node1);C(l[0],l[0],c,m*e)}if(y&&"none"!==y){m=qA(t.node2);C(l[1],l[1],c,-m*e)}M(d[0],l[0]),M(d[1],l[1])}}))}function CD(t){return"view"===t.type}var AD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.init=function(t,e){var n=new gS,r=new xD,o=this.group;this._controller=new mI(e.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(r.group),this._symbolDraw=n,this._lineDraw=r,this._firstRender=!0},e.prototype.render=function(t,e,n){var r=this,o=t.coordinateSystem;this._model=t;var l=this._symbolDraw,c=this._lineDraw,h=this.group;if(CD(o)){var d={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?h.attr(d):Ks(h,d,t)}TD(t.getGraph(),ZA(t));var data=t.getData();l.updateData(data);var f=t.getEdgeData();c.updateData(f),this._updateNodeAndLinkScale(),this._updateController(t,e,n),clearTimeout(this._layoutTimeout);var y=t.forceLayout,v=t.get(["force","layoutAnimation"]);y&&this._startForceLayoutIteration(y,v);var m=t.get("layout");data.graph.eachNode((function(e){var n=e.dataIndex,o=e.getGraphicEl(),l=e.getModel();if(o){o.off("drag").off("dragend");var c=l.get("draggable");c&&o.on("drag",(function(l){switch(m){case"force":y.warmUp(),!r._layouting&&r._startForceLayoutIteration(y,v),y.setFixed(n),data.setItemLayout(n,[o.x,o.y]);break;case"circular":data.setItemLayout(n,[o.x,o.y]),e.setLayout({fixed:!0},!0),JA(t,"symbolSize",e,[l.offsetX,l.offsetY]),r.updateLayout(t);break;default:data.setItemLayout(n,[o.x,o.y]),XA(t.getGraph(),t),r.updateLayout(t)}})).on("dragend",(function(){y&&y.setUnfixed(n)})),o.setDraggable(c,!!l.get("cursor")),"adjacency"===l.get(["emphasis","focus"])&&(Ha(o).focus=e.getAdjacentDataIndices())}})),data.graph.eachEdge((function(t){var e=t.getGraphicEl(),n=t.getModel().get(["emphasis","focus"]);e&&"adjacency"===n&&(Ha(e).focus={edge:[t.dataIndex],node:[t.node1.dataIndex,t.node2.dataIndex]})}));var x="circular"===t.get("layout")&&t.get(["circular","rotateLabel"]),_=data.getLayout("cx"),w=data.getLayout("cy");data.graph.eachNode((function(t){tD(t,x,_,w)})),this._firstRender=!1},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,e){var n=this;!function r(){t.step((function(t){n.updateLayout(n._model),(n._layouting=!t)&&(e?n._layoutTimeout=setTimeout(r,16):r())}))}()},e.prototype._updateController=function(t,e,n){var r=this,o=this._controller,l=this._controllerHost,c=this.group;o.setPointerChecker((function(e,r,o){var rect=c.getBoundingRect();return rect.applyTransform(c.transform),rect.contain(r,o)&&!SI(e,n,t)})),CD(t.coordinateSystem)?(o.enable(t.get("roam")),l.zoomLimit=t.get("scaleLimit"),l.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",(function(e){xI(l,e.dx,e.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:e.dx,dy:e.dy})})).on("zoom",(function(e){bI(l,e.scale,e.originX,e.originY),n.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),r._updateNodeAndLinkScale(),TD(t.getGraph(),ZA(t)),r._lineDraw.updateLayout(),n.updateLabelLayout()}))):o.disable()},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,data=t.getData(),e=ZA(t);data.eachItemGraphicEl((function(t,n){t&&t.setSymbolScale(e)}))},e.prototype.updateLayout=function(t){TD(t.getGraph(),ZA(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(ig),DD=AD;function kD(t){return"_EC_"+t}var LD=function(){function t(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return t.prototype.isDirected=function(){return this._directed},t.prototype.addNode=function(t,e){t=null==t?""+e:""+t;var n=this._nodesMap;if(!n[kD(t)]){var r=new jD(t,e);return r.hostGraph=this,this.nodes.push(r),n[kD(t)]=r,r}},t.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},t.prototype.getNodeById=function(t){return this._nodesMap[kD(t)]},t.prototype.addEdge=function(t,e,n){var r=this._nodesMap,o=this._edgesMap;if(w.isNumber(t)&&(t=this.nodes[t]),w.isNumber(e)&&(e=this.nodes[e]),t instanceof jD||(t=r[kD(t)]),e instanceof jD||(e=r[kD(e)]),t&&e){var l=t.id+"-"+e.id,c=new PD(t,e,n);return c.hostGraph=this,this._directed&&(t.outEdges.push(c),e.inEdges.push(c)),t.edges.push(c),t!==e&&e.edges.push(c),this.edges.push(c),o[l]=c,c}},t.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},t.prototype.getEdge=function(t,e){t instanceof jD&&(t=t.id),e instanceof jD&&(e=e.id);var n=this._edgesMap;return this._directed?n[t+"-"+e]:n[t+"-"+e]||n[e+"-"+t]},t.prototype.eachNode=function(t,e){for(var n=this.nodes,r=n.length,i=0;i=0&&t.call(e,n[i],i)},t.prototype.eachEdge=function(t,e){for(var n=this.edges,r=n.length,i=0;i=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&t.call(e,n[i],i)},t.prototype.breadthFirstTraverse=function(t,e,n,r){if(e instanceof jD||(e=this._nodesMap[kD(e)]),e){for(var o="out"===n?"outEdges":"in"===n?"inEdges":"edges",i=0;i=0&&r.node2.dataIndex>=0}));for(i=0,r=n.length;i=0&&this[t][e].setItemVisual(this.dataIndex,n,r)},getVisual:function(n){return this[t][e].getItemVisual(this.dataIndex,n)},setLayout:function(n,r){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,r)},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)}}}w.mixin(jD,ND("hostGraph","data")),w.mixin(PD,ND("hostGraph","edgeData"));var RD=LD;function ED(t,e,n,r,o){for(var l=new RD(r),i=0;i "+f)),d++)}var y,v=n.get("coordinateSystem");if("cartesian2d"===v||"polar"===v)y=lx(t,n);else{var m=Pc.get(v),x=m&&m.dimensions||[];w.indexOf(x,"value")<0&&x.concat(["value"]);var _=tx(t,{coordDimensions:x,encodeDefine:n.getEncode()}).dimensions;(y=new Jm(_,n)).initData(t)}var S=new Jm(["value"],n);return S.initData(h,c),o&&o(y,S),vC({mainData:y,struct:l,structAttr:"graph",datas:{node:y,edge:S},datasAttr:{node:"data",edge:"edgeData"}}),l.update(),l}var zD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return Object(x.a)(e,t),e.prototype.init=function(option){t.prototype.init.apply(this,arguments);var e=this;function n(){return e._categoriesData}this.legendVisualProvider=new RM(n,n),this.fillDataTextStyle(option.edges||option.links),this._updateCategoriesData()},e.prototype.mergeOption=function(option){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(option.edges||option.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(option){t.prototype.mergeDefaultAndTheme.apply(this,arguments),er(option,"edgeLabel",["show"])},e.prototype.getInitialData=function(option,t){var e,n=option.edges||option.links||[],r=option.data||option.nodes||[],o=this;if(r&&n){EA(e=this)&&(e.__curvenessList=[],e.__edgeMap={},zA(e));var l=ED(r,n,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t){var e=o._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));var n=Pl.prototype.getModel;function r(path,t){var e=n.call(this,path,t);return e.resolveParentPath=l,e}function l(t){if(t&&("label"===t[0]||"label"===t[1])){var e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}return t}e.wrapMethod("getItemModel",(function(t){return t.resolveParentPath=l,t.getModel=r,t}))}));return w.each(l.edges,(function(t){!function(t,e,n,r){if(EA(n)){var o=VA(t,e,n),l=n.__edgeMap,c=l[BA(o)];l[o]&&!c?l[o].isForward=!0:c&&l[o]&&(c.isForward=!0,l[o].isForward=!1),l[o]=l[o]||[],l[o].push(r)}}(t.node1,t.node2,this,t.dataIndex)}),this),l.data}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,e,n){if("edge"===n){var r=this.getData(),o=this.getDataParams(t,n),l=r.graph.getEdgeByIndex(t),c=r.getName(l.node1.dataIndex),h=r.getName(l.node2.dataIndex),d=[];return null!=c&&d.push(c),null!=h&&d.push(h),bd("nameValue",{name:d.join(" > "),value:o.value,noValue:null==o.value})}return Ld({series:this,dataIndex:t,multipleSeries:e})},e.prototype._updateCategoriesData=function(){var t=w.map(this.option.categories||[],(function(t){return null!=t.value?t:w.extend({value:0},t)})),e=new Jm(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t)}))},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Wd),VD=zD,BD={type:"graphRoam",event:"graphRoam",update:"none"};var FD=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},GD=function(t){function e(e){var n=t.call(this,e)||this;return n.type="pointer",n}return Object(x.a)(e,t),e.prototype.getDefaultShape=function(){return new FD},e.prototype.buildPath=function(t,e){var n=Math.cos,r=Math.sin,o=e.r,l=e.width,c=e.angle,h=e.x-n(c)*l*(l>=o/3?1:2),d=e.y-r(c)*l*(l>=o/3?1:2);c=e.angle-Math.PI/2,t.moveTo(h,d),t.lineTo(e.x+n(c)*l,e.y+r(c)*l),t.lineTo(e.x+n(e.angle)*o,e.y+r(e.angle)*o),t.lineTo(e.x-n(c)*l,e.y-r(c)*l),t.lineTo(h,d)},e}(ha);function HD(t,e){var label=null==t?"":t+"";return e&&(Object(w.isString)(e)?label=e.replace("{value}",label):Object(w.isFunction)(e)&&(label=e(t))),label}var WD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.render=function(t,e,n){this.group.removeAll();var r=t.get(["axisLine","lineStyle","color"]),o=function(t,e){var n=t.get("center"),r=e.getWidth(),o=e.getHeight(),l=Math.min(r,o);return{cx:Ii(n[0],e.getWidth()),cy:Ii(n[1],e.getHeight()),r:Ii(t.get("radius"),l/2)}}(t,n);this._renderMain(t,e,n,r,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,e,n,r,o){var l=this.group,c=t.get("clockwise"),h=-t.get("startAngle")/180*Math.PI,d=-t.get("endAngle")/180*Math.PI,f=t.getModel("axisLine"),y=f.get("roundCap")?$S:Rp,v=f.get("show"),m=f.getModel("lineStyle"),x=m.get("width"),_=[h,d];Go(_,!c);for(var S=(d=_[1])-(h=_[0]),M=h,O=[],i=0;v&&i=t&&(0===i?0:r[i-1][0])Math.PI/2&&(W+=Math.PI):"tangential"===H?W=-L-Math.PI/2:Object(w.isNumber)(H)&&(W=H*Math.PI/180),0===W?v.add(new Ga({style:cl(T,{text:label,x:F,y:G,verticalAlign:y<-.8?"top":y>.8?"bottom":"middle",align:f<-.4?"left":f>.4?"right":"center"},{inheritColor:B}),silent:!0})):v.add(new Ga({style:cl(T,{text:label,x:F,y:G,verticalAlign:"middle",align:"center"},{inheritColor:B}),silent:!0,originX:F,originY:G,rotation:W}))}if(I.get("show")&&i!==C){V=(V=I.get("distance"))?V+d:d;for(var Y=0;Y<=A;Y++){f=Math.cos(L),y=Math.sin(L);var X=new Kp({shape:{x1:f*(_-V)+m,y1:y*(_-V)+x,x2:f*(_-k-V)+m,y2:y*(_-k-V)+x},silent:!0,style:R});"auto"===R.stroke&&X.setStyle({stroke:r((i+Y/A)/C)}),v.add(X),L+=P}L-=P}else L+=j}},e.prototype._renderPointer=function(t,e,n,r,o,l,c,h,d){var f=this.group,y=this._data,v=this._progressEls,m=[],x=t.get(["pointer","show"]),_=t.getModel("progress"),S=_.get("show"),data=t.getData(),M=data.mapDimension("value"),O=+t.get("min"),I=+t.get("max"),T=[O,I],C=[l,c];function A(e,n){var r,l=data.getItemModel(e).getModel("pointer"),c=Ii(l.get("width"),o.r),h=Ii(l.get("length"),o.r),d=t.get(["pointer","icon"]),f=l.get("offsetCenter"),y=Ii(f[0],o.r),v=Ii(f[1],o.r),m=l.get("keepAspect");return(r=d?fy(d,y-c/2,v-h,c,h,null,m):new GD({shape:{angle:-Math.PI/2,width:c,r:h,x:y,y:v}})).rotation=-(n+Math.PI/2),r.x=o.cx,r.y=o.cy,r}function D(t,e){var n=_.get("roundCap")?$S:Rp,r=_.get("overlap"),c=r?_.get("width"):d/data.count(),f=r?o.r-c:o.r-(t+1)*c,y=r?o.r:o.r-t*c,progress=new n({shape:{startAngle:l,endAngle:e,cx:o.cx,cy:o.cy,clockwise:h,r0:f,r:y}});return r&&(progress.z2=I-data.get(M,t)%I),progress}(S||x)&&(data.diff(y).add((function(e){var n=data.get(M,e);if(x){var r=A(e,l);$s(r,{rotation:-((isNaN(+n)?C[0]:Oi(n,T,C,!0))+Math.PI/2)},t),f.add(r),data.setItemGraphicEl(e,r)}if(S){var progress=D(e,l),o=_.get("clip");$s(progress,{shape:{endAngle:Oi(n,T,C,o)}},t),f.add(progress),Wa(t.seriesIndex,data.dataType,e,progress),m[e]=progress}})).update((function(e,n){var r=data.get(M,e);if(x){var o=y.getItemGraphicEl(n),c=o?o.rotation:l,h=A(e,c);h.rotation=c,Ks(h,{rotation:-((isNaN(+r)?C[0]:Oi(r,T,C,!0))+Math.PI/2)},t),f.add(h),data.setItemGraphicEl(e,h)}if(S){var d=v[n],progress=D(e,d?d.shape.endAngle:l),w=_.get("clip");Ks(progress,{shape:{endAngle:Oi(r,T,C,w)}},t),f.add(progress),Wa(t.seriesIndex,data.dataType,e,progress),m[e]=progress}})).execute(),data.each((function(t){var e=data.getItemModel(t),n=e.getModel("emphasis"),o=n.get("focus"),l=n.get("blurScope"),c=n.get("disabled");if(x){var h=data.getItemGraphicEl(t),d=data.getItemVisual(t,"style"),f=d.fill;if(h instanceof ma){var y=h.style;h.useStyle(Object(w.extend)({image:y.image,x:y.x,y:y.y,width:y.width,height:y.height},d))}else h.useStyle(d),"pointer"!==h.type&&h.setColor(f);h.setStyle(e.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===h.style.fill&&h.setStyle("fill",r(Oi(data.get(M,t),T,[0,1],!0))),h.z2EmphasisLift=0,Gs(h,e),zs(h,o,l,c)}if(S){var progress=m[t];progress.useStyle(data.getItemVisual(t,"style")),progress.setStyle(e.getModel(["progress","itemStyle"]).getItemStyle()),progress.z2EmphasisLift=0,Gs(progress,e),zs(progress,o,l,c)}})),this._progressEls=m)},e.prototype._renderAnchor=function(t,e){var n=t.getModel("anchor");if(n.get("show")){var r=n.get("size"),o=n.get("icon"),l=n.get("offsetCenter"),c=n.get("keepAspect"),h=fy(o,e.cx-r/2+Ii(l[0],e.r),e.cy-r/2+Ii(l[1],e.r),r,r,null,c);h.z2=n.get("showAbove")?1:0,h.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(h)}},e.prototype._renderTitleAndDetail=function(t,e,n,r,o){var l=this,data=t.getData(),c=data.mapDimension("value"),h=+t.get("min"),d=+t.get("max"),f=new pi,y=[],v=[],m=t.isAnimationEnabled(),x=t.get(["pointer","showAbove"]);data.diff(this._data).add((function(t){y[t]=new Ga({silent:!0}),v[t]=new Ga({silent:!0})})).update((function(t,e){y[t]=l._titleEls[e],v[t]=l._detailEls[e]})).execute(),data.each((function(e){var n=data.getItemModel(e),l=data.get(c,e),_=new pi,w=r(Oi(l,[h,d],[0,1],!0)),S=n.getModel("title");if(S.get("show")){var M=S.get("offsetCenter"),O=o.cx+Ii(M[0],o.r),I=o.cy+Ii(M[1],o.r);(P=y[e]).attr({z2:x?0:2,style:cl(S,{x:O,y:I,text:data.getName(e),align:"center",verticalAlign:"middle"},{inheritColor:w})}),_.add(P)}var T=n.getModel("detail");if(T.get("show")){var C=T.get("offsetCenter"),A=o.cx+Ii(C[0],o.r),D=o.cy+Ii(C[1],o.r),k=Ii(T.get("width"),o.r),L=Ii(T.get("height"),o.r),j=t.get(["progress","show"])?data.getItemVisual(e,"style").fill:w,P=v[e],N=T.get("formatter");P.attr({z2:x?0:2,style:cl(T,{x:A,y:D,text:HD(l,N),width:isNaN(k)?null:k,height:isNaN(L)?null:L,align:"center",verticalAlign:"middle"},{inheritColor:j})}),xl(P,{normal:T},l,(function(t){return HD(t,N)})),m&&bl(P,e,data,t,{getFormattedLabel:function(t,e,n,r,o,c){return HD(c?c.interpolatedValue:l,N)}}),_.add(P)}f.add(_)})),this.group.add(f),this._titleEls=y,this._detailEls=v},e.type="gauge",e}(ig),YD=WD,XD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="itemStyle",n}return Object(x.a)(e,t),e.prototype.getInitialData=function(option,t){return PM(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(Wd),UD=XD;var ZD=["itemStyle","opacity"],qD=function(t){function e(data,e){var n=t.call(this)||this,polygon=n,r=new Xp,text=new Ga;return polygon.setTextContent(text),n.setTextGuideLine(r),n.updateData(data,e,!0),n}return Object(x.a)(e,t),e.prototype.updateData=function(data,t,e){var polygon=this,n=data.hostModel,r=data.getItemModel(t),o=data.getItemLayout(t),l=r.getModel("emphasis"),c=r.get(ZD);c=null==c?1:c,e||nl(polygon),polygon.useStyle(data.getItemVisual(t,"style")),polygon.style.lineJoin="round",e?(polygon.setShape({points:o.points}),polygon.style.opacity=0,$s(polygon,{style:{opacity:c}},n,t)):Ks(polygon,{style:{opacity:c},shape:{points:o.points}},n,t),Gs(polygon,r),this._updateLabel(data,t),zs(this,l.get("focus"),l.get("blurScope"),l.get("disabled"))},e.prototype._updateLabel=function(data,t){var polygon=this,e=this.getTextGuideLine(),n=polygon.getTextContent(),r=data.hostModel,o=data.getItemModel(t),l=data.getItemLayout(t).label,style=data.getItemVisual(t,"style"),c=style.fill;sl(n,ll(o),{labelFetcher:data.hostModel,labelDataIndex:t,defaultOpacity:style.opacity,defaultText:data.getName(t)},{normal:{align:l.textAlign,verticalAlign:l.verticalAlign}}),polygon.setTextConfig({local:!0,inside:!!l.inside,insideStroke:c,outsideFill:c});var h=l.linePoints;e.setShape({points:h}),polygon.textGuideLineConfig={anchor:h?new kt(h[0][0],h[0][1]):null},Ks(n,{style:{x:l.x,y:l.y}},r,t),n.attr({rotation:l.rotation,originX:l.x,originY:l.y,z2:10}),M_(polygon,O_(o),{stroke:c})},e}(Hp),KD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreLabelLineUpdate=!0,n}return Object(x.a)(e,t),e.prototype.render=function(t,e,n){var data=t.getData(),r=this._data,o=this.group;data.diff(r).add((function(t){var e=new qD(data,t);data.setItemGraphicEl(t,e),o.add(e)})).update((function(t,e){var n=r.getItemGraphicEl(e);n.updateData(data,t),o.add(n),data.setItemGraphicEl(t,n)})).remove((function(e){el(r.getItemGraphicEl(e),t,e)})).execute(),this._data=data},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(ig),$D=KD,JD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.init=function(option){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new RM(w.bind(this.getData,this),w.bind(this.getRawData,this)),this._defaultLabelLine(option)},e.prototype.getInitialData=function(option,t){return PM(this,{coordDimensions:["value"],encodeDefaulter:w.curry(uc,this)})},e.prototype._defaultLabelLine=function(option){er(option,"labelLine",["show"]);var t=option.labelLine,e=option.emphasis.labelLine;t.show=t.show&&option.label.show,e.show=e.show&&option.emphasis.label.show},e.prototype.getDataParams=function(e){var data=this.getData(),n=t.prototype.getDataParams.call(this,e),r=data.mapDimension("value"),o=data.getSum(r);return n.percent=o?+(data.get(r,e)/o*100).toFixed(2):0,n.$vars.push("percent"),n},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Wd),QD=JD;function tk(t,e){t.eachSeriesByType("funnel",(function(t){var data=t.getData(),n=data.mapDimension("value"),r=t.get("sort"),o=function(t,e){return Vu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),l=t.get("orient"),c=o.width,h=o.height,d=function(data,t){for(var e=data.mapDimension("value"),n=data.mapArray(e,(function(t){return t})),r=[],o="ascending"===t,i=0,l=data.count();i5)return;var r=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==r.behavior&&this._dispatchExpand({axisExpandWindow:r.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&gk(this,"mousemove")){var e=this._model,n=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),r=n.behavior;"jump"===r&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===r?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===r?null:{duration:0}})}}};function gk(view,t){var e=view._model;return e.get("axisExpandable")&&e.get("axisExpandTriggerOn")===t}var yk=pk,vk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var e=this.option;t&&w.merge(e,t,!0),this._initDimensions()},e.prototype.contains=function(t,e){var n=t.get("parallelIndex");return null!=n&&e.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){w.each(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])}),this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[],n=w.filter(this.ecModel.queryComponents({mainType:"parallelAxis"}),(function(t){return(t.get("parallelIndex")||0)===this.componentIndex}),this);w.each(n,(function(n){t.push("dim"+n.get("dim")),e.push(n.componentIndex)}))},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Uu),mk=vk,xk=function(t){function e(e,n,r,o,l){var c=t.call(this,e,n,r)||this;return c.type=o||"value",c.axisIndex=l,c}return Object(x.a)(e,t),e.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},e}($b);function bk(t,e,n,r,o,l){t=t||0;var c=n[1]-n[0];if(null!=o&&(o=wk(o,[0,c])),null!=l&&(l=Math.max(l,null!=o?o:0)),"all"===r){var h=Math.abs(e[1]-e[0]);h=wk(h,[0,c]),o=l=wk(h,[o,l]),r=0}e[0]=wk(e[0],n),e[1]=wk(e[1],n);var d=_k(e,r);e[r]+=t;var f,y=o||0,v=n.slice();return d.sign<0?v[0]+=y:v[1]-=y,e[r]=wk(e[r],v),f=_k(e,r),null!=o&&(f.sign!==d.sign||f.spanl&&(e[1-r]=e[r]+f.sign*l),e}function _k(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function wk(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}var Sk=w.each,Mk=Math.min,Ok=Math.max,Ik=Math.floor,Tk=Math.ceil,Ck=Ti,Ak=Math.PI;function Dk(t,e){return Mk(Ok(t,e[0]),e[1])}function kk(t,e){var n=e.layoutLength/(e.axisCount-1);return{position:n*t,axisNameAvailableWidth:n,axisLabelShow:!0}}function Lk(t,e){var n,r,o=e.layoutLength,l=e.axisExpandWidth,c=e.axisCount,h=e.axisCollapseWidth,d=e.winInnerIndices,f=h,y=!1;return t=n&&l<=n+e.axisLength&&c>=r&&c<=r+e.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(t,e){e.eachSeries((function(n){if(t.contains(n,e)){var data=n.getData();Sk(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(data,data.mapDimension(t)),db(e.scale,e.model)}),this)}}),this)},t.prototype.resize=function(t,e){this._rect=Vu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var t,e=this._model,rect=this._rect,n=["x","y"],r=["width","height"],o=e.get("layout"),l="horizontal"===o?0:1,c=rect[r[l]],h=[0,c],d=this.dimensions.length,f=Dk(e.get("axisExpandWidth"),h),y=Dk(e.get("axisExpandCount")||0,[0,d]),v=e.get("axisExpandable")&&d>3&&d>y&&y>1&&f>0&&c>0,m=e.get("axisExpandWindow");m?(t=Dk(m[1]-m[0],h),m[1]=m[0]+t):(t=Dk(f*(y-1),h),(m=[f*(e.get("axisExpandCenter")||Ik(d/2))-t/2])[1]=m[0]+t);var x=(c-t)/(d-y);x<3&&(x=0);var _=[Ik(Ck(m[0]/f,1))+1,Tk(Ck(m[1]/f,1))-1],w=x/f*m[0];return{layout:o,pixelDimIndex:l,layoutBase:rect[n[l]],layoutLength:c,axisBase:rect[n[1-l]],axisLength:rect[r[1-l]],axisExpandable:v,axisExpandWidth:f,axisCollapseWidth:x,axisExpandWindow:m,axisCount:d,winInnerIndices:_,axisExpandWindow0Pos:w}},t.prototype._layoutAxes=function(){var rect=this._rect,t=this._axesMap,e=this.dimensions,n=this._makeLayoutInfo(),r=n.layout;t.each((function(t){var e=[0,n.axisLength],r=t.inverse?1:0;t.setExtent(e[r],e[1-r])})),Sk(e,(function(t,e){var o=(n.axisExpandable?Lk:kk)(e,n),l={horizontal:{x:o.position,y:n.axisLength},vertical:{x:0,y:o.position}},c={horizontal:Ak/2,vertical:0},h=[l[r].x+rect.x,l[r].y+rect.y],d=c[r],f=[1,0,0,1,0,0];Tt(f,f,d),It(f,f,h),this._axesLayout[t]={position:h,rotation:d,transform:f,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},t.prototype.getAxis=function(t){return this._axesMap.get(t)},t.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},t.prototype.eachActiveState=function(data,t,e,n){null==e&&(e=0),null==n&&(n=data.count());var r=this._axesMap,o=this.dimensions,l=[],c=[];w.each(o,(function(t){l.push(data.mapDimension(t)),c.push(r.get(t).model)}));for(var h=this.hasAxisBrushed(),d=e;do*(1-y[0])?(d="jump",c=h-o*(1-y[2])):(c=h-o*y[1])>=0&&(c=h-o*(1-y[1]))<=0&&(c=0),(c*=e.axisExpandWidth/f)?bk(c,r,l,"all"):d="none";else{var m=r[1]-r[0];(r=[Ok(0,l[1]*h/m-m/2)])[1]=Mk(l[1],r[0]+m),r[0]=r[1]-m}return{axisExpandWindow:r,behavior:d}},t}();var Pk={create:function(t,e){var n=[];return t.eachComponent("parallel",(function(r,o){var l=new jk(r,t,e);l.name="parallel_"+o,l.resize(r,e),r.coordinateSystem=l,l.model=r,n.push(l)})),t.eachSeries((function(t){if("parallel"===t.get("coordinateSystem")){var e=t.getReferringComponents("parallel",vr).models[0];t.coordinateSystem=e.coordinateSystem}})),n}},Nk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.activeIntervals=[],n}return Object(x.a)(e,t),e.prototype.getAreaSelectStyle=function(){return Pr([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var e=this.activeIntervals=w.clone(t);if(e)for(var i=e.length-1;i>=0;i--)Ci(e[i])},e.prototype.getActiveState=function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,r=e.length;iGk}(t)||l){if(c&&!l){"single"===h.brushMode&&rL(t);var d=Object(w.clone)(h);d.brushType=_L(d.brushType,c),d.panelId=c===Ek?null:c.panelId,l=t._creatingCover=Kk(t,d),t._covers.push(l)}if(l){var f=ML[_L(t._brushType,c)];l.__brushOption.range=f.getCreatingRange(vL(t,l,t._track)),r&&($k(t,l),f.updateCommon(t,l)),Jk(t,l),o={isEnd:r}}}else r&&"single"===h.brushMode&&h.removeOnClick&&nL(t,e,n)&&rL(t)&&(o={isEnd:r,removeOnClick:!0});return o}function _L(t,e){return"auto"===t?e.defaultBrushType:t}var wL={mousedown:function(t){if(this._dragging)SL(this,t);else if(!t.target||!t.target.draggable){mL(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=nL(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,n=t.offsetY,r=this.group.transformCoordToLocal(e,n);if(function(t,e,n){if(t._brushType&&!function(t,e,n){var r=t._zr;return e<0||e>r.getWidth()||n<0||n>r.getHeight()}(t,e.offsetX,e.offsetY)){var r=t._zr,o=t._covers,l=nL(t,e,n);if(!t._dragging)for(var i=0;i=0&&(o[r[i].depth]=new Pl(r[i],this,t));if(n&&e)return ED(n,e,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,r=n.getData().getItemLayout(e);if(r){var o=r.depth,l=n.levelModels[o];l&&(t.parentModel=l)}return t})),e.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,r=n.getGraph().getEdgeByIndex(e).node1.getLayout();if(r){var o=r.depth,l=n.levelModels[o];l&&(t.parentModel=l)}return t}))})).data},e.prototype.setNodePosition=function(t,e){var n=(this.option.data||this.option.nodes)[t];n.localX=e[0],n.localY=e[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,e,n){function r(t){return isNaN(t)||null==t}if("edge"===n){var o=this.getDataParams(t,n),l=o.data,c=o.value;return bd("nameValue",{name:l.source+" -- "+l.target,value:c,noValue:r(c)})}var h=this.getGraph().getNodeByIndex(t).getLayout().value,d=this.getDataParams(t,n).data.name;return bd("nameValue",{name:null!=d?d+"":null,value:h,noValue:r(h)})},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(e,n){var r=t.prototype.getDataParams.call(this,e,n);if(null==r.value&&"node"===n){var o=this.getGraph().getNodeByIndex(e).getLayout().value;r.value=o}return r},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(Wd),GL=FL;function HL(t,e){t.eachSeriesByType("sankey",(function(t){var n=t.get("nodeWidth"),r=t.get("nodeGap"),o=function(t,e){return Vu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=o;var l=o.width,c=o.height,h=t.getGraph(),d=h.nodes,f=h.edges;!function(t){w.each(t,(function(t){var e=QL(t.outEdges,JL),n=QL(t.inEdges,JL),r=t.getValue()||0,o=Math.max(e,n,r);t.setLayout({value:o},!0)}))}(d),function(t,e,n,r,o,l,c,h,d){(function(t,e,n,r,o,l,c){for(var h=[],d=[],f=[],y=[],v=0,i=0;i=0;M&&S.depth>m&&(m=S.depth),_.setLayout({depth:M?S.depth:v},!0),"vertical"===l?_.setLayout({dy:n},!0):_.setLayout({dx:n},!0);for(var O=0;O<_.outEdges.length;O++){var I=_.outEdges[O];h[e.indexOf(I)]=0;var T=I.node2;0==--d[t.indexOf(T)]&&y.indexOf(T)<0&&y.push(T)}}++v,f=y,y=[]}for(i=0;iv-1?m:v-1;c&&"left"!==c&&function(t,e,n,r){if("right"===e){for(var o=[],l=t,c=0;l.length;){for(var i=0;i0;l--)XL(h,d*=.99,c),YL(h,o,n,r,c),tj(h,d,c),YL(h,o,n,r,c)}(t,e,l,o,r,c,h),function(t,e){var n="vertical"===e?"x":"y";w.each(t,(function(t){t.outEdges.sort((function(a,b){return a.node2.getLayout()[n]-b.node2.getLayout()[n]})),t.inEdges.sort((function(a,b){return a.node1.getLayout()[n]-b.node1.getLayout()[n]}))})),w.each(t,(function(t){var e=0,n=0;w.each(t.outEdges,(function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy})),w.each(t.inEdges,(function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy}))}))}(t,h)}(d,f,n,r,l,c,0!==w.filter(d,(function(t){return 0===t.getLayout().value})).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))}))}function WL(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function YL(t,e,n,r,o){var l="vertical"===o?"x":"y";w.each(t,(function(t){var c,h,d;t.sort((function(a,b){return a.getLayout()[l]-b.getLayout()[l]}));for(var f=0,y=t.length,v="vertical"===o?"dx":"dy",i=0;i0&&(c=h.getLayout()[l]+d,"vertical"===o?h.setLayout({x:c},!0):h.setLayout({y:c},!0)),f=h.getLayout()[l]+h.getLayout()[v]+e;if((d=f-e-("vertical"===o?r:n))>0){c=h.getLayout()[l]-d,"vertical"===o?h.setLayout({x:c},!0):h.setLayout({y:c},!0),f=c;for(i=y-2;i>=0;--i)(d=(h=t[i]).getLayout()[l]+h.getLayout()[v]+e-f)>0&&(c=h.getLayout()[l]-d,"vertical"===o?h.setLayout({x:c},!0):h.setLayout({y:c},!0)),f=h.getLayout()[l]}}))}function XL(t,e,n){w.each(t.slice().reverse(),(function(t){w.each(t,(function(t){if(t.outEdges.length){var r=QL(t.outEdges,UL,n)/QL(t.outEdges,JL);if(isNaN(r)){var o=t.outEdges.length;r=o?QL(t.outEdges,ZL,n)/o:0}if("vertical"===n){var l=t.getLayout().x+(r-$L(t,n))*e;t.setLayout({x:l},!0)}else{var c=t.getLayout().y+(r-$L(t,n))*e;t.setLayout({y:c},!0)}}}))}))}function UL(t,e){return $L(t.node2,e)*t.getValue()}function ZL(t,e){return $L(t.node2,e)}function qL(t,e){return $L(t.node1,e)*t.getValue()}function KL(t,e){return $L(t.node1,e)}function $L(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function JL(t){return t.getValue()}function QL(t,e,n){for(var r=0,o=t.length,i=-1;++il&&(l=e)})),w.each(n,(function(e){var n=new hA({type:"color",mappingMethod:"linear",dataExtent:[o,l],visual:t.get("color")}).mapValueToVisual(e.getLayout().value),r=e.getModel().get(["itemStyle","color"]);null!=r?(e.setVisual("color",r),e.setVisual("style",{fill:r})):(e.setVisual("color",n),e.setVisual("style",{fill:n}))}))}r.length&&w.each(r,(function(t){var e=t.getModel().get("lineStyle");t.setVisual("style",e)}))}))}var nj=function(){function t(){}return t.prototype.getInitialData=function(option,t){var e,n,r=t.getComponent("xAxis",this.get("xAxisIndex")),o=t.getComponent("yAxis",this.get("yAxisIndex")),l=r.get("type"),c=o.get("type");"category"===l?(option.layout="horizontal",e=r.getOrdinalMeta(),n=!0):"category"===c?(option.layout="vertical",e=o.getOrdinalMeta(),n=!0):option.layout=option.layout||"horizontal";var h=["x","y"],d="horizontal"===option.layout?0:1,f=this._baseAxisDim=h[d],y=h[1-d],v=[r,o],m=v[d].get("type"),x=v[1-d].get("type"),data=option.data;if(data&&n){var _=[];w.each(data,(function(t,e){var n;w.isArray(t)?(n=t.slice(),t.unshift(e)):w.isArray(t.value)?((n=w.extend({},t)).value=n.value.slice(),t.value.unshift(e)):n=t,_.push(n)})),option.data=_}var S=this.defaultValueDimensions,M=[{name:f,type:Dm(m),ordinalMeta:e,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:y,type:Dm(x),dimsDef:S.slice()}];return PM(this,{coordDimensions:M,dimensionsCount:S.length+1,encodeDefaulter:w.curry(lc,M,this)})},t.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},t}(),ij=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}return Object(x.a)(e,t),e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(Wd);Object(w.mixin)(ij,nj,!0);var rj=ij,oj=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.render=function(t,e,n){var data=t.getData(),r=this.group,o=this._data;this._data||r.removeAll();var l="horizontal"===t.get("layout")?1:0;data.diff(o).add((function(t){if(data.hasValue(t)){var e=lj(data.getItemLayout(t),data,t,l,!0);data.setItemGraphicEl(t,e),r.add(e)}})).update((function(t,e){var n=o.getItemGraphicEl(e);if(data.hasValue(t)){var c=data.getItemLayout(t);n?(nl(n),uj(c,n,data,t)):n=lj(c,data,t,l),r.add(n),data.setItemGraphicEl(t,n)}else r.remove(n)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)})).execute(),this._data=data},e.prototype.remove=function(t){var e=this.group,data=this._data;this._data=null,data&&data.eachItemGraphicEl((function(t){t&&e.remove(t)}))},e.type="boxplot",e}(ig),aj=function(){},sj=function(t){function e(e){var n=t.call(this,e)||this;return n.type="boxplotBoxPath",n}return Object(x.a)(e,t),e.prototype.getDefaultShape=function(){return new aj},e.prototype.buildPath=function(t,e){var n=e.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();i_){var T=[M,I];r.push(T)}}}return{boxData:n,outliers:r}}(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};var gj=["color","borderColor"],yj=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.render=function(t,e,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,e,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,e,n,r){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},e.prototype.eachRendered=function(t){Zf(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t){var data=t.getData(),e=this._data,n=this.group,r=data.getLayout("isSimpleBox"),o=t.get("clip",!0),l=t.coordinateSystem,c=l.getArea&&l.getArea();this._data||n.removeAll(),data.diff(e).add((function(e){if(data.hasValue(e)){var l=data.getItemLayout(e);if(o&&bj(c,l))return;var h=xj(l,e,!0);$s(h,{shape:{points:l.ends}},t,e),_j(h,data,e,r),n.add(h),data.setItemGraphicEl(e,h)}})).update((function(l,h){var d=e.getItemGraphicEl(h);if(data.hasValue(l)){var f=data.getItemLayout(l);o&&bj(c,f)?n.remove(d):(d?(Ks(d,{shape:{points:f.ends}},t,l),nl(d)):d=xj(f,l),_j(d,data,l,r),n.add(d),data.setItemGraphicEl(l,d))}else n.remove(d)})).remove((function(t){var r=e.getItemGraphicEl(t);r&&n.remove(r)})).execute(),this._data=data},e.prototype._renderLarge=function(t){this._clear(),Oj(t,this.group);var e=t.get("clip",!0)?CS(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,e){for(var n,data=e.getData(),r=data.getLayout("isSimpleBox");null!=(n=t.next());){var o=xj(data.getItemLayout(n),n);_j(o,data,n,r),o.incremental=!0,this.group.add(o),this._progressiveEls.push(o)}},e.prototype._incrementalRenderLarge=function(t,e){Oj(e,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(ig),vj=function(){},mj=function(t){function e(e){var n=t.call(this,e)||this;return n.type="normalCandlestickBox",n}return Object(x.a)(e,t),e.prototype.getDefaultShape=function(){return new vj},e.prototype.buildPath=function(t,e){var n=e.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(ha);function xj(t,e,n){var r=t.ends;return new mj({shape:{points:n?wj(r,t):r},z2:100})}function bj(t,e){for(var n=!0,i=0;i0?"borderColor":"borderColor0"])||n.get(["itemStyle",t>0?"color":"color0"]);0===t&&(r=n.get(["itemStyle","borderColorDoji"]));var o=n.getModel("itemStyle").getItemStyle(gj);e.useStyle(o),e.style.fill=null,e.style.stroke=r}var Tj=yj,Cj=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],n}return Object(x.a)(e,t),e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,data,e){var n=data.getItemLayout(t);return n&&e.rect(n.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(Wd);Object(w.mixin)(Cj,nj,!0);var Aj=Cj;function Dj(option){option&&w.isArray(option.series)&&w.each(option.series,(function(t){w.isObject(t)&&"k"===t.type&&(t.type="candlestick")}))}var kj=["itemStyle","borderColor"],Lj=["itemStyle","borderColor0"],jj=["itemStyle","borderColorDoji"],Pj=["itemStyle","color"],Nj=["itemStyle","color0"],Rj={seriesType:"candlestick",plan:Ud(),performRawSeries:!0,reset:function(t,e){function n(t,e){return e.get(t>0?Pj:Nj)}function r(t,e){return e.get(0===t?jj:t>0?kj:Lj)}if(!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,data){for(var e;null!=(e=t.next());){var o=data.getItemModel(e),l=data.getItemLayout(e).sign,style=o.getItemStyle();style.fill=n(l,o),style.stroke=r(l,o)||style.fill;var c=data.ensureUniqueItemVisual(e,"style");Object(w.extend)(c,style)}}}}};function Ej(t,e,n,r,o,l){return n>r?-1:n0?t.get(o,e-1)<=r?1:-1:1}var zj={seriesType:"candlestick",plan:Ud(),reset:function(t){var e=t.coordinateSystem,data=t.getData(),n=function(t,data){var e,n=t.getBaseAxis(),r="category"===n.type?n.getBandWidth():(e=n.getExtent(),Math.abs(e[1]-e[0])/data.count()),o=Ii(Object(w.retrieve2)(t.get("barMaxWidth"),r),r),l=Ii(Object(w.retrieve2)(t.get("barMinWidth"),1),r),c=t.get("barWidth");return null!=c?Ii(c,r):Math.max(Math.min(r/2,o),l)}(t,data),r=["x","y"],o=data.getDimensionIndex(data.mapDimension(r[0])),l=Object(w.map)(data.mapDimensionsAll(r[1]),data.getDimensionIndex,data),c=l[0],h=l[1],d=l[2],f=l[3];if(data.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),!(o<0||l.length<4))return{progress:t.pipelineContext.large?function(n,data){var r,l,y=Ax(4*n.count),v=0,m=[],x=[],_=data.getStore(),w=!!t.get(["itemStyle","borderColorDoji"]);for(;null!=(l=n.next());){var S=_.get(o,l),M=_.get(c,l),O=_.get(h,l),I=_.get(d,l),T=_.get(f,l);isNaN(S)||isNaN(I)||isNaN(T)?(y[v++]=NaN,v+=3):(y[v++]=Ej(_,l,M,O,h,w),m[0]=S,m[1]=I,r=e.dataToPoint(m,null,x),y[v++]=r?r[0]:NaN,y[v++]=r?r[1]:NaN,m[1]=T,r=e.dataToPoint(m,null,x),y[v++]=r?r[1]:NaN)}data.setLayout("largePoints",y)}:function(t,data){var r,l=data.getStore();for(;null!=(r=t.next());){var y=l.get(o,r),v=l.get(c,r),m=l.get(h,r),x=l.get(d,r),_=l.get(f,r),w=Math.min(v,m),S=Math.max(v,m),M=D(w,y),O=D(S,y),I=D(x,y),T=D(_,y),C=[];k(C,O,0),k(C,M,1),C.push(j(T),j(O),j(I),j(M));var A=!!data.getItemModel(r).get(["itemStyle","borderColorDoji"]);data.setItemLayout(r,{sign:Ej(l,r,v,m,h,A),initBaseline:v>m?O[1]:M[1],ends:C,brushRect:L(x,_,y)})}function D(t,n){var p=[];return p[0]=n,p[1]=t,isNaN(n)||isNaN(t)?[NaN,NaN]:e.dataToPoint(p)}function k(t,e,r){var o=e.slice(),l=e.slice();o[0]=Pf(o[0]+n/2,1,!1),l[0]=Pf(l[0]-n/2,1,!0),r?t.push(o,l):t.push(l,o)}function L(t,e,r){var o=D(t,r),l=D(e,r);return o[0]-=n/2,l[0]-=n/2,{x:o[0],y:o[1],width:n,height:l[1]-o[1]}}function j(t){return t[0]=Pf(t[0],1),t}}}}};function Vj(t,e){var n=e.rippleEffectColor||e.color;t.eachChild((function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?n:null,fill:"fill"===e.brushType?n:null}})}))}var Bj=function(t){function e(data,e){var n=t.call(this)||this,symbol=new cS(data,e),r=new pi;return n.add(symbol),n.add(r),n.updateData(data,e),n}return Object(x.a)(e,t),e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,r=t.rippleNumber,o=this.childAt(1),i=0;i0&&(o=this._getLineLength(symbol)/h*1e3),o!==this._period||l!==this._loop||c!==this._roundTrip){symbol.stopAnimation();var f=void 0;f=w.isFunction(d)?d(n):d,symbol.__t>0&&(f=-o*symbol.__t),this._animateSymbol(symbol,o,f,l,c)}this._period=o,this._loop=l,this._roundTrip=c}},e.prototype._animateSymbol=function(symbol,t,e,n,r){if(t>0){symbol.__t=0;var o=this,l=symbol.animate("",n).when(r?2*t:t,{__t:r?2:1}).delay(e).during((function(){o._updateSymbolPosition(symbol)}));n||l.done((function(){o.remove(symbol)})),l.start()}},e.prototype._getLineLength=function(symbol){return z(symbol.__p1,symbol.__cp1)+z(symbol.__cp1,symbol.__p2)},e.prototype._updateAnimationPoints=function(symbol,t){symbol.__p1=t[0],symbol.__p2=t[1],symbol.__cp1=t[2]||[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]},e.prototype.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},e.prototype._updateSymbolPosition=function(symbol){var t=symbol.__p1,e=symbol.__p2,n=symbol.__cp1,r=symbol.__t<1?symbol.__t:2-symbol.__t,o=[symbol.x,symbol.y],l=o.slice(),c=je,h=Pe;o[0]=c(t[0],n[0],e[0],r),o[1]=c(t[1],n[1],e[1],r);var d=symbol.__t<1?h(t[0],n[0],e[0],r):h(e[0],n[0],t[0],1-r),f=symbol.__t<1?h(t[1],n[1],e[1],r):h(e[1],n[1],t[1],1-r);symbol.rotation=-Math.atan2(f,d)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==symbol.__lastT&&symbol.__lastT=0&&!(n[o]<=t);o--);o=Math.min(o,r-2)}else{for(o=l;ot);o++);o=Math.min(o-1,r-2)}var p=(t-n[o])/(n[o+1]-n[o]),c=e[o],h=e[o+1];symbol.x=c[0]*(1-p)+p*h[0],symbol.y=c[1]*(1-p)+p*h[1];var d=symbol.__t<1?h[0]-c[0]:c[0]-h[0],f=symbol.__t<1?h[1]-c[1]:c[1]-h[1];symbol.rotation=-Math.atan2(f,d)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=t,symbol.ignore=!1}},e}(Yj),Zj=Uj,qj=function(){this.polyline=!1,this.curveness=0,this.segs=[]},Kj=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return Object(x.a)(e,t),e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new qj},e.prototype.buildPath=function(t,e){var i,n=e.segs,r=e.curveness;if(e.polyline)for(i=this._off;i0){t.moveTo(n[i++],n[i++]);for(var l=1;l0){var y=(c+d)/2-(h-f)*r,v=(h+f)/2-(d-c)*r;t.quadraticCurveTo(y,v,d,f)}else t.lineTo(d,f)}this.incremental&&(this._off=i,this.notClear=!0)},e.prototype.findDataIndex=function(t,e){var n=this.shape,r=n.segs,o=n.curveness,l=this.style.lineWidth;if(n.polyline)for(var c=0,i=0;i0)for(var d=r[i++],f=r[i++],y=1;y0){if(Uo(d,f,(d+v)/2-(f-m)*o,(f+m)/2-(v-d)*o,v,m,l,t,e))return c}else if(Yo(d,f,v,m,l,t,e))return c;c++}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),rect=this.getBoundingRect();return t=n[0],e=n[1],rect.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var rect=this._rect;if(!rect){for(var t=this.shape.segs,e=1/0,n=1/0,r=-1/0,o=-1/0,i=0;i0&&(r.dataIndex=n+t.__startIndex)}))},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),Jj={seriesType:"lines",plan:Ud(),reset:function(t){var e=t.coordinateSystem;if(e){var n=t.get("polyline"),r=t.pipelineContext.large;return{progress:function(o,l){var c=[];if(r){var h=void 0,d=o.end-o.start;if(n){for(var f=0,i=o.start;i0&&(h||c.configLayer(o,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),r.updateData(data);var d=t.get("clip",!0)&&CS(t.coordinateSystem,!1,t);d?this.group.setClipPath(d):this.group.removeClipPath(),this._lastZlevel=o,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var data=t.getData();this._updateLineDraw(data,t).incrementalPrepareUpdate(data),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,e,n){var data=t.getData(),r=t.pipelineContext;if(!this._finished||r.large||r.progressiveRender)return{update:!0};var o=Jj.reset(t,e,n);o.progress&&o.progress({start:0,end:data.count(),count:data.count()},data),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(data,t){var e=this._lineDraw,n=this._showEffect(t),r=!!t.get("polyline"),o=t.pipelineContext.large;return e&&n===this._hasEffet&&r===this._isPolyline&&o===this._isLargeDraw||(e&&e.remove(),e=this._lineDraw=o?new $j:new xD(r?n?Zj:Xj:n?Yj:gD),this._hasEffet=n,this._isPolyline=r,this._isLargeDraw=o),this.group.add(e.group),e},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},e.prototype.dispose=function(t,e){this.remove(t,e)},e.type="lines",e}(ig),tP=Qj,eP="undefined"==typeof Uint32Array?Array:Uint32Array,nP="undefined"==typeof Float64Array?Array:Float64Array;function iP(t){var data=t.data;data&&data[0]&&data[0][0]&&data[0][0].coord&&(t.data=Object(w.map)(data,(function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),Object(w.mergeAll)([e,t[0],t[1]])})))}var rP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return Object(x.a)(e,t),e.prototype.init=function(option){option.data=option.data||[],iP(option);var e=this._processFlatCoordsArray(option.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(option.data=new Float32Array(e.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(option){if(iP(option),option.data){var e=this._processFlatCoordsArray(option.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(option.data=new Float32Array(e.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=Object(w.concatArray)(this._flatCoords,e.flatCoords),this._flatCoordsOffset=Object(w.concatArray)(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var e=this.getData().getItemModel(t);return e.option instanceof Array?e.option:e.getShallow("coords")},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,e){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*t],r=this._flatCoordsOffset[2*t+1],i=0;i ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),e=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&e>0?e+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!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,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(Wd),oP=rP;function aP(a){return a instanceof Array||(a=[a,a]),a}var sP={seriesType:"lines",reset:function(t){var e=aP(t.get("symbol")),n=aP(t.get("symbolSize")),data=t.getData();return data.setVisual("fromSymbol",e&&e[0]),data.setVisual("toSymbol",e&&e[1]),data.setVisual("fromSymbolSize",n&&n[0]),data.setVisual("toSymbolSize",n&&n[1]),{dataEach:data.hasItemOption?function(data,t){var e=data.getItemModel(t),n=aP(e.getShallow("symbol",!0)),r=aP(e.getShallow("symbolSize",!0));n[0]&&data.setItemVisual(t,"fromSymbol",n[0]),n[1]&&data.setItemVisual(t,"toSymbol",n[1]),r[0]&&data.setItemVisual(t,"fromSymbolSize",r[0]),r[1]&&data.setItemVisual(t,"toSymbolSize",r[1])}:null}}};var lP=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var canvas=Wn.d.createCanvas();this.canvas=canvas}return t.prototype.update=function(data,t,e,n,r,o){var l=this._getBrush(),c=this._getGradient(r,"inRange"),h=this._getGradient(r,"outOfRange"),d=this.pointSize+this.blurSize,canvas=this.canvas,f=canvas.getContext("2d"),y=data.length;canvas.width=t,canvas.height=e;for(var i=0;i0){var C=o(x)?c:h;x>0&&(x=x*I+O),w[S++]=C[T],w[S++]=C[T+1],w[S++]=C[T+2],w[S++]=C[T+3]*x*256}else S+=4}return f.putImageData(_,0,0),canvas},t.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=Wn.d.createCanvas()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var r=t.getContext("2d");return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor="#000",r.beginPath(),r.arc(-e,e,this.pointSize,0,2*Math.PI,!0),r.closePath(),r.fill(),t},t.prototype._getGradient=function(t,e){for(var n=this._gradientPixels,r=n[e]||(n[e]=new Uint8ClampedArray(1024)),o=[0,0,0,0],l=0,i=0;i<256;i++)t[e](i/255,!0,o),r[l++]=o[0],r[l++]=o[1],r[l++]=o[2],r[l++]=o[3];return r},t}(),uP=lP;function cP(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var hP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.render=function(t,e,n){var r;e.eachComponent("visualMap",(function(e){e.eachTargetSeries((function(n){n===t&&(r=e)}))})),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):cP(o)&&this._renderOnGeo(o,t,r,n)},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,e,n,r){var o=e.coordinateSystem;o&&(cP(o)?this.render(e,n,r):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(e,r,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){Zf(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,e,n,r,o){var l,c,h,d,f=t.coordinateSystem,y=AS(f,"cartesian2d");if(y){var v=f.getAxis("x"),m=f.getAxis("y");0,l=v.getBandWidth()+.5,c=m.getBandWidth()+.5,h=v.scale.getExtent(),d=m.scale.getExtent()}for(var x=this.group,data=t.getData(),_=t.getModel(["emphasis","itemStyle"]).getItemStyle(),w=t.getModel(["blur","itemStyle"]).getItemStyle(),S=t.getModel(["select","itemStyle"]).getItemStyle(),M=t.get(["itemStyle","borderRadius"]),O=ll(t),I=t.getModel("emphasis"),T=I.get("focus"),C=I.get("blurScope"),A=I.get("disabled"),D=y?[data.mapDimension("x"),data.mapDimension("y"),data.mapDimension("value")]:[data.mapDimension("time"),data.mapDimension("value")],k=n;kh[1]||jd[1])continue;var P=f.dataToPoint([L,j]);rect=new Ia({shape:{x:P[0]-l/2,y:P[1]-c/2,width:l,height:c},style:style})}else{if(isNaN(data.get(D[1],k)))continue;rect=new Ia({z2:1,shape:f.dataToRect([data.get(D[0],k)]).contentShape,style:style})}if(data.hasItemOption){var N=data.getItemModel(k),R=N.getModel("emphasis");_=R.getModel("itemStyle").getItemStyle(),w=N.getModel(["blur","itemStyle"]).getItemStyle(),S=N.getModel(["select","itemStyle"]).getItemStyle(),M=N.get(["itemStyle","borderRadius"]),T=R.get("focus"),C=R.get("blurScope"),A=R.get("disabled"),O=ll(N)}rect.shape.r=M;var E=t.getRawValue(k),z="-";E&&null!=E[2]&&(z=E[2]+""),sl(rect,O,{labelFetcher:t,labelDataIndex:k,defaultOpacity:style.opacity,defaultText:z}),rect.ensureState("emphasis").style=_,rect.ensureState("blur").style=w,rect.ensureState("select").style=S,zs(rect,T,C,A),rect.incremental=o,o&&(rect.states.emphasis.hoverLayer=!0),x.add(rect),data.setItemGraphicEl(k,rect),this._progressiveEls&&this._progressiveEls.push(rect)}},e.prototype._renderOnGeo=function(t,e,n,r){var o=n.targetVisuals.inRange,l=n.targetVisuals.outOfRange,data=e.getData(),c=this._hmLayer||this._hmLayer||new uP;c.blurSize=e.get("blurSize"),c.pointSize=e.get("pointSize"),c.minOpacity=e.get("minOpacity"),c.maxOpacity=e.get("maxOpacity");var rect=t.getViewRect().clone(),h=t.getRoamTransform();rect.applyTransform(h);var d=Math.max(rect.x,0),f=Math.max(rect.y,0),y=Math.min(rect.width+rect.x,r.getWidth()),v=Math.min(rect.height+rect.y,r.getHeight()),m=y-d,x=v-f,_=[data.mapDimension("lng"),data.mapDimension("lat"),data.mapDimension("value")],S=data.mapArray(_,(function(e,n,r){var o=t.dataToPoint([e,n]);return o[0]-=d,o[1]-=f,o.push(r),o})),M=n.getExtent(),O="visualMap.continuous"===n.type?function(t,e){var n=t[1]-t[0];return e=[(e[0]-t[0])/n,(e[1]-t[0])/n],function(t){return t>=e[0]&&t<=e[1]}}(M,n.option.range):function(t,e,n){var r=t[1]-t[0],o=(e=w.map(e,(function(e){return{interval:[(e.interval[0]-t[0])/r,(e.interval[1]-t[0])/r]}}))).length,l=0;return function(t){var i;for(i=l;i=0;i--){var r;if((r=e[i].interval)[0]<=t&&t<=r[1]){l=i;break}}return i>=0&&i0?1:-1}(e,o,r,n,y),function(data,t,e,n,r,o,l,c,h,d){var f,y=h.valueDim,v=h.categoryDim,m=Math.abs(e[v.wh]),x=data.getItemVisual(t,"symbolSize");f=w.isArray(x)?x.slice():null==x?["100%","100%"]:[x,x];f[v.index]=Ii(f[v.index],m),f[y.index]=Ii(f[y.index],n?m:Math.abs(o)),d.symbolSize=f;var _=d.symbolScale=[f[0]/c,f[1]/c];_[y.index]*=(h.isHorizontal?-1:1)*l}(data,t,r,o,0,y.boundingLength,y.pxSign,d,n,y),function(t,e,n,r,o){var l=t.get(gP)||0;l&&(vP.attr({scaleX:e[0],scaleY:e[1],rotation:n}),vP.updateTransform(),l/=vP.getLineScale(),l*=e[r.valueDim.index]);o.valueLineWidth=l||0}(e,y.symbolScale,h,n,y);var v=y.symbolSize,m=yy(e.get("symbolOffset"),v);return function(t,e,n,r,o,l,c,h,d,f,y,v){var m=y.categoryDim,x=y.valueDim,_=v.pxSign,S=Math.max(e[x.index]+h,0),M=S;if(r){var O=Math.abs(d),I=w.retrieve(t.get("symbolMargin"),"15%")+"",T=!1;I.lastIndexOf("!")===I.length-1&&(T=!0,I=I.slice(0,I.length-1));var C=Ii(I,e[x.index]),A=Math.max(S+2*C,0),D=T?0:2*C,k=Xi(r),L=k?r:NP((O+D)/A);A=S+2*(C=(O-L*S)/2/(T?L:Math.max(L-1,1))),D=T?0:2*C,k||"fixed"===r||(L=f?NP((Math.abs(f)+D)/A):0),M=L*A-D,v.repeatTimes=L,v.symbolMargin=C}var j=_*(M/2),P=v.pathPosition=[];P[m.index]=n[m.wh]/2,P[x.index]="start"===c?j:"end"===c?d-j:d/2,l&&(P[0]+=l[0],P[1]+=l[1]);var N=v.bundlePosition=[];N[m.index]=n[m.xy],N[x.index]=n[x.xy];var R=v.barRectShape=w.extend({},n);R[x.wh]=_*Math.max(Math.abs(n[x.wh]),Math.abs(P[x.index]+j)),R[m.wh]=n[m.wh];var E=v.clipShape={};E[m.xy]=-n[m.xy],E[m.wh]=y.ecSize[m.wh],E[x.xy]=0,E[x.wh]=n[x.wh]}(e,v,r,o,0,m,c,y.valueLineWidth,y.boundingLength,y.repeatCutLength,n,y),y}function bP(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function _P(t){var e=t.symbolPatternSize,path=fy(t.symbolType,-e/2,-e/2,e,e);return path.attr({culling:!0}),"image"!==path.type&&path.setStyle({strokeNoScale:!0}),path}function wP(t,e,n,r){var o=t.__pictorialBundle,l=n.symbolSize,c=n.valueLineWidth,h=n.pathPosition,d=e.valueDim,f=n.repeatTimes||0,y=0,v=l[e.valueDim.index]+c+2*n.symbolMargin;for(LP(t,(function(path){path.__pictorialAnimationIndex=y,path.__pictorialRepeatTimes=f,y0:r<0)&&(i=f-1-t),e[d.index]=v*(i-f/2+.5)+h[d.index],{x:e[0],y:e[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function SP(t,e,n,r){var o=t.__pictorialBundle,l=t.__pictorialMainPath;l?jP(l,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,r):(l=t.__pictorialMainPath=_P(n),o.add(l),jP(l,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,r))}function MP(t,e,n){var r=w.extend({},e.barRectShape),o=t.__pictorialBarRect;o?jP(o,null,{shape:r},e,n):((o=t.__pictorialBarRect=new Ia({z2:2,shape:r,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,t.add(o))}function OP(t,e,n,r){if(n.symbolClip){var o=t.__pictorialClipPath,l=w.extend({},n.clipShape),h=e.valueDim,d=n.animationModel,f=n.dataIndex;if(o)Ks(o,{shape:l},d,f);else{l[h.wh]=0,o=new Ia({shape:l}),t.__pictorialBundle.setClipPath(o),t.__pictorialClipPath=o;var y={};y[h.wh]=n.clipShape[h.wh],c[r?"updateProps":"initProps"](o,{shape:y},d,f)}}}function IP(data,t){var e=data.getItemModel(t);return e.getAnimationDelayParams=TP,e.isAnimationEnabled=CP,e}function TP(path){return{index:path.__pictorialAnimationIndex,count:path.__pictorialRepeatTimes}}function CP(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function AP(data,t,e,n){var r=new pi,o=new pi;return r.add(o),r.__pictorialBundle=o,o.x=e.bundlePosition[0],o.y=e.bundlePosition[1],e.symbolRepeat?wP(r,t,e):SP(r,0,e),MP(r,e,n),OP(r,t,e,n),r.__pictorialShapeStr=kP(data,e),r.__pictorialSymbolMeta=e,r}function DP(data,t,e,n){var r=n.__pictorialBarRect;r&&r.removeTextContent();var o=[];LP(n,(function(path){o.push(path)})),n.__pictorialMainPath&&o.push(n.__pictorialMainPath),n.__pictorialClipPath&&(e=null),w.each(o,(function(path){Qs(path,{scaleX:0,scaleY:0},e,t,(function(){n.parent&&n.parent.remove(n)}))})),data.setItemGraphicEl(t,null)}function kP(data,t){return[data.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function LP(t,e,n){w.each(t.__pictorialBundle.children(),(function(r){r!==t.__pictorialBarRect&&e.call(n,r)}))}function jP(t,e,n,r,o,l){e&&t.attr(e),r.symbolClip&&!o?n&&t.attr(n):n&&c[o?"updateProps":"initProps"](t,n,r.animationModel,r.dataIndex,l)}function PP(t,e,n){var r=n.dataIndex,o=n.itemModel,l=o.getModel("emphasis"),c=l.getModel("itemStyle").getItemStyle(),h=o.getModel(["blur","itemStyle"]).getItemStyle(),d=o.getModel(["select","itemStyle"]).getItemStyle(),f=o.getShallow("cursor"),y=l.get("focus"),v=l.get("blurScope"),m=l.get("scale");LP(t,(function(path){if(path instanceof ma){var t=path.style;path.useStyle(w.extend({image:t.image,x:t.x,y:t.y,width:t.width,height:t.height},n.style))}else path.useStyle(n.style);var e=path.ensureState("emphasis");e.style=c,m&&(e.scaleX=1.1*path.scaleX,e.scaleY=1.1*path.scaleY),path.ensureState("blur").style=h,path.ensureState("select").style=d,f&&(path.cursor=f),path.z2=n.z2}));var x=e.valueDim.posDesc[+(n.boundingLength>0)];sl(t.__pictorialBarRect,ll(o),{labelFetcher:e.seriesModel,labelDataIndex:r,defaultText:aS(e.seriesModel.getData(),r),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:x}),zs(t,y,v,l.get("disabled"))}function NP(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var RP=mP,EP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return Object(x.a)(e,t),e.prototype.getInitialData=function(option){return option.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=El(US.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(US),zP=EP;var VP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._layers=[],n}return Object(x.a)(e,t),e.prototype.render=function(t,e,n){var data=t.getData(),r=this,o=this.group,l=t.getLayerSeries(),c=data.getLayout("layoutInfo"),rect=c.rect,h=c.boundaryGap;function d(t){return t.name}o.x=0,o.y=rect.y+h[0];var f=new Tm(this._layersSeries||[],l,d,d),y=[];function v(e,n,c){var h=r._layers;if("remove"!==e){for(var style,polygon,d=[],f=[],v=l[n].indices,m=0;mo&&(o=l),n.push(l)}for(var h=0;ho&&(o=f)}return{y0:r,max:o}}(h),d=base.y0,f=e/base.max,y=o.length,v=o[0].indices.length,m=0;mMath.PI/2?"right":"left"):A&&"center"!==A?"left"===A?(M=o.r0+C,c>Math.PI/2&&(A="right")):"right"===A&&(M=o.r-C,c>Math.PI/2&&(A="left")):(M=l===2*Math.PI&&0===o.r0?0:(o.r+o.r0)/2,A="center"),_.style.align=A,_.style.verticalAlign=x(v,"verticalAlign")||"middle",_.x=M*h+o.cx,_.y=M*d+o.cy;var D=x(v,"rotate"),k=0;"radial"===D?(k=-c)<-Math.PI/2&&(k+=Math.PI):"tangential"===D?(k=Math.PI/2-c)>Math.PI/2?k-=Math.PI:k<-Math.PI/2&&(k+=Math.PI):w.isNumber(D)&&(k=D*Math.PI/180),_.rotation=k})),label.dirtyStyle()},e}(Rp),XP="sunburstRootToNode",UP="sunburstHighlight",ZP="sunburstUnhighlight";var qP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.render=function(t,e,n,r){var o=this;this.seriesModel=t,this.api=n,this.ecModel=e;var data=t.getData(),l=data.tree.root,c=t.getViewRoot(),h=this.group,d=t.get("renderLabelForZeroData"),f=[];c.eachNode((function(t){f.push(t)}));var y=this._oldChildren||[];!function(r,o){if(0===r.length&&0===o.length)return;function c(t){return t.getId()}function f(c,f){!function(r,o){d||!r||r.getValue()||(r=null);if(r!==l&&o!==l)if(o&&o.piece)r?(o.piece.updateData(!1,r,t,e,n),data.setItemGraphicEl(r.dataIndex,o.piece)):function(t){if(!t)return;t.piece&&(h.remove(t.piece),t.piece=null)}(o);else if(r){var c=new YP(r,t,e,n);h.add(c),data.setItemGraphicEl(r.dataIndex,c)}}(null==c?null:r[c],null==f?null:o[f])}new Tm(o,r,c,c).add(f).update(f).remove(w.curry(f,null)).execute()}(f,y),function(r,l){l.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,r,t,e,n):(o.virtualPiece=new YP(r,t,e,n),h.add(o.virtualPiece)),l.piece.off("click"),o.virtualPiece.on("click",(function(t){o._rootToNode(l.parentNode)}))):o.virtualPiece&&(h.remove(o.virtualPiece),o.virtualPiece=null)}(l,c),this._initEvents(),this._oldChildren=f},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",(function(e){var n=!1;t.seriesModel.getViewRoot().eachNode((function(r){if(!n&&r.piece&&r.piece===e.target){var o=r.getModel().get("nodeClick");if("rootToNode"===o)t._rootToNode(r);else if("link"===o){var l=r.getModel(),link=l.get("link");if(link)ju(link,l.get("target",!0)||"_blank")}n=!0}}))}))},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:XP,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){var r=t[0]-n.cx,o=t[1]-n.cy,l=Math.sqrt(r*r+o*o);return l<=n.r&&l>=n.r0}},e.type="sunburst",e}(ig),KP=qP,$P=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreStyleOnData=!0,n}return Object(x.a)(e,t),e.prototype.getInitialData=function(option,t){var e={name:option.name,children:option.data};JP(e);var n=this._levelModels=w.map(option.levels||[],(function(e){return new Pl(e,this,t)}),this),r=xC.createTree(e,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var o=r.getNodeByDataIndex(e),l=n[o.depth];return l&&(t.parentModel=l),t}))}));return r.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),r=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=SC(r,this),n},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){DC(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(Wd);function JP(t){var e=0;w.each(t.children,(function(t){JP(t);var n=t.value;w.isArray(n)&&(n=n[0]),e+=n}));var n=t.value;w.isArray(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),w.isArray(t.value)?t.value[0]=n:t.value=n}var QP=$P,tN=Math.PI/180;function eN(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.get("center"),r=t.get("radius");w.isArray(r)||(r=[0,r]),w.isArray(e)||(e=[e,e]);var o=n.getWidth(),l=n.getHeight(),c=Math.min(o,l),h=Ii(e[0],o),d=Ii(e[1],l),f=Ii(r[0],c/2),y=Ii(r[1],c/2),v=-t.get("startAngle")*tN,m=t.get("minAngle")*tN,x=t.getData().tree.root,_=t.getViewRoot(),S=_.depth,M=t.get("sort");null!=M&&nN(_,M);var O=0;w.each(_.children,(function(t){!isNaN(t.getValue())&&O++}));var I=_.getValue(),T=Math.PI/(I||O)*2,C=_.depth>0,A=_.height-(C?-1:1),D=(y-f)/(A||1),k=t.get("clockwise"),L=t.get("stillShowZeroSum"),j=k?1:-1,P=function(e,n){if(e){var r=n;if(e!==x){var o=e.getValue(),l=0===I&&L?T:o*T;l1;)o=o.parentNode;var l=n.getColorFromPalette(o.name||o.dataIndex+"",e);return t.depth>1&&Object(w.isString)(l)&&(l=Object(Ge.lift)(l,(t.depth-1)/(r-1)*.5)),l}(r,t,n.root.height));var o=data.ensureUniqueItemVisual(r.dataIndex,"style");Object(w.extend)(o,style)}))}))}var rN={color:"fill",borderColor:"stroke"},oN={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},aN=pr(),sN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(option,t){return lx(null,this)},e.prototype.getDataParams=function(e,n,r){var o=t.prototype.getDataParams.call(this,e,n);return r&&(o.info=aN(r).info),o},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(Wd),lN=sN;function uN(t,e){return e=e||[0,0],w.map(["x","y"],(function(n,r){var o=this.getAxis(n),l=e[r],c=t[r]/2;return"category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(l-c)-o.dataToCoord(l+c))}),this)}function cN(t,e){return e=e||[0,0],w.map([0,1],(function(n){var r=e[n],o=t[n]/2,l=[],c=[];return l[n]=r-o,c[n]=r+o,l[1-n]=c[1-n]=e[1-n],Math.abs(this.dataToPoint(l)[n]-this.dataToPoint(c)[n])}),this)}function hN(t,e){var n=this.getAxis(),r=e instanceof Array?e[0]:e,o=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(r-o)-n.dataToCoord(r+o))}function dN(t,e){return e=e||[0,0],w.map(["Radius","Angle"],(function(n,r){var o=this["get"+n+"Axis"](),l=e[r],c=t[r]/2,h="category"===o.type?o.getBandWidth():Math.abs(o.dataToCoord(l-c)-o.dataToCoord(l+c));return"Angle"===n&&(h=h*Math.PI/180),h}),this)}function pN(style,t,e,n){return style&&(style.legacy||!1!==style.legacy&&!e&&!n&&"tspan"!==t&&("text"===t||Object(w.hasOwn)(style,"text")))}function fN(t,e,n){var r,o,l,c=t;if("text"===e)l=c;else{l={},Object(w.hasOwn)(c,"text")&&(l.text=c.text),Object(w.hasOwn)(c,"rich")&&(l.rich=c.rich),Object(w.hasOwn)(c,"textFill")&&(l.fill=c.textFill),Object(w.hasOwn)(c,"textStroke")&&(l.stroke=c.textStroke),Object(w.hasOwn)(c,"fontFamily")&&(l.fontFamily=c.fontFamily),Object(w.hasOwn)(c,"fontSize")&&(l.fontSize=c.fontSize),Object(w.hasOwn)(c,"fontStyle")&&(l.fontStyle=c.fontStyle),Object(w.hasOwn)(c,"fontWeight")&&(l.fontWeight=c.fontWeight),o={type:"text",style:l,silent:!0},r={};var h=Object(w.hasOwn)(c,"textPosition");n?r.position=h?c.textPosition:"inside":h&&(r.position=c.textPosition),Object(w.hasOwn)(c,"textPosition")&&(r.position=c.textPosition),Object(w.hasOwn)(c,"textOffset")&&(r.offset=c.textOffset),Object(w.hasOwn)(c,"textRotation")&&(r.rotation=c.textRotation),Object(w.hasOwn)(c,"textDistance")&&(r.distance=c.textDistance)}return gN(l,t),Object(w.each)(l.rich,(function(t){gN(t,t)})),{textConfig:r,textContent:o}}function gN(t,e){e&&(e.font=e.textFont||e.font,Object(w.hasOwn)(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),Object(w.hasOwn)(e,"textAlign")&&(t.align=e.textAlign),Object(w.hasOwn)(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),Object(w.hasOwn)(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),Object(w.hasOwn)(e,"textWidth")&&(t.width=e.textWidth),Object(w.hasOwn)(e,"textHeight")&&(t.height=e.textHeight),Object(w.hasOwn)(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),Object(w.hasOwn)(e,"textPadding")&&(t.padding=e.textPadding),Object(w.hasOwn)(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),Object(w.hasOwn)(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),Object(w.hasOwn)(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),Object(w.hasOwn)(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),Object(w.hasOwn)(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),Object(w.hasOwn)(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),Object(w.hasOwn)(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function yN(t,e,n){var r=t;r.textPosition=r.textPosition||n.position||"inside",null!=n.offset&&(r.textOffset=n.offset),null!=n.rotation&&(r.textRotation=n.rotation),null!=n.distance&&(r.textDistance=n.distance);var o=r.textPosition.indexOf("inside")>=0,l=t.fill||"#000";vN(r,e);var c=null==r.textFill;return o?c&&(r.textFill=n.insideFill||"#fff",!r.textStroke&&n.insideStroke&&(r.textStroke=n.insideStroke),!r.textStroke&&(r.textStroke=l),null==r.textStrokeWidth&&(r.textStrokeWidth=2)):(c&&(r.textFill=t.fill||n.outsideFill||"#000"),!r.textStroke&&n.outsideStroke&&(r.textStroke=n.outsideStroke)),r.text=e.text,r.rich=e.rich,Object(w.each)(e.rich,(function(t){vN(t,t)})),r}function vN(t,e){e&&(Object(w.hasOwn)(e,"fill")&&(t.textFill=e.fill),Object(w.hasOwn)(e,"stroke")&&(t.textStroke=e.fill),Object(w.hasOwn)(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),Object(w.hasOwn)(e,"font")&&(t.font=e.font),Object(w.hasOwn)(e,"fontStyle")&&(t.fontStyle=e.fontStyle),Object(w.hasOwn)(e,"fontWeight")&&(t.fontWeight=e.fontWeight),Object(w.hasOwn)(e,"fontSize")&&(t.fontSize=e.fontSize),Object(w.hasOwn)(e,"fontFamily")&&(t.fontFamily=e.fontFamily),Object(w.hasOwn)(e,"align")&&(t.textAlign=e.align),Object(w.hasOwn)(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),Object(w.hasOwn)(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),Object(w.hasOwn)(e,"width")&&(t.textWidth=e.width),Object(w.hasOwn)(e,"height")&&(t.textHeight=e.height),Object(w.hasOwn)(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),Object(w.hasOwn)(e,"padding")&&(t.textPadding=e.padding),Object(w.hasOwn)(e,"borderColor")&&(t.textBorderColor=e.borderColor),Object(w.hasOwn)(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),Object(w.hasOwn)(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),Object(w.hasOwn)(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),Object(w.hasOwn)(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),Object(w.hasOwn)(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),Object(w.hasOwn)(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),Object(w.hasOwn)(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),Object(w.hasOwn)(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),Object(w.hasOwn)(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),Object(w.hasOwn)(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var mN={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},xN=Object(w.keys)(mN),bN=(Object(w.reduce)(Bn,(function(t,e){return t[e]=1,t}),{}),Bn.join(", "),["","style","shape","extra"]),_N=pr();function wN(t,e,n,r,o){var l=t+"Animation",c=Zs(t,r,o)||{},h=_N(e).userDuring;return c.duration>0&&(c.during=h?Object(w.bind)(AN,{el:e,userDuring:h}):null,c.setToFinal=!0,c.scope=t),Object(w.extend)(c,n[l]),c}function SN(t,e,n,r){var o=(r=r||{}).dataIndex,l=r.isInit,c=r.clearStyle,h=n.isAnimationEnabled(),d=_N(t),f=e.style;d.userDuring=e.during;var y={},v={};if(function(t,e,n){for(var i=0;i=0)){var y=t.getAnimationStyleProps(),v=y?y.style:null;if(v){!o&&(o=r.style={});var m=Object(w.keys)(n);for(i=0;i0&&t.animateFrom(m,x)}else!function(t,e,n,r,o){if(o){var l=wN("update",t,e,r,n);l.duration>0&&t.animateFrom(o,l)}}(t,e,o||0,n,y);MN(t,e),f?t.dirty():t.markRedraw()}function MN(t,e){for(var n=_N(t).leaveToProps,i=0;i=0){!l&&(l=r[t]={});var v=Object(w.keys)(c);for(i=0;ir[1]&&r.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:r[1],r0:r[0]},api:{coord:function(data){var r=e.dataToRadius(data[0]),o=n.dataToAngle(data[1]),l=t.coordToPoint([r,o]);return l.push(r,o*Math.PI/180),l},size:w.bind(dN,t)}}},calendar:function(t){var rect=t.getRect(),e=t.getRangeInfo();return{coordSys:{type:"calendar",x:rect.x,y:rect.y,width:rect.width,height:rect.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(data,e){return t.dataToPoint(data,e)}}}}};function ZN(t){return t instanceof ha}function qN(t){return t instanceof lo}var KN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.render=function(t,e,n,r){this._progressiveEls=null;var o=this._data,data=t.getData(),l=this.group,c=nR(t,data,e,n);o||l.removeAll(),data.diff(o).add((function(e){rR(n,null,e,c(e,r),t,l,data)})).remove((function(e){var n=o.getItemGraphicEl(e);n&&ON(n,aN(n).option,t)})).update((function(e,h){var d=o.getItemGraphicEl(h);rR(n,d,e,c(e,r),t,l,data)})).execute();var h=t.get("clip",!0)?CS(t.coordinateSystem,!1,t):null;h?l.setClipPath(h):l.removeClipPath(),this._data=data},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,e,n,r,o){var data=e.getData(),l=nR(e,data,n,r),c=this._progressiveEls=[];function h(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var d=t.start;d=0?data.getStore().get(r,e):void 0}var o=data.get(n.name,e),l=n&&n.ordinalMeta;return l?l.categories[o]:o},styleEmphasis:function(e,n){0;null==n&&(n=c);var r=M(n,EN).getItemStyle(),o=O(n,EN),l=cl(o,null,null,!0,!0);l.text=o.getShallow("show")?Object(w.retrieve3)(t.getFormattedLabel(n,EN),t.getFormattedLabel(n,zN),aS(data,n)):null;var h=hl(o,null,!0);return T(e,r),r=yN(r,l,h),e&&I(r,e),r.legacy=!0,r},visual:function(t,e){if(null==e&&(e=c),Object(w.hasOwn)(rN,t)){var n=data.getItemVisual(e,"style");return n?n[rN[t]]:null}if(Object(w.hasOwn)(oN,t))return data.getItemVisual(e,t)},barLayout:function(t){if("cartesian2d"===o.type){var e=o.getBaseAxis();return function(t){var e=[],n=t.axis,r="axis0";if("category"===n.type){for(var o=n.getBandWidth(),i=0;i=v;i--){var _=e.childAt(i);cR(e,_,o)}}(t,v,n,r,o),c>=0?l.replaceAt(v,c):l.add(v),v}function aR(t,e,n){var r,o=aN(t),l=e.type,c=e.shape,h=e.style;return n.isUniversalTransitionEnabled()||null!=l&&l!==o.customGraphicType||"path"===l&&((r=c)&&(Object(w.hasOwn)(r,"pathData")||Object(w.hasOwn)(r,"d")))&&fR(c)!==o.customPathData||"image"===l&&Object(w.hasOwn)(h,"image")&&h.image!==o.customImagePath}function sR(t,e,n){var r=e?lR(t,e):t,o=e?uR(t,r,EN):t.style,l=t.type,c=r?r.textConfig:null,h=t.textContent,d=h?e?lR(h,e):h:null;if(o&&(n.isLegacy||pN(o,l,!!c,!!d))){n.isLegacy=!0;var f=fN(o,l,!e);!c&&f.textConfig&&(c=f.textConfig),!d&&f.textContent&&(d=f.textContent)}if(!e&&d){var y=d;!y.type&&(y.type="text")}var v=e?n[e]:n.normal;v.cfg=c,v.conOpt=d}function lR(t,e){return e?t?t[e]:null:t}function uR(t,e,n){var style=e&&e.style;return null==style&&n===EN&&t&&(style=t.styleEmphasis),style}function cR(t,e,n){e&&ON(e,aN(t).option,n)}function hR(t,e){var n=t&&t.name;return null!=n?n:YN+e}function dR(t,e){var n=this.context,r=null!=t?n.newChildren[t]:null,o=null!=e?n.oldChildren[e]:null;oR(n.api,o,n.dataIndex,r,n.seriesModel,n.group)}function pR(t){var e=this.context,n=e.oldChildren[t];n&&ON(n,aN(n).option,e.seriesModel)}function fR(t){return t&&(t.pathData||t.d)}var gR=pr(),yR=w.clone,vR=w.bind,mR=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(t,e,n,r){var o=e.get("value"),l=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,r||this._lastValue!==o||this._lastStatus!==l){this._lastValue=o,this._lastStatus=l;var c=this._group,h=this._handle;if(!l||"hide"===l)return c&&c.hide(),void(h&&h.hide());c&&c.show(),h&&h.show();var d={};this.makeElOption(d,o,t,e,n);var f=d.graphicKey;f!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=f;var y=this._moveAnimation=this.determineAnimation(t,e);if(c){var v=w.curry(xR,e,y);this.updatePointerEl(c,d,v),this.updateLabelEl(c,d,v,e)}else c=this._group=new pi,this.createPointerEl(c,d,t,e),this.createLabelEl(c,d,t,e),n.getZr().add(c);SR(c,e,!0),this._renderHandle(o)}},t.prototype.remove=function(t){this.clear(t)},t.prototype.dispose=function(t){this.clear(t)},t.prototype.determineAnimation=function(t,e){var n=e.get("animation"),r=t.axis,o="category"===r.type,l=e.get("snap");if(!l&&!o)return!1;if("auto"===n||null==n){var c=this.animationThreshold;if(o&&r.getBandWidth()>c)return!0;if(l){var h=DO(t).seriesDataCount,d=r.getExtent();return Math.abs(d[0]-d[1])/h>c}return!1}return!0===n},t.prototype.makeElOption=function(t,e,n,r,o){},t.prototype.createPointerEl=function(t,e,n,r){var o=e.pointer;if(o){var l=gR(t).pointerEl=new c[o.type](yR(e.pointer));t.add(l)}},t.prototype.createLabelEl=function(t,e,n,r){if(e.label){var o=gR(t).labelEl=new Ga(yR(e.label));t.add(o),_R(o,r)}},t.prototype.updatePointerEl=function(t,e,n){var r=gR(t).pointerEl;r&&e.pointer&&(r.setStyle(e.pointer.style),n(r,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,n,r){var o=gR(t).labelEl;o&&(o.setStyle(e.label.style),n(o,{x:e.label.x,y:e.label.y}),_R(o,r))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,r=this._api.getZr(),o=this._handle,l=n.getModel("handle"),c=n.get("status");if(!l.get("show")||!c||"hide"===c)return o&&r.remove(o),void(this._handle=null);this._handle||(e=!0,o=this._handle=Gf(l.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){vt(t.event)},onmousedown:vR(this._onHandleDragMove,this,0,0),drift:vR(this._onHandleDragMove,this),ondragend:vR(this._onHandleDragEnd,this)}),r.add(o)),SR(o,n,!1),o.setStyle(l.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var h=l.get("size");w.isArray(h)||(h=[h,h]),o.scaleX=h[0]/2,o.scaleY=h[1]/2,lg(this,"_doDispatchAxisPointer",l.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},t.prototype._moveHandleToValue=function(t,e){xR(this._axisPointerModel,!e&&this._moveAnimation,this._handle,wR(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(wR(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(wR(r)),gR(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._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}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,r=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),r&&e.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),ug(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},t}();function xR(t,e,n,r){bR(gR(n).lastProp,r)||(gR(n).lastProp=r,e?Ks(n,r,t):(n.stopAnimation(),n.attr(r)))}function bR(t,e){if(w.isObject(t)&&w.isObject(e)){var n=!0;return w.each(e,(function(e,r){n=n&&bR(t[r],e)})),!!n}return t===e}function _R(t,e){t[e.get(["label","show"])?"show":"hide"]()}function wR(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function SR(t,e,n){var r=e.get("z"),o=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=r&&(t.z=r),null!=o&&(t.zlevel=o),t.silent=n)}))}var MR=mR;function OR(t){var style,e=t.get("type"),n=t.getModel(e+"Style");return"line"===e?(style=n.getLineStyle()).fill=null:"shadow"===e&&((style=n.getAreaStyle()).stroke=null),style}function IR(t,e,n,r,o){var text=TR(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),l=n.getModel("label"),c=Mu(l.get("padding")||0),h=l.getFont(),d=Zn(text,h),f=o.position,y=d.width+c[1]+c[3],v=d.height+c[0]+c[2],m=o.align;"right"===m&&(f[0]-=y),"center"===m&&(f[0]-=y/2);var x=o.verticalAlign;"bottom"===x&&(f[1]-=v),"middle"===x&&(f[1]-=v/2),function(t,e,n,r){var o=r.getWidth(),l=r.getHeight();t[0]=Math.min(t[0]+e,o)-e,t[1]=Math.min(t[1]+n,l)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(f,y,v,r);var _=l.get("backgroundColor");_&&"auto"!==_||(_=e.get(["axisLine","lineStyle","color"])),t.label={x:f[0],y:f[1],style:cl(l,{text:text,font:h,fill:l.getTextColor(),padding:c,backgroundColor:_}),z2:10}}function TR(t,e,n,r,o){t=e.scale.parse(t);var text=e.scale.getLabel({value:t},{precision:o.precision}),l=o.formatter;if(l){var c={value:gb(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};w.each(r,(function(t){var e=n.getSeriesByIndex(t.seriesIndex),r=t.dataIndexInside,o=e&&e.getDataParams(r);o&&c.seriesData.push(o)})),w.isString(l)?text=l.replace("{value}",text):w.isFunction(l)&&(text=l(c))}return text}function CR(t,e,n){var r=[1,0,0,1,0,0];return Tt(r,r,n.rotation),It(r,r,n.position),Rf([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function AR(t,e,n,r,o,l){var c=TO.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=o.get(["label","margin"]),IR(e,r,o,l,{position:CR(r.axis,t,n),align:c.textAlign,verticalAlign:c.textVerticalAlign})}function DR(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function kR(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function LR(t,e,n,r,o,l){return{cx:t,cy:e,r0:n,r:r,startAngle:o,endAngle:l,clockwise:!0}}var jR=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(x.a)(e,t),e.prototype.makeElOption=function(t,e,n,r,o){var l=n.axis,c=l.grid,h=r.get("type"),d=PR(c,l).getOtherAxis(l).getGlobalExtent(),f=l.toGlobalCoord(l.dataToCoord(e,!0));if(h&&"none"!==h){var y=OR(r),v=NR[h](l,f,d);v.style=y,t.graphicKey=v.type,t.pointer=v}AR(e,t,cO(c.model,n),n,r,o)},e.prototype.getHandleTransform=function(t,e,n){var r=cO(e.axis.grid.model,e,{labelInside:!1});r.labelMargin=n.get(["handle","margin"]);var o=CR(e.axis,t,r);return{x:o[0],y:o[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,r){var o=n.axis,l=o.grid,c=o.getGlobalExtent(!0),h=PR(l,o).getOtherAxis(o).getGlobalExtent(),d="x"===o.dim?0:1,f=[t.x,t.y];f[d]+=e[d],f[d]=Math.min(c[1],f[d]),f[d]=Math.max(c[0],f[d]);var y=(h[1]+h[0])/2,v=[y,y];v[d]=f[d];return{x:f[0],y:f[1],rotation:t.rotation,cursorPoint:v,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][d]}},e}(MR);function PR(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var NR={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:DR([e,n[0]],[e,n[1]],RR(t))}},shadow:function(t,e,n){var r=Math.max(1,t.getBandWidth()),span=n[1]-n[0];return{type:"Rect",shape:kR([e-r/2,n[0]],[r,span],RR(t))}}};function RR(t){return"x"===t.dim?0:1}var ER=jR,zR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},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}},e}(Uu),VR=zR,BR=pr(),FR=w.each;function GR(t,e,n){if(!_.a.node){var r=e.getZr();BR(r).records||(BR(r).records={}),function(t,e){if(BR(t).initialized)return;function n(n,r){t.on(n,(function(n){var o=function(t){var e={showTip:[],hideTip:[]},n=function(r){var o=e[r.type];o?o.push(r):(r.dispatchAction=n,t.dispatchAction(r))};return{dispatchAction:n,pendings:e}}(e);FR(BR(t).records,(function(t){t&&r(t,n,o.dispatchAction)})),function(t,e){var n,r=t.showTip.length,o=t.hideTip.length;r?n=t.showTip[r-1]:o&&(n=t.hideTip[o-1]);n&&(n.dispatchAction=null,e.dispatchAction(n))}(o.pendings,e)}))}BR(t).initialized=!0,n("click",w.curry(WR,"click")),n("mousemove",w.curry(WR,"mousemove")),n("globalout",HR)}(r,e),(BR(r).records[t]||(BR(r).records[t]={})).handler=n}}function HR(t,e,n){t.handler("leave",null,n)}function WR(t,e,n,r){e.handler(t,n,r)}function YR(t,e){if(!_.a.node){var n=e.getZr();(BR(n).records||{})[t]&&(BR(n).records[t]=null)}}var XR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.render=function(t,e,n){var r=e.getComponent("tooltip"),o=t.get("triggerOn")||r&&r.get("triggerOn")||"mousemove|click";GR("axisPointer",n,(function(t,e,n){"none"!==o&&("leave"===t||o.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},e.prototype.remove=function(t,e){YR("axisPointer",e)},e.prototype.dispose=function(t,e){YR("axisPointer",e)},e.type="axisPointer",e}(Xd),UR=XR;function ZR(t,e){var n,r=[],o=t.seriesIndex;if(null==o||!(n=e.getSeriesByIndex(o)))return{point:[]};var data=n.getData(),l=dr(data,t);if(null==l||l<0||w.isArray(l))return{point:[]};var c=data.getItemGraphicEl(l),h=n.coordinateSystem;if(n.getTooltipPosition)r=n.getTooltipPosition(l)||[];else if(h&&h.dataToPoint)if(t.isStacked){var d=h.getBaseAxis(),f=h.getOtherAxis(d).dim,y=d.dim,v="x"===f||"radius"===f?1:0,m=data.mapDimension(y),x=[];x[v]=data.get(m,l),x[1-v]=data.get(data.getCalculationInfo("stackResultDimension"),l),r=h.dataToPoint(x)||[]}else r=h.dataToPoint(data.getValues(w.map(h.dimensions,(function(t){return data.mapDimension(t)})),l))||[];else if(c){var rect=c.getBoundingRect().clone();rect.applyTransform(c.transform),r=[rect.x+rect.width/2,rect.y+rect.height/2]}return{point:r,el:c}}var qR=pr();function KR(t,e,n){var r=t.currTrigger,o=[t.x,t.y],l=t,c=t.dispatchAction||Object(w.bind)(n.dispatchAction,n),h=e.getComponent("axisPointer").coordSysAxesInfo;if(h){eE(o)&&(o=ZR({seriesIndex:l.seriesIndex,dataIndex:l.dataIndex},e).point);var d=eE(o),f=l.axesInfo,y=h.axesInfo,v="leave"===r||eE(o),m={},x={},_={list:[],map:{}},S={showPointer:Object(w.curry)(JR,x),showTooltip:Object(w.curry)(QR,_)};Object(w.each)(h.coordSysMap,(function(t,e){var n=d||t.containPoint(o);Object(w.each)(h.coordSysAxesInfo[e],(function(t,e){var r=t.axis,l=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}}(f,t);if(!v&&n&&(!f||l)){var c=l&&l.value;null!=c||d||(c=r.pointToData(o)),null!=c&&$R(t,c,S,!1,m)}}))}));var M={};return Object(w.each)(y,(function(t,e){var n=t.linkGroup;n&&!x[e]&&Object(w.each)(n.axesInfo,(function(e,r){var o=x[r];if(e!==t&&o){var l=o.value;n.mapper&&(l=t.axis.scale.parse(n.mapper(l,tE(e),tE(t)))),M[t.key]=l}}))})),Object(w.each)(M,(function(t,e){$R(y[e],t,S,!0,m)})),function(t,e,n){var r=n.axesInfo=[];Object(w.each)(e,(function(e,n){var option=e.axisPointerModel.option,o=t[n];o?(!e.useHandle&&(option.status="show"),option.value=o.value,option.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(option.status="hide"),"show"===option.status&&r.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:option.value})}))}(x,y,m),function(t,e,n,r){if(eE(e)||!t.list.length)return void r({type:"hideTip"});var o=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:t.list})}(_,o,t,c),function(t,e,n){var r=n.getZr(),o="axisPointerLastHighlights",l=qR(r)[o]||{},c=qR(r)[o]={};Object(w.each)(t,(function(t,e){var option=t.axisPointerModel.option;"show"===option.status&&Object(w.each)(option.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;c[e]=t}))}));var h=[],d=[];Object(w.each)(l,(function(t,e){!c[e]&&d.push(t)})),Object(w.each)(c,(function(t,e){!l[e]&&h.push(t)})),d.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:d}),h.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:h})}(y,0,n),m}}function $R(t,e,n,r,o){var l=t.axis;if(!l.scale.isBlank()&&l.containData(e))if(t.involveSeries){var c=function(t,e){var n=e.axis,r=n.dim,o=t,l=[],c=Number.MAX_VALUE,h=-1;return Object(w.each)(e.seriesModels,(function(e,d){var f,y,v=e.getData().mapDimensionsAll(r);if(e.getAxisTooltipData){var m=e.getAxisTooltipData(v,t,n);y=m.dataIndices,f=m.nestestValue}else{if(!(y=e.getData().indicesOfNearest(v[0],t,"category"===n.type?.5:null)).length)return;f=e.getData().get(v[0],y[0])}if(null!=f&&isFinite(f)){var x=t-f,_=Math.abs(x);_<=c&&((_=0&&h<0)&&(c=_,h=x,o=f,l.length=0),Object(w.each)(y,(function(t){l.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:l,snapToValue:o}}(e,t),h=c.payloadBatch,d=c.snapToValue;h[0]&&null==o.seriesIndex&&Object(w.extend)(o,h[0]),!r&&t.snap&&l.containData(d)&&null!=d&&(e=d),n.showPointer(t,e,h),n.showTooltip(t,c,d)}else n.showPointer(t,e)}function JR(t,e,n,r){t[e.key]={value:n,payloadBatch:r}}function QR(t,e,n,r){var o=n.payloadBatch,l=e.axis,c=l.model,h=e.axisPointerModel;if(e.triggerTooltip&&o.length){var d=e.coordSys.model,f=LO(d),y=t.map[f];y||(y=t.map[f]={coordSysId:d.id,coordSysIndex:d.componentIndex,coordSysType:d.type,coordSysMainType:d.mainType,dataByAxis:[]},t.list.push(y)),y.dataByAxis.push({axisDim:l.dim,axisIndex:c.componentIndex,axisType:c.type,axisId:c.id,value:r,valueLabelOpt:{precision:h.get(["label","precision"]),formatter:h.get(["label","formatter"])},seriesDataIndices:o.slice()})}}function tE(t){var e=t.axis.model,n={},r=n.axisDim=t.axis.dim;return n.axisIndex=n[r+"AxisIndex"]=e.componentIndex,n.axisName=n[r+"AxisName"]=e.name,n.axisId=n[r+"AxisId"]=e.id,n}function eE(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function nE(t){NO.registerAxisPointerClass("CartesianAxisPointer",ER),t.registerComponentModel(VR),t.registerComponentView(UR),t.registerPreprocessor((function(option){if(option){(!option.axisPointer||0===option.axisPointer.length)&&(option.axisPointer={});var link=option.axisPointer.link;link&&!Object(w.isArray)(link)&&(option.axisPointer.link=[link])}})),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=CO(t,e)})),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},KR)}var iE=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(x.a)(e,t),e.prototype.makeElOption=function(t,e,n,r,o){var l=n.axis;"angle"===l.dim&&(this.animationThreshold=Math.PI/18);var c=l.polar,h=c.getOtherAxis(l).getExtent(),d=l.dataToCoord(e),f=r.get("type");if(f&&"none"!==f){var y=OR(r),v=rE[f](l,c,d,h);v.style=y,t.graphicKey=v.type,t.pointer=v}var m=function(t,e,n,r,o){var l=e.axis,c=l.dataToCoord(t),h=r.getAngleAxis().getExtent()[0];h=h/180*Math.PI;var d,f,y,v=r.getRadiusAxis().getExtent();if("radius"===l.dim){var m=[1,0,0,1,0,0];Tt(m,m,h),It(m,m,[r.cx,r.cy]),d=Rf([c,-o],m);var x=e.getModel("axisLabel").get("rotate")||0,_=TO.innerTextLayout(h,x*Math.PI/180,-1);f=_.textAlign,y=_.textVerticalAlign}else{var w=v[1];d=r.coordToPoint([w+o,c]);var S=r.cx,M=r.cy;f=Math.abs(d[0]-S)/w<.3?"center":d[0]>S?"left":"right",y=Math.abs(d[1]-M)/w<.3?"middle":d[1]>M?"top":"bottom"}return{position:d,align:f,verticalAlign:y}}(e,n,0,c,r.get(["label","margin"]));IR(t,n,r,o,m)},e}(MR);var rE={line:function(t,e,n,r){return"angle"===t.dim?{type:"Line",shape:DR(e.coordToPoint([r[0],n]),e.coordToPoint([r[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,r){var o=Math.max(1,t.getBandWidth()),l=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:LR(e.cx,e.cy,r[0],r[1],(-n-o/2)*l,(o/2-n)*l)}:{type:"Sector",shape:LR(e.cx,e.cy,n-o/2,n+o/2,0,2*Math.PI)}}},oE=iE,aE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.findAxisModel=function(t){var e;return this.ecModel.eachComponent(t,(function(t){t.getCoordSysModel()===this&&(e=t)}),this),e},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Uu),sE=aE,lE=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(x.a)(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",vr).models[0]},e.type="polarAxis",e}(Uu);w.mixin(lE,xb);var uE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.type="angleAxis",e}(lE),cE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.type="radiusAxis",e}(lE),hE=function(t){function e(e,n){return t.call(this,"radius",e,n)||this}return Object(x.a)(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e}($b);hE.prototype.dataToRadius=$b.prototype.dataToCoord,hE.prototype.radiusToData=$b.prototype.coordToData;var dE=hE,pE=pr(),fE=function(t){function e(e,n){return t.call(this,"angle",e,n||[0,360])||this}return Object(x.a)(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,e=t.getLabelModel(),n=t.scale,r=n.getExtent(),o=n.count();if(r[1]-r[0]<1)return 0;var l=r[0],c=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(c),rect=Zn(null==l?"":l+"",e.getFont(),"center","top"),d=Math.max(rect.height,7)/h;isNaN(d)&&(d=1/0);var f=Math.max(0,Math.floor(d)),y=pE(t.model),v=y.lastAutoInterval,m=y.lastTickCount;return null!=v&&null!=m&&Math.abs(v-f)<=1&&Math.abs(m-o)<=1&&v>f?f=v:(y.lastTickCount=o,y.lastAutoInterval=f),f},e}($b);fE.prototype.dataToAngle=$b.prototype.dataToCoord,fE.prototype.angleToData=$b.prototype.coordToData;var gE=fE,yE=["radius","angle"];function vE(t){var e=t.seriesModel,n=t.polarModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}var mE=function(){function t(t){this.dimensions=yE,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new dE,this._angleAxis=new gE,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},t.prototype.containData=function(data){return this._radiusAxis.containData(data[0])&&this._angleAxis.containData(data[1])},t.prototype.getAxis=function(t){return this["_"+t+"Axis"]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(t){var e=[],n=this._angleAxis,r=this._radiusAxis;return n.scale.type===t&&e.push(n),r.scale.type===t&&e.push(r),e},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},t.prototype.dataToPoint=function(data,t){return this.coordToPoint([this._radiusAxis.dataToRadius(data[0],t),this._angleAxis.dataToAngle(data[1],t)])},t.prototype.pointToData=function(t,e){var n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],e),this._angleAxis.angleToData(n[1],e)]},t.prototype.pointToCoord=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,r=this.getAngleAxis(),o=r.getExtent(),l=Math.min(o[0],o[1]),c=Math.max(o[0],o[1]);r.inverse?l=c-360:c=l+360;var h=Math.sqrt(e*e+n*n);e/=h,n/=h;for(var d=Math.atan2(-n,e)/Math.PI*180,f=dc;)d+=360*f;return[h,d]},t.prototype.coordToPoint=function(t){var e=t[0],n=t[1]/180*Math.PI;return[Math.cos(n)*e+this.cx,-Math.sin(n)*e+this.cy]},t.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var n=t.getExtent(),r=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*r,endAngle:-n[1]*r,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,r=e-this.cy,o=n*n+r*r-1e-4,l=this.r,c=this.r0;return o<=l*l&&o>=c*c}}},t.prototype.convertToPixel=function(t,e,n){return vE(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return vE(e)===this?this.pointToData(n):null},t}();function xE(t,e){var n=this,r=n.getAngleAxis(),o=n.getRadiusAxis();if(r.scale.setExtent(1/0,-1/0),o.scale.setExtent(1/0,-1/0),t.eachSeries((function(t){if(t.coordinateSystem===n){var e=t.getData();w.each(mb(e,"radius"),(function(t){o.scale.unionExtentFromData(e,t)})),w.each(mb(e,"angle"),(function(t){r.scale.unionExtentFromData(e,t)}))}})),db(r.scale,r.model),db(o.scale,o.model),"category"===r.type&&!r.onBand){var l=r.getExtent(),c=360/r.scale.count();r.inverse?l[1]+=c:l[1]-=c,r.setExtent(l[0],l[1])}}function bE(t,e){if(t.type=e.get("type"),t.scale=pb(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),function(t){return"angleAxis"===t.mainType}(e)){t.inverse=t.inverse!==e.get("clockwise");var n=e.get("startAngle");t.setExtent(n,n+(t.inverse?-360:360))}e.axis=t,t.model=e}var _E={dimensions:yE,create:function(t,e){var n=[];return t.eachComponent("polar",(function(t,r){var o=new mE(r+"");o.update=xE;var l=o.getRadiusAxis(),c=o.getAngleAxis(),h=t.findAxisModel("radiusAxis"),d=t.findAxisModel("angleAxis");bE(l,h),bE(c,d),function(t,e,n){var r=e.get("center"),o=n.getWidth(),l=n.getHeight();t.cx=Ii(r[0],o),t.cy=Ii(r[1],l);var c=t.getRadiusAxis(),h=Math.min(o,l)/2,d=e.get("radius");null==d?d=[0,"100%"]:w.isArray(d)||(d=[0,d]);var f=[Ii(d[0],h),Ii(d[1],h)];c.inverse?c.setExtent(f[1],f[0]):c.setExtent(f[0],f[1])}(o,t,e),n.push(o),t.coordinateSystem=o,o.model=t})),t.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var e=t.getReferringComponents("polar",vr).models[0];0,t.coordinateSystem=e.coordinateSystem}})),n}},wE=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function SE(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var r=t.coordToPoint([e[0],n]),o=t.coordToPoint([e[1],n]);return{x1:r[0],y1:r[1],x2:o[0],y2:o[1]}}function ME(t){return t.getRadiusAxis().inverse?0:1}function OE(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}var IE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="PolarAxisPointer",n}return Object(x.a)(e,t),e.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var n=t.axis,r=n.polar,o=r.getRadiusAxis().getExtent(),l=n.getTicksCoords(),c=n.getMinorTicksCoords(),h=w.map(n.getViewLabels(),(function(t){t=w.clone(t);var e=n.scale,r="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=n.dataToCoord(r),t}));OE(h),OE(l),w.each(wE,(function(e){!t.get([e,"show"])||n.scale.isBlank()&&"axisLine"!==e||TE[e](this.group,t,r,l,c,o,h)}),this)}},e.type="angleAxis",e}(NO),TE={axisLine:function(t,e,n,r,o,l){var c,h=e.getModel(["axisLine","lineStyle"]),d=ME(n),f=d?0:1;(c=0===l[f]?new vp({shape:{cx:n.cx,cy:n.cy,r:l[d]},style:h.getLineStyle(),z2:1,silent:!0}):new Vp({shape:{cx:n.cx,cy:n.cy,r:l[d],r0:l[f]},style:h.getLineStyle(),z2:1,silent:!0})).style.fill=null,t.add(c)},axisTick:function(t,e,n,r,o,l){var c=e.getModel("axisTick"),h=(c.get("inside")?-1:1)*c.get("length"),d=l[ME(n)],f=w.map(r,(function(t){return new Kp({shape:SE(n,[d,d+h],t.coord)})}));t.add(Df(f,{style:w.defaults(c.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,n,r,o,l){if(o.length){for(var c=e.getModel("axisTick"),h=e.getModel("minorTick"),d=(c.get("inside")?-1:1)*h.get("length"),f=l[ME(n)],y=[],i=0;ix?"left":"right",M=Math.abs(p[1]-_)/m<.3?"middle":p[1]>_?"top":"bottom";if(h&&h[v]){var O=h[v];w.isObject(O)&&O.textStyle&&(c=new Pl(O.textStyle,d,d.ecModel))}var I=new Ga({silent:TO.isLabelSilent(e),style:cl(c,{x:p[0],y:p[1],fill:c.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:r.formattedLabel,align:S,verticalAlign:M})});if(t.add(I),y){var T=TO.makeAxisEventDataBase(e);T.targetType="axisLabel",T.value=r.rawLabel,Ha(I).eventData=T}}),this)},splitLine:function(t,e,n,r,o,l){var c=e.getModel("splitLine").getModel("lineStyle"),h=c.get("color"),d=0;h=h instanceof Array?h:[h];for(var f=[],i=0;i=0?"p":"n",L=I;M&&(r[c][D]||(r[c][D]={p:I,n:I}),L=r[c][D][k]);var j=void 0,P=void 0,N=void 0,R=void 0;if("radius"===y.dim){var E=y.dataToCoord(A)-I,z=n.dataToCoord(D);Math.abs(E)=R})}}}))},EE={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},zE={splitNumber:5},VE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.type="polar",e}(Xd);function BE(t,e){e=e||{};var n=t.coordinateSystem,r=t.axis,o={},l=r.position,c=r.orient,rect=n.getRect(),h=[rect.x,rect.x+rect.width,rect.y,rect.y+rect.height],d={horizontal:{top:h[2],bottom:h[3]},vertical:{left:h[0],right:h[1]}};o.position=["vertical"===c?d.vertical[l]:h[0],"horizontal"===c?d.horizontal[l]:h[3]];o.rotation=Math.PI/2*{horizontal:0,vertical:1}[c];o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,right:1,left:-1}[l],t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),w.retrieve(e.labelInside,t.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var f=e.rotate;return null==f&&(f=t.get(["axisLabel","rotate"])),o.labelRotation="top"===l?-f:f,o.z2=1,o}var FE=["axisLine","axisTickLabel","axisName"],GE=["splitArea","splitLine"],HE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="SingleAxisPointer",n}return Object(x.a)(e,t),e.prototype.render=function(e,n,r,o){var l=this.group;l.removeAll();var c=this._axisGroup;this._axisGroup=new pi;var h=BE(e),d=new TO(e,h);w.each(FE,d.add,d),l.add(this._axisGroup),l.add(d.getGroup()),w.each(GE,(function(t){e.get([t,"show"])&&WE[t](this,this.group,this._axisGroup,e)}),this),Vf(c,this._axisGroup,e),t.prototype.render.call(this,e,n,r,o)},e.prototype.remove=function(){zO(this)},e.type="singleAxis",e}(NO),WE={splitLine:function(t,e,n,r){var o=r.axis;if(!o.scale.isBlank()){var l=r.getModel("splitLine"),c=l.getModel("lineStyle"),h=c.get("color");h=h instanceof Array?h:[h];for(var d=c.get("width"),f=r.coordinateSystem.getRect(),y=o.isHorizontal(),v=[],m=0,x=o.getTicksCoords({tickModel:l}),_=[],S=[],i=0;i=rect.y&&t[1]<=rect.y+rect.height:e.contain(e.toLocalCoord(t[1]))&&t[0]>=rect.y&&t[0]<=rect.y+rect.height},t.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},t.prototype.dataToPoint=function(t){var e=this.getAxis(),rect=this.getRect(),n=[],r="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[r]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-r]=0===r?rect.y+rect.height/2:rect.x+rect.width/2,n},t.prototype.convertToPixel=function(t,e,n){return KE(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return KE(e)===this?this.pointToData(n):null},t}();var JE={create:function(t,e){var n=[];return t.eachComponent("singleAxis",(function(r,o){var l=new $E(r,t,e);l.name="single_"+o,l.resize(r,e),r.coordinateSystem=l,n.push(l)})),t.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var e=t.getReferringComponents("singleAxis",vr).models[0];t.coordinateSystem=e&&e.coordinateSystem}})),n},dimensions:qE},QE=["x","y"],tz=["width","height"],ez=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(x.a)(e,t),e.prototype.makeElOption=function(t,e,n,r,o){var l=n.axis,c=l.coordinateSystem,h=rz(c,1-iz(l)),d=c.dataToPoint(e)[0],f=r.get("type");if(f&&"none"!==f){var y=OR(r),v=nz[f](l,d,h);v.style=y,t.graphicKey=v.type,t.pointer=v}AR(e,t,BE(n),n,r,o)},e.prototype.getHandleTransform=function(t,e,n){var r=BE(e,{labelInside:!1});r.labelMargin=n.get(["handle","margin"]);var o=CR(e.axis,t,r);return{x:o[0],y:o[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,r){var o=n.axis,l=o.coordinateSystem,c=iz(o),h=rz(l,c),d=[t.x,t.y];d[c]+=e[c],d[c]=Math.min(h[1],d[c]),d[c]=Math.max(h[0],d[c]);var f=rz(l,1-c),y=(f[1]+f[0])/2,v=[y,y];return v[c]=d[c],{x:d[0],y:d[1],rotation:t.rotation,cursorPoint:v,tooltipOption:{verticalAlign:"middle"}}},e}(MR),nz={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:DR([e,n[0]],[e,n[1]],iz(t))}},shadow:function(t,e,n){var r=t.getBandWidth(),span=n[1]-n[0];return{type:"Rect",shape:kR([e-r/2,n[0]],[r,span],iz(t))}}};function iz(t){return t.isHorizontal()?0:1}function rz(t,e){var rect=t.getRect();return[rect[QE[e]],rect[QE[e]]+rect[tz[e]]]}var oz=ez,az=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.type="single",e}(Xd);var sz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.init=function(option,e,n){var r=Hu(option);t.prototype.init.apply(this,arguments),lz(option,r)},e.prototype.mergeOption=function(option){t.prototype.mergeOption.apply(this,arguments),lz(this.option,option)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Uu);function lz(t,e){var n,r=t.cellSize;1===(n=w.isArray(r)?r:t.cellSize=[r,r]).length&&(n[1]=n[0]);var o=w.map([0,1],(function(t){return function(option,t){return null!=option[Ru[t][0]]||null!=option[Ru[t][1]]&&null!=option[Ru[t][2]]}(e,t)&&(n[t]="auto"),null!=n[t]&&"auto"!==n[t]}));Gu(t,e,{type:"box",ignoreSize:o})}var uz=sz,cz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.render=function(t,e,n){var r=this.group;r.removeAll();var o=t.coordinateSystem,l=o.getRangeInfo(),c=o.getOrient(),h=e.getLocaleModel();this._renderDayRect(t,l,r),this._renderLines(t,l,c,r),this._renderYearText(t,l,c,r),this._renderMonthText(t,h,c,r),this._renderWeekText(t,h,l,c,r)},e.prototype._renderDayRect=function(t,e,n){for(var r=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),l=r.getCellWidth(),c=r.getCellHeight(),i=e.start.time;i<=e.end.time;i=r.getNextNDay(i,1).time){var h=r.dataToRect([i],!1).tl,rect=new Ia({shape:{x:h[0],y:h[1],width:l,height:c},cursor:"default",style:o});n.add(rect)}},e.prototype._renderLines=function(t,e,n,r){var o=this,l=t.coordinateSystem,c=t.getModel(["splitLine","lineStyle"]).getLineStyle(),h=t.get(["splitLine","show"]),d=c.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var f=e.start,i=0;f.time<=e.end.time;i++){v(f.formatedDate),0===i&&(f=l.getDateInfo(e.start.y+"-"+e.start.m));var y=f.date;y.setMonth(y.getMonth()+1),f=l.getDateInfo(y)}function v(e){o._firstDayOfMonth.push(l.getDateInfo(e)),o._firstDayPoints.push(l.dataToRect([e],!1).tl);var d=o._getLinePointsOfOneWeek(t,e,n);o._tlpoints.push(d[0]),o._blpoints.push(d[d.length-1]),h&&o._drawSplitline(d,c,r)}v(l.getNextNDay(e.end.time,1).formatedDate),h&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,d,n),c,r),h&&this._drawSplitline(o._getEdgesPoints(o._blpoints,d,n),c,r)},e.prototype._getEdgesPoints=function(t,e,n){var r=[t[0].slice(),t[t.length-1].slice()],o="horizontal"===n?0:1;return r[0][o]=r[0][o]-e/2,r[1][o]=r[1][o]+e/2,r},e.prototype._drawSplitline=function(t,e,n){var r=new Xp({z2:20,shape:{points:t},style:e});n.add(r)},e.prototype._getLinePointsOfOneWeek=function(t,e,n){for(var r=t.coordinateSystem,o=r.getDateInfo(e),l=[],i=0;i<7;i++){var c=r.getNextNDay(o.time,i),h=r.dataToRect([c.time],!1);l[2*c.day]=h.tl,l[2*c.day+1]=h["horizontal"===n?"bl":"tr"]}return l},e.prototype._formatterLabel=function(t,e){return Object(w.isString)(t)&&t?(n=t,param=e,w.each(param,(function(t,e){n=n.replace("{"+e+"}",r?st(t):t)})),n):Object(w.isFunction)(t)?t(e):e.nameMap;var n,param,r},e.prototype._yearTextPositionControl=function(t,e,n,r,o){var l=e[0],c=e[1],h=["center","bottom"];"bottom"===r?(c+=o,h=["center","top"]):"left"===r?l-=o:"right"===r?(l+=o,h=["center","top"]):c-=o;var d=0;return"left"!==r&&"right"!==r||(d=Math.PI/2),{rotation:d,x:l,y:c,style:{align:h[0],verticalAlign:h[1]}}},e.prototype._renderYearText=function(t,e,n,r){var o=t.getModel("yearLabel");if(o.get("show")){var l=o.get("margin"),c=o.get("position");c||(c="horizontal"!==n?"top":"left");var h=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],d=(h[0][0]+h[1][0])/2,f=(h[0][1]+h[1][1])/2,y="horizontal"===n?0:1,v={top:[d,h[y][1]],bottom:[d,h[1-y][1]],left:[h[1-y][0],f],right:[h[y][0],f]},m=e.start.y;+e.end.y>+e.start.y&&(m=m+"-"+e.end.y);var x=o.get("formatter"),_={start:e.start.y,end:e.end.y,nameMap:m},content=this._formatterLabel(x,_),w=new Ga({z2:30,style:cl(o,{text:content})});w.attr(this._yearTextPositionControl(w,v[c],n,c,l)),r.add(w)}},e.prototype._monthTextPositionControl=function(t,e,n,r,o){var l="left",c="top",h=t[0],d=t[1];return"horizontal"===n?(d+=o,e&&(l="center"),"start"===r&&(c="bottom")):(h+=o,e&&(c="middle"),"start"===r&&(l="right")),{x:h,y:d,align:l,verticalAlign:c}},e.prototype._renderMonthText=function(t,e,n,r){var o=t.getModel("monthLabel");if(o.get("show")){var l=o.get("nameMap"),c=o.get("margin"),h=o.get("position"),d=o.get("align"),f=[this._tlpoints,this._blpoints];l&&!Object(w.isString)(l)||(l&&(e=Yl(l)||e),l=e.get(["time","monthAbbr"])||[]);var y="start"===h?0:1,v="horizontal"===n?0:1;c="start"===h?-c:c;for(var m="center"===d,i=0;i=n.start.time&&e.timec.end.time&&t.reverse(),t},t.prototype._getRangeInfo=function(t){var e,n=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];n[0].time>n[1].time&&(e=!0,n.reverse());var r=Math.floor(n[1].time/dz)-Math.floor(n[0].time/dz)+1,o=new Date(n[0].time),l=o.getDate(),c=n[1].date.getDate();o.setDate(l+r-1);var h=o.getDate();if(h!==c)for(var d=o.getTime()-n[1].time>0?1:-1;(h=o.getDate())!==c&&(o.getTime()-n[1].time)*d>0;)r-=d,o.setDate(h-d);var f=Math.floor((r+n[0].day+6)/7),y=e?1-f:f-1;return e&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:r,weeks:f,nthWeek:y,fweek:n[0].day,lweek:n[1].day}},t.prototype._getDateByWeeksAndDay=function(t,e,n){var r=this._getRangeInfo(n);if(t>r.weeks||0===t&&er.lweek)return null;var o=7*(t-1)-r.fweek+e,l=new Date(r.start.time);return l.setDate(+r.start.d+o),this.getDateInfo(l)},t.create=function(e,n){var r=[];return e.eachComponent("calendar",(function(o){var l=new t(o,e,n);r.push(l),o.coordinateSystem=l})),e.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=r[t.get("calendarIndex")||0])})),r},t.dimensions=["time","value"],t}();function gz(t,e){var n;return w.each(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)})),n}var yz=["transition","enterFrom","leaveTo"],vz=yz.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function mz(t,source,e){if(e&&(!t[e]&&source[e]&&(t[e]={}),t=t[e],source=source[e]),t&&source)for(var n=e?yz:vz,i=0;i=0;i--){var v,m,x;if(x=null!=(m=lr((v=n[i]).id,null))?o.get(m):null){var _=x.parent,S=(y=_z(_),{}),M=Bu(x,v,_===r?{width:l,height:c}:{width:y.width,height:y.height},null,{hv:v.hv,boundingMode:v.bounding},S);if(!_z(x).isNew&&M){for(var O=v.transition,I={},T=0;T=0)?I[C]=A:x[C]=A}Ks(x,I,t,0)}else x.attr(S)}}},e.prototype._clear=function(){var t=this,e=this._elMap;e.each((function(n){Oz(n,_z(n).option,e,t._lastGraphicModel)})),this._elMap=w.createHashMap()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Xd);function Sz(t){var e=new(w.hasOwn(bz,t)?bz[t]:If(t))({});return _z(e).type=t,e}function Mz(t,e,n,r){var o=Sz(n);return e.add(o),r.set(t,o),_z(o).id=t,_z(o).isNew=!0,o}function Oz(t,e,n,r){t&&t.parent&&("group"===t.type&&t.traverse((function(t){Oz(t,e,n,r)})),ON(t,e,r),n.removeKey(_z(t).id))}function Iz(t,e,n,r){t.isGroup||w.each([["cursor",lo.prototype.cursor],["zlevel",r||0],["z",n||0],["z2",0]],(function(n){var r=n[0];w.hasOwn(e,r)?t[r]=w.retrieve2(e[r],n[1]):null==t[r]&&(t[r]=n[1])})),w.each(w.keys(e),(function(n){if(0===n.indexOf("on")){var r=e[n];t[n]=w.isFunction(r)?r:null}})),w.hasOwn(e,"draggable")&&(t.draggable=e.draggable),null!=e.name&&(t.name=e.name),null!=e.id&&(t.id=e.id)}var Tz=["x","y","radius","angle","single"],Cz=["cartesian2d","polar","singleAxis"];function Az(t){return t+"Axis"}function Dz(t,e){var n,r=Object(w.createHashMap)(),o=[],l=Object(w.createHashMap)();t.eachComponent({mainType:"dataZoom",query:e},(function(t){l.get(t.uid)||h(t)}));do{n=!1,t.eachComponent("dataZoom",c)}while(n);function c(t){!l.get(t.uid)&&function(t){var e=!1;return t.eachTargetAxis((function(t,n){var o=r.get(t);o&&o[n]&&(e=!0)})),e}(t)&&(h(t),n=!0)}function h(t){l.set(t.uid,!0),o.push(t),t.eachTargetAxis((function(t,e){(r.get(t)||r.set(t,[]))[e]=!0}))}return o}function kz(t){var e=t.ecModel,n={infoList:[],infoMap:Object(w.createHashMap)()};return t.eachTargetAxis((function(t,r){var o=e.getComponent(Az(t),r);if(o){var l=o.getCoordSysModel();if(l){var c=l.uid,h=n.infoMap.get(c);h||(h={model:l,axisModels:[]},n.infoList.push(h),n.infoMap.set(c,h)),h.axisModels.push(o)}}})),n}var Lz=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}(),jz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return Object(x.a)(e,t),e.prototype.init=function(option,t,e){var n=Pz(option);this.settledOption=n,this.mergeDefaultAndTheme(option,e),this._doInit(n)},e.prototype.mergeOption=function(t){var e=Pz(t);Object(w.merge)(this.option,t,!0),Object(w.merge)(this.settledOption,e,!0),this._doInit(e)},e.prototype._doInit=function(t){var e=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;Object(w.each)([["start","startValue"],["end","endValue"]],(function(t,r){"value"===this._rangePropMode[r]&&(e[t[0]]=n[t[0]]=null)}),this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=Object(w.createHashMap)();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each((function(t){t.indexList.length&&(this._noTarget=!1)}),this)},e.prototype._fillSpecifiedTargetAxis=function(t){var e=!1;return Object(w.each)(Tz,(function(n){var r=this.getReferringComponents(Az(n),mr);if(r.specified){e=!0;var o=new Lz;Object(w.each)(r.models,(function(t){o.add(t.componentIndex)})),t.set(n,o)}}),this),e},e.prototype._fillAutoTargetAxisByOrient=function(t,e){var n=this.ecModel,r=!0;if(r){var o="vertical"===e?"y":"x";l(n.findComponents({mainType:o+"Axis"}),o)}r&&l(n.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single");function l(e,n){var o=e[0];if(o){var l=new Lz;if(l.add(o.componentIndex),t.set(n,l),r=!1,"x"===n||"y"===n){var c=o.getReferringComponents("grid",vr).models[0];c&&Object(w.each)(e,(function(t){o.componentIndex!==t.componentIndex&&c===t.getReferringComponents("grid",vr).models[0]&&l.add(t.componentIndex)}))}}}r&&Object(w.each)(Tz,(function(e){if(r){var o=n.findComponents({mainType:Az(e),filter:function(t){return"category"===t.get("type",!0)}});if(o[0]){var l=new Lz;l.add(o[0].componentIndex),t.set(e,l),r=!1}}}),this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis((function(e){!t&&(t=e)}),this),"y"===t?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var e=this._rangePropMode,n=this.get("rangeMode");Object(w.each)([["start","startValue"],["end","endValue"]],(function(r,o){var l=null!=t[r[0]],c=null!=t[r[1]];l&&!c?e[o]="percent":!l&&c?e[o]="value":n?e[o]=n[o]:l&&(e[o]="percent")}))},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis((function(e,n){null==t&&(t=this.ecModel.getComponent(Az(e),n))}),this),t},e.prototype.eachTargetAxis=function(t,e){this._targetAxisInfoMap.each((function(n,r){Object(w.each)(n.indexList,(function(n){t.call(e,r,n)}))}))},e.prototype.getAxisProxy=function(t,e){var n=this.getAxisModel(t,e);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent(Az(t),e)},e.prototype.setRawRange=function(t){var e=this.option,n=this.settledOption;Object(w.each)([["start","startValue"],["end","endValue"]],(function(r){null==t[r[0]]&&null==t[r[1]]||(e[r[0]]=n[r[0]]=t[r[0]],e[r[1]]=n[r[1]]=t[r[1]])}),this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var option=this.option;Object(w.each)(["start","startValue","end","endValue"],(function(e){option[e]=t[e]}))},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;i=0}(e)){var n=Az(this._dimName),r=e.getReferringComponents(n,vr).models[0];r&&this._axisIndex===r.componentIndex&&t.push(e)}}),this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return w.clone(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){var e,n=this._dataExtent,r=this.getAxisModel().axis.scale,o=this._dataZoomModel.getRangePropMode(),l=[0,100],c=[],h=[];Gz(["start","end"],(function(d,f){var y=t[d],v=t[d+"Value"];"percent"===o[f]?(null==y&&(y=l[f]),v=r.parse(Oi(y,l,n))):(e=!0,y=Oi(v=null==v?n[f]:r.parse(v),n,l)),h[f]=null==v||isNaN(v)?n[f]:v,c[f]=null==y||isNaN(y)?l[f]:y})),Hz(h),Hz(c);var d=this._minMaxSpan;function f(t,e,n,o,l){var c=l?"Span":"ValueSpan";bk(0,t,n,"all",d["min"+c],d["max"+c]);for(var i=0;i<2;i++)e[i]=Oi(t[i],n,o,!0),l&&(e[i]=r.parse(e[i]))}return e?f(h,c,n,l,!1):f(c,h,l,n,!0),{valueWindow:h,percentWindow:c}},t.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,n){var r=[1/0,-1/0];Gz(n,(function(t){!function(t,data,e){data&&w.each(mb(data,e),(function(e){var n=data.getApproximateExtent(e);n[0]t[1]&&(t[1]=n[1])}))}(r,t.getData(),e)}));var o=t.getAxisModel(),l=ub(o.axis.scale,o,r).calculate();return[l.min,l.max]}(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(t,e){if(t===this._dataZoomModel){var n=this._dimName,r=this.getTargetSeriesModels(),o=t.get("filterMode"),l=this._valueWindow;"none"!==o&&Gz(r,(function(t){var e=t.getData(),r=e.mapDimensionsAll(n);if(r.length){if("weakFilter"===o){var c=e.getStore(),h=w.map(r,(function(t){return e.getDimensionIndex(t)}),e);e.filterSelf((function(t){for(var e,n,o,i=0;il[1];if(f&&!y&&!v)return!0;f&&(o=!0),y&&(e=!0),v&&(n=!0)}return o&&e&&n}))}else Gz(r,(function(n){if("empty"===o)t.setData(e=e.map(n,(function(t){return function(t){return t>=l[0]&&t<=l[1]}(t)?t:NaN})));else{var r={};r[n]=l,e.selectRange(r)}}));Gz(r,(function(t){e.setApproximateExtent(l,t)}))}}))}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;Gz(["min","max"],(function(r){var o=e.get(r+"Span"),l=e.get(r+"ValueSpan");null!=l&&(l=this.getAxisModel().axis.scale.parse(l)),null!=l?o=Oi(n[0]+l,n,[0,100],!0):null!=o&&(l=Oi(o,[0,100],n,!0)-n[0]),t[r+"Span"]=o,t[r+"ValueSpan"]=l}),this)},t.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var r=ki(n,[0,500]);r=Math.min(r,20);var o=t.axis.scale.rawExtentInfo;0!==e[0]&&o.setDeterminedMinMax("min",+n[0].toFixed(r)),100!==e[1]&&o.setDeterminedMinMax("max",+n[1].toFixed(r)),o.freeze()}},t}(),Yz={getTargetSeries:function(t){function e(e){t.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(r,o){var l=t.getComponent(Az(r),o);e(r,o,l,n)}))}))}e((function(t,e,n,r){n.__dzAxisProxy=null}));var n=[];e((function(e,r,o,l){o.__dzAxisProxy||(o.__dzAxisProxy=new Wz(e,r,l,t),n.push(o.__dzAxisProxy))}));var r=Object(w.createHashMap)();return Object(w.each)(n,(function(t){Object(w.each)(t.getTargetSeriesModels(),(function(t){r.set(t.uid,t)}))})),r},overallReset:function(t,e){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis((function(e,n){t.getAxisProxy(e,n).reset(t)})),t.eachTargetAxis((function(n,r){t.getAxisProxy(n,r).filterData(t,e)}))})),t.eachComponent("dataZoom",(function(t){var e=t.findRepresentativeAxisProxy();if(e){var n=e.getDataPercentWindow(),r=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:r[0],endValue:r[1]})}}))}};var Xz=!1;function Uz(t){Xz||(Xz=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,Yz),function(t){t.registerAction("dataZoom",(function(t,e){var n=Dz(e,t);Object(w.each)(n,(function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}))}(t),t.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}function Zz(t){t.registerComponentModel(Ez),t.registerComponentView(Fz),Uz(t)}var qz=function(){},Kz={};function $z(t,e){Kz[t]=e}function Jz(t){return Kz[t]}var Qz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;w.each(this.option.feature,(function(t,n){var r=Jz(n);r&&(r.getDefaultOption&&(r.defaultOption=r.getDefaultOption(e)),w.merge(t,r.defaultOption))}))},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(Uu),tV=Qz;function eV(rect,t){var e=Mu(t.get("padding")),style=t.getItemStyle(["color","opacity"]);return style.fill=t.get("backgroundColor"),rect=new Ia({shape:{x:rect.x-e[3],y:rect.y-e[0],width:rect.width+e[1]+e[3],height:rect.height+e[0]+e[2],r:t.get("borderRadius")},style:style,silent:!0,z2:-1})}var nV=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(x.a)(e,t),e.prototype.render=function(t,e,n,r){var o=this.group;if(o.removeAll(),t.get("show")){var l=+t.get("itemSize"),c="vertical"===t.get("orient"),h=t.get("feature")||{},d=this._features||(this._features={}),f=[];w.each(h,(function(t,e){f.push(e)})),new Tm(this._featureNames||[],f).add(y).update(y).remove(w.curry(y,null)).execute(),this._featureNames=f,function(t,e,n){var r=e.getBoxLayoutParams(),o=e.get("padding"),l={width:n.getWidth(),height:n.getHeight()},rect=Vu(r,l,o);zu(e.get("orient"),t,e.get("itemGap"),rect.width,rect.height),Bu(t,r,l,o)}(o,t,n),o.add(eV(o.getBoundingRect(),t)),c||o.eachChild((function(t){var e=t.__title,r=t.ensureState("emphasis"),c=r.textConfig||(r.textConfig={}),h=t.getTextContent(),d=h&&h.ensureState("emphasis");if(d&&!w.isFunction(d)&&e){var f=d.style||(d.style={}),rect=Zn(e,Ga.makeFont(f)),y=t.x+o.x,v=!1;t.y+o.y+l+rect.height>n.getHeight()&&(c.position="top",v=!0);var m=v?-5-rect.height:l+10;y+rect.width/2>n.getWidth()?(c.position=["100%",m],f.align="right"):y-rect.width/2<0&&(c.position=[0,m],f.align="left")}}))}function y(y,v){var m,x=f[y],_=f[v],S=h[x],M=new Pl(S,t,t.ecModel);if(r&&null!=r.newTitle&&r.featureName===x&&(S.title=r.newTitle),x&&!_){if(function(t){return 0===t.indexOf("my")}(x))m={onclick:M.option.onclick,featureName:x};else{var O=Jz(x);if(!O)return;m=new O}d[x]=m}else if(!(m=d[_]))return;m.uid=Rl("toolbox-feature"),m.model=M,m.ecModel=e,m.api=n;var I=m instanceof qz;x||!_?!M.get("show")||I&&m.unusable?I&&m.remove&&m.remove(e,n):(!function(r,h,d){var f,y,v=r.getModel("iconStyle"),m=r.getModel(["emphasis","iconStyle"]),x=h instanceof qz&&h.getIcons?h.getIcons():r.get("icon"),_=r.get("title")||{};w.isString(x)?(f={})[d]=x:f=x;w.isString(_)?(y={})[d]=_:y=_;var S=r.iconPaths={};w.each(f,(function(d,f){var path=Gf(d,{},{x:-l/2,y:-l/2,width:l,height:l});path.setStyle(v.getItemStyle()),path.ensureState("emphasis").style=m.getItemStyle();var x=new Ga({style:{text:y[f],align:m.get("textAlign"),borderRadius:m.get("textBorderRadius"),padding:m.get("textPadding"),fill:null},ignore:!0});path.setTextContent(x),Xf({el:path,componentModel:t,itemName:f,formatterParamsExtra:{title:y[f]}}),path.__title=y[f],path.on("mouseover",(function(){var e=m.getItemStyle(),r=c?null==t.get("right")&&"right"!==t.get("left")?"right":"left":null==t.get("bottom")&&"bottom"!==t.get("top")?"bottom":"top";x.setStyle({fill:m.get("textFill")||e.fill||e.stroke||"#000",backgroundColor:m.get("textBackgroundColor")}),path.setTextConfig({position:m.get("textPosition")||r}),x.ignore=!t.get("showTitle"),n.enterEmphasis(this)})).on("mouseout",(function(){"emphasis"!==r.get(["iconStatus",f])&&n.leaveEmphasis(this),x.hide()})),("emphasis"===r.get(["iconStatus",f])?Ms:Os)(path),o.add(path),path.on("click",w.bind(h.onclick,h,e,n,f)),S[f]=path}))}(M,m,x),M.setIconStatus=function(t,e){var option=this.option,n=this.iconPaths;option.iconStatus=option.iconStatus||{},option.iconStatus[t]=e,n[t]&&("emphasis"===e?Ms:Os)(n[t])},m instanceof qz&&m.render&&m.render(M,e,n,r)):I&&m.dispose&&m.dispose(e,n)}},e.prototype.updateView=function(t,e,n,r){w.each(this._features,(function(t){t instanceof qz&&t.updateView&&t.updateView(t.model,e,n,r)}))},e.prototype.remove=function(t,e){w.each(this._features,(function(n){n instanceof qz&&n.remove&&n.remove(t,e)})),this.group.removeAll()},e.prototype.dispose=function(t,e){w.each(this._features,(function(n){n instanceof qz&&n.dispose&&n.dispose(t,e)}))},e.type="toolbox",e}(Xd);var iV=nV,rV=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(x.a)(e,t),e.prototype.onclick=function(t,e){var n=this.model,title=n.get("name")||t.get("title.0.text")||"echarts",r="svg"===e.getZr().painter.getType(),o=r?"svg":n.get("type",!0)||"png",l=e.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),c=_.a.browser;if(Object(w.isFunction)(MouseEvent)&&(c.newEdge||!c.ie&&!c.edge)){var h=document.createElement("a");h.download=title+"."+o,h.target="_blank",h.href=l;var d=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});h.dispatchEvent(d)}else if(window.navigator.msSaveOrOpenBlob||r){var f=l.split(","),y=f[0].indexOf("base64")>-1,v=r?decodeURIComponent(f[1]):f[1];y&&(v=window.atob(v));var m=title+"."+o;if(window.navigator.msSaveOrOpenBlob){for(var x=v.length,S=new Uint8Array(x);x--;)S[x]=v.charCodeAt(x);var M=new Blob([S]);window.navigator.msSaveOrOpenBlob(M,m)}else{var O=document.createElement("iframe");document.body.appendChild(O);var I=O.contentWindow,T=I.document;T.open("image/svg+xml","replace"),T.write(v),T.close(),I.focus(),T.execCommand("SaveAs",!0,m),document.body.removeChild(O)}}else{var C=n.get("lang"),html='',A=window.open();A.document.write(html),A.document.title=title}},e.getDefaultOption=function(t){return{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:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},e}(qz),oV=rV,aV="__ec_magicType_stack__",sV=[["line","bar"],["stack"]],lV=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(x.a)(e,t),e.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return w.each(t.get("type"),(function(t){e[t]&&(n[t]=e[t])})),n},e.getDefaultOption=function(t){return{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"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},e.prototype.onclick=function(t,e,n){var r=this.model,o=r.get(["seriesIndex",n]);if(uV[n]){var l,c={series:[]};w.each(sV,(function(t){w.indexOf(t,n)>=0&&w.each(t,(function(t){r.setIconStatus(t,"normal")}))})),r.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==o?null:{seriesIndex:o}},(function(t){var e=t.subType,o=t.id,l=uV[n](e,o,t,r);l&&(w.defaults(l,t.option),c.series.push(l));var h=t.coordinateSystem;if(h&&"cartesian2d"===h.type&&("line"===n||"bar"===n)){var d=h.getAxesByScale("ordinal")[0];if(d){var f=d.dim+"Axis",y=t.getReferringComponents(f,vr).models[0].componentIndex;c[f]=c[f]||[];for(var i=0;i<=y;i++)c[f][y]=c[f][y]||{};c[f][y].boundaryGap="bar"===n}}}));var h=n;"stack"===n&&(l=w.merge({stack:r.option.title.tiled,tiled:r.option.title.stack},r.option.title),"emphasis"!==r.get(["iconStatus",n])&&(h="tiled")),e.dispatchAction({type:"changeMagicType",currentType:h,newOption:c,newTitle:l,featureName:"magicType"})}},e}(qz),uV={line:function(t,e,n,r){if("bar"===t)return w.merge({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get(["option","line"])||{},!0)},bar:function(t,e,n,r){if("line"===t)return w.merge({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},r.get(["option","bar"])||{},!0)},stack:function(t,e,n,r){var o=n.get("stack")===aV;if("line"===t||"bar"===t)return r.setIconStatus("stack",o?"normal":"emphasis"),w.merge({id:e,stack:o?"":aV},r.get(["option","stack"])||{},!0)}};cm({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)}));var cV=lV,hV=new Array(60).join("-"),dV="\t";function pV(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var fV=new RegExp("["+dV+"]+","g");function gV(t,e){var n=t.split(new RegExp("\n*"+hV+"\n*","g")),r={series:[]};return w.each(n,(function(t,n){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf(dV)>=0)return!0}(t)){var o=function(t){for(var e=t.split(/\n+/g),n=pV(e.shift()).split(fV),r=[],o=w.map(n,(function(header){return{name:header,data:[]}})),i=0;i=0)&&t(o,r._targetInfoList)}))}return t.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,(function(area,t,e){if((area.coordRanges||(area.coordRanges=[])).push(t),!area.coordRange){area.coordRange=t;var n=kV[area.brushType](0,e,t);area.__rangeOffset={offset:jV[area.brushType](n.values,area.range,[1,1]),xyMinMax:n.xyMinMax}}})),t},t.prototype.matchOutputRanges=function(t,e,n){Object(w.each)(t,(function(area){var t=this.findTargetInfo(area,e);t&&!0!==t&&Object(w.each)(t.coordSyses,(function(t){var r=kV[area.brushType](1,t,area.range,!0);n(area,r.values,t,e)}))}),this)},t.prototype.setInputRanges=function(t,e){Object(w.each)(t,(function(area){var t,n,r,o,l,c=this.findTargetInfo(area,e);if(area.range=area.range||[],c&&!0!==c){area.panelId=c.panelId;var h=kV[area.brushType](0,c.coordSys,area.coordRange),d=area.__rangeOffset;area.range=d?jV[area.brushType](h.values,d.offset,(t=h.xyMinMax,n=d.xyMinMax,r=NV(t),o=NV(n),l=[r[0]/o[0],r[1]/o[1]],isNaN(l[0])&&(l[0]=1),isNaN(l[1])&&(l[1]=1),l)):h.values}}),this)},t.prototype.makePanelOpts=function(t,e){return Object(w.map)(this._targetInfoList,(function(n){var rect=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:TL(rect),isTargetByCursor:AL(rect,t,n.coordSysModel),getLinearBrushOtherExtent:CL(rect)}}))},t.prototype.controlSeries=function(area,t,e){var n=this.findTargetInfo(area,e);return!0===n||n&&Object(w.indexOf)(n.coordSyses,t.coordinateSystem)>=0},t.prototype.findTargetInfo=function(area,t){for(var e=this._targetInfoList,n=TV(t,area),i=0;it[1]&&t.reverse(),t}function TV(t,e){return gr(t,e,{includeMainTypes:MV})}var CV={grid:function(t,e){var n=t.xAxisModels,r=t.yAxisModels,o=t.gridModels,l=Object(w.createHashMap)(),c={},h={};(n||r||o)&&(Object(w.each)(n,(function(t){var e=t.axis.grid.model;l.set(e.id,e),c[e.id]=!0})),Object(w.each)(r,(function(t){var e=t.axis.grid.model;l.set(e.id,e),h[e.id]=!0})),Object(w.each)(o,(function(t){l.set(t.id,t),c[t.id]=!0,h[t.id]=!0})),l.each((function(t){var o=t.coordinateSystem,l=[];Object(w.each)(o.getCartesians(),(function(t,e){(Object(w.indexOf)(n,t.getAxis("x").model)>=0||Object(w.indexOf)(r,t.getAxis("y").model)>=0)&&l.push(t)})),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:l[0],coordSyses:l,getPanelRect:DV.grid,xAxisDeclared:c[t.id],yAxisDeclared:h[t.id]})})))},geo:function(t,e){Object(w.each)(t.geoModels,(function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:DV.geo})}))}},AV=[function(t,e){var n=t.xAxisModel,r=t.yAxisModel,o=t.gridModel;return!o&&n&&(o=n.axis.grid.model),!o&&r&&(o=r.axis.grid.model),o&&o===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],DV={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,rect=t.getBoundingRect().clone();return rect.applyTransform(Nf(t)),rect}},kV={lineX:Object(w.curry)(LV,0),lineY:Object(w.curry)(LV,1),rect:function(t,e,n,r){var o=t?e.pointToData([n[0][0],n[1][0]],r):e.dataToPoint([n[0][0],n[1][0]],r),l=t?e.pointToData([n[0][1],n[1][1]],r):e.dataToPoint([n[0][1],n[1][1]],r),c=[IV([o[0],l[0]]),IV([o[1],l[1]])];return{values:c,xyMinMax:c}},polygon:function(t,e,n,r){var o=[[1/0,-1/0],[1/0,-1/0]];return{values:Object(w.map)(n,(function(n){var p=t?e.pointToData(n,r):e.dataToPoint(n,r);return o[0][0]=Math.min(o[0][0],p[0]),o[1][0]=Math.min(o[1][0],p[1]),o[0][1]=Math.max(o[0][1],p[0]),o[1][1]=Math.max(o[1][1],p[1]),p})),xyMinMax:o}}};function LV(t,e,n,r){var o=n.getAxis(["x","y"][t]),l=IV(Object(w.map)([0,1],(function(i){return e?o.coordToData(o.toLocalCoord(r[i]),!0):o.toGlobalCoord(o.dataToCoord(r[i]))}))),c=[];return c[t]=l,c[1-t]=[NaN,NaN],{values:l,xyMinMax:c}}var jV={lineX:Object(w.curry)(PV,0),lineY:Object(w.curry)(PV,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return Object(w.map)(t,(function(t,r){return[t[0]-n[0]*e[r][0],t[1]-n[1]*e[r][1]]}))}};function PV(t,e,n,r){return[e[0]-r[t]*n[0],e[1]-r[t]*n[1]]}function NV(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var RV,EV,zV=OV,VV=w.each,BV=Ji+"toolbox-dataZoom_",FV=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(x.a)(e,t),e.prototype.render=function(t,e,n,r){this._brushController||(this._brushController=new IL(n.getZr()),this._brushController.on("brush",w.bind(this._onBrush,this)).mount()),function(t,e,view,n,r){var o=view._isZoomActive;n&&"takeGlobalCursor"===n.type&&(o="dataZoomSelect"===n.key&&n.dataZoomSelectActive);view._isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var l=new zV(HV(t),e,{include:["grid"]}),c=l.makePanelOpts(r,(function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"}));view._brushController.setPanels(c).enableBrush(!(!o||!c.length)&&{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()})}(t,e,this,r,n),function(t,e){t.setIconStatus("back",function(t){return _V(t).length}(e)>1?"emphasis":"normal")}(t,e)},e.prototype.onclick=function(t,e,n){GV[n].call(this)},e.prototype.remove=function(t,e){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,e){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var e=t.areas;if(t.isEnd&&e.length){var n={},r=this.ecModel;this._brushController.updateCovers([]),new zV(HV(this.model),r,{include:["grid"]}).matchOutputRanges(e,r,(function(area,t,e){if("cartesian2d"===e.type){var n=area.brushType;"rect"===n?(o("x",e,t[0]),o("y",e,t[1])):o({lineX:"x",lineY:"y"}[n],e,t)}})),function(t,e){var n=_V(t);xV(e,(function(e,r){for(var i=n.length-1;i>=0&&!n[i][r];i--);if(i<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:r})[0];if(o){var l=o.getPercentRange();n[0][r]={dataZoomId:r,start:l[0],end:l[1]}}}})),n.push(e)}(r,n),this._dispatchZoomAction(n)}function o(t,e,o){var l=e.getAxis(t),c=l.model,h=function(t,e,n){var r;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(t,e.componentIndex)&&(r=n)})),r}(t,c,r),d=h.findRepresentativeAxisProxy(c).getMinMaxSpan();null==d.minValueSpan&&null==d.maxValueSpan||(o=bk(0,o.slice(),l.scale.getExtent(),0,d.minValueSpan,d.maxValueSpan)),h&&(n[h.id]={dataZoomId:h.id,startValue:o[0],endValue:o[1]})}},e.prototype._dispatchZoomAction=function(t){var e=[];VV(t,(function(t,n){e.push(w.clone(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},e.getDefaultOption=function(t){return{show:!0,filterMode:"filter",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:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},e}(qz),GV={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var e=_V(t),head=e[e.length-1];e.length>1&&e.pop();var n={};return xV(head,(function(t,r){for(var i=e.length-1;i>=0;i--)if(t=e[i][r]){n[r]=t;break}})),n}(this.ecModel))}};function HV(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==e.xAxisIndex&&null==e.xAxisId&&(e.xAxisIndex="all"),null==e.yAxisIndex&&null==e.yAxisId&&(e.yAxisIndex="all"),e}RV="dataZoom",EV=function(t){var e=t.getComponent("toolbox",0),n=["feature","dataZoom"];if(e&&null!=e.get(n)){var r=e.getModel(n),o=[],l=gr(t,HV(r));return VV(l.xAxisModels,(function(t){return c(t,"xAxis","xAxisIndex")})),VV(l.yAxisModels,(function(t){return c(t,"yAxis","yAxisIndex")})),o}function c(t,e,n){var l=t.componentIndex,c={type:"select",$fromToolbox:!0,filterMode:r.get("filterMode",!0)||"filter",id:BV+e+l};c[n]=l,o.push(c)}},Object(w.assert)(null==pc.get(RV)&&EV),pc.set(RV,EV);var WV=FV;var YV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(Uu),XV=YV;function UV(t){var e=t.get("confine");return null!=e?!!e:"richText"===t.get("renderMode")}function ZV(t){if(_.a.domSupported)for(var style=document.documentElement.style,i=0,e=t.length;i-1?(f+="top:50%",y+="translateY(-50%) rotate("+(c="left"===h?-225:-45)+"deg)"):(f+="left:50%",y+="translateX(-50%) rotate("+(c="top"===h?225:45)+"deg)");var v=c*Math.PI/180,m=d+o,x=m*Math.abs(Math.cos(v))+m*Math.abs(Math.sin(v)),_=e+" solid "+o+"px;";return'
'}(e,n,r)),Object(w.isString)(content))o.innerHTML=content+l;else if(content){o.innerHTML="",Object(w.isArray)(content)||(content=[content]);for(var i=0;i=0?this._tryShow(n,r):"leave"===e&&this._hide(r))}),this))},e.prototype._keepShow=function(){var t=this._tooltipModel,e=this._ecModel,n=this._api,r=t.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==r&&"click"!==r){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&o.manuallyShowTip(t,e,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})}))}},e.prototype.manuallyShowTip=function(t,e,n,r){if(r.from!==this.uid&&!_.a.node&&n.getDom()){var o=hB(r,n);this._ticket="";var l=r.dataByCoordSys,c=function(t,e,n){var r=yr(t).queryOptionMap,o=r.keys()[0];if(!o||"series"===o)return;var l=xr(e,o,r.get(o),{useDefault:!1,enableAll:!1,enableNone:!1}),c=l.models[0];if(!c)return;var h,view=n.getViewOfComponentModel(c);if(view.group.traverse((function(e){var n=Ha(e).tooltipConfig;if(n&&n.name===t.name)return h=e,!0})),h)return{componentMainType:o,componentIndex:c.componentIndex,el:h}}(r,e,n);if(c){var rect=c.el.getBoundingRect().clone();rect.applyTransform(c.el.transform),this._tryShow({offsetX:rect.x+rect.width/2,offsetY:rect.y+rect.height/2,target:c.el,position:r.position,positionDefault:"bottom"},o)}else if(r.tooltip&&null!=r.x&&null!=r.y){var h=lB;h.x=r.x,h.y=r.y,h.update(),Ha(h).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:h},o)}else if(l)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:l,tooltipOption:r.tooltipOption},o);else if(null!=r.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,r))return;var d=ZR(r,e),f=d.point[0],y=d.point[1];null!=f&&null!=y&&this._tryShow({offsetX:f,offsetY:y,target:d.el,position:r.position,positionDefault:"bottom"},o)}else null!=r.x&&null!=r.y&&(n.dispatchAction({type:"updateAxisPointer",x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},o))}},e.prototype.manuallyHideTip=function(t,e,n,r){var o=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,r.from!==this.uid&&this._hide(hB(r,n))},e.prototype._manuallyAxisShowTip=function(t,e,n,r){var o=r.seriesIndex,l=r.dataIndex,c=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=l&&null!=c){var h=e.getSeriesByIndex(o);if(h)if("axis"===cB([h.getData().getItemModel(l),h,(h.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:l,position:r.position}),!0}},e.prototype._tryShow=function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var r=t.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,t);else if(n){var o,l;this._lastDataByCoordSys=null,ty(n,(function(t){return null!=Ha(t).dataIndex?(o=t,!0):null!=Ha(t).tooltipConfig?(l=t,!0):void 0}),!0),o?this._showSeriesItemTooltip(t,o,e):l?this._showComponentItemTooltip(t,l,e):this._hide(e)}else this._lastDataByCoordSys=null,this._hide(e)}},e.prototype._showOrMove=function(t,e){var n=t.get("showDelay");e=Object(w.bind)(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},e.prototype._showAxisTooltip=function(t,e){var n=this._ecModel,r=this._tooltipModel,o=[e.offsetX,e.offsetY],l=cB([e.tooltipOption],r),c=this._renderMode,h=[],d=bd("section",{blocks:[],noHeader:!0}),f=[],y=new kd;Object(w.each)(t,(function(t){Object(w.each)(t.dataByAxis,(function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),o=t.value;if(e&&null!=o){var l=TR(o,e.axis,n,t.seriesDataIndices,t.valueLabelOpt),v=bd("section",{header:l,noHeader:!Object(w.trim)(l),sortBlocks:!0,blocks:[]});d.blocks.push(v),Object(w.each)(t.seriesDataIndices,(function(d){var m=n.getSeriesByIndex(d.seriesIndex),x=d.dataIndexInside,_=m.getDataParams(x);if(!(_.dataIndex<0)){_.axisDim=t.axisDim,_.axisIndex=t.axisIndex,_.axisType=t.axisType,_.axisId=t.axisId,_.axisValue=gb(e.axis,{value:o}),_.axisValueLabel=l,_.marker=y.makeTooltipMarker("item",Lu(_.color),c);var S=jh(m.formatTooltip(x,!0,null)),M=S.frag;if(M){var O=cB([m],r).get("valueFormatter");v.blocks.push(O?Object(w.extend)({valueFormatter:O},M):M)}S.text&&f.push(S.text),h.push(_)}}))}}))})),d.blocks.reverse(),f.reverse();var v=e.position,m=l.get("order"),x=Id(d,y,c,m,n.get("useUTC"),l.get("textStyle"));x&&f.unshift(x);var _="richText"===c?"\n\n":"
",S=f.join(_);this._showOrMove(l,(function(){this._updateContentNotChangedOnAxis(t,h)?this._updatePosition(l,v,o[0],o[1],this._tooltipContent,h):this._showTooltipContent(l,S,h,Math.random()+"",o[0],o[1],v,null,y)}))},e.prototype._showSeriesItemTooltip=function(t,e,n){var r=this._ecModel,o=Ha(e),l=o.seriesIndex,c=r.getSeriesByIndex(l),h=o.dataModel||c,d=o.dataIndex,f=o.dataType,data=h.getData(f),y=this._renderMode,v=t.positionDefault,m=cB([data.getItemModel(d),h,c&&(c.coordinateSystem||{}).model],this._tooltipModel,v?{position:v}:null),x=m.get("trigger");if(null==x||"item"===x){var _=h.getDataParams(d,f),S=new kd;_.marker=S.makeTooltipMarker("item",Lu(_.color),y);var M=jh(h.formatTooltip(d,!1,f)),O=m.get("order"),I=m.get("valueFormatter"),T=M.frag,C=T?Id(I?Object(w.extend)({valueFormatter:I},T):T,S,y,O,r.get("useUTC"),m.get("textStyle")):M.text,A="item_"+h.name+"_"+d;this._showOrMove(m,(function(){this._showTooltipContent(m,C,_,A,t.offsetX,t.offsetY,t.position,t.target,S)})),n({type:"showTip",dataIndexInside:d,dataIndex:data.getRawIndex(d),seriesIndex:l,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,e,n){var r=Ha(e),o=r.tooltipConfig.option||{};if(Object(w.isString)(o)){o={content:o,formatter:o}}var l=[o],c=this._ecModel.getComponent(r.componentMainType,r.componentIndex);c&&l.push(c),l.push({formatter:o.content});var h=t.positionDefault,d=cB(l,this._tooltipModel,h?{position:h}:null),f=d.get("content"),y=Math.random()+"",v=new kd;this._showOrMove(d,(function(){var n=Object(w.clone)(d.get("formatterParams")||{});this._showTooltipContent(d,f,n,y,t.offsetX,t.offsetY,t.position,e,v)})),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,e,n,r,o,l,c,h,d){if(this._ticket="",t.get("showContent")&&t.get("show")){var f=this._tooltipContent;f.setEnterable(t.get("enterable"));var y=t.get("formatter");c=c||t.get("position");var html=e,v=this._getNearestPoint([o,l],n,t.get("trigger"),t.get("borderColor")).color;if(y)if(Object(w.isString)(y)){var m=t.ecModel.get("useUTC"),x=Object(w.isArray)(n)?n[0]:n;html=y,x&&x.axisType&&x.axisType.indexOf("time")>=0&&(html=ou(x.axisValue,html,m)),html=Cu(html,n,!0)}else if(Object(w.isFunction)(y)){var _=Object(w.bind)((function(e,html){e===this._ticket&&(f.setContent(html,d,t,v,c),this._updatePosition(t,c,o,l,f,n,h))}),this);this._ticket=r,html=y(n,r,_)}else html=y;f.setContent(html,d,t,v,c),f.show(t,v),this._updatePosition(t,c,o,l,f,n,h)}},e.prototype._getNearestPoint=function(t,e,n,r){return"axis"===n||Object(w.isArray)(e)?{color:r||("html"===this._renderMode?"#fff":"none")}:Object(w.isArray)(e)?void 0:{color:r||e.color||e.borderColor}},e.prototype._updatePosition=function(t,e,n,r,content,o,l){var c=this._api.getWidth(),h=this._api.getHeight();e=e||t.get("position");var d=content.getSize(),f=t.get("align"),y=t.get("verticalAlign"),rect=l&&l.getBoundingRect().clone();if(l&&rect.applyTransform(l.transform),Object(w.isFunction)(e)&&(e=e([n,r],o,content.el,rect,{viewSize:[c,h],contentSize:d.slice()})),Object(w.isArray)(e))n=Ii(e[0],c),r=Ii(e[1],h);else if(Object(w.isObject)(e)){var v=e;v.width=d[0],v.height=d[1];var m=Vu(v,{width:c,height:h});n=m.x,r=m.y,f=null,y=null}else if(Object(w.isString)(e)&&l){var x=function(t,rect,e,n){var r=e[0],o=e[1],l=Math.ceil(Math.SQRT2*n)+8,c=0,h=0,d=rect.width,f=rect.height;switch(t){case"inside":c=rect.x+d/2-r/2,h=rect.y+f/2-o/2;break;case"top":c=rect.x+d/2-r/2,h=rect.y-o-l;break;case"bottom":c=rect.x+d/2-r/2,h=rect.y+f+l;break;case"left":c=rect.x-r-l,h=rect.y+f/2-o/2;break;case"right":c=rect.x+d+l,h=rect.y+f/2-o/2}return[c,h]}(e,rect,d,t.get("borderWidth"));n=x[0],r=x[1]}else{x=function(t,e,content,n,r,o,l){var c=content.getSize(),h=c[0],d=c[1];null!=o&&(t+h+o+2>n?t-=h+o:t+=o);null!=l&&(e+d+l>r?e-=d+l:e+=l);return[t,e]}(n,r,content,c,h,f?null:20,y?null:20);n=x[0],r=x[1]}if(f&&(n-=dB(f)?d[0]/2:"right"===f?d[0]:0),y&&(r-=dB(y)?d[1]/2:"bottom"===y?d[1]:0),UV(t)){x=function(t,e,content,n,r){var o=content.getSize(),l=o[0],c=o[1];return t=Math.min(t+l,n)-l,e=Math.min(e+c,r)-c,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(n,r,content,c,h);n=x[0],r=x[1]}content.moveTo(n,r)},e.prototype._updateContentNotChangedOnAxis=function(t,e){var n=this._lastDataByCoordSys,r=this._cbParamsList,o=!!n&&n.length===t.length;return o&&Object(w.each)(n,(function(n,l){var c=n.dataByAxis||[],h=(t[l]||{}).dataByAxis||[];(o=o&&c.length===h.length)&&Object(w.each)(c,(function(t,n){var l=h[n]||{},c=t.seriesDataIndices||[],d=l.seriesDataIndices||[];(o=o&&t.value===l.value&&t.axisType===l.axisType&&t.axisId===l.axisId&&c.length===d.length)&&Object(w.each)(c,(function(t,e){var n=d[e];o=o&&t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})),r&&Object(w.each)(t.seriesDataIndices,(function(t){var n=t.seriesIndex,l=e[n],c=r[n];l&&c&&c.data!==l.data&&(o=!1)}))}))})),this._lastDataByCoordSys=t,this._cbParamsList=e,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,e){!_.a.node&&e.getDom()&&(ug(this,"_updatePosition"),this._tooltipContent.dispose(),YR("itemTooltip",e))},e.type="tooltip",e}(Xd);function cB(t,e,n){var r,o=e.ecModel;n?(r=new Pl(n,o,o),r=new Pl(e.option,r,o)):r=e;for(var i=t.length-1;i>=0;i--){var l=t[i];l&&(l instanceof Pl&&(l=l.get("tooltip",!0)),Object(w.isString)(l)&&(l={formatter:l}),l&&(r=new Pl(l,r,o)))}return r}function hB(t,e){return t.dispatchAction||Object(w.bind)(e.dispatchAction,e)}function dB(t){return"center"===t||"middle"===t}var pB=uB;var fB=["rect","polygon","keep","clear"];function gB(option,t){var e=Qi(option?option.brush:[]);if(e.length){var n=[];w.each(e,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))}));var r=option&&option.toolbox;w.isArray(r)&&(r=r[0]),r||(r={feature:{}},option.toolbox=[r]);var o,map,l=r.feature||(r.feature={}),c=l.brush||(l.brush={}),h=c.type||(c.type=[]);h.push.apply(h,n),o=h,map={},w.each(o,(function(t){map[t]=1})),o.length=0,w.each(map,(function(t,e){o.push(e)})),t&&!h.length&&h.push.apply(h,fB)}}var yB=w.each;function vB(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function mB(option,t,e){var n={};return yB(t,(function(t){var r,o=n[t]=((r=function(){}).prototype.__hidden=r.prototype,new r);yB(option[t],(function(n,r){if(hA.isValidType(r)){var l={type:r,visual:n};e&&e(l,t),o[r]=new hA(l),"opacity"===r&&((l=w.clone(l)).type="colorAlpha",o.__hidden.__alphaForOpacity=new hA(l))}}))})),n}function xB(t,e,n){var r;w.each(n,(function(t){e.hasOwnProperty(t)&&vB(e[t])&&(r=!0)})),r&&w.each(n,(function(n){e.hasOwnProperty(n)&&vB(e[n])?t[n]=w.clone(e[n]):delete t[n]}))}var bB={lineX:_B(0),lineY:_B(1),rect:{point:function(t,e,area){return t&&area.boundingRect.contain(t[0],t[1])},rect:function(t,e,area){return t&&area.boundingRect.intersect(t)}},polygon:{point:function(t,e,area){return t&&area.boundingRect.contain(t[0],t[1])&&Tb(area.range,t[0],t[1])},rect:function(t,e,area){var n=area.range;if(!t||n.length<=1)return!1;var r=t.x,o=t.y,l=t.width,c=t.height,p=n[0];return!!(Tb(n,r,o)||Tb(n,r+l,o)||Tb(n,r,o+c)||Tb(n,r+l,o+c)||Bt.create(t).contain(p[0],p[1])||Hf(r,o,r+l,o,n)||Hf(r,o,r,o+c,n)||Hf(r+l,o,r+l,o+c,n)||Hf(r,o+c,r+l,o+c,n))||void 0}}};function _B(t){var e=["x","y"],n=["width","height"];return{point:function(e,n,area){if(e){var r=area.range;return wB(e[t],r)}},rect:function(r,o,area){if(r){var l=area.range,c=[r[e[t]],r[e[t]]+r[n[t]]];return c[1]t[0][1]&&(t[0][1]=r[0]),r[1]t[1][1]&&(t[1][1]=r[1])}return t&&kB(t)}};function kB(t){return new Bt(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var LB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.init=function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new IL(e.getZr())).on("brush",w.bind(this._onBrush,this)).mount()},e.prototype.render=function(t,e,n,r){this.model=t,this._updateController(t,e,n,r)},e.prototype.updateTransform=function(t,e,n,r){IB(e),this._updateController(t,e,n,r)},e.prototype.updateVisual=function(t,e,n,r){this.updateTransform(t,e,n,r)},e.prototype.updateView=function(t,e,n,r){this._updateController(t,e,n,r)},e.prototype._updateController=function(t,e,n,r){(!r||r.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var e=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:e,areas:w.clone(n),$from:e}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:e,areas:w.clone(n),$from:e})},e.type="brush",e}(Xd),jB=LB,PB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.areas=[],n.brushOption={},n}return Object(x.a)(e,t),e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&xB(n,t,["inBrush","outOfBrush"]);var r=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},r.hasOwnProperty("liftZ")||(r.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=w.map(t,(function(area){return NB(this.option,area)}),this))},e.prototype.setBrushOption=function(t){this.brushOption=NB(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(Uu);function NB(option,t){return w.merge({brushType:option.brushType,brushMode:option.brushMode,transformable:option.transformable,brushStyle:new Pl(option.brushStyle).getItemStyle(),removeOnClick:option.removeOnClick,z:option.z},t,!0)}var RB=PB,EB=["rect","polygon","lineX","lineY","keep","clear"],zB=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Object(x.a)(e,t),e.prototype.render=function(t,e,n){var r,o,l;e.eachComponent({mainType:"brush"},(function(t){r=t.brushType,o=t.brushOption.brushMode||"single",l=l||!!t.areas.length})),this._brushType=r,this._brushMode=o,w.each(t.get("type",!0),(function(e){t.setIconStatus(e,("keep"===e?"multiple"===o:"clear"===e?l:e===r)?"emphasis":"normal")}))},e.prototype.updateView=function(t,e,n){this.render(t,e,n)},e.prototype.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return w.each(t.get("type",!0),(function(t){e[t]&&(n[t]=e[t])})),n},e.prototype.onclick=function(t,e,n){var r=this._brushType,o=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?r:r!==n&&n,brushMode:"keep"===n?"multiple"===o?"single":"multiple":o}})},e.getDefaultOption=function(t){return{show:!0,type:EB.slice(),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:t.getLocaleModel().get(["toolbox","brush","title"])}},e}(qz),VB=zB;var BB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return Object(x.a)(e,t),e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(Uu),FB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.render=function(t,e,n){if(this.group.removeAll(),t.get("show")){var r=this.group,o=t.getModel("textStyle"),l=t.getModel("subtextStyle"),c=t.get("textAlign"),h=w.retrieve2(t.get("textBaseline"),t.get("textVerticalAlign")),d=new Ga({style:cl(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=d.getBoundingRect(),y=t.get("subtext"),v=new Ga({style:cl(l,{text:y,fill:l.getTextColor(),y:f.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),link=t.get("link"),m=t.get("sublink"),x=t.get("triggerEvent",!0);d.silent=!link&&!x,v.silent=!m&&!x,link&&d.on("click",(function(){ju(link,"_"+t.get("target"))})),m&&v.on("click",(function(){ju(m,"_"+t.get("subtarget"))})),Ha(d).eventData=Ha(v).eventData=x?{componentType:"title",componentIndex:t.componentIndex}:null,r.add(d),y&&r.add(v);var _=r.getBoundingRect(),S=t.getBoxLayoutParams();S.width=_.width,S.height=_.height;var M=Vu(S,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));c||("middle"===(c=t.get("left")||t.get("right"))&&(c="center"),"right"===c?M.x+=M.width:"center"===c&&(M.x+=M.width/2)),h||("center"===(h=t.get("top")||t.get("bottom"))&&(h="middle"),"bottom"===h?M.y+=M.height:"middle"===h&&(M.y+=M.height/2),h=h||"top"),r.x=M.x,r.y=M.y,r.markRedraw();var O={align:c,verticalAlign:h};d.setStyle(O),v.setStyle(O),_=r.getBoundingRect();var I=M.margin,style=t.getItemStyle(["color","opacity"]);style.fill=t.get("backgroundColor");var rect=new Ia({shape:{x:_.x-I[3],y:_.y-I[0],width:_.width+I[1]+I[3],height:_.height+I[0]+I[2],r:t.get("borderRadius")},style:style,subPixelOptimize:!0,silent:!0});r.add(rect)}},e.type="title",e}(Xd);var GB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode="box",n}return Object(x.a)(e,t),e.prototype.init=function(option,t,e){this.mergeDefaultAndTheme(option,e),this._initData()},e.prototype.mergeOption=function(option){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.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},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t,e=this.option,n=e.data||[],r=e.axisType,o=this._names=[];"category"===r?(t=[],Object(w.each)(n,(function(e,n){var r,l=lr(ir(e),"");Object(w.isObject)(e)?(r=Object(w.clone)(e)).value=n:r=n,t.push(r),o.push(l)}))):t=n;var l={category:"ordinal",time:"time",value:"number"}[r]||"number";(this._data=new Jm([{name:"value",type:l}],this)).initData(t,o)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(Uu),HB=GB,WB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.type="timeline.slider",e.defaultOption=El(HB.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,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:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(HB);Object(w.mixin)(WB,Lh.prototype);var YB=WB,XB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.type="timeline",e}(Xd),UB=XB,ZB=function(t){function e(e,n,r,o){var l=t.call(this,e,n,r)||this;return l.type=o||"value",l}return Object(x.a)(e,t),e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},e}($b),qB=Math.PI,KB=pr(),$B=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.init=function(t,e){this.api=e},e.prototype.render=function(t,e,n){if(this.model=t,this.api=n,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var r=this._layout(t,n),o=this._createGroup("_mainGroup"),l=this._createGroup("_labelGroup"),c=this._axis=this._createAxis(r,t);t.formatTooltip=function(t){return bd("nameValue",{noName:!0,value:c.scale.getLabel({value:t})})},Object(w.each)(["AxisLine","AxisTick","Control","CurrentPointer"],(function(e){this["_render"+e](r,o,c,t)}),this),this._renderAxisLabel(r,l,c,t),this._position(r,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,e){var n,r,o,l,c=t.get(["label","position"]),h=t.get("orient"),d=function(t,e){return Vu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e),f={horizontal:"center",vertical:(n=null==c||"auto"===c?"horizontal"===h?d.y+d.height/2=0||"+"===n?"left":"right"},y={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},v={horizontal:0,vertical:qB/2},m="vertical"===h?d.height:d.width,x=t.getModel("controlStyle"),_=x.get("show",!0),S=_?x.get("itemSize"):0,M=_?x.get("itemGap"):0,O=S+M,I=t.get(["label","rotate"])||0;I=I*qB/180;var T=x.get("position",!0),C=_&&x.get("showPlayBtn",!0),A=_&&x.get("showPrevBtn",!0),D=_&&x.get("showNextBtn",!0),k=0,L=m;"left"===T||"bottom"===T?(C&&(r=[0,0],k+=O),A&&(o=[k,0],k+=O),D&&(l=[L-S,0],L-=O)):(C&&(r=[L-S,0],L-=O),A&&(o=[0,0],k+=O),D&&(l=[L-S,0],L-=O));var j=[k,L];return t.get("inverse")&&j.reverse(),{viewRect:d,mainLength:m,orient:h,rotation:v[h],labelRotation:I,labelPosOpt:n,labelAlign:t.get(["label","align"])||f[h],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||y[h],playPosition:r,prevBtnPosition:o,nextBtnPosition:l,axisExtent:j,controlSize:S,controlGap:M}},e.prototype._position=function(t,e){var n=this._mainGroup,r=this._labelGroup,o=t.viewRect;if("vertical"===t.orient){var l=[1,0,0,1,0,0],c=o.x,h=o.y+o.height;It(l,l,[-c,-h]),Tt(l,l,-qB/2),It(l,l,[c,h]),(o=o.clone()).applyTransform(l)}var d=M(o),f=M(n.getBoundingRect()),y=M(r.getBoundingRect()),v=[n.x,n.y],m=[r.x,r.y];m[0]=v[0]=d[0][0];var x,_=t.labelPosOpt;null==_||Object(w.isString)(_)?(O(v,f,d,1,x="+"===_?0:1),O(m,y,d,1,1-x)):(O(v,f,d,1,x=_>=0?0:1),m[1]=v[1]+_);function S(t){t.originX=d[0][0]-t.x,t.originY=d[1][0]-t.y}function M(rect){return[[rect.x,rect.x+rect.width],[rect.y,rect.y+rect.height]]}function O(t,e,n,r,o){t[r]+=n[r][o]-e[r][o]}n.setPosition(v),r.setPosition(m),n.rotation=r.rotation=t.rotation,S(n),S(r)},e.prototype._createAxis=function(t,e){var data=e.getData(),n=e.get("axisType"),r=function(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new Sx({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new Zx({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new Ix}}(e,n);r.getTicks=function(){return data.mapArray(["value"],(function(t){return{value:t}}))};var o=data.getDataExtent("value");r.setExtent(o[0],o[1]),r.calcNiceTicks();var l=new ZB("value",r,t.axisExtent,n);return l.model=e,l},e.prototype._createGroup=function(t){var e=this[t]=new pi;return this.group.add(e),e},e.prototype._renderAxisLine=function(t,e,n,r){var o=n.getExtent();if(r.get(["lineStyle","show"])){var line=new Kp({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:Object(w.extend)({lineCap:"round"},r.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});e.add(line);var l=this._progressLine=new Kp({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:Object(w.defaults)({lineCap:"round",lineWidth:line.style.lineWidth},r.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});e.add(l)}},e.prototype._renderAxisTick=function(t,e,n,r){var o=this,data=r.getData(),l=n.scale.getTicks();this._tickSymbols=[],Object(w.each)(l,(function(t){var l=n.dataToCoord(t.value),c=data.getItemModel(t.value),h=c.getModel("itemStyle"),d=c.getModel(["emphasis","itemStyle"]),f=c.getModel(["progress","itemStyle"]),y={x:l,y:0,onclick:Object(w.bind)(o._changeTimeline,o,t.value)},v=JB(c,h,e,y);v.ensureState("emphasis").style=d.getItemStyle(),v.ensureState("progress").style=f.getItemStyle(),Es(v);var m=Ha(v);c.get("tooltip")?(m.dataIndex=t.value,m.dataModel=r):m.dataIndex=m.dataModel=null,o._tickSymbols.push(v)}))},e.prototype._renderAxisLabel=function(t,e,n,r){var o=this;if(n.getLabelModel().get("show")){var data=r.getData(),l=n.getViewLabels();this._tickLabels=[],Object(w.each)(l,(function(r){var l=r.tickValue,c=data.getItemModel(l),h=c.getModel("label"),d=c.getModel(["emphasis","label"]),f=c.getModel(["progress","label"]),y=n.dataToCoord(r.tickValue),v=new Ga({x:y,y:0,rotation:t.labelRotation-t.rotation,onclick:Object(w.bind)(o._changeTimeline,o,l),silent:!1,style:cl(h,{text:r.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});v.ensureState("emphasis").style=cl(d),v.ensureState("progress").style=cl(f),e.add(v),Es(v),KB(v).dataIndex=l,o._tickLabels.push(v)}))}},e.prototype._renderControl=function(t,e,n,r){var o=t.controlSize,l=t.rotation,c=r.getModel("controlStyle").getItemStyle(),h=r.getModel(["emphasis","controlStyle"]).getItemStyle(),d=r.getPlayState(),f=r.get("inverse",!0);function y(t,n,d,f){if(t){var y=Jn(Object(w.retrieve2)(r.get(["controlStyle",n+"BtnSize"]),o),o),v=function(t,e,rect,n){var style=n.style,r=Gf(t.get(["controlStyle",e]),n||{},new Bt(rect[0],rect[1],rect[2],rect[3]));style&&r.setStyle(style);return r}(r,n+"Icon",[0,-y/2,y,y],{x:t[0],y:t[1],originX:o/2,originY:0,rotation:f?-l:0,rectHover:!0,style:c,onclick:d});v.ensureState("emphasis").style=h,e.add(v),Es(v)}}y(t.nextBtnPosition,"next",Object(w.bind)(this._changeTimeline,this,f?"-":"+")),y(t.prevBtnPosition,"prev",Object(w.bind)(this._changeTimeline,this,f?"+":"-")),y(t.playPosition,d?"stop":"play",Object(w.bind)(this._handlePlayClick,this,!d),!0)},e.prototype._renderCurrentPointer=function(t,e,n,r){var data=r.getData(),o=r.getCurrentIndex(),l=data.getItemModel(o).getModel("checkpointStyle"),c=this,h={onCreate:function(t){t.draggable=!0,t.drift=Object(w.bind)(c._handlePointerDrag,c),t.ondragend=Object(w.bind)(c._handlePointerDragend,c),QB(t,c._progressLine,o,n,r,!0)},onUpdate:function(t){QB(t,c._progressLine,o,n,r)}};this._currentPointer=JB(l,l,this._mainGroup,{},this._currentPointer,h)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,e){var n=this._toAxisCoord(t)[0],r=Ci(this._axis.getExtent().slice());n>r[1]&&(n=r[1]),n=0&&(l[o]=+l[o].toFixed(y)),[l,f]}var pF={min:Object(w.curry)(dF,"min"),max:Object(w.curry)(dF,"max"),average:Object(w.curry)(dF,"average"),median:Object(w.curry)(dF,"median")};function fF(t,e){if(e){var data=t.getData(),n=t.coordinateSystem,r=n.dimensions;if(!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!Object(w.isArray)(e.coord)&&n){var o=gF(e,data,n,t);if((e=Object(w.clone)(e)).type&&pF[e.type]&&o.baseAxis&&o.valueAxis){var l=Object(w.indexOf)(r,o.baseAxis.dim),c=Object(w.indexOf)(r,o.valueAxis.dim),h=pF[e.type](data,o.baseDataDim,o.valueDataDim,l,c);e.coord=h[0],e.value=h[1]}else e.coord=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis]}if(null==e.coord)e.coord=[];else for(var d=e.coord,i=0;i<2;i++)pF[d[i]]&&(d[i]=mF(data,data.mapDimension(r[i]),d[i]));return e}}function gF(t,data,e,n){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?data.getDimension(t.valueIndex):t.valueDim,r.valueAxis=e.getAxis(function(t,e){var n=t.getData().getDimensionInfo(e);return n&&n.coordDim}(n,r.valueDataDim)),r.baseAxis=e.getOtherAxis(r.valueAxis),r.baseDataDim=data.mapDimension(r.baseAxis.dim)):(r.baseAxis=n.getBaseAxis(),r.valueAxis=e.getOtherAxis(r.baseAxis),r.baseDataDim=data.mapDimension(r.baseAxis.dim),r.valueDataDim=data.mapDimension(r.valueAxis.dim)),r}function yF(t,e){return!(t&&t.containData&&e.coord&&!hF(e))||t.containData(e.coord)}function vF(t,e){return t?function(t,n,r,o){return Eh(o<2?t.coord&&t.coord[o]:t.value,e[o])}:function(t,n,r,o){return Eh(t.value,e[o])}}function mF(data,t,e){if("average"===e){var n=0,r=0;return data.each(t,(function(t,e){isNaN(t)||(n+=t,r++)})),n/r}return"median"===e?data.getMedian(t):data.getDataExtent(t)["max"===e?1:0]}var xF=pr(),bF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.init=function(){this.markerGroupMap=Object(w.createHashMap)()},e.prototype.render=function(t,e,n){var r=this,o=this.markerGroupMap;o.each((function(t){xF(t).keep=!1})),e.eachSeries((function(t){var o=lF.getMarkerModelFromSeries(t,r.type);o&&r.renderSeries(t,o,e,n)})),o.each((function(t){!xF(t).keep&&r.group.remove(t.group)}))},e.prototype.markKeep=function(t){xF(t).keep=!0},e.prototype.toggleBlurSeries=function(t,e){var n=this;Object(w.each)(t,(function(t){var r=lF.getMarkerModelFromSeries(t,n.type);r&&r.getData().eachItemGraphicEl((function(t){t&&(e?Is(t):Ts(t))}))}))},e.type="marker",e}(Xd),_F=bF;function wF(t,e,n){var r=e.coordinateSystem;t.each((function(o){var l,c=t.getItemModel(o),h=Ii(c.get("x"),n.getWidth()),d=Ii(c.get("y"),n.getHeight());if(isNaN(h)||isNaN(d)){if(e.getMarkerPosition)l=e.getMarkerPosition(t.getValues(t.dimensions,o));else if(r){var f=t.get(r.dimensions[0],o),y=t.get(r.dimensions[1],o);l=r.dataToPoint([f,y])}}else l=[h,d];isNaN(h)||(l[0]=h),isNaN(d)||(l[1]=d),t.setItemLayout(o,l)}))}var SF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=lF.getMarkerModelFromSeries(t,"markPoint");e&&(wF(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout())}),this)},e.prototype.renderSeries=function(t,e,n,r){var o=t.coordinateSystem,l=t.id,c=t.getData(),h=this.markerGroupMap,d=h.get(l)||h.set(l,new gS),f=function(t,e,n){var r;r=t?Object(w.map)(t&&t.dimensions,(function(t){var n=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return Object(w.extend)(Object(w.extend)({},n),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var o=new Jm(r,n),l=Object(w.map)(n.get("data"),Object(w.curry)(fF,e));t&&(l=Object(w.filter)(l,Object(w.curry)(yF,t)));var c=vF(!!t,r);return o.initData(l,null,c),o}(o,t,e);e.setData(f),wF(e.getData(),t,r),f.each((function(t){var n=f.getItemModel(t),symbol=n.getShallow("symbol"),r=n.getShallow("symbolSize"),o=n.getShallow("symbolRotate"),l=n.getShallow("symbolOffset"),h=n.getShallow("symbolKeepAspect");if(Object(w.isFunction)(symbol)||Object(w.isFunction)(r)||Object(w.isFunction)(o)||Object(w.isFunction)(l)){var d=e.getRawValue(t),y=e.getDataParams(t);Object(w.isFunction)(symbol)&&(symbol=symbol(d,y)),Object(w.isFunction)(r)&&(r=r(d,y)),Object(w.isFunction)(o)&&(o=o(d,y)),Object(w.isFunction)(l)&&(l=l(d,y))}var style=n.getModel("itemStyle").getItemStyle(),v=Kg(c,"color");style.fill||(style.fill=v),f.setItemVisual(t,{symbol:symbol,symbolSize:r,symbolRotate:o,symbolOffset:l,symbolKeepAspect:h,style:style})})),d.updateData(f),this.group.add(d.group),f.eachItemGraphicEl((function(t){t.traverse((function(t){Ha(t).dataModel=e}))})),this.markKeep(d),d.group.silent=e.get("silent")||t.get("silent")},e.type="markPoint",e}(_F);var MF=SF;var OF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,r){return new e(t,n,r)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(lF),IF=OF,TF=pr(),CF=function(t,e,n,r){var o,data=t.getData();if(Object(w.isArray)(r))o=r;else{var l=r.type;if("min"===l||"max"===l||"average"===l||"median"===l||null!=r.xAxis||null!=r.yAxis){var c=void 0,h=void 0;if(null!=r.yAxis||null!=r.xAxis)c=e.getAxis(null!=r.yAxis?"y":"x"),h=Object(w.retrieve)(r.yAxis,r.xAxis);else{var d=gF(r,data,e,t);c=d.valueAxis,h=mF(data,sx(data,d.valueDataDim),l)}var f="x"===c.dim?0:1,y=1-f,v=Object(w.clone)(r),m={coord:[]};v.type=null,v.coord=[],v.coord[y]=-1/0,m.coord[y]=1/0;var x=n.get("precision");x>=0&&Object(w.isNumber)(h)&&(h=+h.toFixed(Math.min(x,20))),v.coord[f]=m.coord[f]=h,o=[v,m,{type:l,valueIndex:r.valueIndex,value:h}]}else o=[]}var _=[fF(t,o[0]),fF(t,o[1]),Object(w.extend)({},o[2])];return _[2].type=_[2].type||null,Object(w.merge)(_[2],_[0]),Object(w.merge)(_[2],_[1]),_};function AF(t){return!isNaN(t)&&!isFinite(t)}function DF(t,e,n,r){var o=1-t,l=r.dimensions[t];return AF(e[o])&&AF(n[o])&&e[t]===n[t]&&r.getAxis(l).containData(e[t])}function kF(t,e){if("cartesian2d"===t.type){var n=e[0].coord,r=e[1].coord;if(n&&r&&(DF(1,n,r,t)||DF(0,n,r,t)))return!0}return yF(t,e[0])&&yF(t,e[1])}function LF(data,t,e,n,r){var o,l=n.coordinateSystem,c=data.getItemModel(t),h=Ii(c.get("x"),r.getWidth()),d=Ii(c.get("y"),r.getHeight());if(isNaN(h)||isNaN(d)){if(n.getMarkerPosition)o=n.getMarkerPosition(data.getValues(data.dimensions,t));else{var f=l.dimensions,y=data.get(f[0],t),v=data.get(f[1],t);o=l.dataToPoint([y,v])}if(AS(l,"cartesian2d")){var m=l.getAxis("x"),x=l.getAxis("y");f=l.dimensions;AF(data.get(f[0],t))?o[0]=m.toGlobalCoord(m.getExtent()[e?0:1]):AF(data.get(f[1],t))&&(o[1]=x.toGlobalCoord(x.getExtent()[e?0:1]))}isNaN(h)||(o[0]=h),isNaN(d)||(o[1]=d)}else o=[h,d];data.setItemLayout(t,o)}var jF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=lF.getMarkerModelFromSeries(t,"markLine");if(e){var r=e.getData(),o=TF(e).from,l=TF(e).to;o.each((function(e){LF(o,e,!0,t,n),LF(l,e,!1,t,n)})),r.each((function(t){r.setItemLayout(t,[o.getItemLayout(t),l.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},e.prototype.renderSeries=function(t,e,n,r){var o=t.coordinateSystem,l=t.id,c=t.getData(),h=this.markerGroupMap,d=h.get(l)||h.set(l,new xD);this.group.add(d.group);var f=function(t,e,n){var r;r=t?Object(w.map)(t&&t.dimensions,(function(t){var n=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return Object(w.extend)(Object(w.extend)({},n),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var o=new Jm(r,n),l=new Jm(r,n),c=new Jm([],n),h=Object(w.map)(n.get("data"),Object(w.curry)(CF,e,t,n));t&&(h=Object(w.filter)(h,Object(w.curry)(kF,t)));var d=vF(!!t,r);return o.initData(Object(w.map)(h,(function(t){return t[0]})),null,d),l.initData(Object(w.map)(h,(function(t){return t[1]})),null,d),c.initData(Object(w.map)(h,(function(t){return t[2]}))),c.hasItemOption=!0,{from:o,to:l,line:c}}(o,t,e),y=f.from,v=f.to,m=f.line;TF(e).from=y,TF(e).to=v,e.setData(m);var x=e.get("symbol"),_=e.get("symbolSize"),S=e.get("symbolRotate"),M=e.get("symbolOffset");function O(data,e,n){var o=data.getItemModel(e);LF(data,e,n,t,r);var style=o.getModel("itemStyle").getItemStyle();null==style.fill&&(style.fill=Kg(c,"color")),data.setItemVisual(e,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:Object(w.retrieve2)(o.get("symbolOffset",!0),M[n?0:1]),symbolRotate:Object(w.retrieve2)(o.get("symbolRotate",!0),S[n?0:1]),symbolSize:Object(w.retrieve2)(o.get("symbolSize"),_[n?0:1]),symbol:Object(w.retrieve2)(o.get("symbol",!0),x[n?0:1]),style:style})}Object(w.isArray)(x)||(x=[x,x]),Object(w.isArray)(_)||(_=[_,_]),Object(w.isArray)(S)||(S=[S,S]),Object(w.isArray)(M)||(M=[M,M]),f.from.each((function(t){O(y,t,!0),O(v,t,!1)})),m.each((function(t){var e=m.getItemModel(t).getModel("lineStyle").getLineStyle();m.setItemLayout(t,[y.getItemLayout(t),v.getItemLayout(t)]),null==e.stroke&&(e.stroke=y.getItemVisual(t,"style").fill),m.setItemVisual(t,{fromSymbolKeepAspect:y.getItemVisual(t,"symbolKeepAspect"),fromSymbolOffset:y.getItemVisual(t,"symbolOffset"),fromSymbolRotate:y.getItemVisual(t,"symbolRotate"),fromSymbolSize:y.getItemVisual(t,"symbolSize"),fromSymbol:y.getItemVisual(t,"symbol"),toSymbolKeepAspect:v.getItemVisual(t,"symbolKeepAspect"),toSymbolOffset:v.getItemVisual(t,"symbolOffset"),toSymbolRotate:v.getItemVisual(t,"symbolRotate"),toSymbolSize:v.getItemVisual(t,"symbolSize"),toSymbol:v.getItemVisual(t,"symbol"),style:e})})),d.updateData(m),f.line.eachItemGraphicEl((function(t){Ha(t).dataModel=e,t.traverse((function(t){Ha(t).dataModel=e}))})),this.markKeep(d),d.group.silent=e.get("silent")||t.get("silent")},e.type="markLine",e}(_F);var PF=jF;var NF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,r){return new e(t,n,r)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(lF),RF=NF,EF=pr(),zF=function(t,e,n,r){var o=r[0],l=r[1];if(o&&l){var c=fF(t,o),h=fF(t,l),d=c.coord,f=h.coord;d[0]=Object(w.retrieve)(d[0],-1/0),d[1]=Object(w.retrieve)(d[1],-1/0),f[0]=Object(w.retrieve)(f[0],1/0),f[1]=Object(w.retrieve)(f[1],1/0);var y=Object(w.mergeAll)([{},c,h]);return y.coord=[c.coord,h.coord],y.x0=c.x,y.y0=c.y,y.x1=h.x,y.y1=h.y,y}};function VF(t){return!isNaN(t)&&!isFinite(t)}function BF(t,e,n,r){var o=1-t;return VF(e[o])&&VF(n[o])}function FF(t,e){var n=e.coord[0],r=e.coord[1],o={coord:n,x:e.x0,y:e.y0},l={coord:r,x:e.x1,y:e.y1};return AS(t,"cartesian2d")?!(!n||!r||!BF(1,n,r)&&!BF(0,n,r))||function(t,e,n){return!(t&&t.containZone&&e.coord&&n.coord&&!hF(e)&&!hF(n))||t.containZone(e.coord,n.coord)}(t,o,l):yF(t,o)||yF(t,l)}function GF(data,t,e,n,r){var o,l=n.coordinateSystem,c=data.getItemModel(t),h=Ii(c.get(e[0]),r.getWidth()),d=Ii(c.get(e[1]),r.getHeight());if(isNaN(h)||isNaN(d)){if(n.getMarkerPosition){var f=data.getValues(["x0","y0"],t),y=data.getValues(["x1","y1"],t),v=l.clampData(f),m=l.clampData(y),x=[];"x0"===e[0]?x[0]=v[0]>m[0]?y[0]:f[0]:x[0]=v[0]>m[0]?f[0]:y[0],"y0"===e[1]?x[1]=v[1]>m[1]?y[1]:f[1]:x[1]=v[1]>m[1]?f[1]:y[1],o=n.getMarkerPosition(x,e,!0)}else{var _=[M=data.get(e[0],t),O=data.get(e[1],t)];l.clampData&&l.clampData(_,_),o=l.dataToPoint(_,!0)}if(AS(l,"cartesian2d")){var w=l.getAxis("x"),S=l.getAxis("y"),M=data.get(e[0],t),O=data.get(e[1],t);VF(M)?o[0]=w.toGlobalCoord(w.getExtent()["x0"===e[0]?0:1]):VF(O)&&(o[1]=S.toGlobalCoord(S.getExtent()["y0"===e[1]?0:1]))}isNaN(h)||(o[0]=h),isNaN(d)||(o[1]=d)}else o=[h,d];return o}var HF=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],WF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=lF.getMarkerModelFromSeries(t,"markArea");if(e){var r=e.getData();r.each((function(e){var o=Object(w.map)(HF,(function(o){return GF(r,e,o,t,n)}));r.setItemLayout(e,o),r.getItemGraphicEl(e).setShape("points",o)}))}}),this)},e.prototype.renderSeries=function(t,e,n,r){var o=t.coordinateSystem,l=t.id,c=t.getData(),h=this.markerGroupMap,d=h.get(l)||h.set(l,{group:new pi});this.group.add(d.group),this.markKeep(d);var f=function(t,e,n){var r,o,l=["x0","y0","x1","y1"];if(t){var c=Object(w.map)(t&&t.dimensions,(function(t){var data=e.getData(),n=data.getDimensionInfo(data.mapDimension(t))||{};return Object(w.extend)(Object(w.extend)({},n),{name:t,ordinalMeta:null})}));o=Object(w.map)(l,(function(t,e){return{name:t,type:c[e%2].type}})),r=new Jm(o,n)}else r=new Jm(o=[{name:"value",type:"float"}],n);var h=Object(w.map)(n.get("data"),Object(w.curry)(zF,e,t,n));t&&(h=Object(w.filter)(h,Object(w.curry)(FF,t)));var d=t?function(t,e,n,r){return Eh(t.coord[Math.floor(r/2)][r%2],o[r])}:function(t,e,n,r){return Eh(t.value,o[r])};return r.initData(h,null,d),r.hasItemOption=!0,r}(o,t,e);e.setData(f),f.each((function(e){var n=Object(w.map)(HF,(function(n){return GF(f,e,n,t,r)})),l=o.getAxis("x").scale,h=o.getAxis("y").scale,d=l.getExtent(),y=h.getExtent(),v=[l.parse(f.get("x0",e)),l.parse(f.get("x1",e))],m=[h.parse(f.get("y0",e)),h.parse(f.get("y1",e))];Ci(v),Ci(m);var x=!!(d[0]>v[1]||d[1]m[1]||y[1]=0},e.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={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,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(Uu),UF=XF,ZF=w.curry,qF=w.each,KF=pi,$F=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.newlineDisabled=!1,n}return Object(x.a)(e,t),e.prototype.init=function(){this.group.add(this._contentGroup=new KF),this.group.add(this._selectorGroup=new KF),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,e,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var o=t.get("align"),l=t.get("orient");o&&"auto"!==o||(o="right"===t.get("left")&&"vertical"===l?"right":"left");var c=t.get("selector",!0),h=t.get("selectorPosition",!0);!c||h&&"auto"!==h||(h="horizontal"===l?"end":"start"),this.renderInner(o,t,e,n,c,l,h);var d=t.getBoxLayoutParams(),f={width:n.getWidth(),height:n.getHeight()},y=t.get("padding"),v=Vu(d,f,y),m=this.layoutInner(t,o,v,r,c,h),x=Vu(w.defaults({width:m.width,height:m.height},d),f,y);this.group.x=x.x-m.x,this.group.y=x.y-m.y,this.group.markRedraw(),this.group.add(this._backgroundEl=eV(m,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,e,n,r,o,l,c){var h=this.getContentGroup(),d=w.createHashMap(),f=e.get("selectedMode"),y=[];n.eachRawSeries((function(t){!t.get("legendHoverLink")&&y.push(t.id)})),qF(e.getData(),(function(o,l){var c=o.get("name");if(!this.newlineDisabled&&(""===c||"\n"===c)){var g=new KF;return g.newline=!0,void h.add(g)}var v=n.getSeriesByName(c)[0];if(!d.get(c)){if(v){var data=v.getData(),m=data.getVisual("legendLineStyle")||{},x=data.getVisual("legendIcon"),style=data.getVisual("style");this._createItem(v,c,l,o,e,t,m,style,x,f,r).on("click",ZF(JF,c,null,r,y)).on("mouseover",ZF(tG,v.name,null,r,y)).on("mouseout",ZF(eG,v.name,null,r,y)),d.set(c,!0)}else n.eachRawSeries((function(n){if(!d.get(c)&&n.legendVisualProvider){var h=n.legendVisualProvider;if(!h.containName(c))return;var v=h.indexOfName(c),style=h.getItemVisual(v,"style"),m=h.getItemVisual(v,"legendIcon"),x=Object(Ge.parse)(style.fill);x&&0===x[3]&&(x[3]=.2,style=w.extend(w.extend({},style),{fill:Object(Ge.stringify)(x,"rgba")})),this._createItem(n,c,l,o,e,t,{},style,m,f,r).on("click",ZF(JF,null,c,r,y)).on("mouseover",ZF(tG,null,c,r,y)).on("mouseout",ZF(eG,null,c,r,y)),d.set(c,!0)}}),this);0}}),this),o&&this._createSelector(o,e,r,l,c)},e.prototype._createSelector=function(t,e,n,r,o){var l=this.getSelectorGroup();qF(t,(function(t){var r=t.type,o=new Ga({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===r?"legendAllSelect":"legendInverseSelect"})}});l.add(o),sl(o,{normal:e.getModel("selectorLabel"),emphasis:e.getModel(["emphasis","selectorLabel"])},{defaultText:t.title}),Es(o)}))},e.prototype._createItem=function(t,e,n,r,o,l,c,h,d,f,y){var v=t.visualDrawType,m=o.get("itemWidth"),x=o.get("itemHeight"),_=o.isSelected(e),S=r.get("symbolRotate"),M=r.get("symbolKeepAspect"),O=r.get("icon"),style=function(t,e,n,r,o,l,c){function h(style,t){"auto"===style.lineWidth&&(style.lineWidth=t.lineWidth>0?2:0),qF(style,(function(e,n){"inherit"===style[n]&&(style[n]=t[n])}))}var d=e.getModel("itemStyle"),f=d.getItemStyle(),y=0===t.lastIndexOf("empty",0)?"fill":"stroke",v=d.getShallow("decal");f.decal=v&&"inherit"!==v?Yy(v,c):r.decal,"inherit"===f.fill&&(f.fill=r[o]);"inherit"===f.stroke&&(f.stroke=r[y]);"inherit"===f.opacity&&(f.opacity=("fill"===o?r:n).opacity);h(f,r);var m=e.getModel("lineStyle"),x=m.getLineStyle();if(h(x,n),"auto"===f.fill&&(f.fill=r.fill),"auto"===f.stroke&&(f.stroke=r.fill),"auto"===x.stroke&&(x.stroke=r.fill),!l){var _=e.get("inactiveBorderWidth"),w=f[y];f.lineWidth="auto"===_?r.lineWidth>0&&w?2:0:f.lineWidth,f.fill=e.get("inactiveColor"),f.stroke=e.get("inactiveBorderColor"),x.stroke=m.get("inactiveColor"),x.lineWidth=m.get("inactiveWidth")}return{itemStyle:f,lineStyle:x}}(d=O||d||"roundRect",r,c,h,v,_,y),I=new KF,T=r.getModel("textStyle");if(!w.isFunction(t.getLegendIcon)||O&&"inherit"!==O){var C="inherit"===O&&t.getData().getVisual("symbol")?"inherit"===S?t.getData().getVisual("symbolRotate"):S:0;I.add(function(t){var e=t.icon||"roundRect",n=fy(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);n.setStyle(t.itemStyle),n.rotation=(t.iconRotate||0)*Math.PI/180,n.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:m,itemHeight:x,icon:d,iconRotate:C,itemStyle:style.itemStyle,lineStyle:style.lineStyle,symbolKeepAspect:M}))}else I.add(t.getLegendIcon({itemWidth:m,itemHeight:x,icon:d,iconRotate:S,itemStyle:style.itemStyle,lineStyle:style.lineStyle,symbolKeepAspect:M}));var A="left"===l?m+5:-5,D=l,k=o.get("formatter"),content=e;w.isString(k)&&k?content=k.replace("{name}",null!=e?e:""):w.isFunction(k)&&(content=k(e));var L=r.get("inactiveColor");I.add(new Ga({style:cl(T,{text:content,x:A,y:x/2,fill:_?T.getTextColor():L,align:D,verticalAlign:"middle"})}));var j=new Ia({shape:I.getBoundingRect(),invisible:!0}),P=r.getModel("tooltip");return P.get("show")&&Xf({el:j,componentModel:o,itemName:e,itemTooltipOption:P.option}),I.add(j),I.eachChild((function(t){t.silent=!0})),j.silent=!f,this.getContentGroup().add(I),Es(I),I.__legendDataIndex=n,I},e.prototype.layoutInner=function(t,e,n,r,o,l){var c=this.getContentGroup(),h=this.getSelectorGroup();zu(t.get("orient"),c,t.get("itemGap"),n.width,n.height);var d=c.getBoundingRect(),f=[-d.x,-d.y];if(h.markRedraw(),c.markRedraw(),o){zu("horizontal",h,t.get("selectorItemGap",!0));var y=h.getBoundingRect(),v=[-y.x,-y.y],m=t.get("selectorButtonGap",!0),x=t.getOrient().index,_=0===x?"width":"height",w=0===x?"height":"width",S=0===x?"y":"x";"end"===l?v[x]+=d[_]+m:f[x]+=y[_]+m,v[1-x]+=d[w]/2-y[w]/2,h.x=v[0],h.y=v[1],c.x=f[0],c.y=f[1];var M={x:0,y:0};return M[_]=d[_]+m+y[_],M[w]=Math.max(d[w],y[w]),M[S]=Math.min(0,y[S]+v[1-x]),M}return c.x=f[0],c.y=f[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Xd);function JF(t,e,n,r){eG(t,e,n,r),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),tG(t,e,n,r)}function QF(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,r=n.length;in[o],_=[-v.x,-v.y];e||(_[r]=d[h]);var S=[0,0],M=[-m.x,-m.y],O=w.retrieve2(t.get("pageButtonGap",!0),t.get("itemGap",!0));x&&("end"===t.get("pageButtonPosition",!0)?M[r]+=n[o]-m[o]:S[r]+=m[o]+O);M[1-r]+=v[l]/2-m[l]/2,d.setPosition(_),f.setPosition(S),y.setPosition(M);var I={x:0,y:0};if(I[o]=x?n[o]:v[o],I[l]=Math.max(v[l],m[l]),I[c]=Math.min(0,m[c]+M[1-r]),f.__rectSize=n[o],x){var T={x:0,y:0};T[o]=Math.max(n[o]-m[o]-O,0),T[l]=I[l],f.setClipPath(new Ia({shape:T})),f.__rectSize=T[o]}else y.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var C=this._getPageInfo(t);return null!=C.pageIndex&&Ks(d,{x:C.contentPosition[0],y:C.contentPosition[1]},x?t:null),this._updatePageInfoView(t,C),I},e.prototype._pageGo=function(t,e,n){var r=this._getPageInfo(e)[t];null!=r&&n.dispatchAction({type:"legendScroll",scrollDataIndex:r,legendId:e.id})},e.prototype._updatePageInfoView=function(t,e){var n=this._controllerGroup;w.each(["pagePrev","pageNext"],(function(r){var o=null!=e[r+"DataIndex"],l=n.childOfName(r);l&&(l.setStyle("fill",o?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),l.cursor=o?"pointer":"default")}));var r=n.childOfName("pageText"),o=t.get("pageFormatter"),l=e.pageIndex,c=null!=l?l+1:0,h=e.pageCount;r&&o&&r.setStyle("text",w.isString(o)?o.replace("{current}",null==c?"":c+"").replace("{total}",null==h?"":h+""):o({current:c,total:h}))},e.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,o=t.getOrient().index,l=cG[o],c=hG[o],h=this._findTargetItemIndex(e),d=n.children(),f=d[h],y=d.length,v=y?1:0,m={contentPosition:[n.x,n.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return m;var x=M(f);m.contentPosition[o]=-x.s;for(var i=h+1,_=x,w=x,S=null;i<=y;++i)(!(S=M(d[i]))&&w.e>_.s+r||S&&!O(S,_.s))&&(_=w.i>_.i?w:S)&&(null==m.pageNextDataIndex&&(m.pageNextDataIndex=_.i),++m.pageCount),w=S;for(i=h-1,_=x,w=x,S=null;i>=-1;--i)(S=M(d[i]))&&O(w,S.s)||!(_.i=e&&t.s<=e+r}},e.prototype._findTargetItemIndex=function(t){return this._showController?(this.getContentGroup().eachChild((function(r,o){var l=r.__legendDataIndex;null==n&&null!=l&&(n=o),l===t&&(e=o)})),null!=e?e:n):0;var e,n},e.type="legend.scroll",e}(nG),pG=dG;function fG(t){use(oG),t.registerComponentModel(lG),t.registerComponentView(pG),function(t){t.registerAction("legendScroll","legendscroll",(function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(n)}))}))}(t)}var gG=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.type="dataZoom.inside",e.defaultOption=El(Nz.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(Nz),yG=gG,vG=pr();function mG(t,e){if(e){t.removeKey(e.model.uid);var n=e.controller;n&&n.dispose()}}function xG(t,e){t.isDisposed()||t.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function bG(t,e,n,r){return t.coordinateSystem.containPoint([n,r])}function _G(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,(function(t,e){var n=vG(e),r=n.coordSysRecordMap||(n.coordSysRecordMap=Object(w.createHashMap)());r.each((function(t){t.dataZoomInfoMap=null})),t.eachComponent({mainType:"dataZoom",subType:"inside"},(function(t){var n=kz(t);Object(w.each)(n.infoList,(function(n){var o=n.model.uid,l=r.get(o)||r.set(o,function(t,e){var n={model:e,containsPoint:Object(w.curry)(bG,e),dispatchAction:Object(w.curry)(xG,t),dataZoomInfoMap:null,controller:null},r=n.controller=new mI(t.getZr());return Object(w.each)(["pan","zoom","scrollMove"],(function(t){r.on(t,(function(e){var r=[];n.dataZoomInfoMap.each((function(o){if(e.isAvailableBehavior(o.model.option)){var l=(o.getRange||{})[t],c=l&&l(o.dzReferCoordSysInfo,n.model.mainType,n.controller,e);!o.model.get("disabled",!0)&&c&&r.push({dataZoomId:o.model.id,start:c[0],end:c[1]})}})),r.length&&n.dispatchAction(r)}))})),n}(e,n.model));(l.dataZoomInfoMap||(l.dataZoomInfoMap=Object(w.createHashMap)())).set(t.uid,{dzReferCoordSysInfo:n,model:t,getRange:null})}))})),r.each((function(t){var e,n=t.controller,o=t.dataZoomInfoMap;if(o){var l=o.keys()[0];null!=l&&(e=o.get(l))}if(e){var c=function(t){var e,n="type_",r={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return t.each((function(t){var l=t.model,c=!l.get("disabled",!0)&&(!l.get("zoomLock",!0)||"move");r[n+c]>r[n+e]&&(e=c),o=o&&l.get("preventDefaultMouseMove",!0)})),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o}}}(o);n.enable(c.controlType,c.opt),n.setPointerChecker(t.containsPoint),lg(t,"dispatchAction",e.model.get("throttle",!0),"fixRate")}else mG(r,t)}))}))}var wG=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return Object(x.a)(e,t),e.prototype.render=function(e,n,r){t.prototype.render.apply(this,arguments),e.noTarget()?this._clear():(this.range=e.getPercentRange(),function(t,e,n){vG(t).coordSysRecordMap.each((function(t){var r=t.dataZoomInfoMap.get(e.uid);r&&(r.getRange=n)}))}(r,e,{pan:Object(w.bind)(SG.pan,this),zoom:Object(w.bind)(SG.zoom,this),scrollMove:Object(w.bind)(SG.scrollMove,this)}))},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){!function(t,e){for(var n=vG(t).coordSysRecordMap,r=n.keys(),i=0;i0?h.pixelStart+h.pixelLength-h.pixel:h.pixel-h.pixelStart)/h.pixelLength*(l[1]-l[0])+l[0],f=Math.max(1/r.scale,0);l[0]=(l[0]-d)*f+d,l[1]=(l[1]-d)*f+d;var y=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return bk(0,l,[0,100],0,y.minSpan,y.maxSpan),this.range=l,o[0]!==l[0]||o[1]!==l[1]?l:void 0}},pan:MG((function(t,e,n,r,o,l){var c=OG[r]([l.oldX,l.oldY],[l.newX,l.newY],e,o,n);return c.signal*(t[1]-t[0])*c.pixel/c.pixelLength})),scrollMove:MG((function(t,e,n,r,o,l){return OG[r]([0,0],[l.scrollDelta,l.scrollDelta],e,o,n).signal*(t[1]-t[0])*l.scrollDelta}))};function MG(t){return function(e,n,r,o){var l=this.range,c=l.slice(),h=e.axisModels[0];if(h)return bk(t(c,h,e,n,r,o),c,[0,100],"all"),this.range=c,l[0]!==c[0]||l[1]!==c[1]?c:void 0}}var OG={grid:function(t,e,n,r,o){var l=n.axis,c={},rect=o.model.coordinateSystem.getRect();return t=t||[0,0],"x"===l.dim?(c.pixel=e[0]-t[0],c.pixelLength=rect.width,c.pixelStart=rect.x,c.signal=l.inverse?1:-1):(c.pixel=e[1]-t[1],c.pixelLength=rect.height,c.pixelStart=rect.y,c.signal=l.inverse?-1:1),c},polar:function(t,e,n,r,o){var l=n.axis,c={},h=o.model.coordinateSystem,d=h.getRadiusAxis().getExtent(),f=h.getAngleAxis().getExtent();return t=t?h.pointToCoord(t):[0,0],e=h.pointToCoord(e),"radiusAxis"===n.mainType?(c.pixel=e[0]-t[0],c.pixelLength=d[1]-d[0],c.pixelStart=d[0],c.signal=l.inverse?1:-1):(c.pixel=e[1]-t[1],c.pixelLength=f[1]-f[0],c.pixelStart=f[0],c.signal=l.inverse?-1:1),c},singleAxis:function(t,e,n,r,o){var l=n.axis,rect=o.model.coordinateSystem.getRect(),c={};return t=t||[0,0],"horizontal"===l.orient?(c.pixel=e[0]-t[0],c.pixelLength=rect.width,c.pixelStart=rect.x,c.signal=l.inverse?1:-1):(c.pixel=e[1]-t[1],c.pixelLength=rect.height,c.pixelStart=rect.y,c.signal=l.inverse?-1:1),c}},IG=wG;function TG(t){Uz(t),t.registerComponentModel(yG),t.registerComponentView(IG),_G(t)}var CG=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=El(Nz.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(Nz),AG=CG,DG=Ia,kG="horizontal",LG="vertical",jG=["line","bar","candlestick","scatter"],PG={easing:"cubicOut",duration:100,delay:0},NG=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._displayables={},n}return Object(x.a)(e,t),e.prototype.init=function(t,e){this.api=e,this._onBrush=Object(w.bind)(this._onBrush,this),this._onBrushEnd=Object(w.bind)(this._onBrushEnd,this)},e.prototype.render=function(e,n,r,o){if(t.prototype.render.apply(this,arguments),lg(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),!1!==e.get("show")){if(e.noTarget())return this._clear(),void this.group.removeAll();o&&"dataZoom"===o.type&&o.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){ug(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var e=this._displayables.sliderGroup=new pi;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,r=this._findCoordRect(),o={width:e.getWidth(),height:e.getHeight()},l=this._orient===kG?{right:o.width-r.x-r.width,top:o.height-30-7-n,width:r.width,height:30}:{right:7,top:r.y,width:30,height:r.height},c=Hu(t.option);Object(w.each)(["right","top","width","height"],(function(t){"ph"===c[t]&&(c[t]=l[t])}));var h=Vu(c,o);this._location={x:h.x,y:h.y},this._size=[h.width,h.height],this._orient===LG&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,r=this.dataZoomModel.getFirstTargetAxisModel(),o=r&&r.get("inverse"),l=this._displayables.sliderGroup,c=(this._dataShadowInfo||{}).otherAxisInverse;l.attr(n!==kG||o?n===kG&&o?{scaleY:c?1:-1,scaleX:-1}:n!==LG||o?{scaleY:c?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:c?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:c?1:-1,scaleX:1});var rect=t.getBoundingRect([l]);t.x=e.x-rect.x,t.y=e.y-rect.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,r=t.get("brushSelect");n.add(new DG({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new DG({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:Object(w.bind)(this._onClickPanel,this)}),l=this.api.getZr();r?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",l.on("mousemove",this._onBrush),l.on("mouseup",this._onBrushEnd)):(l.off("mousemove",this._onBrush),l.off("mouseup",this._onBrushEnd)),n.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,n=this._shadowSize||[],r=t.series,data=r.getRawData(),o=r.getShadowDim&&r.getShadowDim(),l=o&&data.getDimensionInfo(o)?r.getShadowDim():t.otherDim;if(null!=l){var c=this._shadowPolygonPts,h=this._shadowPolylinePts;if(data!==this._shadowData||l!==this._shadowDim||e[0]!==n[0]||e[1]!==n[1]){var d=data.getDataExtent(l),f=.3*(d[1]-d[0]);d=[d[0]-f,d[1]+f];var y,v=[0,e[1]],m=[0,e[0]],x=[[e[0],0],[0,0]],_=[],w=m[1]/(data.count()-1),S=0,M=Math.round(data.count()/e[0]);data.each([l],(function(t,e){if(M>0&&e%M)S+=w;else{var n=null==t||isNaN(t)||""===t,r=n?0:Oi(t,d,v,!0);n&&!y&&e?(x.push([x[x.length-1][0],0]),_.push([_[_.length-1][0],0])):!n&&y&&(x.push([S,0]),_.push([S,0])),x.push([S,r]),_.push([S,r]),S+=w,y=n}})),c=this._shadowPolygonPts=x,h=this._shadowPolylinePts=_}this._shadowData=data,this._shadowDim=l,this._shadowSize=[e[0],e[1]];for(var O=this.dataZoomModel,i=0;i<3;i++){var I=T(1===i);this._displayables.sliderGroup.add(I),this._displayables.dataShadowSegs.push(I)}}}function T(t){var e=O.getModel(t?"selectedDataBackground":"dataBackground"),n=new pi,polygon=new Hp({shape:{points:c},segmentIgnoreThreshold:1,style:e.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),polyline=new Xp({shape:{points:h},segmentIgnoreThreshold:1,style:e.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(polygon),n.add(polyline),n}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var n,r=this.ecModel;return t.eachTargetAxis((function(o,l){var c=t.getAxisProxy(o,l).getTargetSeriesModels();Object(w.each)(c,(function(t){if(!(n||!0!==e&&Object(w.indexOf)(jG,t.get("type"))<0)){var c,h=r.getComponent(Az(o),l).axis,d={x:"y",y:"x",radius:"angle",angle:"radius"}[o],f=t.coordinateSystem;null!=d&&f.getOtherAxis&&(c=f.getOtherAxis(h).inverse),d=t.getData().mapDimension(d),n={thisAxis:h,series:t,thisDim:o,otherDim:d,otherAxisInverse:c}}}),this)}),this),n}},e.prototype._renderHandle=function(){var t=this.group,e=this._displayables,n=e.handles=[null,null],r=e.handleLabels=[null,null],o=this._displayables.sliderGroup,l=this._size,c=this.dataZoomModel,h=this.api,d=c.get("borderRadius")||0,f=c.get("brushSelect"),y=e.filler=new DG({silent:f,style:{fill:c.get("fillerColor")},textConfig:{position:"inside"}});o.add(y),o.add(new DG({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:l[0],height:l[1],r:d},style:{stroke:c.get("dataBackgroundColor")||c.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),Object(w.each)([0,1],(function(e){var l=c.get("handleIcon");!hy[l]&&l.indexOf("path://")<0&&l.indexOf("image://")<0&&(l="path://"+l);var path=fy(l,-1,0,2,2,null,!0);path.attr({cursor:RG(this._orient),draggable:!0,drift:Object(w.bind)(this._onDragMove,this,e),ondragend:Object(w.bind)(this._onDragEnd,this),onmouseover:Object(w.bind)(this._showDataInfo,this,!0),onmouseout:Object(w.bind)(this._showDataInfo,this,!1),z2:5});var h=path.getBoundingRect(),d=c.get("handleSize");this._handleHeight=Ii(d,this._size[1]),this._handleWidth=h.width/h.height*this._handleHeight,path.setStyle(c.getModel("handleStyle").getItemStyle()),path.style.strokeNoScale=!0,path.rectHover=!0,path.ensureState("emphasis").style=c.getModel(["emphasis","handleStyle"]).getItemStyle(),Es(path);var f=c.get("handleColor");null!=f&&(path.style.fill=f),o.add(n[e]=path);var y=c.getModel("textStyle");t.add(r[e]=new Ga({silent:!0,invisible:!0,style:cl(y,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:y.getTextColor(),font:y.getFont()}),z2:10}))}),this);var v=y;if(f){var m=Ii(c.get("moveHandleSize"),l[1]),x=e.moveHandle=new Ia({style:c.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:l[1]-.5,height:m}}),_=.8*m,S=e.moveHandleIcon=fy(c.get("moveHandleIcon"),-_/2,-_/2,_,_,"#fff",!0);S.silent=!0,S.y=l[1]+m/2-.5,x.ensureState("emphasis").style=c.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var M=Math.min(l[1]/2,Math.max(m,10));(v=e.moveZone=new Ia({invisible:!0,shape:{y:l[1]-M,height:m+M}})).on("mouseover",(function(){h.enterEmphasis(x)})).on("mouseout",(function(){h.leaveEmphasis(x)})),o.add(x),o.add(S),o.add(v)}v.attr({draggable:!0,cursor:RG(this._orient),drift:Object(w.bind)(this._onDragMove,this,"all"),ondragstart:Object(w.bind)(this._showDataInfo,this,!0),ondragend:Object(w.bind)(this._onDragEnd,this),onmouseover:Object(w.bind)(this._showDataInfo,this,!0),onmouseout:Object(w.bind)(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[Oi(t[0],[0,100],e,!0),Oi(t[1],[0,100],e,!0)]},e.prototype._updateInterval=function(t,e){var n=this.dataZoomModel,r=this._handleEnds,o=this._getViewExtent(),l=n.findRepresentativeAxisProxy().getMinMaxSpan(),c=[0,100];bk(e,r,o,n.get("zoomLock")?"all":t,null!=l.minSpan?Oi(l.minSpan,c,o,!0):null,null!=l.maxSpan?Oi(l.maxSpan,c,o,!0):null);var h=this._range,d=this._range=Ci([Oi(r[0],o,c,!0),Oi(r[1],o,c,!0)]);return!h||h[0]!==d[0]||h[1]!==d[1]},e.prototype._updateView=function(t){var e=this._displayables,n=this._handleEnds,r=Ci(n.slice()),o=this._size;Object(w.each)([0,1],(function(t){var r=e.handles[t],l=this._handleHeight;r.attr({scaleX:l/2,scaleY:l/2,x:n[t]+(t?-1:1),y:o[1]/2-l/2})}),this),e.filler.setShape({x:r[0],y:0,width:r[1]-r[0],height:o[1]});var l={x:r[0],width:r[1]-r[0]};e.moveHandle&&(e.moveHandle.setShape(l),e.moveZone.setShape(l),e.moveZone.getBoundingRect(),e.moveHandleIcon&&e.moveHandleIcon.attr("x",l.x+l.width/2));for(var c=e.dataShadowSegs,h=[0,r[0],r[1],o[0]],i=0;ie[0]||n[1]<0||n[1]>e[1])){var r=this._handleEnds,o=(r[0]+r[1])/2,l=this._updateInterval("all",n[0]-o);this._updateView(),l&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var e=t.offsetX,n=t.offsetY;this._brushStart=new kt(e,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var e=this._displayables.brushRect;if(this._brushing=!1,e){e.attr("ignore",!0);var n=e.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var r=this._getViewExtent(),o=[0,100];this._range=Ci([Oi(n.x,r,o,!0),Oi(n.x+n.width,r,o,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(vt(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,e){var n=this._displayables,r=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new DG({silent:!0,style:r.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var l=this._brushStart,c=this._displayables.sliderGroup,h=c.transformCoordToLocal(t,e),d=c.transformCoordToLocal(l.x,l.y),f=this._size;h[0]=Math.max(Math.min(f[0],h[0]),0),o.setShape({x:d[0],y:0,width:h[0]-d[0],height:f[1]})},e.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?PG:null,start:e[0],end:e[1]})},e.prototype._findCoordRect=function(){var rect,t=kz(this.dataZoomModel).infoList;if(!rect&&t.length){var e=t[0].model.coordinateSystem;rect=e.getRect&&e.getRect()}if(!rect){var n=this.api.getWidth(),r=this.api.getHeight();rect={x:.2*n,y:.2*r,width:.6*n,height:.6*r}}return rect},e.type="dataZoom.slider",e}(Vz);function RG(t){return"vertical"===t?"ns-resize":"ew-resize"}var EG=NG;function zG(t){t.registerComponentModel(AG),t.registerComponentView(EG),Uz(t)}var VG={get:function(t,e,n){var r=w.clone((BG[t]||{})[e]);return n&&w.isArray(r)?r[r.length-1]:r}},BG={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},FG=VG,GG=hA.mapVisual,HG=hA.eachVisual,WG=w.isArray,YG=w.each,XG=Ci,UG=Oi,ZG=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return Object(x.a)(e,t),e.prototype.init=function(option,t,e){this.mergeDefaultAndTheme(option,e)},e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&xB(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var e=this.stateList;t=w.bind(t,this),this.controllerVisuals=mB(this.option.controller,e,t),this.targetVisuals=mB(this.option.target,e,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries((function(t,n){e.push(n)})):e=Qi(t),e},e.prototype.eachTargetSeries=function(t,e){w.each(this.getTargetSeriesIndices(),(function(n){var r=this.ecModel.getSeriesByIndex(n);r&&t.call(e,r)}),this)},e.prototype.isTargetSeries=function(t){var e=!1;return this.eachTargetSeries((function(n){n===t&&(e=!0)})),e},e.prototype.formatValueText=function(t,e,n){var r,option=this.option,o=option.precision,l=this.dataBound,c=option.formatter;n=n||["<",">"],w.isArray(t)&&(t=t.slice(),r=!0);var h=e?t:r?[d(t[0]),d(t[1])]:d(t);return w.isString(c)?c.replace("{value}",r?h[0]:h).replace("{value2}",r?h[1]:h):w.isFunction(c)?r?c(t[0],t[1]):c(t):r?t[0]===l[0]?n[0]+" "+h[1]:t[1]===l[1]?n[1]+" "+h[0]:h[0]+" - "+h[1]:h;function d(t){return t===l[0]?"min":t===l[1]?"max":(+t).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,e=XG([t.min,t.max]);this._dataExtent=e},e.prototype.getDataDimensionIndex=function(data){var t=this.option.dimension;if(null!=t)return data.getDimensionIndex(t);for(var e=data.dimensions,i=e.length-1;i>=0;i--){var n=e[i],r=data.getDimensionInfo(n);if(!r.isCalculationCoord)return r.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,e=this.option,base={inRange:e.inRange,outOfRange:e.outOfRange},n=e.target||(e.target={}),r=e.controller||(e.controller={});w.merge(n,base),w.merge(r,base);var o=this.isCategory();function l(base){WG(e.color)&&!base.inRange&&(base.inRange={color:e.color.slice().reverse()}),base.inRange=base.inRange||{color:t.get("gradientColor")}}l.call(this,n),l.call(this,r),function(base,t,e){var n=base[t],r=base[e];n&&!r&&(r=base[e]={},YG(n,(function(t,e){if(hA.isValidType(e)){var n=FG.get(e,"inactive",o);null!=n&&(r[e]=n,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}})))}.call(this,n,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,r=this.get("inactiveColor"),l=this.getItemSymbol()||"roundRect";YG(this.stateList,(function(c){var h=this.itemSize,d=t[c];d||(d=t[c]={color:o?r:[r]}),null==d.symbol&&(d.symbol=e&&w.clone(e)||(o?l:[l])),null==d.symbolSize&&(d.symbolSize=n&&w.clone(n)||(o?h[0]:[h[0],h[0]])),d.symbol=GG(d.symbol,(function(symbol){return"none"===symbol?l:symbol}));var f=d.symbolSize;if(null!=f){var y=-1/0;HG(f,(function(t){t>y&&(y=t)})),d.symbolSize=GG(f,(function(t){return UG(t,[0,y],[0,h[0]],!0)}))}}),this)}.call(this,r)},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(Uu),qG=ZG,KG=[20,140],$G=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(null==e[0]||isNaN(e[0]))&&(e[0]=KG[0]),(null==e[1]||isNaN(e[1]))&&(e[1]=KG[1])},e.prototype._resetRange=function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):w.isArray(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),w.each(this.stateList,(function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=e[1]/3)}),this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),e=Ci((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=n[1]||t<=e[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[];return this.eachTargetSeries((function(n){var r=[],data=n.getData();data.each(this.getDataDimensionIndex(data),(function(e,n){t[0]<=e&&e<=t[1]&&r.push(n)}),this),e.push({seriesId:n.id,dataIndex:r})}),this),e},e.prototype.getVisualMeta=function(t){var e=JG(this,"outOfRange",this.getExtent()),n=JG(this,"inRange",this.option.range.slice()),r=[];function o(e,n){r.push({value:e,color:t(e,n)})}for(var l=0,c=0,h=n.length,d=e.length;ct[1])break;n.push({color:this.getControllerVisual(o,"color",e),offset:i/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},e.prototype._createBarPoints=function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},e.prototype._createBarGroup=function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new pi("horizontal"!==e||n?"horizontal"===e&&n?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||n?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},e.prototype._updateHandle=function(t,e){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,o=n.handleThumbs,l=n.handleLabels,c=r.itemSize,h=r.getExtent();aH([0,1],(function(d){var f=o[d];f.setStyle("fill",e.handlesColor[d]),f.y=t[d];var y=oH(t[d],[0,c[1]],h,!0),v=this.getControllerVisual(y,"symbolSize");f.scaleX=f.scaleY=v/c[0],f.x=c[0]-v/2;var m=Rf(n.handleLabelPoints[d],Nf(f,this.group));l[d].setStyle({x:m[0],y:m[1],text:r.formatValueText(this._dataInterval[d]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})}),this)}},e.prototype._showIndicator=function(t,e,n,r){var o=this.visualMapModel,l=o.getExtent(),c=o.itemSize,h=[0,c[1]],d=this._shapes,f=d.indicator;if(f){f.attr("invisible",!1);var y=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),v=this.getControllerVisual(t,"symbolSize"),m=oH(t,l,h,!0),x=c[0]-v/2,_={x:f.x,y:f.y};f.y=m,f.x=x;var w=Rf(d.indicatorLabelPoint,Nf(f,this.group)),S=d.indicatorLabel;S.attr("invisible",!1);var M=this._applyTransform("left",d.mainGroup),O="horizontal"===this._orient;S.setStyle({text:(n||"")+o.formatValueText(e),verticalAlign:O?M:"middle",align:O?"center":M});var I={x:x,y:m,style:{fill:y}},T={style:{x:w[0],y:w[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var C={duration:100,easing:"cubicInOut",additive:!0};f.x=_.x,f.y=_.y,f.animateTo(I,C),S.animateTo(T,C)}else f.attr(I),S.attr(T);this._firstShowIndicator=!1;var A=this._shapes.handleLabels;if(A)for(var i=0;io[1]&&(f[1]=1/0),e&&(f[0]===-1/0?this._showIndicator(d,f[1],"< ",c):f[1]===1/0?this._showIndicator(d,f[0],"> ",c):this._showIndicator(d,d,"≈ ",c));var y=this._hoverLinkDataIndices,v=[];(e||hH(n))&&(v=this._hoverLinkDataIndices=n.findTargetDataIndices(f));var m=function(t,e){var n={},r={};return o(t||[],n),o(e||[],r,n),[l(n),l(r)];function o(t,map,e){for(var i=0,n=t.length;i=0&&(r.dimension=o,n.push(r))}})),t.getData().setVisual("visualMeta",n)}}];function vH(t,e,n,r){for(var o=e.targetVisuals[r],l=hA.prepareVisualTypes(o),c={color:Kg(t.getData(),"color")},i=0,h=l.length;i0:option.splitNumber>0)&&!option.calculable?"piecewise":"continuous"})),t.registerAction(fH,gH),Object(w.each)(yH,(function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)})),t.registerPreprocessor(xH))}function SH(t){t.registerComponentModel(QG),t.registerComponentView(pH),wH(t)}var MH=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._pieceList=[],n}return Object(x.a)(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],OH[this._mode].call(this,this._pieceList),this._resetSelected(e,n);var o=this.option.categories;this.resetVisual((function(t,e){"categories"===r?(t.mappingMethod="category",t.categories=w.clone(o)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=w.map(this._pieceList,(function(t){return t=w.clone(t),"inRange"!==e&&(t.visual=null),t})))}))},e.prototype.completeVisualOption=function(){var option=this.option,e={},n=hA.listVisualTypes(),r=this.isCategory();function o(t,e,n){return t&&t[e]&&t[e].hasOwnProperty(n)}w.each(option.pieces,(function(t){w.each(n,(function(n){t.hasOwnProperty(n)&&(e[n]=1)}))})),w.each(e,(function(t,e){var n=!1;w.each(this.stateList,(function(t){n=n||o(option,t,e)||o(option.target,t,e)}),this),!n&&w.each(this.stateList,(function(t){(option[t]||(option[t]={}))[e]=FG.get(e,"inRange"===t?"active":"inactive",r)}))}),this),t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,e){var n=this.option,r=this._pieceList,o=(e?n:t).selected||{};if(n.selected=o,w.each(r,(function(t,e){var n=this.getSelectedMapKey(t);o.hasOwnProperty(n)||(o[n]=!0)}),this),"single"===n.selectedMode){var l=!1;w.each(r,(function(t,e){var n=this.getSelectedMapKey(t);o[n]&&(l?o[n]=!1:l=!0)}),this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return"categories"===this._mode?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var option=this.option;return option.pieces&&option.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=w.clone(t)},e.prototype.getValueState=function(t){var e=hA.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[],n=this._pieceList;return this.eachTargetSeries((function(r){var o=[],data=r.getData();data.each(this.getDataDimensionIndex(data),(function(e,r){hA.findPieceIndex(e,n)===t&&o.push(r)}),this),e.push({seriesId:r.id,dataIndex:o})}),this),e},e.prototype.getRepresentValue=function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var n=t.interval||[];e=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return e},e.prototype.getVisualMeta=function(t){if(!this.isCategory()){var e=[],n=["",""],r=this,o=this._pieceList.slice();if(o.length){var l=o[0].interval[0];l!==-1/0&&o.unshift({interval:[-1/0,l]}),(l=o[o.length-1].interval[1])!==1/0&&o.push({interval:[l,1/0]})}else o.push({interval:[-1/0,1/0]});var c=-1/0;return w.each(o,(function(t){var e=t.interval;e&&(e[0]>c&&h([c,e[0]],"outOfRange"),h(e.slice()),c=e[1])}),this),{stops:e,outerColors:n}}function h(o,l){var c=r.getRepresentValue({interval:o});l||(l=r.getValueState(c));var h=t(c,l);o[0]===-1/0?n[0]=h:o[1]===1/0?n[1]=h:e.push({value:o[0],color:h},{value:o[1],color:h})}},e.type="visualMap.piecewise",e.defaultOption=El(qG.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(qG),OH={splitNumber:function(t){var e=this.option,n=Math.min(e.precision,20),r=this.getExtent(),o=e.splitNumber;o=Math.max(parseInt(o,10),1),e.splitNumber=o;for(var l=(r[1]-r[0])/o;+l.toFixed(n)!==l&&n<5;)n++;e.precision=n,l=+l.toFixed(n),e.minOpen&&t.push({interval:[-1/0,r[0]],close:[0,0]});for(var c=0,h=r[0];c","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,n)}),this)}};function IH(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}var TH=MH,CH=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return Object(x.a)(e,t),e.prototype.doRender=function(){var t=this.group;t.removeAll();var e=this.visualMapModel,n=e.get("textGap"),r=e.textStyleModel,o=r.getFont(),l=r.getTextColor(),c=this._getItemAlign(),h=e.itemSize,d=this._getViewData(),f=d.endsText,y=w.retrieve(e.get("showLabel",!0),!f);f&&this._renderEndsText(t,f[0],h,y,c),w.each(d.viewPieceList,(function(r){var d=r.piece,f=new pi;f.onclick=w.bind(this._onItemClick,this,d),this._enableHoverLink(f,r.indexInModelPieceList);var v=e.getRepresentValue(d);if(this._createItemSymbol(f,v,[0,0,h[0],h[1]]),y){var m=this.visualMapModel.getValueState(v);f.add(new Ga({style:{x:"right"===c?-n:h[0]+n,y:h[1]/2,text:d.text,verticalAlign:"middle",align:c,font:o,fill:l,opacity:"outOfRange"===m?.5:1}}))}t.add(f)}),this),f&&this._renderEndsText(t,f[1],h,y,c),zu(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,e){var n=this;t.on("mouseover",(function(){return r("highlight")})).on("mouseout",(function(){return r("downplay")}));var r=function(t){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:t,batch:rH(r.findTargetDataIndices(e),r)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return iH(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},e.prototype._renderEndsText=function(t,text,e,n,r){if(text){var o=new pi,l=this.visualMapModel.textStyleModel;o.add(new Ga({style:cl(l,{x:n?"right"===r?e[0]:0:e[0]/2,y:e[1]/2,verticalAlign:"middle",align:n?r:"center",text:text})})),t.add(o)}},e.prototype._getViewData=function(){var t=this.visualMapModel,e=w.map(t.getPieceList(),(function(t,e){return{piece:t,indexInModelPieceList:e}})),n=t.get("text"),r=t.get("orient"),o=t.get("inverse");return("horizontal"===r?o:!o)?e.reverse():n&&(n=n.slice().reverse()),{viewPieceList:e,endsText:n}},e.prototype._createItemSymbol=function(t,e,n){t.add(fy(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},e.prototype._onItemClick=function(t){var e=this.visualMapModel,option=e.option,n=option.selectedMode;if(n){var r=w.clone(option.selected),o=e.getSelectedMapKey(t);"single"===n||!0===n?(r[o]=!0,w.each(r,(function(t,e){r[e]=e===o}))):r[o]=!r[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:r})}},e.type="visualMap.piecewise",e}(eH),AH=CH;function DH(t){t.registerComponentModel(TH),t.registerComponentView(AH),wH(t)}var kH={label:{enabled:!0},decal:{show:!1}},LH=pr(),jH={};function PH(t,e){var n=t.getModel("aria");if(n.get("enabled")){var r=w.clone(kH);w.merge(r.label,t.getLocaleModel().get("aria"),!1),w.merge(n.option,r,!1),function(){if(n.getModel("decal").get("show")){var e=w.createHashMap();t.eachSeries((function(t){if(!t.isColorBySeries()){var n=e.get(t.type);n||(n={},e.set(t.type,n)),LH(t).scope=n}})),t.eachRawSeries((function(e){if(!t.isSeriesFiltered(e))if(w.isFunction(e.enableAriaDecal))e.enableAriaDecal();else{var data=e.getData();if(e.isColorBySeries()){var n=vc(e.ecModel,e.name,jH,t.getSeriesCount()),r=data.getVisual("decal");data.setVisual("decal",d(r,n))}else{var o=e.getRawData(),l={},c=LH(e).scope;data.each((function(t){var e=data.getRawIndex(t);l[e]=t}));var h=o.count();o.each((function(t){var n=l[t],r=o.getName(t)||t+"",f=vc(e.ecModel,r,c,h),y=data.getItemVisual(n,"decal");data.setItemVisual(n,"decal",d(y,f))}))}}function d(t,e){var n=t?w.extend(w.extend({},e),t):e;return n.dirty=!0,n}}))}}(),function(){var r=t.getLocaleModel().get("aria"),l=n.getModel("label");if(l.option=w.defaults(l.option,r),!l.get("enabled"))return;var c=e.getZr().dom;if(l.get("description"))return void c.setAttribute("aria-label",l.get("description"));var h,d=t.getSeriesCount(),f=l.get(["data","maxCount"])||10,y=l.get(["series","maxCount"])||10,v=Math.min(d,y);if(d<1)return;var title=function(){var title=t.get("title");title&&title.length&&(title=title[0]);return title&&title.text}();h=title?o(l.get(["general","withTitle"]),{title:title}):l.get(["general","withoutTitle"]);var m=[];h+=o(d>1?l.get(["series","multiple","prefix"]):l.get(["series","single","prefix"]),{seriesCount:d}),t.eachSeries((function(e,n){if(n1?l.get(["series","multiple",c]):l.get(["series","single",c]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(M=e.subType,t.getLocaleModel().get(["series","typeNames"])[M]||"自定义图")});var data=e.getData();if(data.count()>f)r+=o(l.get(["data","partialData"]),{displayCnt:f});else r+=l.get(["data","allData"]);for(var h=l.get(["data","separator","middle"]),y=l.get(["data","separator","end"]),x=[],i=0;i":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},EH=function(){function t(t){if(null==(this._condVal=Object(w.isString)(t)?new RegExp(t):Object(w.isRegExp)(t)?t:null)){0,Sc("")}}return t.prototype.evaluate=function(t){var e=typeof t;return Object(w.isString)(e)?this._condVal.test(t):!!Object(w.isNumber)(e)&&this._condVal.test(t+"")},t}(),zH=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),VH=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,i=0;i2&&c.push(t),t=[e,n]}function m(e,n,r,o){JH(e,r)&&JH(n,o)||t.push(e,n,r,o,r,o)}function x(e,n,r,o,l,c){var h=Math.abs(n-e),d=4*Math.tan(h/4)/3,f=nC:k2&&c.push(t),c}function tW(t,e,n,r,o,l,c,h,d,f){if(JH(t,n)&&JH(e,r)&&JH(o,c)&&JH(l,h))d.push(c,h);else{var y=2/f,v=y*y,m=c-t,x=h-e,_=Math.sqrt(m*m+x*x);m/=_,x/=_;var w=n-t,S=r-e,M=o-c,O=l-h,I=w*w+S*S,T=M*M+O*O;if(I=0&&T-A*A=0)d.push(c,h);else{var D=[],k=[];De(t,n,o,c,.5,D),De(e,r,l,h,.5,k),tW(D[0],k[0],D[1],k[1],D[2],k[2],D[3],k[3],d,f),tW(D[4],k[4],D[5],k[5],D[6],k[6],D[7],k[7],d,f)}}}}function eW(t,e,n){var r=t[e],o=t[1-e],l=Math.abs(r/o),c=Math.ceil(Math.sqrt(l*n)),h=Math.floor(n/c);0===h&&(h=1,c=n);for(var d=[],i=0;i0)for(i=0;iMath.abs(f),v=eW([d,f],y?0:1,e),m=(y?h:f)/v.length,x=0;x1?null:new kt(p*d+t,p*f+e)}function oW(t,e,n){var r=new kt;kt.sub(r,n,e),r.normalize();var o=new kt;return kt.sub(o,t,e),o.dot(r)}function aW(t,e){var n=t[t.length-1];n&&n[0]===e[0]&&n[1]===e[1]||t.push(e)}function sW(t){var e=t.points,n=[],r=[];mo(e,n,r);var o=new Bt(n[0],n[1],r[0]-n[0],r[1]-n[1]),l=o.width,c=o.height,h=o.x,d=o.y,f=new kt,y=new kt;return l>c?(f.x=y.x=h+l/2,f.y=d,y.y=d+c):(f.y=y.y=d+c/2,f.x=h,y.x=h+l),function(t,e,n){for(var r=t.length,o=[],i=0;io,c=eW([r,o],l?0:1,e),h=l?"width":"height",d=l?"height":"width",f=l?"x":"y",y=l?"y":"x",v=t[h]/c.length,m=0;m0)for(var T=r/n,C=-r/2;C<=r/2;C+=T){var A=Math.sin(C),D=Math.cos(C),k=0;for(O=0;O0;s/=2){var d=0,f=0;(t&s)>0&&(d=1),(e&s)>0&&(f=1),h+=s*s*(3*d^f),0===f&&(1===d&&(t=s-1-t,e=s-1-e),c=t,t=e,e=c)}return h}function MW(t){var e=1/0,n=1/0,r=-1/0,o=-1/0,l=Object(w.map)(t,(function(path){var rect=path.getBoundingRect(),t=path.getComputedTransform(),l=rect.x+rect.width/2+(t?t[4]:0),c=rect.y+rect.height/2+(t?t[5]:0);return e=Math.min(l,e),n=Math.min(c,n),r=Math.max(l,r),o=Math.max(c,o),[l,c]}));return Object(w.map)(l,(function(l,c){return{cp:l,z:SW(l[0],l[1],e,n,r,o),path:t[c]}})).sort((function(a,b){return a.z-b.z})).map((function(t){return t.path}))}function OW(param){return cW(param.path,param.count)}function IW(t){return Object(w.isArray)(t[0])}function TW(t,e){for(var n=[],r=t.length,i=0;i=0;i--)if(!n[i].many.length){var h=n[c].many;if(h.length<=1){if(!c)return n;c=0}o=h.length;var d=Math.ceil(o/2);n[i].many=h.slice(d,o),n[c].many=h.slice(0,d),c++}return n}var CW={clone:function(t){for(var e=[],n=1-Math.pow(1-t.path.style.opacity,1/t.count),i=0;i0){var h,d,f=r.getModel("universalTransition").get("delay"),y=Object.assign({setToFinal:!0},c);IW(t)&&(h=t,d=e),IW(e)&&(h=e,d=t);for(var v=h?h===t:t.length>e.length,m=h?TW(d,h):TW(v?e:t,[v?t:e]),x=0,i=0;ikW))for(var n=data.getIndices(),r=function(data){for(var t=data.dimensions,i=0;i0&&view.group.traverse((function(t){t instanceof ha&&!t.animators.length&&t.animateFrom({style:{opacity:0}},r)}))}))}function VW(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function BW(t){return Object(w.isArray)(t)?t.sort().join(","):t}function FW(data){if(data.hostModel)return data.hostModel.getModel("universalTransition").get("divideShape")}function GW(t,e){for(var i=0;i=0&&o.push({dataGroupId:e.oldDataGroupIds[n],data:e.oldData[n],divide:FW(e.oldData[n]),dim:t.dimension})})),Object(w.each)(Qi(t.to),(function(t){var r=GW(n.updatedSeries,t);if(r>=0){var data=n.updatedSeries[r].getData();l.push({dataGroupId:e.oldDataGroupIds[r],data:data,divide:FW(data),dim:t.dimension})}})),o.length>0&&l.length>0&&zW(o,l,r)}(t,r,n,e)}));else{var l=function(t,e){var n=Object(w.createHashMap)(),r=Object(w.createHashMap)(),o=Object(w.createHashMap)();return Object(w.each)(t.oldSeries,(function(e,n){var l=t.oldDataGroupIds[n],c=t.oldData[n],h=VW(e),d=BW(h);r.set(d,{dataGroupId:l,data:c}),Object(w.isArray)(h)&&Object(w.each)(h,(function(t){o.set(t,{key:d,dataGroupId:l,data:c})}))})),Object(w.each)(e.updatedSeries,(function(t){if(t.isUniversalTransitionEnabled()&&t.isAnimationEnabled()){var e=t.get("dataGroupId"),l=t.getData(),c=VW(t),h=BW(c),d=r.get(h);if(d)n.set(h,{oldSeries:[{dataGroupId:d.dataGroupId,divide:FW(d.data),data:d.data}],newSeries:[{dataGroupId:e,divide:FW(l),data:l}]});else if(Object(w.isArray)(c)){var f=[];Object(w.each)(c,(function(t){var e=r.get(t);e.data&&f.push({dataGroupId:e.dataGroupId,divide:FW(e.data),data:e.data})})),f.length&&n.set(h,{oldSeries:f,newSeries:[{dataGroupId:e,data:l,divide:FW(l)}]})}else{var y=o.get(c);if(y){var v=n.get(y.key);v||(v={oldSeries:[{dataGroupId:y.dataGroupId,data:y.data,divide:FW(y.data)}],newSeries:[]},n.set(y.key,v)),v.newSeries.push({dataGroupId:e,data:l,divide:FW(l)})}}}})),n}(r,n);Object(w.each)(l.keys(),(function(t){var n=l.get(t);zW(n.oldSeries,n.newSeries,e)}))}Object(w.each)(n.updatedSeries,(function(t){t[Nd]&&(t[Nd]=!1)}))}for(var c=t.getSeries(),h=r.oldSeries=[],d=r.oldDataGroupIds=[],f=r.oldData=[],i=0;i