0?1:0>o?-1:0}function xy(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function _y(t,e,i,n,a,o,r,s,l,u){var h=l.valueDim,c=l.categoryDim,d=Math.abs(i[c.wh]),f=t.getItemVisual(e,"symbolSize");_(f)?f=f.slice():(null==f&&(f="100%"),f=[f,f]),f[c.index]=Mr(f[c.index],d),f[h.index]=Mr(f[h.index],n?d:Math.abs(o)),u.symbolSize=f;var p=u.symbolScale=[f[0]/s,f[1]/s];p[h.index]*=(l.isHorizontal?-1:1)*r}function by(t,e,i,n,a){var o=t.get(wE)||0;o&&(ME.attr({scale:e.slice(),rotation:i}),ME.updateTransform(),o/=ME.getLineScale(),o*=e[n.valueDim.index]),a.valueLineWidth=o}function wy(t,e,i,n,a,o,s,l,u,h,c,d){var f=c.categoryDim,p=c.valueDim,g=d.pxSign,m=Math.max(e[p.index]+l,0),v=m;if(n){var y=Math.abs(u),x=D(t.get("symbolMargin"),"15%")+"",_=!1;x.lastIndexOf("!")===x.length-1&&(_=!0,x=x.slice(0,x.length-1)),x=Mr(x,e[p.index]);var b=Math.max(m+2*x,0),w=_?0:2*x,S=Vr(n),M=S?n:Vy((y+w)/b),I=y-M*m;x=I/2/(_?M:M-1),b=m+2*x,w=_?0:2*x,S||"fixed"===n||(M=h?Vy((Math.abs(h)+w)/b):0),v=M*b-w,d.repeatTimes=M,d.symbolMargin=x}var T=g*(v/2),A=d.pathPosition=[];A[f.index]=i[f.wh]/2,A[p.index]="start"===s?T:"end"===s?u-T:u/2,o&&(A[0]+=o[0],A[1]+=o[1]);var C=d.bundlePosition=[];C[f.index]=i[f.xy],C[p.index]=i[p.xy];var L=d.barRectShape=r({},i);L[p.wh]=g*Math.max(Math.abs(i[p.wh]),Math.abs(A[p.index]+T)),L[f.wh]=i[f.wh];var k=d.clipShape={};k[f.xy]=-i[f.xy],k[f.wh]=c.ecSize[f.wh],k[p.xy]=0,k[p.wh]=i[p.wh]}function Sy(t){var e=t.symbolPatternSize,i=ec(t.symbolType,-e/2,-e/2,e,e,t.color);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function My(t,e,i,n){function a(t){var e=h.slice(),n=i.pxSign,a=t;return("start"===i.symbolRepeatDirection?n>0:0>n)&&(a=d-1-t),e[c.index]=p*(a-d/2+.5)+h[c.index],{position:e,scale:i.symbolScale.slice(),rotation:i.rotation}}function o(){Ey(t,function(t){t.trigger("emphasis")})}function r(){Ey(t,function(t){t.trigger("normal")})}var s=t.__pictorialBundle,l=i.symbolSize,u=i.valueLineWidth,h=i.pathPosition,c=e.valueDim,d=i.repeatTimes||0,f=0,p=l[e.valueDim.index]+u+2*i.symbolMargin;for(Ey(t,function(t){t.__pictorialAnimationIndex=f,t.__pictorialRepeatTimes=d,d>f?Ry(t,null,a(f),i,n):Ry(t,null,{scale:[0,0]},i,n,function(){s.remove(t)}),ky(t,i),f++});d>f;f++){var g=Sy(i);g.__pictorialAnimationIndex=f,g.__pictorialRepeatTimes=d,s.add(g);var m=a(f);Ry(g,{position:m.position,scale:[0,0]},{scale:m.scale,rotation:m.rotation},i,n),g.on("mouseover",o).on("mouseout",r),ky(g,i)}}function Iy(t,e,i,n){function a(){this.trigger("emphasis")}function o(){this.trigger("normal")}var r=t.__pictorialBundle,s=t.__pictorialMainPath;s?Ry(s,null,{position:i.pathPosition.slice(),scale:i.symbolScale.slice(),rotation:i.rotation},i,n):(s=t.__pictorialMainPath=Sy(i),r.add(s),Ry(s,{position:i.pathPosition.slice(),scale:[0,0],rotation:i.rotation},{scale:i.symbolScale.slice()},i,n),s.on("mouseover",a).on("mouseout",o)),ky(s,i)}function Ty(t,e,i){var n=r({},e.barRectShape),a=t.__pictorialBarRect;a?Ry(a,null,{shape:n},e,i):(a=t.__pictorialBarRect=new RT({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(a))}function Ay(t,e,i,n){if(i.symbolClip){var a=t.__pictorialClipPath,o=r({},i.clipShape),s=e.valueDim,l=i.animationModel,u=i.dataIndex;if(a)nr(a,{shape:o},l,u);else{o[s.wh]=0,a=new RT({shape:o}),t.__pictorialBundle.setClipPath(a),t.__pictorialClipPath=a;var h={};h[s.wh]=i.clipShape[s.wh],lA[n?"updateProps":"initProps"](a,{shape:h},l,u)}}}function Dy(t,e){var i=t.getItemModel(e);return i.getAnimationDelayParams=Cy,i.isAnimationEnabled=Ly,i}function Cy(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function Ly(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function ky(t,e){t.off("emphasis").off("normal");var i=e.symbolScale.slice();e.hoverAnimation&&t.on("emphasis",function(){this.animateTo({scale:[1.1*i[0],1.1*i[1]]},400,"elasticOut")}).on("normal",function(){this.animateTo({scale:i.slice()},400,"elasticOut")})}function Py(t,e,i,n){var a=new hM,o=new hM;return a.add(o),a.__pictorialBundle=o,o.attr("position",i.bundlePosition.slice()),i.symbolRepeat?My(a,e,i):Iy(a,e,i),Ty(a,i,n),Ay(a,e,i,n),a.__pictorialShapeStr=zy(t,i),a.__pictorialSymbolMeta=i,a}function Oy(t,e,i){var n=i.animationModel,a=i.dataIndex,o=t.__pictorialBundle;nr(o,{position:i.bundlePosition.slice()},n,a),i.symbolRepeat?My(t,e,i,!0):Iy(t,e,i,!0),Ty(t,i,!0),Ay(t,e,i,!0)}function Ny(t,e,i,n){var a=n.__pictorialBarRect;a&&(a.style.text=null);var o=[];Ey(n,function(t){o.push(t)}),n.__pictorialMainPath&&o.push(n.__pictorialMainPath),n.__pictorialClipPath&&(i=null),f(o,function(t){nr(t,{scale:[0,0]},i,e,function(){n.parent&&n.parent.remove(n)})}),t.setItemGraphicEl(e,null)}function zy(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Ey(t,e,i){f(t.__pictorialBundle.children(),function(n){n!==t.__pictorialBarRect&&e.call(i,n)})}function Ry(t,e,i,n,a,o){e&&t.attr(e),n.symbolClip&&!a?i&&t.attr(i):i&&lA[a?"updateProps":"initProps"](t,i,n.animationModel,n.dataIndex,o)}function By(t,e,i){var n=i.color,a=i.dataIndex,o=i.itemModel,r=o.getModel("itemStyle").getItemStyle(["color"]),l=o.getModel("emphasis.itemStyle").getItemStyle(),u=o.getShallow("cursor");Ey(t,function(t){t.setColor(n),t.setStyle(s({fill:n,opacity:i.opacity},r)),Fo(t,l),u&&(t.cursor=u),t.z2=i.z2});var h={},c=e.valueDim.posDesc[+(i.boundingLength>0)],d=t.__pictorialBarRect;Rc(d.style,h,o,n,e.seriesModel,a,c),Fo(d,h)}function Vy(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}function Gy(t,e){return e=e||[0,0],p(["x","y"],function(i,n){var a=this.getAxis(i),o=e[n],r=t[n]/2;return"category"===a.type?a.getBandWidth():Math.abs(a.dataToCoord(o-r)-a.dataToCoord(o+r))},this)}function Fy(t,e){return e=e||[0,0],p([0,1],function(i){var n=e[i],a=t[i]/2,o=[],r=[];return o[i]=n-a,r[i]=n+a,o[1-i]=r[1-i]=e[1-i],Math.abs(this.dataToPoint(o)[i]-this.dataToPoint(r)[i])},this)}function Wy(t,e){var i=this.getAxis(),n=e instanceof Array?e[0]:e,a=(t instanceof Array?t[0]:t)/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-a)-i.dataToCoord(n+a))}function Hy(t,e){return p(["Radius","Angle"],function(i,n){var a=this["get"+i+"Axis"](),o=e[n],r=t[n]/2,s="dataTo"+i,l="category"===a.type?a.getBandWidth():Math.abs(a[s](o-r)-a[s](o+r));return"Angle"===i&&(l=l*Math.PI/180),l},this)}function Zy(t){var e,i=t.type;if("path"===i){var n=t.shape,a=null!=n.width&&null!=n.height?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,o=ax(n);e=wo(o,null,a,n.layout||"center"),e.__customPathData=o}else if("image"===i)e=new Dn({}),e.__customImagePath=t.style.image;else if("text"===i)e=new IT({}),e.__customText=t.style.text;else if("group"===i)e=new hM;else{if("compoundPath"===i)throw new Error('"compoundPath" is not supported yet.');var r=bo(i);e=new r}return e.__customGraphicType=i,e.name=t.name,e}function Xy(t,e,i,a,o,r,s){var l={},u=i.style||{};if(i.shape&&(l.shape=n(i.shape)),i.position&&(l.position=i.position.slice()),i.scale&&(l.scale=i.scale.slice()),i.origin&&(l.origin=i.origin.slice()),i.rotation&&(l.rotation=i.rotation),"image"===t.type&&i.style){var h=l.style={};f(["x","y","width","height"],function(e){Uy(e,h,u,t.style,r)})}if("text"===t.type&&i.style){var h=l.style={};f(["x","y"],function(e){Uy(e,h,u,t.style,r)}),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke)}if("group"!==t.type&&(t.useStyle(u),r)){t.style.opacity=0;var c=u.opacity;null==c&&(c=1),ar(t,{style:{opacity:c}},a,e)}r?t.attr(l):nr(t,l,a,e),i.hasOwnProperty("z2")&&t.attr("z2",i.z2||0),i.hasOwnProperty("silent")&&t.attr("silent",i.silent),i.hasOwnProperty("invisible")&&t.attr("invisible",i.invisible),i.hasOwnProperty("ignore")&&t.attr("ignore",i.ignore),i.hasOwnProperty("info")&&t.attr("info",i.info);var d=i.styleEmphasis;zo(t,d),s&&Wo(t,d!==!1)}function Uy(t,e,i,n,a){null==i[t]||a||(e[t]=i[t],i[t]=n[t])}function Yy(t,e,i,n){function a(t){null==t&&(t=m),S&&(v=e.getItemModel(t),y=v.getModel(OE),x=v.getModel(NE),_=e.getItemVisual(t,"color"),S=!1)}function o(t,i){return null==i&&(i=m),e.get(e.getDimension(t||0),i)}function r(i,n){null==n&&(n=m),a(n);var o=v.getModel(kE).getItemStyle();null!=_&&(o.fill=_);var r=e.getItemVisual(n,"opacity");null!=r&&(o.opacity=r);var s=i?ex(i,y):y;return Yo(o,s,null,{autoColor:_,isRectText:!0}),o.text=s.getShallow("show")?C(t.getFormattedLabel(n,"normal"),Ec(e,n)):null,i&&ix(o,i),o}function l(i,n){null==n&&(n=m),a(n);var o=v.getModel(PE).getItemStyle(),r=i?ex(i,x):x;return Yo(o,r,null,{isRectText:!0},!0),o.text=r.getShallow("show")?L(t.getFormattedLabel(n,"emphasis"),t.getFormattedLabel(n,"normal"),Ec(e,n)):null,i&&ix(o,i),o}function u(t,i){return null==i&&(i=m),e.getItemVisual(i,t)}function h(t){if(p.getBaseAxis){var e=p.getBaseAxis();return Ph(s({axis:e},t),n)}}function c(){return i.getCurrentSeriesIndices()}function d(t){return er(t,i)}var f=t.get("renderItem"),p=t.coordinateSystem,g={};p&&(g=p.prepareCustoms?p.prepareCustoms():EE[p.type](p));var m,v,y,x,_,b=s({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:o,style:r,styleEmphasis:l,visual:u,barLayout:h,currentSeriesIndices:c,font:d},g.api||{}),w={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:g.coordSys,dataInsideLength:e.count(),encode:jy(t.getData())},S=!0;return function(t,i){return m=t,S=!0,f&&f(s({dataIndexInside:t,dataIndex:e.getRawIndex(t),actionType:i?i.type:null},w),b)}}function jy(t){var e={};return f(t.dimensions,function(i,n){var a=t.getDimensionInfo(i);if(!a.isExtraCoord){var o=a.coordDim,r=e[o]=e[o]||[];r[a.coordDimIndex]=n}}),e}function qy(t,e,i,n,a,o){return t=Ky(t,e,i,n,a,o,!0),t&&o.setItemGraphicEl(e,t),t}function Ky(t,e,i,n,a,o,r){var s=!i;i=i||{};var l=i.type,u=i.shape,h=i.style;if(t&&(s||null!=l&&l!==t.__customGraphicType||"path"===l&&ox(u)&&ax(u)!==t.__customPathData||"image"===l&&rx(h,"image")&&h.image!==t.__customImagePath||"text"===l&&rx(u,"text")&&h.text!==t.__customText)&&(a.remove(t),t=null),!s){var c=!t;return!t&&(t=Zy(i)),Xy(t,e,i,n,o,c,r),"group"===l&&$y(t,e,i,n,o),a.add(t),t}}function $y(t,e,i,n,a){var o=i.children,r=o?o.length:0,s=i.$mergeChildren,l="byName"===s||i.diffChildrenByName,u=s===!1;if(r||l||u){if(l)return void Jy({oldChildren:t.children()||[],newChildren:o||[],dataIndex:e,animatableModel:n,group:t,data:a});u&&t.removeAll();for(var h=0;r>h;h++)o[h]&&Ky(t.childAt(h),e,o[h],n,t,a)}}function Jy(t){new Zu(t.oldChildren,t.newChildren,Qy,Qy,t).add(tx).update(tx).remove(nx).execute()}function Qy(t,e){var i=t&&t.name;return null!=i?i:zE+e}function tx(t,e){var i=this.context,n=null!=t?i.newChildren[t]:null,a=null!=e?i.oldChildren[e]:null;Ky(a,i.dataIndex,n,i.animatableModel,i.group,i.data)}function ex(t,e){var i=new mr({},e);return f(LE,function(e,n){t.hasOwnProperty(e)&&(i.option[n]=t[e])}),i}function ix(t,e){for(var i in e)(e.hasOwnProperty(i)||!LE.hasOwnProperty(i))&&(t[i]=e[i])}function nx(t){var e=this.context,i=e.oldChildren[t];i&&e.group.remove(i)}function ax(t){return t&&(t.pathData||t.d)}function ox(t){return t&&(t.hasOwnProperty("pathData")||t.hasOwnProperty("d"))}function rx(t,e){return t&&t.hasOwnProperty(e)}function sx(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function lx(t,e){return e.dim+t.model.componentIndex}function ux(t,e){var i={},n=hx(m(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"polar"===t.coordinateSystem.type}));e.eachSeriesByType(t,function(t){if("polar"===t.coordinateSystem.type){var e=t.getData(),a=t.coordinateSystem,o=a.getBaseAxis(),r=lx(a,o),s=sx(t),l=n[r][s],u=l.offset,h=l.width,c=a.getOtherAxis(o),d=t.coordinateSystem.cx,f=t.coordinateSystem.cy,p=t.get("barMinHeight")||0,g=t.get("barMinAngle")||0;i[s]=i[s]||[];for(var m=e.mapDimension(c.dim),v=e.mapDimension(o.dim),y=vh(e,m),x="radius"!==o.dim||!t.get("roundCap",!0),_="radius"===c.dim?c.dataToRadius(0):c.dataToAngle(0),b=0,w=e.count();w>b;b++){var S=e.get(m,b),M=e.get(v,b),I=S>=0?"p":"n",T=_;y&&(i[s][M]||(i[s][M]={p:_,n:_}),T=i[s][M][I]);var A,D,C,L;if("radius"===c.dim){var k=c.dataToRadius(S)-_,P=o.dataToAngle(M);Math.abs(k)k?-1:1)*p),A=T,D=T+k,C=P-u,L=C-h,y&&(i[s][M][I]=D)}else{var O=c.dataToAngle(S,x)-_,N=o.dataToRadius(M);Math.abs(O)O?-1:1)*g),A=N+u,D=A+h,C=T,L=T+O,y&&(i[s][M][I]=L)}e.setItemLayout(b,{cx:d,cy:f,r0:A,r:D,startAngle:-C*Math.PI/180,endAngle:-L*Math.PI/180})}}},this)}function hx(t){var e={};f(t,function(t){var i=t.getData(),n=t.coordinateSystem,a=n.getBaseAxis(),o=lx(n,a),r=a.getExtent(),s="category"===a.type?a.getBandWidth():Math.abs(r[1]-r[0])/i.count(),l=e[o]||{bandWidth:s,remainedWidth:s,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},u=l.stacks;e[o]=l;var h=sx(t);u[h]||l.autoWidthCount++,u[h]=u[h]||{width:0,maxWidth:0};var c=Mr(t.get("barWidth"),s),d=Mr(t.get("barMaxWidth"),s),f=t.get("barGap"),p=t.get("barCategoryGap");c&&!u[h].width&&(c=Math.min(l.remainedWidth,c),u[h].width=c,l.remainedWidth-=c),d&&(u[h].maxWidth=d),null!=f&&(l.gap=f),null!=p&&(l.categoryGap=p)});var i={};return f(e,function(t,e){i[e]={};var n=t.stacks,a=t.bandWidth,o=Mr(t.categoryGap,a),r=Mr(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-o)/(l+(l-1)*r);u=Math.max(u,0),f(n,function(t){var e=t.maxWidth;e&&u>e&&(e=Math.min(e,s),t.width&&(e=Math.min(e,t.width)),s-=e,t.width=e,l--)}),u=(s-o)/(l+(l-1)*r),u=Math.max(u,0);var h,c=0;f(n,function(t){t.width||(t.width=u),h=t,c+=t.width*(1+r)}),h&&(c-=h.width*r);var d=-c/2;f(n,function(t,n){i[e][n]=i[e][n]||{offset:d,width:t.width},d+=t.width*(1+r)})}),i}function cx(t,e){JL.call(this,"radius",t,e),this.type="category"}function dx(t,e){e=e||[0,360],JL.call(this,"angle",t,e),this.type="category"}function fx(t,e){return e.type||(e.data?"category":"value")}function px(t,e,i){var n=e.get("center"),a=i.getWidth(),o=i.getHeight();t.cx=Mr(n[0],a),t.cy=Mr(n[1],o);var r=t.getRadiusAxis(),s=Math.min(a,o)/2,l=e.get("radius");null==l?l=[0,"100%"]:_(l)||(l=[0,l]),l=[Mr(l[0],s),Mr(l[1],s)],r.inverse?r.setExtent(l[1],l[0]):r.setExtent(l[0],l[1])}function gx(t){var e=this,i=e.getAngleAxis(),n=e.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),n.scale.setExtent(1/0,-1/0),t.eachSeries(function(t){if(t.coordinateSystem===e){var a=t.getData();f(a.mapDimension("radius",!0),function(t){n.scale.unionExtentFromData(a,yh(a,t))}),f(a.mapDimension("angle",!0),function(t){i.scale.unionExtentFromData(a,yh(a,t))})}}),Xh(i.scale,i.model),Xh(n.scale,n.model),"category"===i.type&&!i.onBand){var a=i.getExtent(),o=360/i.scale.count();i.inverse?a[1]+=o:a[1]-=o,i.setExtent(a[0],a[1])}}function mx(t,e){if(t.type=e.get("type"),t.scale=Uh(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType){t.inverse^=e.get("clockwise");var i=e.get("startAngle");t.setExtent(i,i+(t.inverse?-360:360))}e.axis=t,t.model=e}function vx(t,e,i){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),a=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:a[0],y2:a[1]}}function yx(t){var e=t.getRadiusAxis();return e.inverse?0:1}function xx(t){var e=t[0],i=t[t.length-1];e&&i&&Math.abs(Math.abs(e.coord-i.coord)-360)<1e-4&&t.pop()}function _x(t,e,i){return{position:[t.cx,t.cy],rotation:i/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}function bx(t,e,i,n,a){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e)){if(!t.involveSeries)return void i.showPointer(t,e);var s=Sx(e,t),l=s.payloadBatch,u=s.snapToValue;l[0]&&null==a.seriesIndex&&r(a,l[0]),!n&&t.snap&&o.containData(u)&&null!=u&&(e=u),i.showPointer(t,e,l,a),i.showTooltip(t,s,u)}}function Sx(t,e){var i=e.axis,n=i.dim,a=t,o=[],r=Number.MAX_VALUE,s=-1;return UE(e.seriesModels,function(e){var l,u,h=e.getData().mapDimension(n,!0);if(e.getAxisTooltipData){var c=e.getAxisTooltipData(h,t,i);u=c.dataIndices,l=c.nestestValue}else{if(u=e.getData().indicesOfNearest(h[0],t,"category"===i.type?.5:null),!u.length)return;l=e.getData().get(h[0],u[0])}if(null!=l&&isFinite(l)){var d=t-l,f=Math.abs(d);r>=f&&((r>f||d>=0&&0>s)&&(r=f,s=d,a=l,o.length=0),UE(u,function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:o,snapToValue:a}}function Mx(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function Ix(t,e,i,n){var a=i.payloadBatch,o=e.axis,r=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&a.length){var l=e.coordSys.model,u=xd(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:o.dim,axisIndex:r.componentIndex,axisType:r.type,axisId:r.id,value:n,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:a.slice()})}}function Tx(t,e,i){var n=i.axesInfo=[];UE(e,function(e,i){var a=e.axisPointerModel.option,o=t[i];o?(!e.useHandle&&(a.status="show"),a.value=o.value,a.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(a.status="hide"),"show"===a.status&&n.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:a.value})})}function Ax(t,e,i,n){if(kx(e)||!t.list.length)return void n({type:"hideTip"});var a=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:t.list})}function Dx(t,e,i){var n=i.getZr(),a="axisPointerLastHighlights",o=jE(n)[a]||{},r=jE(n)[a]={};UE(t,function(t){var e=t.axisPointerModel.option;"show"===e.status&&UE(e.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;r[e]=t})});var s=[],l=[];f(o,function(t,e){!r[e]&&l.push(t)}),f(r,function(t,e){!o[e]&&s.push(t)}),l.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}function Cx(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function Lx(t){var e=t.axis.model,i={},n=i.axisDim=t.axis.dim;return i.axisIndex=i[n+"AxisIndex"]=e.componentIndex,i.axisName=i[n+"AxisName"]=e.name,i.axisId=i[n+"AxisId"]=e.id,i}function kx(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function Px(t,e,i){if(!Kw.node){var n=e.getZr();KE(n).records||(KE(n).records={}),Ox(n,e);var a=KE(n).records[t]||(KE(n).records[t]={});a.handler=i}}function Ox(t,e){function i(i,n){t.on(i,function(i){var a=Rx(e);$E(KE(t).records,function(t){t&&n(t,i,a.dispatchAction)}),Nx(a.pendings,e)})}KE(t).initialized||(KE(t).initialized=!0,i("click",x(Ex,"click")),i("mousemove",x(Ex,"mousemove")),i("globalout",zx))}function Nx(t,e){var i,n=t.showTip.length,a=t.hideTip.length;n?i=t.showTip[n-1]:a&&(i=t.hideTip[a-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function zx(t,e,i){t.handler("leave",null,i)}function Ex(t,e,i,n){e.handler(t,i,n)}function Rx(t){var e={showTip:[],hideTip:[]},i=function(n){var a=e[n.type];a?a.push(n):(n.dispatchAction=i,t.dispatchAction(n))};return{dispatchAction:i,pendings:e}}function Bx(t,e){if(!Kw.node){var i=e.getZr(),n=(KE(i).records||{})[t];n&&(KE(i).records[t]=null)}}function Vx(){}function Gx(t,e,i,n){Fx(QE(i).lastProp,n)||(QE(i).lastProp=n,e?nr(i,n,t):(i.stopAnimation(),i.attr(n)))}function Fx(t,e){if(S(t)&&S(e)){var i=!0;return f(e,function(e,n){i=i&&Fx(t[n],e)}),!!i}return t===e}function Wx(t,e){t[e.get("label.show")?"show":"hide"]()}function Hx(t){return{position:t.position.slice(),rotation:t.rotation||0}}function Zx(t,e,i){var n=e.get("z"),a=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=a&&(t.zlevel=a),t.silent=i)})}function Xx(t){var e,i=t.get("type"),n=t.getModel(i+"Style");return"line"===i?(e=n.getLineStyle(),e.fill=null):"shadow"===i&&(e=n.getAreaStyle(),e.stroke=null),e}function Ux(t,e,i,n,a){var o=i.get("value"),r=jx(o,e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),s=i.getModel("label"),l=_A(s.get("padding")||0),u=s.getFont(),h=Xi(r,u),c=a.position,d=h.width+l[1]+l[3],f=h.height+l[0]+l[2],p=a.align;"right"===p&&(c[0]-=d),"center"===p&&(c[0]-=d/2);var g=a.verticalAlign;"bottom"===g&&(c[1]-=f),"middle"===g&&(c[1]-=f/2),Yx(c,d,f,n);var m=s.get("backgroundColor");m&&"auto"!==m||(m=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:d,height:f,r:s.get("borderRadius")},position:c.slice(),style:{text:r,textFont:u,textFill:s.getTextColor(),textPosition:"inside",textPadding:l,fill:m,stroke:s.get("borderColor")||"transparent",lineWidth:s.get("borderWidth")||0,shadowBlur:s.get("shadowBlur"),shadowColor:s.get("shadowColor"),shadowOffsetX:s.get("shadowOffsetX"),shadowOffsetY:s.get("shadowOffsetY")},z2:10}}function Yx(t,e,i,n){var a=n.getWidth(),o=n.getHeight();t[0]=Math.min(t[0]+e,a)-e,t[1]=Math.min(t[1]+i,o)-i,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}function jx(t,e,i,n,a){t=e.scale.parse(t);var o=e.scale.getLabel(t,{precision:a.precision}),r=a.formatter;if(r){var s={value:qh(e,t),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};f(n,function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,a=e&&e.getDataParams(n);a&&s.seriesData.push(a)}),w(r)?o=r.replace("{value}",o):b(r)&&(o=r(s))}return o}function qx(t,e,i){var n=Oe();return Be(n,n,i.rotation),Re(n,n,i.position),rr([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}function Kx(t,e,i,n,a,o){var r=Tk.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=a.get("label.margin"),Ux(e,n,a,o,{position:qx(n.axis,t,i),align:r.textAlign,verticalAlign:r.textVerticalAlign})}function $x(t,e,i){return i=i||0,{x1:t[i],y1:t[1-i],x2:e[i],y2:e[1-i]}}function Jx(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}function Qx(t,e,i,n,a,o){return{cx:t,cy:e,r0:i,r:n,startAngle:a,endAngle:o,clockwise:!0}}function t_(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}function e_(t){return"x"===t.dim?0:1}function i_(t,e,i,n,a){var o=e.axis,r=o.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,h,c=n.getRadiusAxis().getExtent();if("radius"===o.dim){var d=Oe();Be(d,d,s),Re(d,d,[n.cx,n.cy]),l=rr([r,-a],d);var f=e.getModel("axisLabel").get("rotate")||0,p=Tk.innerTextLayout(s,f*Math.PI/180,-1);u=p.textAlign,h=p.textVerticalAlign}else{var g=c[1];l=n.coordToPoint([g+a,r]);var m=n.cx,v=n.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}function n_(t,e){e.update="updateView",Cu(e,function(e,i){var n={};return i.eachComponent({mainType:"geo",query:e},function(i){i[t](e.name);var a=i.coordinateSystem;f(a.regions,function(t){n[t.name]=i.isSelected(t.name)||!1})}),{selected:n,name:e.name}})}function a_(t,e,i){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,i),this.model=t}function o_(t,e){var i=[];return t.eachComponent("singleAxis",function(n,a){var o=new a_(n,t,e);o.name="single_"+a,o.resize(n,e),n.coordinateSystem=o,i.push(o)}),t.eachSeries(function(e){if("singleAxis"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"singleAxis",index:e.get("singleAxisIndex"),id:e.get("singleAxisId")})[0];e.coordinateSystem=i&&i.coordinateSystem}}),i}function r_(t,e){e=e||{};var i=t.coordinateSystem,n=t.axis,a={},o=n.position,r=n.orient,s=i.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};a.position=["vertical"===r?u.vertical[o]:l[0],"horizontal"===r?u.horizontal[o]:l[3]];var h={horizontal:0,vertical:1};a.rotation=Math.PI/2*h[r];var c={top:-1,bottom:1,right:1,left:-1};a.labelDirection=a.tickDirection=a.nameDirection=c[o],t.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),D(e.labelInside,t.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var d=e.rotate;return null==d&&(d=t.get("axisLabel.rotate")),a.labelRotation="top"===o?-d:d,a.z2=1,a}function s_(t,e){return e.type||(e.data?"category":"value")}function l_(t){return t.isHorizontal()?0:1
+}function u_(t,e){var i=t.getRect();return[i[fR[e]],i[fR[e]]+i[pR[e]]]}function h_(t){this._model=t}function c_(t,e,i,n){var a=i.calendarModel,o=i.seriesModel,r=a?a.coordinateSystem:o?o.coordinateSystem:null;return r===this?r[t](n):null}function d_(t,e){var i=t.cellSize;_(i)?1===i.length&&(i[1]=i[0]):i=t.cellSize=[i,i];var n=p([0,1],function(t){return is(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]});ns(t,e,{type:"box",ignoreSize:n})}function f_(t,e,i){var n,a={},o="toggleSelected"===t;return i.eachComponent("legend",function(i){o&&null!=n?i[n?"select":"unSelect"](e.name):"allSelect"===t||"inverseSelect"===t?i[t]():(i[t](e.name),n=i.isSelected(e.name));var r=i.getData();f(r,function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);a[e]=a.hasOwnProperty(e)?a[e]&&n:n}})}),"allSelect"===t||"inverseSelect"===t?{selected:a}:{name:e.name,selected:a}}function p_(t,e,i){var n=e.getBoxLayoutParams(),a=e.get("padding"),o={width:i.getWidth(),height:i.getHeight()},r=ts(n,o,a);LA(e.get("orient"),t,e.get("itemGap"),r.width,r.height),es(t,n,o,a)}function g_(t,e){var i=_A(e.get("padding")),n=e.getItemStyle(["color","opacity"]);n.fill=e.get("backgroundColor");var t=new RT({shape:{x:t.x-i[3],y:t.y-i[0],width:t.width+i[1]+i[3],height:t.height+i[0]+i[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1});return t}function m_(t,e,i,n,a,o){var r;return"line"!==e&&e.indexOf("empty")<0?(r=i.getItemStyle(),t.style.stroke=n,o||(r.stroke=a)):r=i.getItemStyle(["borderWidth","borderColor"]),t.setStyle(r)}function v_(t,e,i,n){x_(t,e,i,n),i.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),y_(t,e,i,n)}function y_(t,e,i,n){var a=i.getZr().storage.getDisplayList()[0];a&&a.useHoverLayer||i.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:n})}function x_(t,e,i,n){var a=i.getZr().storage.getDisplayList()[0];a&&a.useHoverLayer||i.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:n})}function __(t,e,i){var n=t.getOrient(),a=[1,1];a[n.index]=0,ns(e,i,{type:"box",ignoreSize:a})}function b_(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",i="left "+t+"s "+e+",top "+t+"s "+e;return p(ER,function(t){return t+"transition:"+i}).join(";")}function w_(t){var e=[],i=t.get("fontSize"),n=t.getTextColor();n&&e.push("color:"+n),e.push("font:"+t.getFont());var a=t.get("lineHeight");null==a&&(a=Math.round(3*i/2)),i&&e.push("line-height:"+a+"px");var o=t.get("textShadowColor"),r=t.get("textShadowBlur")||0,s=t.get("textShadowOffsetX")||0,l=t.get("textShadowOffsetY")||0;return r&&e.push("text-shadow:"+s+"px "+l+"px "+r+"px "+o),NR(["decoration","align"],function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)}),e.join(";")}function S_(t){var e=[],i=t.get("transitionDuration"),n=t.get("backgroundColor"),a=t.getModel("textStyle"),o=t.get("padding");return i&&e.push(b_(i)),n&&(Kw.canvasSupported?e.push("background-Color:"+n):(e.push("background-Color:#"+ai(n)),e.push("filter:alpha(opacity=70)"))),NR(["width","color","radius"],function(i){var n="border-"+i,a=zR(n),o=t.get(a);null!=o&&e.push(n+":"+o+("color"===i?"":"px"))}),e.push(w_(a)),null!=o&&e.push("padding:"+_A(o).join("px ")+"px"),e.join(";")+";"}function M_(t,e,i,n,a){var o=e&&e.painter;if(i){var r=o&&o.getViewportRoot();r&&pe(t,r,document.body,n,a)}else{t[0]=n,t[1]=a;var s=o&&o.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}function I_(t,e,i){if(Kw.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var a=this._zr=e.getZr(),o=this._appendToBody=i&&i.appendToBody;this._styleCoord=[0,0,0,0],M_(this._styleCoord,a,o,e.getWidth()/2,e.getHeight()/2),o?document.body.appendChild(n):t.appendChild(n),this._container=t,this._show=!1,this._hideTimeout;var r=this;n.onmouseenter=function(){r._enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},n.onmousemove=function(t){if(t=t||window.event,!r._enterable){var e=a.handler,i=a.painter.getViewportRoot();we(i,t,!0),e.dispatch("mousemove",t)}},n.onmouseleave=function(){r._enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1}}function T_(t,e,i,n){t[0]=i,t[1]=n,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}function A_(t){var e=this._zr=t.getZr();this._styleCoord=[0,0,0,0],T_(this._styleCoord,e,t.getWidth()/2,t.getHeight()/2),this._show=!1,this._hideTimeout}function D_(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(mr.isInstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new mr(i,e,e.ecModel))}return e}function C_(t,e){return t.dispatchAction||y(e.dispatchAction,e)}function L_(t,e,i,n,a,o,r){var s=i.getOuterSize(),l=s.width,u=s.height;return null!=o&&(t+l+o>n?t-=l+o:t+=o),null!=r&&(e+u+r>a?e-=u+r:e+=r),[t,e]}function k_(t,e,i,n,a){var o=i.getOuterSize(),r=o.width,s=o.height;return t=Math.min(t+r,n)-r,e=Math.min(e+s,a)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}function P_(t,e,i){var n=i[0],a=i[1],o=5,r=0,s=0,l=e.width,u=e.height;switch(t){case"inside":r=e.x+l/2-n/2,s=e.y+u/2-a/2;break;case"top":r=e.x+l/2-n/2,s=e.y-a-o;break;case"bottom":r=e.x+l/2-n/2,s=e.y+u+o;break;case"left":r=e.x-n-o,s=e.y+u/2-a/2;break;case"right":r=e.x+l+o,s=e.y+u/2-a/2}return[r,s]}function O_(t){return"center"===t||"middle"===t}function N_(t){ea(t,"label",["show"])}function z_(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}function E_(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}function R_(t,e,i,n,a,o){var r=[],s=vh(e,n),l=s?e.getCalculationInfo("stackResultDimension"):n,u=H_(e,l,t),h=e.indicesOfNearest(l,u)[0];r[a]=e.get(i,h),r[o]=e.get(l,h);var c=e.get(n,h),d=Ar(e.get(n,h));return d=Math.min(d,20),d>=0&&(r[o]=+r[o].toFixed(d)),[r,c]}function B_(t,e){var i=t.getData(),a=t.coordinateSystem;if(e&&!E_(e)&&!_(e.coord)&&a){var o=a.dimensions,r=V_(e,i,a,t);if(e=n(e),e.type&&YR[e.type]&&r.baseAxis&&r.valueAxis){var s=XR(o,r.baseAxis.dim),l=XR(o,r.valueAxis.dim),u=YR[e.type](i,r.baseDataDim,r.valueDataDim,s,l);e.coord=u[0],e.value=u[1]}else{for(var h=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],c=0;2>c;c++)YR[h[c]]&&(h[c]=H_(i,i.mapDimension(o[c]),h[c]));e.coord=h}}return e}function V_(t,e,i,n){var a={};return null!=t.valueIndex||null!=t.valueDim?(a.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,a.valueAxis=i.getAxis(G_(n,a.valueDataDim)),a.baseAxis=i.getOtherAxis(a.valueAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim)):(a.baseAxis=n.getBaseAxis(),a.valueAxis=i.getOtherAxis(a.baseAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim),a.valueDataDim=e.mapDimension(a.valueAxis.dim)),a}function G_(t,e){var i=t.getData(),n=i.dimensions;e=i.getDimension(e);for(var a=0;an?t.coord&&t.coord[n]:t.value}function H_(t,e,i){if("average"===i){var n=0,a=0;return t.each(e,function(t){isNaN(t)||(n+=t,a++)}),n/a}return"median"===i?t.getMedian(e):t.getDataExtent(e,!0)["max"===i?1:0]}function Z_(t,e,i){var n=e.coordinateSystem;t.each(function(a){var o,r=t.getItemModel(a),s=Mr(r.get("x"),i.getWidth()),l=Mr(r.get("y"),i.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,a));else if(n){var u=t.get(n.dimensions[0],a),h=t.get(n.dimensions[1],a);o=n.dataToPoint([u,h])}}else o=[s,l];isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),t.setItemLayout(a,o)})}function X_(t,e,i){var n;n=t?p(t&&t.dimensions,function(t){var i=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return s({name:t},i)}):[{name:"value",type:"float"}];var a=new nL(n,i),o=p(i.get("data"),x(B_,e));return t&&(o=m(o,x(F_,t))),a.initData(o,null,t?W_:function(t){return t.value}),a}function U_(t){return!isNaN(t)&&!isFinite(t)}function Y_(t,e,i,n){var a=1-t,o=n.dimensions[t];return U_(e[a])&&U_(i[a])&&e[t]===i[t]&&n.getAxis(o).containData(e[t])}function j_(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(Y_(1,i,n,t)||Y_(0,i,n,t)))return!0}return F_(t,e[0])&&F_(t,e[1])}function q_(t,e,i,n,a){var o,r=n.coordinateSystem,s=t.getItemModel(e),l=Mr(s.get("x"),a.getWidth()),u=Mr(s.get("y"),a.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)o=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=r.dimensions,c=t.get(h[0],e),d=t.get(h[1],e);o=r.dataToPoint([c,d])}if("cartesian2d"===r.type){var f=r.getAxis("x"),p=r.getAxis("y"),h=r.dimensions;U_(t.get(h[0],e))?o[0]=f.toGlobalCoord(f.getExtent()[i?0:1]):U_(t.get(h[1],e))&&(o[1]=p.toGlobalCoord(p.getExtent()[i?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];t.setItemLayout(e,o)}function K_(t,e,i){var n;n=t?p(t&&t.dimensions,function(t){var i=e.getData().getDimensionInfo(e.getData().mapDimension(t))||{};return s({name:t},i)}):[{name:"value",type:"float"}];var a=new nL(n,i),o=new nL(n,i),r=new nL([],i),l=p(i.get("data"),x(qR,e,t,i));t&&(l=m(l,x(j_,t)));var u=t?W_:function(t){return t.value};return a.initData(p(l,function(t){return t[0]}),null,u),o.initData(p(l,function(t){return t[1]}),null,u),r.initData(p(l,function(t){return t[2]})),r.hasItemOption=!0,{from:a,to:o,line:r}}function $_(t){return!isNaN(t)&&!isFinite(t)}function J_(t,e,i){var n=1-t;return $_(e[n])&&$_(i[n])}function Q_(t,e){var i=e.coord[0],n=e.coord[1];return"cartesian2d"===t.type&&i&&n&&(J_(1,i,n,t)||J_(0,i,n,t))?!0:F_(t,{coord:i,x:e.x0,y:e.y0})||F_(t,{coord:n,x:e.x1,y:e.y1})}function tb(t,e,i,n,a){var o,r=n.coordinateSystem,s=t.getItemModel(e),l=Mr(s.get(i[0]),a.getWidth()),u=Mr(s.get(i[1]),a.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)o=n.getMarkerPosition(t.getValues(i,e));else{var h=t.get(i[0],e),c=t.get(i[1],e),d=[h,c];r.clampData&&r.clampData(d,d),o=r.dataToPoint(d,!0)}if("cartesian2d"===r.type){var f=r.getAxis("x"),p=r.getAxis("y"),h=t.get(i[0],e),c=t.get(i[1],e);$_(h)?o[0]=f.toGlobalCoord(f.getExtent()["x0"===i[0]?0:1]):$_(c)&&(o[1]=p.toGlobalCoord(p.getExtent()["y0"===i[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}function eb(t,e,i){var n,a,o=["x0","y0","x1","y1"];t?(n=p(t&&t.dimensions,function(t){var i=e.getData(),n=i.getDimensionInfo(i.mapDimension(t))||{};return s({name:t},n)}),a=new nL(p(o,function(t,e){return{name:t,type:n[e%2].type}}),i)):(n=[{name:"value",type:"float"}],a=new nL(n,i));var r=p(i.get("data"),x(KR,e,t,i));t&&(r=m(r,x(Q_,t)));var l=t?function(t,e,i,n){return t.coord[Math.floor(n/2)][n%2]}:function(t){return t.value};return a.initData(r,null,l),a.hasItemOption=!0,a}function ib(t){var e=t.type,i={number:"value",time:"time"};if(i[e]&&(t.axisType=i[e],delete t.type),nb(t),ab(t,"controlPosition")){var n=t.controlStyle||(t.controlStyle={});ab(n,"position")||(n.position=t.controlPosition),"none"!==n.position||ab(n,"show")||(n.show=!1,delete n.position),delete t.controlPosition}f(t.data||[],function(t){S(t)&&!_(t)&&(!ab(t,"value")&&ab(t,"name")&&(t.value=t.name),nb(t))})}function nb(t){var e=t.itemStyle||(t.itemStyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},a=n.normal||(n.normal={}),o={normal:1,emphasis:1};f(n,function(t,e){o[e]||ab(a,e)||(a[e]=t)}),i.label&&!ab(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function ab(t,e){return t.hasOwnProperty(e)}function ob(t,e){return ts(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}function rb(t,e,i,n){var a=n.style,o=cr(t.get(e),n||{},new Ti(i[0],i[1],i[2],i[3]));return a&&o.setStyle(a),o}function sb(t,e,i,n,o,r){var s=e.get("color");if(o)o.setColor(s),i.add(o),r&&r.onUpdate(o);else{var l=t.get("symbol");o=ec(l,-1,-1,2,2,s),o.setStyle("strokeNoScale",!0),i.add(o),r&&r.onCreate(o)}var u=e.getItemStyle(["color","symbol","symbolSize"]);o.setStyle(u),n=a({rectHover:!0,z2:100},n,!0);var h=t.get("symbolSize");h=h instanceof Array?h.slice():[+h,+h],h[0]/=2,h[1]/=2,n.scale=h;var c=t.get("symbolOffset");if(c){var d=n.position=n.position||[0,0];d[0]+=Mr(c[0],h[0]),d[1]+=Mr(c[1],h[1])}var f=t.get("symbolRotate");return n.rotation=(f||0)*Math.PI/180||0,o.attr(n),o.updateTransform(),o}function lb(t,e,i,n,a){if(!t.dragging){var o=n.getModel("checkpointStyle"),r=i.dataToCoord(n.getData().get(["value"],e));a||!o.get("animation",!0)?t.attr({position:[r,0]}):(t.stopAnimation(!0),t.animateTo({position:[r,0]},o.get("animationDuration",!0),o.get("animationEasing",!0)))}}function ub(t){return u(sB,t)>=0}function hb(t,e){t=t.slice();var i=p(t,jr);e=(e||[]).slice();var n=p(e,jr);return function(a,o){f(t,function(t,r){for(var s={name:t,capital:i[r]},l=0;l=0}function a(t,n){var a=!1;return e(function(e){f(i(t,e)||[],function(t){n.records[e.name][t]&&(a=!0)})}),a}function o(t,n){n.nodes.push(t),e(function(e){f(i(t,e)||[],function(t){n.records[e.name][t]=!0})})}return function(i){function r(t){!n(t,s)&&a(t,s)&&(o(t,s),l=!0)}var s={nodes:[],records:{}};if(e(function(t){s.records[t.name]={}}),!i)return s;o(i,s);var l;do l=!1,t(r);while(l);return s}}function db(t,e,i){var n=[1/0,-1/0];return uB(i,function(t){var i=t.getData();i&&uB(i.mapDimension(e,!0),function(t){var e=i.getApproximateExtent(t);e[0]n[1]&&(n[1]=e[1])})}),n[1]0?0:0/0);var r=i.getMax(!0);return null!=r&&"dataMax"!==r&&"function"!=typeof r?e[1]=r:a&&(e[1]=o>0?o-1:0/0),i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0)),e}function pb(t,e){var i=t.getAxisModel(),n=t._percentWindow,a=t._valueWindow;if(n){var o=Cr(a,[0,500]);o=Math.min(o,20);var r=e||0===n[0]&&100===n[1];i.setRange(r?null:+a[0].toFixed(o),r?null:+a[1].toFixed(o))}}function gb(t){var e=t._minMaxSpan={},i=t._dataZoomModel,n=t._dataExtent;uB(["min","max"],function(a){var o=i.get(a+"Span"),r=i.get(a+"ValueSpan");null!=r&&(r=t.getAxisModel().axis.scale.parse(r)),null!=r?o=Sr(n[0]+r,n,[0,100],!0):null!=o&&(r=Sr(o,[0,100],n,!0)-n[0]),e[a+"Span"]=o,e[a+"ValueSpan"]=r})}function mb(t){var e={};return dB(["start","end","startValue","endValue","throttle"],function(i){t.hasOwnProperty(i)&&(e[i]=t[i])}),e}function vb(t,e){var i=t._rangePropMode,n=t.get("rangeMode");dB([["start","startValue"],["end","endValue"]],function(t,a){var o=null!=e[t[0]],r=null!=e[t[1]];o&&!r?i[a]="percent":!o&&r?i[a]="value":n?i[a]=n[a]:o&&(i[a]="percent")})}function yb(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}function xb(t){return"vertical"===t?"ns-resize":"ew-resize"}function _b(t,e){var i=Sb(t),n=e.dataZoomId,a=e.coordId;f(i,function(t){var i=t.dataZoomInfos;i[n]&&u(e.allCoordIds,a)<0&&(delete i[n],t.count--)}),Ib(i);var o=i[a];o||(o=i[a]={coordId:a,dataZoomInfos:{},count:0},o.controller=Mb(t,o),o.dispatchAction=x(Tb,t)),!o.dataZoomInfos[n]&&o.count++,o.dataZoomInfos[n]=e;var r=Ab(o.dataZoomInfos);o.controller.enable(r.controlType,r.opt),o.controller.setPointerChecker(e.containsPoint),wl(o,"dispatchAction",e.dataZoomModel.get("throttle",!0),"fixRate")}function bb(t,e){var i=Sb(t);f(i,function(t){t.controller.dispose();var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)}),Ib(i)}function wb(t){return t.type+"\x00_"+t.id}function Sb(t){var e=t.getZr();return e[CB]||(e[CB]={})}function Mb(t,e){var i=new rp(t.getZr());return f(["pan","zoom","scrollMove"],function(t){i.on(t,function(i){var n=[];f(e.dataZoomInfos,function(a){if(i.isAvailableBehavior(a.dataZoomModel.option)){var o=(a.getRange||{})[t],r=o&&o(e.controller,i);!a.dataZoomModel.get("disabled",!0)&&r&&n.push({dataZoomId:a.dataZoomId,start:r[0],end:r[1]})}}),n.length&&e.dispatchAction(n)})}),i}function Ib(t){f(t,function(e,i){e.count||(e.controller.dispose(),delete t[i])})}function Tb(t,e){t.dispatchAction({type:"dataZoom",batch:e})}function Ab(t){var e,i="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},a=!0;return f(t,function(t){var o=t.dataZoomModel,r=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;n[i+r]>n[i+e]&&(e=r),a&=o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!a}}}function Db(t){return function(e,i,n,a){var o=this._range,r=o.slice(),s=e.axisModels[0];if(s){var l=t(r,s,e,i,n,a);return Az(l,r,[0,100],"all"),this._range=r,o[0]!==r[0]||o[1]!==r[1]?r:void 0}}}function Cb(t){var e={};f(t,function(t){e[t]=1}),t.length=0,f(e,function(e,i){t.push(i)})}function Lb(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function kb(t,e,i){function a(){var t=function(){};t.prototype.__hidden=t.prototype;var e=new t;return e}var o={};return EB(e,function(e){var r=o[e]=a();EB(t[e],function(t,a){if(wO.isValidType(a)){var o={type:a,visual:t};i&&i(o,e),r[a]=new wO(o),"opacity"===a&&(o=n(o),o.type="colorAlpha",r.__hidden.__alphaForOpacity=new wO(o))}})}),o}function Pb(t,e,i){var a;f(i,function(t){e.hasOwnProperty(t)&&Lb(e[t])&&(a=!0)}),a&&f(i,function(i){e.hasOwnProperty(i)&&Lb(e[i])?t[i]=n(e[i]):delete t[i]})}function Ob(t,e,i,n,a,o){function r(t){return i.getItemVisual(h,t)}function s(t,e){i.setItemVisual(h,t,e)}function l(t,l){h=null==o?t:l;var c=i.getRawDataItem(h);if(!c||c.visualMap!==!1)for(var d=n.call(a,t),f=e[d],p=u[d],g=0,m=p.length;m>g;g++){var v=p[g];f[v]&&f[v].applyVisual(t,r,s)}}var u={};f(t,function(t){var i=wO.prepareVisualTypes(e[t]);u[t]=i});var h;null==o?i.each(l):i.each([o],l)}function Nb(t,e,i,n){function a(t,a){function r(t){return a.getItemVisual(l,t)}function s(t,e){a.setItemVisual(l,t,e)}null!=n&&(n=a.getDimension(n));for(var l;null!=(l=t.next());){var u=a.getRawDataItem(l);if(!u||u.visualMap!==!1)for(var h=null!=n?a.get(n,l,!0):l,c=i(h),d=e[c],f=o[c],p=0,g=f.length;g>p;p++){var m=f[p];d[m]&&d[m].applyVisual(h,r,s)}}}var o={};return f(t,function(t){var i=wO.prepareVisualTypes(e[t]);o[t]=i}),{progress:a}}function zb(t){var e=["x","y"],i=["width","height"];return{point:function(e,i,n){if(e){var a=n.range,o=e[t];return Eb(o,a)}},rect:function(n,a,o){if(n){var r=o.range,s=[n[e[t]],n[e[t]]+n[i[t]]];return s[1]=0)&&t(o,n,a)})}function Bb(t){return t[0]>t[1]&&t.reverse(),t}function Vb(t,e){return ca(t,e,{includeMainTypes:WB})}function Gb(t,e,i,n){var a=i.getAxis(["x","y"][t]),o=Bb(p([0,1],function(t){return e?a.coordToData(a.toLocalCoord(n[t])):a.toGlobalCoord(a.dataToCoord(n[t]))})),r=[];return r[t]=o,r[1-t]=[0/0,0/0],{values:o,xyMinMax:r}}function Fb(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function Wb(t,e){var i=Hb(t),n=Hb(e),a=[i[0]/n[0],i[1]/n[1]];return isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a}function Hb(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[0/0,0/0]}function Zb(t){t.eachComponent({mainType:"brush"},function(e){var i=e.brushTargetManager=new Rb(e.option,t);i.setInputRanges(e.areas,t)})}function Xb(t,e,i,n,a){if(a){var o=t.getZr();if(!o[$B]){o[KB]||(o[KB]=Ub);var r=wl(o,KB,i,e);r(t,n)}}}function Ub(t,e){if(!t.isDisposed()){var i=t.getZr();i[$B]=!0,t.dispatchAction({type:"brushSelect",batch:e}),i[$B]=!1}}function Yb(t,e,i,n){for(var a=0,o=e.length;o>a;a++){var r=e[a];if(t[r.brushType](n,i,r.selectors,r))return!0}}function jb(t){var e=t.brushSelector;if(w(e)){var i=[];return f(RB,function(t,n){i[n]=function(i,n,a,o){var r=n.getItemLayout(i);return t[e](r,a,o)}}),i}if(b(e)){var n={};return f(RB,function(t,i){n[i]=e}),n}return e}function qb(t,e){var i=t.option.seriesIndex;return null!=i&&"all"!==i&&(_(i)?u(i,e)<0:e!==i)}function Kb(t){var e=t.selectors={};return f(RB[t.brushType],function(i,n){e[n]=function(n){return i(n,e,t)}}),t}function $b(t){return new Ti(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}function Jb(t,e){return a({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new mr(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function Qb(t,e,i,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}function tw(t,e){eV[t]=e}function ew(t){return eV[t]}function iw(t,e,i){this.model=t,this.ecModel=e,this.api=i,this._brushType,this._brushMode}function nw(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}function aw(t,e,i,n){function a(t){return l[t]}function o(t,e){l[t]=e}for(var r=e.targetVisuals[n],s=wO.prepareVisualTypes(r),l={color:t.getData().getVisual("color")},u=0,h=s.length;h>u;u++){var c=s[u],d=r["opacity"===c?"__alphaForOpacity":c];d&&d.applyVisual(i,a,o)}return l.color}function ow(t,e,i){if(i[0]===i[1])return i.slice();for(var n=200,a=(i[1]-i[0])/n,o=i[0],r=[],s=0;n>=s&&oc;c++)h[s[1-r][c]]=u[c],h[l[c]]=2===c?i[0]:n[l[c]];var d=[["x","width",3],["y","height",0]][r],f=ts(h,o,n.padding);return l[(f.margin[d[2]]||0)+f[d[0]]+.5*f[d[1]]<.5*o[d[1]]?0:1]}function sw(t,e){return f(t||[],function(t){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),t}function lw(t,e,i,n){return new OT({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){IS(t.event)},ondragend:n})}function uw(t,e){return 0===t?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}function hw(t,e,i,n){return t?[[0,-wV(e,SV(i,0))],[IV,0],[0,wV(e,SV(n-i,0))]]:[[0,0],[5,-5],[5,5]]}function cw(t,e,i){var n=MV/2,a=t.get("hoverLinkDataSize");return a&&(n=_V(a,e,i,!0)/2),n}function dw(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function fw(t){return"vertical"===t?"ns-resize":"ew-resize"}function pw(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}function gw(t){return 0===t.indexOf("my")}function mw(t){this.model=t}function vw(t){this.model=t}function yw(t){var e={},i=[],n=[];return t.eachRawSeries(function(t){var a=t.coordinateSystem;if(!a||"cartesian2d"!==a.type&&"polar"!==a.type)i.push(t);else{var o=a.getBaseAxis();if("category"===o.type){var r=o.dim+"_"+o.index;e[r]||(e[r]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[r].series.push(t)}else i.push(t)}}),{seriesGroupByCategoryAxis:e,other:i,meta:n}}function xw(t){var e=[];return f(t,function(t){var i=t.categoryAxis,n=t.valueAxis,a=n.dim,o=[" "].concat(p(t.series,function(t){return t.name})),r=[i.model.getCategories()];f(t.series,function(t){var e=t.getRawData();r.push(t.getRawData().mapArray(e.mapDimension(a),function(t){return t}))});for(var s=[o.join(GV)],l=0;lr;r++)n[r]=arguments[r];i.push((o?o+GV:"")+n.join(GV))}),i.join("\n")}).join("\n\n"+VV+"\n\n")}function bw(t){var e=yw(t);return{value:m([xw(e.seriesGroupByCategoryAxis),_w(e.other)],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+VV+"\n\n"),meta:e.meta}}function ww(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Sw(t){var e=t.slice(0,t.indexOf("\n"));return e.indexOf(GV)>=0?!0:void 0}function Mw(t){for(var e=t.split(/\n+/g),i=ww(e.shift()).split(FV),n=[],a=p(i,function(t){return{name:t,data:[]}}),o=0;o=0;a--){var o=i[a];if(o[n])break}if(0>a){var r=t.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(r){var s=r.getPercentRange();i[0][n]={dataZoomId:n,start:s[0],end:s[1]}}}}),i.push(e)}function Lw(t){var e=Ow(t),i=e[e.length-1];e.length>1&&e.pop();var n={};return WV(i,function(t,i){for(var a=e.length-1;a>=0;a--){var t=e[a][i];if(t){n[i]=t;break}}}),n}function kw(t){t[HV]=null}function Pw(t){return Ow(t).length}function Ow(t){var e=t[HV];return e||(e=t[HV]=[{}]),e}function Nw(t,e,i){(this._brushController=new Vm(i.getZr())).on("brush",y(this._onBrush,this)).mount(),this._isZoomActive}function zw(t){var e={};return f(["xAxisIndex","yAxisIndex"],function(i){e[i]=t[i],null==e[i]&&(e[i]="all"),(e[i]===!1||"none"===e[i])&&(e[i]=[])}),e}function Ew(t,e){t.setIconStatus("back",Pw(e)>1?"emphasis":"normal")}function Rw(t,e,i,n,a){var o=i._isZoomActive;n&&"takeGlobalCursor"===n.type&&(o="dataZoomSelect"===n.key?n.dataZoomSelectActive:!1),i._isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var r=new Rb(zw(t.option),e,{include:["grid"]});i._brushController.setPanels(r.makePanelOpts(a,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"})).enableBrush(o?{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()}:!1)}function Bw(t){this.model=t}function Vw(t,e,i,n){var a=i.type,o=$V.hasOwnProperty(a)?$V[a]:bo(a),r=new o(i);e.add(r),n.set(t,r),r.__ecGraphicId=t}function Gw(t,e){var i=t&&t.parent;i&&("group"===t.type&&t.traverse(function(t){Gw(t,e)}),e.removeKey(t.__ecGraphicId),i.remove(t))}function Fw(t){return t=r({},t),f(["id","parentId","$action","hv","bounding"].concat(DA),function(e){delete t[e]}),t}function Ww(t,e){var i;return f(e,function(e){null!=t[e]&&"auto"!==t[e]&&(i=!0)}),i}function Hw(t,e){var i=t.exist;if(e.id=t.keyInfo.id,!e.type&&i&&(e.type=i.type),null==e.parentId){var n=e.parentOption;n?e.parentId=n.id:i&&(e.parentId=i.parentId)}e.parentOption=null}function Zw(t,e,i){var n=r({},i),o=t[e],s=i.$action||"merge";"merge"===s?o?(a(o,n,!0),ns(o,n,{ignoreSize:!0}),os(i,o)):t[e]=n:"replace"===s?t[e]=n:"remove"===s&&o&&(t[e]=null)}function Xw(t,e){t&&(t.hv=e.hv=[Ww(e,["left","right"]),Ww(e,["top","bottom"])],"group"===t.type&&(null==t.width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0)))}function Uw(t,e){var i=t.eventData;t.silent||t.ignore||i||(i=t.eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name}),i&&(i.info=t.info)}var Yw=2311,jw=function(){return Yw++},qw={};qw="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:e(navigator.userAgent);var Kw=qw,$w={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},Jw={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},Qw=Object.prototype.toString,tS=Array.prototype,eS=tS.forEach,iS=tS.filter,nS=tS.slice,aS=tS.map,oS=tS.reduce,rS={},sS=function(){return rS.createCanvas()};rS.createCanvas=function(){return document.createElement("canvas")};var lS,uS="__ec_primitive__";R.prototype={constructor:R,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){void 0!==e&&(t=y(t,e));for(var i in this.data)this.data.hasOwnProperty(i)&&t(this.data[i],i)},removeKey:function(t){delete this.data[t]}};var hS=(Object.freeze||Object)({$override:i,clone:n,merge:a,mergeAll:o,extend:r,defaults:s,createCanvas:sS,getContext:l,indexOf:u,inherits:h,mixin:c,isArrayLike:d,each:f,map:p,reduce:g,filter:m,find:v,bind:y,curry:x,isArray:_,isFunction:b,isString:w,isObject:S,isBuiltInObject:M,isTypedArray:I,isDom:T,eqNaN:A,retrieve:D,retrieve2:C,retrieve3:L,slice:k,normalizeCssArray:P,assert:O,trim:N,setAsPrimitive:z,isPrimitive:E,createHashMap:B,concatArray:V,noop:G}),cS="undefined"==typeof Float32Array?Array:Float32Array,dS=j,fS=q,pS=ee,gS=ie,mS=(Object.freeze||Object)({create:F,copy:W,clone:H,set:Z,add:X,scaleAndAdd:U,sub:Y,len:j,length:dS,lenSquare:q,lengthSquare:fS,mul:K,div:$,dot:J,scale:Q,normalize:te,distance:ee,dist:pS,distanceSquare:ie,distSquare:gS,negate:ne,lerp:ae,applyTransform:oe,min:re,max:se});le.prototype={constructor:le,_dragStart:function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(ue(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,a=i-this._x,o=n-this._y;this._x=i,this._y=n,e.drift(a,o,t),this.dispatchToElement(ue(e,t),"drag",t.event);var r=this.findHover(i,n,e).target,s=this._dropTarget;this._dropTarget=r,e!==r&&(s&&r!==s&&this.dispatchToElement(ue(s,t),"dragleave",t.event),r&&r!==s&&this.dispatchToElement(ue(r,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(ue(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(ue(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var vS=Array.prototype.slice,yS=function(t){this._$handlers={},this._$eventProcessor=t};yS.prototype={constructor:yS,one:function(t,e,i,n){return ce(this,t,e,i,n,!0)},on:function(t,e,i,n){return ce(this,t,e,i,n,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var i=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],a=0,o=i[t].length;o>a;a++)i[t][a].h!==e&&n.push(i[t][a]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,a=n.length;a>3&&(n=vS.call(n,1));for(var o=e.length,r=0;o>r;){var s=e[r];if(i&&i.filter&&null!=s.query&&!i.filter(t,s.query))r++;else{switch(a){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,n[1]);break;case 3:s.h.call(s.ctx,n[1],n[2]);break;default:s.h.apply(s.ctx,n)}s.one?(e.splice(r,1),o--):r++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,a=n.length;a>4&&(n=vS.call(n,1,n.length-1));for(var o=n[n.length-1],r=e.length,s=0;r>s;){var l=e[s];if(i&&i.filter&&null!=l.query&&!i.filter(t,l.query))s++;else{switch(a){case 1:l.h.call(o);break;case 2:l.h.call(o,n[1]);break;case 3:l.h.call(o,n[1],n[2]);break;default:l.h.apply(o,n)}l.one?(e.splice(s,1),r--):s++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this}};var xS=Math.log(2),_S="___zrEVENTSAVED",bS=[],wS="undefined"!=typeof window&&!!window.addEventListener,SS=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,MS=[],IS=wS?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0
+}:function(t){t.returnValue=!1,t.cancelBubble=!0},TS=function(){this._track=[]};TS.prototype={constructor:TS,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var a={points:[],touches:[],target:e,event:t},o=0,r=n.length;r>o;o++){var s=n[o],l=xe(i,s,{});a.points.push([l.zrX,l.zrY]),a.touches.push(s)}this._track.push(a)}},_recognize:function(t){for(var e in AS)if(AS.hasOwnProperty(e)){var i=AS[e](this._track,t);if(i)return i}}};var AS={pinch:function(t,e){var i=t.length;if(i){var n=(t[i-1]||{}).points,a=(t[i-2]||{}).points||n;if(a&&a.length>1&&n&&n.length>1){var o=Te(n)/Te(a);!isFinite(o)&&(o=1),e.pinchScale=o;var r=Ae(n);return e.pinchX=r[0],e.pinchY=r[1],{type:"pinch",target:t[0].target,event:e}}}}},DS="silent";Le.prototype.dispose=function(){};var CS=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],LS=function(t,e,i,n){yS.call(this),this.storage=t,this.painter=e,this.painterRoot=n,i=i||new Le,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,le.call(this),this.setHandlerProxy(i)};LS.prototype={constructor:LS,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(f(CS,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,i=t.zrY,n=Pe(this,e,i),a=this._hovered,o=a.target;o&&!o.__zr&&(a=this.findHover(a.x,a.y),o=a.target);var r=this._hovered=n?{x:e,y:i}:this.findHover(e,i),s=r.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(a,"mouseout",t),this.dispatchToElement(r,"mousemove",t),s&&s!==o&&this.dispatchToElement(r,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,i=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&!i&&this.trigger("globalout",{type:"globalout",event:t})},resize:function(){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,i){t=t||{};var n=t.target;if(!n||!n.silent){for(var a="on"+e,o=De(e,t,i);n&&(n[a]&&(o.cancelBubble=n[a].call(n,o)),n.trigger(e,o),n=n.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[a]&&t[a].call(t,o),t.trigger&&t.trigger(e,o)}))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),a={x:t,y:e},o=n.length-1;o>=0;o--){var r;if(n[o]!==i&&!n[o].ignore&&(r=ke(n[o],t,e))&&(!a.topTarget&&(a.topTarget=n[o]),r!==DS)){a.target=n[o];break}}return a},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new TS);var i=this._gestureMgr;"start"===e&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var a=n.type;t.gestureEvent=a,this.dispatchToElement({target:n.target},a,n.event)}}},f(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){LS.prototype[t]=function(e){var i,n,a=e.zrX,o=e.zrY,r=Pe(this,a,o);if("mouseup"===t&&r||(i=this.findHover(a,o),n=i.target),"mousedown"===t)this._downEl=n,this._downPoint=[e.zrX,e.zrY],this._upEl=n;else if("mouseup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||pS(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}}),c(LS,yS),c(LS,le);var kS="undefined"==typeof Float32Array?Array:Float32Array,PS=(Object.freeze||Object)({create:Oe,identity:Ne,copy:ze,mul:Ee,translate:Re,rotate:Be,scale:Ve,invert:Ge,clone:Fe}),OS=Ne,NS=5e-5,zS=function(t){t=t||{},t.position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},ES=zS.prototype;ES.transform=null,ES.needLocalTransform=function(){return We(this.rotation)||We(this.position[0])||We(this.position[1])||We(this.scale[0]-1)||We(this.scale[1]-1)};var RS=[];ES.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;if(!i&&!e)return void(n&&OS(n));n=n||Oe(),i?this.getLocalTransform(n):OS(n),e&&(i?Ee(n,t.transform,n):ze(n,t.transform)),this.transform=n;var a=this.globalScaleRatio;if(null!=a&&1!==a){this.getGlobalScale(RS);var o=RS[0]<0?-1:1,r=RS[1]<0?-1:1,s=((RS[0]-o)*a+o)/RS[0]||0,l=((RS[1]-r)*a+r)/RS[1]||0;n[0]*=s,n[1]*=s,n[2]*=l,n[3]*=l}this.invTransform=this.invTransform||Oe(),Ge(this.invTransform,n)},ES.getLocalTransform=function(t){return zS.getLocalTransform(this,t)},ES.setTransform=function(t){var e=this.transform,i=t.dpr||1;e?t.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):t.setTransform(i,0,0,i,0,0)},ES.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var BS=[],VS=Oe();ES.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=this.position,a=this.scale;We(e-1)&&(e=Math.sqrt(e)),We(i-1)&&(i=Math.sqrt(i)),t[0]<0&&(e=-e),t[3]<0&&(i=-i),n[0]=t[4],n[1]=t[5],a[0]=e,a[1]=i,this.rotation=Math.atan2(-t[1]/i,t[0]/e)}},ES.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(Ee(BS,t.invTransform,e),e=BS);var i=this.origin;i&&(i[0]||i[1])&&(VS[4]=i[0],VS[5]=i[1],Ee(BS,e,VS),BS[4]-=i[0],BS[5]-=i[1],e=BS),this.setLocalTransform(e)}},ES.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)},ES.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&oe(i,i,n),i},ES.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&oe(i,i,n),i},zS.getLocalTransform=function(t,e){e=e||[],OS(e);var i=t.origin,n=t.scale||[1,1],a=t.rotation||0,o=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),Ve(e,e,n),a&&Be(e,e,a),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=o[0],e[5]+=o[1],e};var GS={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*(-Math.pow(2,-10*(t-1))+2)},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),-(i*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/n)))},elasticOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin(2*(t-e)*Math.PI/n)+1)},elasticInOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||1>i?(i=1,e=n/4):e=n*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?-.5*i*Math.pow(2,10*(t-=1))*Math.sin(2*(t-e)*Math.PI/n):i*Math.pow(2,-10*(t-=1))*Math.sin(2*(t-e)*Math.PI/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?.5*t*t*((e+1)*t-e):.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-GS.bounceOut(1-t)},bounceOut:function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return.5>t?.5*GS.bounceIn(2*t):.5*GS.bounceOut(2*t-1)+.5}};He.prototype={constructor:He,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)return void(this._pausedTime+=e);var i=(t-this._startTime-this._pausedTime)/this._life;if(!(0>i)){i=Math.min(i,1);var n=this.easing,a="string"==typeof n?GS[n]:n,o="function"==typeof a?a(i):i;return this.fire("frame",o),1===i?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){t="on"+t,this[t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var FS=function(){this.head=null,this.tail=null,this._len=0},WS=FS.prototype;WS.insert=function(t){var e=new HS(t);return this.insertEntry(e),e},WS.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++},WS.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},WS.len=function(){return this._len},WS.clear=function(){this.head=this.tail=null,this._len=0};var HS=function(t){this.value=t,this.next,this.prev},ZS=function(t){this._list=new FS,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},XS=ZS.prototype;XS.put=function(t,e){var i=this._list,n=this._map,a=null;if(null==n[t]){var o=i.len(),r=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=i.head;i.remove(s),delete n[s.key],a=s.value,this._lastRemovedEntry=s}r?r.value=e:r=new HS(e),r.key=t,i.insertEntry(r),n[t]=r}return a},XS.get=function(t){var e=this._map[t],i=this._list;return null!=e?(e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value):void 0},XS.clear=function(){this._list.clear(),this._map={}};var US={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]},YS=new ZS(20),jS=null,qS=oi,KS=ri,$S=(Object.freeze||Object)({parse:ti,lift:ni,toHex:ai,fastLerp:oi,fastMapToColor:qS,lerp:ri,mapToColor:KS,modifyHSL:si,modifyAlpha:li,stringify:ui}),JS=Array.prototype.slice,QS=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||hi,this._setter=n||ci,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};QS.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var a=this._getter(this._target,n);if(null==a)continue;0!==t&&i[n].push({time:0,value:xi(a)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;ti;i++)t[i].call(this)},start:function(t,e){var i,n=this,a=0,o=function(){a--,a||n._doneCallback()};for(var r in this._tracks)if(this._tracks.hasOwnProperty(r)){var s=wi(this,t,o,this._tracks[r],r,e);s&&(this._clipList.push(s),a++,this.animation&&this.animation.addClip(s),i=s)}if(i){var l=i.onframe;i.onframe=function(t,e){l(t,e);for(var i=0;il;l++)s&&(s=s[r[l]]);s&&(i=s)}else i=a;if(!i)return void aM('Property "'+t+'" is not existed in element '+a.id);var c=a.animators,d=new QS(i,e);return d.during(function(){a.dirty(n)}).done(function(){c.splice(u(c,d),1)}),c.push(d),o&&o.animation.addAnimator(d),d},stopAnimation:function(t){for(var e=this.animators,i=e.length,n=0;i>n;n++)e[n].stop(t);return e.length=0,this},animateTo:function(t,e,i,n,a,o){Si(this,t,e,i,n,a,o)},animateFrom:function(t,e,i,n,a,o){Si(this,t,e,i,n,a,o,!0)}};var rM=function(t){zS.call(this,t),yS.call(this,t),oM.call(this,t),this.id=t.id||jw()};rM.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];i||(i=this[t]=[]),i[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(S(t))for(var i in t)t.hasOwnProperty(i)&&this.attrKV(i,t[i]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;in||i>s||l>o||a>u)},contain:function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new Ti(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},Ti.create=function(t){return new Ti(t.x,t.y,t.width,t.height)};var hM=function(t){t=t||{},rM.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};hM.prototype={constructor:hM,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i=0&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof hM&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,a=u(n,t);return 0>a?this:(n.splice(a,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof hM&&t.delChildrenFromStorage(i)),e&&e.refresh(),this)},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;en;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,Kw.canvasSupported&&Ni(i,zi)},_updateAndAddDisplayable:function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var n=t.clipPath;if(n){e=e?e.slice():[];for(var a=n,o=t;a;)a.parent=o,a.updateTransform(),e.push(a),o=a,a=a.clipPath}if(t.isGroup){for(var r=t._children,s=0;se;e++)this.delRoot(t[e]);else{var a=u(this._roots,t);a>=0&&(this.delFromStorage(t),this._roots.splice(a,1),t instanceof hM&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:zi};var pM={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},gM=function(t,e,i){return pM.hasOwnProperty(e)?i*=t.dpr:i},mM={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},vM=9,yM=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],xM=function(t){this.extendFrom(t,!1)};xM.prototype={constructor:xM,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){var n=this,a=i&&i.style,o=!a||t.__attrCachedBy!==mM.STYLE_BIND;t.__attrCachedBy=mM.STYLE_BIND;for(var r=0;r0},extendFrom:function(t,e){if(t)for(var i in t)!t.hasOwnProperty(i)||e!==!0&&(e===!1?this.hasOwnProperty(i):null==t[i])||(this[i]=t[i])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,i){for(var n="radial"===e.type?Ri:Ei,a=n(t,e,i),o=e.colorStops,r=0;r=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(){for(var t=this._hoverElements,e=0;ea;){var o=t[a],r=o.__from;r&&r.__zr?(a++,r.invisible||(o.transform=r.transform,o.invTransform=r.invTransform,o.__clipPaths=r.__clipPaths,this._doPaintEl(o,i,!0,n))):(t.splice(a,1),r.__hoverMir=null,e--)}i.ctx.restore()}},getHoverLayer:function(){return this.getLayer(FM)},_paintList:function(t,e,i){if(this._redrawId===i){e=e||!1,this._updateLayerStatus(t);var n=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!n){var a=this;IM(function(){a._paintList(t,e,i)})}}},_compositeManually:function(){var t=this.getLayer(WM).ctx,e=this._domRoot.width,i=this._domRoot.height;t.clearRect(0,0,e,i),this.eachBuiltinLayer(function(n){n.virtual&&t.drawImage(n.dom,0,0,e,i)})},_doPaintList:function(t,e){for(var i=[],n=0;n15)break}}o.__drawIndex=m,o.__drawIndex0&&t>n[0]){for(r=0;a-1>r&&!(n[r]t);r++);o=i[n[r]]}if(n.splice(r+1,0,t),i[t]=e,!e.virtual)if(o){var l=o.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)},eachLayer:function(t,e){var i,n,a=this._zlevelList;for(n=0;n0?HM:0),this._needsManuallyCompositing),s.__builtin__||aM("ZLevel "+l+" has been used by unkown layer "+s.id),s!==o&&(s.__used=!0,s.__startIndex!==i&&(s.__dirty=!0),s.__startIndex=i,s.__drawIndex=s.incremental?-1:i,e(i),o=s),n.__dirty&&(s.__dirty=!0,s.incremental&&s.__drawIndex<0&&(s.__drawIndex=i))}e(i),this.eachBuiltinLayer(function(t){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?a(i[t],e,!0):i[t]=e;for(var n=0;n=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;ir;r++){var s=i[r],l=s.step(t,e);l&&(a.push(l),o.push(s))}for(var r=0;n>r;)i[r]._needsRemove?(i[r]=i[n-1],i.pop(),n--):r++;n=a.length;for(var r=0;n>r;r++)o[r].fire(a[r]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){function t(){e._running&&(IM(t),!e._paused&&e._update())}var e=this;this._running=!0,IM(t)},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){e=e||{};var i=new QS(t,e.loop,e.getter,e.setter);return this.addAnimator(i),i}},c(jM,yS);var qM=300,KM=Kw.domSupported,$M=function(){var t=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],i={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=p(t,function(t){var e=t.replace("mouse","pointer");return i.hasOwnProperty(e)?e:t});return{mouse:t,touch:e,pointer:n}}(),JM={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},QM=Fn.prototype;QM.stopPropagation=QM.stopImmediatePropagation=QM.preventDefault=G;var tI={mousedown:function(t){t=we(this.dom,t),this._mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=we(this.dom,t);var e=this._mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||Un(this,!0),this.trigger("mousemove",t)},mouseup:function(t){t=we(this.dom,t),Un(this,!1),this.trigger("mouseup",t)},mouseout:function(t){t=we(this.dom,t),this._pointerCapturing&&(t.zrEventControl="no_globalout");var e=t.toElement||t.relatedTarget;t.zrIsToLocalDOM=Gn(this,e),this.trigger("mouseout",t)},touchstart:function(t){t=we(this.dom,t),Bn(t),this._lastTouchMoment=new Date,this.handler.processGesture(t,"start"),tI.mousemove.call(this,t),tI.mousedown.call(this,t)},touchmove:function(t){t=we(this.dom,t),Bn(t),this.handler.processGesture(t,"change"),tI.mousemove.call(this,t)},touchend:function(t){t=we(this.dom,t),Bn(t),this.handler.processGesture(t,"end"),tI.mouseup.call(this,t),+new Date-this._lastTouchMoment=0||n&&u(n,r)<0)){var s=e.getShallow(r);null!=s&&(a[t[o][0]]=s)}}return a}},xI=yI([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),_I={getLineStyle:function(t){var e=xI(this,t);return e.lineDash=this.getLineDash(e.lineWidth),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),i=Math.max(t,2),n=4*t;return"solid"===e||null==e?!1:"dashed"===e?[n,n]:[i,i]}},bI=yI([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),wI={getAreaStyle:function(t,e){return bI(this,t,e)}},SI=Math.pow,MI=Math.sqrt,II=1e-8,TI=1e-4,AI=MI(3),DI=1/3,CI=F(),LI=F(),kI=F(),PI=Math.min,OI=Math.max,NI=Math.sin,zI=Math.cos,EI=2*Math.PI,RI=F(),BI=F(),VI=F(),GI=[],FI=[],WI={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},HI=[],ZI=[],XI=[],UI=[],YI=Math.min,jI=Math.max,qI=Math.cos,KI=Math.sin,$I=Math.sqrt,JI=Math.abs,QI="undefined"!=typeof Float32Array,tT=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};tT.prototype={constructor:tT,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e,i){i=i||0,this._ux=JI(i/iM/t)||0,this._uy=JI(i/iM/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(WI.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var i=JI(t-this._xi)>this._ux||JI(e-this._yi)>this._uy||this._len<5;return this.addData(WI.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,a,o){return this.addData(WI.C,t,e,i,n,a,o),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,a,o):this._ctx.bezierCurveTo(t,e,i,n,a,o)),this._xi=a,this._yi=o,this},quadraticCurveTo:function(t,e,i,n){return this.addData(WI.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,a,o){return this.addData(WI.A,t,e,i,i,n,a-n,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,n,a,o),this._xi=qI(a)*i+t,this._yi=KI(a)*i+e,this},arcTo:function(t,e,i,n,a){return this._ctx&&this._ctx.arcTo(t,e,i,n,a),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(WI.R,t,e,i,n),this},closePath:function(){this.addData(WI.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,i=0;ii;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,a=0;e>a;a++)i+=t[a].len();QI&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(var a=0;e>a;a++)for(var o=t[a].data,r=0;re.length&&(this._expandData(),e=this.data);for(var i=0;io&&(o=a+o),o%=a,f-=o*h,p-=o*c;h>0&&t>=f||0>h&&f>=t||0===h&&(c>0&&e>=p||0>c&&p>=e);)n=this._dashIdx,i=r[n],f+=h*i,p+=c*i,this._dashIdx=(n+1)%g,h>0&&l>f||0>h&&f>l||c>0&&u>p||0>c&&p>u||s[n%2?"moveTo":"lineTo"](h>=0?YI(f,t):jI(f,t),c>=0?YI(p,e):jI(p,e));h=f-t,c=p-e,this._dashOffset=-$I(h*h+c*c)},_dashedBezierTo:function(t,e,i,n,a,o){var r,s,l,u,h,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,m=this._yi,v=Ta,y=0,x=this._dashIdx,_=f.length,b=0;for(0>d&&(d=c+d),d%=c,r=0;1>r;r+=.1)s=v(g,t,i,a,r+.1)-v(g,t,i,a,r),l=v(m,e,n,o,r+.1)-v(m,e,n,o,r),y+=$I(s*s+l*l);for(;_>x&&(b+=f[x],!(b>d));x++);for(r=(b-d)/y;1>=r;)u=v(g,t,i,a,r),h=v(m,e,n,o,r),x%2?p.moveTo(u,h):p.lineTo(u,h),r+=f[x]/y,x=(x+1)%_;x%2!==0&&p.lineTo(a,o),s=a-u,l=o-h,this._dashOffset=-$I(s*s+l*l)},_dashedQuadraticTo:function(t,e,i,n){var a=i,o=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,n,a,o)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,QI&&(this.data=new Float32Array(t)))},getBoundingRect:function(){HI[0]=HI[1]=XI[0]=XI[1]=Number.MAX_VALUE,ZI[0]=ZI[1]=UI[0]=UI[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,a=0,o=0;oc;){var d=s[c++];switch(1===c&&(n=s[c],a=s[c+1],e=n,i=a),d){case WI.M:e=n=s[c++],i=a=s[c++],t.moveTo(n,a);break;case WI.L:o=s[c++],r=s[c++],(JI(o-n)>l||JI(r-a)>u||c===h-1)&&(t.lineTo(o,r),n=o,a=r);break;case WI.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],a=s[c-1];break;case WI.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],a=s[c-1];break;case WI.A:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],b=g>m?g:m,w=g>m?1:g/m,S=g>m?m/g:1,M=Math.abs(g-m)>.001,I=v+y;M?(t.translate(f,p),t.rotate(x),t.scale(w,S),t.arc(0,0,b,v,I,1-_),t.scale(1/w,1/S),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,b,v,I,1-_),1===c&&(e=qI(v)*g+f,i=KI(v)*m+p),n=qI(I)*g+f,a=KI(I)*m+p;break;case WI.R:e=n=s[c],i=a=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case WI.Z:t.closePath(),n=e,a=i}}}},tT.CMD=WI;var eT=2*Math.PI,iT=2*Math.PI,nT=tT.CMD,aT=2*Math.PI,oT=1e-4,rT=[-1,-1,-1],sT=[-1,-1],lT=SM.prototype.getCanvasPattern,uT=Math.abs,hT=new tT(!0);no.prototype={constructor:no,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var i=this.style,n=this.path||hT,a=i.hasStroke(),o=i.hasFill(),r=i.fill,s=i.stroke,l=o&&!!r.colorStops,u=a&&!!s.colorStops,h=o&&!!r.image,c=a&&!!s.image;if(i.bind(t,this,e),this.setTransform(t),this.__dirty){var d;l&&(d=d||this.getBoundingRect(),this._fillGradient=i.getGradient(t,r,d)),u&&(d=d||this.getBoundingRect(),this._strokeGradient=i.getGradient(t,s,d))}l?t.fillStyle=this._fillGradient:h&&(t.fillStyle=lT.call(r,t)),u?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=lT.call(s,t));var f=i.lineDash,p=i.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();if(n.setScale(m[0],m[1],this.segmentIgnoreThreshold),this.__dirtyPath||f&&!g&&a?(n.beginPath(t),f&&!g&&(n.setLineDash(f),n.setLineDashOffset(p)),this.buildPath(n,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),o)if(null!=i.fillOpacity){var v=t.globalAlpha;t.globalAlpha=i.fillOpacity*i.opacity,n.fill(t),t.globalAlpha=v}else n.fill(t);if(f&&g&&(t.setLineDash(f),t.lineDashOffset=p),a)if(null!=i.strokeOpacity){var v=t.globalAlpha;t.globalAlpha=i.strokeOpacity*i.opacity,n.stroke(t),t.globalAlpha=v}else n.stroke(t);f&&g&&t.setLineDash([]),null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(){},createPathProxy:function(){this.path=new tT},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new tT),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var a=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){a.copy(t);var o=e.lineWidth,r=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(o=Math.max(o,this.strokeContainThreshold||4)),r>1e-10&&(a.width+=o/r,a.height+=o/r,a.x-=o/r/2,a.y-=o/r/2)}return a}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),a=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var o=this.path.data;if(a.hasStroke()){var r=a.lineWidth,s=a.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(a.hasFill()||(r=Math.max(r,this.strokeContainThreshold)),io(o,r/s,t,e)))return!0}if(a.hasFill())return eo(o,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):An.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(S(t))for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&uT(t[0]-1)>1e-10&&uT(t[3]-1)>1e-10?Math.sqrt(uT(t[0]*t[3]-t[2]*t[1])):1}},no.extend=function(t){var e=function(e){no.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var a in i)!n.hasOwnProperty(a)&&i.hasOwnProperty(a)&&(n[a]=i[a])}t.init&&t.init.call(this,e)};h(e,no);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},h(no,An);var cT=tT.CMD,dT=[[],[],[]],fT=Math.sqrt,pT=Math.atan2,gT=function(t,e){var i,n,a,o,r,s,l=t.data,u=cT.M,h=cT.C,c=cT.L,d=cT.R,f=cT.A,p=cT.Q;for(a=0,o=0;ar;r++){var s=dT[r];s[0]=l[a++],s[1]=l[a++],oe(s,s,e),l[o++]=s[0],l[o++]=s[1]}}},mT=Math.sqrt,vT=Math.sin,yT=Math.cos,xT=Math.PI,_T=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},bT=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(_T(t)*_T(e))},wT=function(t,e){return(t[0]*e[1]=11?function(){var e,i=this.__clipPaths,n=this.style;if(i)for(var a=0;ao;o++)a+=ee(t[o-1],t[o]);var r=a/2;r=i>r?i:r;for(var o=0;r>o;o++){var s,l,u,h=o/(r-1)*(e?i:i-1),c=Math.floor(h),d=h-c,f=t[c%i];e?(s=t[(c-1+i)%i],l=t[(c+1)%i],u=t[(c+2)%i]):(s=t[0===c?c:c-1],l=t[c>i-2?i-1:c+1],u=t[c>i-3?i-1:c+2]);var p=d*d,g=d*p;n.push([ho(s[0],f[0],l[0],u[0],d,p,g),ho(s[1],f[1],l[1],u[1],d,p,g)])}return n},PT=function(t,e,i,n){var a,o,r,s,l=[],u=[],h=[],c=[];if(n){r=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;f>d;d++)re(r,r,t[d]),se(s,s,t[d]);re(r,r,n[0]),se(s,s,n[1])}for(var d=0,f=t.length;f>d;d++){var p=t[d];if(i)a=t[d?d-1:f-1],o=t[(d+1)%f];else{if(0===d||d===f-1){l.push(H(t[d]));continue}a=t[d-1],o=t[d+1]}Y(u,o,a),Q(u,u,e);var g=ee(p,a),m=ee(p,o),v=g+m;0!==v&&(g/=v,m/=v),Q(h,u,-g),Q(c,u,m);var y=X([],p,h),x=X([],p,c);n&&(se(y,y,r),re(y,y,s),se(x,x,r),re(x,x,s)),l.push(y),l.push(x)}return i&&l.push(l.shift()),l},OT=no.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){co(t,e,!0)}}),NT=no.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){co(t,e,!1)}}),zT=Math.round,ET={},RT=no.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i,n,a,o;this.subPixelOptimize?(po(ET,e,this.style),i=ET.x,n=ET.y,a=ET.width,o=ET.height,ET.r=e.r,e=ET):(i=e.x,n=e.y,a=e.width,o=e.height),e.r?ln(t,e):t.rect(i,n,a,o),t.closePath()}}),BT={},VT=no.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i,n,a,o;this.subPixelOptimize?(fo(BT,e,this.style),i=BT.x1,n=BT.y1,a=BT.x2,o=BT.y2):(i=e.x1,n=e.y1,a=e.x2,o=e.y2);var r=e.percent;0!==r&&(t.moveTo(i,n),1>r&&(a=i*(1-r)+a*r,o=n*(1-r)+o*r),t.lineTo(a,o))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),GT=[],FT=no.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,a=e.x2,o=e.y2,r=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;0!==h&&(t.moveTo(i,n),null==l||null==u?(1>h&&(Ea(i,r,a,h,GT),r=GT[1],a=GT[2],Ea(n,s,o,h,GT),s=GT[1],o=GT[2]),t.quadraticCurveTo(r,s,a,o)):(1>h&&(La(i,r,l,a,h,GT),r=GT[1],l=GT[2],a=GT[3],La(n,s,u,o,h,GT),s=GT[1],u=GT[2],o=GT[3]),t.bezierCurveTo(r,s,l,u,a,o)))},pointAt:function(t){return mo(this.shape,t,!1)},tangentAt:function(t){var e=mo(this.shape,t,!0);return te(e,e)}}),WT=no.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.cx,n=e.cy,a=Math.max(e.r,0),o=e.startAngle,r=e.endAngle,s=e.clockwise,l=Math.cos(o),u=Math.sin(o);t.moveTo(l*a+i,u*a+n),t.arc(i,n,a,o,r,!s)}}),HT=no.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i"'])/g,wA={"&":"&","<":"<",">":">",'"':""","'":"'"},SA=["a","b","c","d","e","f","g"],MA=function(t,e){return"{"+t+(null==e?"":e)+"}"},IA=$i,TA=(Object.freeze||Object)({addCommas:Gr,toCamelCase:Fr,normalizeCssArray:_A,encodeHTML:Wr,formatTpl:Hr,formatTplSimple:Zr,getTooltipMarker:Xr,formatTime:Yr,capitalFirst:jr,truncateText:IA,getTextBoundingRect:qr,getTextRect:Kr,windowOpen:$r}),AA=f,DA=["left","right","top","bottom","width","height"],CA=[["width","left","right"],["height","top","bottom"]],LA=Jr,kA=(x(Jr,"vertical"),x(Jr,"horizontal"),{getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}}),PA=ha(),OA=mr.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,i,n){mr.call(this,t,e,i,n),this.uid=xr("ec_cpt_model")},init:function(t,e,i){this.mergeDefaultAndTheme(t,i)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?as(t):{},o=e.getTheme();a(t,o.get(this.mainType)),a(t,this.getDefaultOption()),i&&ns(t,n,i)},mergeOption:function(t){a(this.option,t,!0);var e=this.layoutMode;e&&ns(this.option,t,e)},optionUpdated:function(){},getDefaultOption:function(){var t=PA(this);if(!t.defaultOption){for(var e=[],i=this.constructor;i;){var n=i.prototype.defaultOption;n&&e.push(n),i=i.superClass}for(var o={},r=e.length-1;r>=0;r--)o=a(o,e[r],!0);t.defaultOption=o}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});Sa(OA,{registerWhenExtend:!0}),_r(OA),br(OA,rs),c(OA,kA);var NA="";"undefined"!=typeof navigator&&(NA=navigator.platform||"");var zA={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:NA.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},EA=ha(),RA={clearColorPalette:function(){EA(this).colorIdx=0,EA(this).colorNameMap={}},getColorFromPalette:function(t,e,i){e=e||this;var n=EA(e),a=n.colorIdx||0,o=n.colorNameMap=n.colorNameMap||{};if(o.hasOwnProperty(t))return o[t];var r=ta(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=i&&s?ss(s,i):r;if(l=l||r,l&&l.length){var u=l[a];return t&&(o[t]=u),n.colorIdx=(a+1)%l.length,u}}},BA="original",VA="arrayRows",GA="objectRows",FA="keyedColumns",WA="unknown",HA="typedArray",ZA="column",XA="row";ls.seriesDataToSource=function(t){return new ls({data:t,sourceFormat:I(t)?HA:BA,fromDataset:!1})},_a(ls);var UA={Must:1,Might:2,Not:3},YA=ha(),jA="\x00_ec_inner",qA=mr.extend({init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new mr(i),this._optionManager=n},setOption:function(t,e){O(!(jA in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):Ms.call(this,n),e=!0}if(("timeline"===t||"media"===t)&&this.restoreData(),!t||"recreate"===t||"timeline"===t){var a=i.getTimelineOption(this);a&&(this.mergeOption(a),e=!0)}if(!t||"recreate"===t||"media"===t){var o=i.getMediaOption(this,this._api);o.length&&f(o,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(t){function e(e,n){var a=ta(t[e]),s=aa(o.get(e),a);oa(s),f(s,function(t){var i=t.option;S(i)&&(t.keyInfo.mainType=e,t.keyInfo.subType=Ts(e,i,t.exist))});var l=Is(o,n);i[e]=[],o.set(e,[]),f(s,function(t,n){var a=t.exist,s=t.option;if(O(S(s)||a,"Empty component definition"),s){var u=OA.getClass(e,t.keyInfo.subType,!0);if(a&&a.constructor===u)a.name=t.keyInfo.name,a.mergeOption(s,this),a.optionUpdated(s,!1);else{var h=r({dependentModels:l,componentIndex:n},t.keyInfo);a=new u(s,this,this,h),r(a,h),a.init(s,this,this,h),a.optionUpdated(null,!0)}}else a.mergeOption({},this),a.optionUpdated({},!1);o.get(e)[n]=a,i[e][n]=a.option},this),"series"===e&&As(this,o.get("series"))}var i=this.option,o=this._componentsMap,s=[];cs(this),f(t,function(t,e){null!=t&&(OA.hasClass(e)?e&&s.push(e):i[e]=null==i[e]?n(t):a(i[e],t,!0))}),OA.topologicalTravel(s,OA.getAllClassMainTypes(),e,this),this._seriesIndicesMap=B(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var t=n(this.option);return f(t,function(e,i){if(OA.hasClass(i)){for(var e=ta(e),n=e.length-1;n>=0;n--)sa(e[n])&&e.splice(n,1);t[i]=e}}),delete t[jA],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap.get(t);return i?i[e||0]:void 0},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i=t.index,n=t.id,a=t.name,o=this._componentsMap.get(e);if(!o||!o.length)return[];var r;if(null!=i)_(i)||(i=[i]),r=m(p(i,function(t){return o[t]}),function(t){return!!t});else if(null!=n){var s=_(n);r=m(o,function(t){return s&&u(n,t.id)>=0||!s&&t.id===n})}else if(null!=a){var l=_(a);r=m(o,function(t){return l&&u(a,t.name)>=0||!l&&t.name===a})}else r=o.slice();return Ds(r,t)},findComponents:function(t){function e(t){var e=a+"Index",i=a+"Id",n=a+"Name";return!t||null==t[e]&&null==t[i]&&null==t[n]?null:{mainType:a,index:t[e],id:t[i],name:t[n]}}function i(e){return t.filter?m(e,t.filter):e}var n=t.query,a=t.mainType,o=e(n),r=o?this.queryComponents(o):this._componentsMap.get(a);return i(Ds(r,t))},eachComponent:function(t,e,i){var n=this._componentsMap;if("function"==typeof t)i=e,e=t,n.each(function(t,n){f(t,function(t,a){e.call(i,n,t,a)})});else if(w(t))f(n.get(t),e,i);else if(S(t)){var a=this.findComponents(t);f(a,e,i)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return m(e,function(e){return e.name===t})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){var e=this._componentsMap.get("series");return m(e,function(e){return e.subType===t})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(t,e){f(this._seriesIndices,function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)},this)},eachRawSeries:function(t,e){f(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,i){f(this._seriesIndices,function(n){var a=this._componentsMap.get("series")[n];a.subType===t&&e.call(i,a,n)},this)},eachRawSeriesByType:function(t,e,i){return f(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){var i=m(this._componentsMap.get("series"),t,e);As(this,i)},restoreData:function(t){var e=this._componentsMap;As(this,e.get("series"));var i=[];e.each(function(t,e){i.push(e)}),OA.topologicalTravel(i,OA.getAllClassMainTypes(),function(i){f(e.get(i),function(e){("series"!==i||!ws(e,t))&&e.restoreData()})})}});c(qA,RA);var KA=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"],$A={};Ls.prototype={constructor:Ls,create:function(t,e){var i=[];f($A,function(n){var a=n.create(t,e);i=i.concat(a||[])}),this._coordinateSystems=i},update:function(t,e){f(this._coordinateSystems,function(i){i.update&&i.update(t,e)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},Ls.register=function(t,e){$A[t]=e},Ls.get=function(t){return $A[t]};var JA=f,QA=n,tD=p,eD=a,iD=/^(min|max)?(.+)$/;ks.prototype={constructor:ks,setOption:function(t,e){t&&f(ta(t.series),function(t){t&&t.data&&I(t.data)&&z(t.data)}),t=QA(t);var i=this._optionBackup,n=Ps.call(this,t,e,!i);this._newBaseOption=n.baseOption,i?(Es(i.baseOption,n.baseOption),n.timelineOptions.length&&(i.timelineOptions=n.timelineOptions),n.mediaList.length&&(i.mediaList=n.mediaList),n.mediaDefault&&(i.mediaDefault=n.mediaDefault)):this._optionBackup=n},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=tD(e.timelineOptions,QA),this._mediaList=tD(e.mediaList,QA),this._mediaDefault=QA(e.mediaDefault),this._currentMediaIndices=[],QA(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=QA(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(){var t=this._api.getWidth(),e=this._api.getHeight(),i=this._mediaList,n=this._mediaDefault,a=[],o=[];if(!i.length&&!n)return o;for(var r=0,s=i.length;s>r;r++)Os(i[r].query,t,e)&&a.push(r);return!a.length&&n&&(a=[-1]),a.length&&!zs(a,this._currentMediaIndices)&&(o=tD(a,function(t){return QA(-1===t?n.option:i[t].option)})),this._currentMediaIndices=a,o}};var nD=f,aD=S,oD=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"],rD=function(t,e){nD(Hs(t.series),function(t){aD(t)&&Ws(t)});var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),nD(i,function(e){nD(Hs(t[e]),function(t){t&&(Gs(t,"axisLabel"),Gs(t.axisPointer,"label"))})}),nD(Hs(t.parallel),function(t){var e=t&&t.parallelAxisDefault;Gs(e,"axisLabel"),Gs(e&&e.axisPointer,"label")}),nD(Hs(t.calendar),function(t){Bs(t,"itemStyle"),Gs(t,"dayLabel"),Gs(t,"monthLabel"),Gs(t,"yearLabel")}),nD(Hs(t.radar),function(t){Gs(t,"name")}),nD(Hs(t.geo),function(t){aD(t)&&(Fs(t),nD(Hs(t.regions),function(t){Fs(t)}))}),nD(Hs(t.timeline),function(t){Fs(t),Bs(t,"label"),Bs(t,"itemStyle"),Bs(t,"controlStyle",!0);var e=t.data;_(e)&&f(e,function(t){S(t)&&(Bs(t,"label"),Bs(t,"itemStyle"))})}),nD(Hs(t.toolbox),function(t){Bs(t,"iconStyle"),nD(t.feature,function(t){Bs(t,"iconStyle")})}),Gs(Zs(t.axisPointer),"label"),Gs(Zs(t.tooltip).axisPointer,"label")},sD=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],lD=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],uD=function(t,e){rD(t,e),t.series=ta(t.series),f(t.series,function(t){if(S(t)){var e=t.type;if("line"===e)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===e||"gauge"===e)null!=t.clockWise&&(t.clockwise=t.clockWise);else if("gauge"===e){var i=Xs(t,"pointer.color");null!=i&&Us(t,"itemStyle.color",i)}Ys(t)}}),t.dataRange&&(t.visualMap=t.dataRange),f(lD,function(e){var i=t[e];i&&(_(i)||(i=[i]),f(i,function(t){Ys(t)}))})},hD=function(t){var e=B();t.eachSeries(function(t){var i=t.get("stack");if(i){var n=e.get(i)||e.set(i,[]),a=t.getData(),o={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;n.length&&a.setCalculationInfo("stackedOnSeries",n[n.length-1].seriesModel),n.push(o)}}),e.each(js)},cD=qs.prototype;cD.pure=!1,cD.persistent=!0,cD.getSource=function(){return this._source};var dD={arrayRows_column:{pure:!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:Js},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],i=this._data,n=0;n=1)&&(t=1),t}var i=this._upstream,n=t&&t.skip;if(this._dirty&&i){var a=this.context;a.data=a.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var o;this._plan&&!n&&(o=this._plan(this.context));var r=e(this._modBy),s=this._modDataCount||0,l=e(t&&t.modBy),u=t&&t.modDataCount||0;(r!==l||s!==u)&&(o="reset");var h;(this._dirty||"reset"===o)&&(this._dirty=!1,h=sl(this,n)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!n&&(h||f>d)){var p=this._progress;if(_(p))for(var g=0;gn?n++:null}function e(){var t=n%r*a+Math.ceil(n/r),e=n>=i?null:o>t?t:n;return n++,e}var i,n,a,o,r,s={reset:function(l,u,h,c){n=l,i=u,a=h,o=c,r=Math.ceil(o/a),s.next=a>1&&o>0?e:t}};return s}();vD.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},vD.unfinished=function(){return this._progress&&this._dueIndex":"",m=p+s.join(p||", ");return{renderMode:n,content:m,style:u}}function o(t){return{renderMode:n,content:Wr(Gr(t)),style:u}}var r=this;n=n||"html";var s="html"===n?"
":"\n",l="richText"===n,u={},h=0,c=this.getData(),d=c.mapDimension("defaultedTooltip",!0),p=d.length,m=this.getRawValue(t),v=_(m),y=c.getItemVisual(t,"color");S(y)&&y.colorStops&&(y=(y.colorStops[0]||{}).color),y=y||"transparent";var x=p>1||v&&!p?a(m):o(p?il(c,t,d[0]):v?m[0]:m),b=x.content,w=r.seriesIndex+"at"+h,M=Xr({color:y,type:"item",renderMode:n,markerId:w});u[w]=y,++h;var I=c.getName(t),T=this.name;ra(this)||(T=""),T=T?Wr(T)+(e?": ":s):"";var A="string"==typeof M?M:M.content,D=e?A+T+b:T+A+(I?Wr(I)+": "+b:b);return{html:D,markers:u}},isAnimationEnabled:function(){if(Kw.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,i){var n=this.ecModel,a=RA.getColorFromPalette.call(this,t,e,i);return a||(a=n.getColorFromPalette(t,e,i)),a},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});c(_D,mD),c(_D,RA);var bD=function(){this.group=new hM,this.uid=xr("viewComponent")};bD.prototype={constructor:bD,init:function(){},render:function(){},dispose:function(){},filterForExposedEvent:null};var wD=bD.prototype;wD.updateView=wD.updateLayout=wD.updateVisual=function(){},xa(bD),Sa(bD,{registerWhenExtend:!0});var SD=function(){var t=ha();return function(e){var i=t(e),n=e.pipelineContext,a=i.large,o=i.progressiveRender,r=i.large=n&&n.large,s=i.progressiveRender=n&&n.progressiveRender;return!!(a^r||o^s)&&"reset"}},MD=ha(),ID=SD();ml.prototype={type:"chart",init:function(){},render:function(){},highlight:function(t,e,i,n){yl(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){yl(t.getData(),n,"normal")},remove:function(){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};var TD=ml.prototype;TD.updateView=TD.updateLayout=TD.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},xa(ml,["dispose"]),Sa(ml,{registerWhenExtend:!0}),ml.markUpdateMethod=function(t,e){MD(t).updateMethod=e};var AD={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},DD="\x00__throttleOriginMethod",CD="\x00__throttleRate",LD="\x00__throttleType",kD={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var i=t.getData(),n=(t.visualColorAccessPath||"itemStyle.color").split("."),a=t.get(n),o=!b(a)||a instanceof ZT?null:a;(!a||o)&&(a=t.getColorFromPalette(t.name,null,e.getSeriesCount())),i.setVisual("color",a);var r=(t.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),s=t.get(r);if(i.setVisual("borderColor",s),!e.isSeriesFiltered(t)){o&&i.each(function(e){i.setItemVisual(e,"color",o(t.getDataParams(e)))});var l=function(t,e){var i=t.getItemModel(e),a=i.get(n,!0),o=i.get(r,!0);null!=a&&t.setItemVisual(e,"color",a),null!=o&&t.setItemVisual(e,"borderColor",o)};return{dataEach:i.hasItemOption?l:null}}}},PD={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:""}}}},OD=function(t,e){function i(t,e){if("string"!=typeof t)return t;var i=t;return f(e,function(t,e){i=i.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),i}function n(t){var e=r.get(t);if(null==e){for(var i=t.split("."),n=PD.aria,a=0;as)){var d=a();l=d?i(n("general.withTitle"),{title:d}):n("general.withoutTitle");var p=[],g=s>1?"series.multiple.prefix":"series.single.prefix";l+=i(n(g),{seriesCount:s}),e.eachSeries(function(t,e){if(c>e){var a,r=t.get("name"),l="series."+(s>1?"multiple":"single")+".";a=n(r?l+"withName":l+"withoutName"),a=i(a,{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:o(t.subType)});var h=t.getData();window.data=h,a+=h.count()>u?i(n("data.partialData"),{displayCnt:u}):n("data.allData");for(var d=[],f=0;ff){var g=h.getName(f),m=il(h,f);d.push(i(n(g?"data.withName":"data.withoutName"),{name:g,value:m}))}a+=d.join(n("data.separator.middle"))+n("data.separator.end"),p.push(a)}}),l+=p.join(n("series.multiple.separator.middle"))+n("series.multiple.separator.end"),t.setAttribute("aria-label",l)}}},ND=Math.PI,zD=function(t,e){e=e||{},s(e,{text:"loading",textColor:"#000",fontSize:"12px",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#c23531",spinnerRadius:10,lineWidth:5,zlevel:0});
+var i=new hM,n=new RT({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});i.add(n);var a=e.fontSize+" sans-serif",o=new RT({style:{fill:"none",text:e.text,font:a,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});if(i.add(o),e.showSpinner){var r=new WT({shape:{startAngle:-ND/2,endAngle:-ND/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001});r.animateShape(!0).when(1e3,{endAngle:3*ND/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*ND/2}).delay(300).start("circularInOut"),i.add(r)}return i.resize=function(){var i=Zi(e.text,a),s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&i?10:0)-i)/2-(e.showSpinner?0:i/2),u=t.getHeight()/2;e.showSpinner&&r.setShape({cx:l,cy:u}),o.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),n.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},i.resize(),i},ED=Ml.prototype;ED.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},ED.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context,a=!e&&i.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>i.blockIndex,o=a?i.step:null,r=n&&n.modDataCount,s=null!=r?Math.ceil(r/o):null;return{step:o,modBy:s,modDataCount:r}}},ED.getPipeline=function(t){return this._pipelineMap.get(t)},ED.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData(),a=n.count(),o=i.progressiveEnabled&&e.incrementalPrepareRender&&a>=i.threshold,r=t.get("large")&&a>=t.get("largeThreshold"),s="mod"===t.get("progressiveChunkMode")?a:null;t.pipelineContext=i.context={progressiveRender:o,modDataCount:s,large:r}},ED.restorePipelines=function(t){var e=this,i=e._pipelineMap=B();t.eachSeries(function(t){var n=t.getProgressive(),a=t.uid;i.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:n&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(n||700),count:0}),El(e,t,t.dataTask)})},ED.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.ecInstance.getModel(),i=this.api;f(this._allHandlers,function(n){var a=t.get(n.uid)||t.set(n.uid,[]);n.reset&&Tl(this,n,a,e,i),n.overallReset&&Al(this,n,a,e,i)},this)},ED.prepareView=function(t,e,i,n){var a=t.renderTask,o=a.context;o.model=e,o.ecModel=i,o.api=n,a.__block=!t.incrementalPrepareRender,El(this,e,a)},ED.performDataProcessorTasks=function(t,e){Il(this,this._dataProcessorHandlers,t,e,{block:!0})},ED.performVisualTasks=function(t,e,i){Il(this,this._visualHandlers,t,e,i)},ED.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},ED.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)})};var RD=ED.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},BD=Nl(0);Ml.wrapStageHandler=function(t,e){return b(t)&&(t={overallReset:t,seriesType:Rl(t)}),t.uid=xr("stageHandler"),e&&(t.visualType=e),t};var VD,GD={},FD={};Bl(GD,qA),Bl(FD,Cs),GD.eachSeriesByType=GD.eachRawSeriesByType=function(t){VD=t},GD.eachComponent=function(t){"series"===t.mainType&&t.subType&&(VD=t.subType)};var WD=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],HD={color:WD,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],WD]},ZD="#eee",XD=function(){return{axisLine:{lineStyle:{color:ZD}},axisTick:{lineStyle:{color:ZD}},axisLabel:{textStyle:{color:ZD}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:ZD}}}},UD=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],YD={color:UD,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:ZD},crossStyle:{color:ZD},label:{color:"#000"}}},legend:{textStyle:{color:ZD}},textStyle:{color:ZD},title:{textStyle:{color:ZD}},toolbox:{iconStyle:{normal:{borderColor:ZD}}},dataZoom:{textStyle:{color:ZD}},visualMap:{textStyle:{color:ZD}},timeline:{lineStyle:{color:ZD},itemStyle:{normal:{color:UD[1]}},label:{normal:{textStyle:{color:ZD}}},controlStyle:{normal:{color:ZD,borderColor:ZD}}},timeAxis:XD(),logAxis:XD(),valueAxis:XD(),categoryAxis:XD(),line:{symbol:"circle"},graph:{color:UD},gauge:{title:{textStyle:{color:ZD}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};YD.categoryAxis.splitLine.show=!1,OA.extend({type:"dataset",defaultOption:{seriesLayoutBy:ZA,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){us(this)}}),bD.extend({type:"dataset"});var jD=no.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var i=.5522848,n=e.cx,a=e.cy,o=e.rx,r=e.ry,s=o*i,l=r*i;t.moveTo(n-o,a),t.bezierCurveTo(n-o,a-l,n-s,a-r,n,a-r),t.bezierCurveTo(n+s,a-r,n+o,a-l,n+o,a),t.bezierCurveTo(n+o,a+l,n+s,a+r,n,a+r),t.bezierCurveTo(n-s,a+r,n-o,a+l,n-o,a),t.closePath()}}),qD=/[\s,]+/;Gl.prototype.parse=function(t,e){e=e||{};var i=Vl(t);if(!i)throw new Error("Illegal svg");var n=new hM;this._root=n;var a=i.getAttribute("viewBox")||"",o=parseFloat(i.getAttribute("width")||e.width),r=parseFloat(i.getAttribute("height")||e.height);isNaN(o)&&(o=null),isNaN(r)&&(r=null),Zl(i,n,null,!0);for(var s=i.firstChild;s;)this._parseNode(s,n),s=s.nextSibling;var l,u;if(a){var h=N(a).split(qD);h.length>=4&&(l={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(l&&null!=o&&null!=r&&(u=jl(l,o,r),!e.ignoreViewBox)){var c=n;n=new hM,n.add(c),c.scale=u.scale.slice(),c.position=u.position.slice()}return e.ignoreRootClip||null==o||null==r||n.setClipPath(new RT({shape:{x:0,y:0,width:o,height:r}})),{root:n,width:o,height:r,viewBoxRect:l,viewBoxTransform:u}},Gl.prototype._parseNode=function(t,e){var i=t.nodeName.toLowerCase();"defs"===i?this._isDefine=!0:"text"===i&&(this._isText=!0);var n;if(this._isDefine){var a=$D[i];if(a){var o=a.call(this,t),r=t.getAttribute("id");r&&(this._defs[r]=o)}}else{var a=KD[i];a&&(n=a.call(this,t,e),e.add(n))}for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===i?this._isDefine=!1:"text"===i&&(this._isText=!1)},Gl.prototype._parseText=function(t,e){if(1===t.nodeType){var i=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0;this._textX+=parseFloat(i),this._textY+=parseFloat(n)}var a=new IT({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});Wl(e,a),Zl(t,a,this._defs);var o=a.style.fontSize;o&&9>o&&(a.style.fontSize=9,a.scale=a.scale||[1,1],a.scale[0]*=o/9,a.scale[1]*=o/9);var r=a.getBoundingRect();return this._textX+=r.width,e.add(a),a};var KD={g:function(t,e){var i=new hM;return Wl(e,i),Zl(t,i,this._defs),i},rect:function(t,e){var i=new RT;return Wl(e,i),Zl(t,i,this._defs),i.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)}),i},circle:function(t,e){var i=new TT;return Wl(e,i),Zl(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),i},line:function(t,e){var i=new VT;return Wl(e,i),Zl(t,i,this._defs),i.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)}),i},ellipse:function(t,e){var i=new jD;return Wl(e,i),Zl(t,i,this._defs),i.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)}),i},polygon:function(t,e){var i=t.getAttribute("points");i&&(i=Hl(i));var n=new OT({shape:{points:i||[]}});return Wl(e,n),Zl(t,n,this._defs),n},polyline:function(t,e){var i=new no;Wl(e,i),Zl(t,i,this._defs);var n=t.getAttribute("points");n&&(n=Hl(n));var a=new NT({shape:{points:n||[]}});return a},image:function(t,e){var i=new Dn;return Wl(e,i),Zl(t,i,this._defs),i.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),i},text:function(t,e){var i=t.getAttribute("x")||0,n=t.getAttribute("y")||0,a=t.getAttribute("dx")||0,o=t.getAttribute("dy")||0;this._textX=parseFloat(i)+parseFloat(a),this._textY=parseFloat(n)+parseFloat(o);var r=new hM;return Wl(e,r),Zl(t,r,this._defs),r},tspan:function(t,e){var i=t.getAttribute("x"),n=t.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=n&&(this._textY=parseFloat(n));var a=t.getAttribute("dx")||0,o=t.getAttribute("dy")||0,r=new hM;return Wl(e,r),Zl(t,r,this._defs),this._textX+=a,this._textY+=o,r},path:function(t,e){var i=t.getAttribute("d")||"",n=so(i);return Wl(e,n),Zl(t,n,this._defs),n}},$D={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),i=parseInt(t.getAttribute("y1")||0,10),n=parseInt(t.getAttribute("x2")||10,10),a=parseInt(t.getAttribute("y2")||0,10),o=new XT(e,i,n,a);return Fl(t,o),o},radialgradient:function(){}},JD={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-align":"textAlign","alignment-baseline":"textBaseline"},QD=/url\(\s*#(.*?)\)/,tC=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,eC=/([^\s:;]+)\s*:\s*([^:;]+)/g,iC=B(),nC={registerMap:function(t,e,i){var n;return _(e)?n=e:e.svg?n=[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(i=e.specialAreas,e=e.geoJson),n=[{type:"geoJSON",source:e,specialAreas:i}]),f(n,function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON");var i=aC[e];i(t)}),iC.set(t,n)},retrieveMap:function(t){return iC.get(t)}},aC={geoJSON:function(t){var e=t.source;t.geoJSON=w(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=Vl(t.source)}},oC=O,rC=f,sC=b,lC=S,uC=OA.parseClassType,hC="4.9.0",cC={zrender:"4.3.2"},dC=1,fC=1e3,pC=800,gC=900,mC=5e3,vC=1e3,yC=1100,xC=2e3,_C=3e3,bC=3500,wC=4e3,SC=5e3,MC={PROCESSOR:{FILTER:fC,SERIES_FILTER:pC,STATISTIC:mC},VISUAL:{LAYOUT:vC,PROGRESSIVE_LAYOUT:yC,GLOBAL:xC,CHART:_C,POST_CHART_LAYOUT:bC,COMPONENT:wC,BRUSH:SC}},IC="__flagInMainProcess",TC="__optionUpdated",AC=/^[a-zA-Z0-9_]+$/;$l.prototype.on=Kl("on",!0),$l.prototype.off=Kl("off",!0),$l.prototype.one=Kl("one",!0),c($l,yS);var DC=Jl.prototype;DC._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[TC]){var e=this[TC].silent;this[IC]=!0,tu(this),CC.update.call(this),this[IC]=!1,this[TC]=!1,au.call(this,e),ou.call(this,e)}else if(t.unfinished){var i=dC,n=this._model,a=this._api;t.unfinished=!1;do{var o=+new Date;t.performSeriesTasks(n),t.performDataProcessorTasks(n),iu(this,n),t.performVisualTasks(n),cu(this,this._model,a,"remain"),i-=+new Date-o}while(i>0&&t.unfinished);t.unfinished||this._zr.flush()}}},DC.getDom=function(){return this._dom},DC.getZr=function(){return this._zr},DC.setOption=function(t,e,i){if(!this._disposed){var n;if(lC(e)&&(i=e.lazyUpdate,n=e.silent,e=e.notMerge),this[IC]=!0,!this._model||e){var a=new ks(this._api),o=this._theme,r=this._model=new qA;r.scheduler=this._scheduler,r.init(null,null,o,a)}this._model.setOption(t,NC),i?(this[TC]={silent:n},this[IC]=!1):(tu(this),CC.update.call(this),this._zr.flush(),this[TC]=!1,this[IC]=!1,au.call(this,n),ou.call(this,n))}},DC.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},DC.getModel=function(){return this._model},DC.getOption=function(){return this._model&&this._model.getOption()},DC.getWidth=function(){return this._zr.getWidth()},DC.getHeight=function(){return this._zr.getHeight()},DC.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},DC.getRenderedCanvas=function(t){if(Kw.canvasSupported){t=t||{},t.pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor");var e=this._zr;return e.painter.getRenderedCanvas(t)}},DC.getSvgDataURL=function(){if(Kw.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return f(e,function(t){t.stopAnimation(!0)}),t.painter.toDataURL()}},DC.getDataURL=function(t){if(!this._disposed){t=t||{};var e=t.excludeComponents,i=this._model,n=[],a=this;rC(e,function(t){i.eachComponent({mainType:t},function(t){var e=a._componentsMap[t.__viewId];e.group.ignore||(n.push(e),e.group.ignore=!0)})});var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return rC(n,function(t){t.group.ignore=!1}),o}},DC.getConnectedDataURL=function(t){if(!this._disposed&&Kw.canvasSupported){var e="svg"===t.type,i=this.group,a=Math.min,o=Math.max,r=1/0;if(GC[i]){var s=r,l=r,u=-r,h=-r,c=[],d=t&&t.pixelRatio||1;f(VC,function(r){if(r.group===i){var d=e?r.getZr().painter.getSvgDom().innerHTML:r.getRenderedCanvas(n(t)),f=r.getDom().getBoundingClientRect();s=a(f.left,s),l=a(f.top,l),u=o(f.right,u),h=o(f.bottom,h),c.push({dom:d,left:f.left,top:f.top})}}),s*=d,l*=d,u*=d,h*=d;var p=u-s,g=h-l,m=sS(),v=qn(m,{renderer:e?"svg":"canvas"});if(v.resize({width:p,height:g}),e){var y="";return rC(c,function(t){var e=t.left-s,i=t.top-l;y+=''+t.dom+""}),v.painter.getSvgRoot().innerHTML=y,t.connectedBackgroundColor&&v.painter.setBackgroundColor(t.connectedBackgroundColor),v.refreshImmediately(),v.painter.toDataURL()}return t.connectedBackgroundColor&&v.add(new RT({shape:{x:0,y:0,width:p,height:g},style:{fill:t.connectedBackgroundColor}})),rC(c,function(t){var e=new Dn({style:{x:t.left*d-s,y:t.top*d-l,image:t.dom}});v.add(e)}),v.refreshImmediately(),m.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},DC.convertToPixel=x(Ql,"convertToPixel"),DC.convertFromPixel=x(Ql,"convertFromPixel"),DC.containPixel=function(t,e){if(!this._disposed){var i,n=this._model;return t=ca(n,t),f(t,function(t,n){n.indexOf("Models")>=0&&f(t,function(t){var a=t.coordinateSystem;if(a&&a.containPoint)i|=!!a.containPoint(e);else if("seriesModels"===n){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(i|=o.containPoint(e,t))}},this)},this),!!i}},DC.getVisual=function(t,e){var i=this._model;t=ca(i,t,{defaultMainType:"series"});var n=t.seriesModel,a=n.getData(),o=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?a.indexOfRawIndex(t.dataIndex):null;return null!=o?a.getItemVisual(o,e):a.getVisual(e)},DC.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},DC.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var CC={prepareAndUpdate:function(t){tu(this),CC.update.call(this,t)},update:function(t){var e=this._model,i=this._api,n=this._zr,a=this._coordSysMgr,o=this._scheduler;if(e){o.restoreData(e,t),o.performSeriesTasks(e),a.create(e,i),o.performDataProcessorTasks(e,t),iu(this,e),a.update(e,i),lu(e),o.performVisualTasks(e,t),uu(this,e,i,t);var r=e.get("backgroundColor")||"transparent";if(Kw.canvasSupported)n.setBackgroundColor(r);else{var s=ti(r);r=ui(s,"rgb"),0===s[3]&&(r="transparent")}du(e,i)}},updateTransform:function(t){var e=this._model,i=this,n=this._api;if(e){var a=[];e.eachComponent(function(o,r){var s=i.getViewOfComponentModel(r);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(r,e,n,t);l&&l.update&&a.push(s)}else a.push(s)});var o=B();e.eachSeries(function(a){var r=i._chartsMap[a.__viewId];if(r.updateTransform){var s=r.updateTransform(a,e,n,t);s&&s.update&&o.set(a.uid,1)}else o.set(a.uid,1)}),lu(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:o}),cu(i,e,n,t,o),du(e,this._api)}},updateView:function(t){var e=this._model;e&&(ml.markUpdateMethod(t,"updateView"),lu(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),uu(this,this._model,this._api,t),du(e,this._api))},updateVisual:function(t){CC.update.call(this,t)},updateLayout:function(t){CC.update.call(this,t)}};DC.resize=function(t){if(!this._disposed){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[IC]=!0,i&&tu(this),CC.update.call(this),this[IC]=!1,au.call(this,n),ou.call(this,n)}}},DC.showLoading=function(t,e){if(!this._disposed&&(lC(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),BC[t])){var i=BC[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},DC.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},DC.makeActionFromEvent=function(t){var e=r({},t);return e.type=PC[t.type],e},DC.dispatchAction=function(t,e){if(!this._disposed&&(lC(e)||(e={silent:!!e}),kC[t.type]&&this._model)){if(this[IC])return void this._pendingActions.push(t);nu.call(this,t,e.silent),e.flush?this._zr.flush(!0):e.flush!==!1&&Kw.browser.weChat&&this._throttledZrFlush(),au.call(this,e.silent),ou.call(this,e.silent)}},DC.appendData=function(t){if(!this._disposed){var e=t.seriesIndex,i=this.getModel(),n=i.getSeriesByIndex(e);n.appendData(t),this._scheduler.unfinished=!0}},DC.on=Kl("on",!1),DC.off=Kl("off",!1),DC.one=Kl("one",!1);var LC=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];DC._initEvents=function(){rC(LC,function(t){var e=function(e){var i,n=this.getModel(),a=e.target,o="globalout"===t;if(o)i={};else if(a&&null!=a.dataIndex){var s=a.dataModel||n.getSeriesByIndex(a.seriesIndex);i=s&&s.getDataParams(a.dataIndex,a.dataType,a)||{}}else a&&a.eventData&&(i=r({},a.eventData));if(i){var l=i.componentType,u=i.componentIndex;("markLine"===l||"markPoint"===l||"markArea"===l)&&(l="series",u=i.seriesIndex);var h=l&&null!=u&&n.getComponent(l,u),c=h&&this["series"===h.mainType?"_chartsMap":"_componentsMap"][h.__viewId];i.event=e,i.type=t,this._ecEventProcessor.eventInfo={targetEl:a,packedEvent:i,model:h,view:c},this.trigger(t,i)}};e.zrEventfulCallAtLast=!0,this._zr.on(t,e,this)},this),rC(PC,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},DC.isDisposed=function(){return this._disposed},DC.clear=function(){this._disposed||this.setOption({series:[]},!0)},DC.dispose=function(){if(!this._disposed){this._disposed=!0,fa(this.getDom(),HC,"");var t=this._api,e=this._model;rC(this._componentsViews,function(i){i.dispose(e,t)}),rC(this._chartsViews,function(i){i.dispose(e,t)}),this._zr.dispose(),delete VC[this.id]}},c(Jl,yS),vu.prototype={constructor:vu,normalizeQuery:function(t){var e={},i={},n={};if(w(t)){var a=uC(t);e.mainType=a.main||null,e.subType=a.sub||null}else{var o=["Index","Name","Id"],r={name:1,dataIndex:1,dataType:1};f(t,function(t,a){for(var s=!1,l=0;l0&&h===a.length-u.length){var c=a.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}r.hasOwnProperty(a)&&(i[a]=t,s=!0),s||(n[a]=t)})}return{cptQuery:e,dataQuery:i,otherQuery:n}},filter:function(t,e){function i(t,e,i,n){return null==t[i]||e[n||i]===t[i]}var n=this.eventInfo;if(!n)return!0;var a=n.targetEl,o=n.packedEvent,r=n.model,s=n.view;if(!r||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return i(l,r,"mainType")&&i(l,r,"subType")&&i(l,r,"index","componentIndex")&&i(l,r,"name")&&i(l,r,"id")&&i(u,o,"name")&&i(u,o,"dataIndex")&&i(u,o,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,a,o))},afterTrigger:function(){this.eventInfo=null}};var kC={},PC={},OC=[],NC=[],zC=[],EC=[],RC={},BC={},VC={},GC={},FC=new Date-0,WC=new Date-0,HC="_echarts_instance_",ZC=bu;Ou(xC,kD),Tu(uD),Au(gC,hD),zu("default",zD),Cu({type:"highlight",event:"highlight",update:"highlight"},G),Cu({type:"downplay",event:"downplay",update:"downplay"},G),Iu("light",HD),Iu("dark",YD);var XC={};Zu.prototype={constructor:Zu,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t,e=this._old,i=this._new,n={},a={},o=[],r=[];for(Xu(e,n,o,"_oldKeyGetter",this),Xu(i,a,r,"_newKeyGetter",this),t=0;th;h++)this._add&&this._add(l[h]);else this._add&&this._add(l)}}}};var UC=B(["tooltip","label","itemName","itemId","seriesName"]),YC=S,jC="undefined",qC=-1,KC="e\x00\x00",$C={"float":typeof Float64Array===jC?Array:Float64Array,"int":typeof Int32Array===jC?Array:Int32Array,ordinal:Array,number:Array,time:Array},JC=typeof Uint32Array===jC?Array:Uint32Array,QC=typeof Int32Array===jC?Array:Int32Array,tL=typeof Uint16Array===jC?Array:Uint16Array,eL=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],iL=["_extent","_approximateExtent","_rawExtent"],nL=function(t,e){t=t||["x","y"];for(var i={},n=[],a={},o=0;oh;h++){var c=a[h];r[c]||(r[c]=uh()),n[c]||(n[c]=[]),th(n,this._dimensionInfos[c],i,u,l),this._chunkCount=n[c].length}for(var d=new Array(o),f=s;l>f;f++){for(var p=f-s,g=Math.floor(f/i),m=f%i,v=0;o>v;v++){var c=a[v],y=this._dimValueGetterArrayRows(t[p]||d,c,p,v);n[c][g][m]=y;var x=r[c];yx[1]&&(x[1]=y)}e&&(this._nameList[f]=e[p])}this._rawCount=this._count=l,this._extent={},eh(this)},aL._initDataFromProvider=function(t,e){if(!(t>=e)){for(var i,n=this._chunkSize,a=this._rawData,o=this._storage,r=this.dimensions,s=r.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;s>p;p++){var g=r[p];c[g]||(c[g]=uh());var m=l[g];0===m.otherDims.itemName&&(i=this._nameDimIdx=p),0===m.otherDims.itemId&&(this._idDimIdx=p),o[g]||(o[g]=[]),th(o,m,n,f,e),this._chunkCount=o[g].length}for(var v=new Array(s),y=t;e>y;y++){v=a.getItem(y,v);for(var x=Math.floor(y/n),_=y%n,b=0;s>b;b++){var g=r[b],w=o[g][x],S=this._dimValueGetter(v,g,y,b);w[_]=S;var M=c[g];SM[1]&&(M[1]=S)}if(!a.pure){var I=u[y];if(v&&null==I)if(null!=v.name)u[y]=I=v.name;else if(null!=i){var T=r[i],A=o[T][x];if(A){I=A[_];var D=l[T].ordinalMeta;D&&D.categories.length&&(I=D.categories[I])}}var C=null==v?null:v.id;null==C&&null!=I&&(d[I]=d[I]||0,C=I,d[I]>0&&(C+="__ec__"+d[I]),d[I]++),null!=C&&(h[y]=C)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=e,this._extent={},eh(this)}},aL.count=function(){return this._count},aL.getIndices=function(){var t,e=this._indices;if(e){var i=e.constructor,n=this._count;if(i===Array){t=new i(n);for(var a=0;n>a;a++)t[a]=e[a]}else t=new i(e.buffer,0,n)}else for(var i=$u(this),t=new i(this.count()),a=0;a=0&&e=0&&en;n++)i.push(this.get(t[n],e));return i},aL.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,i=0,n=e.length;n>i;i++)if(isNaN(this.get(e[i],t)))return!1;return!0},aL.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],i=uh();if(!e)return i;var n,a=this.count(),o=!this._indices;if(o)return this._rawExtent[t].slice();if(n=this._extent[t])return n.slice();n=i;for(var r=n[0],s=n[1],l=0;a>l;l++){var u=this._getFast(t,this.getRawIndex(l));r>u&&(r=u),u>s&&(s=u)}return n=[r,s],this._extent[t]=n,n},aL.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},aL.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},aL.getCalculationInfo=function(t){return this._calculationInfo[t]},aL.setCalculationInfo=function(t,e){YC(t)?r(this._calculationInfo,t):this._calculationInfo[t]=e},aL.getSum=function(t){var e=this._storage[t],i=0;if(e)for(var n=0,a=this.count();a>n;n++){var o=this.get(t,n);isNaN(o)||(i+=o)}return i},aL.getMedian=function(t){var e=[];this.each(t,function(t){isNaN(t)||e.push(t)});var i=[].concat(e).sort(function(t,e){return t-e}),n=this.count();return 0===n?0:n%2===1?i[(n-1)/2]:(i[n/2]+i[n/2-1])/2},aL.rawIndexOf=function(t,e){var i=t&&this._invertedIndicesMap[t],n=i[e];return null==n||isNaN(n)?qC:n},aL.indexOfName=function(t){for(var e=0,i=this.count();i>e;e++)if(this.getName(e)===t)return e;return-1},aL.indexOfRawIndex=function(t){if(t>=this._rawCount||0>t)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(null!=i&&i=n;){var o=(n+a)/2|0;if(e[o]t))return o;a=o-1}}return-1},aL.indicesOfNearest=function(t,e,i){var n=this._storage,a=n[t],o=[];if(!a)return o;null==i&&(i=1/0);for(var r=1/0,s=-1,l=0,u=0,h=this.count();h>u;u++){var c=e-this.get(t,u),d=Math.abs(c);i>=d&&((r>d||d===r&&c>=0&&0>s)&&(r=d,s=c,l=0),c===s&&(o[l++]=u))}return o.length=l,o},aL.getRawIndex=nh,aL.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],i=0;ir;r++)s[r]=this.get(t[r],o);s[r]=o,e.apply(i,s)}}},aL.filterSelf=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this,t=p(rh(t),this.getDimension,this);for(var a=this.count(),o=$u(this),r=new o(a),s=[],l=t.length,u=0,h=t[0],c=0;a>c;c++){var d,f=this.getRawIndex(c);if(0===l)d=e.call(i,c);else if(1===l){var g=this._getFast(h,f);d=e.call(i,g,c)}else{for(var m=0;l>m;m++)s[m]=this._getFast(h,f);s[m]=c,d=e.apply(i,s)}d&&(r[u++]=f)}return a>u&&(this._indices=r),this._count=u,this._extent={},this.getRawIndex=this._indices?ah:nh,this}},aL.selectRange=function(t){if(this._count){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);var n=e.length;if(n){var a=this.count(),o=$u(this),r=new o(a),s=0,l=e[0],u=t[l][0],h=t[l][1],c=!1;if(!this._indices){var d=0;if(1===n){for(var f=this._storage[e[0]],p=0;pv;v++){var y=g[v];(y>=u&&h>=y||isNaN(y))&&(r[s++]=d),d++}c=!0}else if(2===n){for(var f=this._storage[l],x=this._storage[e[1]],_=t[e[1]][0],b=t[e[1]][1],p=0;pv;v++){var y=g[v],S=w[v];(y>=u&&h>=y||isNaN(y))&&(S>=_&&b>=S||isNaN(S))&&(r[s++]=d),d++}c=!0}}if(!c)if(1===n)for(var v=0;a>v;v++){var M=this.getRawIndex(v),y=this._getFast(l,M);(y>=u&&h>=y||isNaN(y))&&(r[s++]=M)}else for(var v=0;a>v;v++){for(var I=!0,M=this.getRawIndex(v),p=0;n>p;p++){var T=e[p],y=this._getFast(i,M);(yt[T][1])&&(I=!1)}I&&(r[s++]=this.getRawIndex(v))}return a>s&&(this._indices=r),this._count=s,this._extent={},this.getRawIndex=this._indices?ah:nh,this}}},aL.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this;var a=[];return this.each(t,function(){a.push(e&&e.apply(this,arguments))},i),a},aL.map=function(t,e,i,n){i=i||n||this,t=p(rh(t),this.getDimension,this);var a=sh(this,t);a._indices=this._indices,a.getRawIndex=a._indices?ah:nh;for(var o=a._storage,r=[],s=this._chunkSize,l=t.length,u=this.count(),h=[],c=a._rawExtent,d=0;u>d;d++){for(var f=0;l>f;f++)h[f]=this.get(t[f],d);h[l]=d;var g=e&&e.apply(i,h);if(null!=g){"object"!=typeof g&&(r[0]=g,g=r);for(var m=this.getRawIndex(d),v=Math.floor(m/s),y=m%s,x=0;xw[1]&&(w[1]=b)}}}return a},aL.downSample=function(t,e,i,n){for(var a=sh(this,[t]),o=a._storage,r=[],s=Math.floor(1/e),l=o[t],u=this.count(),h=this._chunkSize,c=a._rawExtent[t],d=new($u(this))(u),f=0,p=0;u>p;p+=s){s>u-p&&(s=u-p,r.length=s);for(var g=0;s>g;g++){var m=this.getRawIndex(p+g),v=Math.floor(m/h),y=m%h;r[g]=l[v][y]}var x=i(r),_=this.getRawIndex(Math.min(p+n(r,x)||0,u-1)),b=Math.floor(_/h),w=_%h;l[b][w]=x,xc[1]&&(c[1]=x),d[f++]=_}return a._count=f,a._indices=d,a.getRawIndex=ah,a},aL.getItemModel=function(t){var e=this.hostModel;return new mr(this.getRawDataItem(t),e,e&&e.ecModel)},aL.diff=function(t){var e=this;return new Zu(t?t.getIndices():[],this.getIndices(),function(e){return oh(t,e)
+},function(t){return oh(e,t)})},aL.getVisual=function(t){var e=this._visual;return e&&e[t]},aL.setVisual=function(t,e){if(YC(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},aL.setLayout=function(t,e){if(YC(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},aL.getLayout=function(t){return this._layout[t]},aL.getItemLayout=function(t){return this._itemLayouts[t]},aL.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?r(this._itemLayouts[t]||{},e):e},aL.clearItemLayouts=function(){this._itemLayouts.length=0},aL.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],a=n&&n[e];return null!=a||i?a:this.getVisual(e)},aL.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},a=this.hasItemVisual;if(this._itemVisuals[t]=n,YC(e))for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o],a[o]=!0);else n[e]=i,a[e]=!0},aL.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};var oL=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};aL.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(oL,e)),this._graphicEls[t]=e},aL.getItemGraphicEl=function(t){return this._graphicEls[t]},aL.eachItemGraphicEl=function(t,e){f(this._graphicEls,function(i,n){i&&t&&t.call(e,i,n)})},aL.cloneShallow=function(t){if(!t){var e=p(this.dimensions,this.getDimensionInfo,this);t=new nL(e,this.hostModel)}if(t._storage=this._storage,Qu(t,this),this._indices){var i=this._indices.constructor;t._indices=new i(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?ah:nh,t},aL.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(k(arguments)))})},aL.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],aL.CHANGABLE_METHODS=["filterSelf","selectRange"];var rL=function(t,e){return e=e||{},hh(e.coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,encodeDefaulter:e.encodeDefaulter,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})},sL={cartesian2d:function(t,e,i,n){var a=t.getReferringComponents("xAxis")[0],o=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],i.set("x",a),i.set("y",o),gh(a)&&(n.set("x",a),e.firstCategoryDimIndex=0),gh(o)&&(n.set("y",o),null==e.firstCategoryDimIndex&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,i,n){var a=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],i.set("single",a),gh(a)&&(n.set("single",a),e.firstCategoryDimIndex=0)},polar:function(t,e,i,n){var a=t.getReferringComponents("polar")[0],o=a.findAxisModel("radiusAxis"),r=a.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],i.set("radius",o),i.set("angle",r),gh(o)&&(n.set("radius",o),e.firstCategoryDimIndex=0),gh(r)&&(n.set("angle",r),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e){e.coordSysDims=["lng","lat"]},parallel:function(t,e,i,n){var a=t.ecModel,o=a.getComponent("parallel",t.get("parallelIndex")),r=e.coordSysDims=o.dimensions.slice();f(o.parallelAxisIndex,function(t,o){var s=a.getComponent("parallelAxis",t),l=r[o];i.set(l,s),gh(s)&&null==e.firstCategoryDimIndex&&(n.set(l,s),e.firstCategoryDimIndex=o)})}};wh.prototype.parse=function(t){return t},wh.prototype.getSetting=function(t){return this._setting[t]},wh.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},wh.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},wh.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},wh.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},wh.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},wh.prototype.getExtent=function(){return this._extent.slice()},wh.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},wh.prototype.isBlank=function(){return this._isBlank},wh.prototype.setBlank=function(t){this._isBlank=t},wh.prototype.getLabel=null,xa(wh),Sa(wh,{registerWhenExtend:!0}),Sh.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&p(i,Ih);return new Sh({categories:n,needCollect:!n,deduplication:e.dedplication!==!1})};var lL=Sh.prototype;lL.getOrdinal=function(t){return Mh(this).get(t)},lL.parseAndCollect=function(t){var e,i=this._needCollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=Mh(this);return e=n.get(t),null==e&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=0/0),e};var uL=wh.prototype,hL=wh.extend({type:"ordinal",init:function(t,e){(!t||_(t))&&(t=new Sh({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),uL.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return uL.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(uL.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){return this.isBlank()?void 0:this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:G,niceExtent:G});hL.create=function(){return new hL};var cL=Ir,dL=Ir,fL=wh.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),fL.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Ah(t)},getTicks:function(t){var e=this._interval,i=this._extent,n=this._niceExtent,a=this._intervalPrecision,o=[];if(!e)return o;var r=1e4;i[0]r)return[];var l=o.length?o[o.length-1]:n[1];return i[1]>l&&o.push(t?dL(l+e,a):i[1]),o},getMinorTicks:function(t){for(var e=this.getTicks(!0),i=[],n=this.getExtent(),a=1;as;){var c=Ir(r+(s+1)*h);c>n[0]&&ca&&(a=-a,n.reverse());var o=Th(n,t,e,i);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var i=e[0];t.fixMax?e[0]-=i/2:(e[1]+=i/2,e[0]-=i/2)}else e[1]=1;var n=e[1]-e[0];isFinite(n)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var a=this._interval;t.fixMin||(e[0]=dL(Math.floor(e[0]/a)*a)),t.fixMax||(e[1]=dL(Math.ceil(e[1]/a)*a))}});fL.create=function(){return new fL};var pL="__ec_stack_",gL=.5,mL="undefined"!=typeof Float32Array?Float32Array:Array,vL={seriesType:"bar",plan:SD(),reset:function(t){function e(t,e){for(var i,d=t.count,f=new mL(2*d),p=new mL(2*d),g=new mL(d),m=[],v=[],y=0,x=0;null!=(i=t.next());)v[h]=e.get(s,i),v[1-h]=e.get(l,i),m=n.dataToPoint(v,null,m),p[y]=u?a.x+a.width:m[0],f[y++]=m[0],p[y]=u?m[1]:a.y+a.height,f[y++]=m[1],g[x++]=i;e.setLayout({largePoints:f,largeDataIndices:g,largeBackgroundPoints:p,barWidth:c,valueAxisStart:Fh(o,r,!1),backgroundStart:u?a.x:a.y,valueAxisHorizontal:u})}if(Vh(t)&&Gh(t)){var i=t.getData(),n=t.coordinateSystem,a=n.grid.getRect(),o=n.getBaseAxis(),r=n.getOtherAxis(o),s=i.mapDimension(r.dim),l=i.mapDimension(o.dim),u=r.isHorizontal(),h=u?0:1,c=Rh(zh([t]),o,t).width;return c>gL||(c=gL),{progress:e}}}},yL=fL.prototype,xL=Math.ceil,_L=Math.floor,bL=1e3,wL=60*bL,SL=60*wL,ML=24*SL,IL=function(t,e,i,n){for(;n>i;){var a=i+n>>>1;t[a][1]o&&(o=e),null!=i&&o>i&&(o=i);var r=AL.length,s=IL(AL,o,0,r),l=AL[Math.min(s,r-1)],u=l[1];if("year"===l[0]){var h=a/u,c=Er(h/t,!0);u*=c}var d=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,f=[Math.round(xL((n[0]-d)/u)*u+d),Math.round(_L((n[1]-d)/u)*u+d)];Ch(f,n),this._stepLvl=l,this._interval=u,this._niceExtent=f},parse:function(t){return+Or(t)}});f(["contain","normalize"],function(t){TL.prototype[t]=function(e){return yL[t].call(this,this.parse(e))}});var AL=[["hh:mm:ss",bL],["hh:mm:ss",5*bL],["hh:mm:ss",10*bL],["hh:mm:ss",15*bL],["hh:mm:ss",30*bL],["hh:mm\nMM-dd",wL],["hh:mm\nMM-dd",5*wL],["hh:mm\nMM-dd",10*wL],["hh:mm\nMM-dd",15*wL],["hh:mm\nMM-dd",30*wL],["hh:mm\nMM-dd",SL],["hh:mm\nMM-dd",2*SL],["hh:mm\nMM-dd",6*SL],["hh:mm\nMM-dd",12*SL],["MM-dd\nyyyy",ML],["MM-dd\nyyyy",2*ML],["MM-dd\nyyyy",3*ML],["MM-dd\nyyyy",4*ML],["MM-dd\nyyyy",5*ML],["MM-dd\nyyyy",6*ML],["week",7*ML],["MM-dd\nyyyy",10*ML],["week",14*ML],["week",21*ML],["month",31*ML],["week",42*ML],["month",62*ML],["week",70*ML],["quarter",95*ML],["month",31*ML*4],["month",31*ML*5],["half-year",380*ML/2],["month",31*ML*8],["month",31*ML*10],["year",380*ML]];TL.create=function(t){return new TL({useUTC:t.ecModel.get("useUTC")})};var DL=wh.prototype,CL=fL.prototype,LL=Dr,kL=Ir,PL=Math.floor,OL=Math.ceil,NL=Math.pow,zL=Math.log,EL=wh.extend({type:"log",base:10,$constructor:function(){wh.apply(this,arguments),this._originalScale=new fL},getTicks:function(t){var e=this._originalScale,i=this._extent,n=e.getExtent();return p(CL.getTicks.call(this,t),function(t){var a=Ir(NL(this.base,t));return a=t===i[0]&&e.__fixMin?Wh(a,n[0]):a,a=t===i[1]&&e.__fixMax?Wh(a,n[1]):a},this)},getMinorTicks:CL.getMinorTicks,getLabel:CL.getLabel,scale:function(t){return t=DL.scale.call(this,t),NL(this.base,t)},setExtent:function(t,e){var i=this.base;t=zL(t)/zL(i),e=zL(e)/zL(i),CL.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=DL.getExtent.call(this);e[0]=NL(t,e[0]),e[1]=NL(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=Wh(e[0],n[0])),i.__fixMax&&(e[1]=Wh(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=zL(t[0])/zL(e),t[1]=zL(t[1])/zL(e),DL.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(1/0===i||0>=i)){var n=Nr(i),a=t/i*n;for(.5>=a&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var o=[Ir(OL(e[0]/n)*n),Ir(PL(e[1]/n)*n)];this._interval=n,this._niceExtent=o}},niceExtent:function(t){CL.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});f(["contain","normalize"],function(t){EL.prototype[t]=function(e){return e=zL(e)/zL(this.base),DL[t].call(this,e)}}),EL.create=function(){return new EL};var RL={getMin:function(t){var e=this.option,i=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=i&&"dataMin"!==i&&"function"!=typeof i&&!A(i)&&(i=this.axis.scale.parse(i)),i},getMax:function(t){var e=this.option,i=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=i&&"dataMax"!==i&&"function"!=typeof i&&!A(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null!=t.rangeStart||null!=t.rangeEnd?!1:!t.scale},getCoordSysModel:G,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},BL=yo({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,a=e.width/2,o=e.height/2;t.moveTo(i,n-o),t.lineTo(i+a,n+o),t.lineTo(i-a,n+o),t.closePath()}}),VL=yo({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,a=e.width/2,o=e.height/2;t.moveTo(i,n-o),t.lineTo(i+a,n),t.lineTo(i,n+o),t.lineTo(i-a,n),t.closePath()}}),GL=yo({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,a=e.width/5*3,o=Math.max(a,e.height),r=a/2,s=r*r/(o-r),l=n-o+r+s,u=Math.asin(s/r),h=Math.cos(u)*r,c=Math.sin(u),d=Math.cos(u),f=.6*r,p=.7*r;t.moveTo(i-h,l+s),t.arc(i,l,r,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(i+h-c*f,l+s+d*f,i,n-p,i,n),t.bezierCurveTo(i,n-p,i-h+c*f,l+s+d*f,i-h,l+s),t.closePath()}}),FL=yo({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,a=e.x,o=e.y,r=n/3*2;t.moveTo(a,o),t.lineTo(a+r,o+i),t.lineTo(a,o+i/4*3),t.lineTo(a-r,o+i),t.lineTo(a,o),t.closePath()}}),WL={line:VT,rect:RT,roundRect:RT,square:RT,circle:TT,diamond:VL,pin:GL,arrow:FL,triangle:BL},HL={line:function(t,e,i,n,a){a.x1=t,a.y1=e+n/2,a.x2=t+i,a.y2=e+n/2},rect:function(t,e,i,n,a){a.x=t,a.y=e,a.width=i,a.height=n},roundRect:function(t,e,i,n,a){a.x=t,a.y=e,a.width=i,a.height=n,a.r=Math.min(i,n)/4},square:function(t,e,i,n,a){var o=Math.min(i,n);a.x=t,a.y=e,a.width=o,a.height=o},circle:function(t,e,i,n,a){a.cx=t+i/2,a.cy=e+n/2,a.r=Math.min(i,n)/2},diamond:function(t,e,i,n,a){a.cx=t+i/2,a.cy=e+n/2,a.width=i,a.height=n},pin:function(t,e,i,n,a){a.x=t+i/2,a.y=e+n/2,a.width=i,a.height=n},arrow:function(t,e,i,n,a){a.x=t+i/2,a.y=e+n/2,a.width=i,a.height=n},triangle:function(t,e,i,n,a){a.cx=t+i/2,a.cy=e+n/2,a.width=i,a.height=n}},ZL={};f(WL,function(t,e){ZL[e]=new t});var XL=yo({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,i){var n=Ki(t,e,i),a=this.shape;return a&&"pin"===a.symbolType&&"inside"===e.textPosition&&(n.y=i.y+.4*i.height),n},buildPath:function(t,e,i){var n=e.symbolType;if("none"!==n){var a=ZL[n];a||(n="rect",a=ZL[n]),HL[n](e.x,e.y,e.width,e.height,a.shape),a.buildPath(t,a.shape,i)}}}),UL={isDimensionStacked:vh,enableDataStack:mh,getStackedDimension:yh},YL=(Object.freeze||Object)({createList:ic,getLayoutRect:ts,dataStack:UL,createScale:nc,mixinAxisModelCommonMethods:ac,completeDimensions:hh,createDimensions:rL,createSymbol:ec}),jL=1e-8;sc.prototype={constructor:sc,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],a=[],o=[],r=this.geometries,s=0;sn;n++)if("polygon"===i[n].type){var o=i[n].exterior,r=i[n].interiors;if(rc(o,t[0],t[1])){for(var s=0;s<(r?r.length:0);s++)if(rc(r[s]))continue t;return!0}}return!1},transformTo:function(t,e,i,n){var a=this.getBoundingRect(),o=a.width/a.height;i?n||(n=i/o):i=o*n;for(var r=new Ti(t,e,i,n),s=a.calculateTransform(r),l=this.geometries,u=0;u0}),function(t){var i=t.properties,n=t.geometry,a=n.coordinates,o=[];"Polygon"===n.type&&o.push({type:"polygon",exterior:a[0],interiors:a.slice(1)}),"MultiPolygon"===n.type&&f(a,function(t){t[0]&&o.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var r=new sc(i[e||"name"],o,i.cp);return r.properties=i,r})},KL=ha(),$L=[0,1],JL=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};JL.prototype={constructor:JL,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&n>=t},containData:function(t){return this.scale.contain(t)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Cr(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&"ordinal"===n.type&&(i=i.slice(),Mc(i,n.count())),Sr(t,$L,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&(i=i.slice(),Mc(i,n.count()));var a=Sr(t,i,$L,e);return this.scale.scale(a)},pointToData:function(){},getTicksCoords:function(t){t=t||{};var e=t.tickModel||this.getTickModel(),i=cc(this,e),n=i.ticks,a=p(n,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this),o=e.get("alignWithLabel");return Ic(this,a,o,t.clamp),a},getMinorTicksCoords:function(){if("ordinal"===this.scale.type)return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&100>e||(e=5);var i=this.scale.getMinorTicks(e),n=p(i,function(t){return p(t,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this)},this);return n},getViewLabels:function(){return hc(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return _c(this)}};var QL=qL,tk={};f(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){tk[t]=hS[t]});var ek={};f(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","registerShape","getShapeClass","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(t){ek[t]=lA[t]});var ik=function(t){this._axes={},this._dimList=[],this.name=t||""};ik.prototype={constructor:ik,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return p(this._dimList,Tc,this)},getAxesByScale:function(t){return t=t.toLowerCase(),m(this.getAxes(),function(e){return e.scale.type===t})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var i=this._dimList,n=t instanceof Array?[]:{},a=0;ae[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},h(nk,JL);var ak={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},ok={};ok.categoryAxis=a({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},ak),ok.valueAxis=a({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},ak),ok.timeAxis=s({scale:!0,min:"dataMin",max:"dataMax"},ok.valueAxis),ok.logAxis=s({scale:!0,logBase:10},ok.valueAxis);var rk=["value","category","time","log"],sk=function(t,e,i,n){f(rk,function(r){e.extend({type:t+"Axis."+r,mergeDefaultAndTheme:function(e,n){var o=this.layoutMode,s=o?as(e):{},l=n.getTheme();a(e,l.get(r+"Axis")),a(e,this.getDefaultOption()),e.type=i(t,e),o&&ns(e,s,o)},optionUpdated:function(){var t=this.option;"category"===t.type&&(this.__ordinalMeta=Sh.createByAxisModel(this))},getCategories:function(t){var e=this.option;return"category"===e.type?t?e.data:this.__ordinalMeta.categories:void 0},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:o([{},ok[r+"Axis"],n],!0)})}),OA.registerSubTypeDefaulter(t+"Axis",x(i,t))},lk=OA.extend({type:"cartesian2dAxis",axis:null,init:function(){lk.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){lk.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){lk.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});a(lk.prototype,RL);var uk={offset:0};sk("x",lk,Dc,uk),sk("y",lk,Dc,uk),OA.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var hk=Lc.prototype;hk.type="grid",hk.axisPointerEnabled=!0,hk.getRect=function(){return this._rect},hk.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),f(i.x,function(t){Xh(t.scale,t.model)}),f(i.y,function(t){Xh(t.scale,t.model)});var n={};f(i.x,function(t){kc(i,"y",t,n)}),f(i.y,function(t){kc(i,"x",t,n)}),this.resize(this.model,e)},hk.resize=function(t,e,i){function n(){f(o,function(t){var e=t.isHorizontal(),i=e?[0,a.width]:[0,a.height],n=t.inverse?1:0;t.setExtent(i[n],i[1-n]),Oc(t,e?a.x:a.y)})}var a=ts(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=a;var o=this._axesList;n(),!i&&t.get("containLabel")&&(f(o,function(t){if(!t.model.get("axisLabel.inside")){var e=Kh(t);if(e){var i=t.isHorizontal()?"height":"width",n=t.model.get("axisLabel.margin");a[i]-=e[i]+n,"top"===t.position?a.y+=e.height+n:"left"===t.position&&(a.x+=e.width+n)}}}),n())},hk.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i){if(null==e)for(var n in i)if(i.hasOwnProperty(n))return i[n];return i[e]}},hk.getAxes=function(){return this._axesList.slice()},hk.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}S(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,a=this._coordsList;nt&&(t=e),t},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}}});var fk=yI([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),pk={getBarItemStyle:function(t){var e=fk(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}},gk=yo({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(t,e){var i=e.cx,n=e.cy,a=Math.max(e.r0||0,0),o=Math.max(e.r,0),r=.5*(o-a),s=a+r,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=Math.cos(l),d=Math.sin(l),f=Math.cos(u),p=Math.sin(u),g=h?u-l<2*Math.PI:l-u<2*Math.PI;g&&(t.moveTo(c*a+i,d*a+n),t.arc(c*s+i,d*s+n,r,-Math.PI+l,l,!h)),t.arc(i,n,o,l,u,!h),t.moveTo(f*o+i,p*o+n),t.arc(f*s+i,p*s+n,r,u-2*Math.PI,u-Math.PI,!h),0!==a&&(t.arc(i,n,a,u,l,h),t.moveTo(c*a+i,p*a+n)),t.closePath()}}),mk=["itemStyle","barBorderWidth"],vk=[0,0];r(mr.prototype,pk),Vu({type:"bar",render:function(t,e,i){this._updateDrawMode(t);var n=t.get("coordinateSystem");return("cartesian2d"===n||"polar"===n)&&(this._isLargeDraw?this._renderLarge(t,e,i):this._renderNormal(t,e,i)),this.group},incrementalPrepareRender:function(t){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(t){var e,i=this.group,n=t.getData(),a=this._data,o=t.coordinateSystem,r=o.getBaseAxis();"cartesian2d"===o.type?e=r.isHorizontal():"polar"===o.type&&(e="angle"===r.dim);var s=t.isAnimationEnabled()?t:null,l=t.get("clip",!0),u=Wc(o,n);i.removeClipPath();var h=t.get("roundCap",!0),c=t.get("showBackground",!0),d=t.getModel("backgroundStyle"),f=d.get("barBorderRadius")||0,p=[],g=this._backgroundEls||[],m=function(t){var i=wk[o.type](n,t),a=Qc(o,e,i);return a.useStyle(d.getBarItemStyle()),"cartesian2d"===o.type&&a.setShape("r",f),p[t]=a,a};n.diff(a).add(function(a){var r=n.getItemModel(a),d=wk[o.type](n,a,r);if(c&&m(a),n.hasValue(a)){if(l){var f=_k[o.type](u,d);if(f)return void i.remove(p)}var p=bk[o.type](a,d,e,s,!1,h);n.setItemGraphicEl(a,p),i.add(p),Uc(p,n,a,r,d,t,e,"polar"===o.type)
+}}).update(function(r,v){var y=n.getItemModel(r),x=wk[o.type](n,r,y);if(c){var _;0===g.length?_=m(v):(_=g[v],_.useStyle(d.getBarItemStyle()),"cartesian2d"===o.type&&_.setShape("r",f),p[r]=_);var b=wk[o.type](n,r),w=Jc(e,b,o);nr(_,{shape:w},s,r)}var S=a.getItemGraphicEl(v);if(!n.hasValue(r))return void i.remove(S);if(l){var M=_k[o.type](u,x);if(M)return void i.remove(S)}S?nr(S,{shape:x},s,r):S=bk[o.type](r,x,e,s,!0,h),n.setItemGraphicEl(r,S),i.add(S),Uc(S,n,r,y,x,t,e,"polar"===o.type)}).remove(function(t){var e=a.getItemGraphicEl(t);"cartesian2d"===o.type?e&&Hc(t,s,e):e&&Zc(t,s,e)}).execute();var v=this._backgroundGroup||(this._backgroundGroup=new hM);v.removeAll();for(var y=0;yi&&(e.x+=e.width,e.width=-e.width),0>n&&(e.y+=e.height,e.height=-e.height);var a=yk(e.x,t.x),o=xk(e.x+e.width,t.x+t.width),r=yk(e.y,t.y),s=xk(e.y+e.height,t.y+t.height);e.x=a,e.y=r,e.width=o-a,e.height=s-r;var l=e.width<0||e.height<0;return 0>i&&(e.x+=e.width,e.width=-e.width),0>n&&(e.y+=e.height,e.height=-e.height),l},polar:function(t,e){var i=e.r0<=e.r?1:-1;if(0>i){var n=e.r;e.r=e.r0,e.r0=n}var n=xk(e.r,t.r),a=yk(e.r0,t.r0);e.r=n,e.r0=a;var o=0>n-a;if(0>i){var n=e.r;e.r=e.r0,e.r0=n}return o}},bk={cartesian2d:function(t,e,i,n,a){var o=new RT({shape:r({},e),z2:1});if(o.name="item",n){var s=o.shape,l=i?"height":"width",u={};s[l]=0,u[l]=e[l],lA[a?"updateProps":"initProps"](o,{shape:u},n,t)}return o},polar:function(t,e,i,n,a,o){var r=e.startAngle0?1:-1,r=n.height>0?1:-1;return{x:n.x+o*a/2,y:n.y+r*a/2,width:n.width-o*a,height:n.height-r*a}},polar:function(t,e){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle}}},Sk=no.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var i=e.points,n=this.__startPoint,a=this.__baseDimIdx,o=0;o=0?i:null},30,!1),Ik=Math.PI,Tk=function(t,e){this.opt=e,this.axisModel=t,s(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new hM;var i=new hM({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};Tk.prototype={constructor:Tk,hasBuilder:function(t){return!!Ak[t]},add:function(t){Ak[t].call(this)},getGroup:function(){return this.group}};var Ak={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var i=this.axisModel.axis.getExtent(),n=this._transform,a=[i[0],0],o=[i[1],0];n&&(oe(a,a,n),oe(o,o,n));var s=r({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new VT({anid:"line",subPixelOptimize:!0,shape:{x1:a[0],y1:a[1],x2:o[0],y2:o[1]},style:s,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1}));var l=e.get("axisLine.symbol"),u=e.get("axisLine.symbolSize"),h=e.get("axisLine.symbolOffset")||0;if("number"==typeof h&&(h=[h,h]),null!=l){"string"==typeof l&&(l=[l,l]),("string"==typeof u||"number"==typeof u)&&(u=[u,u]);var c=u[0],d=u[1];f([{rotate:t.rotation+Math.PI/2,offset:h[0],r:0},{rotate:t.rotation-Math.PI/2,offset:h[1],r:Math.sqrt((a[0]-o[0])*(a[0]-o[0])+(a[1]-o[1])*(a[1]-o[1]))}],function(e,i){if("none"!==l[i]&&null!=l[i]){var n=ec(l[i],-c/2,-d/2,c,d,s.stroke,!0),o=e.r+e.offset,r=[a[0]+o*Math.cos(t.rotation),a[1]-o*Math.sin(t.rotation)];n.attr({rotation:e.rotate,position:r,silent:!0,z2:11}),this.group.add(n)}},this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,i=rd(this,t,e),n=ld(this,t,e);ed(t,n,i),sd(this,t,e)},axisName:function(){var t=this.opt,e=this.axisModel,i=D(t.axisName,e.get("name"));if(i){var n,a=e.get("nameLocation"),o=t.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=this.axisModel.axis.getExtent(),h=u[0]>u[1]?-1:1,c=["start"===a?u[0]-h*l:"end"===a?u[1]+h*l:(u[0]+u[1])/2,ad(a)?t.labelOffset+o*l:0],d=e.get("nameRotate");null!=d&&(d=d*Ik/180);var f;ad(a)?n=Ck(t.rotation,null!=d?d:t.rotation,o):(n=td(t,a,d||0,u),f=t.axisNameAvailableWidth,null!=f&&(f=Math.abs(f/Math.sin(n.rotation)),!isFinite(f)&&(f=null)));var p=s.getFont(),g=e.get("nameTruncate",!0)||{},m=g.ellipsis,v=D(t.nameTruncateMaxWidth,g.maxWidth,f),y=null!=m&&null!=v?IA(i,v,p,m,{minChar:2,placeholder:g.placeholder}):i,x=e.get("tooltip",!0),_=e.mainType,b={componentType:_,name:i,$vars:["name"]};b[_+"Index"]=e.componentIndex;var w=new IT({anid:"name",__fullText:i,__truncatedText:y,position:c,rotation:n.rotation,silent:Lk(e),z2:1,tooltip:x&&x.show?r({content:i,formatter:function(){return i},formatterParams:b},x):null});Yo(w.style,s,{text:y,textFont:p,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:s.get("align")||n.textAlign,textVerticalAlign:s.get("verticalAlign")||n.textVerticalAlign}),e.get("triggerEvent")&&(w.eventData=Dk(e),w.eventData.targetType="axisName",w.eventData.name=i),this._dumbGroup.add(w),w.updateTransform(),this.group.add(w),w.decomposeTransform()}}},Dk=Tk.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},Ck=Tk.innerTextLayout=function(t,e,i){var n,a,o=kr(e-t);return Pr(o)?(a=i>0?"top":"bottom",n="center"):Pr(o-Ik)?(a=i>0?"bottom":"top",n="center"):(a="middle",n=o>0&&Ik>o?i>0?"right":"left":i>0?"left":"right"),{rotation:o,textAlign:n,textVerticalAlign:a}},Lk=Tk.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},kk=f,Pk=x,Ok=Ru({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&gd(t),Ok.superApply(this,"render",arguments),_d(this,t,e,i,n,!0)},updateAxisPointer:function(t,e,i,n){_d(this,t,e,i,n,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),Ok.superApply(this,"remove",arguments)},dispose:function(t,e){bd(this,e),Ok.superApply(this,"dispose",arguments)}}),Nk=[];Ok.registerAxisPointerClass=function(t,e){Nk[t]=e},Ok.getAxisPointerClass=function(t){return t&&Nk[t]};var zk=["axisLine","axisTickLabel","axisName"],Ek=["splitArea","splitLine","minorSplitLine"],Rk=Ok.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,i,n){this.group.removeAll();var a=this._axisGroup;if(this._axisGroup=new hM,this.group.add(this._axisGroup),t.get("show")){var o=t.getCoordSysModel(),r=wd(o,t),s=new Tk(t,r);f(zk,s.add,s),this._axisGroup.add(s.getGroup()),f(Ek,function(e){t.get(e+".show")&&this["_"+e](t,o)},this),lr(a,this._axisGroup,t),Rk.superCall(this,"render",t,e,i,n)}},remove:function(){Md(this)},_splitLine:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitLine"),a=n.getModel("lineStyle"),o=a.get("color");o=_(o)?o:[o];for(var r=e.coordinateSystem.getRect(),l=i.isHorizontal(),u=0,h=i.getTicksCoords({tickModel:n}),c=[],d=[],f=a.getLineStyle(),p=0;p0&&Rd(i[a-1]);a--);for(;a>n&&Rd(i[n]);n++);}for(;a>n;)n+=Bd(t,i,n,a,a,1,o.min,o.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),tP=no.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:DT(no.prototype.brush),buildPath:function(t,e){var i=e.points,n=e.stackedOnPoints,a=0,o=i.length,r=e.smoothMonotone,s=Fd(i,e.smoothConstraint),l=Fd(n,e.smoothConstraint);if(e.connectNulls){for(;o>0&&Rd(i[o-1]);o--);for(;o>a&&Rd(i[a]);a++);}for(;o>a;){var u=Bd(t,i,a,o,o,1,s.min,s.max,e.smooth,r,e.connectNulls);Bd(t,n,a+u-1,u,o,-1,l.min,l.max,e.stackedOnSmooth,r,e.connectNulls),a+=u+1,t.closePath()}}});ml.extend({type:"line",init:function(){var t=new hM,e=new Cd;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,i){var n=t.coordinateSystem,a=this.group,o=t.getData(),r=t.getModel("lineStyle"),l=t.getModel("areaStyle"),u=o.mapArray(o.getItemLayout),h="polar"===n.type,c=this._coordSys,d=this._symbolDraw,f=this._polyline,p=this._polygon,g=this._lineGroup,m=t.get("animation"),v=!l.isEmpty(),y=l.get("origin"),x=Od(n,o,y),_=Xd(n,o,x),b=t.get("showSymbol"),w=b&&!h&&jd(t,o,n),S=this._data;S&&S.eachItemGraphicEl(function(t,e){t.__temp&&(a.remove(t),S.setItemGraphicEl(e,null))}),b||d.remove(),a.add(g);var M,I=!h&&t.get("step");n&&n.getArea&&t.get("clip",!0)&&(M=n.getArea(),null!=M.width?(M.x-=.1,M.y-=.1,M.width+=.2,M.height+=.2):M.r0&&(M.r0-=.5,M.r1+=.5)),this._clipShapeForSymbol=M,f&&c.type===n.type&&I===this._step?(v&&!p?p=this._newPolygon(u,_,n,m):p&&!v&&(g.remove(p),p=this._polygon=null),g.setClipPath(Kd(n,!1,t)),b&&d.updateData(o,{isIgnore:w,clipShape:M}),o.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),Wd(this._stackedOnPoints,_)&&Wd(this._points,u)||(m?this._updateAnimation(o,_,n,i,I,y):(I&&(u=Ud(u,n,I),_=Ud(_,n,I)),f.setShape({points:u}),p&&p.setShape({points:u,stackedOnPoints:_})))):(b&&d.updateData(o,{isIgnore:w,clipShape:M}),I&&(u=Ud(u,n,I),_=Ud(_,n,I)),f=this._newPolyline(u,n,m),v&&(p=this._newPolygon(u,_,n,m)),g.setClipPath(Kd(n,!0,t)));var T=Yd(o,n)||o.getVisual("color");f.useStyle(s(r.getLineStyle(),{fill:"none",stroke:T,lineJoin:"bevel"}));var A=t.get("smooth");if(A=Zd(t.get("smooth")),f.setShape({smooth:A,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),p){var D=o.getCalculationInfo("stackedOnSeries"),C=0;p.useStyle(s(l.getAreaStyle(),{fill:T,opacity:.7,lineJoin:"bevel"})),D&&(C=Zd(D.get("smooth"))),p.setShape({smooth:A,stackedOnSmooth:C,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=o,this._coordSys=n,this._stackedOnPoints=_,this._points=u,this._step=I,this._valueOrigin=y},dispose:function(){},highlight:function(t,e,i,n){var a=t.getData(),o=ua(a,n);if(!(o instanceof Array)&&null!=o&&o>=0){var r=a.getItemGraphicEl(o);if(!r){var s=a.getItemLayout(o);if(!s)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;r=new Id(a,o),r.position=s,r.setZ(t.get("zlevel"),t.get("z")),r.ignore=isNaN(s[0])||isNaN(s[1]),r.__temp=!0,a.setItemGraphicEl(o,r),r.stopSymbolAnimation(!0),this.group.add(r)}r.highlight()}else ml.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var a=t.getData(),o=ua(a,n);if(null!=o&&o>=0){var r=a.getItemGraphicEl(o);r&&(r.__temp?(a.setItemGraphicEl(o,null),this.group.remove(r)):r.downplay())}else ml.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Qk({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new tP({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_updateAnimation:function(t,e,i,n,a,o){var r=this._polyline,s=this._polygon,l=t.hostModel,u=Xk(this._data,t,this._stackedOnPoints,e,this._coordSys,i,this._valueOrigin,o),h=u.current,c=u.stackedOnCurrent,d=u.next,f=u.stackedOnNext;if(a&&(h=Ud(u.current,i,a),c=Ud(u.stackedOnCurrent,i,a),d=Ud(u.next,i,a),f=Ud(u.stackedOnNext,i,a)),Hd(h,d)>3e3||s&&Hd(c,f)>3e3)return r.setShape({points:d}),void(s&&s.setShape({points:d,stackedOnPoints:f}));r.shape.__points=u.current,r.shape.points=h,nr(r,{shape:{points:d}},l),s&&(s.setShape({points:h,stackedOnPoints:c}),nr(s,{shape:{points:d,stackedOnPoints:f}},l));for(var p=[],g=u.status,m=0;me&&(e=t[i]);return isFinite(e)?e:0/0},min:function(t){for(var e=1/0,i=0;i1){var u;"string"==typeof i?u=nP[i]:"function"==typeof i&&(u=i),u&&t.setData(e.downSample(e.mapDimension(o.dim),1/l,u,aP))}}}}};Ou(eP("line","circle","line")),Pu(iP("line")),Au(MC.PROCESSOR.STATISTIC,oP("line"));var rP=function(t,e,i){e=_(e)&&{coordDimensions:e}||r({},e);var n=t.getSource(),a=rL(n,e),o=new nL(a,t);return o.initData(n,i),o},sP={updateSelectedMap:function(t){this._targetList=_(t)?t.slice():[],this._selectTargetMap=g(t||[],function(t,e){return t.set(e.name,e),t},B())},select:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t),n=this.get("selectedMode");"single"===n&&this._selectTargetMap.each(function(t){t.selected=!1}),i&&(i.selected=!0)},unSelect:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);i&&(i.selected=!1)},toggleSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return null!=i?(this[i.selected?"unSelect":"select"](t,e),i.selected):void 0},isSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return i&&i.selected}},lP=Bu({type:"series.pie",init:function(t){lP.superApply(this,"init",arguments),this.legendVisualProvider=new $d(y(this.getData,this),y(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){lP.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(){return rP(this,{coordDimensions:["value"],encodeDefaulter:x(ys,this)})},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),i=[],n=0,a=t.count();a>n;n++)i.push({name:t.getName(n),value:t.get(e,n),selected:nl(t,n,"selected")});return i},getDataParams:function(t){var e=this.getData(),i=lP.superCall(this,"getDataParams",t),n=[];return e.each(e.mapDimension("value"),function(t){n.push(t)}),i.percent=Lr(n,t,e.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(t){ea(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:!1,show:!0,position:"outer",alignTo:"none",margin:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationTypeUpdate:"transition",animationEasing:"cubicOut"}});c(lP,sP);var uP=tf.prototype;uP.updateData=function(t,e,i){var n=this.childAt(0),a=this.childAt(1),o=this.childAt(2),l=t.hostModel,u=t.getItemModel(e),h=t.getItemLayout(e),c=r({},h);c.label=null;var d=l.getShallow("animationTypeUpdate");if(i){n.setShape(c);var f=l.getShallow("animationType");"scale"===f?(n.shape.r=h.r0,ar(n,{shape:{r:h.r}},l,e)):(n.shape.endAngle=h.startAngle,nr(n,{shape:{endAngle:h.endAngle}},l,e))}else"expansion"===d?n.setShape(c):nr(n,{shape:c},l,e);var p=t.getItemVisual(e,"color");n.useStyle(s({lineJoin:"bevel",fill:p},u.getModel("itemStyle").getItemStyle())),n.hoverStyle=u.getModel("emphasis.itemStyle").getItemStyle();var g=u.getShallow("cursor");g&&n.attr("cursor",g),Qd(this,t.getItemLayout(e),l.isSelected(t.getName(e)),l.get("selectedOffset"),l.get("animation"));var m=!i&&"transition"===d;this._updateLabel(t,e,m),this.highDownOnUpdate=l.get("silent")?null:function(t,e){var i=l.isAnimationEnabled()&&u.get("hoverAnimation");"emphasis"===e?(a.ignore=a.hoverIgnore,o.ignore=o.hoverIgnore,i&&(n.stopAnimation(!0),n.animateTo({shape:{r:h.r+l.get("hoverOffset")}},300,"elasticOut"))):(a.ignore=a.normalIgnore,o.ignore=o.normalIgnore,i&&(n.stopAnimation(!0),n.animateTo({shape:{r:h.r}},300,"elasticOut")))},Fo(this)},uP._updateLabel=function(t,e,i){var n=this.childAt(1),a=this.childAt(2),o=t.hostModel,r=t.getItemModel(e),s=t.getItemLayout(e),l=s.label,u=t.getItemVisual(e,"color");if(!l||isNaN(l.x)||isNaN(l.y))return void(a.ignore=a.normalIgnore=a.hoverIgnore=n.ignore=n.normalIgnore=n.hoverIgnore=!0);var h={points:l.linePoints||[[l.x,l.y],[l.x,l.y],[l.x,l.y]]},c={x:l.x,y:l.y};i?(nr(n,{shape:h},o,e),nr(a,{style:c},o,e)):(n.attr({shape:h}),a.attr({style:c})),a.attr({rotation:l.rotation,origin:[l.x,l.y],z2:10});var d=r.getModel("label"),f=r.getModel("emphasis.label"),p=r.getModel("labelLine"),g=r.getModel("emphasis.labelLine"),u=t.getItemVisual(e,"color");Xo(a.style,a.hoverStyle={},d,f,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:l.text,autoColor:u,useInsideStyle:!!l.inside},{textAlign:l.textAlign,textVerticalAlign:l.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),a.ignore=a.normalIgnore=!d.get("show"),a.hoverIgnore=!f.get("show"),n.ignore=n.normalIgnore=!p.get("show"),n.hoverIgnore=!g.get("show"),n.setStyle({stroke:u,opacity:t.getItemVisual(e,"opacity")}),n.setStyle(p.getModel("lineStyle").getLineStyle()),n.hoverStyle=g.getModel("lineStyle").getLineStyle();var m=p.get("smooth");m&&m===!0&&(m=.4),n.setShape({smooth:m})},h(tf,hM);var hP=(ml.extend({type:"pie",init:function(){var t=new hM;this._sectorGroup=t},render:function(t,e,i,n){if(!n||n.from!==this.uid){var a=t.getData(),o=this._data,r=this.group,s=e.get("animation"),l=!o,u=t.get("animationType"),h=t.get("animationTypeUpdate"),c=x(Jd,this.uid,t,s,i),d=t.get("selectedMode");if(a.diff(o).add(function(t){var e=new tf(a,t);l&&"scale"!==u&&e.eachChild(function(t){t.stopAnimation(!0)}),d&&e.on("click",c),a.setItemGraphicEl(t,e),r.add(e)}).update(function(t,e){var i=o.getItemGraphicEl(e);l||"transition"===h||i.eachChild(function(t){t.stopAnimation(!0)}),i.updateData(a,t),i.off("click"),d&&i.on("click",c),r.add(i),a.setItemGraphicEl(t,i)}).remove(function(t){var e=o.getItemGraphicEl(t);r.remove(e)}).execute(),s&&a.count()>0&&(l?"scale"!==u:"transition"!==h)){for(var f=a.getItemLayout(0),p=1;isNaN(f.startAngle)&&p=n.r0}}}),function(t,e){f(e,function(e){e.update="updateView",Cu(e,function(i,n){var a={};return n.eachComponent({mainType:"series",subType:t,query:i},function(t){t[e.method]&&t[e.method](i.name,i.dataIndex);var n=t.getData();n.each(function(e){var i=n.getName(e);a[i]=t.isSelected(i)||!1})}),{name:i.name,selected:a,seriesId:i.seriesId}})})}),cP=function(t){return{getTargetSeries:function(e){var i={},n=B();return e.eachSeriesByType(t,function(t){t.__paletteScope=i,n.set(t.uid,t)}),n},reset:function(t){var e=t.getRawData(),i={},n=t.getData();n.each(function(t){var e=n.getRawIndex(t);i[e]=t}),e.each(function(a){var o,r=i[a],s=null!=r&&n.getItemVisual(r,"color",!0),l=null!=r&&n.getItemVisual(r,"borderColor",!0);if(s&&l||(o=e.getItemModel(a)),!s){var u=o.get("itemStyle.color")||t.getColorFromPalette(e.getName(a)||a+"",t.__paletteScope,e.count());null!=r&&n.setItemVisual(r,"color",u)}if(!l){var h=o.get("itemStyle.borderColor");null!=r&&n.setItemVisual(r,"borderColor",h)}})}}},dP=Math.PI/180,fP=function(t,e,i,n,a,o){var r,s,l=t.getData(),u=[],h=!1,c=(t.get("minShowLabelAngle")||0)*dP;l.each(function(n){var o=l.getItemLayout(n),d=l.getItemModel(n),f=d.getModel("label"),p=f.get("position")||d.get("emphasis.label.position"),g=f.get("distanceToLabelLine"),m=f.get("alignTo"),v=Mr(f.get("margin"),i),y=f.get("bleedMargin"),x=f.getFont(),_=d.getModel("labelLine"),b=_.get("length");b=Mr(b,i);var w=_.get("length2");if(w=Mr(w,i),!(o.angleD?-1:1)*w,B=E;S="edge"===m?0>D?a+v:a+i-v:R+(0>D?-g:g),M=B,I=[[O,N],[z,E],[R,B]]}T=P?"center":"edge"===m?D>0?"right":"left":D>0?"left":"right"}var V,G=f.get("rotate");V="number"==typeof G?G*(Math.PI/180):G?0>D?-A+Math.PI:-A:0,h=!!V,o.label={x:S,y:M,position:p,height:k.height,len:b,len2:w,linePoints:I,textAlign:T,verticalAlign:"middle",rotation:V,inside:P,labelDistance:g,labelAlignTo:m,labelMargin:v,bleedMargin:y,textRect:k,text:L,font:x},P||u.push(o.label)}}),!h&&t.get("avoidLabelOverlap")&&nf(u,r,s,e,i,n,a,o)},pP=2*Math.PI,gP=Math.PI/180,mP=function(t,e,i){e.eachSeriesByType(t,function(t){var e=t.getData(),n=e.mapDimension("value"),a=of(t,i),o=t.get("center"),r=t.get("radius");
+_(r)||(r=[0,r]),_(o)||(o=[o,o]);var s=Mr(a.width,i.getWidth()),l=Mr(a.height,i.getHeight()),u=Math.min(s,l),h=Mr(o[0],s)+a.x,c=Mr(o[1],l)+a.y,d=Mr(r[0],u/2),f=Mr(r[1],u/2),p=-t.get("startAngle")*gP,g=t.get("minAngle")*gP,m=0;e.each(n,function(t){!isNaN(t)&&m++});var v=e.getSum(n),y=Math.PI/(v||m)*2,x=t.get("clockwise"),b=t.get("roseType"),w=t.get("stillShowZeroSum"),S=e.getDataExtent(n);S[0]=0;var M=pP,I=0,T=p,A=x?1:-1;if(e.each(n,function(t,i){var n;if(isNaN(t))return void e.setItemLayout(i,{angle:0/0,startAngle:0/0,endAngle:0/0,clockwise:x,cx:h,cy:c,r0:d,r:b?0/0:f,viewRect:a});n="area"!==b?0===v&&w?y:t*y:pP/m,g>n?(n=g,M-=g):I+=t;var o=T+A*n;e.setItemLayout(i,{angle:n,startAngle:T,endAngle:o,clockwise:x,cx:h,cy:c,r0:d,r:b?Sr(t,S,[d,f]):f,viewRect:a}),T=o}),pP>M&&m)if(.001>=M){var D=pP/m;e.each(n,function(t,i){if(!isNaN(t)){var n=e.getItemLayout(i);n.angle=D,n.startAngle=p+A*i*D,n.endAngle=p+A*(i+1)*D}})}else y=M/I,T=p,e.each(n,function(t,i){if(!isNaN(t)){var n=e.getItemLayout(i),a=n.angle===g?g:t*y;n.startAngle=T,n.endAngle=T+A*a,T+=A*a}});fP(t,f,a.width,a.height,a.x,a.y)})},vP=function(t){return{seriesType:t,reset:function(t,e){var i=e.findComponents({mainType:"legend"});if(i&&i.length){var n=t.getData();n.filterSelf(function(t){for(var e=n.getName(t),a=0;a=0;s--){var l=2*s,u=n[l]-o/2,h=n[l+1]-r/2;if(t>=u&&e>=h&&u+o>=t&&h+r>=e)return s}return-1}}),_P=rf.prototype;_P.isPersistent=function(){return!this._incremental},_P.updateData=function(t,e){this.group.removeAll();var i=new xP({rectHover:!0,cursor:"default"});i.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(i,t,!1,e),this.group.add(i),this._incremental=null},_P.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("symbolPoints");this.group.eachChild(function(t){if(null!=t.startIndex){var i=2*(t.endIndex-t.startIndex),n=4*t.startIndex*2;e=new Float32Array(e.buffer,n,i)}t.setShape("points",e)})}},_P.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new vo({silent:!0})),this.group.add(this._incremental)):this._incremental=null},_P.incrementalUpdate=function(t,e,i){var n;this._incremental?(n=new xP,this._incremental.addDisplayable(n,!0)):(n=new xP({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end}),n.incremental=!0,this.group.add(n)),n.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(n,e,!!this._incremental,i)},_P._setCommon=function(t,e,i,n){var a=e.hostModel;n=n||{};var o=e.getVisual("symbolSize");t.setShape("size",o instanceof Array?o:[o,o]),t.softClipShape=n.clipShape||null,t.symbolProxy=ec(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var r=t.shape.size[0]=0&&(t.dataIndex=i+(t.startIndex||0))}))},_P.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},_P._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},Vu({type:"scatter",render:function(t){var e=t.getData(),i=this._updateSymbolDraw(e,t);i.updateData(e,{clipShape:this._getClipShape(t)}),this._finished=!0},incrementalPrepareRender:function(t){var e=t.getData(),i=this._updateSymbolDraw(e,t);i.incrementalPrepareUpdate(e),this._finished=!1},incrementalRender:function(t,e){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},updateTransform:function(t){var e=t.getData();if(this.group.dirty(),!this._finished||e.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var i=iP().reset(t);i.progress&&i.progress({start:0,end:e.count()},e),this._symbolDraw.updateLayout(e)},_getClipShape:function(t){var e=t.coordinateSystem,i=e&&e.getArea&&e.getArea();return t.get("clip",!0)?i:null},_updateSymbolDraw:function(t,e){var i=this._symbolDraw,n=e.pipelineContext,a=n.large;return i&&a===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=a?new rf:new Cd,this._isLargeDraw=a,this.group.removeAll()),this.group.add(i.group),i},remove:function(){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),Ou(eP("scatter","circle")),Pu(iP("scatter")),_D.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(){return xh(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});var bP=3,wP=uf.prototype;wP.stopEffectAnimation=function(){this.childAt(1).removeAll()},wP.startEffectAnimation=function(t){for(var e=t.symbolType,i=t.color,n=this.childAt(1),a=0;bP>a;a++){var o=ec(e,-1,-1,2,2,i);o.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var r=-a/bP*t.period+t.effectOffset;o.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(r).start(),o.animateStyle(!0).when(t.period,{opacity:0}).delay(r).start(),n.add(o)}lf(n,t)},wP.updateEffectAnimation=function(t){for(var e=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale"],a=0;a0?OP:NP)}function a(t,e){return e.get(t>0?kP:PP)}var o=t.getData();if(o.setVisual({legendSymbol:"roundRect",colorP:n(1,t),colorN:n(-1,t),borderColorP:a(1,t),borderColorN:a(-1,t)}),!e.isSeriesFiltered(t)){var r=t.pipelineContext.large;return!r&&{progress:i}}}},EP="undefined"!=typeof Float32Array?Float32Array:Array,RP={seriesType:"candlestick",plan:SD(),reset:function(t){function e(t,e){function i(t,e){var i=[];return i[r]=e,i[s]=t,isNaN(e)||isNaN(t)?[0/0,0/0]:n.dataToPoint(i)}function a(t,e,i){var n=e.slice(),a=e.slice();n[r]=oA(n[r]+o/2,1,!1),a[r]=oA(a[r]-o/2,1,!0),i?t.push(n,a):t.push(a,n)}function l(t,e,n){var a=i(t,n),l=i(e,n);return a[r]-=o/2,l[r]-=o/2,{x:a[0],y:a[1],width:s?o:l[0]-a[0],height:s?l[1]-a[1]:o}}function h(t){return t[r]=oA(t[r],1),t}for(var g;null!=(g=t.next());){var m=e.get(u,g),v=e.get(c,g),y=e.get(d,g),x=e.get(f,g),_=e.get(p,g),b=Math.min(v,y),w=Math.max(v,y),S=i(b,m),M=i(w,m),I=i(x,m),T=i(_,m),A=[];a(A,M,0),a(A,S,1),A.push(h(T),h(M),h(I),h(S)),e.setItemLayout(g,{sign:mf(e,g,v,y,d),initBaseline:v>y?M[s]:S[s],ends:A,brushRect:l(x,_,m)})}}function i(t,e){for(var i,a,o=new EP(4*t.count),l=0,h=[],g=[];null!=(a=t.next());){var m=e.get(u,a),v=e.get(c,a),y=e.get(d,a),x=e.get(f,a),_=e.get(p,a);isNaN(m)||isNaN(x)||isNaN(_)?(o[l++]=0/0,l+=3):(o[l++]=mf(e,a,v,y,d),h[r]=m,h[s]=x,i=n.dataToPoint(h,null,g),o[l++]=i?i[0]:0/0,o[l++]=i?i[1]:0/0,h[s]=_,i=n.dataToPoint(h,null,g),o[l++]=i?i[1]:0/0)}e.setLayout("largePoints",o)}var n=t.coordinateSystem,a=t.getData(),o=vf(t,a),r=0,s=1,l=["x","y"],u=a.mapDimension(l[r]),h=a.mapDimension(l[s],!0),c=h[0],d=h[1],f=h[2],p=h[3];return a.setLayout({candleWidth:o,isSimpleBox:1.3>=o}),null==u||h.length<4?void 0:{progress:t.pipelineContext.large?i:e}}};Tu(LP),Ou(zP),Pu(RP),h(yf,JL),xf.prototype.getIndicatorAxes=function(){return this._indicatorAxes},xf.prototype.dataToPoint=function(t,e){var i=this._indicatorAxes[e];return this.coordToPoint(i.dataToCoord(t),e)},xf.prototype.coordToPoint=function(t,e){var i=this._indicatorAxes[e],n=i.angle,a=this.cx+t*Math.cos(n),o=this.cy-t*Math.sin(n);return[a,o]},xf.prototype.pointToData=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=Math.sqrt(e*e+i*i);e/=n,i/=n;for(var a,o=Math.atan2(-i,e),r=1/0,s=-1,l=0;lh&&(a=u,s=l,r=h)}return[s,+(a&&a.coordToData(n))]},xf.prototype.resize=function(t,e){var i=t.get("center"),n=e.getWidth(),a=e.getHeight(),o=Math.min(n,a)/2;this.cx=Mr(i[0],n),this.cy=Mr(i[1],a),this.startAngle=t.get("startAngle")*Math.PI/180;var r=t.get("radius");("string"==typeof r||"number"==typeof r)&&(r=[0,r]),this.r0=Mr(r[0],o),this.r=Mr(r[1],o),f(this._indicatorAxes,function(t,e){t.setExtent(this.r0,this.r);var i=this.startAngle+e*Math.PI*2/this._indicatorAxes.length;i=Math.atan2(Math.sin(i),Math.cos(i)),t.angle=i},this)},xf.prototype.update=function(t){function e(t){var e=Math.pow(10,Math.floor(Math.log(t)/Math.LN10)),i=t/e;return 2===i?i=5:i*=2,i*e}var i=this._indicatorAxes,n=this._model;f(i,function(t){t.scale.setExtent(1/0,-1/0)}),t.eachSeriesByType("radar",function(e){if("radar"===e.get("coordinateSystem")&&t.getComponent("radar",e.get("radarIndex"))===n){var a=e.getData();f(i,function(t){t.scale.unionExtentFromData(a,a.mapDimension(t.dim))})}},this);var a=n.get("splitNumber");f(i,function(t){var i=Hh(t.scale,t.model).extent;Xh(t.scale,t.model);var n=t.model,o=t.scale,r=n.getMin(),s=n.getMax(),l=o.getInterval();if(null!=r&&null!=s)o.setExtent(+r,+s),o.setInterval((s-r)/a);else if(null!=r){var u;do u=r+l*a,o.setExtent(+r,u),o.setInterval(l),l=e(l);while(ui[0]&&isFinite(h)&&isFinite(i[0]))}else{var c=o.getTicks().length-1;c>a&&(l=e(l));var u=Math.ceil(i[1]/l)*l,h=Ir(u-l*a);o.setExtent(h,u),o.setInterval(l)}})},xf.dimensions=[],xf.create=function(t,e){var i=[];return t.eachComponent("radar",function(n){var a=new xf(n,t,e);i.push(a),n.coordinateSystem=a}),t.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])}),i},Ls.register("radar",xf);var BP=ok.valueAxis,VP=(Eu({type:"radar",optionUpdated:function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),i=this.get("scale"),o=this.get("axisLine"),l=this.get("axisTick"),u=this.get("axisType"),h=this.get("axisLabel"),c=this.get("name"),d=this.get("name.show"),f=this.get("name.formatter"),g=this.get("nameGap"),m=this.get("triggerEvent"),v=p(this.get("indicator")||[],function(p){null!=p.max&&p.max>0&&!p.min?p.min=0:null!=p.min&&p.min<0&&!p.max&&(p.max=0);var v=c;if(null!=p.color&&(v=s({color:p.color},c)),p=a(n(p),{boundaryGap:t,splitNumber:e,scale:i,axisLine:o,axisTick:l,axisType:u,axisLabel:h,name:p.text,nameLocation:"end",nameGap:g,nameTextStyle:v,triggerEvent:m},!1),d||(p.name=""),"string"==typeof f){var y=p.name;p.name=f.replace("{value}",null!=y?y:"")}else"function"==typeof f&&(p.name=f(p.name,p));var x=r(new mr(p,null,this.ecModel),RL);return x.mainType="radar",x.componentIndex=this.componentIndex,x},this);this.getIndicatorModels=function(){return v}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:a({lineStyle:{color:"#bbb"}},BP.axisLine),axisLabel:_f(BP.axisLabel,!1),axisTick:_f(BP.axisTick,!1),axisType:"interval",splitLine:_f(BP.splitLine,!0),splitArea:_f(BP.splitArea,!0),indicator:[]}}),["axisLine","axisTickLabel","axisName"]);Ru({type:"radar",render:function(t){var e=this.group;e.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem,i=e.getIndicatorAxes(),n=p(i,function(t){var i=new Tk(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return i});f(n,function(t){f(VP,t.add,t),this.group.add(t.getGroup())},this)},_buildSplitLineAndArea:function(t){function e(t,e,i){var n=i%e.length;return t[n]=t[n]||[],n}var i=t.coordinateSystem,n=i.getIndicatorAxes();if(n.length){var a=t.get("shape"),o=t.getModel("splitLine"),r=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=r.getModel("areaStyle"),h=o.get("show"),c=r.get("show"),d=l.get("color"),g=u.get("color");d=_(d)?d:[d],g=_(g)?g:[g];var m=[],v=[];if("circle"===a)for(var y=n[0].getTicksCoords(),x=i.cx,b=i.cy,w=0;w=w;w++){for(var A=[],D=0;D":"\n";return Wr(""===s?this.name:s)+l+p(r,function(e){var i=a.get(a.mapDimension(e.dim),t);return Wr(e.name+" : "+i)}).join(l)},getTooltipPosition:function(t){if(null!=t)for(var e=this.getData(),i=this.coordinateSystem,n=e.getValues(p(i.dimensions,function(t){return e.mapDimension(t)}),t,!0),a=0,o=n.length;o>a;a++)if(!isNaN(n[a])){var r=i.getIndicatorAxes();return i.coordToPoint(r[a].dataToCoord(n[a]),a)}},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});Vu({type:"radar",render:function(t){function e(t,e){var i=t.getItemVisual(e,"symbol")||"circle",n=t.getItemVisual(e,"color");if("none"!==i){var a=bf(t.getItemVisual(e,"symbolSize")),o=ec(i,-1,-1,2,2,n),r=t.getItemVisual(e,"symbolRotate")||0;return o.attr({style:{strokeNoScale:!0},z2:100,scale:[a[0]/2,a[1]/2],rotation:r*Math.PI/180||0}),o}}function i(i,n,a,o,r,s){a.removeAll();for(var l=0;lf;++f){var p=t[f],g=p[0],m=p[1],v=p[2],y=n(v);c.globalAlpha=y,c.drawImage(r,g-u,m-u)}if(!h.width||!h.height)return h;for(var x=c.getImageData(0,0,h.width,h.height),_=x.data,b=0,w=_.length,S=this.minOpacity,M=this.maxOpacity,I=M-S;w>b;){var y=_[b+3]/256,T=4*Math.floor(y*(HP-1));if(y>0){var A=o(y)?s:l;y>0&&(y=y*I+S),_[b++]=A[T],_[b++]=A[T+1],_[b++]=A[T+2],_[b++]=A[T+3]*y*256}else b+=4}return c.putImageData(x,0,0),h},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=sS()),e=this.pointSize+this.blurSize,i=2*e;t.width=i,t.height=i;var n=t.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-e,e,this.pointSize,0,2*Math.PI,!0),n.closePath(),n.fill(),t},_getGradient:function(t,e,i){for(var n=this._gradientPixels,a=n[i]||(n[i]=new Uint8ClampedArray(1024)),o=[0,0,0,0],r=0,s=0;256>s;s++)e[i](s/255,!0,o),a[r++]=o[0],a[r++]=o[1],a[r++]=o[2],a[r++]=o[3];return a}},Vu({type:"heatmap",render:function(t,e,i){var n;e.eachComponent("visualMap",function(e){e.eachTargetSeries(function(i){i===t&&(n=e)})}),this.group.removeAll(),this._incrementalDisplayable=null;var a=t.coordinateSystem;"cartesian2d"===a.type||"calendar"===a.type?this._renderOnCartesianAndCalendar(t,i,0,t.getData().count()):Af(a)&&this._renderOnGeo(a,t,n,i)},incrementalPrepareRender:function(){this.group.removeAll()},incrementalRender:function(t,e,i,n){var a=e.coordinateSystem;a&&this._renderOnCartesianAndCalendar(e,n,t.start,t.end,!0)},_renderOnCartesianAndCalendar:function(t,e,i,n,a){var o,s,l=t.coordinateSystem;if("cartesian2d"===l.type){var u=l.getAxis("x"),h=l.getAxis("y");o=u.getBandWidth(),s=h.getBandWidth()}for(var c=this.group,d=t.getData(),f="itemStyle",p="emphasis.itemStyle",g="label",m="emphasis.label",v=t.getModel(f).getItemStyle(["color"]),y=t.getModel(p).getItemStyle(),x=t.getModel(g),_=t.getModel(m),b=l.type,w="cartesian2d"===b?[d.mapDimension("x"),d.mapDimension("y"),d.mapDimension("value")]:[d.mapDimension("time"),d.mapDimension("value")],S=i;n>S;S++){var M;if("cartesian2d"===b){if(isNaN(d.get(w[2],S)))continue;var I=l.dataToPoint([d.get(w[0],S),d.get(w[1],S)]);M=new RT({shape:{x:Math.floor(Math.round(I[0])-o/2),y:Math.floor(Math.round(I[1])-s/2),width:Math.ceil(o),height:Math.ceil(s)},style:{fill:d.getItemVisual(S,"color"),opacity:d.getItemVisual(S,"opacity")}})}else{if(isNaN(d.get(w[1],S)))continue;M=new RT({z2:1,shape:l.dataToRect([d.get(w[0],S)]).contentShape,style:{fill:d.getItemVisual(S,"color"),opacity:d.getItemVisual(S,"opacity")}})}var T=d.getItemModel(S);d.hasItemOption&&(v=T.getModel(f).getItemStyle(["color"]),y=T.getModel(p).getItemStyle(),x=T.getModel(g),_=T.getModel(m));var A=t.getRawValue(S),D="-";A&&null!=A[2]&&(D=A[2]),Xo(v,y,x,_,{labelFetcher:t,labelDataIndex:S,defaultText:D,isRectText:!0}),M.setStyle(v),Fo(M,d.hasItemOption?y:r({},y)),M.incremental=a,a&&(M.useHoverLayer=!0),c.add(M),d.setItemGraphicEl(S,M)}},_renderOnGeo:function(t,e,i,n){var a=i.targetVisuals.inRange,o=i.targetVisuals.outOfRange,r=e.getData(),s=this._hmLayer||this._hmLayer||new Mf;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),u=t.getRoamTransform();l.applyTransform(u);var h=Math.max(l.x,0),c=Math.max(l.y,0),d=Math.min(l.width+l.x,n.getWidth()),f=Math.min(l.height+l.y,n.getHeight()),p=d-h,g=f-c,m=[r.mapDimension("lng"),r.mapDimension("lat"),r.mapDimension("value")],v=r.mapArray(m,function(e,i,n){var a=t.dataToPoint([e,i]);return a[0]-=h,a[1]-=c,a.push(n),a}),y=i.getExtent(),x="visualMap.continuous"===i.type?Tf(y,i.option.range):If(y,i.getPieceList(),i.option.selected);s.update(v,p,g,a.color.getNormalizer(),{inRange:a.color.getColorMapper(),outOfRange:o.color.getColorMapper()},x);var _=new Dn({style:{width:p,height:g,x:h,y:c,image:s.canvas},silent:!0});this.group.add(_)},dispose:function(){}});var ZP=f,XP="\x00__link_datas",UP="\x00__link_mainData",YP=function(t,e){this.name=t||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=e};YP.prototype={constructor:YP,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,i){"function"==typeof t&&(i=e,e=t,t=null),t=t||{},w(t)&&(t={order:t});var n,a=t.order||"preorder",o=this[t.attr||"children"];"preorder"===a&&(n=e.call(i,this));for(var r=0;!n&&re&&(e=n.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;n>e;e++){var a=i[e].getNodeById(t);if(a)return a}},contains:function(t){if(t===this)return!0;for(var e=0,i=this.children,n=i.length;n>e;e++){var a=i[e].contains(t);if(a)return a}},getAncestors:function(t){for(var e=[],i=t?this:this.parentNode;i;)e.push(i),i=i.parentNode;return e.reverse(),e},getValue:function(t){var e=this.hostTree.data;return e.get(e.getDimension(t||"value"),this.dataIndex)},setLayout:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0)){var e=this.hostTree,i=e.data.getItemModel(this.dataIndex);return i.getModel(t)}},setVisual:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)
+},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},isDescendantOf:function(t){return t!==this&&t.isAncestorOf(this)}},Ef.prototype={constructor:Ef,type:"tree",eachNode:function(t,e,i){this.root.eachNode(t,e,i)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;n>i;i++)e[i].dataIndex=-1;for(var i=0,n=t.count();n>i;i++)e[t.getRawIndex(i)].dataIndex=i},clearLayouts:function(){this.data.clearItemLayouts()}},Ef.createTree=function(t,e,i){function n(t,e){var i=t.value;r=Math.max(r,_(i)?i.length:1),o.push(t);var s=new YP(t.name,a);e?Rf(s,e):a.root=s,a._nodes.push(s);var l=t.children;if(l)for(var u=0;ur&&(r=t.depth)});var s=t.expandAndCollapse,l=s&&t.initialTreeDepth>=0?t.initialTreeDepth:r;return o.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=l}),o.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,i=e.root.children[0],n=e.getNodeByDataIndex(t),a=n.getValue(),o=n.name;n&&n!==i;)o=n.parentNode.name+"."+o,n=n.parentNode;return Wr(o+(isNaN(a)||null==a?"":" : "+a))},defaultOption:{zlevel:0,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",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});var jP=oe;c($f,zS),Jf.prototype={constructor:Jf,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,i,n){return this._rect=new Ti(t,e,i,n),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,i,n){this.transformTo(t,e,i,n),this._viewRect=new Ti(t,e,i,n)},transformTo:function(t,e,i,n){var a=this.getBoundingRect(),o=this._rawTransformable;o.transform=a.calculateTransform(new Ti(t,e,i,n)),o.decomposeTransform(),this._updateTransform()},setCenter:function(t){t&&(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect(),e=t.x+t.width/2,i=t.y+t.height/2;return[e,i]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,i=this.getDefaultCenter(),n=this.getCenter(),a=this.getZoom();n=oe([],n,t),i=oe([],i,t),e.origin=n,e.position=[i[0]-n[0],i[1]-n[1]],e.scale=[a,a],this._updateTransform()},_updateTransform:function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),ze(this.transform||(this.transform=[]),e.transform||Oe()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],Ge(this.invTransform,this.transform),this.decomposeTransform()},getTransformInfo:function(){var t=this._roamTransformable.transform,e=this._rawTransformable;return{roamTransform:t?k(t):Oe(),rawScale:k(e.scale),rawPosition:k(e.position)}},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t,e,i){var n=e?this._rawTransform:this.transform;return i=i||[],n?jP(i,t,n):W(i,t)},pointToData:function(t){var e=this.invTransform;return e?jP([],t,e):[t[0],t[1]]},convertToPixel:x(Qf,"dataToPoint"),convertFromPixel:x(Qf,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},c(Jf,zS);var qP="\x00_ec_interaction_mutex";Cu({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),c(rp,yS);var KP={axisPointer:1,tooltip:1,brush:1},$P=yo({shape:{parentPoint:[],childPoints:[],orient:"",forkPosition:""},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.childPoints,n=i.length,a=e.parentPoint,o=i[0],r=i[n-1];if(1===n)return t.moveTo(a[0],a[1]),void t.lineTo(o[0],o[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,h=Mr(e.forkPosition,1),c=[];c[l]=a[l],c[u]=a[u]+(r[u]-a[u])*h,t.moveTo(a[0],a[1]),t.lineTo(c[0],c[1]),t.moveTo(o[0],o[1]),c[l]=o[l],t.lineTo(c[0],c[1]),c[l]=r[l],t.lineTo(c[0],c[1]),t.lineTo(r[0],r[1]);for(var d=1;n-1>d;d++){var f=i[d];t.moveTo(f[0],f[1]),c[l]=f[l],t.lineTo(c[0],c[1])}}});Vu({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new hM,this._controller=new rp(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(t,e,i){var n=t.getData(),a=t.layoutInfo,o=this._mainGroup,r=t.get("layout");"radial"===r?o.attr("position",[a.x+a.width/2,a.y+a.height/2]):o.attr("position",[a.x,a.y]),this._updateViewCoordSys(t,a,r),this._updateController(t,e,i);var s=this._data,l={expandAndCollapse:t.get("expandAndCollapse"),layout:r,edgeShape:t.get("edgeShape"),edgeForkPosition:t.get("edgeForkPosition"),orient:t.getOrient(),curvature:t.get("lineStyle.curveness"),symbolRotate:t.get("symbolRotate"),symbolOffset:t.get("symbolOffset"),hoverAnimation:t.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};n.diff(s).add(function(e){mp(n,e)&&yp(n,e,null,o,t,l)}).update(function(e,i){var a=s.getItemGraphicEl(i);return mp(n,e)?void yp(n,e,a,o,t,l):void(a&&_p(s,i,a,o,t,l))}).remove(function(e){var i=s.getItemGraphicEl(e);i&&_p(s,e,i,o,t,l)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),l.expandAndCollapse===!0&&n.eachItemGraphicEl(function(e,n){e.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:n})})}),this._data=n},_updateViewCoordSys:function(t){var e=t.getData(),i=[];e.each(function(t){var n=e.getItemLayout(t);!n||isNaN(n.x)||isNaN(n.y)||i.push([+n.x,+n.y])});var n=[],a=[];Ba(i,n,a);var o=this._min,r=this._max;a[0]-n[0]===0&&(n[0]=o?o[0]:n[0]-1,a[0]=r?r[0]:a[0]+1),a[1]-n[1]===0&&(n[1]=o?o[1]:n[1]-1,a[1]=r?r[1]:a[1]+1);var s=t.coordinateSystem=new Jf;s.zoomLimit=t.get("scaleLimit"),s.setBoundingRect(n[0],n[1],a[0]-n[0],a[1]-n[1]),s.setCenter(t.get("center")),s.setZoom(t.get("zoom")),this.group.attr({position:s.position,scale:s.scale}),this._viewCoordSys=s,this._min=n,this._max=a},_updateController:function(t,e,i){var n=this._controller,a=this._controllerHost,o=this.group;n.setPointerChecker(function(e,n,a){var r=o.getBoundingRect();return r.applyTransform(o.transform),r.contain(n,a)&&!gp(e,i,t)}),n.enable(t.get("roam")),a.zoomLimit=t.get("scaleLimit"),a.zoom=t.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",function(e){tp(a,e.dx,e.dy),i.dispatchAction({seriesId:t.id,type:"treeRoam",dx:e.dx,dy:e.dy})},this).on("zoom",function(e){ep(a,e.scale,e.originX,e.originY),i.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),this._updateNodeAndLinkScale(t)},this)},_updateNodeAndLinkScale:function(t){var e=t.getData(),i=this._getNodeGlobalScale(t),n=[i,i];e.eachItemGraphicEl(function(t){t.attr("scale",n)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=this._nodeScaleRatio,n=e.scale,a=n&&n[0]||1,o=e.getZoom(),r=(o-1)*i+1;return r/a},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}}),Cu({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var i=t.dataIndex,n=e.getData().tree,a=n.getNodeByDataIndex(i);a.isExpand=!a.isExpand})}),Cu({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(e){var i=e.coordinateSystem,n=wp(i,t);e.setCenter&&e.setCenter(n.center),e.setZoom&&e.setZoom(n.zoom)})});var JP=function(t,e){t.eachSeriesByType("tree",function(t){Ip(t,e)})};Ou(eP("tree","circle")),Pu(JP),_D.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){function i(t){t.wrapMethod("getItemModel",function(t,e){var i=l.getNodeByDataIndex(e),n=s[i.depth];return t.parentModel=n||r,t})}var n={name:t.name,children:t.data};Lp(n);var a=t.levels||[],o=this.designatedVisualItemStyle={},r=new mr({itemStyle:o},this,e);a=t.levels=kp(a,e);var s=p(a||[],function(t){return new mr(t,r,e)},this),l=Ef.createTree(n,this,i);return l.data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=Gr(_(i)?i[0]:i),a=e.getName(t);return Wr(a+": "+n)},getDataParams:function(t){var e=_D.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Cp(i,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},r(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=B(),this._idIndexMapCount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idIndexMapCount++),i},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;(!t||t!==e&&!e.contains(t))&&(this._viewRoot=e)}});var QP=8,tO=8,eO=5;Pp.prototype={constructor:Pp,render:function(t,e,i,n){var a=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),a.get("show")&&i){var r=a.getModel("itemStyle"),s=r.getModel("textStyle"),l={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,l,s),this._renderContent(t,l,r,s,n),es(o,l.pos,l.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentNode){var a=n.getModel().get("name"),o=i.getTextRect(a),r=Math.max(o.width+2*QP,e.emptyItemWidth);e.totalWidth+=r+tO,e.renderList.push({node:n,text:a,width:r})}},_renderContent:function(t,e,i,n,a){for(var o=0,r=e.emptyItemWidth,l=t.get("breadcrumb.height"),u=Qr(e.pos,e.box),h=e.totalWidth,c=e.renderList,d=c.length-1;d>=0;d--){var f=c[d],p=f.node,g=f.width,m=f.text;h>u.width&&(h-=g-r,g=r,m=null);var v=new OT({shape:{points:Op(o,0,g,l,d===c.length-1,0===d)},style:s(i.getItemStyle(),{lineJoin:"bevel",text:m,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:x(a,p)});this.group.add(v),Np(v,t,p),o+=g+tO}},remove:function(){this.group.removeAll()}};var iO=y,nO=hM,aO=RT,oO=f,rO=3,sO=["label"],lO=["emphasis","label"],uO=["upperLabel"],hO=["emphasis","upperLabel"],cO=10,dO=1,fO=2,pO=yI([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),gO=function(t){var e=pO(t);return e.stroke=e.fill=e.lineWidth=null,e};Vu({type:"treemap",init:function(){this._containerGroup,this._storage=Ep(),this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){var a=e.findComponents({mainType:"series",subType:"treemap",query:n});if(!(u(a,t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var o=["treemapZoomToNode","treemapRootToNode"],r=Tp(n,o,t),s=n&&n.type,l=t.layoutInfo,h=!this._oldTree,c=this._storage,d="treemapRootToNode"===s&&r&&c?{rootNodeGroup:c.nodeGroup[r.node.getRawIndex()],direction:n.direction}:null,f=this._giveContainerGroup(l),p=this._doRender(f,t,d);h||s&&"treemapZoomToNode"!==s&&"treemapRootToNode"!==s?p.renderFinally():this._doAnimation(f,p,t,d),this._resetController(i),this._renderBreadcrumb(t,i,r)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new nO,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,i){function n(t,e,i,a,o){function r(t){return t.getId()}function s(r,s){var l=null!=r?t[r]:null,u=null!=s?e[s]:null,h=d(l,u,i,o);h&&n(l&&l.viewChildren||[],u&&u.viewChildren||[],h,a,o+1)}a?(e=t,oO(t,function(t,e){!t.isRemoved()&&s(e,e)})):new Zu(e,t,r,r).add(s).update(s).remove(x(s,null)).execute()}function a(t){var e=Ep();return t&&oO(t,function(t,i){var n=e[i];oO(t,function(t){t&&(n.push(t),t.__tmWillDelete=1)})}),e}function o(){oO(f,function(t){oO(t,function(t){t.parent&&t.parent.remove(t)})}),oO(c,function(t){t.invisible=!0,t.dirty()})}var r=e.getData().tree,s=this._oldTree,l=Ep(),u=Ep(),h=this._storage,c=[],d=x(Rp,e,u,h,i,l,c);n(r.root?[r.root]:[],s&&s.root?[s.root]:[],t,r===s||!s,0);var f=a(h);return this._oldTree=r,this._storage=u,{lastsForAnimation:l,willDeleteEls:f,renderFinally:o}},_doAnimation:function(t,e,i,n){if(i.get("animation")){var a=i.get("animationDurationUpdate"),o=i.get("animationEasing"),s=zp();oO(e.willDeleteEls,function(t,e){oO(t,function(t){if(!t.invisible){var i,r=t.parent;if(n&&"drillDown"===n.direction)i=r===n.rootNodeGroup?{shape:{x:0,y:0,width:r.__tmNodeWidth,height:r.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var l=0,u=0;r.__tmWillDelete||(l=r.__tmNodeWidth/2,u=r.__tmNodeHeight/2),i="nodeGroup"===e?{position:[l,u],style:{opacity:0}}:{shape:{x:l,y:u,width:0,height:0},style:{opacity:0}}}i&&s.add(t,i,a,o)}})}),oO(this._storage,function(t,i){oO(t,function(t,n){var l=e.lastsForAnimation[i][n],u={};l&&("nodeGroup"===i?l.old&&(u.position=t.position.slice(),t.attr("position",l.old)):(l.old&&(u.shape=r({},t.shape),t.setShape(l.old)),l.fadein?(t.setStyle("opacity",0),u.style={opacity:1}):1!==t.style.opacity&&(u.style={opacity:1})),s.add(t,u,a,o))})},this),this._state="animating",s.done(iO(function(){this._state="ready",e.renderFinally()},this)).start()}},_resetController:function(t){var e=this._controller;e||(e=this._controller=new rp(t.getZr()),e.enable(this.seriesModel.get("roam")),e.on("pan",iO(this._onPan,this)),e.on("zoom",iO(this._onZoom,this)));var i=new Ti(0,0,t.getWidth(),t.getHeight());e.setPointerChecker(function(t,e,n){return i.contain(e,n)})},_clearController:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onPan:function(t){if("animating"!==this._state&&(Math.abs(t.dx)>rO||Math.abs(t.dy)>rO)){var e=this.seriesModel.getData().tree.root;if(!e)return;var i=e.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},_onZoom:function(t){var e=t.originX,i=t.originY;if("animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var a=n.getLayout();if(!a)return;var o=new Ti(a.x,a.y,a.width,a.height),r=this.seriesModel.layoutInfo;e-=r.x,i-=r.y;var s=Oe();Re(s,s,[-e,-i]),Ve(s,s,[t.scale,t.scale]),Re(s,s,[e,i]),o.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},_initEvents:function(t){t.on("click",function(t){if("ready"===this._state){var e=this.seriesModel.get("nodeClick",!0);if(e){var i=this.findTarget(t.offsetX,t.offsetY);if(i){var n=i.node;if(n.getLayout().isLeafRoot)this._rootToNode(i);else if("zoomToNode"===e)this._zoomToNode(i);else if("link"===e){var a=n.hostTree.data.getItemModel(n.dataIndex),o=a.get("link",!0),r=a.get("target",!0)||"blank";o&&$r(o,r)}}}}},this)},_renderBreadcrumb:function(t,e,i){function n(e){"animating"!==this._state&&(Dp(t.getViewRoot(),e)?this._rootToNode({node:e}):this._zoomToNode({node:e}))}i||(i=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2),i||(i={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new Pp(this.group))).render(t,e,i.node,iO(n,this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Ep(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(t,e){var i,n=this.seriesModel.getViewRoot();return n.eachNode({attr:"viewChildren",order:"preorder"},function(n){var a=this._storage.background[n.getRawIndex()];if(a){var o=a.transformCoordToLocal(t,e),r=a.shape;if(!(r.x<=o[0]&&o[0]<=r.x+r.width&&r.y<=o[1]&&o[1]<=r.y+r.height))return!1;i={node:n,offsetX:o[0],offsetY:o[1]}}},this),i}});for(var mO=function(){},vO=["treemapZoomToNode","treemapRender","treemapMove"],yO=0;yOn&&(o=n,a=i)}for(var a,o=1/0,r=0,s=e.length;s>r;r++){var l=e[r].value;if(null!=l){if(l===t||"string"==typeof l&&l===t+"")return r;i&&n(l,r)}}for(var r=0,s=e.length;s>r;r++){var u=e[r],h=u.interval,c=u.close;if(h){if(h[0]===-1/0){if(Kp(c[1],t,h[1]))return r}else if(1/0===h[1]){if(Kp(c[0],h[0],t))return r}else if(Kp(c[0],h[0],t)&&Kp(c[1],t,h[1]))return r;i&&n(h[0],r),i&&n(h[1],r)}}return i?1/0===t?e.length-1:t===-1/0?0:a:void 0};var IO=_,TO="itemStyle",AO={seriesType:"treemap",reset:function(t){var e=t.getData().tree,i=e.root;i.isRemoved()||$p(i,{},t.getViewRoot().getAncestors(),t)}},DO=Math.max,CO=Math.min,LO=D,kO=f,PO=["itemStyle","borderWidth"],OO=["itemStyle","gapWidth"],NO=["upperLabel","show"],zO=["upperLabel","height"],EO={seriesType:"treemap",reset:function(t,e,i,n){var a=i.getWidth(),o=i.getHeight(),s=t.option,l=ts(t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),u=s.size||[],h=Mr(LO(l.width,u[0]),a),c=Mr(LO(l.height,u[1]),o),d=n&&n.type,f=["treemapZoomToNode","treemapRootToNode"],p=Tp(n,f,t),g="treemapRender"===d||"treemapMove"===d?n.rootRect:null,m=t.getViewRoot(),v=Ap(m);if("treemapMove"!==d){var y="treemapZoomToNode"===d?dg(t,p,m,h,c):g?[g.width,g.height]:[h,c],x=s.sort;x&&"asc"!==x&&"desc"!==x&&(x="desc");var _={squareRatio:s.squareRatio,sort:x,leafDepth:s.leafDepth};m.hostTree.clearLayouts();var b={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};m.setLayout(b),og(m,_,!1,0);var b=m.getLayout();kO(v,function(t,e){var i=(v[e+1]||m).getValue();t.setLayout(r({dataExtent:[i,i],borderWidth:0,upperHeight:0},b))})}var w=t.getData().tree.root;w.setLayout(fg(l,g,p),!0),t.setLayoutInfo(l),pg(w,new Ti(-l.x,-l.y,a,o),v,m,0)}};Ou(AO),Pu(EO),_D.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(t,e){function i(t){t.wrapMethod("getItemModel",function(t,e){var i=o.getNodeByDataIndex(e),n=a[i.depth];return n&&(t.parentModel=n),t})}var n={name:t.name,children:t.data};mg(n);var a=p(t.levels||[],function(t){return new mr(t,this,e)},this),o=Ef.createTree(n,this,i);return o.data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=_D.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Cp(i,this),e},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",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},highlight:{itemStyle:{opacity:1}},downplay:{itemStyle:{opacity:.5},label:{opacity:.6}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;(!t||t!==e&&!e.contains(t))&&(this._viewRoot=e)}});var RO={NONE:"none",DESCENDANT:"descendant",ANCESTOR:"ancestor",SELF:"self"},BO=2,VO=4,GO=vg.prototype;GO.updateData=function(t,e,i,n,o){this.node=e,e.piece=this,n=n||this._seriesModel,o=o||this._ecModel;var l=this.childAt(0);l.dataIndex=e.dataIndex;var u=e.getModel(),h=e.getLayout(),c=r({},h);c.label=null;var d=yg(e,n,o);bg(e,n,d);var f,p=u.getModel("itemStyle").getItemStyle();if("normal"===i)f=p;else{var g=u.getModel(i+".itemStyle").getItemStyle();f=a(g,p)}f=s({lineJoin:"bevel",fill:f.fill||d},f),t?(l.setShape(c),l.shape.r=h.r0,nr(l,{shape:{r:h.r}},n,e.dataIndex),l.useStyle(f)):"object"==typeof f.fill&&f.fill.type||"object"==typeof l.style.fill&&l.style.fill.type?(nr(l,{shape:c},n),l.useStyle(f)):nr(l,{shape:c,style:f},n),this._updateLabel(n,d,i);var m=u.getShallow("cursor");if(m&&l.attr("cursor",m),t){var v=n.getShallow("highlightPolicy");this._initEvents(l,e,n,v)}this._seriesModel=n||this._seriesModel,this._ecModel=o||this._ecModel,Fo(this)},GO.onEmphasis=function(t){var e=this;this.node.hostTree.root.eachNode(function(i){i.piece&&(e.node===i?i.piece.updateData(!1,i,"emphasis"):_g(i,e.node,t)?i.piece.childAt(0).trigger("highlight"):t!==RO.NONE&&i.piece.childAt(0).trigger("downplay"))})},GO.onNormal=function(){this.node.hostTree.root.eachNode(function(t){t.piece&&t.piece.updateData(!1,t,"normal")})},GO.onHighlight=function(){this.updateData(!1,this.node,"highlight")},GO.onDownplay=function(){this.updateData(!1,this.node,"downplay")},GO._updateLabel=function(t,e,i){function n(t){var e=r.get(t);return null==e?o.get(t):e}var a=this.node.getModel(),o=a.getModel("label"),r="normal"===i||"emphasis"===i?o:a.getModel(i+".label"),s=a.getModel("emphasis.label"),l=r.get("formatter"),u=l?i:"normal",h=D(t.getFormattedLabel(this.node.dataIndex,u,null,null,"label"),this.node.name);n("show")===!1&&(h="");var c=this.node.getLayout(),d=r.get("minAngle");null==d&&(d=o.get("minAngle")),d=d/180*Math.PI;var f=c.endAngle-c.startAngle;null!=d&&Math.abs(f)Math.PI/2?"right":"left"):b&&"center"!==b?"left"===b?(g=c.r0+_,m>Math.PI/2&&(b="right")):"right"===b&&(g=c.r-_,m>Math.PI/2&&(b="left")):(g=(c.r+c.r0)/2,b="center"),p.attr("style",{text:h,textAlign:b,textVerticalAlign:n("verticalAlign")||"middle",opacity:n("opacity")});var w=g*v+c.cx,S=g*y+c.cy;p.attr("position",[w,S]);var M=n("rotate"),I=0;"radial"===M?(I=-m,I<-Math.PI/2&&(I+=Math.PI)):"tangential"===M?(I=Math.PI/2-m,I>Math.PI/2?I-=Math.PI:I<-Math.PI/2&&(I+=Math.PI)):"number"==typeof M&&(I=M*Math.PI/180),p.attr("rotation",I)},GO._initEvents=function(t,e,i,n){t.off("mouseover").off("mouseout").off("emphasis").off("normal");var a=this,o=function(){a.onEmphasis(n)},r=function(){a.onNormal()},s=function(){a.onDownplay()},l=function(){a.onHighlight()};i.isAnimationEnabled()&&t.on("mouseover",o).on("mouseout",r).on("emphasis",o).on("normal",r).on("downplay",s).on("highlight",l)},h(vg,hM);var FO="sunburstRootToNode",WO=(ml.extend({type:"sunburst",init:function(){},render:function(t,e,i,n){function a(t,e){function i(t){return t.getId()}function n(i,n){var a=null==i?null:t[i],r=null==n?null:e[n];o(a,r)}(0!==t.length||0!==e.length)&&new Zu(e,t,i,i).add(n).update(n).remove(x(n,null)).execute()}function o(i,n){if(f||!i||i.getValue()||(i=null),i!==h&&n!==h)if(n&&n.piece)i?(n.piece.updateData(!1,i,"normal",t,e),u.setItemGraphicEl(i.dataIndex,n.piece)):r(n);else if(i){var a=new vg(i,t,e);d.add(a),u.setItemGraphicEl(i.dataIndex,a)}}function r(t){t&&t.piece&&(d.remove(t.piece),t.piece=null)}function s(i,n){if(n.depth>0){l.virtualPiece?l.virtualPiece.updateData(!1,i,"normal",t,e):(l.virtualPiece=new vg(i,t,e),d.add(l.virtualPiece)),n.piece._onclickEvent&&n.piece.off("click",n.piece._onclickEvent);var a=function(){l._rootToNode(n.parentNode)};n.piece._onclickEvent=a,l.virtualPiece.on("click",a)}else l.virtualPiece&&(d.remove(l.virtualPiece),l.virtualPiece=null)}var l=this;this.seriesModel=t,this.api=i,this.ecModel=e;var u=t.getData(),h=u.tree.root,c=t.getViewRoot(),d=this.group,f=t.get("renderLabelForZeroData"),p=[];c.eachNode(function(t){p.push(t)});var g=this._oldChildren||[];if(a(p,g),s(h,c),n&&n.highlight&&n.highlight.piece){var m=t.getShallow("highlightPolicy");n.highlight.piece.onEmphasis(m)}else if(n&&n.unhighlight){var v=this.virtualPiece;!v&&h.children.length&&(v=h.children[0].piece),v&&v.onNormal()}this._initEvents(),this._oldChildren=p},dispose:function(){},_initEvents:function(){var t=this,e=function(e){var i=!1,n=t.seriesModel.getViewRoot();n.eachNode(function(n){if(!i&&n.piece&&n.piece.childAt(0)===e.target){var a=n.getModel().get("nodeClick");if("rootToNode"===a)t._rootToNode(n);else if("link"===a){var o=n.getModel(),r=o.get("link");if(r){var s=o.get("target",!0)||"_blank";$r(r,s)}}i=!0}})};this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",e),this.group._onclickEvent=e},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:FO,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},containPoint:function(t,e){var i=e.getData(),n=i.getItemLayout(0);if(n){var a=t[0]-n.cx,o=t[1]-n.cy,r=Math.sqrt(a*a+o*o);return r<=n.r&&r>=n.r0}}}),"sunburstRootToNode");Cu({type:WO,update:"updateView"},function(t,e){function i(e){var i=Tp(t,[WO],e);if(i){var n=e.getViewRoot();n&&(t.direction=Dp(n,i.node)?"rollUp":"drillDown"),e.resetViewRoot(i.node)}}e.eachComponent({mainType:"series",subType:"sunburst",query:t},i)});var HO="sunburstHighlight";Cu({type:HO,update:"updateView"},function(t,e){function i(e){var i=Tp(t,[HO],e);i&&(t.highlight=i.node)}e.eachComponent({mainType:"series",subType:"sunburst",query:t},i)});var ZO="sunburstUnhighlight";Cu({type:ZO,update:"updateView"},function(t,e){function i(){t.unhighlight=!0}e.eachComponent({mainType:"series",subType:"sunburst",query:t},i)});var XO=Math.PI/180,UO=function(t,e,i){e.eachSeriesByType(t,function(t){var e=t.get("center"),n=t.get("radius");_(n)||(n=[0,n]),_(e)||(e=[e,e]);var a=i.getWidth(),o=i.getHeight(),r=Math.min(a,o),s=Mr(e[0],a),l=Mr(e[1],o),u=Mr(n[0],r/2),h=Mr(n[1],r/2),c=-t.get("startAngle")*XO,d=t.get("minAngle")*XO,p=t.getData().tree.root,g=t.getViewRoot(),m=g.depth,v=t.get("sort");null!=v&&wg(g,v);var y=0;f(g.children,function(t){!isNaN(t.getValue())&&y++});var x=g.getValue(),b=Math.PI/(x||y)*2,w=g.depth>0,S=g.height-(w?-1:1),M=(h-u)/(S||1),I=t.get("clockwise"),T=t.get("stillShowZeroSum"),A=I?1:-1,D=function(t,e){if(t){var i=e;
+if(t!==p){var n=t.getValue(),a=0===x&&T?b:n*b;d>a&&(a=d),i=e+A*a;var o=t.depth-m-(w?-1:1),h=u+M*o,c=u+M*(o+1),g=t.getModel();null!=g.get("r0")&&(h=Mr(g.get("r0"),r/2)),null!=g.get("r")&&(c=Mr(g.get("r"),r/2)),t.setLayout({angle:a,startAngle:e,endAngle:i,clockwise:I,cx:s,cy:l,r0:h,r:c})}if(t.children&&t.children.length){var v=0;f(t.children,function(t){v+=D(t,e+v)})}return i-e}};if(w){var C=u,L=u+M,k=2*Math.PI;p.setLayout({angle:k,startAngle:c,endAngle:c+k,clockwise:I,cx:s,cy:l,r0:C,r:L})}D(g,c)})};Ou(x(cP,"sunburst")),Pu(x(UO,"sunburst")),Au(x(vP,"sunburst"));for(var YO=[126,25],jO=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],qO=0;qOo;o++){var s=t.getName(o);i.set(s,!0),n.push({name:s,value:t.get(e,o),selected:nl(t,o,"selected")})}var l=uN.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return f(l.regions,function(t){var e=t.name;i.get(e)||(n.push({name:e}),a.push(e))}),this.updateSelectedMap(n),t.appendValues([],a),t},getHostGeoModel:function(){var t=this.option.geoIndex;return null!=t?this.dependentModels.geo[t]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},getRawValue:function(t){var e=this.getData();return e.get(e.mapDimension("value"),t)},getRegionModel:function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},formatTooltip:function(t,e,i,n){for(var a=this.getData(),o=Gr(this.getRawValue(t)),r=a.getName(t),s=this.seriesGroup,l=[],u=0;u":"\n";return l.join(", ")+d+Wr(r+" : "+o)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),i=this.coordinateSystem,n=i.getRegion(e);return n&&i.dataToPoint(n.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},nameProperty:"name"}});c(hN,sP),kg.prototype={constructor:kg,draw:function(t,e,i,n,a){var o="geo"===t.mainType,r=t.getData&&t.getData();o&&e.eachComponent({mainType:"series",subType:"map"},function(e){r||e.getHostGeoModel()!==t||(r=e.getData())});var s=t.coordinateSystem;this._updateBackground(s);var l,u=this._regionsGroup,h=this.group,c=s.getTransformInfo(),d=!u.childAt(0)||a;if(d)h.transform=c.roamTransform,h.decomposeTransform(),h.dirty();else{var p=new zS;p.transform=c.roamTransform,p.decomposeTransform();var g={scale:p.scale,position:p.position};l=p.scale,nr(h,g,t)}var m=c.rawScale,v=c.rawPosition;u.removeAll();var y=["itemStyle"],x=["emphasis","itemStyle"],_=["label"],b=["emphasis","label"],w=B();f(s.regions,function(e){var i=w.get(e.name)||w.set(e.name,new hM),n=new HT({segmentIgnoreThreshold:1,shape:{paths:[]}});i.add(n);var a,s=t.getRegionModel(e.name)||t,c=s.getModel(y),p=s.getModel(x),g=Dg(c),S=Dg(p),M=s.getModel(_),I=s.getModel(b);if(r){a=r.indexOfName(e.name);var T=r.getItemVisual(a,"color",!0);T&&(g.fill=T)}var A=function(t){return[t[0]*m[0]+v[0],t[1]*m[1]+v[1]]};f(e.geometries,function(t){if("polygon"===t.type){for(var e=[],i=0;i=0)&&(P=t);var N=new IT({position:A(e.center.slice()),scale:[1/h.scale[0],1/h.scale[1]],z2:10,silent:!0});if(Xo(N.style,N.hoverStyle={},M,I,{labelFetcher:P,labelDataIndex:O,defaultText:e.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),!d){var z=[1/l[0],1/l[1]];nr(N,{scale:z},t)}i.add(N)}if(r)r.setItemGraphicEl(a,i);else{var s=t.getRegionModel(e.name);n.eventData={componentType:"geo",componentIndex:t.componentIndex,geoIndex:t.componentIndex,name:e.name,region:s&&s.option||{}}}var E=i.__regions||(i.__regions=[]);E.push(e),i.highDownSilentOnTouch=!!t.get("selectedMode"),Fo(i,S),u.add(i)}),this._updateController(t,e,i),Cg(this,t,u,i,n),Lg(t,u)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&uN.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(t){var e=t.map;this._mapName!==e&&f(uN.makeGraphic(e,this.uid),function(t){this._backgroundGroup.add(t)},this),this._mapName=e},_updateController:function(t,e,i){function n(){var e={type:"geoRoam",componentType:l};return e[l+"Id"]=t.id,e}var a=t.coordinateSystem,o=this._controller,s=this._controllerHost;s.zoomLimit=t.get("scaleLimit"),s.zoom=a.getZoom(),o.enable(t.get("roam")||!1);var l=t.mainType;o.off("pan").on("pan",function(t){this._mouseDownFlag=!1,tp(s,t.dx,t.dy),i.dispatchAction(r(n(),{dx:t.dx,dy:t.dy}))},this),o.off("zoom").on("zoom",function(t){if(this._mouseDownFlag=!1,ep(s,t.scale,t.originX,t.originY),i.dispatchAction(r(n(),{zoom:t.scale,originX:t.originX,originY:t.originY})),this._updateGroup){var e=this.group.scale;this._regionsGroup.traverse(function(t){"text"===t.type&&t.attr("scale",[1/e[0],1/e[1]])})}},this),o.setPointerChecker(function(e,n,o){return a.getViewRectAfterRoam().contain(n,o)&&!gp(e,i,t)})}};var cN="__seriesMapHighDown",dN="__seriesMapCallKey";Vu({type:"map",render:function(t,e,i,n){if(!n||"mapToggleSelect"!==n.type||n.from!==this.uid){var a=this.group;if(a.removeAll(),!t.getHostGeoModel()){if(n&&"geoRoam"===n.type&&"series"===n.componentType&&n.seriesId===t.id){var o=this._mapDraw;o&&a.add(o.group)}else if(t.needsDrawMap){var o=this._mapDraw||new kg(i,!0);a.add(o.group),o.draw(t,e,i,this,n),this._mapDraw=o}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,i)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(t){var e=t.originalData,i=this.group;e.each(e.mapDimension("value"),function(n,a){if(!isNaN(n)){var o=e.getItemLayout(a);if(o&&o.point){var s=o.point,l=o.offset,u=new TT({style:{fill:t.getData().getVisual("color")},shape:{cx:s[0]+9*l,cy:s[1],r:3},silent:!0,z2:8+(l?0:$T+1)});if(!l){var h=t.mainSeries.getData(),c=e.getName(a),d=h.indexOfName(c),f=e.getItemModel(a),p=f.getModel("label"),g=f.getModel("emphasis.label"),m=h.getItemGraphicEl(d),v=C(t.getFormattedLabel(d,"normal"),c),y=C(t.getFormattedLabel(d,"emphasis"),v),_=m[cN],b=Math.random();if(!_){_=m[cN]={};var w=x(Pg,!0),S=x(Pg,!1);m.on("mouseover",w).on("mouseout",S).on("emphasis",w).on("normal",S)}m[dN]=b,r(_,{recordVersion:b,circle:u,labelModel:p,hoverLabelModel:g,emphasisText:y,normalText:v}),Og(_,!1)}i.add(u)}}})}}),Cu({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,e){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},function(e){var n=e.coordinateSystem;if("geo"===n.type){var a=wp(n,t,e.get("scaleLimit"));e.setCenter&&e.setCenter(a.center),e.setZoom&&e.setZoom(a.zoom),"series"===i&&f(e.seriesGroup,function(t){t.setCenter(a.center),t.setZoom(a.zoom)})}})}),Ng.prototype={constructor:Ng,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,i=0;ia;a++)e[a]=e[a]||[],e[a][0]=this._flatCoords[i+2*a],e[a][1]=this._flatCoords[i+2*a+1];return n}for(var o=this._getCoordsFromItemModel(t),a=0;al;){s++;var u=t[l++];n[r++]=o+e,n[r++]=u;for(var h=0;u>h;h++){var c=t[l++],d=t[l++];a[o++]=c,a[o++]=d}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,r),flatCoords:a,count:s}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},getInitialData:function(t){var e=new nL(["value"],this);return e.hasItemOption=!1,e.initData(t.data,[],function(t,i,n,a){if(t instanceof Array)return 0/0;e.hasItemOption=!0;var o=t.value;return null!=o?o instanceof Array?o[a]:o:void 0}),e},formatTooltip:function(t){var e=this.getData(),i=e.getItemModel(t),n=i.get("name");if(n)return n;var a=i.get("fromName"),o=i.get("toName"),r=[];return null!=a&&r.push(a),null!=o&&r.push(o),Wr(r.join(" > "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}}),bN=VT.prototype,wN=FT.prototype,SN=yo({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){this[Gg(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:bN.buildPath,_buildPathCurve:wN.buildPath,pointAt:function(t){return this[Gg(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:bN.pointAt,_pointAtCurve:wN.pointAt,tangentAt:function(t){var e=this.shape,i=Gg(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return te(i,i)},_tangentAtCurve:wN.tangentAt}),MN=["fromSymbol","toSymbol"],IN=Ug.prototype;IN.beforeUpdate=Xg,IN._createLine=function(t,e,i){var n=t.hostModel,a=t.getItemLayout(e),o=Hg(a);o.shape.percent=0,ar(o,{shape:{percent:1}},n,e),this.add(o);var r=new IT({name:"label",lineLabelOriginalOpacity:1});this.add(r),f(MN,function(i){var n=Wg(i,t,e);this.add(n),this[Fg(i)]=t.getItemVisual(e,i)},this),this._updateCommonStl(t,e,i)},IN.updateData=function(t,e,i){var n=t.hostModel,a=this.childOfName("line"),o=t.getItemLayout(e),r={shape:{}};Zg(r.shape,o),nr(a,r,n,e),f(MN,function(i){var n=t.getItemVisual(e,i),a=Fg(i);if(this[a]!==n){this.remove(this.childOfName(i));var o=Wg(i,t,e);this.add(o)}this[a]=n},this),this._updateCommonStl(t,e,i)},IN._updateCommonStl=function(t,e,i){var n=t.hostModel,a=this.childOfName("line"),o=i&&i.lineStyle,r=i&&i.hoverLineStyle,l=i&&i.labelModel,u=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var h=t.getItemModel(e);o=h.getModel("lineStyle").getLineStyle(),r=h.getModel("emphasis.lineStyle").getLineStyle(),l=h.getModel("label"),u=h.getModel("emphasis.label")}var c=t.getItemVisual(e,"color"),d=L(t.getItemVisual(e,"opacity"),o.opacity,1);a.useStyle(s({strokeNoScale:!0,fill:"none",stroke:c,opacity:d},o)),a.hoverStyle=r,f(MN,function(t){var e=this.childOfName(t);e&&(e.setColor(c),e.setStyle({opacity:d}))},this);var p,g,m=l.getShallow("show"),v=u.getShallow("show"),y=this.childOfName("label");if((m||v)&&(p=c||"#000",g=n.getFormattedLabel(e,"normal",t.dataType),null==g)){var x=n.getRawValue(e);g=null==x?t.getName(e):isFinite(x)?Ir(x):x}var b=m?g:null,w=v?C(n.getFormattedLabel(e,"emphasis",t.dataType),g):null,S=y.style;if(null!=b||null!=w){Yo(y.style,l,{text:b},{autoColor:p}),y.__textAlign=S.textAlign,y.__verticalAlign=S.textVerticalAlign,y.__position=l.get("position")||"middle";var M=l.get("distance");_(M)||(M=[M,M]),y.__labelDistance=M}y.hoverStyle=null!=w?{text:w,textFill:u.getTextColor(!0),fontStyle:u.getShallow("fontStyle"),fontWeight:u.getShallow("fontWeight"),fontSize:u.getShallow("fontSize"),fontFamily:u.getShallow("fontFamily")}:{text:null},y.ignore=!m&&!v,Fo(this)},IN.highlight=function(){this.trigger("emphasis")},IN.downplay=function(){this.trigger("normal")},IN.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},IN.setLinePoints=function(t){var e=this.childOfName("line");Zg(e.shape,t),e.dirty()},h(Ug,hM);var TN=Yg.prototype;TN.isPersistent=function(){return!0},TN.updateData=function(t){var e=this,i=e.group,n=e._lineData;e._lineData=t,n||i.removeAll();var a=$g(t);t.diff(n).add(function(i){jg(e,t,i,a)}).update(function(i,o){qg(e,n,t,o,i,a)}).remove(function(t){i.remove(n.getItemGraphicEl(t))}).execute()},TN.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,i){e.updateLayout(t,i)},this)},TN.incrementalPrepareUpdate=function(t){this._seriesScope=$g(t),this._lineData=null,this.group.removeAll()},TN.incrementalUpdate=function(t,e){function i(t){t.isGroup||Kg(t)||(t.incremental=t.useHoverLayer=!0)}for(var n=t.start;n0&&(r=this.getLineLength(n)/l*1e3),r!==this._period||s!==this._loop){n.stopAnimation();var c=u;h&&(c=u(i)),n.__t>0&&(c=-r*n.__t),n.__t=0;var d=n.animate("",s).when(r,{__t:1}).delay(c).during(function(){a.updateSymbolPosition(n)});s||d.done(function(){a.remove(n)}),d.start()}this._period=r,this._loop=s}},AN.getLineLength=function(t){return pS(t.__p1,t.__cp1)+pS(t.__cp1,t.__p2)},AN.updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},AN.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},AN.updateSymbolPosition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,a=t.__t,o=t.position,r=[o[0],o[1]],s=Pa,l=Oa;o[0]=s(e[0],n[0],i[0],a),o[1]=s(e[1],n[1],i[1],a);var u=l(e[0],n[0],i[0],a),h=l(e[1],n[1],i[1],a);if(t.rotation=-Math.atan2(h,u)-Math.PI/2,"line"===this._symbolType||"rect"===this._symbolType||"roundRect"===this._symbolType)if(void 0!==t.__lastT&&t.__lastT=0&&!(n[o]<=e);o--);o=Math.min(o,a-2)}else{for(var o=r;a>o&&!(n[o]>e);o++);o=Math.min(o-1,a-2)}ae(t.position,i[o],i[o+1],(e-n[o])/(n[o+1]-n[o]));var l=i[o+1][0]-i[o][0],u=i[o+1][1]-i[o][1];t.rotation=-Math.atan2(u,l)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=e,t.ignore=!1}},h(im,tm);var LN=yo({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var i=e.segs,n=e.curveness;if(e.polyline)for(var a=0;a0){t.moveTo(i[a++],i[a++]);for(var r=1;o>r;r++)t.lineTo(i[a++],i[a++])}}else for(var a=0;a0){var c=(s+u)/2-(l-h)*n,d=(l+h)/2-(u-s)*n;t.quadraticCurveTo(c,d,u,h)}else t.lineTo(u,h)}},findDataIndex:function(){var t=this.shape,e=t.segs,i=t.curveness;if(t.polyline)for(var n=0,a=0;a0)for(var r=e[a++],s=e[a++],l=1;o>l;l++){var u=e[a++],h=e[a++];if(Ha(r,s,u,h))return n}n++}else for(var n=0,a=0;a0){var c=(r+u)/2-(s-h)*i,d=(s+h)/2-(u-r)*i;if(Xa(r,s,c,d,u,h))return n}else if(Ha(r,s,u,h))return n;n++}return-1}}),kN=nm.prototype;kN.isPersistent=function(){return!this._incremental},kN.updateData=function(t){this.group.removeAll();var e=new LN({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},kN.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new vo({silent:!0})),this.group.add(this._incremental)):this._incremental=null},kN.incrementalUpdate=function(t,e){var i=new LN;i.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(i,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(i,!0):(i.rectHover=!0,i.cursor="default",i.__startIndex=t.start,this.group.add(i))},kN.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},kN._setCommon=function(t,e,i){var n=e.hostModel;t.setShape({polyline:n.get("polyline"),curveness:n.get("lineStyle.curveness")}),t.useStyle(n.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var a=e.getVisual("color");a&&t.setStyle("stroke",a),t.setStyle("fill"),i||(t.seriesIndex=n.seriesIndex,t.on("mousemove",function(e){t.dataIndex=null;var i=t.findDataIndex(e.offsetX,e.offsetY);i>0&&(t.dataIndex=i+t.__startIndex)}))},kN._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var PN={seriesType:"lines",plan:SD(),reset:function(t){function e(e,o){var r=[];if(a){var s,l=e.end-e.start;if(n){for(var u=0,h=e.start;hp;p++)d=i.dataToPoint(r[p],!1,d),s[c++]=d[0],s[c++]=d[1]}o.setLayout("linesPoints",s)}else for(var h=e.start;hv;v++)m.push(i.dataToPoint(r[v]));else{m[0]=i.dataToPoint(r[0]),m[1]=i.dataToPoint(r[1]);var y=g.get("lineStyle.curveness");+y&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*y,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*y])}o.setItemLayout(h,m)}}var i=t.coordinateSystem,n=t.get("polyline"),a=t.pipelineContext.large;return{progress:e}}};Vu({type:"lines",init:function(){},render:function(t,e,i){var n=t.getData(),a=this._updateLineDraw(n,t),o=t.get("zlevel"),r=t.get("effect.trailLength"),s=i.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(o).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&r&&(l||s.configLayer(o,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(r/10+.9,1),0)})),a.updateData(n);var u=t.get("clip",!0)&&Fc(t.coordinateSystem,!1,t);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=o,this._finished=!0},incrementalPrepareRender:function(t,e,i){var n=t.getData(),a=this._updateLineDraw(n,t);a.incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},incrementalRender:function(t,e){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData(),a=t.pipelineContext;if(!this._finished||a.large||a.progressiveRender)return{update:!0};var o=PN.reset(t);o.progress&&o.progress({start:0,end:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},_updateLineDraw:function(t,e){var i=this._lineDraw,n=this._showEffect(e),a=!!e.get("polyline"),o=e.pipelineContext,r=o.large;return i&&n===this._hasEffet&&a===this._isPolyline&&r===this._isLargeDraw||(i&&i.remove(),i=this._lineDraw=r?new nm:new Yg(a?n?im:em:n?tm:Ug),this._hasEffet=n,this._isPolyline=a,this._isLargeDraw=r,this.group.removeAll()),this.group.add(i.group),i},_showEffect:function(t){return!!t.get("effect.show")},_clearLayer:function(t){var e=t.getZr(),i="svg"===e.painter.getType();i||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},dispose:function(){}});var ON="lineStyle.opacity".split("."),NN={seriesType:"lines",reset:function(t){function e(t,e){var i=t.getItemModel(e),n=am(i.getShallow("symbol",!0)),a=am(i.getShallow("symbolSize",!0)),o=i.get(ON);n[0]&&t.setItemVisual(e,"fromSymbol",n[0]),n[1]&&t.setItemVisual(e,"toSymbol",n[1]),a[0]&&t.setItemVisual(e,"fromSymbolSize",a[0]),a[1]&&t.setItemVisual(e,"toSymbolSize",a[1]),t.setItemVisual(e,"opacity",o)}var i=am(t.get("symbol")),n=am(t.get("symbolSize")),a=t.getData();return a.setVisual("fromSymbol",i&&i[0]),a.setVisual("toSymbol",i&&i[1]),a.setVisual("fromSymbolSize",n&&n[0]),a.setVisual("toSymbolSize",n&&n[1]),a.setVisual("opacity",t.get(ON)),{dataEach:a.hasItemOption?e:null}}};Pu(PN),Ou(NN);var zN=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},EN=zN.prototype;EN.type="graph",EN.isDirected=function(){return this._directed},EN.addNode=function(t,e){t=null==t?""+e:""+t;var i=this._nodesMap;if(!i[om(t)]){var n=new rm(t,e);return n.hostGraph=this,this.nodes.push(n),i[om(t)]=n,n}},EN.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},EN.getNodeById=function(t){return this._nodesMap[om(t)]},EN.addEdge=function(t,e,i){var n=this._nodesMap,a=this._edgesMap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),rm.isInstance(t)||(t=n[om(t)]),rm.isInstance(e)||(e=n[om(e)]),t&&e){var o=t.id+"-"+e.id,r=new sm(t,e,i);return r.hostGraph=this,this._directed&&(t.outEdges.push(r),e.inEdges.push(r)),t.edges.push(r),t!==e&&e.edges.push(r),this.edges.push(r),a[o]=r,r}},EN.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);
+return this.edges[e]},EN.getEdge=function(t,e){rm.isInstance(t)&&(t=t.id),rm.isInstance(e)&&(e=e.id);var i=this._edgesMap;return this._directed?i[t+"-"+e]:i[t+"-"+e]||i[e+"-"+t]},EN.eachNode=function(t,e){for(var i=this.nodes,n=i.length,a=0;n>a;a++)i[a].dataIndex>=0&&t.call(e,i[a],a)},EN.eachEdge=function(t,e){for(var i=this.edges,n=i.length,a=0;n>a;a++)i[a].dataIndex>=0&&i[a].node1.dataIndex>=0&&i[a].node2.dataIndex>=0&&t.call(e,i[a],a)},EN.breadthFirstTraverse=function(t,e,i,n){if(rm.isInstance(e)||(e=this._nodesMap[om(e)]),e){for(var a="out"===i?"outEdges":"in"===i?"inEdges":"edges",o=0;oa;a++)i[a].dataIndex=-1;for(var a=0,o=t.count();o>a;a++)i[t.getRawIndex(a)].dataIndex=a;e.filterSelf(function(t){var i=n[e.getRawIndex(t)];return i.node1.dataIndex>=0&&i.node2.dataIndex>=0});for(var a=0,o=n.length;o>a;a++)n[a].dataIndex=-1;for(var a=0,o=e.count();o>a;a++)n[e.getRawIndex(a)].dataIndex=a},EN.clone=function(){for(var t=new zN(this._directed),e=this.nodes,i=this.edges,n=0;n=0&&this[t][e].setItemVisual(this.dataIndex,i,n)},getVisual:function(i,n){return this[t][e].getItemVisual(this.dataIndex,i,n)},setLayout:function(i,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,i,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}};c(rm,RN("hostGraph","data")),c(sm,RN("hostGraph","edgeData")),zN.Node=rm,zN.Edge=sm,_a(rm),_a(sm);var BN=function(t,e,i,n,a){for(var o=new zN(n),r=0;r "+f)),h++)}var p,g=i.get("coordinateSystem");if("cartesian2d"===g||"polar"===g)p=xh(t,i);else{var m=Ls.get(g),v=m&&"view"!==m.type?m.dimensions||[]:[];u(v,"value")<0&&v.concat(["value"]);var y=rL(t,{coordDimensions:v});p=new nL(y,i),p.initData(t)}var x=new nL(["value"],i);return x.initData(l,s),a&&a(p,x),Df({mainData:p,struct:o,structAttr:"graph",datas:{node:p,edge:x},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o},VN="-->",GN=function(t){return t.get("autoCurveness")||null},FN=function(t,e){var i=GN(t),n=20,a=[];if("number"==typeof i)n=i;else if(_(i))return void(t.__curvenessList=i);e>n&&(n=e);var o=n%2?n+2:n+3;a=[];for(var r=0;o>r;r++)a.push((r%2?r+1:r)/10*(r%2?-1:1));t.__curvenessList=a},WN=function(t,e,i){var n=[t.id,t.dataIndex].join("."),a=[e.id,e.dataIndex].join(".");return[i.uid,n,a].join(VN)},HN=function(t){var e=t.split(VN);return[e[0],e[2],e[1]].join(VN)},ZN=function(t,e){var i=WN(t.node1,t.node2,e);return e.__edgeMap[i]},XN=function(t,e){var i=UN(WN(t.node1,t.node2,e),e),n=UN(WN(t.node2,t.node1,e),e);return i+n},UN=function(t,e){var i=e.__edgeMap;return i[t]?i[t].length:0},YN=Bu({type:"series.graph",init:function(t){function e(){return i._categoriesData}YN.superApply(this,"init",arguments);var i=this;this.legendVisualProvider=new $d(e,e),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){YN.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){YN.superApply(this,"mergeDefaultAndTheme",arguments),ea(t,["edgeLabel"],["show"])},getInitialData:function(t,e){function i(t,i){function n(t){return t=this.parsePath(t),t&&"label"===t[0]?r:t&&"emphasis"===t[0]&&"label"===t[1]?l:this.parentModel}t.wrapMethod("getItemModel",function(t){var e=o._categoriesModels,i=t.getShallow("category"),n=e[i];return n&&(n.parentModel=t.parentModel,t.parentModel=n),t});var a=o.getModel("edgeLabel"),r=new mr({label:a.option},a.parentModel,e),s=o.getModel("emphasis.edgeLabel"),l=new mr({emphasis:{label:s.option}},s.parentModel,e);i.wrapMethod("getItemModel",function(t){return t.customizeGetParent(n),t})}var n=t.edges||t.links||[],a=t.data||t.nodes||[],o=this;if(a&&n){lm(this);var r=BN(a,n,this,!0,i);return f(r.edges,function(t){um(t.node1,t.node2,this,t.dataIndex)},this),r.data}},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getData(),a=this.getDataParams(t,i),o=n.graph.getEdgeByIndex(t),r=n.getName(o.node1.dataIndex),s=n.getName(o.node2.dataIndex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=Wr(l.join(" > ")),a.value&&(l+=" : "+Wr(a.value)),l}return YN.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=p(this.option.categories||[],function(t){return null!=t.value?t:r({value:0},t)}),e=new nL(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t,!0)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return YN.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,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:{label:{show:!0}}}}),jN=[],qN=[],KN=[],$N=Pa,JN=gS,QN=Math.abs,tz=function(t,e){var i=[],n=Ea,a=[[],[],[]],o=[[],[]],r=[];e/=2,t.eachEdge(function(t){var s=t.getLayout(),l=t.getVisual("fromSymbol"),u=t.getVisual("toSymbol");s.__original||(s.__original=[H(s[0]),H(s[1])],s[2]&&s.__original.push(H(s[2])));var h=s.__original;if(null!=s[2]){if(W(a[0],h[0]),W(a[1],h[2]),W(a[2],h[1]),l&&"none"!==l){var c=dm(t.node1),d=fm(a,h[0],c*e);n(a[0][0],a[1][0],a[2][0],d,i),a[0][0]=i[3],a[1][0]=i[4],n(a[0][1],a[1][1],a[2][1],d,i),a[0][1]=i[3],a[1][1]=i[4]}if(u&&"none"!==u){var c=dm(t.node2),d=fm(a,h[1],c*e);n(a[0][0],a[1][0],a[2][0],d,i),a[1][0]=i[1],a[2][0]=i[2],n(a[0][1],a[1][1],a[2][1],d,i),a[1][1]=i[1],a[2][1]=i[2]}W(s[0],a[0]),W(s[1],a[2]),W(s[2],a[1])}else{if(W(o[0],h[0]),W(o[1],h[1]),Y(r,o[1],o[0]),te(r,r),l&&"none"!==l){var c=dm(t.node1);U(o[0],o[0],r,c*e)}if(u&&"none"!==u){var c=dm(t.node2);U(o[1],o[1],r,-c*e)}W(s[0],o[0]),W(s[1],o[1])}})},ez="__focusNodeAdjacency",iz="__unfocusNodeAdjacency",nz=["itemStyle","opacity"],az=["lineStyle","opacity"];Vu({type:"graph",init:function(t,e){var i=new Cd,n=new Yg,a=this.group;this._controller=new rp(e.getZr()),this._controllerHost={target:a},a.add(i.group),a.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._firstRender=!0},render:function(t,e,i){var n=this,a=t.coordinateSystem;this._model=t;var o=this._symbolDraw,r=this._lineDraw,s=this.group;if("view"===a.type){var l={position:a.position,scale:a.scale};this._firstRender?s.attr(l):nr(s,l,t)}tz(t.getGraph(),cm(t));var u=t.getData();o.updateData(u);var h=t.getEdgeData();r.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,e,i),clearTimeout(this._layoutTimeout);var c=t.forceLayout,d=t.get("force.layoutAnimation");c&&this._startForceLayoutIteration(c,d),u.eachItemGraphicEl(function(e,a){var o=u.getItemModel(a);e.off("drag").off("dragend");var r=o.get("draggable");r&&e.on("drag",function(){c&&(c.warmUp(),!this._layouting&&this._startForceLayoutIteration(c,d),c.setFixed(a),u.setItemLayout(a,e.position))},this).on("dragend",function(){c&&c.setUnfixed(a)},this),e.setDraggable(r&&c),e[ez]&&e.off("mouseover",e[ez]),e[iz]&&e.off("mouseout",e[iz]),o.get("focusNodeAdjacency")&&(e.on("mouseover",e[ez]=function(){n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex})}),e.on("mouseout",e[iz]=function(){n._dispatchUnfocus(i)}))},this),u.graph.eachEdge(function(e){var a=e.getGraphicEl();a[ez]&&a.off("mouseover",a[ez]),a[iz]&&a.off("mouseout",a[iz]),e.getModel().get("focusNodeAdjacency")&&(a.on("mouseover",a[ez]=function(){n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex})}),a.on("mouseout",a[iz]=function(){n._dispatchUnfocus(i)}))});var f="circular"===t.get("layout")&&t.get("circular.rotateLabel"),p=u.getLayout("cx"),g=u.getLayout("cy");u.eachItemGraphicEl(function(t,e){var i=u.getItemModel(e),n=i.get("label.rotate")||0,a=t.getSymbolPath();if(f){var o=u.getItemLayout(e),r=Math.atan2(o[1]-g,o[0]-p);0>r&&(r=2*Math.PI+r);var s=o[0]e&&(e=0),e*=u;var i=Math.asin(e/2/a);isNaN(i)&&(i=hz/2),cz[t.dataIndex]=i,l+=2*i});var h=(2*hz-l)/s/2,c=0;i.eachNode(function(t){var e=h+cz[t.dataIndex];c+=e,t.setLayout([a*Math.cos(c)+o,a*Math.sin(c)+r]),c+=e})}},fz=function(t){t.eachSeriesByType("graph",function(t){"circular"===t.get("layout")&&_m(t,"symbolSize")})},pz=U,gz=function(t){t.eachSeriesByType("graph",function(t){var e=t.coordinateSystem;if(!e||"view"===e.type)if("force"===t.get("layout")){var i=t.preservedPoints||{},n=t.getGraph(),a=n.data,o=n.edgeData,r=t.getModel("force"),s=r.get("initLayout");t.preservedPoints?a.each(function(t){var e=a.getId(t);a.setItemLayout(t,i[e]||[0/0,0/0])}):s&&"none"!==s?"circular"===s&&_m(t,"value"):ym(t);var l=a.getDataExtent("value"),u=o.getDataExtent("value"),h=r.get("repulsion"),c=r.get("edgeLength");_(h)||(h=[h,h]),_(c)||(c=[c,c]),c=[c[1],c[0]];var d=a.mapArray("value",function(t,e){var i=a.getItemLayout(e),n=Sr(t,l,h);return isNaN(n)&&(n=(h[0]+h[1])/2),{w:n,rep:n,fixed:a.getItemModel(e).get("fixed"),p:!i||isNaN(i[0])||isNaN(i[1])?null:i}}),f=o.mapArray("value",function(e,i){var a=n.getEdgeByIndex(i),o=Sr(e,u,c);isNaN(o)&&(o=(c[0]+c[1])/2);var r=a.getModel(),s=L(r.get("lineStyle.curveness"),-hm(a,t,i,!0),0);return{n1:d[a.node1.dataIndex],n2:d[a.node2.dataIndex],d:o,curveness:s,ignoreForceLayout:r.get("ignoreForceLayout")}}),e=t.coordinateSystem,p=e.getBoundingRect(),g=bm(d,f,{rect:p,gravity:r.get("gravity"),friction:r.get("friction")}),m=g.step;g.step=function(t){for(var e=0,o=d.length;o>e;e++)d[e].fixed&&W(d[e].p,n.getNodeByIndex(e).getLayout());m(function(e,o,r){for(var s=0,l=e.length;l>s;s++)e[s].fixed||n.getNodeByIndex(s).setLayout(e[s].p),i[a.getId(s)]=e[s].p;for(var s=0,l=o.length;l>s;s++){var u=o[s],h=n.getEdgeByIndex(s),c=u.n1.p,d=u.n2.p,f=h.getLayout();f=f?f.slice():[],f[0]=f[0]||[],f[1]=f[1]||[],W(f[0],c),W(f[1],d),+u.curveness&&(f[2]=[(c[0]+d[0])/2-(c[1]-d[1])*u.curveness,(c[1]+d[1])/2-(d[0]-c[0])*u.curveness]),h.setLayout(f)}t&&t(r)})},t.forceLayout=g,t.preservedPoints=i,g.step()}else t.forceLayout=null})},mz=function(t,e){var i=[];return t.eachSeriesByType("graph",function(t){var n=t.get("coordinateSystem");if(!n||"view"===n){var a=t.getData(),o=a.mapArray(function(t){var e=a.getItemModel(t);return[+e.get("x"),+e.get("y")]}),r=[],s=[];Ba(o,r,s),s[0]-r[0]===0&&(s[0]+=1,r[0]-=1),s[1]-r[1]===0&&(s[1]+=1,r[1]-=1);var l=(s[0]-r[0])/(s[1]-r[1]),u=wm(t,e,l);isNaN(l)&&(r=[u.x,u.y],s=[u.x+u.width,u.y+u.height]);var h=s[0]-r[0],c=s[1]-r[1],d=u.width,f=u.height,p=t.coordinateSystem=new Jf;p.zoomLimit=t.get("scaleLimit"),p.setBoundingRect(r[0],r[1],h,c),p.setViewRect(u.x,u.y,d,f),p.setCenter(t.get("center")),p.setZoom(t.get("zoom")),i.push(p)}}),i};Au(rz),Ou(eP("graph","circle",null)),Ou(sz),Ou(lz),Pu(uz),Pu(MC.VISUAL.POST_CHART_LAYOUT,fz),Pu(gz),Lu("graphView",{create:mz});var vz=_D.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}});c(vz,SP,!0);var yz=["itemStyle"],xz=["emphasis","itemStyle"],_z=(ml.extend({type:"boxplot",render:function(t){var e=t.getData(),i=this.group,n=this._data;this._data||i.removeAll();var a="horizontal"===t.get("layout")?1:0;e.diff(n).add(function(t){if(e.hasValue(t)){var n=e.getItemLayout(t),o=Sm(n,e,t,a,!0);e.setItemGraphicEl(t,o),i.add(o)}}).update(function(t,o){var r=n.getItemGraphicEl(o);if(!e.hasValue(t))return void i.remove(r);var s=e.getItemLayout(t);r?Mm(s,r,e,t):r=Sm(s,e,t,a),i.add(r),e.setItemGraphicEl(t,r)}).remove(function(t){var e=n.getItemGraphicEl(t);e&&i.remove(e)}).execute(),this._data=e},remove:function(){var t=this.group,e=this._data;this._data=null,e&&e.eachItemGraphicEl(function(e){e&&t.remove(e)})},dispose:G}),no.extend({type:"boxplotBoxPath",shape:{},buildPath:function(t,e){var i=e.points,n=0;for(t.moveTo(i[n][0],i[n][1]),n++;4>n;n++)t.lineTo(i[n][0],i[n][1]);for(t.closePath();no&&(e[1-n]=e[n]+c.sign*o),e},Dz=f,Cz=Math.min,Lz=Math.max,kz=Math.floor,Pz=Math.ceil,Oz=Ir,Nz=Math.PI;Om.prototype={type:"parallel",constructor:Om,_init:function(t,e){var i=t.dimensions,n=t.parallelAxisIndex;Dz(i,function(t,i){var a=n[i],o=e.getComponent("parallelAxis",a),r=this._axesMap.set(t,new Tz(t,Uh(o),[0,0],o.get("type"),a)),s="category"===r.type;r.onBand=s&&o.get("boundaryGap"),r.inverse=o.get("inverse"),o.axis=r,r.model=o,r.coordinateSystem=o.coordinateSystem=this},this)},update:function(t){this._updateAxesFromSeries(this._model,t)},containPoint:function(t){var e=this._makeLayoutInfo(),i=e.axisBase,n=e.layoutBase,a=e.pixelDimIndex,o=t[1-a],r=t[a];return o>=i&&o<=i+e.axisLength&&r>=n&&r<=n+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(t,e){e.eachSeries(function(i){if(t.contains(i,e)){var n=i.getData();Dz(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,n.mapDimension(t)),Xh(e.scale,e.model)},this)}},this)},resize:function(t,e){this._rect=ts(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t,e=this._model,i=this._rect,n=["x","y"],a=["width","height"],o=e.get("layout"),r="horizontal"===o?0:1,s=i[a[r]],l=[0,s],u=this.dimensions.length,h=Nm(e.get("axisExpandWidth"),l),c=Nm(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,f=e.get("axisExpandWindow");if(f)t=Nm(f[1]-f[0],l),f[1]=f[0]+t;else{t=Nm(h*(c-1),l);var p=e.get("axisExpandCenter")||kz(u/2);f=[h*p-t/2],f[1]=f[0]+t}var g=(s-t)/(u-c);3>g&&(g=0);var m=[kz(Oz(f[0]/h,1))+1,Pz(Oz(f[1]/h,1))-1],v=g/h*f[0];return{layout:o,pixelDimIndex:r,layoutBase:i[n[r]],layoutLength:s,axisBase:i[n[1-r]],axisLength:i[a[1-r]],axisExpandable:d,axisExpandWidth:h,axisCollapseWidth:g,axisExpandWindow:f,axisCount:u,winInnerIndices:m,axisExpandWindow0Pos:v}},_layoutAxes:function(){var t=this._rect,e=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),a=n.layout;e.each(function(t){var e=[0,n.axisLength],i=t.inverse?1:0;t.setExtent(e[i],e[1-i])}),Dz(i,function(e,i){var o=(n.axisExpandable?Em:zm)(i,n),r={horizontal:{x:o.position,y:n.axisLength},vertical:{x:0,y:o.position}},s={horizontal:Nz/2,vertical:0},l=[r[a].x+t.x,r[a].y+t.y],u=s[a],h=Oe();Be(h,h,u),Re(h,h,l),this._axesLayout[e]={position:l,rotation:u,transform:h,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(t,e,i,n){null==i&&(i=0),null==n&&(n=t.count());var a=this._axesMap,o=this.dimensions,r=[],s=[];f(o,function(e){r.push(t.mapDimension(e)),s.push(a.get(e).model)});for(var l=this.hasAxisBrushed(),u=i;n>u;u++){var h;if(l){h="active";for(var c=t.getValues(r,u),d=0,p=o.length;p>d;d++){var g=s[d].getActiveState(c[d]);if("inactive"===g){h="inactive";break}}}else h="normal";e(h,u)}},hasAxisBrushed:function(){for(var t=this.dimensions,e=this._axesMap,i=!1,n=0,a=t.length;a>n;n++)"normal"!==e.get(t[n]).model.getActiveState()&&(i=!0);return i},axisCoordToPoint:function(t,e){var i=this._axesLayout[e];return rr([t,0],i.transform)},getAxisLayout:function(t){return n(this._axesLayout[t])},getSlidedAxisExpandWindow:function(t){var e=this._makeLayoutInfo(),i=e.pixelDimIndex,n=e.axisExpandWindow.slice(),a=n[1]-n[0],o=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:n};var r,s=t[i]-e.layoutBase-e.axisExpandWindow0Pos,l="slide",u=e.axisCollapseWidth,h=this._model.get("axisExpandSlideTriggerArea"),c=null!=h[0];if(u)c&&u&&sa*(1-h[0])?(l="jump",r=s-a*(1-h[2])):(r=s-a*h[1])>=0&&(r=s-a*(1-h[1]))<=0&&(r=0),r*=e.axisExpandWidth/u,r?Az(r,n,o,"all"):l="none";else{var a=n[1]-n[0],d=o[1]*s/a;n=[Lz(0,d-a/2)],n[1]=Cz(o[1],n[0]+a),n[0]=n[1]-a}return{axisExpandWindow:n,behavior:l}}},Ls.register("parallel",{create:Rm});var zz=OA.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return yI([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=n(t);if(e)for(var i=e.length-1;i>=0;i--)Tr(e[i])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var i=e[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,a=e.length;a>n;n++)if(e[n][0]<=t&&t<=e[n][1])return"active";return"inactive"}}),Ez={type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};a(zz.prototype,RL),sk("parallel",zz,Bm,Ez),OA.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,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},init:function(){OA.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&a(e,t,!0),this._initDimensions()},contains:function(t,e){var i=t.get("parallelIndex");return null!=i&&e.getComponent("parallel",i)===this},setAxisExpand:function(t){f(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])},this)},_initDimensions:function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[],i=m(this.dependentModels.parallelAxis,function(t){return(t.get("parallelIndex")||0)===this.componentIndex},this);f(i,function(i){t.push("dim"+i.get("dim")),e.push(i.componentIndex)})}});var Rz={type:"axisAreaSelect",event:"axisAreaSelected"};Cu(Rz,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(e){e.axis.model.setActiveIntervals(t.intervals)})}),Cu("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(e){e.setAxisExpand(t)})});var Bz=x,Vz=f,Gz=p,Fz=Math.min,Wz=Math.max,Hz=Math.pow,Zz=1e4,Xz=6,Uz=6,Yz="globalPan",jz={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},qz={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},Kz={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},$z=0;Vm.prototype={constructor:Vm,enableBrush:function(t){return this._brushType&&Fm(this),t.brushType&&Gm(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};f(t,function(t){e[t.panelId]=n(t)})}else this._panels=null;return this},mount:function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getLocalTransform(),this},eachCover:function(t,e){Vz(this._covers,t,e)},updateCovers:function(t){function e(t,e){return(null!=t.id?t.id:s+e)+"-"+t.brushType}function i(t,i){return e(t.__brushOption,i)}function o(e,i){var n=t[e];if(null!=i&&l[i]===c)u[e]=l[i];else{var a=u[e]=null!=i?(l[i].__brushOption=n,l[i]):Xm(h,Zm(h,n));jm(h,a)}}function r(t){l[t]!==c&&h.group.remove(l[t])}t=p(t,function(t){return a(n(Kz),t,!0)});var s="\x00-brush-index-",l=this._covers,u=this._covers=[],h=this,c=this._creatingCover;return new Zu(l,t,i,e).add(o).update(o).remove(r).execute(),this},unmount:function(){return this.enableBrush(!1),Jm(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},c(Vm,yS);var Jz={mousedown:function(t){if(this._dragging)_v(this,t);else if(!t.target||!t.target.draggable){mv(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null;var i=this._creatingPanel=Km(this,t,e);i&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,i=t.offsetY,n=this.group.transformCoordToLocal(e,i);if(gv(this,t,n),this._dragging){mv(t);var a=yv(this,t,n,!1);a&&Qm(this,a)}},mouseup:function(t){_v(this,t)}},Qz={lineX:wv(0),lineY:wv(1),rect:{createCover:function(t,e){return iv(Bz(hv,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=ev(t);return sv(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,i,n){nv(t,e,i,n)},updateCommon:av,contain:vv},polygon:{createCover:function(t,e){var i=new hM;return i.add(new NT({name:"main",style:rv(e),silent:!0})),i},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new OT({name:"main",draggable:!0,drift:Bz(cv,t,e),ondragend:Bz(Qm,t,{isEnd:!0})}))},updateCoverShape:function(t,e,i){e.childAt(0).setShape({points:fv(t,e,i)})},updateCommon:av,contain:vv}},tE=["axisLine","axisTickLabel","axisName"],eE=Ru({type:"parallelAxis",init:function(t,e){eE.superApply(this,"init",arguments),(this._brushController=new Vm(e.getZr())).on("brush",y(this._onBrush,this))},render:function(t,e,i,n){if(!Av(t,e,n)){this.axisModel=t,this.api=i,this.group.removeAll();var a=this._axisGroup;if(this._axisGroup=new hM,this.group.add(this._axisGroup),t.get("show")){var o=Cv(t,e),s=o.coordinateSystem,l=t.getAreaSelectStyle(),u=l.width,h=t.axis.dim,c=s.getAxisLayout(h),d=r({strokeContainThreshold:u},c),p=new Tk(t,d);f(tE,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(d,l,t,o,u,i);var g=n&&n.animation===!1?null:t;lr(a,this._axisGroup,g)}}},_refreshBrushController:function(t,e,i,n,a,o){var r=i.axis.getExtent(),s=r[1]-r[0],l=Math.min(30,.1*Math.abs(s)),u=Ti.create({x:r[0],y:-a/2,width:s,height:a});u.x-=l,u.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,position:t.position}).setPanels([{panelId:"pl",clipPath:Sv(u),isTargetByCursor:Iv(u,o,n),getLinearBrushOtherExtent:Mv(u,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(Dv(i))},_onBrush:function(t,e){var i=this.axisModel,n=i.axis,a=p(t,function(t){return[n.coordToData(t.range[0],!0),n.coordToData(t.range[1],!0)]});(!i.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:a})},dispose:function(){this._brushController.dispose()}}),iE=5;Ru({type:"parallel",render:function(t,e,i){this._model=t,this._api=i,this._handlers||(this._handlers={},f(nE,function(t,e){i.getZr().on(e,this._handlers[e]=y(t,this))},this)),wl(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,e){f(this._handlers,function(t,i){e.getZr().off(i,t)}),this._handlers=null},_throttledDispatchExpand:function(t){this._dispatchExpand(t)},_dispatchExpand:function(t){t&&this._api.dispatchAction(r({type:"parallelAxisExpand"},t))
+}});var nE={mousedown:function(t){Lv(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(Lv(this,"click")&&e){var i=[t.offsetX,t.offsetY],n=Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2);if(n>iE)return;var a=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==a.behavior&&this._dispatchExpand({axisExpandWindow:a.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&Lv(this,"mousemove")){var e=this._model,i=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=i.behavior;"jump"===n&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===n?null:{axisExpandWindow:i.axisExpandWindow,animation:"jump"===n?null:!1})}}};Tu(Iz),_D.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(){var t=this.getSource();return kv(t,this),xh(t,this)},getRawIndicesByActiveState:function(t){var e=this.coordinateSystem,i=this.getData(),n=[];return e.eachActiveState(i,function(e,a){t===e&&n.push(i.getRawIndex(a))}),n},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"}});var aE=.3,oE=(ml.extend({type:"parallel",init:function(){this._dataGroup=new hM,this.group.add(this._dataGroup),this._data,this._initialized},render:function(t,e,i,n){function a(t){var e=zv(l,s,t,c,h);Rv(e,l,t,d)}function o(e,i){var a=u.getItemGraphicEl(i),o=Nv(l,e,c,h);l.setItemGraphicEl(e,a);var r=n&&n.animation===!1?null:t;nr(a,{shape:{points:o}},r,e),Rv(a,l,e,d)}function r(t){var e=u.getItemGraphicEl(t);s.remove(e)}var s=this._dataGroup,l=t.getData(),u=this._data,h=t.coordinateSystem,c=h.dimensions,d=Ev(t);if(l.diff(u).add(a).update(o).remove(r).execute(),!this._initialized){this._initialized=!0;var f=Ov(h,t,function(){setTimeout(function(){s.removeClipPath()})});s.setClipPath(f)}this._data=l},incrementalPrepareRender:function(){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(t,e){for(var i=e.getData(),n=e.coordinateSystem,a=n.dimensions,o=Ev(e),r=t.start;r=a/3?1:2),l=e.y-n(r)*o*(o>=a/3?1:2);r=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+i(r)*o,e.y+n(r)*o),t.lineTo(e.x+i(e.angle)*a,e.y+n(e.angle)*a),t.lineTo(e.x-i(r)*o,e.y-n(r)*o),t.lineTo(s,l)}})),lE=2*Math.PI,uE=(ml.extend({type:"gauge",render:function(t,e,i){this.group.removeAll();var n=t.get("axisLine.lineStyle.color"),a=Vv(t,i);this._renderMain(t,e,i,n,a)},dispose:function(){},_renderMain:function(t,e,i,n,a){for(var o=this.group,r=t.getModel("axisLine"),s=r.getModel("lineStyle"),l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,h=-t.get("endAngle")/180*Math.PI,c=(h-u)%lE,d=u,f=s.get("width"),p=r.get("show"),g=0;p&&g=t)return n[0][1];for(var e=0;e=t&&(0===e?0:n[e-1][0])=I;I++){var T=Math.cos(_),A=Math.sin(_);if(f.get("show")){var D=new VT({shape:{x1:T*h+l,y1:A*h+u,x2:T*(h-y)+l,y2:A*(h-y)+u},style:S,silent:!0});"auto"===S.stroke&&D.setStyle({stroke:n(I/m)}),s.add(D)}if(g.get("show")){var C=Gv(Ir(I/m*(d-c)+c),g.get("formatter")),L=g.get("distance"),k=n(I/m);s.add(new IT({style:Yo({},g,{text:C,x:T*(h-y-L)+l,y:A*(h-y-L)+u,textVerticalAlign:-.4>A?"top":A>.4?"bottom":"middle",textAlign:-.4>T?"left":T>.4?"right":"center"},{autoColor:k}),silent:!0}))}if(p.get("show")&&I!==m){for(var P=0;v>=P;P++){var T=Math.cos(_),A=Math.sin(_),O=new VT({shape:{x1:T*h+l,y1:A*h+u,x2:T*(h-x)+l,y2:A*(h-x)+u},silent:!0,style:M});"auto"===M.stroke&&O.setStyle({stroke:n((I+P/v)/m)}),s.add(O),_+=w}_-=w}else _+=b}},_renderPointer:function(t,e,i,n,a,o,r){var s=this.group,l=this._data;if(!t.get("pointer.show"))return void(l&&l.eachItemGraphicEl(function(t){s.remove(t)}));var u=[+t.get("min"),+t.get("max")],h=[o,r],c=t.getData(),d=c.mapDimension("value");c.diff(l).add(function(e){var i=new sE({shape:{angle:o}});ar(i,{shape:{angle:Sr(c.get(d,e),u,h,!0)}},t),s.add(i),c.setItemGraphicEl(e,i)}).update(function(e,i){var n=l.getItemGraphicEl(i);nr(n,{shape:{angle:Sr(c.get(d,e),u,h,!0)}},t),s.add(n),c.setItemGraphicEl(e,n)}).remove(function(t){var e=l.getItemGraphicEl(t);s.remove(e)}).execute(),c.eachItemGraphicEl(function(t,e){var i=c.getItemModel(e),o=i.getModel("pointer");t.setShape({x:a.cx,y:a.cy,width:Mr(o.get("width"),a.r),r:Mr(o.get("length"),a.r)}),t.useStyle(i.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",n(Sr(c.get(d,e),u,[0,1],!0))),Fo(t,i.getModel("emphasis.itemStyle").getItemStyle())}),this._data=c},_renderTitle:function(t,e,i,n,a){var o=t.getData(),r=o.mapDimension("value"),s=t.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),u=a.cx+Mr(l[0],a.r),h=a.cy+Mr(l[1],a.r),c=+t.get("min"),d=+t.get("max"),f=t.getData().get(r,0),p=n(Sr(f,[c,d],[0,1],!0));this.group.add(new IT({silent:!0,style:Yo({},s,{x:u,y:h,text:o.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:p,forceRich:!0})}))}},_renderDetail:function(t,e,i,n,a){var o=t.getModel("detail"),r=+t.get("min"),s=+t.get("max");if(o.get("show")){var l=o.get("offsetCenter"),u=a.cx+Mr(l[0],a.r),h=a.cy+Mr(l[1],a.r),c=Mr(o.get("width"),a.r),d=Mr(o.get("height"),a.r),f=t.getData(),p=f.get(f.mapDimension("value"),0),g=n(Sr(p,[r,s],[0,1],!0));this.group.add(new IT({silent:!0,style:Yo({},o,{x:u,y:h,text:Gv(p,o.get("formatter")),textWidth:isNaN(c)?null:c,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),Bu({type:"series.funnel",init:function(t){uE.superApply(this,"init",arguments),this.legendVisualProvider=new $d(y(this.getData,this),y(this.getRawData,this)),this._defaultLabelLine(t)},getInitialData:function(){return rP(this,{coordDimensions:["value"],encodeDefaulter:x(ys,this)})},_defaultLabelLine:function(t){ea(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},getDataParams:function(t){var e=this.getData(),i=uE.superCall(this,"getDataParams",t),n=e.mapDimension("value"),a=e.getSum(n);return i.percent=a?+(e.get(n,t)/a*100).toFixed(2):0,i.$vars.push("percent"),i},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}})),hE=Fv.prototype,cE=["itemStyle","opacity"];hE.updateData=function(t,e,i){var n=this.childAt(0),a=t.hostModel,o=t.getItemModel(e),r=t.getItemLayout(e),l=t.getItemModel(e).get(cE);l=null==l?1:l,n.useStyle({}),i?(n.setShape({points:r.points}),n.setStyle({opacity:0}),ar(n,{style:{opacity:l}},a,e)):nr(n,{style:{opacity:l},shape:{points:r.points}},a,e);var u=o.getModel("itemStyle"),h=t.getItemVisual(e,"color");n.setStyle(s({lineJoin:"round",fill:h},u.getItemStyle(["opacity"]))),n.hoverStyle=u.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),Fo(this)},hE._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),a=t.hostModel,o=t.getItemModel(e),r=t.getItemLayout(e),s=r.label,l=t.getItemVisual(e,"color");nr(i,{shape:{points:s.linePoints||s.linePoints}},a,e),nr(n,{style:{x:s.x,y:s.y}},a,e),n.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var u=o.getModel("label"),h=o.getModel("emphasis.label"),c=o.getModel("labelLine"),d=o.getModel("emphasis.labelLine"),l=t.getItemVisual(e,"color");Xo(n.style,n.hoverStyle={},u,h,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:l,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign}),n.ignore=n.normalIgnore=!u.get("show"),n.hoverIgnore=!h.get("show"),i.ignore=i.normalIgnore=!c.get("show"),i.hoverIgnore=!d.get("show"),i.setStyle({stroke:l}),i.setStyle(c.getModel("lineStyle").getLineStyle()),i.hoverStyle=d.getModel("lineStyle").getLineStyle()},h(Fv,hM);var dE=(ml.extend({type:"funnel",render:function(t){var e=t.getData(),i=this._data,n=this.group;e.diff(i).add(function(t){var i=new Fv(e,t);e.setItemGraphicEl(t,i),n.add(i)}).update(function(t,a){var o=i.getItemGraphicEl(a);o.updateData(e,t),n.add(o),e.setItemGraphicEl(t,o)}).remove(function(t){var e=i.getItemGraphicEl(t);n.remove(e)}).execute(),this._data=e},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}}),function(t,e){t.eachSeriesByType("funnel",function(t){var i=t.getData(),n=i.mapDimension("value"),a=t.get("sort"),o=Wv(t,e),r=Hv(i,a),s=t.get("orient"),l=o.width,u=o.height,h=o.x,c=o.y,d="horizontal"===s?[Mr(t.get("minSize"),u),Mr(t.get("maxSize"),u)]:[Mr(t.get("minSize"),l),Mr(t.get("maxSize"),l)],f=i.getDataExtent(n),p=t.get("min"),g=t.get("max");null==p&&(p=Math.min(f[0],0)),null==g&&(g=f[1]);var m=t.get("funnelAlign"),v=t.get("gap"),y="horizontal"===s?l:u,x=(y-v*(i.count()-1))/i.count(),_=function(t,e){if("horizontal"===s){var a,o=i.get(n,t)||0,r=Sr(o,[p,g],d,!0);switch(m){case"top":a=c;break;case"center":a=c+(u-r)/2;break;case"bottom":a=c+(u-r)}return[[e,a],[e,a+r]]}var f,o=i.get(n,t)||0,v=Sr(o,[p,g],d,!0);switch(m){case"left":f=h;break;case"center":f=h+(l-v)/2;break;case"right":f=h+l-v}return[[f,e],[f+v,e]]};"ascending"===a&&(x=-x,v=-v,"horizontal"===s?h+=l:c+=u,r=r.reverse());for(var b=0;b=0&&(r[o[s].depth]=new mr(o[s],this,e));if(a&&n){var l=BN(a,n,this,!0,i);return l.data}},setNodePosition:function(t,e){var i=this.option.data[t];i.localX=e[0],i.localY=e[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getDataParams(t,i),a=n.data,o=a.source+" -- "+a.target;return n.value&&(o+=" : "+n.value),Wr(o)}if("node"===i){var r=this.getGraph().getNodeByIndex(t),s=r.getLayout().value,l=this.getDataParams(t,i).data.name;if(s)var o=l+" : "+s;return Wr(o)}return fE.superCall(this,"formatTooltip",t,e)},optionUpdated:function(){var t=this.option;t.focusNodeAdjacency===!0&&(t.focusNodeAdjacency="allEdges")},getDataParams:function(t,e){var i=fE.superCall(this,"getDataParams",t,e);if(null==i.value&&"node"===e){var n=this.getGraph().getNodeByIndex(t),a=n.getLayout().value;i.value=a}return i},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},levels:[],nodeAlign:"justify",itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},animationEasing:"linear",animationDuration:1e3}}),pE=["itemStyle","opacity"],gE=["emphasis","itemStyle","opacity"],mE=["lineStyle","opacity"],vE=["emphasis","lineStyle","opacity"],yE=yo({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(t,e){var i=e.extent;t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),"vertical"===e.orient?(t.lineTo(e.x2+i,e.y2),t.bezierCurveTo(e.cpx2+i,e.cpy2,e.cpx1+i,e.cpy1,e.x1+i,e.y1)):(t.lineTo(e.x2,e.y2+i),t.bezierCurveTo(e.cpx2,e.cpy2+i,e.cpx1,e.cpy1+i,e.x1,e.y1+i)),t.closePath()},highlight:function(){this.trigger("emphasis")},downplay:function(){this.trigger("normal")}});Vu({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(t,e,i){var n=this,a=t.getGraph(),o=this.group,r=t.layoutInfo,s=r.width,l=r.height,u=t.getData(),h=t.getData("edge"),c=t.get("orient");this._model=t,o.removeAll(),o.attr("position",[r.x,r.y]),a.eachEdge(function(e){var i=new yE;i.dataIndex=e.dataIndex,i.seriesIndex=t.seriesIndex,i.dataType="edge";var n,a,r,u,d,f,p,g,m=e.getModel("lineStyle"),v=m.get("curveness"),y=e.node1.getLayout(),x=e.node1.getModel(),_=x.get("localX"),b=x.get("localY"),w=e.node2.getLayout(),S=e.node2.getModel(),M=S.get("localX"),I=S.get("localY"),T=e.getLayout();switch(i.shape.extent=Math.max(1,T.dy),i.shape.orient=c,"vertical"===c?(n=(null!=_?_*s:y.x)+T.sy,a=(null!=b?b*l:y.y)+y.dy,r=(null!=M?M*s:w.x)+T.ty,u=null!=I?I*l:w.y,d=n,f=a*(1-v)+u*v,p=r,g=a*v+u*(1-v)):(n=(null!=_?_*s:y.x)+y.dx,a=(null!=b?b*l:y.y)+T.sy,r=null!=M?M*s:w.x,u=(null!=I?I*l:w.y)+T.ty,d=n*(1-v)+r*v,f=a,p=n*v+r*(1-v),g=u),i.setShape({x1:n,y1:a,x2:r,y2:u,cpx1:d,cpy1:f,cpx2:p,cpy2:g}),i.setStyle(m.getItemStyle()),i.style.fill){case"source":i.style.fill=e.node1.getVisual("color");break;case"target":i.style.fill=e.node2.getVisual("color")}Fo(i,e.getModel("emphasis.lineStyle").getItemStyle()),o.add(i),h.setItemGraphicEl(e.dataIndex,i)}),a.eachNode(function(e){var i=e.getLayout(),n=e.getModel(),a=n.get("localX"),r=n.get("localY"),h=n.getModel("label"),c=n.getModel("emphasis.label"),d=new RT({shape:{x:null!=a?a*s:i.x,y:null!=r?r*l:i.y,width:i.dx,height:i.dy},style:n.getModel("itemStyle").getItemStyle()}),f=e.getModel("emphasis.itemStyle").getItemStyle();Xo(d.style,f,h,c,{labelFetcher:t,labelDataIndex:e.dataIndex,defaultText:e.id,isRectText:!0}),d.setStyle("fill",e.getVisual("color")),Fo(d,f),o.add(d),u.setItemGraphicEl(e.dataIndex,d),d.dataType="node"}),u.eachItemGraphicEl(function(e,a){var o=u.getItemModel(a);o.get("draggable")&&(e.drift=function(e,o){n._focusAdjacencyDisabled=!0,this.shape.x+=e,this.shape.y+=o,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:u.getRawIndex(a),localX:this.shape.x/s,localY:this.shape.y/l})},e.ondragend=function(){n._focusAdjacencyDisabled=!1},e.draggable=!0,e.cursor="move"),e.highlight=function(){this.trigger("emphasis")},e.downplay=function(){this.trigger("normal")},e.focusNodeAdjHandler&&e.off("mouseover",e.focusNodeAdjHandler),e.unfocusNodeAdjHandler&&e.off("mouseout",e.unfocusNodeAdjHandler),o.get("focusNodeAdjacency")&&(e.on("mouseover",e.focusNodeAdjHandler=function(){n._focusAdjacencyDisabled||(n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex}))}),e.on("mouseout",e.unfocusNodeAdjHandler=function(){n._focusAdjacencyDisabled||n._dispatchUnfocus(i)}))}),h.eachItemGraphicEl(function(e,a){var o=h.getItemModel(a);e.focusNodeAdjHandler&&e.off("mouseover",e.focusNodeAdjHandler),e.unfocusNodeAdjHandler&&e.off("mouseout",e.unfocusNodeAdjHandler),o.get("focusNodeAdjacency")&&(e.on("mouseover",e.focusNodeAdjHandler=function(){n._focusAdjacencyDisabled||(n._clearTimer(),i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex}))}),e.on("mouseout",e.unfocusNodeAdjHandler=function(){n._focusAdjacencyDisabled||n._dispatchUnfocus(i)}))}),!this._data&&t.get("animation")&&o.setClipPath(jv(o.getBoundingRect(),t,function(){o.removeClipPath()})),this._data=t.getData()},dispose:function(){this._clearTimer()},_dispatchUnfocus:function(t){var e=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout(function(){e._unfocusDelayTimer=null,t.dispatchAction({type:"unfocusNodeAdjacency",seriesId:e._model.id})},500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(t,e,i,n){var a=t.getData(),o=a.graph,r=n.dataIndex,s=a.getItemModel(r),l=n.edgeDataIndex;if(null!=r||null!=l){var u=o.getNodeByIndex(r),h=o.getEdgeByIndex(l);if(o.eachNode(function(t){Uv(t,pE,.1)}),o.eachEdge(function(t){Uv(t,mE,.1)}),u){Yv(u,gE);var c=s.get("focusNodeAdjacency");"outEdges"===c?f(u.outEdges,function(t){t.dataIndex<0||(Yv(t,vE),Yv(t.node2,gE))}):"inEdges"===c?f(u.inEdges,function(t){t.dataIndex<0||(Yv(t,vE),Yv(t.node1,gE))}):"allEdges"===c&&f(u.edges,function(t){t.dataIndex<0||(Yv(t,vE),t.node1!==u&&Yv(t.node1,gE),t.node2!==u&&Yv(t.node2,gE))})}h&&(Yv(h,vE),Yv(h.node1,gE),Yv(h.node2,gE))}},unfocusNodeAdjacency:function(t){var e=t.getGraph();e.eachNode(function(t){Uv(t,pE)}),e.eachEdge(function(t){Uv(t,mE)})}}),Cu({type:"dragNode",event:"dragnode",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(e){e.setNodePosition(t.dataIndex,[t.localX,t.localY])})});var xE=function(t,e){t.eachSeriesByType("sankey",function(t){var i=t.get("nodeWidth"),n=t.get("nodeGap"),a=qv(t,e);t.layoutInfo=a;var o=a.width,r=a.height,s=t.getGraph(),l=s.nodes,u=s.edges;$v(l);var h=m(l,function(t){return 0===t.getLayout().value}),c=0!==h.length?0:t.get("layoutIterations"),d=t.get("orient"),f=t.get("nodeAlign");Kv(l,u,i,n,o,r,c,d,f)})},_E=function(t){t.eachSeriesByType("sankey",function(t){var e=t.getGraph(),i=e.nodes;if(i.length){var n=1/0,a=-1/0;f(i,function(t){var e=t.getLayout().value;n>e&&(n=e),e>a&&(a=e)}),f(i,function(e){var i=new wO({type:"color",mappingMethod:"linear",dataExtent:[n,a],visual:t.get("color")}),o=i.mapValueToVisual(e.getLayout().value),r=e.getModel().get("itemStyle.color");null!=r?e.setVisual("color",r):e.setVisual("color",o)})}})};Pu(xE),Ou(_E);{var bE=dk.extend({type:"series.pictorialBar",dependencies:["grid"],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,hoverAnimation:!1},getInitialData:function(t){return t.stack=null,bE.superApply(this,"getInitialData",arguments)}}),wE=["itemStyle","borderWidth"],SE=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],ME=new TT;Vu({type:"pictorialBar",render:function(t,e,i){var n=this.group,a=t.getData(),o=this._data,r=t.coordinateSystem,s=r.getBaseAxis(),l=!!s.isHorizontal(),u=r.grid.getRect(),h={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:r,coordSysExtent:[[u.x,u.x+u.width],[u.y,u.y+u.height]],isHorizontal:l,valueDim:SE[+l],categoryDim:SE[1-l]};return a.diff(o).add(function(t){if(a.hasValue(t)){var e=Dy(a,t),i=vy(a,t,e,h),o=Py(a,h,i);a.setItemGraphicEl(t,o),n.add(o),By(o,h,i)}}).update(function(t,e){var i=o.getItemGraphicEl(e);if(!a.hasValue(t))return void n.remove(i);var r=Dy(a,t),s=vy(a,t,r,h),l=zy(a,s);i&&l!==i.__pictorialShapeStr&&(n.remove(i),a.setItemGraphicEl(t,null),i=null),i?Oy(i,h,s):i=Py(a,h,s,!0),a.setItemGraphicEl(t,i),i.__pictorialSymbolMeta=s,n.add(i),By(i,h,s)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&Ny(o,t,e.__pictorialSymbolMeta.animationModel,e)}).execute(),this._data=a,this.group},dispose:G,remove:function(t){var e=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl(function(e){Ny(i,e.dataIndex,t,e)}):e.removeAll()}})}Pu(x(Bh,"pictorialBar")),Ou(eP("pictorialBar","roundRect"));var IE=function(t){var e=t.grid.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(e){return t.dataToPoint(e)},size:y(Gy,t)}}},TE=function(t){var e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:t.getZoom()},api:{coord:function(e){return t.dataToPoint(e)},size:y(Fy,t)}}},AE=function(t){var e=t.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(e){return t.dataToPoint(e)},size:y(Wy,t)}}},DE=function(t){var e=t.getRadiusAxis(),i=t.getAngleAxis(),n=e.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:y(function(n){var a=e.dataToRadius(n[0]),o=i.dataToAngle(n[1]),r=t.coordToPoint([a,o]);return r.push(a,o*Math.PI/180),r}),size:y(Hy,t)}}},CE=function(t){var e=t.getRect(),i=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:i.start,end:i.end,weeks:i.weeks,dayCount:i.allDay}},api:{coord:function(e,i){return t.dataToPoint(e,i)}}}},LE=JT,kE=["itemStyle"],PE=["emphasis","itemStyle"],OE=["label"],NE=["emphasis","label"],zE="e\x00\x00",EE={cartesian2d:IE,geo:TE,singleAxis:AE,polar:DE,calendar:CE};_D.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0,clip:!1},getInitialData:function(){return xh(this.getSource(),this)},getDataParams:function(t,e,i){var n=_D.prototype.getDataParams.apply(this,arguments);return i&&(n.info=i.info),n}}),ml.extend({type:"custom",_data:null,render:function(t,e,i,n){var a=this._data,o=t.getData(),r=this.group,s=Yy(t,o,e,i);o.diff(a).add(function(e){qy(null,e,s(e,n),t,r,o)}).update(function(e,i){var l=a.getItemGraphicEl(i);qy(l,e,s(e,n),t,r,o)}).remove(function(t){var e=a.getItemGraphicEl(t);e&&r.remove(e)}).execute();var l=t.get("clip",!0)?Fc(t.coordinateSystem,!1,t):null;l?r.setClipPath(l):r.removeClipPath(),this._data=o},incrementalPrepareRender:function(){this.group.removeAll(),this._data=null},incrementalRender:function(t,e,i,n,a){function o(t){t.isGroup||(t.incremental=!0,t.useHoverLayer=!0)}for(var r=e.getData(),s=Yy(e,r,i,n),l=t.start;lc?c=f:(d.lastTickCount=a,d.lastAutoInterval=c),c}},h(dx,JL);var BE=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new cx,this._angleAxis=new dx,this._radiusAxis.polar=this._angleAxis.polar=this};BE.prototype={type:"polar",axisPointerEnabled:!0,constructor:BE,dimensions:["radius","angle"],model:null,containPoint:function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},containData:function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},getAxis:function(t){return this["_"+t+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(t){var e=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===t&&e.push(i),n.scale.type===t&&e.push(n),e},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},dataToPoint:function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},pointToData:function(t,e){var i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],e),this._angleAxis.angleToData(i[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getAngleAxis(),a=n.getExtent(),o=Math.min(a[0],a[1]),r=Math.max(a[0],a[1]);n.inverse?o=r-360:r=o+360;var s=Math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=Math.atan2(-i,e)/Math.PI*180,u=o>l?1:-1;o>l||l>r;)l+=360*u;return[s,l]},coordToPoint:function(t){var e=t[0],i=t[1]/180*Math.PI,n=Math.cos(i)*e+this.cx,a=-Math.sin(i)*e+this.cy;return[n,a]},getArea:function(){var t=this.getAngleAxis(),e=this.getRadiusAxis(),i=e.getExtent().slice();i[0]>i[1]&&i.reverse();var n=t.getExtent(),a=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:i[0],r:i[1],startAngle:-n[0]*a,endAngle:-n[1]*a,clockwise:t.inverse,contain:function(t,e){var i=t-this.cx,n=e-this.cy,a=i*i+n*n,o=this.r,r=this.r0;return o*o>=a&&a>=r*r}}}};var VE=OA.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});a(VE.prototype,RL);var GE={angle:{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}},radius:{splitNumber:5}};sk("angle",VE,fx,GE.angle),sk("radius",VE,fx,GE.radius),Eu({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e,i=this.ecModel;return i.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});var FE={dimensions:BE.prototype.dimensions,create:function(t,e){var i=[];return t.eachComponent("polar",function(t,n){var a=new BE(n);a.update=gx;var o=a.getRadiusAxis(),r=a.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");mx(o,s),mx(r,l),px(a,t,e),i.push(a),t.coordinateSystem=a,a.model=t}),t.eachSeries(function(e){if("polar"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"polar",index:e.get("polarIndex"),id:e.get("polarId")})[0];e.coordinateSystem=i.coordinateSystem}}),i}};Ls.register("polar",FE);var WE=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];Ok.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(t){if(this.group.removeAll(),t.get("show")){var e=t.axis,i=e.polar,a=i.getRadiusAxis().getExtent(),o=e.getTicksCoords(),r=e.getMinorTicksCoords(),s=p(e.getViewLabels(),function(t){var t=n(t);return t.coord=e.dataToCoord(t.tickValue),t});xx(s),xx(o),f(WE,function(n){!t.get(n+".show")||e.scale.isBlank()&&"axisLine"!==n||this["_"+n](t,i,o,r,a,s)},this)}},_axisLine:function(t,e,i,n,a){var o,r=t.getModel("axisLine.lineStyle"),s=yx(e),l=s?0:1;o=0===a[l]?new TT({shape:{cx:e.cx,cy:e.cy,r:a[s]},style:r.getLineStyle(),z2:1,silent:!0}):new LT({shape:{cx:e.cx,cy:e.cy,r:a[s],r0:a[l]},style:r.getLineStyle(),z2:1,silent:!0}),o.style.fill=null,this.group.add(o)},_axisTick:function(t,e,i,n,a){var o=t.getModel("axisTick"),r=(o.get("inside")?-1:1)*o.get("length"),l=a[yx(e)],u=p(i,function(t){return new VT({shape:vx(e,[l,l+r],t.coord)})});this.group.add(aA(u,{style:s(o.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_minorTick:function(t,e,i,n,a){if(n.length){for(var o=t.getModel("axisTick"),r=t.getModel("minorTick"),l=(o.get("inside")?-1:1)*r.get("length"),u=a[yx(e)],h=[],c=0;cd?"left":"right",g=Math.abs(c[1]-f)/h<.3?"middle":c[1]>f?"top":"bottom";r&&r[o]&&r[o].textStyle&&(n=new mr(r[o].textStyle,s,s.ecModel));var m=new IT({silent:Tk.isLabelSilent(t)});this.group.add(m),Yo(m.style,n,{x:c[0],y:c[1],textFill:n.getTextColor()||t.get("axisLine.lineStyle.color"),text:i.formattedLabel,textAlign:p,textVerticalAlign:g}),u&&(m.eventData=Tk.makeAxisEventDataBase(t),m.eventData.targetType="axisLabel",m.eventData.value=i.rawLabel)},this)},_splitLine:function(t,e,i,n,a){var o=t.getModel("splitLine"),r=o.getModel("lineStyle"),l=r.get("color"),u=0;l=l instanceof Array?l:[l];for(var h=[],c=0;cr||_(r))return{point:[]};var s=o.getItemGraphicEl(r),l=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(r)||[];else if(l&&l.dataToPoint)n=l.dataToPoint(o.getValues(p(l.dimensions,function(t){return o.mapDimension(t)}),r,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),n=[u.x+u.width/2,u.y+u.height/2]}return{point:n,el:s}},UE=f,YE=x,jE=ha(),qE=function(t,e,i){var n=t.currTrigger,a=[t.x,t.y],o=t,r=t.dispatchAction||y(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){kx(a)&&(a=XE({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=kx(a),u=o.axesInfo,h=s.axesInfo,c="leave"===n||kx(a),d={},f={},p={list:[],map:{}},g={showPointer:YE(Mx,f),showTooltip:YE(Ix,p)};UE(s.coordSysMap,function(t,e){var i=l||t.containPoint(a);UE(s.coordSysAxesInfo[e],function(t){var e=t.axis,n=Cx(u,t);if(!c&&i&&(!u||n)){var o=n&&n.value;null!=o||l||(o=e.pointToData(a)),null!=o&&bx(t,o,g,!1,d)}})});var m={};return UE(h,function(t,e){var i=t.linkGroup;i&&!f[e]&&UE(i.axesInfo,function(e,n){var a=f[n];if(e!==t&&a){var o=a.value;i.mapper&&(o=t.axis.scale.parse(i.mapper(o,Lx(e),Lx(t)))),m[t.key]=o}})}),UE(m,function(t,e){bx(h[e],t,g,!0,d)}),Tx(f,h,d),Ax(p,a,t,r),Dx(h,r,i),d}},KE=(Eu({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}}),ha()),$E=f,JE=Ru({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),a=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";Px("axisPointer",i,function(t,e,i){"none"!==a&&("leave"===t||a.indexOf(t)>=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){Bx(e.getZr(),"axisPointer"),JE.superApply(this._model,"remove",arguments)},dispose:function(t,e){Bx("axisPointer",e),JE.superApply(this._model,"dispose",arguments)}}),QE=ha(),tR=n,eR=y;Vx.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,n){var a=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==a||this._lastStatus!==o){this._lastValue=a,this._lastStatus=o;var r=this._group,s=this._handle;if(!o||"hide"===o)return r&&r.hide(),void(s&&s.hide());r&&r.show(),s&&s.show();var l={};this.makeElOption(l,a,t,e,i);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(r){var c=x(Gx,e,h);this.updatePointerEl(r,l,c,e),this.updateLabelEl(r,l,c,e)}else r=this._group=new hM,this.createPointerEl(r,l,t,e),this.createLabelEl(r,l,t,e),i.getZr().add(r);Zx(r,e,!0),this._renderHandle(a)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,a="category"===n.type,o=e.get("snap");if(!o&&!a)return!1;if("auto"===i||null==i){var r=this.animationThreshold;if(a&&n.getBandWidth()>r)return!0;if(o){var s=md(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>r}return!1}return i===!0},makeElOption:function(){},createPointerEl:function(t,e){var i=e.pointer;if(i){var n=QE(t).pointerEl=new lA[i.type](tR(e.pointer));t.add(n)}},createLabelEl:function(t,e,i,n){if(e.label){var a=QE(t).labelEl=new RT(tR(e.label));t.add(a),Wx(a,n)}},updatePointerEl:function(t,e,i){var n=QE(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var a=QE(t).labelEl;a&&(a.setStyle(e.label.style),i(a,{shape:e.label.shape,position:e.label.position}),Wx(a,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e=this._axisPointerModel,i=this._api.getZr(),n=this._handle,a=e.getModel("handle"),o=e.get("status");if(!a.get("show")||!o||"hide"===o)return n&&i.remove(n),void(this._handle=null);var r;this._handle||(r=!0,n=this._handle=cr(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){IS(t.event)},onmousedown:eR(this._onHandleDragMove,this,0,0),drift:eR(this._onHandleDragMove,this),ondragend:eR(this._onHandleDragEnd,this)}),i.add(n)),Zx(n,e,!1);var s=["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];n.setStyle(a.getItemStyle(null,s));var l=a.get("size");_(l)||(l=[l,l]),n.attr("scale",[l[0]/2,l[1]/2]),wl(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,r)}},_moveHandleToValue:function(t,e){Gx(this._axisPointerModel,!e&&this._moveAnimation,this._handle,Hx(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(Hx(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(Hx(n)),QE(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){var t=this._handle;if(t){var e=this._payloadInfo,i=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:i.axis.dim,axisIndex:i.componentIndex}]})}},_onHandleDragEnd:function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return i=i||0,{x:t[i],y:t[1-i],width:e[i],height:e[1-i]}}},Vx.prototype.constructor=Vx,xa(Vx);var iR=Vx.extend({makeElOption:function(t,e,i,n,a){var o=i.axis,r=o.grid,s=n.get("type"),l=t_(r,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var h=Xx(n),c=nR[s](o,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=wd(r.model,i);Kx(e,t,d,i,n,a)},getHandleTransform:function(t,e,i){var n=wd(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:qx(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i){var n=i.axis,a=n.grid,o=n.getGlobalExtent(!0),r=t_(a,n).getOtherAxis(n).getGlobalExtent(),s="x"===n.dim?0:1,l=t.position;l[s]+=e[s],l[s]=Math.min(o[1],l[s]),l[s]=Math.max(o[0],l[s]);var u=(r[1]+r[0])/2,h=[u,u];h[s]=l[s];var c=[{verticalAlign:"middle"},{align:"center"}];return{position:l,rotation:t.rotation,cursorPoint:h,tooltipOption:c[s]}}}),nR={line:function(t,e,i){var n=$x([e,i[0]],[e,i[1]],e_(t));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(t,e,i){var n=Math.max(1,t.getBandWidth()),a=i[1]-i[0];return{type:"Rect",shape:Jx([e-n/2,i[0]],[n,a],e_(t))}}};Ok.registerAxisPointerClass("CartesianAxisPointer",iR),Tu(function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!_(e)&&(t.axisPointer.link=[e])}}),Au(MC.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=ud(t,e)}),Cu({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},qE);var aR=Vx.extend({makeElOption:function(t,e,i,n,a){var o=i.axis;"angle"===o.dim&&(this.animationThreshold=Math.PI/18);var r,s=o.polar,l=s.getOtherAxis(o),u=l.getExtent();r=o["dataTo"+jr(o.dim)](e);var h=n.get("type");if(h&&"none"!==h){var c=Xx(n),d=oR[h](o,s,r,u,c);d.style=c,t.graphicKey=d.type,t.pointer=d}var f=n.get("label.margin"),p=i_(e,i,n,s,f);Ux(t,i,n,a,p)}}),oR={line:function(t,e,i,n){return"angle"===t.dim?{type:"Line",shape:$x(e.coordToPoint([n[0],i]),e.coordToPoint([n[1],i]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:i}}},shadow:function(t,e,i,n){var a=Math.max(1,t.getBandWidth()),o=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:Qx(e.cx,e.cy,n[0],n[1],(-i-a/2)*o,(-i+a/2)*o)}:{type:"Sector",shape:Qx(e.cx,e.cy,i-a/2,i+a/2,0,2*Math.PI)}}};Ok.registerAxisPointerClass("PolarAxisPointer",aR),Pu(x(ux,"bar")),Ru({type:"polar"});var rR=OA.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){OA.prototype.init.apply(this,arguments),ea(t,"label",["show"])},optionUpdated:function(){var t=this.option,e=this;t.regions=fN.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=g(t.regions||[],function(t,i){return i.name&&t.set(i.name,new mr(i,e)),t},B()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new mr(null,this,this.ecModel)},getFormattedLabel:function(t,e){e=e||"normal";var i=this.getRegionModel(t),n=i.get(("normal"===e?"":e+".")+"label.formatter"),a={name:t};return"function"==typeof n?(a.status=e,n(a)):"string"==typeof n?n.replace("{a}",null!=t?t:""):void 0},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}});c(rR,sP),Ru({type:"geo",init:function(t,e){var i=new kg(e,!0);this._mapDraw=i,this.group.add(i.group)},render:function(t,e,i,n){if(!n||"geoToggleSelect"!==n.type||n.from!==this.uid){var a=this._mapDraw;t.get("show")?a.draw(t,e,i,this,n):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}}),n_("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),n_("select",{type:"geoSelect",event:"geoselected"}),n_("unSelect",{type:"geoUnSelect",event:"geounselected"});var sR=function(t,e,i,n,a){JL.call(this,t,e,i),this.type=n||"value",this.position=a||"bottom",this.orient=null};sR.prototype={constructor:sR,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},pointToData:function(t,e){return this.coordinateSystem.pointToData(t,e)[0]},toGlobalCoord:null,toLocalCoord:null},h(sR,JL),a_.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:a_,_init:function(t){var e=this.dimension,i=new sR(e,Uh(t),[0,0],t.get("type"),t.get("position")),n="category"===i.type;i.onBand=n&&t.get("boundaryGap"),i.inverse=t.get("inverse"),i.orient=t.get("orient"),t.axis=i,i.model=t,i.coordinateSystem=this,this._axis=i},update:function(t){t.eachSeries(function(t){if(t.coordinateSystem===this){var e=t.getData();f(e.mapDimension(this.dimension,!0),function(t){this._axis.scale.unionExtentFromData(e,t)},this),Xh(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=ts({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var t=this._rect,e=this._axis,i=e.isHorizontal(),n=i?[0,t.width]:[0,t.height],a=e.reverse?1:0;e.setExtent(n[a],n[1-a]),this._updateAxisTransform(e,i?t.x:t.y)},_updateAxisTransform:function(t,e){var i=t.getExtent(),n=i[0]+i[1],a=t.isHorizontal();t.toGlobalCoord=a?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord=a?function(t){return t-e}:function(t){return n-t+e}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(t){var e=this.getRect(),i=this.getAxis(),n=i.orient;return"horizontal"===n?i.contain(i.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),i=this.getRect(),n=[],a="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[a]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-a]=0===a?i.y+i.height/2:i.x+i.width/2,n}},Ls.register("single",{create:o_,dimensions:a_.prototype.dimensions});var lR=["axisLine","axisTickLabel","axisName"],uR=["splitArea","splitLine"],hR=Ok.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,i,n){var a=this.group;a.removeAll();var o=this._axisGroup;this._axisGroup=new hM;var r=r_(t),s=new Tk(t,r);f(lR,s.add,s),a.add(this._axisGroup),a.add(s.getGroup()),f(uR,function(e){t.get(e+".show")&&this["_"+e](t)},this),lr(o,this._axisGroup,t),hR.superCall(this,"render",t,e,i,n)},remove:function(){Md(this)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var i=t.getModel("splitLine"),n=i.getModel("lineStyle"),a=n.get("width"),o=n.get("color");o=o instanceof Array?o:[o];for(var r=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,h=e.getTicksCoords({tickModel:i}),c=[],d=[],f=0;fi?"0"+i:i;var n=t.getDate();n=10>n?"0"+n:n;var a=t.getDay();return a=Math.abs((a+7-this.getFirstDayOfWeek())%7),{y:e,m:i,d:n,day:a,time:t.getTime(),formatedDate:e+"-"+i+"-"+n,date:t}},getNextNDay:function(t,e){return e=e||0,0===e?this.getDateInfo(t):(t=new Date(this.getDateInfo(t).time),t.setDate(t.getDate()+e),this.getDateInfo(t))},update:function(t,e){function i(t,e){return null!=t[e]&&"auto"!==t[e]}this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,a=["width","height"],o=this._model.get("cellSize").slice(),r=this._model.getBoxLayoutParams(),s="horizontal"===this._orient?[n,7]:[7,n];f([0,1],function(t){i(o,t)&&(r[a[t]]=o[t]*s[t])});var l={width:e.getWidth(),height:e.getHeight()},u=this._rect=ts(r,l);f([0,1],function(t){i(o,t)||(o[t]=u[a[t]]/s[t])}),this._sw=o[0],this._sh=o[1]},dataToPoint:function(t,e){_(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getDateInfo(t),n=this._rangeInfo,a=i.formatedDate;if(e&&!(i.time>=n.start.time&&i.timeo.end.time&&t.reverse(),t},_getRangeInfo:function(t){t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];var e;t[0].time>t[1].time&&(e=!0,t.reverse());var i=Math.floor(t[1].time/vR)-Math.floor(t[0].time/vR)+1,n=new Date(t[0].time),a=n.getDate(),o=t[1].date.getDate();n.setDate(a+i-1);var r=n.getDate();if(r!==o)for(var s=n.getTime()-t[1].time>0?1:-1;(r=n.getDate())!==o&&(n.getTime()-t[1].time)*s>0;)i-=s,n.setDate(r-s);var l=Math.floor((i+t[0].day+6)/7),u=e?-l+1:l-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:l,nthWeek:u,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,i){var n=this._getRangeInfo(i);if(t>n.weeks||0===t&&en.lweek)return!1;var a=7*(t-1)-n.fweek+e,o=new Date(n.start.time);return o.setDate(n.start.d+a),this.getDateInfo(o)}},h_.dimensions=h_.prototype.dimensions,h_.getDimensionsInfo=h_.prototype.getDimensionsInfo,h_.create=function(t,e){var i=[];return t.eachComponent("calendar",function(n){var a=new h_(n,t,e);i.push(a),n.coordinateSystem=a}),t.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])}),i},Ls.register("calendar",h_);var yR=OA.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t){var e=as(t);yR.superApply(this,"init",arguments),d_(t,e)},mergeOption:function(t){yR.superApply(this,"mergeOption",arguments),d_(this.option,t)}}),xR={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},_R={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};Ru({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t){var e=this.group;e.removeAll();var i=t.coordinateSystem,n=i.getRangeInfo(),a=i.getOrient();this._renderDayRect(t,n,e),this._renderLines(t,n,a,e),this._renderYearText(t,n,a,e),this._renderMonthText(t,a,e),this._renderWeekText(t,n,a,e)},_renderDayRect:function(t,e,i){for(var n=t.coordinateSystem,a=t.getModel("itemStyle").getItemStyle(),o=n.getCellWidth(),r=n.getCellHeight(),s=e.start.time;s<=e.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,u=new RT({shape:{x:l[0],y:l[1],width:o,height:r},cursor:"default",style:a});i.add(u)}},_renderLines:function(t,e,i,n){function a(e){o._firstDayOfMonth.push(r.getDateInfo(e)),o._firstDayPoints.push(r.dataToRect([e],!1).tl);var a=o._getLinePointsOfOneWeek(t,e,i);o._tlpoints.push(a[0]),o._blpoints.push(a[a.length-1]),l&&o._drawSplitline(a,s,n)}var o=this,r=t.coordinateSystem,s=t.getModel("splitLine.lineStyle").getLineStyle(),l=t.get("splitLine.show"),u=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=e.start,c=0;h.time<=e.end.time;c++){a(h.formatedDate),0===c&&(h=r.getDateInfo(e.start.y+"-"+e.start.m));var d=h.date;d.setMonth(d.getMonth()+1),h=r.getDateInfo(d)}a(r.getNextNDay(e.end.time,1).formatedDate),l&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,u,i),s,n),l&&this._drawSplitline(o._getEdgesPoints(o._blpoints,u,i),s,n)},_getEdgesPoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],a="horizontal"===i?0:1;return n[0][a]=n[0][a]-e/2,n[1][a]=n[1][a]+e/2,n},_drawSplitline:function(t,e,i){var n=new NT({z2:20,shape:{points:t},style:e});i.add(n)},_getLinePointsOfOneWeek:function(t,e,i){var n=t.coordinateSystem;e=n.getDateInfo(e);for(var a=[],o=0;7>o;o++){var r=n.getNextNDay(e.time,o),s=n.dataToRect([r.time],!1);a[2*r.day]=s.tl,a[2*r.day+1]=s["horizontal"===i?"bl":"tr"]}return a},_formatterLabel:function(t,e){return"string"==typeof t&&t?Zr(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,i,n,a){e=e.slice();var o=["center","bottom"];"bottom"===n?(e[1]+=a,o=["center","top"]):"left"===n?e[0]-=a:"right"===n?(e[0]+=a,o=["center","top"]):e[1]-=a;var r=0;return("left"===n||"right"===n)&&(r=Math.PI/2),{rotation:r,position:e,style:{textAlign:o[0],textVerticalAlign:o[1]}}},_renderYearText:function(t,e,i,n){var a=t.getModel("yearLabel");if(a.get("show")){var o=a.get("margin"),r=a.get("position");r||(r="horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===i?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=a.get("formatter"),p={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(f,p),m=new IT({z2:30});Yo(m.style,a,{text:g}),m.attr(this._yearTextPositionControl(m,c[r],i,r,o)),n.add(m)}},_monthTextPositionControl:function(t,e,i,n,a){var o="left",r="top",s=t[0],l=t[1];return"horizontal"===i?(l+=a,e&&(o="center"),"start"===n&&(r="bottom")):(s+=a,e&&(r="middle"),"start"===n&&(o="right")),{x:s,y:l,textAlign:o,textVerticalAlign:r}},_renderMonthText:function(t,e,i){var n=t.getModel("monthLabel");if(n.get("show")){var a=n.get("nameMap"),o=n.get("margin"),s=n.get("position"),l=n.get("align"),u=[this._tlpoints,this._blpoints];w(a)&&(a=xR[a.toUpperCase()]||[]);var h="start"===s?0:1,c="horizontal"===e?0:1;o="start"===s?-o:o;for(var d="center"===l,f=0;ff;f++){var p=o.getNextNDay(c,f),g=o.dataToRect([p.time],!1).center,m=f;m=Math.abs((f+h)%7);var v=new IT({z2:30});r(Yo(v.style,a,{text:l[m]}),this._weekTextPositionControl(g,i,s,u,d)),n.add(v)}}}}),Eu({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,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:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),Ru({type:"title",render:function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,a=t.getModel("textStyle"),o=t.getModel("subtextStyle"),r=t.get("textAlign"),s=C(t.get("textBaseline"),t.get("textVerticalAlign")),l=new IT({style:Yo({},a,{text:t.get("text"),textFill:a.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new IT({style:Yo({},o,{text:h,textFill:o.getTextColor(),y:u.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink"),p=t.get("triggerEvent",!0);l.silent=!d&&!p,c.silent=!f&&!p,d&&l.on("click",function(){$r(d,"_"+t.get("target"))}),f&&c.on("click",function(){$r(f,"_"+t.get("subtarget"))}),l.eventData=c.eventData=p?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(l),h&&n.add(c);var g=n.getBoundingRect(),m=t.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=ts(m,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));r||(r=t.get("left")||t.get("right"),"middle"===r&&(r="center"),"right"===r?v.x+=v.width:"center"===r&&(v.x+=v.width/2)),s||(s=t.get("top")||t.get("bottom"),"center"===s&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),n.attr("position",[v.x,v.y]);var y={textAlign:r,textVerticalAlign:s};l.setStyle(y),c.setStyle(y),g=n.getBoundingRect();var x=v.margin,_=t.getItemStyle(["color","opacity"]);_.fill=t.get("backgroundColor");var b=new RT({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});n.add(b)}}});var bR=PD.legend.selector,wR={all:{type:"all",title:n(bR.all)},inverse:{type:"inverse",title:n(bR.inverse)}},SR=Eu({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{},this._updateSelector(t)},mergeOption:function(t){SR.superCall(this,"mergeOption",t),this._updateSelector(t)},_updateSelector:function(t){var e=t.selector;e===!0&&(e=t.selector=["all","inverse"]),_(e)&&f(e,function(t,i){w(t)&&(t={type:t}),e[i]=a(t,wR[t.type])})},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i=0},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},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}}});Cu("legendToggleSelect","legendselectchanged",x(f_,"toggleSelected")),Cu("legendAllSelect","legendselectall",x(f_,"allSelect")),Cu("legendInverseSelect","legendinverseselect",x(f_,"inverseSelect")),Cu("legendSelect","legendselected",x(f_,"select")),Cu("legendUnSelect","legendunselected",x(f_,"unSelect"));var MR=x,IR=f,TR=hM,AR=Ru({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new TR),this._backgroundEl,this.group.add(this._selectorGroup=new TR),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(t,e,i){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var a=t.get("align"),o=t.get("orient");a&&"auto"!==a||(a="right"===t.get("left")&&"vertical"===o?"right":"left");var r=t.get("selector",!0),l=t.get("selectorPosition",!0);!r||l&&"auto"!==l||(l="horizontal"===o?"end":"start"),this.renderInner(a,t,e,i,r,o,l);var u=t.getBoxLayoutParams(),h={width:i.getWidth(),height:i.getHeight()},c=t.get("padding"),d=ts(u,h,c),f=this.layoutInner(t,a,d,n,r,l),p=ts(s({width:f.width,height:f.height},u),h,c);this.group.attr("position",[p.x-f.x,p.y-f.y]),this.group.add(this._backgroundEl=g_(f,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(t,e,i,n,a,o,r){var s=this.getContentGroup(),l=B(),u=e.get("selectedMode"),h=[];i.eachRawSeries(function(t){!t.get("legendHoverLink")&&h.push(t.id)}),IR(e.getData(),function(a,o){var r=a.get("name");if(!this.newlineDisabled&&(""===r||"\n"===r))return void s.add(new TR({newline:!0}));var c=i.getSeriesByName(r)[0];if(!l.get(r))if(c){var d=c.getData(),f=d.getVisual("color"),p=d.getVisual("borderColor");"function"==typeof f&&(f=f(c.getDataParams(0))),"function"==typeof p&&(p=p(c.getDataParams(0)));var g=d.getVisual("legendSymbol")||"roundRect",m=d.getVisual("symbol"),v=this._createItem(r,o,a,e,g,m,t,f,p,u);v.on("click",MR(v_,r,null,n,h)).on("mouseover",MR(y_,c.name,null,n,h)).on("mouseout",MR(x_,c.name,null,n,h)),l.set(r,!0)}else i.eachRawSeries(function(i){if(!l.get(r)&&i.legendVisualProvider){var s=i.legendVisualProvider;if(!s.containName(r))return;var c=s.indexOfName(r),d=s.getItemVisual(c,"color"),f=s.getItemVisual(c,"borderColor"),p="roundRect",g=this._createItem(r,o,a,e,p,null,t,d,f,u);g.on("click",MR(v_,null,r,n,h)).on("mouseover",MR(y_,null,r,n,h)).on("mouseout",MR(x_,null,r,n,h)),l.set(r,!0)}},this)},this),a&&this._createSelector(a,e,n,o,r)},_createSelector:function(t,e,i){function n(t){var n=t.type,o=new IT({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:"all"===n?"legendAllSelect":"legendInverseSelect"})}});a.add(o);var r=e.getModel("selectorLabel"),s=e.getModel("emphasis.selectorLabel");Xo(o.style,o.hoverStyle={},r,s,{defaultText:t.title,isRectText:!1}),Fo(o)}var a=this.getSelectorGroup();IR(t,function(t){n(t)})},_createItem:function(t,e,i,n,a,o,s,l,u,h){var c=n.get("itemWidth"),d=n.get("itemHeight"),f=n.get("inactiveColor"),p=n.get("inactiveBorderColor"),g=n.get("symbolKeepAspect"),m=n.getModel("itemStyle"),v=n.isSelected(t),y=new TR,x=i.getModel("textStyle"),_=i.get("icon"),b=i.getModel("tooltip"),w=b.parentModel;a=_||a;var S=ec(a,0,0,c,d,v?l:f,null==g?!0:g);if(y.add(m_(S,a,m,u,p,v)),!_&&o&&(o!==a||"none"===o)){var M=.8*d;"none"===o&&(o="circle");var I=ec(o,(c-M)/2,(d-M)/2,M,M,v?l:f,null==g?!0:g);y.add(m_(I,o,m,u,p,v))}var T="left"===s?c+5:-5,A=s,D=n.get("formatter"),C=t;"string"==typeof D&&D?C=D.replace("{name}",null!=t?t:""):"function"==typeof D&&(C=D(t)),y.add(new IT({style:Yo({},x,{text:C,x:T,y:d/2,textFill:v?x.getTextColor():f,textAlign:A,textVerticalAlign:"middle"})}));var L=new RT({shape:y.getBoundingRect(),invisible:!0,tooltip:b.get("show")?r({content:t,formatter:w.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},b.option):null});return y.add(L),y.eachChild(function(t){t.silent=!0}),L.silent=!h,this.getContentGroup().add(y),Fo(y),y.__legendDataIndex=e,y},layoutInner:function(t,e,i,n,a,o){var r=this.getContentGroup(),s=this.getSelectorGroup();LA(t.get("orient"),r,t.get("itemGap"),i.width,i.height);var l=r.getBoundingRect(),u=[-l.x,-l.y];if(a){LA("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],d=t.get("selectorButtonGap",!0),f=t.getOrient().index,p=0===f?"width":"height",g=0===f?"height":"width",m=0===f?"y":"x";"end"===o?c[f]+=l[p]+d:u[f]+=h[p]+d,c[1-f]+=l[g]/2-h[g]/2,s.attr("position",c),r.attr("position",u);var v={x:0,y:0};return v[p]=l[p]+d+h[p],v[g]=Math.max(l[g],h[g]),v[m]=Math.min(0,h[m]+c[1-f]),v}return r.attr("position",u),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}}),DR=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries(function(t){for(var i=0;ii[a],f=[-h.x,-h.y];e||(f[n]=s.position[n]);var p=[0,0],g=[-c.x,-c.y],m=C(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(d){var v=t.get("pageButtonPosition",!0);"end"===v?g[n]+=i[a]-c[a]:p[n]+=c[a]+m}g[1-n]+=h[o]/2-c[o]/2,s.attr("position",f),l.attr("position",p),u.attr("position",g);var y={x:0,y:0};if(y[a]=d?i[a]:h[a],y[o]=Math.max(h[o],c[o]),y[r]=Math.min(0,c[r]+g[1-n]),l.__rectSize=i[a],d){var x={x:0,y:0};x[a]=Math.max(i[a]-c[a]-m,0),x[o]=y[o],l.setClipPath(new RT({shape:x})),l.__rectSize=x[a]}else u.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var _=this._getPageInfo(t);return null!=_.pageIndex&&nr(s,{position:_.contentPosition},d?t:!1),this._updatePageInfoView(t,_),y},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(t,e){var i=this._controllerGroup;f(["pagePrev","pageNext"],function(n){var a=null!=e[n+"DataIndex"],o=i.childOfName(n);o&&(o.setStyle("fill",a?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=a?"pointer":"default")});var n=i.childOfName("pageText"),a=t.get("pageFormatter"),o=e.pageIndex,r=null!=o?o+1:0,s=e.pageCount;n&&a&&n.setStyle("text",w(a)?a.replace("{current}",r).replace("{total}",s):a({current:r,total:s}))},_getPageInfo:function(t){function e(t){if(t){var e=t.getBoundingRect(),i=e[l]+t.position[r];return{s:i,e:i+e[s],i:t.__legendDataIndex}}}function i(t,e){return t.e>=e&&t.s<=e+o}var n=t.get("scrollDataIndex",!0),a=this.getContentGroup(),o=this._containerGroup.__rectSize,r=t.getOrient().index,s=kR[r],l=PR[r],u=this._findTargetItemIndex(n),h=a.children(),c=h[u],d=h.length,f=d?1:0,p={contentPosition:a.position.slice(),pageCount:f,pageIndex:f-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return p;var g=e(c);p.contentPosition[r]=-g.s;for(var m=u+1,v=g,y=g,x=null;d>=m;++m)x=e(h[m]),(!x&&y.e>v.s+o||x&&!i(x,v.s))&&(v=y.i>v.i?y:x,v&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=v.i),++p.pageCount)),y=x;for(var m=u-1,v=g,y=g,x=null;m>=-1;--m)x=e(h[m]),x&&i(y,x.s)||!(v.i=0;){var l=a.indexOf(r),u=a.substr(s+o.length,l-s-o.length);n["marker"+u]=u.indexOf("sub")>-1?{textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[u],textOffset:[3,0]}:{textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[u]},a=a.substr(l+1),s=a.indexOf("{marker")}var h=i.getModel("textStyle"),c=h.get("fontSize"),d=i.get("textLineHeight");null==d&&(d=Math.round(3*c/2)),this.el=new IT({style:Yo({},h,{rich:n,text:t,textBackgroundColor:i.get("backgroundColor"),textBorderRadius:i.get("borderRadius"),textFill:i.get("textStyle.color"),textPadding:i.get("padding"),textLineHeight:d}),z:i.get("z")}),this._zr.add(this.el);var f=this;this.el.on("mouseover",function(){f._enterable&&(clearTimeout(f._hideTimeout),f._show=!0),f._inContent=!0}),this.el.on("mouseout",function(){f._enterable&&f._show&&f.hideLater(f._hideDelay),f._inContent=!1})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){if(this.el){var i=this._styleCoord;T_(i,this._zr,t,e),this.el.attr("position",[i[0],i[1]])}},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(y(this.hide,this),t)):this.hide())},isShow:function(){return this._show},dispose:function(){clearTimeout(this._hideTimeout),this.el&&this._zr.remove(this.el)},getOuterSize:function(){var t=this.getSize();return{width:t[0],height:t[1]}}};var BR=y,VR=f,GR=Mr,FR=new RT({shape:{x:-1,y:-1,width:2,height:2}});Ru({type:"tooltip",init:function(t,e){if(!Kw.node){var i=t.getComponent("tooltip"),n=i.get("renderMode");this._renderMode=ga(n);var a;"html"===this._renderMode?(a=new I_(e.getDom(),e,{appendToBody:i.get("appendToBody",!0)}),this._newLine="
"):(a=new A_(e),this._newLine="\n"),this._tooltipContent=a}},render:function(t,e,i){if(!Kw.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var n=this._tooltipContent;n.update(t),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel,e=t.get("triggerOn");Px("itemTooltip",this._api,BR(function(t,i,n){"none"!==e&&(e.indexOf(t)>=0?this._tryShow(i,n):"leave"===t&&this._hide(n))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})})}},manuallyShowTip:function(t,e,i,n){if(n.from!==this.uid&&!Kw.node){var a=C_(n,i);this._ticket="";var o=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var r=FR;r.position=[n.x,n.y],r.update(),r.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:r},a)}else if(o)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},a);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var s=XE(n,e),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:n.position,target:s.el},a)}else null!=n.x&&null!=n.y&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target},a))}},manuallyHideTip:function(t,e,i,n){var a=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&a.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(C_(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var a=n.seriesIndex,o=n.dataIndex,r=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=a&&null!=o&&null!=r){var s=e.getSeriesByIndex(a);if(s){var l=s.getData(),t=D_([l.getItemModel(o),s,(s.coordinateSystem||{}).model,t]);if("axis"===t.get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:a,dataIndex:o,position:n.position}),!0}}},_tryShow:function(t,e){var i=t.target,n=this._tooltipModel;if(n){this._lastX=t.offsetX,this._lastY=t.offsetY;var a=t.dataByCoordSys;a&&a.length?this._showAxisTooltip(a,t):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,i,e)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,i,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var i=t.get("showDelay");e=y(e,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var i=this._ecModel,n=this._tooltipModel,o=[e.offsetX,e.offsetY],r=[],s=[],l=D_([e.tooltipOption,n]),u=this._renderMode,h=this._newLine,c={};VR(t,function(t){VR(t.dataByAxis,function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),n=t.value,o=[];if(e&&null!=n){var l=jx(n,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);f(t.seriesDataIndices,function(r){var h=i.getSeriesByIndex(r.seriesIndex),d=r.dataIndexInside,f=h&&h.getDataParams(d);if(f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=qh(e.axis,n),f.axisValueLabel=l,f){s.push(f);var p,g=h.formatTooltip(d,!0,null,u);if(S(g)){p=g.html;var m=g.markers;a(c,m)}else p=g;o.push(p)}});var d=l;r.push("html"!==u?o.join(h):(d?Wr(d)+h:"")+o.join(h))}})},this),r.reverse(),r=r.join(this._newLine+this._newLine);var d=e.position;this._showOrMove(l,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(l,d,o[0],o[1],this._tooltipContent,s):this._showTooltipContent(l,r,s,Math.random(),o[0],o[1],d,void 0,c)})},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,a=e.seriesIndex,o=n.getSeriesByIndex(a),r=e.dataModel||o,s=e.dataIndex,l=e.dataType,u=r.getData(l),h=D_([u.getItemModel(s),r,o&&(o.coordinateSystem||{}).model,this._tooltipModel]),c=h.get("trigger");if(null==c||"item"===c){var d,f,p=r.getDataParams(s,l),g=r.formatTooltip(s,!1,l,this._renderMode);S(g)?(d=g.html,f=g.markers):(d=g,f=null);var m="item_"+r.name+"_"+s;this._showOrMove(h,function(){this._showTooltipContent(h,d,p,m,t.offsetX,t.offsetY,t.position,t.target,f)}),i({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:a,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){var a=n;n={content:a,formatter:a}}var o=new mr(n,this._tooltipModel,this._ecModel),r=o.get("content"),s=Math.random();this._showOrMove(o,function(){this._showTooltipContent(o,r,o.get("formatterParams")||{},s,t.offsetX,t.offsetY,t.position,e)}),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,a,o,r,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent,h=t.get("formatter");r=r||t.get("position");var c=e;if(h&&"string"==typeof h)c=Hr(h,i,!0);else if("function"==typeof h){var d=BR(function(e,n){e===this._ticket&&(u.setContent(n,l,t),this._updatePosition(t,r,a,o,u,i,s))},this);this._ticket=n,c=h(i,n,d)}u.setContent(c,l,t),u.show(t),this._updatePosition(t,r,a,o,u,i,s)}},_updatePosition:function(t,e,i,n,a,o,r){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=a.getSize(),h=t.get("align"),c=t.get("verticalAlign"),d=r&&r.getBoundingRect().clone();if(r&&d.applyTransform(r.transform),"function"==typeof e&&(e=e([i,n],o,a.el,d,{viewSize:[s,l],contentSize:u.slice()})),_(e))i=GR(e[0],s),n=GR(e[1],l);else if(S(e)){e.width=u[0],e.height=u[1];var f=ts(e,{width:s,height:l});i=f.x,n=f.y,h=null,c=null}else if("string"==typeof e&&r){var p=P_(e,d,u);i=p[0],n=p[1]}else{var p=L_(i,n,a,s,l,h?null:20,c?null:20);i=p[0],n=p[1]}if(h&&(i-=O_(h)?u[0]/2:"right"===h?u[0]:0),c&&(n-=O_(c)?u[1]/2:"bottom"===c?u[1]:0),t.get("confine")){var p=k_(i,n,a,s,l);i=p[0],n=p[1]}a.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&VR(e,function(e,n){var a=e.dataByAxis||{},o=t[n]||{},r=o.dataByAxis||[];i&=a.length===r.length,i&&VR(a,function(t,e){var n=r[e]||{},a=t.seriesDataIndices||[],o=n.seriesDataIndices||[];i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&a.length===o.length,i&&VR(a,function(t,e){var n=o[e];i&=t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})})}),this._lastDataByCoordSys=t,!!i},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){Kw.node||(this._tooltipContent.dispose(),Bx("itemTooltip",e))}}),Cu({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),Cu({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var WR=Gr,HR=Wr,ZR=Eu({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i){this.mergeDefaultAndTheme(t,i),this._mergeOption(t,i,!1,!0)},isAnimationEnabled:function(){if(Kw.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e){this._mergeOption(t,e,!1,!1)},_mergeOption:function(t,e,i,n){var a=this.constructor,o=this.mainType+"Model";i||e.eachSeries(function(t){var i=t.get(this.mainType,!0),s=t[o];return i&&i.data?(s?s._mergeOption(i,e,!0):(n&&N_(i),f(i.data,function(t){t instanceof Array?(N_(t[0]),N_(t[1])):N_(t)}),s=new a(i,this,e),r(s,{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),s.__hostSeries=t),void(t[o]=s)):void(t[o]=null)},this)},formatTooltip:function(t,e,i,n){var a=this.getData(),o=this.getRawValue(t),r=_(o)?p(o,WR).join(", "):WR(o),s=a.getName(t),l=HR(this.name),u="html"===n?"
":"\n";return(null!=o||s)&&(l+=u),s&&(l+=HR(s),null!=o&&(l+=" : ")),null!=o&&(l+=HR(r)),l},getData:function(){return this._data},setData:function(t){this._data=t}});c(ZR,mD),ZR.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var XR=u,UR=x,YR={min:UR(R_,"min"),max:UR(R_,"max"),average:UR(R_,"average")},jR=Ru({type:"marker",init:function(){this.markerGroupMap=B()},render:function(t,e,i){var n=this.markerGroupMap;n.each(function(t){t.__keep=!1});var a=this.type+"Model";e.eachSeries(function(t){var n=t[a];n&&this.renderSeries(t,n,e,i)},this),n.each(function(t){!t.__keep&&this.group.remove(t.group)},this)},renderSeries:function(){}});jR.extend({type:"markPoint",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&(Z_(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,e,i,n){var a=t.coordinateSystem,o=t.id,r=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new Cd),u=X_(a,t,e);e.setData(u),Z_(e.getData(),t,n),u.each(function(t){var i=u.getItemModel(t),n=i.getShallow("symbol"),a=i.getShallow("symbolSize"),o=i.getShallow("symbolRotate"),s=b(n),l=b(a),h=b(o);if(s||l||h){var c=e.getRawValue(t),d=e.getDataParams(t);s&&(n=n(c,d)),l&&(a=a(c,d)),h&&(o=o(c,d))}u.setItemVisual(t,{symbol:n,symbolSize:a,symbolRotate:o,color:i.get("itemStyle.color")||r.getVisual("color")})}),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),Tu(function(t){t.markPoint=t.markPoint||{}}),ZR.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});var qR=function(t,e,i,o){var s=t.getData(),l=o.type;if(!_(o)&&("min"===l||"max"===l||"average"===l||"median"===l||null!=o.xAxis||null!=o.yAxis)){var u,h;if(null!=o.yAxis||null!=o.xAxis)u=e.getAxis(null!=o.yAxis?"y":"x"),h=D(o.yAxis,o.xAxis);else{var c=V_(o,s,e,t);u=c.valueAxis;var d=yh(s,c.valueDataDim);h=H_(s,d,l)}var f="x"===u.dim?0:1,p=1-f,g=n(o),m={};g.type=null,g.coord=[],m.coord=[],g.coord[p]=-1/0,m.coord[p]=1/0;var v=i.get("precision");v>=0&&"number"==typeof h&&(h=+h.toFixed(Math.min(v,20))),g.coord[f]=m.coord[f]=h,o=[g,m,{type:l,valueIndex:o.valueIndex,value:h}]}return o=[B_(t,o[0]),B_(t,o[1]),r({},o[2])],o[2].type=o[2].type||"",a(o[2],o[0]),a(o[2],o[1]),o};jR.extend({type:"markLine",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markLineModel;if(e){var n=e.getData(),a=e.__from,o=e.__to;a.each(function(e){q_(a,e,!0,t,i),q_(o,e,!1,t,i)}),n.each(function(t){n.setItemLayout(t,[a.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap.get(t.id).updateLayout()}},this)},renderSeries:function(t,e,i,n){function a(e,i,a){var o=e.getItemModel(i);q_(e,i,a,t,n),e.setItemVisual(i,{symbolRotate:o.get("symbolRotate"),symbolSize:o.get("symbolSize")||g[a?0:1],symbol:o.get("symbol",!0)||p[a?0:1],color:o.get("itemStyle.color")||s.getVisual("color")})}var o=t.coordinateSystem,r=t.id,s=t.getData(),l=this.markerGroupMap,u=l.get(r)||l.set(r,new Yg);this.group.add(u.group);var h=K_(o,t,e),c=h.from,d=h.to,f=h.line;e.__from=c,e.__to=d,e.setData(f);var p=e.get("symbol"),g=e.get("symbolSize");_(p)||(p=[p,p]),"number"==typeof g&&(g=[g,g]),h.from.each(function(t){a(c,t,!0),a(d,t,!1)}),f.each(function(t){var e=f.getItemModel(t).get("lineStyle.color");f.setItemVisual(t,{color:e||c.getItemVisual(t,"color")}),f.setItemLayout(t,[c.getItemLayout(t),d.getItemLayout(t)]),f.setItemVisual(t,{fromSymbolRotate:c.getItemVisual(t,"symbolRotate"),fromSymbolSize:c.getItemVisual(t,"symbolSize"),fromSymbol:c.getItemVisual(t,"symbol"),toSymbolRotate:d.getItemVisual(t,"symbolRotate"),toSymbolSize:d.getItemVisual(t,"symbolSize"),toSymbol:d.getItemVisual(t,"symbol")})}),u.updateData(f),h.line.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=e})}),u.__keep=!0,u.group.silent=e.get("silent")||t.get("silent")}}),Tu(function(t){t.markLine=t.markLine||{}}),ZR.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});var KR=function(t,e,i,n){var a=B_(t,n[0]),r=B_(t,n[1]),s=D,l=a.coord,u=r.coord;l[0]=s(l[0],-1/0),l[1]=s(l[1],-1/0),u[0]=s(u[0],1/0),u[1]=s(u[1],1/0);var h=o([{},a,r]);return h.coord=[a.coord,r.coord],h.x0=a.x,h.y0=a.y,h.x1=r.x,h.y1=r.y,h},$R=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];jR.extend({type:"markArea",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markAreaModel;if(e){var n=e.getData();n.each(function(e){var a=p($R,function(a){return tb(n,e,a,t,i)});n.setItemLayout(e,a);var o=n.getItemGraphicEl(e);o.setShape("points",a)})}},this)},renderSeries:function(t,e,i,n){var a=t.coordinateSystem,o=t.id,r=t.getData(),l=this.markerGroupMap,u=l.get(o)||l.set(o,{group:new hM});this.group.add(u.group),u.__keep=!0;var h=eb(a,t,e);e.setData(h),h.each(function(e){var i=p($R,function(i){return tb(h,e,i,t,n)}),o=!0;f($R,function(t){if(o){var i=h.get(t[0],e),n=h.get(t[1],e);($_(i)||a.getAxis("x").containData(i))&&($_(n)||a.getAxis("y").containData(n))&&(o=!1)}}),h.setItemLayout(e,{points:i,allClipped:o}),h.setItemVisual(e,{color:r.getVisual("color")})}),h.diff(u.__data).add(function(t){var e=h.getItemLayout(t);if(!e.allClipped){var i=new OT({shape:{points:e.points}});h.setItemGraphicEl(t,i),u.group.add(i)}}).update(function(t,i){var n=u.__data.getItemGraphicEl(i),a=h.getItemLayout(t);a.allClipped?n&&u.group.remove(n):(n?nr(n,{shape:{points:a.points}},e,t):n=new OT({shape:{points:a.points}}),h.setItemGraphicEl(t,n),u.group.add(n))}).remove(function(t){var e=u.__data.getItemGraphicEl(t);u.group.remove(e)}).execute(),h.eachItemGraphicEl(function(t,i){var n=h.getItemModel(i),a=n.getModel("label"),o=n.getModel("emphasis.label"),r=h.getItemVisual(i,"color");t.useStyle(s(n.getModel("itemStyle").getItemStyle(),{fill:li(r,.4),stroke:r})),t.hoverStyle=n.getModel("emphasis.itemStyle").getItemStyle(),Xo(t.style,t.hoverStyle,a,o,{labelFetcher:e,labelDataIndex:i,defaultText:h.getName(i)||"",isRectText:!0,autoColor:r}),Fo(t,{}),t.dataModel=e}),u.__data=h,u.group.silent=e.get("silent")||t.get("silent")}}),Tu(function(t){t.markArea=t.markArea||{}});var JR=function(t){var e=t&&t.timeline;_(e)||(e=e?[e]:[]),f(e,function(t){t&&ib(t)})};OA.registerSubTypeDefaulter("timeline",function(){return"slider"}),Cu({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var i=e.getComponent("timeline");return i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),e.resetOption("timeline"),s({currentIndex:i.option.currentIndex},t)}),Cu({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)});var QR=OA.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(t,e,i){this._data,this._names,this.mergeDefaultAndTheme(t,i),this._initData()},mergeOption:function(){QR.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),0>t&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex
+},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],i=t.axisType,a=this._names=[];if("category"===i){var o=[];f(e,function(t,e){var i,r=ia(t);S(t)?(i=n(t),i.value=e):i=e,o.push(i),w(r)||null!=r&&!isNaN(r)||(r=""),a.push(r+"")}),e=o}var r={category:"ordinal",time:"time"}[i]||"number",s=this._data=new nL([{name:"value",type:r}],this);s.initData(e,a)},getData:function(){return this._data},getCategories:function(){return"category"===this.get("axisType")?this._names.slice():void 0}}),tB=QR.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}});c(tB,mD);var eB=bD.extend({type:"timeline"}),iB=function(t,e,i,n){JL.call(this,t,e,i),this.type=n||"value",this.model=null};iB.prototype={constructor:iB,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},h(iB,JL);var nB=y,aB=f,oB=Math.PI;eB.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(t,e,i){if(this.model=t,this.api=i,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var n=this._layout(t,i),a=this._createGroup("mainGroup"),o=this._createGroup("labelGroup"),r=this._axis=this._createAxis(n,t);t.formatTooltip=function(t){return Wr(r.scale.getLabel(t))},aB(["AxisLine","AxisTick","Control","CurrentPointer"],function(e){this["_render"+e](n,a,r,t)},this),this._renderAxisLabel(n,o,r,t),this._position(n,t)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.position"),n=t.get("orient"),a=ob(t,e);null==i||"auto"===i?i="horizontal"===n?a.y+a.height/2=0||"+"===i?"left":"right"},r={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},s={horizontal:0,vertical:oB/2},l="vertical"===n?a.height:a.width,u=t.getModel("controlStyle"),h=u.get("show",!0),c=h?u.get("itemSize"):0,d=h?u.get("itemGap"):0,f=c+d,p=t.get("label.rotate")||0;p=p*oB/180;var g,m,v,y,x=u.get("position",!0),_=h&&u.get("showPlayBtn",!0),b=h&&u.get("showPrevBtn",!0),w=h&&u.get("showNextBtn",!0),S=0,M=l;return"left"===x||"bottom"===x?(_&&(g=[0,0],S+=f),b&&(m=[S,0],S+=f),w&&(v=[M-c,0],M-=f)):(_&&(g=[M-c,0],M-=f),b&&(m=[0,0],S+=f),w&&(v=[M-c,0],M-=f)),y=[S,M],t.get("inverse")&&y.reverse(),{viewRect:a,mainLength:l,orient:n,rotation:s[n],labelRotation:p,labelPosOpt:i,labelAlign:t.get("label.align")||o[n],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||r[n],playPosition:g,prevBtnPosition:m,nextBtnPosition:v,axisExtent:y,controlSize:c,controlGap:d}},_position:function(t){function e(t){var e=t.position;t.origin=[h[0][0]-e[0],h[1][0]-e[1]]}function i(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function n(t,e,i,n,a){t[n]+=i[n][a]-e[n][a]}var a=this._mainGroup,o=this._labelGroup,r=t.viewRect;if("vertical"===t.orient){var s=Oe(),l=r.x,u=r.y+r.height;Re(s,s,[-l,-u]),Be(s,s,-oB/2),Re(s,s,[l,u]),r=r.clone(),r.applyTransform(s)}var h=i(r),c=i(a.getBoundingRect()),d=i(o.getBoundingRect()),f=a.position,p=o.position;p[0]=f[0]=h[0][0];var g=t.labelPosOpt;if(isNaN(g)){var m="+"===g?0:1;n(f,c,h,1,m),n(p,d,h,1,1-m)}else{var m=g>=0?0:1;n(f,c,h,1,m),p[1]=f[1]+g}a.attr("position",f),o.attr("position",p),a.rotation=o.rotation=t.rotation,e(a),e(o)},_createAxis:function(t,e){var i=e.getData(),n=e.get("axisType"),a=Uh(e,n);a.getTicks=function(){return i.mapArray(["value"],function(t){return t})};var o=i.getDataExtent("value");a.setExtent(o[0],o[1]),a.niceTicks();var r=new iB("value",a,t.axisExtent,n);return r.model=e,r},_createGroup:function(t){var e=this["_"+t]=new hM;return this.group.add(e),e},_renderAxisLine:function(t,e,i,n){var a=i.getExtent();n.get("lineStyle.show")&&e.add(new VT({shape:{x1:a[0],y1:0,x2:a[1],y2:0},style:r({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,i,n){var a=n.getData(),o=i.scale.getTicks();aB(o,function(t){var o=i.dataToCoord(t),r=a.getItemModel(t),s=r.getModel("itemStyle"),l=r.getModel("emphasis.itemStyle"),u={position:[o,0],onclick:nB(this._changeTimeline,this,t)},h=sb(r,s,e,u);Fo(h,l.getItemStyle()),r.get("tooltip")?(h.dataIndex=t,h.dataModel=n):h.dataIndex=h.dataModel=null},this)},_renderAxisLabel:function(t,e,i,n){var a=i.getLabelModel();if(a.get("show")){var o=n.getData(),r=i.getViewLabels();aB(r,function(n){var a=n.tickValue,r=o.getItemModel(a),s=r.getModel("label"),l=r.getModel("emphasis.label"),u=i.dataToCoord(n.tickValue),h=new IT({position:[u,0],rotation:t.labelRotation-t.rotation,onclick:nB(this._changeTimeline,this,a),silent:!1});Yo(h.style,s,{text:n.formattedLabel,textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(h),Fo(h,Yo({},l))},this)}},_renderControl:function(t,e,i,n){function a(t,i,a,h){if(t){var c={position:t,origin:[o/2,0],rotation:h?-r:0,rectHover:!0,style:s,onclick:a},d=rb(n,i,u,c);e.add(d),Fo(d,l)}}var o=t.controlSize,r=t.rotation,s=n.getModel("controlStyle").getItemStyle(),l=n.getModel("emphasis.controlStyle").getItemStyle(),u=[0,-o/2,o,o],h=n.getPlayState(),c=n.get("inverse",!0);a(t.nextBtnPosition,"controlStyle.nextIcon",nB(this._changeTimeline,this,c?"-":"+")),a(t.prevBtnPosition,"controlStyle.prevIcon",nB(this._changeTimeline,this,c?"+":"-")),a(t.playPosition,"controlStyle."+(h?"stopIcon":"playIcon"),nB(this._handlePlayClick,this,!h),!0)},_renderCurrentPointer:function(t,e,i,n){var a=n.getData(),o=n.getCurrentIndex(),r=a.getItemModel(o).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=nB(s._handlePointerDrag,s),t.ondragend=nB(s._handlePointerDragend,s),lb(t,o,i,n,!0)},onUpdate:function(t){lb(t,o,i,n)}};this._currentPointer=sb(r,r,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var i=this._toAxisCoord(t)[0],n=this._axis,a=Tr(n.getExtent().slice());i>a[1]&&(i=a[1]),is&&(n=s,e=o)}),e},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_changeTimeline:function(t){var e=this.model.getCurrentIndex();"+"===t?t=e+1:"-"===t&&(t=e-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})}}),Tu(JR),OA.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var rB=["x","y","z","radius","angle","single"],sB=["cartesian2d","polar","singleAxis"],lB=hb(rB,["axisIndex","axis","index","id"]),uB=f,hB=Tr,cB=function(t,e,i,n){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=n,this._dataZoomModel=i};cB.prototype={constructor:cB,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var t=[],e=this.ecModel;return e.eachSeries(function(i){if(ub(i.get("coordinateSystem"))){var n=this._dimName,a=e.queryComponents({mainType:n+"Axis",index:i.get(n+"AxisIndex"),id:i.get(n+"AxisId")})[0];this._axisIndex===(a&&a.componentIndex)&&t.push(i)}},this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,i=this._dimName,n=this.ecModel,a=this.getAxisModel(),o="x"===i||"y"===i;o?(e="gridIndex",t="x"===i?"y":"x"):(e="polarIndex",t="angle"===i?"radius":"angle");var r;return n.eachComponent(t+"Axis",function(t){(t.get(e)||0)===(a.get(e)||0)&&(r=t)}),r},getMinMaxSpan:function(){return n(this._minMaxSpan)},calculateDataWindow:function(t){function e(t,e,i,n,a){var r=a?"Span":"ValueSpan";Az(0,t,i,"all",h["min"+r],h["max"+r]);for(var s=0;2>s;s++)e[s]=Sr(t[s],i,n,!0),a&&(e[s]=o.parse(e[s]))}var i,n=this._dataExtent,a=this.getAxisModel(),o=a.axis.scale,r=this._dataZoomModel.getRangePropMode(),s=[0,100],l=[],u=[];uB(["start","end"],function(e,a){var h=t[e],c=t[e+"Value"];"percent"===r[a]?(null==h&&(h=s[a]),c=o.parse(Sr(h,s,n))):(i=!0,c=null==c?n[a]:o.parse(c),h=Sr(c,n,s)),u[a]=c,l[a]=h}),hB(u),hB(l);var h=this._minMaxSpan;return i?e(u,l,n,s,!1):e(l,u,s,n,!0),{valueWindow:u,percentWindow:l}},reset:function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=db(this,this._dimName,e),gb(this);var i=this.calculateDataWindow(t.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,pb(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,pb(this,!0))},filterData:function(t){function e(t){return t>=o[0]&&t<=o[1]}if(t===this._dataZoomModel){var i=this._dimName,n=this.getTargetSeriesModels(),a=t.get("filterMode"),o=this._valueWindow;"none"!==a&&uB(n,function(t){var n=t.getData(),r=n.mapDimension(i,!0);r.length&&("weakFilter"===a?n.filterSelf(function(t){for(var e,i,a,s=0;so[1];if(u&&!h&&!c)return!0;u&&(a=!0),h&&(e=!0),c&&(i=!0)}return a&&e&&i}):uB(r,function(i){if("empty"===a)t.setData(n=n.map(i,function(t){return e(t)?t:0/0}));else{var r={};r[i]=o,n.selectRange(r)}}),uB(r,function(t){n.setApproximateExtent(o,t)}))})}}};var dB=f,fB=lB,pB=Eu({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=mb(t);this.settledOption=n,this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=mb(t);a(this.option,t,!0),a(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var e=this.option;Kw.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),vb(this,t);var i=this.settledOption;dB([["start","startValue"],["end","endValue"]],function(t,n){"value"===this._rangePropMode[n]&&(e[t[0]]=i[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis(function(e,i,n,a){var o=this.dependentModels[e.axis][i],r=o.__dzAxisProxy||(o.__dzAxisProxy=new cB(e.name,i,this,a));t[e.name+"_"+i]=r},this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();fB(function(e){var i=e.axisIndex;t[i]=ta(t[i])},this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;fB(function(i){null!=t[i.axisIndex]&&(e=!0)},this);var i=t.orient;return null==i&&e?"orient":e?void 0:(null==i&&(t.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),i=this.option,n=this.dependentModels;if(t){var a="vertical"===e?"y":"x";n[a+"Axis"].length?(i[a+"AxisIndex"]=[0],t=!1):dB(n.singleAxis,function(n){t&&n.get("orient",!0)===e&&(i.singleAxisIndex=[n.componentIndex],t=!1)})}t&&fB(function(e){if(t){var n=[],a=this.dependentModels[e.axis];if(a.length&&!n.length)for(var o=0,r=a.length;r>o;o++)"category"===a[o].get("type")&&n.push(o);i[e.axisIndex]=n,n.length&&(t=!1)}},this),t&&this.ecModel.eachSeries(function(t){this._isSeriesHasAllAxesTypeOf(t,"value")&&fB(function(e){var n=i[e.axisIndex],a=t.get(e.axisIndex),o=t.get(e.axisId),r=t.ecModel.queryComponents({mainType:e.axis,index:a,id:o})[0];a=r.componentIndex,u(n,a)<0&&n.push(a)})},this)},_autoSetOrient:function(){var t;this.eachTargetAxis(function(e){!t&&(t=e.name)},this),this.option.orient="y"===t?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(t,e){var i=!0;return fB(function(n){var a=t.get(n.axisIndex),o=this.dependentModels[n.axis][a];o&&o.get("type")===e||(i=!1)},this),i},_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}},getFirstTargetAxisModel:function(){var t;return fB(function(e){if(null==t){var i=this.get(e.axisIndex);i.length&&(t=this.dependentModels[e.axis][i[0]])}},this),t},eachTargetAxis:function(t,e){var i=this.ecModel;fB(function(n){dB(this.get(n.axisIndex),function(a){t.call(e,n,a,this,i)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var i=this.getAxisProxy(t,e);return i&&i.getAxisModel()},setRawRange:function(t){var e=this.option,i=this.settledOption;dB([["start","startValue"],["end","endValue"]],function(n){(null!=t[n[0]]||null!=t[n[1]])&&(e[n[0]]=i[n[0]]=t[n[0]],e[n[1]]=i[n[1]]=t[n[1]])},this),vb(this,t)},setCalculatedRange:function(t){var e=this.option;dB(["start","startValue","end","endValue"],function(i){e[i]=t[i]})},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();return t?t.getDataPercentWindow():void 0},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var i in e)if(e.hasOwnProperty(i)&&e[i].hostedBy(this))return e[i];for(var i in e)if(e.hasOwnProperty(i)&&!e[i].hostedBy(this))return e[i]},getRangePropMode:function(){return this._rangePropMode.slice()}}),gB=bD.extend({type:"dataZoom",render:function(t,e,i){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetCoordInfo:function(){function t(t,e,i,n){for(var a,o=0;o0&&e%g)return void(p+=f);var i=null==t||isNaN(t)||""===t,n=i?0:vB(t,o,u,!0);i&&!l&&e?(c.push([c[c.length-1][0],0]),d.push([d[d.length-1][0],0])):!i&&l&&(c.push([p,0]),d.push([p,0])),c.push([p,n]),d.push([p,n]),p+=f,l=i});var m=this.dataZoomModel;this._displayables.barGroup.add(new OT({shape:{points:c},style:s({fill:m.get("dataBackgroundColor")},m.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new NT({shape:{points:d},style:m.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(e!==!1){var i,n=this.ecModel;return t.eachTargetAxis(function(a,o){var r=t.getAxisProxy(a.name,o).getTargetSeriesModels();f(r,function(t){if(!(i||e!==!0&&u(AB,t.get("type"))<0)){var r,s=n.getComponent(a.axis,o).axis,l=yb(a.name),h=t.coordinateSystem;null!=l&&h.getOtherAxis&&(r=h.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),i={thisAxis:s,series:t,thisDim:a.name,otherDim:l,otherAxisInverse:r}}},this)},this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,a=this._size,o=this.dataZoomModel;n.add(t.filler=new mB({draggable:!0,cursor:xb(this._orient),drift:xB(this._onDragMove,this,"all"),ondragstart:xB(this._showDataInfo,this,!0),ondragend:xB(this._onDragEnd,this),onmouseover:xB(this._showDataInfo,this,!0),onmouseout:xB(this._showDataInfo,this,!1),style:{fill:o.get("fillerColor"),textPosition:"inside"}})),n.add(new mB({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{stroke:o.get("dataBackgroundColor")||o.get("borderColor"),lineWidth:wB,fill:"rgba(0,0,0,0)"}})),_B([0,1],function(t){var a=cr(o.get("handleIcon"),{cursor:xb(this._orient),draggable:!0,drift:xB(this._onDragMove,this,t),ondragend:xB(this._onDragEnd,this),onmouseover:xB(this._showDataInfo,this,!0),onmouseout:xB(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),r=a.getBoundingRect();this._handleHeight=Mr(o.get("handleSize"),this._size[1]),this._handleWidth=r.width/r.height*this._handleHeight,a.setStyle(o.getModel("handleStyle").getItemStyle());var s=o.get("handleColor");null!=s&&(a.style.fill=s),n.add(e[t]=a);var l=o.textStyleModel;this.group.add(i[t]=new IT({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:l.getTextColor(),textFont:l.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[vB(t[0],[0,100],e,!0),vB(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,a=this._getViewExtent(),o=i.findRepresentativeAxisProxy().getMinMaxSpan(),r=[0,100];Az(e,n,a,i.get("zoomLock")?"all":t,null!=o.minSpan?vB(o.minSpan,r,a,!0):null,null!=o.maxSpan?vB(o.maxSpan,r,a,!0):null);var s=this._range,l=this._range=yB([vB(n[0],a,r,!0),vB(n[1],a,r,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var e=this._displayables,i=this._handleEnds,n=yB(i.slice()),a=this._size;_B([0,1],function(t){var n=e.handles[t],o=this._handleHeight;n.attr({scale:[o/2,o/2],position:[i[t],a[1]/2-o/2]})},this),e.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:a[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){function e(t){var e=or(n.handles[t].parent,this.group),i=sr(0===t?"right":"left",e),s=this._handleWidth/2+TB,l=rr([c[t]+(0===t?-s:s),this._size[1]/2],e);a[t].setStyle({x:l[0],y:l[1],textVerticalAlign:o===MB?"middle":i,textAlign:o===MB?i:"center",text:r[t]})}var i=this.dataZoomModel,n=this._displayables,a=n.handleLabels,o=this._orient,r=["",""];if(i.get("showDetail")){var s=i.findRepresentativeAxisProxy();if(s){var l=s.getAxisModel().axis,u=this._range,h=t?s.calculateDataWindow({start:u[0],end:u[1]}).valueWindow:s.getDataValueWindow();r=[this._formatLabel(h[0],l),this._formatLabel(h[1],l)]}}var c=yB(this._handleEnds.slice());e.call(this,0),e.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter"),a=i.get("labelPrecision");(null==a||"auto"===a)&&(a=e.getPixelPrecision());var o=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(a,20));return b(n)?n(t,o):w(n)?n.replace("{value}",o):o},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,i,n){this._dragging=!0,IS(n.event);var a=this._displayables.barGroup.getLocalTransform(),o=rr([e,i],a,!0),r=this._updateInterval(t,o[0]),s=this.dataZoomModel.get("realtime");this._updateView(!s),r&&s&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,i=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,a=(n[0]+n[1])/2,o=this._updateInterval("all",i[0]-a);this._updateView(),o&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(_B(this.getTargetCoordInfo(),function(e){if(!t&&e.length){var i=e[0].model.coordinateSystem;t=i.getRect&&i.getRect()}}),!t){var e=this.api.getWidth(),i=this.api.getHeight();t={x:.2*e,y:.2*i,width:.6*e,height:.6*i}}return t}});Au({getTargetSeries:function(t){var e=B();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){var a=n.getAxisProxy(t.name,i);f(a.getTargetSeriesModels(),function(t){e.set(t.uid,t)})})}),e},modifyOutputEnd:!0,overallReset:function(t,e){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).reset(n,e)}),t.eachTargetAxis(function(t,i,n){n.getAxisProxy(t.name,i).filterData(n,e)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})})}}),Cu("dataZoom",function(t,e){var i=cb(y(e.eachComponent,e,"dataZoom"),lB,function(t,e){return t.get(e.axisIndex)}),n=[];e.eachComponent({mainType:"dataZoom",query:t},function(t){n.push.apply(n,i(t).nodes)}),f(n,function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})}),pB.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var CB="\x00_ec_dataZoom_roams",LB=y,kB=gB.extend({type:"dataZoom.inside",init:function(){this._range},render:function(t,e,i){kB.superApply(this,"render",arguments),this._range=t.getPercentRange(),f(this.getTargetCoordInfo(),function(e,n){var a=p(e,function(t){return wb(t.model)});f(e,function(e){var o=e.model,r={};f(["pan","zoom","scrollMove"],function(t){r[t]=LB(PB[t],this,e,n)},this),_b(i,{coordId:wb(o),allCoordIds:a,containsPoint:function(t,e,i){return o.coordinateSystem.containPoint([e,i])},dataZoomId:t.id,dataZoomModel:t,getRange:r})},this)},this)},dispose:function(){bb(this.api,this.dataZoomModel.id),kB.superApply(this,"dispose",arguments),this._range=null}}),PB={zoom:function(t,e,i,n){var a=this._range,o=a.slice(),r=t.axisModels[0];if(r){var s=OB[e](null,[n.originX,n.originY],r,i,t),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/n.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return Az(0,o,[0,100],0,h.minSpan,h.maxSpan),this._range=o,a[0]!==o[0]||a[1]!==o[1]?o:void 0}},pan:Db(function(t,e,i,n,a,o){var r=OB[n]([o.oldX,o.oldY],[o.newX,o.newY],e,a,i);return r.signal*(t[1]-t[0])*r.pixel/r.pixelLength}),scrollMove:Db(function(t,e,i,n,a,o){var r=OB[n]([0,0],[o.scrollDelta,o.scrollDelta],e,a,i);return r.signal*(t[1]-t[0])*o.scrollDelta})},OB={grid:function(t,e,i,n,a){var o=i.axis,r={},s=a.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(r.pixel=e[0]-t[0],r.pixelLength=s.width,r.pixelStart=s.x,r.signal=o.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=s.height,r.pixelStart=s.y,r.signal=o.inverse?-1:1),r},polar:function(t,e,i,n,a){var o=i.axis,r={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===i.mainType?(r.pixel=e[0]-t[0],r.pixelLength=l[1]-l[0],r.pixelStart=l[0],r.signal=o.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=u[1]-u[0],r.pixelStart=u[0],r.signal=o.inverse?-1:1),r},singleAxis:function(t,e,i,n,a){var o=i.axis,r=a.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=r.width,s.pixelStart=r.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=r.height,s.pixelStart=r.y,s.signal=o.inverse?-1:1),s}},NB=["rect","polygon","keep","clear"],zB=function(t,e){var i=t&&t.brush;if(_(i)||(i=i?[i]:[]),i.length){var n=[];f(i,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))});var a=t&&t.toolbox;_(a)&&(a=a[0]),a||(a={feature:{}},t.toolbox=[a]);var o=a.feature||(a.feature={}),r=o.brush||(o.brush={}),s=r.type||(r.type=[]);s.push.apply(s,n),Cb(s),e&&!s.length&&s.push.apply(s,NB)}},EB=f,RB={lineX:zb(0),lineY:zb(1),rect:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])},rect:function(t,e,i){return t&&i.boundingRect.intersect(t)}},polygon:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])&&rc(i.range,t[0],t[1])},rect:function(t,e,i){var n=i.range;if(!t||n.length<=1)return!1;var a=t.x,o=t.y,r=t.width,s=t.height,l=n[0];return rc(n,a,o)||rc(n,a+r,o)||rc(n,a,o+s)||rc(n,a+r,o+s)||Ti.create(t).contain(l[0],l[1])||dr(a,o,a+r,o,n)||dr(a,o,a,o+s,n)||dr(a+r,o,a+r,o+s,n)||dr(a,o+s,a+r,o+s,n)?!0:void 0}}},BB=f,VB=u,GB=x,FB=["dataToPoint","pointToData"],WB=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],HB=Rb.prototype;HB.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,i){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var n=YB[t.brushType](0,i,e);t.__rangeOffset={offset:jB[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}})},HB.matchOutputRanges=function(t,e,i){BB(t,function(t){var n=this.findTargetInfo(t,e);n&&n!==!0&&f(n.coordSyses,function(n){var a=YB[t.brushType](1,n,t.range);i(t,a.values,n,e)})},this)},HB.setInputRanges=function(t,e){BB(t,function(t){var i=this.findTargetInfo(t,e);if(t.range=t.range||[],i&&i!==!0){t.panelId=i.panelId;var n=YB[t.brushType](0,i.coordSys,t.coordRange),a=t.__rangeOffset;t.range=a?jB[t.brushType](n.values,a.offset,Wb(n.xyMinMax,a.xyMinMax)):n.values}},this)},HB.makePanelOpts=function(t,e){return p(this._targetInfoList,function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:e&&e(i),clipPath:Sv(n),isTargetByCursor:Iv(n,t,i.coordSysModel),getLinearBrushOtherExtent:Mv(n)}
+})},HB.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return n===!0||n&&VB(n.coordSyses,e.coordinateSystem)>=0},HB.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=Vb(e,t),a=0;a=0||VB(n,t.getAxis("y").model)>=0)&&o.push(t)}),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:o[0],coordSyses:o,getPanelRect:UB.grid,xAxisDeclared:r[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,e){BB(t.geoModels,function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:UB.geo})})}},XB=[function(t,e){var i=t.xAxisModel,n=t.yAxisModel,a=t.gridModel;return!a&&i&&(a=i.axis.grid.model),!a&&n&&(a=n.axis.grid.model),a&&a===e.gridModel},function(t,e){var i=t.geoModel;return i&&i===e.geoModel}],UB={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(or(t)),e}},YB={lineX:GB(Gb,0),lineY:GB(Gb,1),rect:function(t,e,i){var n=e[FB[t]]([i[0][0],i[1][0]]),a=e[FB[t]]([i[0][1],i[1][1]]),o=[Bb([n[0],a[0]]),Bb([n[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]],a=p(i,function(i){var a=e[FB[t]](i);return n[0][0]=Math.min(n[0][0],a[0]),n[1][0]=Math.min(n[1][0],a[1]),n[0][1]=Math.max(n[0][1],a[0]),n[1][1]=Math.max(n[1][1],a[1]),a});return{values:a,xyMinMax:n}}},jB={lineX:GB(Fb,0),lineY:GB(Fb,1),rect:function(t,e,i){return[[t[0][0]-i[0]*e[0][0],t[0][1]-i[0]*e[0][1]],[t[1][0]-i[1]*e[1][0],t[1][1]-i[1]*e[1][1]]]},polygon:function(t,e,i){return p(t,function(t,n){return[t[0]-i[0]*e[n][0],t[1]-i[1]*e[n][1]]})}},qB=["inBrush","outOfBrush"],KB="__ecBrushSelect",$B="__ecInBrushSelectEvent",JB=MC.VISUAL.BRUSH;Pu(JB,function(t,e,i){t.eachComponent({mainType:"brush"},function(t){i&&"takeGlobalCursor"===i.type&&t.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1})}),Zb(t)}),Ou(JB,function(t,e,i){var a,o,r=[];t.eachComponent({mainType:"brush"},function(e,i){function l(t){return"all"===m||v[t]}function u(t){return!!t.length}function h(t,e){var i=t.coordinateSystem;b|=i.hasAxisBrushed(),l(e)&&i.eachActiveState(t.getData(),function(t,e){"active"===t&&(y[e]=1)})}function c(i,n,a){var o=jb(i);if(o&&!qb(e,n)&&(f(w,function(n){o[n.brushType]&&e.brushTargetManager.controlSeries(n,i,t)&&a.push(n),b|=u(a)}),l(n)&&u(a))){var r=i.getData();r.each(function(t){Yb(o,a,r,t)&&(y[t]=1)})}}var d={brushId:e.id,brushIndex:i,brushName:e.name,areas:n(e.areas),selected:[]};r.push(d);var g=e.option,m=g.brushLink,v=[],y=[],x=[],b=0;i||(a=g.throttleType,o=g.throttleDelay);var w=p(e.areas,function(t){return Kb(s({boundingRect:QB[t.brushType](t)},t))}),S=kb(e.option,qB,function(t){t.mappingMethod="fixed"});_(m)&&f(m,function(t){v[t]=1}),t.eachSeries(function(t,e){var i=x[e]=[];"parallel"===t.subType?h(t,e,i):c(t,e,i)}),t.eachSeries(function(t,e){var i={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};d.selected.push(i);var n=jb(t),a=x[e],o=t.getData(),r=l(e)?function(t){return y[t]?(i.dataIndex.push(o.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return Yb(n,a,o,t)?(i.dataIndex.push(o.getRawIndex(t)),"inBrush"):"outOfBrush"};(l(e)?b:u(a))&&Ob(qB,S,o,r)})}),Xb(e,a,o,r,i)});{var QB={lineX:G,lineY:G,rect:function(t){return $b(t.range)},polygon:function(t){for(var e,i=t.range,n=0,a=i.length;a>n;n++){e=e||[[1/0,-1/0],[1/0,-1/0]];var o=i[n];o[0]e[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&$b(e)}},tV=["#ddd"];Eu({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var i=this.option;!e&&Pb(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:tV},n.hasOwnProperty("liftZ")||(n.liftZ=5)},setAreas:function(t){t&&(this.areas=p(t,function(t){return Jb(this.option,t)},this))},setBrushOption:function(t){this.brushOption=Jb(this.option,t),this.brushType=this.brushOption.brushType}})}Ru({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new Vm(e.getZr())).on("brush",y(this._onBrush,this)).mount()},render:function(t){return this.model=t,Qb.apply(this,arguments)},updateTransform:function(t,e){return Zb(e),Qb.apply(this,arguments)},updateView:Qb,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var i=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:i,areas:n(t),$from:i}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:i,areas:n(t),$from:i})}}),Cu({type:"brush",event:"brush"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(e){e.setAreas(t.areas)})}),Cu({type:"brushSelect",event:"brushSelected",update:"none"},function(){}),Cu({type:"brushEnd",event:"brushEnd",update:"none"},function(){});var eV={},iV=PD.toolbox.brush;iw.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:n(iV.title)};var nV=iw.prototype;nV.render=nV.updateView=function(t,e){var i,n,a;e.eachComponent({mainType:"brush"},function(t){i=t.brushType,n=t.brushOption.brushMode||"single",a|=t.areas.length}),this._brushType=i,this._brushMode=n,f(t.get("type",!0),function(e){t.setIconStatus(e,("keep"===e?"multiple"===n:"clear"===e?a:e===i)?"emphasis":"normal")})},nV.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return f(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},nV.onclick=function(t,e,i){var n=this._brushType,a=this._brushMode;"clear"===i?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n===i?!1:i,brushMode:"keep"===i?"multiple"===a?"single":"multiple":a}})},tw("brush",iw),Tu(zB);var aV=f,oV=function(t){var e=t&&t.visualMap;_(e)||(e=e?[e]:[]),aV(e,function(t){if(t){nw(t,"splitList")&&!nw(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&_(e)&&aV(e,function(t){S(t)&&(nw(t,"start")&&!nw(t,"min")&&(t.min=t.start),nw(t,"end")&&!nw(t,"max")&&(t.max=t.end))})}})};OA.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"});var rV=MC.VISUAL.COMPONENT;Ou(rV,{createOnAllSeries:!0,reset:function(t,e){var i=[];return e.eachComponent("visualMap",function(e){var n=t.pipelineContext;!e.isTargetSeries(t)||n&&n.large||i.push(Nb(e.stateList,e.targetVisuals,y(e.getValueState,e),e.getDataDimension(t.getData())))}),i}}),Ou(rV,{createOnAllSeries:!0,reset:function(t,e){var i=t.getData(),n=[];e.eachComponent("visualMap",function(e){if(e.isTargetSeries(t)){var a=e.getVisualMeta(y(aw,null,t,e))||{stops:[],outerColors:[]},o=e.getDataDimension(i),r=i.getDimensionInfo(o);null!=r&&(a.dimension=r.index,n.push(a))}}),t.getData().setVisual("visualMeta",n)}});var sV={get:function(t,e,i){var a=n((lV[t]||{})[e]);return i&&_(a)?a[a.length-1]:a}},lV={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]}},uV=wO.mapVisual,hV=wO.eachVisual,cV=_,dV=f,fV=Tr,pV=Sr,gV=G,mV=Eu({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(t,e,i){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,i)},optionUpdated:function(t,e){var i=this.option;Kw.canvasSupported||(i.realtime=!1),!e&&Pb(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=y(t,this),this.controllerVisuals=kb(this.option.controller,e,t),this.targetVisuals=kb(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,i){e.push(i)}):e=ta(t),e},eachTargetSeries:function(t,e){f(this.getTargetSeriesIndices(),function(i){t.call(e,this.ecModel.getSeriesByIndex(i))},this)},isTargetSeries:function(t){var e=!1;return this.eachTargetSeries(function(i){i===t&&(e=!0)}),e},formatValueText:function(t,e,i){function n(t){return t===l[0]?"min":t===l[1]?"max":(+t).toFixed(Math.min(s,20))}var a,o,r=this.option,s=r.precision,l=this.dataBound,u=r.formatter;return i=i||["<",">"],_(t)&&(t=t.slice(),a=!0),o=e?t:a?[n(t[0]),n(t[1])]:n(t),w(u)?u.replace("{value}",a?o[0]:o).replace("{value2}",a?o[1]:o):b(u)?a?u(t[0],t[1]):u(t):a?t[0]===l[0]?i[0]+" "+o[1]:t[1]===l[1]?i[1]+" "+o[0]:o[0]+" - "+o[1]:o},resetExtent:function(){var t=this.option,e=fV([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,i=t.dimensions;if(null!=e||i.length){if(null!=e)return t.getDimension(e);for(var n=t.dimensions,a=n.length-1;a>=0;a--){var o=n[a],r=t.getDimensionInfo(o);if(!r.isCalculationCoord)return o}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){function t(t){cV(r.color)&&!t.inRange&&(t.inRange={color:r.color.slice().reverse()}),t.inRange=t.inRange||{color:o.get("gradientColor")},dV(this.stateList,function(e){var i=t[e];if(w(i)){var n=sV.get(i,"active",h);n?(t[e]={},t[e][i]=n):delete t[e]}},this)}function e(t,e,i){var n=t[e],a=t[i];n&&!a&&(a=t[i]={},dV(n,function(t,e){if(wO.isValidType(e)){var i=sV.get(e,"inactive",h);null!=i&&(a[e]=i,"color"!==e||a.hasOwnProperty("opacity")||a.hasOwnProperty("colorAlpha")||(a.opacity=[0,0]))}}))}function i(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,i=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,a=this.get("inactiveColor");dV(this.stateList,function(o){var r=this.itemSize,s=t[o];s||(s=t[o]={color:h?a:[a]}),null==s.symbol&&(s.symbol=e&&n(e)||(h?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=i&&n(i)||(h?r[0]:[r[0],r[0]])),s.symbol=uV(s.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var l=s.symbolSize;if(null!=l){var u=-1/0;hV(l,function(t){t>u&&(u=t)}),s.symbolSize=uV(l,function(t){return pV(t,[0,u],[0,r[0]],!0)})}},this)}var o=this.ecModel,r=this.option,s={inRange:r.inRange,outOfRange:r.outOfRange},l=r.target||(r.target={}),u=r.controller||(r.controller={});a(l,s),a(u,s);var h=this.isCategory();t.call(this,l),t.call(this,u),e.call(this,l,"inRange","outOfRange"),i.call(this,u)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:gV,getValueState:gV,getVisualMeta:gV}),vV=[20,140],yV=mV.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(){yV.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){yV.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=vV[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=vV[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):_(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){mV.prototype.completeVisualOption.apply(this,arguments),f(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=Tr((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],a=i.getData();a.each(this.getDataDimension(a),function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)},this),e.push({seriesId:i.id,dataIndex:n})},this),e},getVisualMeta:function(t){function e(e,i){a.push({value:e,color:t(e,i)})}for(var i=ow(this,"outOfRange",this.getExtent()),n=ow(this,"inRange",this.option.range.slice()),a=[],o=0,r=0,s=n.length,l=i.length;l>r&&(!n.length||i[r]<=n[0]);r++)i[r]o;o++,u=0)u&&a.length&&e(n[o],"outOfRange"),e(n[o],"inRange");for(var u=1;l>r;r++)(!n.length||n[n.length-1]o;o++){var r=t[0]+a*o;if(r>t[1])break;n.push({color:this.getControllerVisual(r,"color",e),offset:o/i})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new hM("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(t,e){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,a=i.handleThumbs,o=i.handleLabels;bV([0,1],function(r){var s=a[r];s.setStyle("fill",e.handlesColor[r]),s.position[1]=t[r];var l=rr(i.handleLabelPoints[r],or(s,this.group));o[r].setStyle({x:l[0],y:l[1],text:n.formatValueText(this._dataInterval[r]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===r?"bottom":"top":"left",i.barGroup)})},this)}},_showIndicator:function(t,e,i,n){var a=this.visualMapModel,o=a.getExtent(),r=a.itemSize,s=[0,r[1]],l=_V(t,o,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",hw(!!i,n,l,r[1]));var c={convertOpacityToAlpha:!0},d=this.getControllerVisual(t,"color",c);h.setStyle("fill",d);var f=rr(u.indicatorLabelPoint,or(h,this.group)),p=u.indicatorLabel;p.attr("invisible",!1);var g=this._applyTransform("left",u.barGroup),m=this._orient;p.setStyle({text:(i?i:"")+a.formatValueText(e),textVerticalAlign:"horizontal"===m?g:"middle",textAlign:"horizontal"===m?"center":g,x:f[0],y:f[1]})}},_enableHoverLinkToSeries:function(){var t=this;this._shapes.barGroup.on("mousemove",function(e){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,n=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);n[1]=wV(SV(0,n[1]),i[1]),t._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var a=[0,n[1]],o=i.getExtent();t=wV(SV(a[0],t),a[1]);var r=cw(i,o,a),s=[t-r,t+r],l=_V(t,a,o,!0),u=[_V(s[0],a,o,!0),_V(s[1],a,o,!0)];s[0]a[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",r):1/0===u[1]?this._showIndicator(l,u[0],"> ",r):this._showIndicator(l,l,"≈ ",r));var h=this._hoverLinkDataIndices,c=[];(e||dw(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var d=la(h,c);this._dispatchHighDown("downplay",sw(d[0],i)),this._dispatchHighDown("highlight",sw(d[1],i))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,i=this.visualMapModel;if(e&&null!=e.dataIndex){var n=this.ecModel.getSeriesByIndex(e.seriesIndex);if(i.isTargetSeries(n)){var a=n.getData(e.dataType),o=a.get(i.getDataDimension(a),e.dataIndex,!0);isNaN(o)||this._showIndicator(o,o)}}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",sw(t,this.visualMapModel)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,i,n){var a=or(e,n?null:this.group);return lA[_(t)?"applyTransform":"transformDirection"](t,a,i)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}}),AV={type:"selectDataRange",event:"dataRangeSelected",update:"update"};Cu(AV,function(t,e){e.eachComponent({mainType:"visualMap",query:t},function(e){e.setSelected(t.selected)})}),Tu(oV);{var DV=mV.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){DV.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var i=this._mode=this._determineMode();CV[this._mode].call(this),this._resetSelected(t,e);var a=this.option.categories;this.resetVisual(function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=n(a)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=p(this._pieceList,function(t){var t=n(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){function t(t,e,i){return t&&t[e]&&(S(t[e])?t[e].hasOwnProperty(i):t[e]===i)}var e=this.option,i={},n=wO.listVisualTypes(),a=this.isCategory();f(e.pieces,function(t){f(n,function(e){t.hasOwnProperty(e)&&(i[e]=1)})}),f(i,function(i,n){var o=0;f(this.stateList,function(i){o|=t(e,i,n)||t(e.target,i,n)},this),!o&&f(this.stateList,function(t){(e[t]||(e[t]={}))[n]=sV.get(n,"inRange"===t?"active":"inactive",a)})},this),mV.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i=this.option,n=this._pieceList,a=(e?i:t).selected||{};if(i.selected=a,f(n,function(t){var e=this.getSelectedMapKey(t);a.hasOwnProperty(e)||(a[e]=!0)},this),"single"===i.selectedMode){var o=!1;f(n,function(t){var e=this.getSelectedMapKey(t);a[e]&&(o?a[e]=!1:o=!0)},this)}},getSelectedMapKey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=n(t)},getValueState:function(t){var e=wO.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries(function(i){var n=[],a=i.getData();a.each(this.getDataDimension(a),function(e,i){var a=wO.findPieceIndex(e,this._pieceList);a===t&&n.push(i)},this),e.push({seriesId:i.id,dataIndex:n})},this),e},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&1/0===i[1]?0:(i[0]+i[1])/2}return e},getVisualMeta:function(t){function e(e,o){var r=a.getRepresentValue({interval:e});o||(o=a.getValueState(r));var s=t(r,o);e[0]===-1/0?n[0]=s:1/0===e[1]?n[1]=s:i.push({value:e[0],color:s},{value:e[1],color:s})}if(!this.isCategory()){var i=[],n=[],a=this,o=this._pieceList.slice();if(o.length){var r=o[0].interval[0];r!==-1/0&&o.unshift({interval:[-1/0,r]}),r=o[o.length-1].interval[1],1/0!==r&&o.push({interval:[r,1/0]})}else o.push({interval:[-1/0,1/0]});var s=-1/0;return f(o,function(t){var i=t.interval;i&&(i[0]>s&&e([s,i[0]],"outOfRange"),e(i.slice()),s=i[1])},this),{stops:i,outerColors:n}}}}),CV={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),a=t.splitNumber;a=Math.max(parseInt(a,10),1),t.splitNumber=a;for(var o=(n[1]-n[0])/a;+o.toFixed(i)!==o&&5>i;)i++;t.precision=i,o=+o.toFixed(i),t.minOpen&&e.push({interval:[-1/0,n[0]],close:[0,0]});for(var r=0,s=n[0];a>r;s+=o,r++){var l=r===a-1?n[1]:s+o;e.push({interval:[s,l],close:[1,1]})}t.maxOpen&&e.push({interval:[n[1],1/0],close:[0,0]}),Br(e),f(e,function(t,e){t.index=e,t.text=this.formatValueText(t.interval)},this)},categories:function(){var t=this.option;f(t.categories,function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})},this),pw(t,this._pieceList)},pieces:function(){var t=this.option,e=this._pieceList;f(t.pieces,function(t,i){S(t)||(t={value:t});var n={text:"",index:i};if(null!=t.label&&(n.text=t.label),t.hasOwnProperty("value")){var a=n.value=t.value;n.interval=[a,a],n.close=[1,1]}else{for(var o=n.interval=[],r=n.close=[0,0],s=[1,0,1],l=[-1/0,1/0],u=[],h=0;2>h;h++){for(var c=[["gte","gt","min"],["lte","lt","max"]][h],d=0;3>d&&null==o[h];d++)o[h]=t[c[d]],r[h]=s[d],u[h]=2===d;null==o[h]&&(o[h]=l[h])}u[0]&&1/0===o[1]&&(r[0]=0),u[1]&&o[0]===-1/0&&(r[1]=0),o[0]===o[1]&&r[0]&&r[1]&&(n.value=o[0])}n.visual=wO.retrieveVisuals(t),e.push(n)},this),pw(t,e),Br(e),f(e,function(t){var e=t.close,i=[["<","≤"][e[1]],[">","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)},this)}};xV.extend({type:"visualMap.piecewise",doRender:function(){function t(t){var a=t.piece,u=new hM;u.onclick=y(this._onItemClick,this,a),this._enableHoverLink(u,t.indexInModelPieceList);var h=i.getRepresentValue(a);if(this._createItemSymbol(u,h,[0,0,l[0],l[1]]),c){var d=this.visualMapModel.getValueState(h);u.add(new IT({style:{x:"right"===s?-n:l[0]+n,y:l[1]/2,text:a.text,textVerticalAlign:"middle",textAlign:s,textFont:o,textFill:r,opacity:"outOfRange"===d?.5:1}}))}e.add(u)}var e=this.group;e.removeAll();var i=this.visualMapModel,n=i.get("textGap"),a=i.textStyleModel,o=a.getFont(),r=a.getTextColor(),s=this._getItemAlign(),l=i.itemSize,u=this._getViewData(),h=u.endsText,c=D(i.get("showLabel",!0),!h);h&&this._renderEndsText(e,h[0],l,c,s),f(u.viewPieceList,t,this),h&&this._renderEndsText(e,h[1],l,c,s),LA(i.get("orient"),e,i.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},_enableHoverLink:function(t,e){function i(t){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:t,batch:sw(i.findTargetDataIndices(e),i)})}t.on("mouseover",y(i,this,"highlight")).on("mouseout",y(i,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return rw(t,this.api,t.itemSize);var i=e.align;
+return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,a){if(e){var o=new hM,r=this.visualMapModel.textStyleModel;o.add(new IT({style:{x:n?"right"===a?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?a:"center",text:e,textFont:r.getFont(),textFill:r.getTextColor()}})),t.add(o)}},_getViewData:function(){var t=this.visualMapModel,e=p(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),a=t.get("inverse");return("horizontal"===n?a:!a)?e.reverse():i&&(i=i.slice().reverse()),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(ec(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,i=e.option,a=n(i.selected),o=e.getSelectedMapKey(t);"single"===i.selectedMode?(a[o]=!0,f(a,function(t,e){a[e]=e===o})):a[o]=!a[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:a})}})}Tu(oV);var LV=Eu({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){LV.superApply(this,"optionUpdated",arguments),f(this.option.feature,function(t,e){var i=ew(e);i&&a(t,i.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,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}}});Ru({type:"toolbox",render:function(t,e,i,n){function a(a,r){var s,l=c[a],d=c[r],f=u[l],p=new mr(f,t,t.ecModel);if(n&&null!=n.newTitle&&n.featureName===l&&(f.title=n.newTitle),l&&!d){if(gw(l))s={model:p,onclick:p.option.onclick,featureName:l};else{var g=ew(l);if(!g)return;s=new g(p,e,i)}h[l]=s}else{if(s=h[d],!s)return;s.model=p,s.ecModel=e,s.api=i}return!l&&d?void(s.dispose&&s.dispose(e,i)):!p.get("show")||s.unusable?void(s.remove&&s.remove(e,i)):(o(p,s,l),p.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},void(s.render&&s.render(p,e,i,n)))}function o(n,a,o){var u=n.getModel("iconStyle"),h=n.getModel("emphasis.iconStyle"),c=a.getIcons?a.getIcons():n.get("icon"),d=n.get("title")||{};if("string"==typeof c){var p=c,g=d;c={},d={},c[o]=p,d[o]=g}var m=n.iconPaths={};f(c,function(o,c){var f=cr(o,{},{x:-l/2,y:-l/2,width:l,height:l});f.setStyle(u.getItemStyle()),f.hoverStyle=h.getItemStyle(),f.setStyle({text:d[c],textAlign:h.get("textAlign"),textBorderRadius:h.get("textBorderRadius"),textPadding:h.get("textPadding"),textFill:null});var p=t.getModel("tooltip");p&&p.get("show")&&f.attr("tooltip",r({content:d[c],formatter:p.get("formatter",!0)||function(){return d[c]},formatterParams:{componentType:"toolbox",name:c,title:d[c],$vars:["name","title"]},position:p.get("position",!0)||"bottom"},p.option)),Fo(f),t.get("showTitle")&&(f.__title=d[c],f.on("mouseover",function(){var e=h.getItemStyle(),i="vertical"===t.get("orient")?null==t.get("right")?"right":"left":null==t.get("bottom")?"bottom":"top";f.setStyle({textFill:h.get("textFill")||e.fill||e.stroke||"#000",textBackgroundColor:h.get("textBackgroundColor"),textPosition:h.get("textPosition")||i})}).on("mouseout",function(){f.setStyle({textFill:null,textBackgroundColor:null})})),f.trigger(n.get("iconStatus."+c)||"normal"),s.add(f),f.on("click",y(a.onclick,a,e,i,c)),m[c]=f})}var s=this.group;if(s.removeAll(),t.get("show")){var l=+t.get("itemSize"),u=t.get("feature")||{},h=this._features||(this._features={}),c=[];f(u,function(t,e){c.push(e)}),new Zu(this._featureNames||[],c).add(a).update(a).remove(x(a,null)).execute(),this._featureNames=c,p_(s,t,i),s.add(g_(s.getBoundingRect(),t)),s.eachChild(function(t){var e=t.__title,n=t.hoverStyle;if(n&&e){var a=Xi(e,sn(n)),o=t.position[0]+s.position[0],r=t.position[1]+s.position[1]+l,u=!1;r+a.height>i.getHeight()&&(n.textPosition="top",u=!0);var h=u?-5-a.height:l+8;o+a.width/2>i.getWidth()?(n.textPosition=["100%",h],n.textAlign="right"):o-a.width/2<0&&(n.textPosition=[0,h],n.textAlign="left")}})}},updateView:function(t,e,i,n){f(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},remove:function(t,e){f(this._features,function(i){i.remove&&i.remove(t,e)}),this.group.removeAll()},dispose:function(t,e){f(this._features,function(i){i.dispose&&i.dispose(t,e)})}});var kV=PD.toolbox.saveAsImage;mw.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:kV.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:kV.lang.slice()},mw.prototype.unusable=!Kw.canvasSupported;var PV=mw.prototype;PV.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",a="svg"===e.getZr().painter.getType(),o=a?"svg":i.get("type",!0)||"png",r=e.getConnectedDataURL({type:o,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if("function"!=typeof MouseEvent||Kw.browser.ie||Kw.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(r.split(",")[1]),l=s.length,u=new Uint8Array(l);l--;)u[l]=s.charCodeAt(l);var h=new Blob([u]);window.navigator.msSaveOrOpenBlob(h,n+"."+o)}else{var c=i.get("lang"),d='',f=window.open();f.document.write(d)}else{var p=document.createElement("a");p.download=n+"."+o,p.target="_blank",p.href=r;var g=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});p.dispatchEvent(g)}},tw("saveAsImage",mw);var OV=PD.toolbox.magicType,NV="__ec_magicType_stack__";vw.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:n(OV.title),option:{},seriesIndex:{}};var zV=vw.prototype;zV.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return f(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var EV={line:function(t,e,i,n){return"bar"===t?a({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0):void 0},bar:function(t,e,i,n){return"line"===t?a({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0):void 0},stack:function(t,e,i,n){var o=i.get("stack")===NV;return"line"===t||"bar"===t?(n.setIconStatus("stack",o?"normal":"emphasis"),a({id:e,stack:o?"":NV},n.get("option.stack")||{},!0)):void 0}},RV=[["line","bar"],["stack"]];zV.onclick=function(t,e,i){var o=this.model,r=o.get("seriesIndex."+i);if(EV[i]){var l={series:[]},h=function(e){var n=e.subType,a=e.id,r=EV[i](n,a,e,o);r&&(s(r,e.option),l.series.push(r));var u=e.coordinateSystem;if(u&&"cartesian2d"===u.type&&("line"===i||"bar"===i)){var h=u.getAxesByScale("ordinal")[0];if(h){var c=h.dim,d=c+"Axis",f=t.queryComponents({mainType:d,index:e.get(name+"Index"),id:e.get(name+"Id")})[0],p=f.componentIndex;l[d]=l[d]||[];for(var g=0;p>=g;g++)l[d][p]=l[d][p]||{};l[d][p].boundaryGap="bar"===i}}};f(RV,function(t){u(t,i)>=0&&f(t,function(t){o.setIconStatus(t,"normal")})}),o.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},h);var c;if("stack"===i){var d=l.series&&l.series[0]&&l.series[0].stack===NV;c=d?a({stack:OV.title.tiled},OV.title):n(OV.title)}e.dispatchAction({type:"changeMagicType",currentType:i,newOption:l,newTitle:c,featureName:"magicType"})}},Cu({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),tw("magicType",vw);var BV=PD.toolbox.dataView,VV=new Array(60).join("-"),GV=" ",FV=new RegExp("["+GV+"]+","g");Aw.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:n(BV.title),lang:n(BV.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},Aw.prototype.onclick=function(t,e){function i(){n.removeChild(o),x._dom=null}var n=e.getDom(),a=this.model;this._dom&&n.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",o.style.backgroundColor=a.get("backgroundColor")||"#fff";var r=document.createElement("h4"),s=a.get("lang")||[];r.innerHTML=s[0]||a.get("title"),r.style.cssText="margin: 10px 20px;",r.style.color=a.get("textColor");var l=document.createElement("div"),u=document.createElement("textarea");l.style.cssText="display:block;width:100%;overflow:auto;";var h=a.get("optionToContent"),c=a.get("contentToOption"),d=bw(t);if("function"==typeof h){var f=h(e.getOption());"string"==typeof f?l.innerHTML=f:T(f)&&l.appendChild(f)}else l.appendChild(u),u.readOnly=a.get("readOnly"),u.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",u.style.color=a.get("textColor"),u.style.borderColor=a.get("textareaBorderColor"),u.style.backgroundColor=a.get("textareaColor"),u.value=d.value;var p=d.meta,g=document.createElement("div");g.style.cssText="position:absolute;bottom:0;left:0;right:0;";var m="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",v=document.createElement("div"),y=document.createElement("div");m+=";background-color:"+a.get("buttonColor"),m+=";color:"+a.get("buttonTextColor");var x=this;Se(v,"click",i),Se(y,"click",function(){var t;try{t="function"==typeof c?c(l,e.getOption()):Tw(u.value,p)}catch(n){throw i(),new Error("Data view format error "+n)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),i()}),v.innerHTML=s[1],y.innerHTML=s[2],y.style.cssText=m,v.style.cssText=m,!a.get("readOnly")&&g.appendChild(y),g.appendChild(v),o.appendChild(r),o.appendChild(l),o.appendChild(g),l.style.height=n.clientHeight-80+"px",n.appendChild(o),this._dom=o},Aw.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},Aw.prototype.dispose=function(t,e){this.remove(t,e)},tw("dataView",Aw),Cu({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,e){var i=[];f(t.newOption.series,function(t){var n=e.getSeriesByName(t.name)[0];if(n){var a=n.get("data");i.push({name:t.name,data:Dw(t.data,a)})}else i.push(r({type:"scatter"},t))}),e.mergeOption(s({series:i},t.newOption))});var WV=f,HV="\x00_ec_hist_store";pB.extend({type:"dataZoom.select"}),gB.extend({type:"dataZoom.select"});var ZV=PD.toolbox.dataZoom,XV=f,UV="\x00_ec_\x00toolbox-dataZoom_";Nw.defaultOption={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:n(ZV.title),brushStyle:{borderWidth:0,color:"rgba(0,0,0,0.2)"}};var YV=Nw.prototype;YV.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,Rw(t,e,this,n,i),Ew(t,e)},YV.onclick=function(t,e,i){jV[i].call(this)},YV.remove=function(){this._brushController.unmount()},YV.dispose=function(){this._brushController.dispose()};var jV={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(Lw(this.ecModel))}};YV._onBrush=function(t,e){function i(t,e,i){var r=e.getAxis(t),s=r.model,l=n(t,s,o),u=l.findRepresentativeAxisProxy(s).getMinMaxSpan();(null!=u.minValueSpan||null!=u.maxValueSpan)&&(i=Az(0,i.slice(),r.scale.getExtent(),0,u.minValueSpan,u.maxValueSpan)),l&&(a[l.id]={dataZoomId:l.id,startValue:i[0],endValue:i[1]})}function n(t,e,i){var n;return i.eachComponent({mainType:"dataZoom",subType:"select"},function(i){var a=i.getAxisModel(t,e.componentIndex);a&&(n=i)}),n}if(e.isEnd&&t.length){var a={},o=this.ecModel;this._brushController.updateCovers([]);var r=new Rb(zw(this.model.option),o,{include:["grid"]});r.matchOutputRanges(t,o,function(t,e,n){if("cartesian2d"===n.type){var a=t.brushType;"rect"===a?(i("x",n,e[0]),i("y",n,e[1])):i({lineX:"x",lineY:"y"}[a],n,e)}}),Cw(o,a),this._dispatchZoomAction(a)}},YV._dispatchZoomAction=function(t){var e=[];XV(t,function(t){e.push(n(t))}),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},tw("dataZoom",Nw),Tu(function(t){function e(t,e){if(e){var a=t+"Index",o=e[a];null==o||"all"===o||_(o)||(o=o===!1||"none"===o?[]:[o]),i(t,function(i,r){if(null==o||"all"===o||-1!==u(o,r)){var s={type:"select",$fromToolbox:!0,filterMode:e.filterMode||"filter",id:UV+t+r};s[a]=r,n.push(s)}})}}function i(e,i){var n=t[e];_(n)||(n=n?[n]:[]),XV(n,i)}if(t){var n=t.dataZoom||(t.dataZoom=[]);_(n)||(t.dataZoom=n=[n]);var a=t.toolbox;if(a&&(_(a)&&(a=a[0]),a&&a.feature)){var o=a.feature.dataZoom;e("xAxis",o),e("yAxis",o)}}});var qV=PD.toolbox.restore;Bw.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:qV.title};var KV=Bw.prototype;KV.onclick=function(t,e){kw(t),e.dispatchAction({type:"restore",from:this.uid})},tw("restore",Bw),Cu({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var $V={path:null,compoundPath:null,group:hM,image:Dn,text:IT};Tu(function(t){var e=t.graphic;_(e)?t.graphic=e[0]&&e[0].elements?[t.graphic[0]]:[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var JV=Eu({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(){var t=this.option.elements;this.option.elements=null,JV.superApply(this,"mergeOption",arguments),this.option.elements=t},optionUpdated:function(t,e){var i=this.option,n=(e?i:t).elements,a=i.elements=e?[]:i.elements,o=[];this._flatten(n,o);var r=aa(a,o);oa(r);var s=this._elOptionsToUpdate=[];f(r,function(t,e){var i=t.option;i&&(s.push(i),Hw(t,i),Zw(a,e,i),Xw(a[e],i))},this);for(var l=a.length-1;l>=0;l--)null==a[l]?a.splice(l,1):delete a[l].$action},_flatten:function(t,e,i){f(t,function(t){if(t){i&&(t.parentOption=i),e.push(t);var n=t.children;"group"===t.type&&n&&this._flatten(n,e,t),delete t.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});Ru({type:"graphic",init:function(){this._elMap=B(),this._lastGraphicModel},render:function(t,e,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,i)},_updateElements:function(t){var e=t.useElOptionsToUpdate();if(e){var i=this._elMap,n=this.group;f(e,function(e){var a=e.$action,o=e.id,r=i.get(o),s=e.parentId,l=null!=s?i.get(s):n,u=e.style;"text"===e.type&&u&&(e.hv&&e.hv[1]&&(u.textVerticalAlign=u.textBaseline=null),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke));var h=Fw(e);a&&"merge"!==a?"replace"===a?(Gw(r,i),Vw(o,l,h,i)):"remove"===a&&Gw(r,i):r?r.attr(h):Vw(o,l,h,i);var c=i.get(o);c&&(c.__ecGraphicWidthOption=e.width,c.__ecGraphicHeightOption=e.height,Uw(c,t,e))})}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,a=this._elMap,o=e.getWidth(),r=e.getHeight(),s=0;s=0;s--){var l=i[s],u=a.get(l.id);if(u){var h=u.parent,d=h===n?{width:o,height:r}:{width:h.__ecGraphicWidth,height:h.__ecGraphicHeight};es(u,l,d,null,{hv:l.hv,boundingMode:l.bounding})}}},_clear:function(){var t=this._elMap;t.each(function(e){Gw(e,t)}),this._elMap=B()},dispose:function(){this._clear()}}),t.version=hC,t.dependencies=cC,t.PRIORITY=MC,t.init=xu,t.connect=_u,t.disConnect=bu,t.disconnect=ZC,t.dispose=wu,t.getInstanceByDom=Su,t.getInstanceById=Mu,t.registerTheme=Iu,t.registerPreprocessor=Tu,t.registerProcessor=Au,t.registerPostUpdate=Du,t.registerAction=Cu,t.registerCoordinateSystem=Lu,t.getCoordinateSystemDimensions=ku,t.registerLayout=Pu,t.registerVisual=Ou,t.registerLoading=zu,t.extendComponentModel=Eu,t.extendComponentView=Ru,t.extendSeriesModel=Bu,t.extendChartView=Vu,t.setCanvasCreator=Gu,t.registerMap=Fu,t.getMap=Wu,t.dataTool=XC,t.zrender=lI,t.number=xA,t.format=TA,t.throttle=bl,t.helper=YL,t.matrix=PS,t.vector=mS,t.color=$S,t.parseGeoJSON=qL,t.parseGeoJson=QL,t.util=tk,t.graphic=ek,t.List=nL,t.Model=mr,t.Axis=JL,t.env=Kw});
\ No newline at end of file
diff --git a/visualization/src/main/resources/static/jquery-2.1.1.min.js b/visualization/src/main/resources/static/jquery-2.1.1.min.js
new file mode 100644
index 0000000..c4643af
--- /dev/null
+++ b/visualization/src/main/resources/static/jquery-2.1.1.min.js
@@ -0,0 +1,5 @@
+/*! jQuery v2.1.1 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */
+!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){return a===b&&(l=!0),0},C="undefined",D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|.*)\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes),F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],!a||"string"!=typeof a)return d;if(1!==(k=b.nodeType)&&9!==k)return[];if(p&&!e){if(f=_.exec(a))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return I.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return I.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=9===k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+qb(o[l]);w=ab.test(a)&&ob(b.parentNode)||b,x=o.join(",")}if(x)try{return I.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function hb(a){return a[u]=!0,a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function kb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function nb(a){return hb(function(b){return b=+b,hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={},f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;return e!==n&&9===e.nodeType&&e.documentElement?(n=e,o=e.documentElement,p=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){m()},!1):g.attachEvent&&g.attachEvent("onunload",function(){m()})),c.attributes=ib(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ib(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){return a.innerHTML="",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=ib(function(a){return o.appendChild(a).id=u,!e.getElementsByName||!e.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==C?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==C&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(e.querySelectorAll))&&(ib(function(a){a.innerHTML="",a.querySelectorAll("[msallowclip^='']").length&&q.push("[*^$]="+M+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+M+"*(?:value|"+L+")"),a.querySelectorAll(":checked").length||q.push(":checked")}),ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+M+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ib(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",Q)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===v&&t(v,a)?-1:b===e||b.ownerDocument===v&&t(v,b)?1:k?K.call(k,a)-K.call(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0;if(f===g)return kb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},e):n},fb.matches=function(a,b){return fb(a,null,null,b)},fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fb(b,n,null,[a]).length>0},fb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=K.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){return W.test(a||"")||fb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[0>c?c+b:c]}),even:nb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:nb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:nb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:nb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function rb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function tb(a,b,c){for(var d=0,e=b.length;e>d;d++)fb(a,b[d],c);return c}function ub(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function vb(a,b,c,d,e,f){return d&&!d[u]&&(d=vb(d)),e&&!e[u]&&(e=vb(e,f)),hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ub(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ub(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?K.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ub(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):I.apply(g,r)})}function wb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,!0),l=rb(function(a){return K.call(b,a)>-1},h,!0),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>i;i++)if(c=d.relative[a[i].type])m=[rb(sb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&wb(a.slice(i,e)),f>e&&wb(a=a.slice(e)),f>e&&qb(a))}m.push(c)}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=G.call(i));s=ub(s)}I.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&fb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?hb(f):f}return h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xb(e,d)),f.selector=a}return f},i=fb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qb(j),!a)return I.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ib(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ib(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||jb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ib(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||jb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ib(function(a){return null==a.getAttribute("disabled")})||jb(L,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+Math.random()}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)
+},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthx",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*\s*$/g,ib={option:[1,""],thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1>$2>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1>$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("")).appendTo(b.documentElement),b=qb[0].contentDocument,b.write(),b.close(),c=sb(a,b),qb.detach()),rb[a]=c),c}var ub=/^margin/,vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i"),wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;return c=c||wb(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),vb.test(g)&&ub.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function yb(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(f.style){f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===f.style.backgroundClip,e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute",e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",f.innerHTML="",d.appendChild(e);var g=a.getComputedStyle(f,null);b="1%"!==g.top,c="4px"===g.width,d.removeChild(e)}a.getComputedStyle&&n.extend(k,{pixelPosition:function(){return g(),b},boxSizingReliable:function(){return null==c&&g(),c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));return c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",f.style.width="1px",d.appendChild(e),b=!parseFloat(a.getComputedStyle(c,null).marginRight),d.removeChild(e),b}})}}(),n.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a)return b;var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--)if(b=Eb[e]+c,b in a)return b;return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+R[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+R[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+R[f]+"Width",!0,e))):(g+=n.css(a,"padding"+R[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+R[f]+"Width",!0,e)));return g}function Ib(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=wb(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=xb(a,b,f),(0>e||null==e)&&(e=a.style[b]),vb.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=L.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&S(d)&&(f[g]=L.access(d,"olddisplay",tb(d.nodeName)))):(e=S(d),"none"===c&&e||L.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h)),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Bb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(n.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||n.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h)),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=xb(a,b,d)),"normal"===e&&b in Db&&(e=Db[b]),""===c||c?(f=parseFloat(e),c===!0||n.isNumeric(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?zb.test(n.css(a,"display"))&&0===a.offsetWidth?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d):void 0},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,"border-box"===n.css(a,"boxSizing",!1,e),e):0)}}}),n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){return b?n.swap(a,{display:"inline-block"},xb,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+R[d]+b]=f[d]||f[d-2]||f[0];return e}},ub.test(a)||(n.cssHooks[a+b].set=Gb)}),n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=wb(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,!0)},hide:function(){return Jb(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){S(this)?n(this).show():n(this).hide()})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb,Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];return this.pos=b=this.options.duration?n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Kb.propHooks._default.set(this),this}},Kb.prototype.init.prototype=Kb.prototype,Kb.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[n.cssProps[a.prop]]||n.cssHooks[a.prop])?n.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},n.fx=Kb.prototype.init,n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||"px"!==f&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,n.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function Sb(){return setTimeout(function(){Lb=void 0}),Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=R[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ub(a,b,c){for(var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?L.get(a,"olddisplay")||tb(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Nb.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?tb(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=L.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;L.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ub(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function Wb(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(Wb(k,j.opts.specialEasing);g>f;f++)if(d=Qb[f].call(j,a,k,j.opts))return d;return n.map(k,Ub,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Rb[c]=Rb[c]||[],Rb[c].unshift(b)},prefilter:function(a,b){b?Qb.unshift(a):Qb.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);(e||L.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=L.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Pb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Tb(b,!0),a,d,e)}}),n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Lb=n.now();b1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===U?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=n.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void n.removeAttr(a,b))
+},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),Zb={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;return d||(f=$b[b],$b[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,$b[b]=f),e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!n.isXMLDoc(a),f&&(b=n.propFix[b]||b,e=n.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),k.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=n.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0===arguments.length||"string"==typeof a&&a,i=0,j=this.length;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(E)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ac," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?n.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(n.isFunction(a)?function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===U||"boolean"===c)&&(this.className&&L.set(this,"__className__",this.className),this.className=this.className||a===!1?"":L.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0)return!0;return!1}});var bc=/\r/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(bc,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(d.value,f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>=0:void 0}},k.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now(),dc=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(a){var b,c;if(!a||"string"!=typeof a)return null;try{c=new DOMParser,b=c.parseFromString(a,"text/xml")}catch(d){b=void 0}return(!b||b.getElementsByTagName("parsererror").length)&&n.error("Invalid XML: "+a),b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \t]*([^\r\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\/\//,mc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=l.createElement("a"),fc.href="",fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?tc(tc(a,n.ajaxSettings),b):tc(n.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(h=mc.exec(k.url.toLowerCase()),k.crossDomain=!(!h||h[1]===ec[1]&&h[2]===ec[2]&&(h[3]||("http:"===h[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=n.param(k.data,k.traditional)),sc(nc,k,b,v),2===t)return v;i=k.global,i&&0===n.active++&&n.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!kc.test(k.type),d=k.url,k.hasContent||(k.data&&(d=k.url+=(dc.test(d)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++)),k.ifModified&&(n.lastModified[d]&&v.setRequestHeader("If-Modified-Since",n.lastModified[d]),n.etag[d]&&v.setRequestHeader("If-None-Match",n.etag[d])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers)v.setRequestHeader(j,k.headers[j]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(j in{success:1,error:1,complete:1})v[j](k[j]);if(c=sc(oc,k,b,v)){v.readyState=1,i&&m.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,c.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,f,h){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),c=void 0,e=h||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,f&&(u=uc(k,v,f)),u=vc(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(n.lastModified[d]=w),w=v.getResponseHeader("etag"),w&&(n.etag[d]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,i&&m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),i&&(m.trigger("ajaxComplete",[v,k]),--n.active||n.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return this.each(n.isFunction(a)?function(b){n(this).wrapInner(a.call(this,b))}:function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wc=/%20/g,xc=/\[\]$/,yc=/\r?\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||xc.test(a)?d(a,e):Bc(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Bc(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Bc(c,a[c],b,e);return d.join("&").replace(wc,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(yc,"\r\n")}}):{name:b.name,value:c.replace(yc,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=n.ajaxSettings.xhr();a.ActiveXObject&&n(a).on("unload",function(){for(var a in Dc)Dc[a]()}),k.cors=!!Fc&&"withCredentials"in Fc,k.ajax=Fc=!!Fc,n.ajaxTransport(function(a){var b;return k.cors||Fc&&!a.crossDomain?{send:function(c,d){var e,f=a.xhr(),g=++Cc;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)f.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete Dc[g],b=f.onload=f.onerror=null,"abort"===a?f.abort():"error"===a?d(f.status,f.statusText):d(Ec[f.status]||f.status,f.statusText,"string"==typeof f.responseText?{text:f.responseText}:void 0,f.getAllResponseHeaders()))}},f.onload=b(),f.onerror=b("error"),b=Dc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b)throw h}},abort:function(){b&&b()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("
+
+
+
+
+