You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
680 KiB

import{l as t,_ as e,r as i,k as n,a8 as a,b as r,c as o,e as s,d as l,f as h,C as u,F as c,A as d,X as p}from"./index-4cb6f38c.js";import{h as f}from"./moment-6961f857.js";var g={},m={};"undefined"!=typeof window||void 0!==t&&t.__DEV__;var v={},y=2311;var x=function(){return y++};var _="undefined"==typeof navigator?{browser:{},os:{},node:!0,canvasSupported:!0,svgSupported:!0}:function(t){var e={},i={},n=t.match(/Firefox\/([\d.]+)/),a=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),r=t.match(/Edge\/([\d.]+)/),o=/micromessenger/i.test(t);n&&(i.firefox=!0,i.version=n[1]);a&&(i.ie=!0,i.version=a[1]);r&&(i.edge=!0,i.version=r[1]);o&&(i.weChat=!0);return{browser:i,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!i.ie&&!i.edge,pointerEventsSupported:"onpointerdown"in window&&(i.edge||i.ie&&i.version>=11)}}(navigator.userAgent),b={},w={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},S={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},M=Object.prototype.toString,I=Array.prototype,A=I.forEach,T=I.filter,C=I.slice,L=I.map,D=I.reduce,P={};function k(t){if(null==t||"object"!=typeof t)return t;var e=t,i=M.call(t);if("[object Array]"===i){e=[];for(var n=0,a=t.length;n<a;n++)e[n]=k(t[n])}else if(S[i]){var r=t.constructor;if(t.constructor.from)e=r.from(t);else{e=new r(t.length);for(n=0,a=t.length;n<a;n++)e[n]=k(t[n])}}else if(!w[i]&&!F(t)&&!H(t))for(var o in e={},t)t.hasOwnProperty(o)&&(e[o]=k(t[o]));return e}function O(t,e,i){if(!G(e)||!G(t))return i?k(e):t;for(var n in e)if(e.hasOwnProperty(n)){var a=t[n],r=e[n];!G(r)||!G(a)||B(r)||B(a)||H(r)||H(a)||W(r)||W(a)||F(r)||F(a)?!i&&n in t||(t[n]=k(e[n])):O(a,r,i)}return t}function z(t,e,i){for(var n in e)e.hasOwnProperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}var E,R=function(){return P.createCanvas()};function N(t,e,i){if(t&&e)if(t.forEach&&t.forEach===A)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,a=t.length;n<a;n++)e.call(i,t[n],n,t);else for(var r in t)t.hasOwnProperty(r)&&e.call(i,t[r],r,t)}function V(t,e){var i=C.call(arguments,2);return function(){return t.apply(e,i.concat(C.call(arguments)))}}function B(t){return"[object Array]"===M.call(t)}function G(t){var e=typeof t;return"function"===e||!!t&&"object"==e}function W(t){return!!w[M.call(t)]}function H(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}P.createCanvas=function(){return document.createElement("canvas")};function F(t){return t.__ec_primitive__}function Z(t){t&&N(t,(function(t,e){this.set(e,t)}),this)}Z.prototype={constructor:Z,get:function(t){return this["_ec_"+t]},set:function(t,e){return this["_ec_"+t]=e,e},each:function(t,e){for(var i in void 0!==e&&(t=V(t,e)),this)this.hasOwnProperty(i)&&t(this[i],i.slice(4))},removeKey:function(t){delete this["_ec_"+t]}},b.$override=function(t,e){P[t]=e},b.clone=k,b.merge=O,b.mergeAll=function(t,e){for(var i=t[0],n=1,a=t.length;n<a;n++)i=O(i,t[n],e);return i},b.extend=function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t},b.defaults=z,b.createCanvas=R,b.getContext=function(){return E||(E=R().getContext("2d")),E},b.indexOf=function(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i}return-1},b.inherits=function(t,e){var i=t.prototype;function n(){}for(var a in n.prototype=e.prototype,t.prototype=new n,i)t.prototype[a]=i[a];t.prototype.constructor=t,t.superClass=e},b.mixin=function(t,e,i){z(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,i)},b.isArrayLike=function(t){if(t)return"string"!=typeof t&&"number"==typeof t.length},b.each=N,b.map=function(t,e,i){if(t&&e){if(t.map&&t.map===L)return t.map(e,i);for(var n=[],a=0,r=t.length;a<r;a++)n.push(e.call(i,t[a],a,t));return n}},b.reduce=function(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===D)return t.reduce(e,i,n);for(var a=0,r=t.length;a<r;a++)i=e.call(n,i,t[a],a,t);return i}},b.filter=function(t,e,i){if(t&&e){if(t.filter&&t.filter===T)return t.filter(e,i);for(var n=[],a=0,r=t.length;a<r;a++)e.call(i,t[a],a,t)&&n.push(t[a]);return n}},b.find=function(t,e,i){if(t&&e)for(var n=0,a=t.length;n<a;n++)if(e.call(i,t[n],n,t))return t[n]},b.bind=V,b.curry=function(t){var e=C.call(arguments,1);return function(){return t.apply(this,e.concat(C.call(arguments)))}},b.isArray=B,b.isFunction=function(t){return"function"==typeof t},b.isString=function(t){return"[object String]"===M.call(t)},b.isObject=G,b.isBuiltInObject=W,b.isDom=H,b.eqNaN=function(t){return t!=t},b.retrieve=function(t){for(var e=0,i=arguments.length;e<i;e++)if(null!=arguments[e])return arguments[e]},b.retrieve2=function(t,e){return null!=t?t:e},b.retrieve3=function(t,e,i){return null!=t?t:null!=e?e:i},b.slice=function(){return Function.call.apply(C,arguments)},b.normalizeCssArray=function(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t},b.assert=function(t,e){if(!t)throw new Error(e)},b.setAsPrimitive=function(t){t.__ec_primitive__=!0},b.isPrimitive=F,b.createHashMap=function(t){return new Z(t)},b.noop=function(){};var U={},j="undefined"==typeof Float32Array?Array:Float32Array;function q(t){return Math.sqrt(Y(t))}var X=q;function Y(t){return t[0]*t[0]+t[1]*t[1]}var $=Y;function K(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var J=K;function Q(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var tt=Q;function et(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this),this.on("globalout",this._dragEnd,this)}function it(t,e){return{target:t,topTarget:e&&e.topTarget}}U.create=function(t,e){var i=new j(2);return null==t&&(t=0),null==e&&(e=0),i[0]=t,i[1]=e,i},U.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},U.clone=function(t){var e=new j(2);return e[0]=t[0],e[1]=t[1],e},U.set=function(t,e,i){return t[0]=e,t[1]=i,t},U.add=function(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t},U.scaleAndAdd=function(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t},U.sub=function(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t},U.len=q,U.length=X,U.lenSquare=Y,U.lengthSquare=$,U.mul=function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},U.div=function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},U.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},U.scale=function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t},U.normalize=function(t,e){var i=q(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t},U.distance=K,U.dist=J,U.distanceSquare=Q,U.distSquare=tt,U.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},U.lerp=function(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t},U.applyTransform=function(t,e,i){var n=e[0],a=e[1];return t[0]=i[0]*n+i[2]*a+i[4],t[1]=i[1]*n+i[3]*a+i[5],t},U.min=function(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t},U.max=function(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t},et.prototype={constructor:et,_dragStart:function(t){var e=t.target;e&&e.draggable&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(it(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,r=n-this._y;this._x=i,this._y=n,e.drift(a,r,t),this.dispatchToElement(it(e,t),"drag",t.event);var o=this.findHover(i,n,e).target,s=this._dropTarget;this._dropTarget=o,e!==o&&(s&&o!==s&&this.dispatchToElement(it(s,t),"dragleave",t.event),o&&o!==s&&this.dispatchToElement(it(o,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(it(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(it(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var nt=et,at=Array.prototype.slice,rt=function(){this._$handlers={}};rt.prototype={constructor:rt,one:function(t,e,i){var n=this._$handlers;if(!e||!t)return this;n[t]||(n[t]=[]);for(var a=0;a<n[t].length;a++)if(n[t][a].h===e)return this;return n[t].push({h:e,one:!0,ctx:i||this}),this},on:function(t,e,i){var n=this._$handlers;if(!e||!t)return this;n[t]||(n[t]=[]);for(var a=0;a<n[t].length;a++)if(n[t][a].h===e)return this;return n[t].push({h:e,one:!1,ctx:i||this}),this},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,r=i[t].length;a<r;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){if(this._$handlers[t]){var e=arguments,i=e.length;i>3&&(e=at.call(e,1));for(var n=this._$handlers[t],a=n.length,r=0;r<a;){switch(i){case 1:n[r].h.call(n[r].ctx);break;case 2:n[r].h.call(n[r].ctx,e[1]);break;case 3:n[r].h.call(n[r].ctx,e[1],e[2]);break;default:n[r].h.apply(n[r].ctx,e)}n[r].one?(n.splice(r,1),a--):r++}}return this},triggerWithContext:function(t){if(this._$handlers[t]){var e=arguments,i=e.length;i>4&&(e=at.call(e,1,e.length-1));for(var n=e[e.length-1],a=this._$handlers[t],r=a.length,o=0;o<r;){switch(i){case 1:a[o].h.call(n);break;case 2:a[o].h.call(n,e[1]);break;case 3:a[o].h.call(n,e[1],e[2]);break;default:a[o].h.apply(n,e)}a[o].one?(a.splice(o,1),r--):o++}}return this}};var ot=rt,st=b,lt=U,ht=nt,ut=ot;function ct(){}ct.prototype.dispose=function(){};var dt=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],pt=function(t,e,i,n){ut.call(this),this.storage=t,this.painter=e,this.painterRoot=n,i=i||new ct,this.proxy=i,i.handler=this,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,ht.call(this),st.each(dt,(function(t){i.on&&i.on(t,this[t],this)}),this)};function ft(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n,a=t;a;){if(a.clipPath&&!a.clipPath.contain(e,i))return!1;a.silent&&(n=!0),a=a.parent}return!n||"silent"}return!1}pt.prototype={constructor:pt,mousemove:function(t){var e=t.zrX,i=t.zrY,n=this._hovered,a=n.target;a&&!a.__zr&&(a=(n=this.findHover(n.x,n.y)).target);var r=this._hovered=this.findHover(e,i),o=r.target,s=this.proxy;s.setCursor&&s.setCursor(o?o.cursor:"default"),a&&o!==a&&this.dispatchToElement(n,"mouseout",t),this.dispatchToElement(r,"mousemove",t),o&&o!==a&&this.dispatchToElement(r,"mouseover",t)},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t);var e,i=t.toElement||t.relatedTarget;do{i=i&&i.parentNode}while(i&&9!=i.nodeType&&!(e=i===this.painterRoot));!e&&this.trigger("globalout",{event:t})},resize:function(t){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){var n=(t=t||{}).target;if(!n||!n.silent){for(var a="on"+e,r=function(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which}}(e,t,i);n&&(n[a]&&(r.cancelBubble=n[a].call(n,r)),n.trigger(e,r),n=n.parent,!r.cancelBubble););r.cancelBubble||(this.trigger(e,r),this.painter&&this.painter.eachOtherLayer((function(t){"function"==typeof t[a]&&t[a].call(t,r),t.trigger&&t.trigger(e,r)})))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),a={x:t,y:e},r=n.length-1;r>=0;r--){var o;if(n[r]!==i&&!n[r].ignore&&(o=ft(n[r],t,e))&&(!a.topTarget&&(a.topTarget=n[r]),"silent"!==o)){a.target=n[r];break}}return a}},st.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){pt.prototype[t]=function(e){var i=this.findHover(e.zrX,e.zrY),n=i.target;if("mousedown"===t)this._downEl=n,this._downPoint=[e.zrX,e.zrY],this._upEl=n;else if("mosueup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||lt.dist(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}})),st.mixin(pt,ut),st.mixin(pt,ht);var gt=pt,mt={},vt="undefined"==typeof Float32Array?Array:Float32Array;function yt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}mt.create=function(){var t=new vt(6);return yt(t),t},mt.identity=yt,mt.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t},mt.mul=function(t,e,i){var n=e[0]*i[0]+e[2]*i[1],a=e[1]*i[0]+e[3]*i[1],r=e[0]*i[2]+e[2]*i[3],o=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=a,t[2]=r,t[3]=o,t[4]=s,t[5]=l,t},mt.translate=function(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t},mt.rotate=function(t,e,i){var n=e[0],a=e[2],r=e[4],o=e[1],s=e[3],l=e[5],h=Math.sin(i),u=Math.cos(i);return t[0]=n*u+o*h,t[1]=-n*h+o*u,t[2]=a*u+s*h,t[3]=-a*h+u*s,t[4]=u*r+h*l,t[5]=u*l-h*r,t},mt.scale=function(t,e,i){var n=i[0],a=i[1];return t[0]=e[0]*n,t[1]=e[1]*a,t[2]=e[2]*n,t[3]=e[3]*a,t[4]=e[4]*n,t[5]=e[5]*a,t},mt.invert=function(t,e){var i=e[0],n=e[2],a=e[4],r=e[1],o=e[3],s=e[5],l=i*o-r*n;return l?(l=1/l,t[0]=o*l,t[1]=-r*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-o*a)*l,t[5]=(r*a-i*s)*l,t):null};var xt=mt,_t=U,bt=xt.identity;function wt(t){return t>5e-5||t<-5e-5}var St=function(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},Mt=St.prototype;Mt.transform=null,Mt.needLocalTransform=function(){return wt(this.rotation)||wt(this.position[0])||wt(this.position[1])||wt(this.scale[0]-1)||wt(this.scale[1]-1)},Mt.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;i||e?(n=n||xt.create(),i?this.getLocalTransform(n):bt(n),e&&(i?xt.mul(n,t.transform,n):xt.copy(n,t.transform)),this.transform=n,this.invTransform=this.invTransform||xt.create(),xt.invert(this.invTransform,n)):n&&bt(n)},Mt.getLocalTransform=function(t){return St.getLocalTransform(this,t)},Mt.setTransform=function(t){var e=this.transform,i=t.dpr||1;e?t.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):t.setTransform(i,0,0,i,0,0)},Mt.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var It=[];Mt.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(xt.mul(It,t.invTransform,e),e=It);var i=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],a=this.position,r=this.scale;wt(i-1)&&(i=Math.sqrt(i)),wt(n-1)&&(n=Math.sqrt(n)),e[0]<0&&(i=-i),e[3]<0&&(n=-n),a[0]=e[4],a[1]=e[5],r[0]=i,r[1]=n,this.rotation=Math.atan2(-e[1]/n,e[0]/i)}},Mt.getGlobalScale=function(){var t=this.transform;if(!t)return[1,1];var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]),i=Math.sqrt(t[2]*t[2]+t[3]*t[3]);return t[0]<0&&(e=-e),t[3]<0&&(i=-i),[e,i]},Mt.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&_t.applyTransform(i,i,n),i},Mt.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&_t.applyTransform(i,i,n),i},St.getLocalTransform=function(t,e){bt(e=e||[]);var i=t.origin,n=t.scale||[1,1],a=t.rotation||0,r=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),xt.scale(e,e,n),a&&xt.rotate(e,e,a),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=r[0],e[5]+=r[1],e};var At=St,Tt={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=n*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-Tt.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*Tt.bounceIn(2*t):.5*Tt.bounceOut(2*t-1)+.5}},Ct=Tt;function Lt(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}Lt.prototype={constructor:Lt,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var i=(t-this._startTime-this._pausedTime)/this._life;if(!(i<0)){i=Math.min(i,1);var n=this.easing,a="string"==typeof n?Ct[n]:n,r="function"==typeof a?a(i):i;return this.fire("frame",r),1==i?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var Dt=Lt,Pt={},kt=function(){this.head=null,this.tail=null,this._len=0},Ot=kt.prototype;Ot.insert=function(t){var e=new zt(t);return this.insertEntry(e),e},Ot.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},Ot.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},Ot.len=function(){return this._len},Ot.clear=function(){this.head=this.tail=null,this._len=0};var zt=function(t){this.value=t,this.next,this.prev},Et=function(t){this._list=new kt,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},Rt=Et.prototype;Rt.put=function(t,e){var i=this._list,n=this._map,a=null;if(null==n[t]){var r=i.len(),o=this._lastRemovedEntry;if(r>=this._maxSize&&r>0){var s=i.head;i.remove(s),delete n[s.key],a=s.value,this._lastRemovedEntry=s}o?o.value=e:o=new zt(e),o.key=t,i.insertEntry(o),n[t]=o}return a},Rt.get=function(t){var e=this._map[t],i=this._list;if(null!=e)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},Rt.clear=function(){this._list.clear(),this._map={}};var Nt=Et,Vt={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Bt(t){return(t=Math.round(t))<0?0:t>255?255:t}function Gt(t){return t<0?0:t>1?1:t}function Wt(t){return t.length&&"%"===t.charAt(t.length-1)?Bt(parseFloat(t)/100*255):Bt(parseInt(t,10))}function Ht(t){return t.length&&"%"===t.charAt(t.length-1)?Gt(parseFloat(t)/100):Gt(parseFloat(t))}function Ft(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function Zt(t,e,i){return t+(e-t)*i}function Ut(t,e,i,n,a){return t[0]=e,t[1]=i,t[2]=n,t[3]=a,t}function jt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var qt=new Nt(20),Xt=null;function Yt(t,e){Xt&&jt(Xt,e),Xt=qt.put(t,Xt||e.slice())}function $t(t,e){if(t){e=e||[];var i=qt.get(t);if(i)return jt(e,i);var n,a=(t+="").replace(/ /g,"").toLowerCase();if(a in Vt)return jt(e,Vt[a]),Yt(t,e),e;if("#"===a.charAt(0))return 4===a.length?(n=parseInt(a.substr(1),16))>=0&&n<=4095?(Ut(e,(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),Yt(t,e),e):void Ut(e,0,0,0,1):7===a.length?(n=parseInt(a.substr(1),16))>=0&&n<=16777215?(Ut(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),Yt(t,e),e):void Ut(e,0,0,0,1):void 0;var r=a.indexOf("("),o=a.indexOf(")");if(-1!==r&&o+1===a.length){var s=a.substr(0,r),l=a.substr(r+1,o-(r+1)).split(","),h=1;switch(s){case"rgba":if(4!==l.length)return void Ut(e,0,0,0,1);h=Ht(l.pop());case"rgb":return 3!==l.length?void Ut(e,0,0,0,1):(Ut(e,Wt(l[0]),Wt(l[1]),Wt(l[2]),h),Yt(t,e),e);case"hsla":return 4!==l.length?void Ut(e,0,0,0,1):(l[3]=Ht(l[3]),Kt(l,e),Yt(t,e),e);case"hsl":return 3!==l.length?void Ut(e,0,0,0,1):(Kt(l,e),Yt(t,e),e);default:return}}Ut(e,0,0,0,1)}}function Kt(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=Ht(t[1]),a=Ht(t[2]),r=a<=.5?a*(n+1):a+n-a*n,o=2*a-r;return Ut(e=e||[],Bt(255*Ft(o,r,i+1/3)),Bt(255*Ft(o,r,i)),Bt(255*Ft(o,r,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Jt(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var n=t*(e.length-1),a=Math.floor(n),r=Math.ceil(n),o=e[a],s=e[r],l=n-a;return i[0]=Bt(Zt(o[0],s[0],l)),i[1]=Bt(Zt(o[1],s[1],l)),i[2]=Bt(Zt(o[2],s[2],l)),i[3]=Gt(Zt(o[3],s[3],l)),i}}var Qt=Jt;function te(t,e,i){if(e&&e.length&&t>=0&&t<=1){var n=t*(e.length-1),a=Math.floor(n),r=Math.ceil(n),o=$t(e[a]),s=$t(e[r]),l=n-a,h=ie([Bt(Zt(o[0],s[0],l)),Bt(Zt(o[1],s[1],l)),Bt(Zt(o[2],s[2],l)),Gt(Zt(o[3],s[3],l))],"rgba");return i?{color:h,leftIndex:a,rightIndex:r,value:n}:h}}var ee=te;function ie(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}}Pt.parse=$t,Pt.lift=function(t,e){var i=$t(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0;return ie(i,4===i.length?"rgba":"rgb")}},Pt.toHex=function(t){var e=$t(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},Pt.fastLerp=Jt,Pt.fastMapToColor=Qt,Pt.lerp=te,Pt.mapToColor=ee,Pt.modifyHSL=function(t,e,i,n){if(t=$t(t))return t=function(t){if(t){var e,i,n=t[0]/255,a=t[1]/255,r=t[2]/255,o=Math.min(n,a,r),s=Math.max(n,a,r),l=s-o,h=(s+o)/2;if(0===l)e=0,i=0;else{i=h<.5?l/(s+o):l/(2-s-o);var u=((s-n)/6+l/2)/l,c=((s-a)/6+l/2)/l,d=((s-r)/6+l/2)/l;n===s?e=d-c:a===s?e=1/3+u-d:r===s&&(e=2/3+c-u),e<0&&(e+=1),e>1&&(e-=1)}var p=[360*e,i,h];return null!=t[3]&&p.push(t[3]),p}}(t),null!=e&&(t[0]=function(t){return(t=Math.round(t))<0?0:t>360?360:t}(e)),null!=i&&(t[1]=Ht(i)),null!=n&&(t[2]=Ht(n)),ie(Kt(t),"rgba")},Pt.modifyAlpha=function(t,e){if((t=$t(t))&&null!=e)return t[3]=Gt(e),ie(t,"rgba")},Pt.stringify=ie;var ne=Dt,ae=Pt,re=b.isArrayLike,oe=Array.prototype.slice;function se(t,e){return t[e]}function le(t,e,i){t[e]=i}function he(t,e,i){return(e-t)*i+t}function ue(t,e,i){return i>.5?e:t}function ce(t,e,i,n,a){var r=t.length;if(1==a)for(var o=0;o<r;o++)n[o]=he(t[o],e[o],i);else{var s=r&&t[0].length;for(o=0;o<r;o++)for(var l=0;l<s;l++)n[o][l]=he(t[o][l],e[o][l],i)}}function de(t,e,i){var n=t.length,a=e.length;if(n!==a)if(n>a)t.length=a;else for(var r=n;r<a;r++)t.push(1===i?e[r]:oe.call(e[r]));var o=t[0]&&t[0].length;for(r=0;r<t.length;r++)if(1===i)isNaN(t[r])&&(t[r]=e[r]);else for(var s=0;s<o;s++)isNaN(t[r][s])&&(t[r][s]=e[r][s])}function pe(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(var a=0;a<n;a++)if(t[a]!==e[a])return!1}else{var r=t[0].length;for(a=0;a<n;a++)for(var o=0;o<r;o++)if(t[a][o]!==e[a][o])return!1}return!0}function fe(t,e,i,n,a,r,o,s,l){var h=t.length;if(1==l)for(var u=0;u<h;u++)s[u]=ge(t[u],e[u],i[u],n[u],a,r,o);else{var c=t[0].length;for(u=0;u<h;u++)for(var d=0;d<c;d++)s[u][d]=ge(t[u][d],e[u][d],i[u][d],n[u][d],a,r,o)}}function ge(t,e,i,n,a,r,o){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*o+(-3*(e-i)-2*s-l)*r+s*a+e}function me(t){if(re(t)){var e=t.length;if(re(t[0])){for(var i=[],n=0;n<e;n++)i.push(oe.call(t[n]));return i}return oe.call(t)}return t}function ve(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function ye(t,e,i,n,a,r){var o=t._getter,s=t._setter,l="spline"===e,h=n.length;if(h){var u,c=n[0].value,d=re(c),p=!1,f=!1,g=d?function(t){var e=t[t.length-1].value;return re(e&&e[0])?2:1}(n):0;n.sort((function(t,e){return t.time-e.time})),u=n[h-1].time;for(var m=[],v=[],y=n[0].value,x=!0,_=0;_<h;_++){m.push(n[_].time/u);var b=n[_].value;if(d&&pe(b,y,g)||!d&&b===y||(x=!1),y=b,"string"==typeof b){var w=ae.parse(b);w?(b=w,p=!0):f=!0}v.push(b)}if(r||!x){var S=v[h-1];for(_=0;_<h-1;_++)d?de(v[_],S,g):!isNaN(v[_])||isNaN(S)||f||p||(v[_]=S);d&&de(o(t._target,a),S,g);var M,I,A,T,C,L=0,D=0;if(p)var P=[0,0,0,0];var k=new ne({target:t._target,life:u,loop:t._loop,delay:t._delay,onframe:function(t,e){var i;if(e<0)i=0;else if(e<D){for(i=Math.min(L+1,h-1);i>=0&&!(m[i]<=e);i--);i=Math.min(i,h-2)}else{for(i=L;i<h&&!(m[i]>e);i++);i=Math.min(i-1,h-2)}L=i,D=e;var n=m[i+1]-m[i];if(0!==n)if(M=(e-m[i])/n,l)if(A=v[i],I=v[0===i?i:i-1],T=v[i>h-2?h-1:i+1],C=v[i>h-3?h-1:i+2],d)fe(I,A,T,C,M,M*M,M*M*M,o(t,a),g);else{if(p)r=fe(I,A,T,C,M,M*M,M*M*M,P,1),r=ve(P);else{if(f)return ue(A,T,M);r=ge(I,A,T,C,M,M*M,M*M*M)}s(t,a,r)}else if(d)ce(v[i],v[i+1],M,o(t,a),g);else{var r;if(p)ce(v[i],v[i+1],M,P,1),r=ve(P);else{if(f)return ue(v[i],v[i+1],M);r=he(v[i],v[i+1],M)}s(t,a,r)}},ondestroy:i});return e&&"spline"!==e&&(k.easing=e),k}}}var xe=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||se,this._setter=n||le,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};xe.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var a=this._getter(this._target,n);if(null==a)continue;0!==t&&i[n].push({time:0,value:me(a)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].pause();this._paused=!0},resume:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,i=0;i<e;i++)t[i].call(this)},start:function(t,e){var i,n=this,a=0,r=function(){--a||n._doneCallback()};for(var o in this._tracks)if(this._tracks.hasOwnProperty(o)){var s=ye(this,t,r,this._tracks[o],o,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;i<n._onframeList.length;i++)n._onframeList[i](t,e)}}return a||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,i=this.animation,n=0;n<e.length;n++){var a=e[n];t&&a.onframe(this._target,1),i&&i.removeClip(a)}e.length=0},delay:function(t){return this._delay=t,this},done:function(t){return t&&this._doneList.push(t),this},getClips:function(){return this._clipList}};var _e=xe,be={},we=1;"undefined"!=typeof window&&(we=Math.max(window.devicePixelRatio||1,1));var Se=we;be.debugMode=0,be.devicePixelRatio=Se;var Me=be.debugMode,Ie=function(){};1===Me?Ie=function(){for(var t in arguments)throw new Error(arguments[t])}:Me>1&&(Ie=function(){for(var t in arguments)console.log(arguments[t])});var Ae=Ie,Te=_e,Ce=Ae,Le=b,De=Le.isString,Pe=Le.isFunction,ke=Le.isObject,Oe=Le.isArrayLike,ze=Le.indexOf,Ee=function(){this.animators=[]};Ee.prototype={constructor:Ee,animate:function(t,e){var i,n=!1,a=this,r=this.__zr;if(t){var o=t.split("."),s=a;n="shape"===o[0];for(var l=0,h=o.length;l<h;l++)s&&(s=s[o[l]]);s&&(i=s)}else i=a;if(i){var u=a.animators,c=new Te(i,e);return c.during((function(t){a.dirty(n)})).done((function(){u.splice(ze(u,c),1)})),u.push(c),r&&r.animation.addAnimator(c),c}Ce('Property "'+t+'" is not existed in element '+a.id)},stopAnimation:function(t){for(var e=this.animators,i=e.length,n=0;n<i;n++)e[n].stop(t);return e.length=0,this},animateTo:function(t,e,i,n,a,r){De(i)?(a=n,n=i,i=0):Pe(n)?(a=n,n="linear",i=0):Pe(i)?(a=i,i=0):Pe(e)?(a=e,e=500):e||(e=500),this.stopAnimation(),this._animateToShallow("",this,t,e,i);var o=this.animators.slice(),s=o.length;function l(){--s||a&&a()}s||a&&a();for(var h=0;h<o.length;h++)o[h].done(l).start(n,r)},_animateToShallow:function(t,e,i,n,a){var r={},o=0;for(var s in i)if(i.hasOwnProperty(s))if(null!=e[s])ke(i[s])&&!Oe(i[s])?this._animateToShallow(t?t+"."+s:s,e[s],i[s],n,a):(r[s]=i[s],o++);else if(null!=i[s])if(t){var l={};l[t]={},l[t][s]=i[s],this.attr(l)}else this.attr(s,i[s]);return o>0&&this.animate(t,!1).when(null==n?500:n,r).delay(a||0),this}};var Re=x,Ne=ot,Ve=At,Be=Ee,Ge=b,We=function(t){Ve.call(this,t),Ne.call(this,t),Be.call(this,t),this.id=t.id||Re()};We.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];i||(i=this[t]=[]),i[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(Ge.isObject(t))for(var i in t)t.hasOwnProperty(i)&&this.attrKV(i,t[i]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.addAnimator(e[i]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.removeAnimator(e[i]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},Ge.mixin(We,Be),Ge.mixin(We,Ve),Ge.mixin(We,Ne);var He,Fe,Ze,Ue,je=We,qe=mt,Xe=U.applyTransform,Ye=Math.min,$e=Math.max;function Ke(t,e,i,n){i<0&&(t+=i,i=-i),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}Ke.prototype={constructor:Ke,union:function(t){var e=Ye(t.x,this.x),i=Ye(t.y,this.y);this.width=$e(t.x+t.width,this.x+this.width)-e,this.height=$e(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:(He=[],Fe=[],Ze=[],Ue=[],function(t){if(t){He[0]=Ze[0]=this.x,He[1]=Ue[1]=this.y,Fe[0]=Ue[0]=this.x+this.width,Fe[1]=Ze[1]=this.y+this.height,Xe(He,He,t),Xe(Fe,Fe,t),Xe(Ze,Ze,t),Xe(Ue,Ue,t),this.x=Ye(He[0],Fe[0],Ze[0],Ue[0]),this.y=Ye(He[1],Fe[1],Ze[1],Ue[1]);var e=$e(He[0],Fe[0],Ze[0],Ue[0]),i=$e(He[1],Fe[1],Ze[1],Ue[1]);this.width=e-this.x,this.height=i-this.y}}),calculateTransform:function(t){var e=this,i=t.width/e.width,n=t.height/e.height,a=qe.create();return qe.translate(a,a,[-e.x,-e.y]),qe.scale(a,a,[i,n]),qe.translate(a,a,[t.x,t.y]),a},intersect:function(t){if(!t)return!1;t instanceof Ke||(t=Ke.create(t));var e=this,i=e.x,n=e.x+e.width,a=e.y,r=e.y+e.height,o=t.x,s=t.x+t.width,l=t.y,h=t.y+t.height;return!(n<o||s<i||r<l||h<a)},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 Ke(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},Ke.create=function(t){return new Ke(t.x,t.y,t.width,t.height)};var Je=Ke,Qe=b,ti=je,ei=Je,ii=function(t){for(var e in t=t||{},ti.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};ii.prototype={constructor:ii,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i<e.length;i++)if(e[i].name===t)return e[i]},childCount:function(){return this._children.length},add:function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},addBefore:function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var i=this._children,n=i.indexOf(e);n>=0&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof ii&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,a=Qe.indexOf(n,t);return a<0||(n.splice(a,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof ii&&t.delChildrenFromStorage(i)),e&&e.refresh()),this},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e<i.length;e++)t=i[e],n&&(n.delFromStorage(t),t instanceof ii&&t.delChildrenFromStorage(n)),t.parent=null;return i.length=0,this},eachChild:function(t,e){for(var i=this._children,n=0;n<i.length;n++){var a=i[n];t.call(e,a,n)}return this},traverse:function(t,e){for(var i=0;i<this._children.length;i++){var n=this._children[i];t.call(e,n),"group"===n.type&&n.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.addToStorage(i),i instanceof ii&&i.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.delFromStorage(i),i instanceof ii&&i.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,i=new ei(0,0,0,0),n=t||this._children,a=[],r=0;r<n.length;r++){var o=n[r];if(!o.ignore&&!o.invisible){var s=o.getBoundingRect(),l=o.getLocalTransform(a);l?(i.copy(s),i.applyTransform(l),(e=e||i.clone()).union(i)):(e=e||s.clone()).union(s)}}return e||i}},Qe.inherits(ii,ti);var ni=ii;function ai(t,e,i,n){var a=e+1;if(a===i)return 1;if(n(t[a++],t[e])<0){for(;a<i&&n(t[a],t[a-1])<0;)a++;!function(t,e,i){i--;for(;e<i;){var n=t[e];t[e++]=t[i],t[i--]=n}}(t,e,a)}else for(;a<i&&n(t[a],t[a-1])>=0;)a++;return a-e}function ri(t,e,i,n,a){for(n===e&&n++;n<i;n++){for(var r,o=t[n],s=e,l=n;s<l;)a(o,t[r=s+l>>>1])<0?l=r:s=r+1;var h=n-s;switch(h){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;h>0;)t[s+h]=t[s+h-1],h--}t[s]=o}}function oi(t,e,i,n,a,r){var o=0,s=0,l=1;if(r(t,e[i+a])>0){for(s=n-a;l<s&&r(t,e[i+a+l])>0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}else{for(s=a+1;l<s&&r(t,e[i+a-l])<=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var h=o;o=a-l,l=a-h}for(o++;o<l;){var u=o+(l-o>>>1);r(t,e[i+u])>0?o=u+1:l=u}return l}function si(t,e,i,n,a,r){var o=0,s=0,l=1;if(r(t,e[i+a])<0){for(s=a+1;l<s&&r(t,e[i+a-l])<0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var h=o;o=a-l,l=a-h}else{for(s=n-a;l<s&&r(t,e[i+a+l])>=0;)o=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}for(o++;o<l;){var u=o+(l-o>>>1);r(t,e[i+u])<0?l=u:o=u+1}return l}function li(t,e){var i,n,a=7,r=0;t.length;var o=[];function s(s){var l=i[s],h=n[s],u=i[s+1],c=n[s+1];n[s]=h+c,s===r-3&&(i[s+1]=i[s+2],n[s+1]=n[s+2]),r--;var d=si(t[u],t,l,h,0,e);l+=d,0!==(h-=d)&&0!==(c=oi(t[l+h-1],t,u,c,c-1,e))&&(h<=c?function(i,n,r,s){var l=0;for(l=0;l<n;l++)o[l]=t[i+l];var h=0,u=r,c=i;if(t[c++]=t[u++],0==--s){for(l=0;l<n;l++)t[c+l]=o[h+l];return}if(1===n){for(l=0;l<s;l++)t[c+l]=t[u+l];return void(t[c+s]=o[h])}var d,p,f,g=a;for(;;){d=0,p=0,f=!1;do{if(e(t[u],o[h])<0){if(t[c++]=t[u++],p++,d=0,0==--s){f=!0;break}}else if(t[c++]=o[h++],d++,p=0,1==--n){f=!0;break}}while((d|p)<g);if(f)break;do{if(0!==(d=si(t[u],o,h,n,0,e))){for(l=0;l<d;l++)t[c+l]=o[h+l];if(c+=d,h+=d,(n-=d)<=1){f=!0;break}}if(t[c++]=t[u++],0==--s){f=!0;break}if(0!==(p=oi(o[h],t,u,s,0,e))){for(l=0;l<p;l++)t[c+l]=t[u+l];if(c+=p,u+=p,0===(s-=p)){f=!0;break}}if(t[c++]=o[h++],1==--n){f=!0;break}g--}while(d>=7||p>=7);if(f)break;g<0&&(g=0),g+=2}if((a=g)<1&&(a=1),1===n){for(l=0;l<s;l++)t[c+l]=t[u+l];t[c+s]=o[h]}else{if(0===n)throw new Error;for(l=0;l<n;l++)t[c+l]=o[h+l]}}(l,h,u,c):function(i,n,r,s){var l=0;for(l=0;l<s;l++)o[l]=t[r+l];var h=i+n-1,u=s-1,c=r+s-1,d=0,p=0;if(t[c--]=t[h--],0==--n){for(d=c-(s-1),l=0;l<s;l++)t[d+l]=o[l];return}if(1===s){for(p=(c-=n)+1,d=(h-=n)+1,l=n-1;l>=0;l--)t[p+l]=t[d+l];return void(t[c]=o[u])}var f=a;for(;;){var g=0,m=0,v=!1;do{if(e(o[u],t[h])<0){if(t[c--]=t[h--],g++,m=0,0==--n){v=!0;break}}else if(t[c--]=o[u--],m++,g=0,1==--s){v=!0;break}}while((g|m)<f);if(v)break;do{if(0!==(g=n-si(o[u],t,i,n,n-1,e))){for(n-=g,p=(c-=g)+1,d=(h-=g)+1,l=g-1;l>=0;l--)t[p+l]=t[d+l];if(0===n){v=!0;break}}if(t[c--]=o[u--],1==--s){v=!0;break}if(0!==(m=s-oi(t[h],o,0,s,s-1,e))){for(s-=m,p=(c-=m)+1,d=(u-=m)+1,l=0;l<m;l++)t[p+l]=o[d+l];if(s<=1){v=!0;break}}if(t[c--]=t[h--],0==--n){v=!0;break}f--}while(g>=7||m>=7);if(v)break;f<0&&(f=0),f+=2}(a=f)<1&&(a=1);if(1===s){for(p=(c-=n)+1,d=(h-=n)+1,l=n-1;l>=0;l--)t[p+l]=t[d+l];t[c]=o[u]}else{if(0===s)throw new Error;for(d=c-(s-1),l=0;l<s;l++)t[d+l]=o[l]}}(l,h,u,c))}i=[],n=[],this.mergeRuns=function(){for(;r>1;){var t=r-2;if(t>=1&&n[t-1]<=n[t]+n[t+1]||t>=2&&n[t-2]<=n[t]+n[t-1])n[t-1]<n[t+1]&&t--;else if(n[t]>n[t+1])break;s(t)}},this.forceMergeRuns=function(){for(;r>1;){var t=r-2;t>0&&n[t-1]<n[t+1]&&t--,s(t)}},this.pushRun=function(t,e){i[r]=t,n[r]=e,r+=1}}var hi=function(t,e,i,n){i||(i=0),n||(n=t.length);var a=n-i;if(!(a<2)){var r=0;if(a<32)ri(t,i,n,i+(r=ai(t,i,n,e)),e);else{var o=new li(t,e),s=function(t){for(var e=0;t>=32;)e|=1&t,t>>=1;return t+e}(a);do{if((r=ai(t,i,n,e))<s){var l=a;l>s&&(l=s),ri(t,i,i+l,i+r,e),r=l}o.pushRun(i,r),o.mergeRuns(),a-=r,i+=r}while(0!==a);o.forceMergeRuns()}}},ui=b,ci=_,di=ni,pi=hi;function fi(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var gi=function(){this._roots=[],this._displayList=[],this._displayListLen=0};gi.prototype={constructor:gi,traverse:function(t,e){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,e)},getDisplayList:function(t,e){return e=e||!1,t&&this.updateDisplayList(e),this._displayList},updateDisplayList:function(t){this._displayListLen=0;for(var e=this._roots,i=this._displayList,n=0,a=e.length;n<a;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,ci.canvasSupported&&pi(i,fi)},_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,r=t;a;)a.parent=r,a.updateTransform(),e.push(a),r=a,a=a.clipPath}if(t.isGroup){for(var o=t._children,s=0;s<o.length;s++){var l=o[s];t.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,e,i)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof di&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(null==t){for(var e=0;e<this._roots.length;e++){var i=this._roots[e];i instanceof di&&i.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(t instanceof Array){e=0;for(var n=t.length;e<n;e++)this.delRoot(t[e])}else{var a=ui.indexOf(this._roots,t);a>=0&&(this.delFromStorage(t),this._roots.splice(a,1),t instanceof di&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t.__storage=this,t.dirty(!1),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:fi};var mi=gi,vi=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],yi=function(t,e){this.extendFrom(t,!1),this.host=e};function xi(t,e,i){var n=null==e.x?0:e.x,a=null==e.x2?1:e.x2,r=null==e.y?0:e.y,o=null==e.y2?0:e.y2;return e.global||(n=n*i.width+i.x,a=a*i.width+i.x,r=r*i.height+i.y,o=o*i.height+i.y),t.createLinearGradient(n,r,a,o)}function _i(t,e,i){var n=i.width,a=i.height,r=Math.min(n,a),o=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(o=o*n+i.x,s=s*a+i.y,l*=r),t.createRadialGradient(o,s,0,o,s,l)}for(var bi=yi.prototype={constructor:yi,host:null,fill:"#000",stroke:null,opacity:1,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){for(var n=this,a=i&&i.style,r=!a,o=0;o<vi.length;o++){var s=vi[o],l=s[0];(r||n[l]!==a[l])&&(t[l]=n[l]||s[1])}if((r||n.fill!==a.fill)&&(t.fillStyle=n.fill),(r||n.stroke!==a.stroke)&&(t.strokeStyle=n.stroke),(r||n.opacity!==a.opacity)&&(t.globalAlpha=null==n.opacity?1:n.opacity),(r||n.blend!==a.blend)&&(t.globalCompositeOperation=n.blend||"source-over"),this.hasStroke()){var h=n.lineWidth;t.lineWidth=h/(this.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1)}},hasFill:function(){var t=this.fill;return null!=t&&"none"!==t},hasStroke:function(){var t=this.stroke;return null!=t&&"none"!==t&&this.lineWidth>0},extendFrom:function(t,e){if(t)for(var i in t)!t.hasOwnProperty(i)||!0!==e&&(!1===e?this.hasOwnProperty(i):null==t[i])||(this[i]=t[i])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,i){for(var n=("radial"===e.type?_i:xi)(t,e,i),a=e.colorStops,r=0;r<a.length;r++)n.addColorStop(a[r].offset,a[r].color);return n}},wi=0;wi<vi.length;wi++){var Si=vi[wi];Si[0]in bi||(bi[Si[0]]=Si[1])}yi.getGradient=bi.getGradient;var Mi=yi,Ii=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};Ii.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};var Ai=Ii,Ti=b,Ci=be.devicePixelRatio,Li=Mi,Di=Ai;function Pi(){return!1}function ki(t,e,i){var n=Ti.createCanvas(),a=e.getWidth(),r=e.getHeight(),o=n.style;return o.position="absolute",o.left=0,o.top=0,o.width=a+"px",o.height=r+"px",n.width=a*i,n.height=r*i,n.setAttribute("data-zr-dom-id",t),n}var Oi=function(t,e,i){var n;i=i||Ci,"string"==typeof t?n=ki(t,e,i):Ti.isObject(t)&&(t=(n=t).id),this.id=t,this.dom=n;var a=n.style;a&&(n.onselectstart=Pi,a["-webkit-user-select"]="none",a["user-select"]="none",a["-webkit-touch-callout"]="none",a["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",a.padding=0,a.margin=0,a["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=i};Oi.prototype={constructor:Oi,elCount:0,__dirty:!0,initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.__currentValues={},this.ctx.dpr=this.dpr},createBackBuffer:function(){var t=this.dpr;this.domBack=ki("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),this.ctxBack.__currentValues={},1!=t&&this.ctxBack.scale(t,t)},resize:function(t,e){var i=this.dpr,n=this.dom,a=n.style,r=this.domBack;a.width=t+"px",a.height=e+"px",n.width=t*i,n.height=e*i,r&&(r.width=t*i,r.height=e*i,1!=i&&this.ctxBack.scale(i,i))},clear:function(t){var e,i=this.dom,n=this.ctx,a=i.width,r=i.height,o=this.clearColor,s=this.motionBlur&&!t,l=this.lastFrameAlpha,h=this.dpr;(s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,a/h,r/h)),n.clearRect(0,0,a,r),o)&&(o.colorStops?(e=o.__canvasGradient||Li.getGradient(n,o,{x:0,y:0,width:a,height:r}),o.__canvasGradient=e):o.image&&(e=Di.prototype.getCanvasPattern.call(o,n)),n.save(),n.fillStyle=e||o,n.fillRect(0,0,a,r),n.restore());if(s){var u=this.domBack;n.save(),n.globalAlpha=l,n.drawImage(u,0,0,a,r),n.restore()}}};var zi=Oi,Ei="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},Ri={},Ni={},Vi={},Bi=new Nt(50);function Gi(){var t=this.__cachedImgObj;this.onload=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var i=t.pending[e],n=i.cb;n&&n(this,i.cbPayload),i.hostEl.dirty()}t.pending.length=0}function Wi(t){return t&&t.width&&t.height}Vi.findExistImage=function(t){if("string"==typeof t){var e=Bi.get(t);return e&&e.image}return t},Vi.createOrUpdateImage=function(t,e,i,n,a){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!i)return e;var r=Bi.get(t),o={hostEl:i,cb:n,cbPayload:a};return r?!Wi(e=r.image)&&r.pending.push(o):(!e&&(e=new Image),e.onload=Gi,Bi.put(t,e.__cachedImgObj={image:e,pending:[o]}),e.src=e.__zrImageSrc=t),e}return t}return e},Vi.isImageReady=Wi;var Hi=Je,Fi=Vi,Zi=b,Ui=Zi.getContext,ji=Zi.extend,qi=Zi.retrieve2,Xi=Zi.retrieve3,Yi={},$i=0,Ki=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,Ji={};function Qi(t,e){var i=t+":"+(e=e||"12px sans-serif");if(Yi[i])return Yi[i];for(var n=(t+"").split("\n"),a=0,r=0,o=n.length;r<o;r++)a=Math.max(ln(n[r],e).width,a);return $i>5e3&&($i=0,Yi={}),$i++,Yi[i]=a,a}function tn(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function en(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function nn(t,e,i,n,a){if(!e)return"";var r=(t+"").split("\n");a=an(e,i,n,a);for(var o=0,s=r.length;o<s;o++)r[o]=rn(r[o],a);return r.join("\n")}function an(t,e,i,n){(n=ji({},n)).font=e;i=qi(i,"...");n.maxIterations=qi(n.maxIterations,2);var a=n.minChar=qi(n.minChar,0);n.cnCharWidth=Qi("国",e);var r=n.ascCharWidth=Qi("a",e);n.placeholder=qi(n.placeholder,"");for(var o=t=Math.max(0,t-1),s=0;s<a&&o>=r;s++)o-=r;var l=Qi(i);return l>o&&(i="",l=0),o=t-l,n.ellipsis=i,n.ellipsisWidth=l,n.contentWidth=o,n.containerWidth=t,n}function rn(t,e){var i=e.containerWidth,n=e.font,a=e.contentWidth;if(!i)return"";var r=Qi(t,n);if(r<=i)return t;for(var o=0;;o++){if(r<=a||o>=e.maxIterations){t+=e.ellipsis;break}var s=0===o?on(t,a,e.ascCharWidth,e.cnCharWidth):r>0?Math.floor(t.length*a/r):0;r=Qi(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function on(t,e,i,n){for(var a=0,r=0,o=t.length;r<o&&a<e;r++){var s=t.charCodeAt(r);a+=0<=s&&s<=127?i:n}return r}function sn(t){return Qi("国",t)}function ln(t,e){return Ji.measureText(t,e)}function hn(t,e,i,n){null!=t&&(t+="");var a=sn(e),r=t?t.split("\n"):[],o=r.length*a,s=o;if(i&&(s+=i[0]+i[2]),t&&n){var l=n.outerHeight,h=n.outerWidth;if(null!=l&&s>l)t="",r=[];else if(null!=h)for(var u=an(h-(i?i[1]+i[3]:0),e,n.ellipsis,{minChar:n.minChar,placeholder:n.placeholder}),c=0,d=r.length;c<d;c++)r[c]=rn(r[c],u)}return{lines:r,height:o,outerHeight:s,lineHeight:a}}function un(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var n,a=Ki.lastIndex=0;null!=(n=Ki.exec(t));){var r=n.index;r>a&&cn(i,t.substring(a,r)),cn(i,n[2],n[1]),a=Ki.lastIndex}a<t.length&&cn(i,t.substring(a,t.length));var o=i.lines,s=0,l=0,h=[],u=e.textPadding,c=e.truncate,d=c&&c.outerWidth,p=c&&c.outerHeight;u&&(null!=d&&(d-=u[1]+u[3]),null!=p&&(p-=u[0]+u[2]));for(var f=0;f<o.length;f++){for(var g=o[f],m=0,v=0,y=0;y<g.tokens.length;y++){var x=(L=g.tokens[y]).styleName&&e.rich[L.styleName]||{},_=L.textPadding=x.textPadding,b=L.font=x.font||e.font,w=L.textHeight=qi(x.textHeight,sn(b));if(_&&(w+=_[0]+_[2]),L.height=w,L.lineHeight=Xi(x.textLineHeight,e.textLineHeight,w),L.textAlign=x&&x.textAlign||e.textAlign,L.textVerticalAlign=x&&x.textVerticalAlign||"middle",null!=p&&s+L.lineHeight>p)return{lines:[],width:0,height:0};L.textWidth=Qi(L.text,b);var S=x.textWidth,M=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))L.percentWidth=S,h.push(L),S=0;else{if(M){S=L.textWidth;var I=x.textBackgroundColor,A=I&&I.image;A&&(A=Fi.findExistImage(A),Fi.isImageReady(A)&&(S=Math.max(S,A.width*w/A.height)))}var T=_?_[1]+_[3]:0;S+=T;var C=null!=d?d-v:null;null!=C&&C<S&&(!M||C<T?(L.text="",L.textWidth=S=0):(L.text=nn(L.text,C-T,b,c.ellipsis,{minChar:c.minChar}),L.textWidth=Qi(L.text,b),S=L.textWidth+T))}v+=L.width=S,x&&(m=Math.max(m,L.lineHeight))}g.width=v,g.lineHeight=m,s+=m,l=Math.max(l,v)}i.outerWidth=i.width=qi(e.textWidth,l),i.outerHeight=i.height=qi(e.textHeight,s),u&&(i.outerWidth+=u[1]+u[3],i.outerHeight+=u[0]+u[2]);for(f=0;f<h.length;f++){var L,D=(L=h[f]).percentWidth;L.width=parseInt(D,10)/100*l}return i}function cn(t,e,i){for(var n=""===e,a=e.split("\n"),r=t.lines,o=0;o<a.length;o++){var s=a[o],l={styleName:i,text:s,isLineHolder:!s&&!n};if(o)r.push({tokens:[l]});else{var h=(r[r.length-1]||(r[0]={tokens:[]})).tokens,u=h.length;1===u&&h[0].isLineHolder?h[0]=l:(s||!u||n)&&h.push(l)}}}Ji.measureText=function(t,e){var i=Ui();return i.font=e||"12px sans-serif",i.measureText(t)},Ni.DEFAULT_FONT="12px sans-serif",Ni.$override=function(t,e){Ji[t]=e},Ni.getWidth=Qi,Ni.getBoundingRect=function(t,e,i,n,a,r,o){return r?function(t,e,i,n,a,r,o){var s=un(t,{rich:r,truncate:o,font:e,textAlign:i,textPadding:a}),l=s.outerWidth,h=s.outerHeight,u=tn(0,l,i),c=en(0,h,n);return new Hi(u,c,l,h)}(t,e,i,n,a,r,o):function(t,e,i,n,a,r){var o=hn(t,e,a,r),s=Qi(t,e);a&&(s+=a[1]+a[3]);var l=o.outerHeight,h=tn(0,s,i),u=en(0,l,n),c=new Hi(h,u,s,l);return c.lineHeight=o.lineHeight,c}(t,e,i,n,a,o)},Ni.adjustTextX=tn,Ni.adjustTextY=en,Ni.adjustTextPositionOnRect=function(t,e,i){var n=e.x,a=e.y,r=e.height,o=e.width,s=r/2,l="left",h="top";switch(t){case"left":n-=i,a+=s,l="right",h="middle";break;case"right":n+=i+o,a+=s,h="middle";break;case"top":n+=o/2,a-=i,l="center",h="bottom";break;case"bottom":n+=o/2,a+=r+i,l="center";break;case"inside":n+=o/2,a+=s,l="center",h="middle";break;case"insideLeft":n+=i,a+=s,h="middle";break;case"insideRight":n+=o-i,a+=s,l="right",h="middle";break;case"insideTop":n+=o/2,a+=i,l="center";break;case"insideBottom":n+=o/2,a+=r-i,l="center",h="bottom";break;case"insideTopLeft":n+=i,a+=i;break;case"insideTopRight":n+=o-i,a+=i,l="right";break;case"insideBottomLeft":n+=i,a+=r-i,h="bottom";break;case"insideBottomRight":n+=o-i,a+=r-i,l="right",h="bottom"}return{x:n,y:a,textAlign:l,textVerticalAlign:h}},Ni.truncateText=nn,Ni.getLineHeight=sn,Ni.measureText=ln,Ni.parsePlainText=hn,Ni.parseRichText=un,Ni.makeFont=function(t){return(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ")||t.textFont||t.font};var dn={};dn.buildPath=function(t,e){var i,n,a,r,o,s=e.x,l=e.y,h=e.width,u=e.height,c=e.r;h<0&&(s+=h,h=-h),u<0&&(l+=u,u=-u),"number"==typeof c?i=n=a=r=c:c instanceof Array?1===c.length?i=n=a=r=c[0]:2===c.length?(i=a=c[0],n=r=c[1]):3===c.length?(i=c[0],n=r=c[1],a=c[2]):(i=c[0],n=c[1],a=c[2],r=c[3]):i=n=a=r=0,i+n>h&&(i*=h/(o=i+n),n*=h/o),a+r>h&&(a*=h/(o=a+r),r*=h/o),n+a>u&&(n*=u/(o=n+a),a*=u/o),i+r>u&&(i*=u/(o=i+r),r*=u/o),t.moveTo(s+i,l),t.lineTo(s+h-n,l),0!==n&&t.quadraticCurveTo(s+h,l,s+h,l+n),t.lineTo(s+h,l+u-a),0!==a&&t.quadraticCurveTo(s+h,l+u,s+h-a,l+u),t.lineTo(s+r,l+u),0!==r&&t.quadraticCurveTo(s,l+u,s,l+u-r),t.lineTo(s,l+i),0!==i&&t.quadraticCurveTo(s,l,s+i,l)};var pn=b,fn=pn.retrieve2,gn=pn.retrieve3,mn=pn.each,vn=pn.normalizeCssArray,yn=pn.isString,xn=pn.isObject,_n=Ni,bn=dn,wn=Vi,Sn={left:1,right:1,center:1},Mn={top:1,bottom:1,middle:1};function In(t){if(t){t.font=_n.makeFont(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||Sn[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||Mn[i]?i:"top",t.textPadding&&(t.textPadding=vn(t.textPadding))}}function An(t,e,i,n,a){if(i&&e.textRotation){var r=e.textOrigin;"center"===r?(n=i.width/2+i.x,a=i.height/2+i.y):r&&(n=r[0]+i.x,a=r[1]+i.y),t.translate(n,a),t.rotate(-e.textRotation),t.translate(-n,-a)}}function Tn(t,e,i,n,a,r,o,s){var l=n.rich[i.styleName]||{},h=i.textVerticalAlign,u=r+a/2;"top"===h?u=r+i.height/2:"bottom"===h&&(u=r+a-i.height/2),!i.isLineHolder&&Cn(l)&&Ln(t,e,l,"right"===s?o-i.width:"center"===s?o-i.width/2:o,u-i.height/2,i.width,i.height);var c=i.textPadding;c&&(o=Rn(o,s,c),u-=i.height/2-c[2]-i.textHeight/2),kn(e,"shadowBlur",gn(l.textShadowBlur,n.textShadowBlur,0)),kn(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),kn(e,"shadowOffsetX",gn(l.textShadowOffsetX,n.textShadowOffsetX,0)),kn(e,"shadowOffsetY",gn(l.textShadowOffsetY,n.textShadowOffsetY,0)),kn(e,"textAlign",s),kn(e,"textBaseline","middle"),kn(e,"font",i.font||_n.DEFAULT_FONT);var d=On(l.textStroke||n.textStroke,f),p=zn(l.textFill||n.textFill),f=fn(l.textStrokeWidth,n.textStrokeWidth);d&&(kn(e,"lineWidth",f),kn(e,"strokeStyle",d),e.strokeText(i.text,o,u)),p&&(kn(e,"fillStyle",p),e.fillText(i.text,o,u))}function Cn(t){return t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor}function Ln(t,e,i,n,a,r,o){var s=i.textBackgroundColor,l=i.textBorderWidth,h=i.textBorderColor,u=yn(s);if(kn(e,"shadowBlur",i.textBoxShadowBlur||0),kn(e,"shadowColor",i.textBoxShadowColor||"transparent"),kn(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),kn(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),u||l&&h){e.beginPath();var c=i.textBorderRadius;c?bn.buildPath(e,{x:n,y:a,width:r,height:o,r:c}):e.rect(n,a,r,o),e.closePath()}if(u)kn(e,"fillStyle",s),e.fill();else if(xn(s)){var d=s.image;(d=wn.createOrUpdateImage(d,null,t,Dn,s))&&wn.isImageReady(d)&&e.drawImage(d,n,a,r,o)}l&&h&&(kn(e,"lineWidth",l),kn(e,"strokeStyle",h),e.stroke())}function Dn(t,e){e.image=t}function Pn(t,e,i){var n=e.x||0,a=e.y||0,r=e.textAlign,o=e.textVerticalAlign;if(i){var s=e.textPosition;if(s instanceof Array)n=i.x+En(s[0],i.width),a=i.y+En(s[1],i.height);else{var l=_n.adjustTextPositionOnRect(s,i,e.textDistance);n=l.x,a=l.y,r=r||l.textAlign,o=o||l.textVerticalAlign}var h=e.textOffset;h&&(n+=h[0],a+=h[1])}return{baseX:n,baseY:a,textAlign:r,textVerticalAlign:o}}function kn(t,e,i){return t[e]=i,t[e]}function On(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function zn(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function En(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function Rn(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}Ri.normalizeTextStyle=function(t){return In(t),mn(t.rich,In),t},Ri.renderText=function(t,e,i,n,a){n.rich?function(t,e,i,n,a){var r=t.__textCotentBlock;r&&!t.__dirty||(r=t.__textCotentBlock=_n.parseRichText(i,n));!function(t,e,i,n,a){var r=i.width,o=i.outerWidth,s=i.outerHeight,l=n.textPadding,h=Pn(s,n,a),u=h.baseX,c=h.baseY,d=h.textAlign,p=h.textVerticalAlign;An(e,n,a,u,c);var f=_n.adjustTextX(u,o,d),g=_n.adjustTextY(c,s,p),m=f,v=g;l&&(m+=l[3],v+=l[0]);var y=m+r;Cn(n)&&Ln(t,e,n,f,g,o,s);for(var x=0;x<i.lines.length;x++){for(var _,b=i.lines[x],w=b.tokens,S=w.length,M=b.lineHeight,I=b.width,A=0,T=m,C=y,L=S-1;A<S&&(!(_=w[A]).textAlign||"left"===_.textAlign);)Tn(t,e,_,n,M,v,T,"left"),I-=_.width,T+=_.width,A++;for(;L>=0&&"right"===(_=w[L]).textAlign;)Tn(t,e,_,n,M,v,C,"right"),I-=_.width,C-=_.width,L--;for(T+=(r-(T-m)-(y-C)-I)/2;A<=L;)Tn(t,e,_=w[A],n,M,v,T+_.width/2,"center"),T+=_.width,A++;v+=M}}(t,e,r,n,a)}(t,e,i,n,a):function(t,e,i,n,a){var r=kn(e,"font",n.font||_n.DEFAULT_FONT),o=n.textPadding,s=t.__textCotentBlock;s&&!t.__dirty||(s=t.__textCotentBlock=_n.parsePlainText(i,r,o,n.truncate));var l=s.outerHeight,h=s.lines,u=s.lineHeight,c=Pn(l,n,a),d=c.baseX,p=c.baseY,f=c.textAlign,g=c.textVerticalAlign;An(e,n,a,d,p);var m=_n.adjustTextY(p,l,g),v=d,y=m,x=Cn(n);if(x||o){var _=_n.getWidth(i,r);o&&(_+=o[1]+o[3]);var b=_n.adjustTextX(d,_,f);x&&Ln(t,e,n,b,m,_,l),o&&(v=Rn(d,f,o),y+=o[0])}kn(e,"textAlign",f||"left"),kn(e,"textBaseline","middle"),kn(e,"shadowBlur",n.textShadowBlur||0),kn(e,"shadowColor",n.textShadowColor||"transparent"),kn(e,"shadowOffsetX",n.textShadowOffsetX||0),kn(e,"shadowOffsetY",n.textShadowOffsetY||0),y+=u/2;var w=n.textStrokeWidth,S=On(n.textStroke,w),M=zn(n.textFill);S&&(kn(e,"lineWidth",w),kn(e,"strokeStyle",S));M&&kn(e,"fillStyle",M);for(var I=0;I<h.length;I++)S&&e.strokeText(h[I],v,y),M&&e.fillText(h[I],v,y),y+=u}(t,e,i,n,a)},Ri.getStroke=On,Ri.getFill=zn,Ri.needDrawText=function(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)};var Nn=Ri,Vn=new Je,Bn=function(){};Bn.prototype={constructor:Bn,drawRectText:function(t,e){var i=this.style;e=i.textRect||e,this.__dirty&&Nn.normalizeTextStyle(i,!0);var n=i.text;if(null!=n&&(n+=""),Nn.needDrawText(n,i)){t.save();var a=this.transform;i.transformText?this.setTransform(t):a&&(Vn.copy(e),Vn.applyTransform(a),e=Vn),Nn.renderText(this,t,n,i,e),t.restore()}}};var Gn=Bn,Wn=b,Hn=Mi,Fn=je,Zn=Gn;function Un(t){for(var e in t=t||{},Fn.call(this,t),t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new Hn(t.style,this),this._rect=null,this.__clipPaths=[]}Un.prototype={constructor:Un,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:-1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var i=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(i[0],i[1])},dirty:function(){this.__dirty=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?Fn.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new Hn(t,this),this.dirty(!1),this}},Wn.inherits(Un,Fn),Wn.mixin(Un,Zn);var jn=Un,qn=jn,Xn=Je,Yn=b,$n=Vi;function Kn(t){qn.call(this,t)}Kn.prototype={constructor:Kn,type:"image",brush:function(t,e){var i=this.style,n=i.image;i.bind(t,this,e);var a=this._image=$n.createOrUpdateImage(n,this._image,this,this.onload);if(a&&$n.isImageReady(a)){var r=i.x||0,o=i.y||0,s=i.width,l=i.height,h=a.width/a.height;if(null==s&&null!=l?s=l*h:null==l&&null!=s?l=s/h:null==s&&null==l&&(s=a.width,l=a.height),this.setTransform(t),i.sWidth&&i.sHeight){var u=i.sx||0,c=i.sy||0;t.drawImage(a,u,c,i.sWidth,i.sHeight,r,o,s,l)}else if(i.sx&&i.sy){var d=s-(u=i.sx),p=l-(c=i.sy);t.drawImage(a,u,c,d,p,r,o,s,l)}else t.drawImage(a,r,o,s,l);this.restoreTransform(t),null!=i.text&&this.drawRectText(t,this.getBoundingRect())}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new Xn(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},Yn.inherits(Kn,qn);var Jn=Kn,Qn=be.devicePixelRatio,ta=b,ea=Ae,ia=Je,na=hi,aa=zi,ra=Ei,oa=Jn;function sa(t){return parseInt(t,10)}function la(t){t.__unusedCount++}function ha(t){1==t.__unusedCount&&t.clear()}var ua=new ia(0,0,0,0),ca=new ia(0,0,0,0);var da=function(t,e,i){this.type="canvas";var n=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=ta.extend({},i||{}),this.dpr=i.devicePixelRatio||Qn,this._singleCanvas=n,this.root=t;var a=t.style;a&&(a["-webkit-tap-highlight-color"]="transparent",a["-webkit-user-select"]=a["user-select"]=a["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var r=this._zlevelList=[],o=this._layers={};if(this._layerConfig={},n){null!=i.width&&(t.width=i.width),null!=i.height&&(t.height=i.height);var s=t.width,l=t.height;this._width=s,this._height=l;var h=new aa(t,this,1);h.initContext(),o[0]=h,r.push(0),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var u=this._domRoot=function(t,e){var i=document.createElement("div");return i.style.cssText=["position:relative","overflow:hidden","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}(this._width,this._height);t.appendChild(u)}this._progressiveLayers=[],this._hoverlayer,this._hoverElements=[]};da.prototype={constructor:da,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(t){var e=this.storage.getDisplayList(!0),i=this._zlevelList;this._paintList(e,t);for(var n=0;n<i.length;n++){var a=i[n],r=this._layers[a];!r.__builtin__&&r.refresh&&r.refresh()}return this.refreshHover(),this._progressiveLayers.length&&this._startProgessive(),this},addHover:function(t,e){if(!t.__hoverMir){var i=new t.constructor({style:t.style,shape:t.shape});i.__from=t,t.__hoverMir=i,i.setStyle(e),this._hoverElements.push(i)}},removeHover:function(t){var e=t.__hoverMir,i=this._hoverElements,n=ta.indexOf(i,e);n>=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;i<e.length;i++){var n=e[i].__from;n&&(n.__hoverMir=null)}e.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,i=this._hoverlayer;if(i&&i.clear(),e){na(t,this.storage.displayableSortFunc),i||(i=this._hoverlayer=this.getLayer(1e5));var n={};i.ctx.save();for(var a=0;a<e;){var r=t[a],o=r.__from;o&&o.__zr?(a++,o.invisible||(r.transform=o.transform,r.invTransform=o.invTransform,r.__clipPaths=o.__clipPaths,this._doPaintEl(r,i,!0,n))):(t.splice(a,1),o.__hoverMir=null,e--)}i.ctx.restore()}},_startProgessive:function(){var t=this;if(t._furtherProgressive){var e=t._progressiveToken=+new Date;t._progress++,ra((function i(){e===t._progressiveToken&&t.storage&&(t._doPaintList(t.storage.getDisplayList()),t._furtherProgressive?(t._progress++,ra(i)):t._progressiveToken=-1)}))}},_clearProgressive:function(){this._progressiveToken=-1,this._progress=0,ta.each(this._progressiveLayers,(function(t){t.__dirty&&t.clear()}))},_paintList:function(t,e){null==e&&(e=!1),this._updateLayerStatus(t),this._clearProgressive(),this.eachBuiltinLayer(la),this._doPaintList(t,e),this.eachBuiltinLayer(ha)},_doPaintList:function(t,e){var i,n,a,r,o,s,l=0,h=this._width,u=this._height,c=this._progress;function d(t){var e=a.dpr||1;a.save(),a.globalAlpha=1,a.shadowBlur=0,i.__dirty=!0,a.setTransform(1,0,0,1,0,0),a.drawImage(t.dom,0,0,h*e,u*e),a.restore()}for(var p=0,f=t.length;p<f;p++){var g=t[p],m=this._singleCanvas?0:g.zlevel,v=g.__frame;if(v<0&&o&&(d(o),o=null),n!==m&&(a&&a.restore(),r={},n=m,(i=this.getLayer(n)).__builtin__||ea("ZLevel "+n+" has been used by unkown layer "+i.id),(a=i.ctx).save(),i.__unusedCount=0,(i.__dirty||e)&&i.clear()),i.__dirty||e){if(v>=0){if(!o){if((o=this._progressiveLayers[Math.min(l++,4)]).ctx.save(),o.renderScope={},o&&o.__progress>o.__maxProgress){p=o.__nextIdxNotProg-1;continue}s=o.__progress,o.__dirty||(c=s),o.__progress=c+1}v===c&&this._doPaintEl(g,o,!0,o.renderScope)}else this._doPaintEl(g,i,e,r);g.__dirty=!1}}o&&d(o),a&&a.restore(),this._furtherProgressive=!1,ta.each(this._progressiveLayers,(function(t){t.__maxProgress>=t.__progress&&(this._furtherProgressive=!0)}),this)},_doPaintEl:function(t,e,i,n){var a=e.ctx,r=t.transform;if((e.__dirty||i)&&!t.invisible&&0!==t.style.opacity&&(!r||r[0]||r[3])&&(!t.culling||!function(t,e,i){return ua.copy(t.getBoundingRect()),t.transform&&ua.applyTransform(t.transform),ca.width=e,ca.height=i,!ua.intersect(ca)}(t,this._width,this._height))){var o=t.__clipPaths;(n.prevClipLayer!==e||function(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i<t.length;i++)if(t[i]!==e[i])return!0}(o,n.prevElClipPaths))&&(n.prevElClipPaths&&(n.prevClipLayer.ctx.restore(),n.prevClipLayer=n.prevElClipPaths=null,n.prevEl=null),o&&(a.save(),function(t,e){for(var i=0;i<t.length;i++){var n=t[i];n.setTransform(e),e.beginPath(),n.buildPath(e,n.shape),e.clip(),n.restoreTransform(e)}}(o,a),n.prevClipLayer=e,n.prevElClipPaths=o)),t.beforeBrush&&t.beforeBrush(a),t.brush(a,n.prevEl||null),n.prevEl=t,t.afterBrush&&t.afterBrush(a)}},getLayer:function(t){if(this._singleCanvas)return this._layers[0];var e=this._layers[t];return e||((e=new aa("zr_"+t,this,this.dpr)).__builtin__=!0,this._layerConfig[t]&&ta.merge(e,this._layerConfig[t],!0),this.insertLayer(t,e),e.initContext()),e},insertLayer:function(t,e){var i=this._layers,n=this._zlevelList,a=n.length,r=null,o=-1,s=this._domRoot;if(i[t])ea("ZLevel "+t+" has been used already");else if(function(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}(e)){if(a>0&&t>n[0]){for(o=0;o<a-1&&!(n[o]<t&&n[o+1]>t);o++);r=i[n[o]]}if(n.splice(o+1,0,t),i[t]=e,!e.virtual)if(r){var l=r.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else ea("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,n,a=this._zlevelList;for(n=0;n<a.length;n++)i=a[n],t.call(e,this._layers[i],i)},eachBuiltinLayer:function(t,e){var i,n,a,r=this._zlevelList;for(a=0;a<r.length;a++)n=r[a],(i=this._layers[n]).__builtin__&&t.call(e,i,n)},eachOtherLayer:function(t,e){var i,n,a,r=this._zlevelList;for(a=0;a<r.length;a++)n=r[a],(i=this._layers[n]).__builtin__||t.call(e,i,n)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){var e=this._layers,i=this._progressiveLayers,n={},a={};this.eachBuiltinLayer((function(t,e){n[e]=t.elCount,t.elCount=0,t.__dirty=!1})),ta.each(i,(function(t,e){a[e]=t.elCount,t.elCount=0,t.__dirty=!1}));for(var r,o,s=0,l=0,h=0,u=t.length;h<u;h++){var c=t[h],d=e[this._singleCanvas?0:c.zlevel],p=c.progressive;if(d&&(d.elCount++,d.__dirty=d.__dirty||c.__dirty),p>=0){o!==p&&(o=p,l++);var f=c.__frame=l-1;if(!r){var g=Math.min(s,4);(r=i[g])||(r=i[g]=new aa("progressive",this,this.dpr)).initContext(),r.__maxProgress=0}r.__dirty=r.__dirty||c.__dirty,r.elCount++,r.__maxProgress=Math.max(r.__maxProgress,f),r.__maxProgress>=r.__progress&&(d.__dirty=!0)}else c.__frame=-1,r&&(r.__nextIdxNotProg=h,s++,r=null)}r&&(s++,r.__nextIdxNotProg=h),this.eachBuiltinLayer((function(t,e){n[e]!==t.elCount&&(t.__dirty=!0)})),i.length=Math.min(s,5),ta.each(i,(function(t,e){a[e]!==t.elCount&&(c.__dirty=!0),t.__dirty&&(t.__progress=0)}))},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?ta.merge(i[t],e,!0):i[t]=e;var n=this._layers[t];n&&ta.merge(n,i[t],!0)}},delLayer:function(t){var e=this._layers,i=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],i.splice(ta.indexOf(i,t),1))},resize:function(t,e){var i=this._domRoot;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!=t||e!=this._height){for(var a in i.style.width=t+"px",i.style.height=e+"px",this._layers)this._layers.hasOwnProperty(a)&&this._layers[a].resize(t,e);ta.each(this._progressiveLayers,(function(i){i.resize(t,e)})),this.refresh(!0)}return this._width=t,this._height=e,this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas)return this._layers[0].dom;var e=new aa("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clearColor=t.backgroundColor,e.clear();var i,n=this.storage.getDisplayList(!0),a={},r=this;function o(t,i){var n,a=r._zlevelList;null==t&&(t=-1/0);for(var o=0;o<a.length;o++){var s=a[o],l=r._layers[s];if(!l.__builtin__&&s>t&&s<i){n=l;break}}n&&n.renderToCanvas&&(e.ctx.save(),n.renderToCanvas(e.ctx),e.ctx.restore())}for(var s=0;s<n.length;s++){var l=n[s];l.zlevel!==i&&(o(i,l.zlevel),i=l.zlevel),this._doPaintEl(l,e,!0,a)}return o(i,1/0),e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],a=["paddingLeft","paddingTop"][t],r=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[n]||sa(s[i])||sa(o.style[i]))-(sa(s[a])||0)-(sa(s[r])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var i=document.createElement("canvas"),n=i.getContext("2d"),a=t.getBoundingRect(),r=t.style,o=r.shadowBlur,s=r.shadowOffsetX,l=r.shadowOffsetY,h=r.hasStroke()?r.lineWidth:0,u=Math.max(h/2,-s+o),c=Math.max(h/2,s+o),d=Math.max(h/2,-l+o),p=Math.max(h/2,l+o),f=a.width+u+c,g=a.height+d+p;i.width=f*e,i.height=g*e,n.scale(e,e),n.clearRect(0,0,f,g),n.dpr=e;var m={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[u-a.x,d-a.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(n);var v=new oa({style:{x:0,y:0,image:i}});return null!=m.position&&(v.position=t.position=m.position),null!=m.rotation&&(v.rotation=t.rotation=m.rotation),null!=m.scale&&(v.scale=t.scale=m.scale),v}};var pa=da,fa={},ga=ot;fa.Dispatcher=ga;var ma=_,va="undefined"!=typeof window&&!!window.addEventListener,ya=/^(?:mouse|pointer|contextmenu|drag|drop)|click/;function xa(t,e,i,n){return i=i||{},n||!ma.canvasSupported?_a(t,e,i):ma.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(i.zrX=e.layerX,i.zrY=e.layerY):null!=e.offsetX?(i.zrX=e.offsetX,i.zrY=e.offsetY):_a(t,e,i),i}function _a(t,e,i){var n=function(t){return t.getBoundingClientRect?t.getBoundingClientRect():{left:0,top:0}}(t);i.zrX=e.clientX-n.left,i.zrY=e.clientY-n.top}var ba=va?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};fa.clientToLocal=xa,fa.normalizeEvent=function(t,e,i){if(null!=(e=e||window.event).zrX)return e;var n=e.type;if(n&&n.indexOf("touch")>=0){var a="touchend"!=n?e.targetTouches[0]:e.changedTouches[0];a&&xa(t,a,e,i)}else xa(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var r=e.button;return null==e.which&&void 0!==r&&ya.test(e.type)&&(e.which=1&r?1:2&r?3:4&r?2:0),e},fa.addEventListener=function(t,e,i){va?t.addEventListener(e,i):t.attachEvent("on"+e,i)},fa.removeEventListener=function(t,e,i){va?t.removeEventListener(e,i):t.detachEvent("on"+e,i)},fa.stop=ba,fa.notLeftMouse=function(t){return t.which>1};var wa=b,Sa=fa.Dispatcher,Ma=Ei,Ia=_e,Aa=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,Sa.call(this)};Aa.prototype={constructor:Aa,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),i=0;i<e.length;i++)this.addClip(e[i])},removeClip:function(t){var e=wa.indexOf(this._clips,t);e>=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;i<e.length;i++)this.removeClip(e[i]);t.animation=null},_update:function(){for(var t=(new Date).getTime()-this._pausedTime,e=t-this._time,i=this._clips,n=i.length,a=[],r=[],o=0;o<n;o++){var s=i[o],l=s.step(t,e);l&&(a.push(l),r.push(s))}for(o=0;o<n;)i[o]._needsRemove?(i[o]=i[n-1],i.pop(),n--):o++;n=a.length;for(o=0;o<n;o++)r[o].fire(a[o]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){var t=this;this._running=!0,Ma((function e(){t._running&&(Ma(e),!t._paused&&t._update())}))},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=[]},animate:function(t,e){var i=new Ia(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(i),i}},wa.mixin(Aa,Sa);var Ta=Aa,Ca=fa,La=function(){this._track=[]};function Da(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}La.prototype={constructor:La,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},r=0,o=n.length;r<o;r++){var s=n[r],l=Ca.clientToLocal(i,s,{});a.points.push([l.zrX,l.zrY]),a.touches.push(s)}this._track.push(a)}},_recognize:function(t){for(var e in Pa)if(Pa.hasOwnProperty(e)){var i=Pa[e](this._track,t);if(i)return i}}};var Pa={pinch:function(t,e){var i=t.length;if(i){var n,a=(t[i-1]||{}).points,r=(t[i-2]||{}).points||a;if(r&&r.length>1&&a&&a.length>1){var o=Da(a)/Da(r);!isFinite(o)&&(o=1),e.pinchScale=o;var s=[((n=a)[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},ka=La,Oa=fa,za=Oa.addEventListener,Ea=Oa.removeEventListener,Ra=Oa.normalizeEvent,Na=b,Va=ot,Ba=_,Ga=ka,Wa=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Ha=["touchstart","touchend","touchmove"],Fa={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},Za=Na.map(Wa,(function(t){var e=t.replace("mouse","pointer");return Fa[e]?e:t}));function Ua(t){return"mousewheel"===t&&Ba.browser.firefox?"DOMMouseScroll":t}function ja(t,e,i){var n=t._gestureMgr;"start"===i&&n.clear();var a=n.recognize(e,t.handler.findHover(e.zrX,e.zrY,null).target,t.dom);if("end"===i&&n.clear(),a){var r=a.type;e.gestureEvent=r,t.handler.dispatchToElement({target:a.target},r,a.event)}}function qa(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout((function(){t._touching=!1}),700)}var Xa={mousemove:function(t){t=Ra(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=Ra(this.dom,t)).toElement||t.relatedTarget;if(e!=this.dom)for(;e&&9!=e.nodeType;){if(e===this.dom)return;e=e.parentNode}this.trigger("mouseout",t)},touchstart:function(t){(t=Ra(this.dom,t)).zrByTouch=!0,this._lastTouchMoment=new Date,ja(this,t,"start"),Xa.mousemove.call(this,t),Xa.mousedown.call(this,t),qa(this)},touchmove:function(t){(t=Ra(this.dom,t)).zrByTouch=!0,ja(this,t,"change"),Xa.mousemove.call(this,t),qa(this)},touchend:function(t){(t=Ra(this.dom,t)).zrByTouch=!0,ja(this,t,"end"),Xa.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&Xa.click.call(this,t),qa(this)},pointerdown:function(t){Xa.mousedown.call(this,t)},pointermove:function(t){Ya(t)||Xa.mousemove.call(this,t)},pointerup:function(t){Xa.mouseup.call(this,t)},pointerout:function(t){Ya(t)||Xa.mouseout.call(this,t)}};function Ya(t){var e=t.pointerType;return"pen"===e||"touch"===e}function $a(t){var e;function i(e,i){Na.each(e,(function(e){za(t,Ua(e),i._handlers[e])}),i)}Va.call(this),this.dom=t,this._touching=!1,this._touchTimer,this._gestureMgr=new Ga,this._handlers={},e=this,Na.each(Ha,(function(t){e._handlers[t]=Na.bind(Xa[t],e)})),Na.each(Za,(function(t){e._handlers[t]=Na.bind(Xa[t],e)})),Na.each(Wa,(function(t){var i,n;e._handlers[t]=(i=Xa[t],n=e,function(){if(!n._touching)return i.apply(n,arguments)})})),Ba.pointerEventsSupported?i(Za,this):(Ba.touchEventsSupported&&i(Ha,this),i(Wa,this))}Na.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){Xa[t]=function(e){e=Ra(this.dom,e),this.trigger(t,e)}}));var Ka=$a.prototype;Ka.dispose=function(){for(var t=Wa.concat(Ha),e=0;e<t.length;e++){var i=t[e];Ea(this.dom,Ua(i),this._handlers[i])}},Ka.setCursor=function(t){this.dom.style.cursor=t||"default"},Na.mixin($a,Va);var Ja=x,Qa=_,tr=b,er=gt,ir=mi,nr=pa,ar=Ta,rr=$a,or=!Qa.canvasSupported,sr={canvas:nr},lr={};var hr=function(t,e,i){i=i||{},this.dom=e,this.id=t;var n=this,a=new ir,r=i.renderer;if(or){if(!sr.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");r="vml"}else r&&sr[r]||(r="canvas");var o=new sr[r](e,a,i);this.storage=a,this.painter=o;var s=Qa.node?null:new rr(o.getViewportRoot());this.handler=new er(a,o,s,o.root),this.animation=new ar({stage:{update:tr.bind(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=a.delFromStorage,h=a.addToStorage;a.delFromStorage=function(t){l.call(a,t),t&&t.removeSelfFromZr(n)},a.addToStorage=function(t){h.call(a,t),t.addSelfToZr(n)}};hr.prototype={constructor:hr,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer(t,e),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},refresh:function(){this._needsRefresh=!0},flush:function(){this._needsRefresh&&this.refreshImmediately(),this._needsRefreshHover&&this.refreshHoverImmediately()},addHover:function(t,e){this.painter.addHover&&(this.painter.addHover(t,e),this.refreshHover())},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e){return this.painter.pathToImage(t,e)},setCursorStyle:function(t){this.handler.setCursorStyle(t)},findHover:function(t,e){return this.handler.findHover(t,e)},on:function(t,e,i){this.handler.on(t,e,i)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){var t;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,t=this.id,delete lr[t]}},v.version="3.7.4",v.init=function(t,e){var i=new hr(Ja(),t,e);return lr[i.id]=i,i},v.dispose=function(t){if(t)t.dispose();else{for(var e in lr)lr.hasOwnProperty(e)&&lr[e].dispose();lr={}}return this},v.getInstance=function(t){return lr[t]},v.registerPainter=function(t,e){sr[t]=e};var ur={},cr={},dr={},pr=b;var fr=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function gr(t){return Math.floor(Math.log(t)/Math.LN10)}dr.linearMap=function(t,e,i,n){var a=e[1]-e[0],r=i[1]-i[0];if(0===a)return 0===r?i[0]:(i[0]+i[1])/2;if(n)if(a>0){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/a*r+i[0]},dr.parsePercent=function(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?(i=t,i.replace(/^\s+/,"").replace(/\s+$/,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var i},dr.round=function(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t},dr.asc=function(t){return t.sort((function(t,e){return t-e})),t},dr.getPrecision=function(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i},dr.getPrecisionSafe=function(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var a=e.indexOf(".");return a<0?0:e.length-1-a},dr.getPixelPrecision=function(t,e){var i=Math.log,n=Math.LN10,a=Math.floor(i(t[1]-t[0])/n),r=Math.round(i(Math.abs(e[1]-e[0]))/n),o=Math.min(Math.max(-a+r,0),20);return isFinite(o)?o:20},dr.getPercentWithPrecision=function(t,e,i){if(!t[e])return 0;var n=pr.reduce(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===n)return 0;for(var a=Math.pow(10,i),r=pr.map(t,(function(t){return(isNaN(t)?0:t)/n*a*100})),o=100*a,s=pr.map(r,(function(t){return Math.floor(t)})),l=pr.reduce(s,(function(t,e){return t+e}),0),h=pr.map(r,(function(t,e){return t-s[e]}));l<o;){for(var u=Number.NEGATIVE_INFINITY,c=null,d=0,p=h.length;d<p;++d)h[d]>u&&(u=h[d],c=d);++s[c],h[c]=0,++l}return s[e]/a},dr.MAX_SAFE_INTEGER=9007199254740991,dr.remRadian=function(t){var e=2*Math.PI;return(t%e+e)%e},dr.isRadianAroundZero=function(t){return t>-1e-4&&t<1e-4},dr.parseDate=function(t){if(t instanceof Date)return t;if("string"==typeof t){var e=fr.exec(t);if(!e)return new Date(NaN);if(e[8]){var i=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(i-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,i,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}return null==t?new Date(NaN):new Date(Math.round(t))},dr.quantity=function(t){return Math.pow(10,gr(t))},dr.nice=function(t,e){var i=gr(t),n=Math.pow(10,i),a=t/n;return t=(e?a<1.5?1:a<2.5?2:a<4?3:a<7?5:10:a<1?1:a<2?2:a<3?3:a<5?5:10)*n,i>=-20?+t.toFixed(i<0?-i:0):t},dr.reformIntervals=function(t){t.sort((function(t,e){return s(t,e,0)?-1:1}));for(var e=-1/0,i=1,n=0;n<t.length;){for(var a=t[n].interval,r=t[n].close,o=0;o<2;o++)a[o]<=e&&(a[o]=e,r[o]=o?1:1-i),e=a[o],i=r[o];a[0]===a[1]&&r[0]*r[1]!=1?t.splice(n,1):n++}return t;function s(t,e,i){return t.interval[i]<e.interval[i]||t.interval[i]===e.interval[i]&&(t.close[i]-e.close[i]==(i?-1:1)||!i&&s(t,e,1))}},dr.isNumeric=function(t){return t-parseFloat(t)>=0};var mr=b,vr=Ni,yr=dr;var xr=mr.normalizeCssArray;function _r(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}var br=["a","b","c","d","e","f","g"],wr=function(t,e){return"{"+t+(null==e?"":e)+"}"};var Sr=function(t){return t<10?"0"+t:t};var Mr=vr.truncateText,Ir=vr.getBoundingRect;cr.addCommas=function(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")},cr.toCamelCase=function(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()})),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t},cr.normalizeCssArray=xr,cr.encodeHTML=_r,cr.formatTpl=function(t,e,i){mr.isArray(e)||(e=[e]);var n=e.length;if(!n)return"";for(var a=e[0].$vars||[],r=0;r<a.length;r++){var o=br[r],s=wr(o,0);t=t.replace(wr(o),i?_r(s):s)}for(var l=0;l<n;l++)for(var h=0;h<a.length;h++){s=e[l][a[h]];t=t.replace(wr(br[h],l),i?_r(s):s)}return t},cr.formatTplSimple=function(t,e,i){return mr.each(e,(function(e,n){t=t.replace("{"+n+"}",i?_r(e):e)})),t},cr.getTooltipMarker=function(t,e){return t?'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:'+_r(t)+";"+(e||"")+'"></span>':""},cr.formatTime=function(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=yr.parseDate(e),a=i?"UTC":"",r=n["get"+a+"FullYear"](),o=n["get"+a+"Month"]()+1,s=n["get"+a+"Date"](),l=n["get"+a+"Hours"](),h=n["get"+a+"Minutes"](),u=n["get"+a+"Seconds"]();return t=t.replace("MM",Sr(o)).replace("M",o).replace("yyyy",r).replace("yy",r%100).replace("dd",Sr(s)).replace("d",s).replace("hh",Sr(l)).replace("h",l).replace("mm",Sr(h)).replace("m",h).replace("ss",Sr(u)).replace("s",u)},cr.capitalFirst=function(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t},cr.truncateText=Mr,cr.getTextRect=Ir;var Ar={},Tr=b,Cr="___EC__COMPONENT__CONTAINER___";function Lr(t){var e={main:"",sub:""};return t&&(t=t.split("."),e.main=t[0]||"",e.sub=t[1]||""),e}function Dr(t,e){var i=Tr.slice(arguments,2);return this.superClass.prototype[e].apply(t,i)}function Pr(t,e,i){return this.superClass.prototype[e].apply(t,i)}Ar.set=function(t,e,i){return t["\0ec_\0"+e]=i},Ar.get=function(t,e){return t["\0ec_\0"+e]},Ar.hasOwn=function(t,e){return t.hasOwnProperty("\0ec_\0"+e)},Ar.parseClassType=Lr,Ar.enableClassExtend=function(t,e){t.$constructor=t,t.extend=function(t){var e=this,i=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return Tr.extend(i.prototype,t),i.extend=this.extend,i.superCall=Dr,i.superApply=Pr,Tr.inherits(i,this),i.superClass=e,i}},Ar.enableClassManagement=function(t,e){e=e||{};var i={};if(t.registerClass=function(t,e){if(e)if(function(t){Tr.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}(e),(e=Lr(e)).sub){if(e.sub!==Cr){var n=function(t){var e=i[t.main];e&&e[Cr]||((e=i[t.main]={})[Cr]=!0);return e}(e);n[e.sub]=t}}else i[e.main]=t;return t},t.getClass=function(t,e,n){var a=i[t];if(a&&a[Cr]&&(a=e?a[e]:null),n&&!a)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return a},t.getClassesByMainType=function(t){t=Lr(t);var e=[],n=i[t.main];return n&&n[Cr]?Tr.each(n,(function(t,i){i!==Cr&&e.push(t)})):e.push(n),e},t.hasClass=function(t){return t=Lr(t),!!i[t.main]},t.getAllClassMainTypes=function(){var t=[];return Tr.each(i,(function(e,i){t.push(i)})),t},t.hasSubTypes=function(t){t=Lr(t);var e=i[t.main];return e&&e[Cr]},t.parseClassType=Lr,e.registerWhenExtend){var n=t.extend;n&&(t.extend=function(e){var i=n.call(this,e);return t.registerClass(i,e.type)})}return t},Ar.setReadOnly=function(t,e){};var kr=b;var Or=function(t){for(var e=0;e<t.length;e++)t[e][1]||(t[e][1]=t[e][0]);return function(e,i,n){for(var a={},r=0;r<t.length;r++){var o=t[r][1];if(!(i&&kr.indexOf(i,o)>=0||n&&kr.indexOf(n,o)<0)){var s=e.getShallow(o);null!=s&&(a[t[r][0]]=s)}}return a}},zr=Or([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Er={getLineStyle:function(t){var e=zr(this,t),i=this.getLineDash(e.lineWidth);return i&&(e.lineDash=i),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),i=Math.max(t,2),n=4*t;return"solid"===e||null==e?null:"dashed"===e?[n,n]:[i,i]}},Rr=Or([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Nr={getAreaStyle:function(t,e){return Rr(this,t,e)}},Vr={},Br={},Gr={},Wr=U,Hr=Wr.create,Fr=Wr.distSquare,Zr=Math.pow,Ur=Math.sqrt,jr=Ur(3),qr=1/3,Xr=Hr(),Yr=Hr(),$r=Hr();function Kr(t){return t>-1e-8&&t<1e-8}function Jr(t){return t>1e-8||t<-1e-8}function Qr(t,e,i,n,a){var r=1-a;return r*r*(r*t+3*a*e)+a*a*(a*n+3*r*i)}function to(t,e,i,n){var a=1-n;return a*(a*t+2*n*e)+n*n*i}Gr.cubicAt=Qr,Gr.cubicDerivativeAt=function(t,e,i,n,a){var r=1-a;return 3*(((e-t)*r+2*(i-e)*a)*r+(n-i)*a*a)},Gr.cubicRootAt=function(t,e,i,n,a,r){var o=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),h=t-a,u=s*s-3*o*l,c=s*l-9*o*h,d=l*l-3*s*h,p=0;if(Kr(u)&&Kr(c)){if(Kr(s))r[0]=0;else(M=-l/s)>=0&&M<=1&&(r[p++]=M)}else{var f=c*c-4*u*d;if(Kr(f)){var g=c/u,m=-g/2;(M=-s/o+g)>=0&&M<=1&&(r[p++]=M),m>=0&&m<=1&&(r[p++]=m)}else if(f>0){var v=Ur(f),y=u*s+1.5*o*(-c+v),x=u*s+1.5*o*(-c-v);(M=(-s-((y=y<0?-Zr(-y,qr):Zr(y,qr))+(x=x<0?-Zr(-x,qr):Zr(x,qr))))/(3*o))>=0&&M<=1&&(r[p++]=M)}else{var _=(2*u*s-3*o*c)/(2*Ur(u*u*u)),b=Math.acos(_)/3,w=Ur(u),S=Math.cos(b),M=(-s-2*w*S)/(3*o),I=(m=(-s+w*(S+jr*Math.sin(b)))/(3*o),(-s+w*(S-jr*Math.sin(b)))/(3*o));M>=0&&M<=1&&(r[p++]=M),m>=0&&m<=1&&(r[p++]=m),I>=0&&I<=1&&(r[p++]=I)}}return p},Gr.cubicExtrema=function(t,e,i,n,a){var r=6*i-12*e+6*t,o=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(Kr(o)){if(Jr(r))(u=-s/r)>=0&&u<=1&&(a[l++]=u)}else{var h=r*r-4*o*s;if(Kr(h))a[0]=-r/(2*o);else if(h>0){var u,c=Ur(h),d=(-r-c)/(2*o);(u=(-r+c)/(2*o))>=0&&u<=1&&(a[l++]=u),d>=0&&d<=1&&(a[l++]=d)}}return l},Gr.cubicSubdivide=function(t,e,i,n,a,r){var o=(e-t)*a+t,s=(i-e)*a+e,l=(n-i)*a+i,h=(s-o)*a+o,u=(l-s)*a+s,c=(u-h)*a+h;r[0]=t,r[1]=o,r[2]=h,r[3]=c,r[4]=c,r[5]=u,r[6]=l,r[7]=n},Gr.cubicProjectPoint=function(t,e,i,n,a,r,o,s,l,h,u){var c,d,p,f,g,m=.005,v=1/0;Xr[0]=l,Xr[1]=h;for(var y=0;y<1;y+=.05)Yr[0]=Qr(t,i,a,o,y),Yr[1]=Qr(e,n,r,s,y),(f=Fr(Xr,Yr))<v&&(c=y,v=f);v=1/0;for(var x=0;x<32&&!(m<1e-4);x++)d=c-m,p=c+m,Yr[0]=Qr(t,i,a,o,d),Yr[1]=Qr(e,n,r,s,d),f=Fr(Yr,Xr),d>=0&&f<v?(c=d,v=f):($r[0]=Qr(t,i,a,o,p),$r[1]=Qr(e,n,r,s,p),g=Fr($r,Xr),p<=1&&g<v?(c=p,v=g):m*=.5);return u&&(u[0]=Qr(t,i,a,o,c),u[1]=Qr(e,n,r,s,c)),Ur(v)},Gr.quadraticAt=to,Gr.quadraticDerivativeAt=function(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))},Gr.quadraticRootAt=function(t,e,i,n,a){var r=t-2*e+i,o=2*(e-t),s=t-n,l=0;if(Kr(r)){if(Jr(o))(u=-s/o)>=0&&u<=1&&(a[l++]=u)}else{var h=o*o-4*r*s;if(Kr(h))(u=-o/(2*r))>=0&&u<=1&&(a[l++]=u);else if(h>0){var u,c=Ur(h),d=(-o-c)/(2*r);(u=(-o+c)/(2*r))>=0&&u<=1&&(a[l++]=u),d>=0&&d<=1&&(a[l++]=d)}}return l},Gr.quadraticExtremum=function(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n},Gr.quadraticSubdivide=function(t,e,i,n,a){var r=(e-t)*n+t,o=(i-e)*n+e,s=(o-r)*n+r;a[0]=t,a[1]=r,a[2]=s,a[3]=s,a[4]=o,a[5]=i},Gr.quadraticProjectPoint=function(t,e,i,n,a,r,o,s,l){var h,u=.005,c=1/0;Xr[0]=o,Xr[1]=s;for(var d=0;d<1;d+=.05){Yr[0]=to(t,i,a,d),Yr[1]=to(e,n,r,d),(m=Fr(Xr,Yr))<c&&(h=d,c=m)}c=1/0;for(var p=0;p<32&&!(u<1e-4);p++){var f=h-u,g=h+u;Yr[0]=to(t,i,a,f),Yr[1]=to(e,n,r,f);var m=Fr(Yr,Xr);if(f>=0&&m<c)h=f,c=m;else{$r[0]=to(t,i,a,g),$r[1]=to(e,n,r,g);var v=Fr($r,Xr);g<=1&&v<c?(h=g,c=v):u*=.5}}return l&&(l[0]=to(t,i,a,h),l[1]=to(e,n,r,h)),Ur(c)};var eo={},io=U,no=Gr,ao=Math.min,ro=Math.max,oo=Math.sin,so=Math.cos,lo=2*Math.PI,ho=io.create(),uo=io.create(),co=io.create();var po=[],fo=[];eo.fromPoints=function(t,e,i){if(0!==t.length){var n,a=t[0],r=a[0],o=a[0],s=a[1],l=a[1];for(n=1;n<t.length;n++)a=t[n],r=ao(r,a[0]),o=ro(o,a[0]),s=ao(s,a[1]),l=ro(l,a[1]);e[0]=r,e[1]=s,i[0]=o,i[1]=l}},eo.fromLine=function(t,e,i,n,a,r){a[0]=ao(t,i),a[1]=ao(e,n),r[0]=ro(t,i),r[1]=ro(e,n)},eo.fromCubic=function(t,e,i,n,a,r,o,s,l,h){var u,c=no.cubicExtrema,d=no.cubicAt,p=c(t,i,a,o,po);for(l[0]=1/0,l[1]=1/0,h[0]=-1/0,h[1]=-1/0,u=0;u<p;u++){var f=d(t,i,a,o,po[u]);l[0]=ao(f,l[0]),h[0]=ro(f,h[0])}for(p=c(e,n,r,s,fo),u=0;u<p;u++){var g=d(e,n,r,s,fo[u]);l[1]=ao(g,l[1]),h[1]=ro(g,h[1])}l[0]=ao(t,l[0]),h[0]=ro(t,h[0]),l[0]=ao(o,l[0]),h[0]=ro(o,h[0]),l[1]=ao(e,l[1]),h[1]=ro(e,h[1]),l[1]=ao(s,l[1]),h[1]=ro(s,h[1])},eo.fromQuadratic=function(t,e,i,n,a,r,o,s){var l=no.quadraticExtremum,h=no.quadraticAt,u=ro(ao(l(t,i,a),1),0),c=ro(ao(l(e,n,r),1),0),d=h(t,i,a,u),p=h(e,n,r,c);o[0]=ao(t,a,d),o[1]=ao(e,r,p),s[0]=ro(t,a,d),s[1]=ro(e,r,p)},eo.fromArc=function(t,e,i,n,a,r,o,s,l){var h=io.min,u=io.max,c=Math.abs(a-r);if(c%lo<1e-4&&c>1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(ho[0]=so(a)*i+t,ho[1]=oo(a)*n+e,uo[0]=so(r)*i+t,uo[1]=oo(r)*n+e,h(s,ho,uo),u(l,ho,uo),(a%=lo)<0&&(a+=lo),(r%=lo)<0&&(r+=lo),a>r&&!o?r+=lo:a<r&&o&&(a+=lo),o){var d=r;r=a,a=d}for(var p=0;p<r;p+=Math.PI/2)p>a&&(co[0]=so(p)*i+t,co[1]=oo(p)*n+e,h(s,co,s),u(l,co,l))};var go=Gr,mo=U,vo=eo,yo=Je,xo=be.devicePixelRatio,_o={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},bo=[],wo=[],So=[],Mo=[],Io=Math.min,Ao=Math.max,To=Math.cos,Co=Math.sin,Lo=Math.sqrt,Do=Math.abs,Po="undefined"!=typeof Float32Array,ko=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};ko.prototype={constructor:ko,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=Do(1/xo/t)||0,this._uy=Do(1/xo/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(_o.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var i=Do(t-this._xi)>this._ux||Do(e-this._yi)>this._uy||this._len<5;return this.addData(_o.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,a,r){return this.addData(_o.C,t,e,i,n,a,r),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,a,r):this._ctx.bezierCurveTo(t,e,i,n,a,r)),this._xi=a,this._yi=r,this},quadraticCurveTo:function(t,e,i,n){return this.addData(_o.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,a,r){return this.addData(_o.A,t,e,i,i,n,a-n,0,r?0:1),this._ctx&&this._ctx.arc(t,e,i,n,a,r),this._xi=To(a)*i+t,this._yi=Co(a)*i+t,this},arcTo:function(t,e,i,n,a){return this._ctx&&this._ctx.arcTo(t,e,i,n,a),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(_o.R,t,e,i,n),this},closePath:function(){this.addData(_o.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,i=0;i<t.length;i++)e+=t[i];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;this.data&&this.data.length==e||!Po||(this.data=new Float32Array(e));for(var i=0;i<e;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;a<e;a++)i+=t[a].len();Po&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(a=0;a<e;a++)for(var r=t[a].data,o=0;o<r.length;o++)this.data[n++]=r[o];this._len=n},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var i=0;i<arguments.length;i++)e[this._len++]=arguments[i];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var i,n,a=this._dashSum,r=this._dashOffset,o=this._lineDash,s=this._ctx,l=this._xi,h=this._yi,u=t-l,c=e-h,d=Lo(u*u+c*c),p=l,f=h,g=o.length;for(r<0&&(r=a+r),p-=(r%=a)*(u/=d),f-=r*(c/=d);u>0&&p<=t||u<0&&p>=t||0==u&&(c>0&&f<=e||c<0&&f>=e);)p+=u*(i=o[n=this._dashIdx]),f+=c*i,this._dashIdx=(n+1)%g,u>0&&p<l||u<0&&p>l||c>0&&f<h||c<0&&f>h||s[n%2?"moveTo":"lineTo"](u>=0?Io(p,t):Ao(p,t),c>=0?Io(f,e):Ao(f,e));u=p-t,c=f-e,this._dashOffset=-Lo(u*u+c*c)},_dashedBezierTo:function(t,e,i,n,a,r){var o,s,l,h,u,c=this._dashSum,d=this._dashOffset,p=this._lineDash,f=this._ctx,g=this._xi,m=this._yi,v=go.cubicAt,y=0,x=this._dashIdx,_=p.length,b=0;for(d<0&&(d=c+d),d%=c,o=0;o<1;o+=.1)s=v(g,t,i,a,o+.1)-v(g,t,i,a,o),l=v(m,e,n,r,o+.1)-v(m,e,n,r,o),y+=Lo(s*s+l*l);for(;x<_&&!((b+=p[x])>d);x++);for(o=(b-d)/y;o<=1;)h=v(g,t,i,a,o),u=v(m,e,n,r,o),x%2?f.moveTo(h,u):f.lineTo(h,u),o+=p[x]/y,x=(x+1)%_;x%2!=0&&f.lineTo(a,r),s=a-h,l=r-u,this._dashOffset=-Lo(s*s+l*l)},_dashedQuadraticTo:function(t,e,i,n){var a=i,r=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,n,a,r)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,Po&&(this.data=new Float32Array(t)))},getBoundingRect:function(){bo[0]=bo[1]=So[0]=So[1]=Number.MAX_VALUE,wo[0]=wo[1]=Mo[0]=Mo[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,a=0,r=0;r<t.length;){var o=t[r++];switch(1==r&&(n=e=t[r],a=i=t[r+1]),o){case _o.M:e=n=t[r++],i=a=t[r++],So[0]=n,So[1]=a,Mo[0]=n,Mo[1]=a;break;case _o.L:vo.fromLine(e,i,t[r],t[r+1],So,Mo),e=t[r++],i=t[r++];break;case _o.C:vo.fromCubic(e,i,t[r++],t[r++],t[r++],t[r++],t[r],t[r+1],So,Mo),e=t[r++],i=t[r++];break;case _o.Q:vo.fromQuadratic(e,i,t[r++],t[r++],t[r],t[r+1],So,Mo),e=t[r++],i=t[r++];break;case _o.A:var s=t[r++],l=t[r++],h=t[r++],u=t[r++],c=t[r++],d=t[r++]+c;t[r++];var p=1-t[r++];1==r&&(n=To(c)*h+s,a=Co(c)*u+l),vo.fromArc(s,l,h,u,c,d,p,So,Mo),e=To(d)*h+s,i=Co(d)*u+l;break;case _o.R:n=e=t[r++],a=i=t[r++];var f=t[r++],g=t[r++];vo.fromLine(n,a,n+f,a+g,So,Mo);break;case _o.Z:e=n,i=a}mo.min(bo,bo,So),mo.max(wo,wo,Mo)}return 0===r&&(bo[0]=bo[1]=wo[0]=wo[1]=0),new yo(bo[0],bo[1],wo[0]-bo[0],wo[1]-bo[1])},rebuildPath:function(t){for(var e,i,n,a,r,o,s=this.data,l=this._ux,h=this._uy,u=this._len,c=0;c<u;){var d=s[c++];switch(1==c&&(e=n=s[c],i=a=s[c+1]),d){case _o.M:e=n=s[c++],i=a=s[c++],t.moveTo(n,a);break;case _o.L:r=s[c++],o=s[c++],(Do(r-n)>l||Do(o-a)>h||c===u-1)&&(t.lineTo(r,o),n=r,a=o);break;case _o.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],a=s[c-1];break;case _o.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],a=s[c-1];break;case _o.A:var p=s[c++],f=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],b=g>m?g:m,w=g>m?1:g/m,S=g>m?m/g:1,M=v+y;Math.abs(g-m)>.001?(t.translate(p,f),t.rotate(x),t.scale(w,S),t.arc(0,0,b,v,M,1-_),t.scale(1/w,1/S),t.rotate(-x),t.translate(-p,-f)):t.arc(p,f,b,v,M,1-_),1==c&&(e=To(v)*g+p,i=Co(v)*m+f),n=To(M)*g+p,a=Co(M)*m+f;break;case _o.R:e=n=s[c],i=a=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case _o.Z:t.closePath(),n=e,a=i}}}},ko.CMD=_o;var Oo=ko,zo={},Eo={};Eo.containStroke=function(t,e,i,n,a,r,o){if(0===a)return!1;var s=a,l=0;if(o>e+s&&o>n+s||o<e-s&&o<n-s||r>t+s&&r>i+s||r<t-s&&r<i-s)return!1;if(t===i)return Math.abs(r-t)<=s/2;var h=(l=(e-n)/(t-i))*r-o+(t*n-i*e)/(t-i);return h*h/(l*l+1)<=s/2*s/2};var Ro={},No=Gr;Ro.containStroke=function(t,e,i,n,a,r,o,s,l,h,u){if(0===l)return!1;var c=l;return!(u>e+c&&u>n+c&&u>r+c&&u>s+c||u<e-c&&u<n-c&&u<r-c&&u<s-c||h>t+c&&h>i+c&&h>a+c&&h>o+c||h<t-c&&h<i-c&&h<a-c&&h<o-c)&&No.cubicProjectPoint(t,e,i,n,a,r,o,s,h,u,null)<=c/2};var Vo={},Bo=Gr.quadraticProjectPoint;Vo.containStroke=function(t,e,i,n,a,r,o,s,l){if(0===o)return!1;var h=o;return!(l>e+h&&l>n+h&&l>r+h||l<e-h&&l<n-h&&l<r-h||s>t+h&&s>i+h&&s>a+h||s<t-h&&s<i-h&&s<a-h)&&Bo(t,e,i,n,a,r,s,l,null)<=h/2};var Go={},Wo={},Ho=2*Math.PI;Wo.normalizeRadian=function(t){return(t%=Ho)<0&&(t+=Ho),t};var Fo=Wo.normalizeRadian,Zo=2*Math.PI;Go.containStroke=function(t,e,i,n,a,r,o,s,l){if(0===o)return!1;var h=o;s-=t,l-=e;var u=Math.sqrt(s*s+l*l);if(u-h>i||u+h<i)return!1;if(Math.abs(n-a)%Zo<1e-4)return!0;if(r){var c=n;n=Fo(a),a=Fo(c)}else n=Fo(n),a=Fo(a);n>a&&(a+=Zo);var d=Math.atan2(l,s);return d<0&&(d+=Zo),d>=n&&d<=a||d+Zo>=n&&d+Zo<=a};var Uo=function(t,e,i,n,a,r){if(r>e&&r>n||r<e&&r<n)return 0;if(n===e)return 0;var o=n<e?1:-1,s=(r-e)/(n-e);return 1!==s&&0!==s||(o=n<e?.5:-.5),s*(i-t)+t>a?o:0},jo=Oo,qo=Eo,Xo=Ro,Yo=Vo,$o=Go,Ko=Wo.normalizeRadian,Jo=Gr,Qo=Uo,ts=jo.CMD,es=2*Math.PI;var is=[-1,-1,-1],ns=[-1,-1];function as(t,e,i,n,a,r,o,s,l,h){if(h>e&&h>n&&h>r&&h>s||h<e&&h<n&&h<r&&h<s)return 0;var u,c=Jo.cubicRootAt(e,n,r,s,h,is);if(0===c)return 0;for(var d,p,f=0,g=-1,m=0;m<c;m++){var v=is[m],y=0===v||1===v?.5:1;Jo.cubicAt(t,i,a,o,v)<l||(g<0&&(g=Jo.cubicExtrema(e,n,r,s,ns),ns[1]<ns[0]&&g>1&&(u=void 0,u=ns[0],ns[0]=ns[1],ns[1]=u),d=Jo.cubicAt(e,n,r,s,ns[0]),g>1&&(p=Jo.cubicAt(e,n,r,s,ns[1]))),2==g?v<ns[0]?f+=d<e?y:-y:v<ns[1]?f+=p<d?y:-y:f+=s<p?y:-y:v<ns[0]?f+=d<e?y:-y:f+=s<d?y:-y)}return f}function rs(t,e,i,n,a,r,o,s){if(s>e&&s>n&&s>r||s<e&&s<n&&s<r)return 0;var l=Jo.quadraticRootAt(e,n,r,s,is);if(0===l)return 0;var h=Jo.quadraticExtremum(e,n,r);if(h>=0&&h<=1){for(var u=0,c=Jo.quadraticAt(e,n,r,h),d=0;d<l;d++){var p=0===is[d]||1===is[d]?.5:1;Jo.quadraticAt(t,i,a,is[d])<o||(is[d]<h?u+=c<e?p:-p:u+=r<c?p:-p)}return u}p=0===is[0]||1===is[0]?.5:1;return Jo.quadraticAt(t,i,a,is[0])<o?0:r<e?p:-p}function os(t,e,i,n,a,r,o,s){if((s-=e)>i||s<-i)return 0;var l=Math.sqrt(i*i-s*s);is[0]=-l,is[1]=l;var h=Math.abs(n-a);if(h<1e-4)return 0;if(h%es<1e-4){n=0,a=es;var u=r?1:-1;return o>=is[0]+t&&o<=is[1]+t?u:0}if(r){l=n;n=Ko(a),a=Ko(l)}else n=Ko(n),a=Ko(a);n>a&&(a+=es);for(var c=0,d=0;d<2;d++){var p=is[d];if(p+t>o){var f=Math.atan2(s,p);u=r?1:-1;f<0&&(f=es+f),(f>=n&&f<=a||f+es>=n&&f+es<=a)&&(f>Math.PI/2&&f<1.5*Math.PI&&(u=-u),c+=u)}}return c}function ss(t,e,i,n,a){for(var r,o,s=0,l=0,h=0,u=0,c=0,d=0;d<t.length;){var p=t[d++];switch(p===ts.M&&d>1&&(i||(s+=Qo(l,h,u,c,n,a))),1==d&&(u=l=t[d],c=h=t[d+1]),p){case ts.M:l=u=t[d++],h=c=t[d++];break;case ts.L:if(i){if(qo.containStroke(l,h,t[d],t[d+1],e,n,a))return!0}else s+=Qo(l,h,t[d],t[d+1],n,a)||0;l=t[d++],h=t[d++];break;case ts.C:if(i){if(Xo.containStroke(l,h,t[d++],t[d++],t[d++],t[d++],t[d],t[d+1],e,n,a))return!0}else s+=as(l,h,t[d++],t[d++],t[d++],t[d++],t[d],t[d+1],n,a)||0;l=t[d++],h=t[d++];break;case ts.Q:if(i){if(Yo.containStroke(l,h,t[d++],t[d++],t[d],t[d+1],e,n,a))return!0}else s+=rs(l,h,t[d++],t[d++],t[d],t[d+1],n,a)||0;l=t[d++],h=t[d++];break;case ts.A:var f=t[d++],g=t[d++],m=t[d++],v=t[d++],y=t[d++],x=t[d++];t[d++];var _=1-t[d++],b=Math.cos(y)*m+f,w=Math.sin(y)*v+g;d>1?s+=Qo(l,h,b,w,n,a):(u=b,c=w);var S=(n-f)*v/m+f;if(i){if($o.containStroke(f,g,v,y,y+x,_,e,S,a))return!0}else s+=os(f,g,v,y,y+x,_,S,a);l=Math.cos(y+x)*m+f,h=Math.sin(y+x)*v+g;break;case ts.R:u=l=t[d++],c=h=t[d++];b=u+t[d++],w=c+t[d++];if(i){if(qo.containStroke(u,c,b,c,e,n,a)||qo.containStroke(b,c,b,w,e,n,a)||qo.containStroke(b,w,u,w,e,n,a)||qo.containStroke(u,w,u,c,e,n,a))return!0}else s+=Qo(b,c,b,w,n,a),s+=Qo(u,w,u,c,n,a);break;case ts.Z:if(i){if(qo.containStroke(l,h,u,c,e,n,a))return!0}else s+=Qo(l,h,u,c,n,a);l=u,h=c}}return i||(r=h,o=c,Math.abs(r-o)<1e-4)||(s+=Qo(l,h,u,c,n,a)||0),0!==s}zo.contain=function(t,e,i){return ss(t,0,!1,e,i)},zo.containStroke=function(t,e,i,n){return ss(t,e,!0,i,n)};var ls=jn,hs=b,us=Oo,cs=zo,ds=Ai.prototype.getCanvasPattern,ps=Math.abs,fs=new us(!0);function gs(t){ls.call(this,t),this.path=null}gs.prototype={constructor:gs,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var i,n=this.style,a=this.path||fs,r=n.hasStroke(),o=n.hasFill(),s=n.fill,l=n.stroke,h=o&&!!s.colorStops,u=r&&!!l.colorStops,c=o&&!!s.image,d=r&&!!l.image;(n.bind(t,this,e),this.setTransform(t),this.__dirty)&&(h&&(i=i||this.getBoundingRect(),this._fillGradient=n.getGradient(t,s,i)),u&&(i=i||this.getBoundingRect(),this._strokeGradient=n.getGradient(t,l,i)));h?t.fillStyle=this._fillGradient:c&&(t.fillStyle=ds.call(s,t)),u?t.strokeStyle=this._strokeGradient:d&&(t.strokeStyle=ds.call(l,t));var p=n.lineDash,f=n.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();a.setScale(m[0],m[1]),this.__dirtyPath||p&&!g&&r?(a.beginPath(t),p&&!g&&(a.setLineDash(p),a.setLineDashOffset(f)),this.buildPath(a,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),o&&a.fill(t),p&&g&&(t.setLineDash(p),t.lineDashOffset=f),r&&a.stroke(t),p&&g&&t.setLineDash([]),this.restoreTransform(t),null!=n.text&&this.drawRectText(t,this.getBoundingRect())},buildPath:function(t,e,i){},createPathProxy:function(){this.path=new us},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new us),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var a=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){a.copy(t);var r=e.lineWidth,o=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(r=Math.max(r,this.strokeContainThreshold||4)),o>1e-10&&(a.width+=r/o,a.height+=r/o,a.x-=r/o/2,a.y-=r/o/2)}return a}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),a=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var r=this.path.data;if(a.hasStroke()){var o=a.lineWidth,s=a.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(a.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),cs.containStroke(r,o/s,t,e)))return!0}if(a.hasFill())return cs.contain(r,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):ls.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(hs.isObject(t))for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&ps(t[0]-1)>1e-10&&ps(t[3]-1)>1e-10?Math.sqrt(ps(t[0]*t[3]-t[2]*t[1])):1}},gs.extend=function(t){var e=function(e){gs.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var a in i)!n.hasOwnProperty(a)&&i.hasOwnProperty(a)&&(n[a]=i[a])}t.init&&t.init.call(this,e)};for(var i in hs.inherits(e,gs),t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},hs.inherits(gs,ls);var ms=gs,vs=Oo,ys=U.applyTransform,xs=vs.CMD,_s=[[],[],[]],bs=Math.sqrt,ws=Math.atan2;var Ss=function(t,e){var i,n,a,r,o,s=t.data,l=xs.M,h=xs.C,u=xs.L,c=xs.R,d=xs.A,p=xs.Q;for(a=0,r=0;a<s.length;){switch(i=s[a++],r=a,n=0,i){case l:case u:n=1;break;case h:n=3;break;case p:n=2;break;case d:var f=e[4],g=e[5],m=bs(e[0]*e[0]+e[1]*e[1]),v=bs(e[2]*e[2]+e[3]*e[3]),y=ws(-e[1]/v,e[0]/m);s[a]*=m,s[a++]+=f,s[a]*=v,s[a++]+=g,s[a++]*=m,s[a++]*=v,s[a++]+=y,s[a++]+=y,r=a+=2;break;case c:x[0]=s[a++],x[1]=s[a++],ys(x,x,e),s[r++]=x[0],s[r++]=x[1],x[0]+=s[a++],x[1]+=s[a++],ys(x,x,e),s[r++]=x[0],s[r++]=x[1]}for(o=0;o<n;o++){var x;(x=_s[o])[0]=s[a++],x[1]=s[a++],ys(x,x,e),s[r++]=x[0],s[r++]=x[1]}}},Ms=ms,Is=Oo,As=Ss,Ts=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"],Cs=Math.sqrt,Ls=Math.sin,Ds=Math.cos,Ps=Math.PI,ks=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},Os=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(ks(t)*ks(e))},zs=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Os(t,e))};function Es(t,e,i,n,a,r,o,s,l,h,u){var c=l*(Ps/180),d=Ds(c)*(t-i)/2+Ls(c)*(e-n)/2,p=-1*Ls(c)*(t-i)/2+Ds(c)*(e-n)/2,f=d*d/(o*o)+p*p/(s*s);f>1&&(o*=Cs(f),s*=Cs(f));var g=(a===r?-1:1)*Cs((o*o*(s*s)-o*o*(p*p)-s*s*(d*d))/(o*o*(p*p)+s*s*(d*d)))||0,m=g*o*p/s,v=g*-s*d/o,y=(t+i)/2+Ds(c)*m-Ls(c)*v,x=(e+n)/2+Ls(c)*m+Ds(c)*v,_=zs([1,0],[(d-m)/o,(p-v)/s]),b=[(d-m)/o,(p-v)/s],w=[(-1*d-m)/o,(-1*p-v)/s],S=zs(b,w);Os(b,w)<=-1&&(S=Ps),Os(b,w)>=1&&(S=0),0===r&&S>0&&(S-=2*Ps),1===r&&S<0&&(S+=2*Ps),u.addData(h,y,x,o,s,_,S,c,r)}function Rs(t,e){var i=function(t){if(!t)return[];var e,i=t.replace(/-/g," -").replace(/ /g," ").replace(/ /g,",").replace(/,,/g,",");for(e=0;e<Ts.length;e++)i=i.replace(new RegExp(Ts[e],"g"),"|"+Ts[e]);var n,a=i.split("|"),r=0,o=0,s=new Is,l=Is.CMD;for(e=1;e<a.length;e++){var h,u=a[e],c=u.charAt(0),d=0,p=u.slice(1).replace(/e,-/g,"e-").split(",");p.length>0&&""===p[0]&&p.shift();for(var f=0;f<p.length;f++)p[f]=parseFloat(p[f]);for(;d<p.length&&!isNaN(p[d])&&!isNaN(p[0]);){var g,m,v,y,x,_,b,w=r,S=o;switch(c){case"l":r+=p[d++],o+=p[d++],h=l.L,s.addData(h,r,o);break;case"L":r=p[d++],o=p[d++],h=l.L,s.addData(h,r,o);break;case"m":r+=p[d++],o+=p[d++],h=l.M,s.addData(h,r,o),c="l";break;case"M":r=p[d++],o=p[d++],h=l.M,s.addData(h,r,o),c="L";break;case"h":r+=p[d++],h=l.L,s.addData(h,r,o);break;case"H":r=p[d++],h=l.L,s.addData(h,r,o);break;case"v":o+=p[d++],h=l.L,s.addData(h,r,o);break;case"V":o=p[d++],h=l.L,s.addData(h,r,o);break;case"C":h=l.C,s.addData(h,p[d++],p[d++],p[d++],p[d++],p[d++],p[d++]),r=p[d-2],o=p[d-1];break;case"c":h=l.C,s.addData(h,p[d++]+r,p[d++]+o,p[d++]+r,p[d++]+o,p[d++]+r,p[d++]+o),r+=p[d-2],o+=p[d-1];break;case"S":g=r,m=o;var M=s.len(),I=s.data;n===l.C&&(g+=r-I[M-4],m+=o-I[M-3]),h=l.C,w=p[d++],S=p[d++],r=p[d++],o=p[d++],s.addData(h,g,m,w,S,r,o);break;case"s":g=r,m=o,M=s.len(),I=s.data,n===l.C&&(g+=r-I[M-4],m+=o-I[M-3]),h=l.C,w=r+p[d++],S=o+p[d++],r+=p[d++],o+=p[d++],s.addData(h,g,m,w,S,r,o);break;case"Q":w=p[d++],S=p[d++],r=p[d++],o=p[d++],h=l.Q,s.addData(h,w,S,r,o);break;case"q":w=p[d++]+r,S=p[d++]+o,r+=p[d++],o+=p[d++],h=l.Q,s.addData(h,w,S,r,o);break;case"T":g=r,m=o,M=s.len(),I=s.data,n===l.Q&&(g+=r-I[M-4],m+=o-I[M-3]),r=p[d++],o=p[d++],h=l.Q,s.addData(h,g,m,r,o);break;case"t":g=r,m=o,M=s.len(),I=s.data,n===l.Q&&(g+=r-I[M-4],m+=o-I[M-3]),r+=p[d++],o+=p[d++],h=l.Q,s.addData(h,g,m,r,o);break;case"A":v=p[d++],y=p[d++],x=p[d++],_=p[d++],b=p[d++],Es(w=r,S=o,r=p[d++],o=p[d++],_,b,v,y,x,h=l.A,s);break;case"a":v=p[d++],y=p[d++],x=p[d++],_=p[d++],b=p[d++],Es(w=r,S=o,r+=p[d++],o+=p[d++],_,b,v,y,x,h=l.A,s)}}"z"!==c&&"Z"!==c||(h=l.Z,s.addData(h)),n=h}return s.toStatic(),s}(t);return(e=e||{}).buildPath=function(t){if(t.setData){t.setData(i.data),(e=t.getContext())&&t.rebuildPath(e)}else{var e=t;i.rebuildPath(e)}},e.applyTransform=function(t){As(i,t),this.dirty(!0)},e}Br.createFromString=function(t,e){return new Ms(Rs(t,e))},Br.extendFromString=function(t,e){return Ms.extend(Rs(t,e))},Br.mergePath=function(t,e){for(var i=[],n=t.length,a=0;a<n;a++){var r=t[a];r.path||r.createPathProxy(),r.__dirtyPath&&r.buildPath(r.path,r.shape,!0),i.push(r.path)}var o=new Ms(e);return o.createPathProxy(),o.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},o};var Ns=jn,Vs=b,Bs=Ni,Gs=Ri,Ws=function(t){Ns.call(this,t)};Ws.prototype={constructor:Ws,type:"text",brush:function(t,e){var i=this.style;this.__dirty&&Gs.normalizeTextStyle(i,!0),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var n=i.text;null!=n&&(n+=""),i.bind(t,this,e),Gs.needDrawText(n,i)&&(this.setTransform(t),Gs.renderText(this,t,n,i),this.restoreTransform(t))},getBoundingRect:function(){var t=this.style;if(this.__dirty&&Gs.normalizeTextStyle(t,!0),!this._rect){t.text;var e=Bs.getBoundingRect(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.rich);if(e.x+=t.x||0,e.y+=t.y||0,Gs.getStroke(t.textStroke,t.textStrokeWidth)){var i=t.textStrokeWidth;e.x-=i/2,e.y-=i/2,e.width+=i,e.height+=i}this._rect=e}return this._rect}},Vs.inherits(Ws,Ns);var Hs=Ws,Fs=ms.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,i){i&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}}),Zs=_,Us=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];var js=function(t){return Zs.browser.ie&&Zs.browser.version>=11?function(){var e,i=this.__clipPaths,n=this.style;if(i)for(var a=0;a<i.length;a++){var r=i[a],o=r&&r.shape,s=r&&r.type;if(o&&("sector"===s&&o.startAngle===o.endAngle||"rect"===s&&(!o.width||!o.height))){for(var l=0;l<Us.length;l++)Us[l][2]=n[Us[l][0]],n[Us[l][0]]=Us[l][1];e=!0;break}}if(t.apply(this,arguments),e)for(l=0;l<Us.length;l++)n[Us[l][0]]=Us[l][2]}:t},qs=ms,Xs=js,Ys=qs.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:Xs(qs.prototype.brush),buildPath:function(t,e){var i=e.cx,n=e.cy,a=Math.max(e.r0||0,0),r=Math.max(e.r,0),o=e.startAngle,s=e.endAngle,l=e.clockwise,h=Math.cos(o),u=Math.sin(o);t.moveTo(h*a+i,u*a+n),t.lineTo(h*r+i,u*r+n),t.arc(i,n,r,o,s,!l),t.lineTo(Math.cos(s)*a+i,Math.sin(s)*a+n),0!==a&&t.arc(i,n,a,s,o,l),t.closePath()}}),$s=ms.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var i=e.cx,n=e.cy,a=2*Math.PI;t.moveTo(i+e.r,n),t.arc(i,n,e.r,0,a,!1),t.moveTo(i+e.r0,n),t.arc(i,n,e.r0,0,a,!0)}}),Ks={},Js=U.distance;function Qs(t,e,i,n,a,r,o){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*o+(-3*(e-i)-2*s-l)*r+s*a+e}var tl=function(t,e){for(var i=t.length,n=[],a=0,r=1;r<i;r++)a+=Js(t[r-1],t[r]);var o=a/2;for(o=o<i?i:o,r=0;r<o;r++){var s,l,h,u=r/(o-1)*(e?i:i-1),c=Math.floor(u),d=u-c,p=t[c%i];e?(s=t[(c-1+i)%i],l=t[(c+1)%i],h=t[(c+2)%i]):(s=t[0===c?c:c-1],l=t[c>i-2?i-1:c+1],h=t[c>i-3?i-1:c+2]);var f=d*d,g=d*f;n.push([Qs(s[0],p[0],l[0],h[0],d,f,g),Qs(s[1],p[1],l[1],h[1],d,f,g)])}return n},el=U,il=el.min,nl=el.max,al=el.scale,rl=el.distance,ol=el.add,sl=el.clone,ll=el.sub;var hl=function(t,e,i,n){var a,r,o,s,l=[],h=[],u=[],c=[];if(n){o=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,p=t.length;d<p;d++)il(o,o,t[d]),nl(s,s,t[d]);il(o,o,n[0]),nl(s,s,n[1])}for(d=0,p=t.length;d<p;d++){var f=t[d];if(i)a=t[d?d-1:p-1],r=t[(d+1)%p];else{if(0===d||d===p-1){l.push(sl(t[d]));continue}a=t[d-1],r=t[d+1]}ll(h,r,a),al(h,h,e);var g=rl(f,a),m=rl(f,r),v=g+m;0!==v&&(g/=v,m/=v),al(u,h,-g),al(c,h,m);var y=ol([],f,u),x=ol([],f,c);n&&(nl(y,y,o),il(y,y,s),nl(x,x,o),il(x,x,s)),l.push(y),l.push(x)}return i&&l.push(l.shift()),l},ul=tl,cl=hl;Ks.buildPath=function(t,e,i){var n=e.points,a=e.smooth;if(n&&n.length>=2){if(a&&"spline"!==a){var r=cl(n,a,i,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(i?o:o-1);s++){var l=r[2*s],h=r[2*s+1],u=n[(s+1)%o];t.bezierCurveTo(l[0],l[1],h[0],h[1],u[0],u[1])}}else{"spline"===a&&(n=ul(n,i)),t.moveTo(n[0][0],n[0][1]);s=1;for(var c=n.length;s<c;s++)t.lineTo(n[s][0],n[s][1])}i&&t.closePath()}};var dl=Ks,pl=ms.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){dl.buildPath(t,e,!0)}}),fl=Ks,gl=ms.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){fl.buildPath(t,e,!1)}}),ml=dn,vl=ms.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,a=e.width,r=e.height;e.r?ml.buildPath(t,e):t.rect(i,n,a,r),t.closePath()}}),yl=ms.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=e.x1,n=e.y1,a=e.x2,r=e.y2,o=e.percent;0!==o&&(t.moveTo(i,n),o<1&&(a=i*(1-o)+a*o,r=n*(1-o)+r*o),t.lineTo(a,r))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),xl=ms,_l=U,bl=Gr,wl=bl.quadraticSubdivide,Sl=bl.cubicSubdivide,Ml=bl.quadraticAt,Il=bl.cubicAt,Al=bl.quadraticDerivativeAt,Tl=bl.cubicDerivativeAt,Cl=[];function Ll(t,e,i){var n=t.cpx2,a=t.cpy2;return null===n||null===a?[(i?Tl:Il)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?Tl:Il)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?Al:Ml)(t.x1,t.cpx1,t.x2,e),(i?Al:Ml)(t.y1,t.cpy1,t.y2,e)]}var Dl=xl.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,r=e.y2,o=e.cpx1,s=e.cpy1,l=e.cpx2,h=e.cpy2,u=e.percent;0!==u&&(t.moveTo(i,n),null==l||null==h?(u<1&&(wl(i,o,a,u,Cl),o=Cl[1],a=Cl[2],wl(n,s,r,u,Cl),s=Cl[1],r=Cl[2]),t.quadraticCurveTo(o,s,a,r)):(u<1&&(Sl(i,o,l,a,u,Cl),o=Cl[1],l=Cl[2],a=Cl[3],Sl(n,s,h,r,u,Cl),s=Cl[1],h=Cl[2],r=Cl[3]),t.bezierCurveTo(o,s,l,h,a,r)))},pointAt:function(t){return Ll(this.shape,t,!1)},tangentAt:function(t){var e=Ll(this.shape,t,!0);return _l.normalize(e,e)}}),Pl=ms.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),r=e.startAngle,o=e.endAngle,s=e.clockwise,l=Math.cos(r),h=Math.sin(r);t.moveTo(l*a+i,h*a+n),t.arc(i,n,a,r,o,!s)}}),kl=ms,Ol=kl.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i<e.length;i++)t=t||e[i].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(e[0],e[1])},buildPath:function(t,e){for(var i=e.paths||[],n=0;n<i.length;n++)i[n].buildPath(t,i[n].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),kl.prototype.getBoundingRect.call(this)}}),zl=Ol,El=function(t){this.colorStops=t||[]};El.prototype={constructor:El,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var Rl=El,Nl=b,Vl=Rl,Bl=function(t,e,i,n,a,r){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==i?1:i,this.y2=null==n?0:n,this.type="linear",this.global=r||!1,Vl.call(this,a)};Bl.prototype={constructor:Bl},Nl.inherits(Bl,Vl);var Gl=Bl,Wl=b,Hl=Rl,Fl=function(t,e,i,n,a){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==i?.5:i,this.type="radial",this.global=a||!1,Hl.call(this,n)};Fl.prototype={constructor:Fl},Wl.inherits(Fl,Hl);var Zl=Fl,Ul=b,jl=Br,ql=Pt,Xl=mt,Yl=U,$l=ms,Kl=At,Jl=Jn;Vr.Image=Jl;var Ql=ni;Vr.Group=Ql;var th=Hs;Vr.Text=th;var eh=Fs;Vr.Circle=eh;var ih=Ys;Vr.Sector=ih;var nh=$s;Vr.Ring=nh;var ah=pl;Vr.Polygon=ah;var rh=gl;Vr.Polyline=rh;var oh=vl;Vr.Rect=oh;var sh=yl;Vr.Line=sh;var lh=Dl;Vr.BezierCurve=lh;var hh=Pl;Vr.Arc=hh;var uh=zl;Vr.CompoundPath=uh;var ch=Gl;Vr.LinearGradient=ch;var dh=Zl;Vr.RadialGradient=dh;var ph=Je;Vr.BoundingRect=ph;var fh=Math.round,gh=Math.max,mh=Math.min,vh={};function yh(t,e,i,n){var a=jl.createFromString(t,e),r=a.getBoundingRect();return i&&("center"===n&&(i=xh(i,r)),bh(a,i)),a}function xh(t,e){var i,n=e.width/e.height,a=t.height*n;return i=a<=t.width?t.height:(a=t.width)/n,{x:t.x+t.width/2-a/2,y:t.y+t.height/2-i/2,width:a,height:i}}var _h=jl.mergePath;function bh(t,e){if(t.applyTransform){var i=t.getBoundingRect().calculateTransform(e);t.applyTransform(i)}}function wh(t,e,i){var n=fh(2*t);return(n+fh(e))%2==0?n/2:(n+(i?1:-1))/2}function Sh(t){return null!=t&&"none"!=t}function Mh(t){return"string"==typeof t?ql.lift(t,-.1):t}function Ih(t){if(t.__hoverStlDirty){var e=t.style.stroke,i=t.style.fill,n=t.__hoverStl;n.fill=n.fill||(Sh(i)?Mh(i):null),n.stroke=n.stroke||(Sh(e)?Mh(e):null);var a={};for(var r in n)null!=n[r]&&(a[r]=t.style[r]);t.__normalStl=a,t.__hoverStlDirty=!1}}function Ah(t){if(!t.__isHover){if(Ih(t),t.useHoverLayer)t.__zr&&t.__zr.addHover(t,t.__hoverStl);else{var e=t.style,i=e.insideRollbackOpt;i&&function(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth)}(e),e.extendFrom(t.__hoverStl),i&&(Bh(e,e.insideOriginalTextPosition,i),null==e.textFill&&(e.textFill=i.autoColor)),t.dirty(!1),t.z2+=1}t.__isHover=!0}}function Th(t){if(t.__isHover){var e=t.__normalStl;t.useHoverLayer?t.__zr&&t.__zr.removeHover(t):(e&&t.setStyle(e),t.z2-=1),t.__isHover=!1}}function Ch(t){"group"===t.type?t.traverse((function(t){"group"!==t.type&&Ah(t)})):Ah(t)}function Lh(t){"group"===t.type?t.traverse((function(t){"group"!==t.type&&Th(t)})):Th(t)}function Dh(t,e){t.__hoverStl=t.hoverStyle||e||{},t.__hoverStlDirty=!0,t.__isHover&&Ih(t)}function Ph(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasis&&Ch(this)}function kh(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasis&&Lh(this)}function Oh(){this.__isEmphasis=!0,Ch(this)}function zh(){this.__isEmphasis=!1,Lh(this)}function Eh(t,e,i,n,a){return Rh(t,e,n,a),i&&Ul.extend(t,i),t.host&&t.host.dirty&&t.host.dirty(!1),t}function Rh(t,e,i,n){if((i=i||vh).isRectText){var a=e.getShallow("position")||(n?null:"inside");"outside"===a&&(a="top"),t.textPosition=a,t.textOffset=e.getShallow("offset");var r=e.getShallow("rotate");null!=r&&(r*=Math.PI/180),t.textRotation=r,t.textDistance=Ul.retrieve2(e.getShallow("distance"),n?null:5)}var o,s=e.ecModel,l=s&&s.option.textStyle,h=function(t){var e;for(;t&&t!==t.ecModel;){var i=(t.option||vh).rich;if(i)for(var n in e=e||{},i)i.hasOwnProperty(n)&&(e[n]=1);t=t.parentModel}return e}(e);if(h)for(var u in o={},h)if(h.hasOwnProperty(u)){var c=e.getModel(["rich",u]);Nh(o[u]={},c,l,i,n)}return t.rich=o,Nh(t,e,l,i,n,!0),i.forceRich&&!i.textStyle&&(i.textStyle={}),t}function Nh(t,e,i,n,a,r){if(i=!a&&i||vh,t.textFill=Vh(e.getShallow("color"),n)||i.color,t.textStroke=Vh(e.getShallow("textBorderColor"),n)||i.textBorderColor,t.textStrokeWidth=Ul.retrieve2(e.getShallow("textBorderWidth"),i.textBorderWidth),!a){if(r){var o=t.textPosition;t.insideRollback=Bh(t,o,n),t.insideOriginalTextPosition=o,t.insideRollbackOpt=n}null==t.textFill&&(t.textFill=n.autoColor)}t.fontStyle=e.getShallow("fontStyle")||i.fontStyle,t.fontWeight=e.getShallow("fontWeight")||i.fontWeight,t.fontSize=e.getShallow("fontSize")||i.fontSize,t.fontFamily=e.getShallow("fontFamily")||i.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),r&&n.disableBox||(t.textBackgroundColor=Vh(e.getShallow("backgroundColor"),n),t.textPadding=e.getShallow("padding"),t.textBorderColor=Vh(e.getShallow("borderColor"),n),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||i.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||i.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||i.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||i.textShadowOffsetY}function Vh(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function Bh(t,e,i){var n,a=i.useInsideStyle;return null==t.textFill&&!1!==a&&(!0===a||i.isRectText&&e&&"string"==typeof e&&e.indexOf("inside")>=0)&&(n={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth},t.textFill="#fff",null==t.textStroke&&(t.textStroke=i.autoColor,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),n}function Gh(t,e,i,n,a,r){if("function"==typeof a&&(r=a,a=null),n&&n.isAnimationEnabled()){var o=t?"Update":"",s=n.getShallow("animationDuration"+o),l=n.getShallow("animationEasing"+o),h=n.getShallow("animationDelay"+o);"function"==typeof h&&(h=h(a,n.getAnimationDelayParams?n.getAnimationDelayParams(e,a):null)),"function"==typeof s&&(s=s(a)),s>0?e.animateTo(i,s,h||0,l,r,!!r):(e.stopAnimation(),e.attr(i),r&&r())}else e.stopAnimation(),e.attr(i),r&&r()}function Wh(t,e,i,n,a){Gh(!0,t,e,i,n,a)}function Hh(t,e,i){return e&&!Ul.isArrayLike(e)&&(e=Kl.getLocalTransform(e)),i&&(e=Xl.invert([],e)),Yl.applyTransform([],t,e)}Vr.extendShape=function(t){return $l.extend(t)},Vr.extendPath=function(t,e){return jl.extendFromString(t,e)},Vr.makePath=yh,Vr.makeImage=function(t,e,i){var n=new Jl({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===i){var a={width:t.width,height:t.height};n.setStyle(xh(e,a))}}});return n},Vr.mergePath=_h,Vr.resizePath=bh,Vr.subPixelOptimizeLine=function(t){var e=t.shape,i=t.style.lineWidth;return fh(2*e.x1)===fh(2*e.x2)&&(e.x1=e.x2=wh(e.x1,i,!0)),fh(2*e.y1)===fh(2*e.y2)&&(e.y1=e.y2=wh(e.y1,i,!0)),t},Vr.subPixelOptimizeRect=function(t){var e=t.shape,i=t.style.lineWidth,n=e.x,a=e.y,r=e.width,o=e.height;return e.x=wh(e.x,i,!0),e.y=wh(e.y,i,!0),e.width=Math.max(wh(n+r,i,!1)-e.x,0===r?0:1),e.height=Math.max(wh(a+o,i,!1)-e.y,0===o?0:1),t},Vr.subPixelOptimize=wh,Vr.setHoverStyle=function(t,e,i){t.__hoverSilentOnTouch=i&&i.hoverSilentOnTouch,"group"===t.type?t.traverse((function(t){"group"!==t.type&&Dh(t,e)})):Dh(t,e),t.on("mouseover",Ph).on("mouseout",kh),t.on("emphasis",Oh).on("normal",zh)},Vr.setLabelStyle=function(t,e,i,n,a,r,o){var s=(a=a||vh).labelFetcher,l=a.labelDataIndex,h=a.labelDimIndex,u=i.getShallow("show"),c=n.getShallow("show"),d=u||c?Ul.retrieve2(s?s.getFormattedLabel(l,"normal",null,h):null,a.defaultText):null,p=u?d:null,f=c?Ul.retrieve2(s?s.getFormattedLabel(l,"emphasis",null,h):null,d):null;null==p&&null==f||(Eh(t,i,r,a),Eh(e,n,o,a,!0)),t.text=p,e.text=f},Vr.setTextStyle=Eh,Vr.setText=function(t,e,i){var n,a={isRectText:!0};!1===i?n=!0:a.autoColor=i,Rh(t,e,a,n),t.host&&t.host.dirty&&t.host.dirty(!1)},Vr.getFont=function(t,e){var i=e||e.getModel("textStyle");return[t.fontStyle||i&&i.getShallow("fontStyle")||"",t.fontWeight||i&&i.getShallow("fontWeight")||"",(t.fontSize||i&&i.getShallow("fontSize")||12)+"px",t.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" ")},Vr.updateProps=Wh,Vr.initProps=function(t,e,i,n,a){Gh(!1,t,e,i,n,a)},Vr.getTransform=function(t,e){for(var i=Xl.identity([]);t&&t!==e;)Xl.mul(i,t.getLocalTransform(),i),t=t.parent;return i},Vr.applyTransform=Hh,Vr.transformDirection=function(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),a=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),r=["left"===t?-n:"right"===t?n:0,"top"===t?-a:"bottom"===t?a:0];return r=Hh(r,e,i),Math.abs(r[0])>Math.abs(r[1])?r[0]>0?"right":"left":r[1]>0?"bottom":"top"},Vr.groupTransition=function(t,e,i,n){if(t&&e){var a,r=(a={},t.traverse((function(t){!t.isGroup&&t.anid&&(a[t.anid]=t)})),a);e.traverse((function(t){if(!t.isGroup&&t.anid){var e=r[t.anid];if(e){var n=o(t);t.attr(o(e)),Wh(t,n,i,t.dataIndex)}}}))}function o(t){var e={position:Yl.clone(t.position),rotation:t.rotation};return t.shape&&(e.shape=Ul.extend({},t.shape)),e}},Vr.clipPointsByRect=function(t,e){return Ul.map(t,(function(t){var i=t[0];i=gh(i,e.x),i=mh(i,e.x+e.width);var n=t[1];return n=gh(n,e.y),[i,n=mh(n,e.y+e.height)]}))},Vr.clipRectByRect=function(t,e){var i=gh(t.x,e.x),n=mh(t.x+t.width,e.x+e.width),a=gh(t.y,e.y),r=mh(t.y+t.height,e.y+e.height);if(n>=i&&r>=a)return{x:i,y:a,width:n-i,height:r-a}},Vr.createIcon=function(t,e,i){var n=(e=Ul.extend({rectHover:!0},e)).style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(n.image=t.slice(8),Ul.defaults(n,i),new Jl(e)):yh(t.replace("path://",""),e,i,"center")};var Fh=Ni,Zh=Vr,Uh=["textStyle","color"],jh={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(Uh):null)},getFont:function(){return Zh.getFont({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return Fh.getBoundingRect(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("rich"),this.getShallow("truncateText"))}},qh=Or([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),Xh=b,Yh=_,$h=Ar,Kh=Er,Jh=Nr,Qh=jh,tu={getItemStyle:function(t,e){var i=qh(this,t,e),n=this.getBorderLineDash();return n&&(i.lineDash=n),i},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},eu=Xh.mixin;function iu(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function nu(t,e,i){for(var n=0;n<e.length&&(!e[n]||null!=(t=t&&"object"==typeof t?t[e[n]]:null));n++);return null==t&&i&&(t=i.get(e)),t}function au(t,e){var i=$h.get(t,"getParent");return i?i.call(t,e):t.parentModel}iu.prototype={constructor:iu,init:null,mergeOption:function(t){Xh.merge(this.option,t,!0)},get:function(t,e){return null==t?this.option:nu(this.option,this.parsePath(t),!e&&au(this,t))},getShallow:function(t,e){var i=this.option,n=null==i?i:i[t],a=!e&&au(this,t);return null==n&&a&&(n=a.getShallow(t)),n},getModel:function(t,e){var i;return new iu(null==t?this.option:nu(this.option,t=this.parsePath(t)),e=e||(i=au(this,t))&&i.getModel(t),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new(0,this.constructor)(Xh.clone(this.option))},setReadOnly:function(t){$h.setReadOnly(this,t)},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){$h.set(this,"getParent",t)},isAnimationEnabled:function(){if(!Yh.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},$h.enableClassExtend(iu),eu(iu,Kh),eu(iu,Jh),eu(iu,Qh),eu(iu,tu);var ru=iu,ou=b,su=cr,lu=dr,hu=ru,uu=ou.each,cu=ou.isObject;function du(t){return t instanceof Array?t:null==t?[]:[t]}var pu={getDataParams:function(t,e){var i=this.getData(e),n=this.getRawValue(t,e),a=i.getRawIndex(t),r=i.getName(t,!0),o=i.getRawDataItem(t),s=i.getItemVisual(t,"color");return{componentType:this.mainType,componentSubType:this.subType,seriesType:"series"===this.mainType?this.subType:null,seriesIndex:this.seriesIndex,seriesId:this.id,seriesName:this.name,name:r,dataIndex:a,data:o,dataType:e,value:n,color:s,marker:su.getTooltipMarker(s),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,i,n,a){e=e||"normal";var r=this.getData(i).getItemModel(t),o=this.getDataParams(t,i);null!=n&&o.value instanceof Array&&(o.value=o.value[n]);var s=r.get([a||"label",e,"formatter"]);return"function"==typeof s?(o.status=e,s(o)):"string"==typeof s?su.formatTpl(s,o):void 0},getRawValue:function(t,e){var i=this.getData(e).getRawDataItem(t);if(null!=i)return!cu(i)||i instanceof Array?i:i.value},formatTooltip:ou.noop};function fu(t){return cu(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}var gu,mu=(gu=0,function(){var t="\0__ec_prop_getter_"+gu++;return function(e){return e[t]||(e[t]={})}});function vu(t,e){return t&&t.hasOwnProperty(e)}ur.normalizeToArray=du,ur.defaultEmphasis=function(t,e){if(t)for(var i=t.emphasis=t.emphasis||{},n=t.normal=t.normal||{},a=0,r=e.length;a<r;a++){var o=e[a];!i.hasOwnProperty(o)&&n.hasOwnProperty(o)&&(i[o]=n[o])}},ur.TEXT_STYLE_OPTIONS=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"],ur.getDataItemValue=function(t){return t&&(null==t.value?t:t.value)},ur.isDataItemOption=function(t){return cu(t)&&!(t instanceof Array)},ur.converDataValue=function(t,e){var i=e&&e.type;return"ordinal"===i?t:("time"===i&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+lu.parseDate(t)),null==t||""===t?NaN:+t)},ur.createDataFormatModel=function(t,e){var i=new hu;return ou.mixin(i,pu),i.seriesIndex=e.seriesIndex,i.name=e.name||"",i.mainType=e.mainType,i.subType=e.subType,i.getData=function(){return t},i},ur.dataFormatMixin=pu,ur.mappingToExists=function(t,e){e=(e||[]).slice();var i=ou.map(t||[],(function(t,e){return{exist:t}}));return uu(e,(function(t,n){if(cu(t)){for(var a=0;a<i.length;a++)if(!i[a].option&&null!=t.id&&i[a].exist.id===t.id+"")return i[a].option=t,void(e[n]=null);for(a=0;a<i.length;a++){var r=i[a].exist;if(!(i[a].option||null!=r.id&&null!=t.id||null==t.name||fu(t)||fu(r)||r.name!==t.name+""))return i[a].option=t,void(e[n]=null)}}})),uu(e,(function(t,e){if(cu(t)){for(var n=0;n<i.length;n++){var a=i[n].exist;if(!i[n].option&&!fu(a)&&null==t.id){i[n].option=t;break}}n>=i.length&&i.push({option:t})}})),i},ur.makeIdAndName=function(t){var e=ou.createHashMap();uu(t,(function(t,i){var n=t.exist;n&&e.set(n.id,t)})),uu(t,(function(t,i){var n=t.option;ou.assert(!n||null==n.id||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&e.set(n.id,t),!t.keyInfo&&(t.keyInfo={})})),uu(t,(function(t,i){var n=t.exist,a=t.option,r=t.keyInfo;if(cu(a)){if(r.name=null!=a.name?a.name+"":n?n.name:"\0-",n)r.id=n.id;else if(null!=a.id)r.id=a.id+"";else{var o=0;do{r.id="\0"+r.name+"\0"+o++}while(e.get(r.id))}e.set(r.id,t)}}))},ur.isIdInner=fu,ur.compressBatches=function(t,e){var i={},n={};return a(t||[],i),a(e||[],n,i),[r(i),r(n)];function a(t,e,i){for(var n=0,a=t.length;n<a;n++)for(var r=t[n].seriesId,o=du(t[n].dataIndex),s=i&&i[r],l=0,h=o.length;l<h;l++){var u=o[l];s&&s[u]?s[u]=null:(e[r]||(e[r]={}))[u]=1}}function r(t,e){var i=[];for(var n in t)if(t.hasOwnProperty(n)&&null!=t[n])if(e)i.push(+n);else{var a=r(t[n],!0);a.length&&i.push({seriesId:n,dataIndex:a})}return i}},ur.queryDataIndex=function(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?ou.isArray(e.dataIndex)?ou.map(e.dataIndex,(function(e){return t.indexOfRawIndex(e)})):t.indexOfRawIndex(e.dataIndex):null!=e.name?ou.isArray(e.name)?ou.map(e.name,(function(e){return t.indexOfName(e)})):t.indexOfName(e.name):void 0},ur.makeGetter=mu,ur.parseFinder=function(t,e,i){if(ou.isString(e)){var n={};n[e+"Index"]=0,e=n}var a=i&&i.defaultMainType;!a||vu(e,a+"Index")||vu(e,a+"Id")||vu(e,a+"Name")||(e[a+"Index"]=0);var r={};return uu(e,(function(n,a){n=e[a];if("dataIndex"!==a&&"dataIndexInside"!==a){var o=a.match(/^(\w+)(Index|Id|Name)$/)||[],s=o[1],l=(o[2]||"").toLowerCase();if(!(!s||!l||null==n||"index"===l&&"none"===n||i&&i.includeMainTypes&&ou.indexOf(i.includeMainTypes,s)<0)){var h={mainType:s};"index"===l&&"all"===n||(h[l]=n);var u=t.queryComponents(h);r[s+"Models"]=u,r[s+"Model"]=u[0]}}else r[a]=n})),r},ur.dataDimToCoordDim=function(t,e){var i=t.dimensions;e=t.getDimension(e);for(var n=0;n<i.length;n++){var a=t.getDimensionInfo(i[n]);if(a.name===e)return a.coordDim}},ur.coordDimToDataDim=function(t,e){var i=[];return uu(t.dimensions,(function(n){var a=t.getDimensionInfo(n);a.coordDim===e&&(i[a.coordDimIndex]=a.name)})),i},ur.otherDimToDataDim=function(t,e){var i=[];return uu(t.dimensions,(function(n){var a=t.getDimensionInfo(n),r=a.otherDims[e];null!=r&&!1!==r&&(i[r]=a.name)})),i};var yu={},xu=b,_u=Ar.parseClassType,bu=0;yu.getUID=function(t){return[t||"",bu++,Math.random()].join("_")},yu.enableSubTypeDefaulter=function(t){var e={};return t.registerSubTypeDefaulter=function(t,i){t=_u(t),e[t.main]=i},t.determineSubType=function(i,n){var a=n.type;if(!a){var r=_u(i).main;t.hasSubTypes(i)&&e[r]&&(a=e[r](n))}return a},t},yu.enableTopologicalTravel=function(t,e){function i(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,n,a,r){if(t.length){var o=function(t){var n={},a=[];return xu.each(t,(function(r){var o=i(n,r),s=function(t,e){var i=[];return xu.each(t,(function(t){xu.indexOf(e,t)>=0&&i.push(t)})),i}(o.originalDeps=e(r),t);o.entryCount=s.length,0===o.entryCount&&a.push(r),xu.each(s,(function(t){xu.indexOf(o.predecessor,t)<0&&o.predecessor.push(t);var e=i(n,t);xu.indexOf(e.successor,t)<0&&e.successor.push(r)}))})),{graph:n,noEntryList:a}}(n),s=o.graph,l=o.noEntryList,h={};for(xu.each(t,(function(t){h[t]=!0}));l.length;){var u=l.pop(),c=s[u],d=!!h[u];d&&(a.call(r,u,c.originalDeps.slice()),delete h[u]),xu.each(c.successor,d?f:p)}xu.each(h,(function(){throw new Error("Circle dependency may exists")}))}function p(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}function f(t){h[t]=!0,p(t)}}};var wu={},Su=b,Mu=Je,Iu=dr.parsePercent,Au=cr,Tu=Su.each,Cu=["left","right","top","bottom","width","height"],Lu=[["width","left","right"],["height","top","bottom"]];function Du(t,e,i,n,a){var r=0,o=0;null==n&&(n=1/0),null==a&&(a=1/0);var s=0;e.eachChild((function(l,h){var u,c,d=l.position,p=l.getBoundingRect(),f=e.childAt(h+1),g=f&&f.getBoundingRect();if("horizontal"===t){var m=p.width+(g?-g.x+p.x:0);(u=r+m)>n||l.newline?(r=0,u=m,o+=s+i,s=p.height):s=Math.max(s,p.height)}else{var v=p.height+(g?-g.y+p.y:0);(c=o+v)>a||l.newline?(r+=s+i,o=0,c=v,s=p.width):s=Math.max(s,p.width)}l.newline||(d[0]=r,d[1]=o,"horizontal"===t?r=u+i:o=c+i)}))}var Pu=Du,ku=Su.curry(Du,"vertical"),Ou=Su.curry(Du,"horizontal");function zu(t,e,i){i=Au.normalizeCssArray(i||0);var n=e.width,a=e.height,r=Iu(t.left,n),o=Iu(t.top,a),s=Iu(t.right,n),l=Iu(t.bottom,a),h=Iu(t.width,n),u=Iu(t.height,a),c=i[2]+i[0],d=i[1]+i[3],p=t.aspect;switch(isNaN(h)&&(h=n-s-d-r),isNaN(u)&&(u=a-l-c-o),null!=p&&(isNaN(h)&&isNaN(u)&&(p>n/a?h=.8*n:u=.8*a),isNaN(h)&&(h=p*u),isNaN(u)&&(u=h/p)),isNaN(r)&&(r=n-s-h-d),isNaN(o)&&(o=a-l-u-c),t.left||t.right){case"center":r=n/2-h/2-i[3];break;case"right":r=n-h-d}switch(t.top||t.bottom){case"middle":case"center":o=a/2-u/2-i[0];break;case"bottom":o=a-u-c}r=r||0,o=o||0,isNaN(h)&&(h=n-d-r-(s||0)),isNaN(u)&&(u=a-c-o-(l||0));var f=new Mu(r+i[3],o+i[0],h,u);return f.margin=i,f}function Eu(t,e){return e&&t&&Tu(Cu,(function(i){e.hasOwnProperty(i)&&(t[i]=e[i])})),t}wu.LOCATION_PARAMS=Cu,wu.HV_NAMES=Lu,wu.box=Pu,wu.vbox=ku,wu.hbox=Ou,wu.getAvailableSize=function(t,e,i){var n=e.width,a=e.height,r=Iu(t.x,n),o=Iu(t.y,a),s=Iu(t.x2,n),l=Iu(t.y2,a);return(isNaN(r)||isNaN(parseFloat(t.x)))&&(r=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=n),(isNaN(o)||isNaN(parseFloat(t.y)))&&(o=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=a),i=Au.normalizeCssArray(i||0),{width:Math.max(s-r-i[1]-i[3],0),height:Math.max(l-o-i[0]-i[2],0)}},wu.getLayoutRect=zu,wu.positionElement=function(t,e,i,n,a){var r=!a||!a.hv||a.hv[0],o=!a||!a.hv||a.hv[1],s=a&&a.boundingMode||"all";if(r||o){var l;if("raw"===s)l="group"===t.type?new Mu(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();(l=l.clone()).applyTransform(h)}e=zu(Su.defaults({width:l.width,height:l.height},e),i,n);var u=t.position,c=r?e.x-l.x:0,d=o?e.y-l.y:0;t.attr("position","raw"===s?[c,d]:[u[0]+c,u[1]+d])}},wu.sizeCalculable=function(t,e){return null!=t[Lu[e][0]]||null!=t[Lu[e][1]]&&null!=t[Lu[e][2]]},wu.mergeLayoutParam=function(t,e,i){!Su.isObject(i)&&(i={});var n=i.ignoreSize;!Su.isArray(n)&&(n=[n,n]);var a=o(Lu[0],0),r=o(Lu[1],1);function o(i,a){var r={},o=0,h={},u=0;if(Tu(i,(function(e){h[e]=t[e]})),Tu(i,(function(t){s(e,t)&&(r[t]=h[t]=e[t]),l(r,t)&&o++,l(h,t)&&u++})),n[a])return l(e,i[1])?h[i[2]]=null:l(e,i[2])&&(h[i[1]]=null),h;if(2!==u&&o){if(o>=2)return r;for(var c=0;c<i.length;c++){var d=i[c];if(!s(r,d)&&s(t,d)){r[d]=t[d];break}}return r}return h}function s(t,e){return t.hasOwnProperty(e)}function l(t,e){return null!=t[e]&&"auto"!==t[e]}function h(t,e,i){Tu(t,(function(t){e[t]=i[t]}))}h(Lu[0],t,a),h(Lu[1],t,r)},wu.getLayoutParams=function(t){return Eu({},t)},wu.copyLayoutParams=Eu;var Ru=b,Nu=ru,Vu=yu,Bu=Ar,Gu=wu,Wu={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")}}},Hu=Array.prototype.push,Fu=Nu.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,i,n){Nu.call(this,t,e,i,n),this.uid=Vu.getUID("componentModel")},init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?Gu.getLayoutParams(t):{},a=e.getTheme();Ru.merge(t,a.get(this.mainType)),Ru.merge(t,this.getDefaultOption()),i&&Gu.mergeLayoutParam(t,n,i)},mergeOption:function(t,e){Ru.merge(this.option,t,!0);var i=this.layoutMode;i&&Gu.mergeLayoutParam(this.option,t,i)},optionUpdated:function(t,e){},getDefaultOption:function(){if(!Bu.hasOwn(this,"__defaultOption")){for(var t=[],e=this.constructor;e;){var i=e.prototype.defaultOption;i&&t.push(i),e=e.superClass}for(var n={},a=t.length-1;a>=0;a--)n=Ru.merge(n,t[a],!0);Bu.set(this,"__defaultOption",n)}return Bu.get(this,"__defaultOption")},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});Bu.enableClassManagement(Fu,{registerWhenExtend:!0}),Vu.enableSubTypeDefaulter(Fu),Vu.enableTopologicalTravel(Fu,(function(t){var e=[];return Ru.each(Fu.getClassesByMainType(t),(function(t){Hu.apply(e,t.prototype.dependencies||[])})),Ru.map(e,(function(t){return Bu.parseClassType(t).main}))})),Ru.mixin(Fu,Wu);var Zu=Fu,Uu="";"undefined"!=typeof navigator&&(Uu=navigator.platform||"");var ju={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],textStyle:{fontFamily:Uu.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},qu=Ar,Xu=qu.set,Yu=qu.get,$u={clearColorPalette:function(){Xu(this,"colorIdx",0),Xu(this,"colorNameMap",{})},getColorFromPalette:function(t,e){var i=Yu(e=e||this,"colorIdx")||0,n=Yu(e,"colorNameMap")||Xu(e,"colorNameMap",{});if(n.hasOwnProperty(t))return n[t];var a=this.get("color",!0)||[];if(a.length){var r=a[i];return t&&(n[t]=r),Xu(e,"colorIdx",(i+1)%a.length),r}}},Ku=b,Ju=ur,Qu=ru,tc=Zu,ec=ju,ic=$u,nc=Ku.each,ac=Ku.filter,rc=Ku.map,oc=Ku.isArray,sc=Ku.indexOf,lc=Ku.isObject,hc=Qu.extend({constructor:hc,init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new Qu(i),this._optionManager=n},setOption:function(t,e){Ku.assert(!("\0_ec_inner"in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):uc.call(this,n),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var a=i.getTimelineOption(this);a&&(this.mergeOption(a),e=!0)}if(!t||"recreate"===t||"media"===t){var r=i.getMediaOption(this,this._api);r.length&&nc(r,(function(t){this.mergeOption(t,e=!0)}),this)}return e},mergeOption:function(t){var e=this.option,i=this._componentsMap,n=[];nc(t,(function(t,i){null!=t&&(tc.hasClass(i)?n.push(i):e[i]=null==e[i]?Ku.clone(t):Ku.merge(e[i],t,!0))})),tc.topologicalTravel(n,tc.getAllClassMainTypes(),(function(n,a){var r=Ju.normalizeToArray(t[n]),o=Ju.mappingToExists(i.get(n),r);Ju.makeIdAndName(o),nc(o,(function(t,e){var i=t.option;lc(i)&&(t.keyInfo.mainType=n,t.keyInfo.subType=function(t,e,i){return e.type?e.type:i?i.subType:tc.determineSubType(t,e)}(n,i,t.exist))}));var s=function(t,e){Ku.isArray(e)||(e=e?[e]:[]);var i={};return nc(e,(function(e){i[e]=(t.get(e)||[]).slice()})),i}(i,a);e[n]=[],i.set(n,[]),nc(o,(function(t,a){var r=t.exist,o=t.option;if(Ku.assert(lc(o)||r,"Empty component definition"),o){var l=tc.getClass(n,t.keyInfo.subType,!0);if(r&&r instanceof l)r.name=t.keyInfo.name,r.mergeOption(o,this),r.optionUpdated(o,!1);else{var h=Ku.extend({dependentModels:s,componentIndex:a},t.keyInfo);r=new l(o,this,this,h),Ku.extend(r,h),r.init(o,this,this,h),r.optionUpdated(null,!0)}}else r.mergeOption({},this),r.optionUpdated({},!1);i.get(n)[a]=r,e[n][a]=r.option}),this),"series"===n&&(this._seriesIndices=cc(i.get("series")))}),this),this._seriesIndices=this._seriesIndices||[]},getOption:function(){var t=Ku.clone(this.option);return nc(t,(function(e,i){if(tc.hasClass(i)){for(var n=(e=Ju.normalizeToArray(e)).length-1;n>=0;n--)Ju.isIdInner(e[n])&&e.splice(n,1);t[i]=e}})),delete t["\0_ec_inner"],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap.get(t);if(i)return i[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i,n=t.index,a=t.id,r=t.name,o=this._componentsMap.get(e);if(!o||!o.length)return[];if(null!=n)oc(n)||(n=[n]),i=ac(rc(n,(function(t){return o[t]})),(function(t){return!!t}));else if(null!=a){var s=oc(a);i=ac(o,(function(t){return s&&sc(a,t.id)>=0||!s&&t.id===a}))}else if(null!=r){var l=oc(r);i=ac(o,(function(t){return l&&sc(r,t.name)>=0||!l&&t.name===r}))}else i=o.slice();return dc(i,t)},findComponents:function(t){var e,i,n,a,r,o=t.query,s=t.mainType,l=(i=s+"Index",n=s+"Id",a=s+"Name",!(e=o)||null==e[i]&&null==e[n]&&null==e[a]?null:{mainType:s,index:e[i],id:e[n],name:e[a]}),h=l?this.queryComponents(l):this._componentsMap.get(s);return r=dc(h,t),t.filter?ac(r,t.filter):r},eachComponent:function(t,e,i){var n=this._componentsMap;if("function"==typeof t)i=e,e=t,n.each((function(t,n){nc(t,(function(t,a){e.call(i,n,t,a)}))}));else if(Ku.isString(t))nc(n.get(t),e,i);else if(lc(t)){var a=this.findComponents(t);nc(a,e,i)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return ac(e,(function(e){return e.name===t}))},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){var e=this._componentsMap.get("series");return ac(e,(function(e){return e.subType===t}))},getSeries:function(){return this._componentsMap.get("series").slice()},eachSeries:function(t,e){nc(this._seriesIndices,(function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)}),this)},eachRawSeries:function(t,e){nc(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,i){nc(this._seriesIndices,(function(n){var a=this._componentsMap.get("series")[n];a.subType===t&&e.call(i,a,n)}),this)},eachRawSeriesByType:function(t,e,i){return nc(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return Ku.indexOf(this._seriesIndices,t.componentIndex)<0},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){var i=ac(this._componentsMap.get("series"),t,e);this._seriesIndices=cc(i)},restoreData:function(){var t=this._componentsMap;this._seriesIndices=cc(t.get("series"));var e=[];t.each((function(t,i){e.push(i)})),tc.topologicalTravel(e,tc.getAllClassMainTypes(),(function(e,i){nc(t.get(e),(function(t){t.restoreData()}))}))}});function uc(t){var e,i;this.option={},this.option["\0_ec_inner"]=1,this._componentsMap=Ku.createHashMap({series:[]}),this._seriesIndices=null,e=t,i=this._theme.option,Ku.each(i,(function(t,i){tc.hasClass(i)||("object"==typeof t?e[i]=e[i]?Ku.merge(e[i],t,!1):Ku.clone(t):null==e[i]&&(e[i]=t))})),Ku.merge(t,ec,!1),this.mergeOption(t)}function cc(t){return rc(t,(function(t){return t.componentIndex}))||[]}function dc(t,e){return e.hasOwnProperty("subType")?ac(t,(function(t){return t.subType===e.subType})):t}Ku.mixin(hc,ic);var pc=hc,fc=b,gc=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];var mc=function(t){fc.each(gc,(function(e){this[e]=fc.bind(t[e],t)}),this)},vc=b,yc={};function xc(){this._coordinateSystems=[]}xc.prototype={constructor:xc,create:function(t,e){var i=[];vc.each(yc,(function(n,a){var r=n.create(t,e);i=i.concat(r||[])})),this._coordinateSystems=i},update:function(t,e){vc.each(this._coordinateSystems,(function(i){i.update&&i.update(t,e)}))},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},xc.register=function(t,e){yc[t]=e},xc.get=function(t){return yc[t]};var _c=xc,bc=b,wc=ur,Sc=Zu,Mc=bc.each,Ic=bc.clone,Ac=bc.map,Tc=bc.merge,Cc=/^(min|max)?(.+)$/;function Lc(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function Dc(t,e,i){var n,a,r=[],o=[],s=t.timeline;if(t.baseOption&&(a=t.baseOption),(s||t.options)&&(a=a||{},r=(t.options||[]).slice()),t.media){a=a||{};var l=t.media;Mc(l,(function(t){t&&t.option&&(t.query?o.push(t):n||(n=t))}))}return a||(a=t),a.timeline||(a.timeline=s),Mc([a].concat(r).concat(bc.map(o,(function(t){return t.option}))),(function(t){Mc(e,(function(e){e(t,i)}))})),{baseOption:a,timelineOptions:r,mediaDefault:n,mediaList:o}}function Pc(t,e,i){var n={width:e,height:i,aspectratio:e/i},a=!0;return bc.each(t,(function(t,e){var i=e.match(Cc);if(i&&i[1]&&i[2]){var r=i[1],o=i[2].toLowerCase();(function(t,e,i){return"min"===i?t>=e:"max"===i?t<=e:t===e})(n[o],t,r)||(a=!1)}})),a}Lc.prototype={constructor:Lc,setOption:function(t,e){t=Ic(t,!0);var i,n,a=this._optionBackup,r=Dc.call(this,t,e,!a);this._newBaseOption=r.baseOption,a?(i=a.baseOption,n=r.baseOption,Mc(n=n||{},(function(t,e){if(null!=t){var n=i[e];if(Sc.hasClass(e)){t=wc.normalizeToArray(t),n=wc.normalizeToArray(n);var a=wc.mappingToExists(n,t);i[e]=Ac(a,(function(t){return t.option&&t.exist?Tc(t.exist,t.option,!0):t.exist||t.option}))}else i[e]=Tc(n,t,!0)}})),r.timelineOptions.length&&(a.timelineOptions=r.timelineOptions),r.mediaList.length&&(a.mediaList=r.mediaList),r.mediaDefault&&(a.mediaDefault=r.mediaDefault)):this._optionBackup=r},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=Ac(e.timelineOptions,Ic),this._mediaList=Ac(e.mediaList,Ic),this._mediaDefault=Ic(e.mediaDefault),this._currentMediaIndices=[],Ic(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=Ic(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e,i,n=this._api.getWidth(),a=this._api.getHeight(),r=this._mediaList,o=this._mediaDefault,s=[],l=[];if(!r.length&&!o)return l;for(var h=0,u=r.length;h<u;h++)Pc(r[h].query,n,a)&&s.push(h);return!s.length&&o&&(s=[-1]),s.length&&(e=s,i=this._currentMediaIndices,e.join(",")!==i.join(","))&&(l=Ac(s,(function(t){return Ic(-1===t?o.option:r[t].option)}))),this._currentMediaIndices=s,l}};var kc=Lc,Oc=b,zc=ur,Ec=Oc.each,Rc=Oc.isObject,Nc=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Vc(t){var e=t&&t.itemStyle;if(e)for(var i=0,n=Nc.length;i<n;i++){var a=Nc[i],r=e.normal,o=e.emphasis;r&&r[a]&&(t[a]=t[a]||{},t[a].normal?Oc.merge(t[a].normal,r[a]):t[a].normal=r[a],r[a]=null),o&&o[a]&&(t[a]=t[a]||{},t[a].emphasis?Oc.merge(t[a].emphasis,o[a]):t[a].emphasis=o[a],o[a]=null)}}function Bc(t,e){var i=Rc(t)&&t[e],n=Rc(i)&&i.textStyle;if(n)for(var a=0,r=zc.TEXT_STYLE_OPTIONS.length;a<r;a++){e=zc.TEXT_STYLE_OPTIONS[a];n.hasOwnProperty(e)&&(i[e]=n[e])}}function Gc(t){Rc(t)&&(Bc(t,"normal"),Bc(t,"emphasis"))}function Wc(t){return Oc.isArray(t)?t:t?[t]:[]}function Hc(t){return(Oc.isArray(t)?t[0]:t)||{}}var Fc=function(t,e){Ec(Wc(t.series),(function(t){Rc(t)&&function(t){if(Rc(t)){Vc(t),Gc(t.label),Gc(t.upperLabel),Gc(t.edgeLabel),Vc(n=t.markPoint),Gc(n&&n.label);var e=t.markLine;Vc(t.markLine),Gc(e&&e.label);var i=t.markArea;Gc(i&&i.label),Bc(t,"axisLabel"),Bc(t,"title"),Bc(t,"detail");var n,a=t.data;if(a)for(var r=0;r<a.length;r++)Vc(a[r]),Gc(a[r]&&a[r].label);if((n=t.markPoint)&&n.data){var o=n.data;for(r=0;r<o.length;r++)Vc(o[r]),Gc(o[r]&&o[r].label)}if((e=t.markLine)&&e.data){var s=e.data;for(r=0;r<s.length;r++)Oc.isArray(s[r])?(Vc(s[r][0]),Gc(s[r][0]&&s[r][0].label),Vc(s[r][1]),Gc(s[r][1]&&s[r][1].label)):(Vc(s[r]),Gc(s[r]&&s[r].label))}}}(t)}));var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),Ec(i,(function(e){Ec(Wc(t[e]),(function(t){t&&(Bc(t,"axisLabel"),Bc(t.axisPointer,"label"))}))})),Ec(Wc(t.parallel),(function(t){var e=t&&t.parallelAxisDefault;Bc(e,"axisLabel"),Bc(e&&e.axisPointer,"label")})),Ec(Wc(t.calendar),(function(t){Bc(t,"dayLabel"),Bc(t,"monthLabel"),Bc(t,"yearLabel")})),Ec(Wc(t.radar),(function(t){Bc(t,"name")})),Ec(Wc(t.geo),(function(t){Rc(t)&&(Gc(t.label),Ec(Wc(t.regions),(function(t){Gc(t.label)})))})),Gc(Hc(t.timeline).label),Bc(Hc(t.axisPointer),"label"),Bc(Hc(t.tooltip).axisPointer,"label")},Zc=b,Uc=Zc.each,jc=Zc.isArray,qc=Zc.isObject,Xc=Fc,Yc=ur.normalizeToArray;function $c(t){Uc(Kc,(function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])}))}var Kc=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Jc=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Qc=["bar","boxplot","candlestick","chord","effectScatter","funnel","gauge","lines","graph","heatmap","line","map","parallel","pie","radar","sankey","scatter","treemap"];var td=function(t,e){Xc(t,e),t.series=Yc(t.series),Uc(t.series,(function(t){if(qc(t)){var e=t.type;if("pie"!==e&&"gauge"!==e||null!=t.clockWise&&(t.clockwise=t.clockWise),"gauge"===e){var i=function(t,e){e=e.split(",");for(var i=t,n=0;n<e.length&&null!=(i=i&&i[e[n]]);n++);return i}(t,"pointer.color");null!=i&&function(t,e,i,n){e=e.split(",");for(var a,r=t,o=0;o<e.length-1;o++)null==r[a=e[o]]&&(r[a]={}),r=r[a];(n||null==r[e[o]])&&(r[e[o]]=i)}(t,"itemStyle.normal.color",i)}for(var n=0;n<Qc.length;n++)if(Qc[n]===t.type){$c(t);break}}})),t.dataRange&&(t.visualMap=t.dataRange),Uc(Jc,(function(e){var i=t[e];i&&(jc(i)||(i=[i]),Uc(i,(function(t){$c(t)})))}))},ed=b,id=_,nd=cr,ad=nd.formatTime,rd=nd.encodeHTML,od=nd.addCommas,sd=nd.getTooltipMarker,ld=Ar,hd=ld.set,ud=ld.get,cd=ur,dd=Zu,pd=$u,fd=wu,gd=fd.getLayoutParams,md=fd.mergeLayoutParam,vd=dd.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendDataProvider:null,visualColorAccessPath:"itemStyle.normal.color",layoutMode:null,init:function(t,e,i,n){this.seriesIndex=this.componentIndex,this.mergeDefaultAndTheme(t,i);var a=this.getInitialData(t,i);hd(this,"dataBeforeProcessed",a),this.restoreData()},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?gd(t):{},a=this.subType;dd.hasClass(a)&&(a+="Series"),ed.merge(t,e.getTheme().get(this.subType)),ed.merge(t,this.getDefaultOption()),cd.defaultEmphasis(t.label,["show"]),this.fillDataTextStyle(t.data),i&&md(t,n,i)},mergeOption:function(t,e){t=ed.merge(this.option,t,!0),this.fillDataTextStyle(t.data);var i=this.layoutMode;i&&md(this.option,t,i);var n=this.getInitialData(t,e);n&&(hd(this,"data",n),hd(this,"dataBeforeProcessed",n.cloneShallow()))},fillDataTextStyle:function(t){if(t)for(var e=["show"],i=0;i<t.length;i++)t[i]&&t[i].label&&cd.defaultEmphasis(t[i].label,e)},getInitialData:function(){},getData:function(t){var e=ud(this,"data");return null==t?e:e.getLinkedData(t)},setData:function(t){hd(this,"data",t)},getRawData:function(){return ud(this,"dataBeforeProcessed")},coordDimToDataDim:function(t){return cd.coordDimToDataDim(this.getData(),t)},dataDimToCoordDim:function(t){return cd.dataDimToCoordDim(this.getData(),t)},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(t,e,i){var n=ud(this,"data"),a=this.getRawValue(t),r=ed.isArray(a)?function(i){var a=ed.reduce(i,(function(t,e,i){var a=n.getDimensionInfo(i);return t|(a&&!1!==a.tooltip&&null!=a.tooltipName)}),0),r=[],o=cd.otherDimToDataDim(n,"tooltip");function s(t,i){var o=n.getDimensionInfo(i);if(o&&!1!==o.otherDims.tooltip){var s=o.type,l=(a?"- "+(o.tooltipName||o.name)+": ":"")+("ordinal"===s?t+"":"time"===s?e?"":ad("yyyy/MM/dd hh:mm:ss",t):od(t));l&&r.push(rd(l))}}return o.length?ed.each(o,(function(e){s(n.get(e,t),e)})):ed.each(i,s),(a?"<br/>":"")+r.join(a?"<br/>":", ")}(a):rd(od(a)),o=n.getName(t),s=n.getItemVisual(t,"color");ed.isObject(s)&&s.colorStops&&(s=(s.colorStops[0]||{}).color);var l=sd(s=s||"transparent"),h=this.name;return"\0-"===h&&(h=""),h=h?rd(h)+(e?": ":"<br/>"):"",e?l+h+r:h+l+(o?rd(o)+": "+r:r)},isAnimationEnabled:function(){if(id.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){hd(this,"data",ud(this,"dataBeforeProcessed").cloneShallow())},getColorFromPalette:function(t,e){var i=this.ecModel,n=pd.getColorFromPalette.call(this,t,e);return n||(n=i.getColorFromPalette(t,e)),n},getAxisTooltipData:null,getTooltipPosition:null});ed.mixin(vd,cd.dataFormatMixin),ed.mixin(vd,pd);var yd=vd,xd=ni,_d=yu,bd=Ar,wd=function(){this.group=new xd,this.uid=_d.getUID("viewComponent")},Sd=wd.prototype={constructor:wd,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){}};Sd.updateView=Sd.updateLayout=Sd.updateVisual=function(t,e,i,n){},bd.enableClassExtend(wd),bd.enableClassManagement(wd,{registerWhenExtend:!0});var Md=wd,Id=b,Ad=ni,Td=yu,Cd=Ar,Ld=ur;function Dd(){this.group=new Ad,this.uid=Td.getUID("viewChart")}Dd.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){Od(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){Od(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){}};var Pd=Dd.prototype;function kd(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var i=0;i<t.childCount();i++)kd(t.childAt(i),e)}function Od(t,e,i){var n=Ld.queryDataIndex(t,e);null!=n?Id.each(Ld.normalizeToArray(n),(function(e){kd(t.getItemGraphicEl(e),i)})):t.eachItemGraphicEl((function(t){kd(t,i)}))}Pd.updateView=Pd.updateLayout=Pd.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},Cd.enableClassExtend(Dd,["dispose"]),Cd.enableClassManagement(Dd,{registerWhenExtend:!0});var zd=Dd,Ed={},Rd="\0__throttleOriginMethod",Nd="\0__throttleRate";function Vd(t,e,i){var n,a,r,o,s,l=0,h=0,u=null;function c(){h=(new Date).getTime(),u=null,t.apply(r,o||[])}e=e||0;var d=function(){n=(new Date).getTime(),r=this,o=arguments;var t=s||e,d=s||i;s=null,a=n-(d?l:h)-t,clearTimeout(u),d?u=setTimeout(c,t):a>=0?c():u=setTimeout(c,-a),l=n};return d.clear=function(){u&&(clearTimeout(u),u=null)},d.debounceNextCall=function(t){s=t},d}Ed.throttle=Vd,Ed.createOrUpdate=function(t,e,i,n){var a=t[e];if(a){var r=a[Rd]||a,o=a["\0__throttleType"];if(a[Nd]!==i||o!==n){if(null==i||!n)return t[e]=r;(a=t[e]=Vd(r,i,"debounce"===n))[Rd]=r,a["\0__throttleType"]=n,a[Nd]=i}return a}},Ed.clear=function(t,e){var i=t[e];i&&i[Rd]&&(t[e]=i[Rd])};var Bd=Rl;var Gd=function(t){t.eachRawSeries((function(e){var i=(e.visualColorAccessPath||"itemStyle.normal.color").split("."),n=e.getData(),a=e.get(i)||e.getColorFromPalette(e.get("name"));n.setVisual("color",a),t.isSeriesFiltered(e)||("function"!=typeof a||a instanceof Bd||n.each((function(t){n.setItemVisual(t,"color",a(e.getDataParams(t)))})),n.each((function(t){var e=n.getItemModel(t).get(i,!0);null!=e&&n.setItemVisual(t,"color",e)})))}))},Wd=b,Hd=Vr,Fd=Math.PI;var Zd=function(t,e){e=e||{},Wd.defaults(e,{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new Hd.Rect({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),n=new Hd.Arc({shape:{startAngle:-Fd/2,endAngle:-Fd/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),a=new Hd.Rect({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});n.animateShape(!0).when(1e3,{endAngle:3*Fd/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*Fd/2}).delay(300).start("circularInOut");var r=new Hd.Group;return r.add(n),r.add(a),r.add(i),r.resize=function(){var e=t.getWidth()/2,r=t.getHeight()/2;n.setShape({cx:e,cy:r});var o=n.shape.r;a.setShape({x:e-o,y:r-o,width:2*o,height:2*o}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},r.resize(),r},Ud={},jd={};function qd(t){return t}function Xd(t,e,i,n,a){this._old=t,this._new=e,this._oldKeyGetter=i||qd,this._newKeyGetter=n||qd,this.context=a}function Yd(t,e,i,n,a){for(var r=0;r<t.length;r++){var o="_ec_"+a[n](t[r],r),s=e[o];null==s?(i.push(o),e[o]=r):(s.length||(e[o]=s=[s]),s.push(r))}}Xd.prototype={constructor:Xd,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,i={},n=[],a=[];for(Yd(t,{},n,"_oldKeyGetter",this),Yd(e,i,a,"_newKeyGetter",this),r=0;r<t.length;r++){if(null!=(s=i[o=n[r]]))(h=s.length)?(1===h&&(i[o]=null),s=s.unshift()):i[o]=null,this._update&&this._update(s,r);else this._remove&&this._remove(r)}for(var r=0;r<a.length;r++){var o=a[r];if(i.hasOwnProperty(o)){var s;if(null==(s=i[o]))continue;if(s.length)for(var l=0,h=s.length;l<h;l++)this._add&&this._add(s[l]);else this._add&&this._add(s)}}}};var $d=Xd,Kd=b,Jd=ru,Qd=$d,tp=ur,ep=Kd.isObject,ip="undefined"==typeof window?t:window,np={float:void 0===ip.Float64Array?Array:ip.Float64Array,int:void 0===ip.Int32Array?Array:ip.Int32Array,ordinal:Array,number:Array,time:Array},ap=["stackedOn","hasItemOption","_nameList","_idList","_rawData"];function rp(t,e){Kd.each(ap.concat(e.__wrappedMethods||[]),(function(i){e.hasOwnProperty(i)&&(t[i]=e[i])})),t.__wrappedMethods=e.__wrappedMethods}function op(t){this._array=t||[]}op.prototype.pure=!1,op.prototype.count=function(){return this._array.length},op.prototype.getItem=function(t){return this._array[t]};var sp=function(t,e){t=t||["x","y"];for(var i={},n=[],a=0;a<t.length;a++){var r,o={};"string"==typeof t[a]?o={name:r=t[a],coordDim:r,coordDimIndex:0,stackable:!1,type:"number"}:(r=(o=t[a]).name,o.type=o.type||"number",o.coordDim||(o.coordDim=r,o.coordDimIndex=0)),o.otherDims=o.otherDims||{},n.push(r),i[r]=o}this.dimensions=n,this._dimensionInfos=i,this.hostModel=e,this.dataType,this.indices=[],this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this.stackedOn=null,this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._rawData,this._extent},lp=sp.prototype;function hp(t){return Kd.isArray(t)||(t=[t]),t}function up(t,e){var i=t.dimensions,n=new sp(Kd.map(i,t.getDimensionInfo,t),t.hostModel);rp(n,t);for(var a=n._storage={},r=t._storage,o=0;o<i.length;o++){var s=i[o],l=r[s];Kd.indexOf(e,s)>=0?a[s]=new l.constructor(r[s].length):a[s]=r[s]}return n}lp.type="list",lp.hasItemOption=!0,lp.getDimension=function(t){return isNaN(t)||(t=this.dimensions[t]||t),t},lp.getDimensionInfo=function(t){return Kd.clone(this._dimensionInfos[this.getDimension(t)])},lp.initData=function(t,e,i){t=t||[],Kd.isArray(t)&&(t=new op(t)),this._rawData=t;var n,a=this._storage={},r=this.indices=[],o=this.dimensions,s=this._dimensionInfos,l=t.count(),h=[],u={};e=e||[];for(var c=0;c<o.length;c++){var d=s[o[c]];0===d.otherDims.itemName&&(n=c);var p=np[d.type];a[o[c]]=new p(l)}var f=this;i||(f.hasItemOption=!1),i=i||function(t,e,i,n){var a=tp.getDataItemValue(t);return tp.isDataItemOption(t)&&(f.hasItemOption=!0),tp.converDataValue(a instanceof Array?a[n]:a,s[e])};for(c=0;c<l;c++){for(var g=t.getItem(c),m=0;m<o.length;m++){var v=o[m];a[v][c]=i(g,v,c,m)}r.push(c)}for(c=0;c<l;c++){g=t.getItem(c);!e[c]&&g&&(null!=g.name?e[c]=g.name:null!=n&&(e[c]=a[o[n]][c]));var y=e[c]||"",x=g&&g.id;!x&&y&&(u[y]=u[y]||0,x=y,u[y]>0&&(x+="__ec__"+u[y]),u[y]++),x&&(h[c]=x)}this._nameList=e,this._idList=h},lp.count=function(){return this.indices.length},lp.get=function(t,e,i){var n=this._storage,a=this.indices[e];if(null==a||!n[t])return NaN;var r=n[t][a];if(i){var o=this._dimensionInfos[t];if(o&&o.stackable)for(var s=this.stackedOn;s;){var l=s.get(t,e);(r>=0&&l>0||r<=0&&l<0)&&(r+=l),s=s.stackedOn}}return r},lp.getValues=function(t,e,i){var n=[];Kd.isArray(t)||(i=e,e=t,t=this.dimensions);for(var a=0,r=t.length;a<r;a++)n.push(this.get(t[a],e,i));return n},lp.hasValue=function(t){for(var e=this.dimensions,i=this._dimensionInfos,n=0,a=e.length;n<a;n++)if("ordinal"!==i[e[n]].type&&isNaN(this.get(e[n],t)))return!1;return!0},lp.getDataExtent=function(t,e,i){t=this.getDimension(t);var n=this._storage[t],a=this.getDimensionInfo(t);e=a&&a.stackable&&e;var r,o=(this._extent||(this._extent={}))[t+!!e];if(o)return o;if(n){for(var s=1/0,l=-1/0,h=0,u=this.count();h<u;h++)r=this.get(t,h,e),i&&!i(r,t,h)||(r<s&&(s=r),r>l&&(l=r));return this._extent[t+!!e]=[s,l]}return[1/0,-1/0]},lp.getSum=function(t,e){var i=0;if(this._storage[t])for(var n=0,a=this.count();n<a;n++){var r=this.get(t,n,e);isNaN(r)||(i+=r)}return i},lp.indexOf=function(t,e){var i=this._storage[t],n=this.indices;if(i)for(var a=0,r=n.length;a<r;a++){if(i[n[a]]===e)return a}return-1},lp.indexOfName=function(t){for(var e=this.indices,i=this._nameList,n=0,a=e.length;n<a;n++){if(i[e[n]]===t)return n}return-1},lp.indexOfRawIndex=function(t){var e=this.indices,i=e[t];if(null!=i&&i===t)return t;for(var n=0,a=e.length-1;n<=a;){var r=(n+a)/2|0;if(e[r]<t)n=r+1;else{if(!(e[r]>t))return r;a=r-1}}return-1},lp.indicesOfNearest=function(t,e,i,n){var a=[];if(!this._storage[t])return a;null==n&&(n=1/0);for(var r=Number.MAX_VALUE,o=-1,s=0,l=this.count();s<l;s++){var h=e-this.get(t,s,i),u=Math.abs(h);h<=n&&u<=r&&((u<r||h>=0&&o<0)&&(r=u,o=h,a.length=0),a.push(s))}return a},lp.getRawIndex=function(t){var e=this.indices[t];return null==e?-1:e},lp.getRawDataItem=function(t){return this._rawData.getItem(this.getRawIndex(t))},lp.getName=function(t){return this._nameList[this.indices[t]]||""},lp.getId=function(t){return this._idList[this.indices[t]]||this.getRawIndex(t)+""},lp.each=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]);var a=[],r=(t=Kd.map(hp(t),this.getDimension,this)).length,o=this.indices;n=n||this;for(var s=0;s<o.length;s++)switch(r){case 0:e.call(n,s);break;case 1:e.call(n,this.get(t[0],s,i),s);break;case 2:e.call(n,this.get(t[0],s,i),this.get(t[1],s,i),s);break;default:for(var l=0;l<r;l++)a[l]=this.get(t[l],s,i);a[l]=s,e.apply(n,a)}},lp.filterSelf=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]);var a=[],r=[],o=(t=Kd.map(hp(t),this.getDimension,this)).length,s=this.indices;n=n||this;for(var l=0;l<s.length;l++){var h;if(o)if(1===o)h=e.call(n,this.get(t[0],l,i),l);else{for(var u=0;u<o;u++)r[u]=this.get(t[u],l,i);r[u]=l,h=e.apply(n,r)}else h=e.call(n,l);h&&a.push(s[l])}return this.indices=a,this._extent={},this},lp.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]);var a=[];return this.each(t,(function(){a.push(e&&e.apply(this,arguments))}),i,n),a},lp.map=function(t,e,i,n){var a=up(this,t=Kd.map(hp(t),this.getDimension,this)),r=a.indices=this.indices,o=a._storage,s=[];return this.each(t,(function(){var i=arguments[arguments.length-1],n=e&&e.apply(this,arguments);if(null!=n){"number"==typeof n&&(s[0]=n,n=s);for(var a=0;a<n.length;a++){var l=t[a],h=o[l],u=r[i];h&&(h[u]=n[a])}}}),i,n),a},lp.downSample=function(t,e,i,n){for(var a=up(this,[t]),r=this._storage,o=a._storage,s=this.indices,l=a.indices=[],h=[],u=[],c=Math.floor(1/e),d=o[t],p=this.count(),f=0;f<r[t].length;f++)o[t][f]=r[t][f];for(f=0;f<p;f+=c){c>p-f&&(c=p-f,h.length=c);for(var g=0;g<c;g++){var m=s[f+g];h[g]=d[m],u[g]=m}var v=i(h);d[m=u[n(h,v)||0]]=v,l.push(m)}return a},lp.getItemModel=function(t){var e=this.hostModel;return t=this.indices[t],new Jd(this._rawData.getItem(t),e,e&&e.ecModel)},lp.diff=function(t){var e,i=this._idList,n=t&&t._idList;return new Qd(t?t.indices:[],this.indices,(function(t){return null!=(e=n[t])?e:"e\0\0"+t}),(function(t){return null!=(e=i[t])?e:"e\0\0"+t}))},lp.getVisual=function(t){var e=this._visual;return e&&e[t]},lp.setVisual=function(t,e){if(ep(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},lp.setLayout=function(t,e){if(ep(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},lp.getLayout=function(t){return this._layout[t]},lp.getItemLayout=function(t){return this._itemLayouts[t]},lp.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?Kd.extend(this._itemLayouts[t]||{},e):e},lp.clearItemLayouts=function(){this._itemLayouts.length=0},lp.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],a=n&&n[e];return null!=a||i?a:this.getVisual(e)},lp.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{};if(this._itemVisuals[t]=n,ep(e))for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a]);else n[e]=i},lp.clearAllVisual=function(){this._visual={},this._itemVisuals=[]};var cp=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};lp.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(cp,e)),this._graphicEls[t]=e},lp.getItemGraphicEl=function(t){return this._graphicEls[t]},lp.eachItemGraphicEl=function(t,e){Kd.each(this._graphicEls,(function(i,n){i&&t&&t.call(e,i,n)}))},lp.cloneShallow=function(){var t=Kd.map(this.dimensions,this.getDimensionInfo,this),e=new sp(t,this.hostModel);return e._storage=this._storage,rp(e,this),e.indices=this.indices.slice(),this._extent&&(e._extent=Kd.extend({},this._extent)),e},lp.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(Kd.slice(arguments)))})},lp.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],lp.CHANGABLE_METHODS=["filterSelf"];var dp=sp,pp=b,fp=ur.normalizeToArray,gp=pp.each,mp=pp.isString,vp=pp.defaults,yp={tooltip:1,label:1,itemName:1};function xp(t,e,i){e=e||[],i=i||{},t=(t||[]).slice();var n=(i.dimsDef||[]).slice(),a=pp.createHashMap(i.encodeDef),r=pp.createHashMap(),o=pp.createHashMap(),s=[],l=i.dimCount;if(null==l){var h=bp(e[0]);l=Math.max(pp.isArray(h)&&h.length||1,t.length,n.length),gp(t,(function(t){var e=t.dimsDef;e&&(l=Math.max(l,e.length))}))}for(var u=0;u<l;u++){var c=mp(n[u])?{name:n[u]}:n[u]||{},d=c.name,p=s[u]={otherDims:{}};null!=d&&null==r.get(d)&&(p.name=p.tooltipName=d,r.set(d,u)),null!=c.type&&(p.type=c.type)}a.each((function(t,e){t=a.set(e,fp(t).slice()),gp(t,(function(i,n){mp(i)&&(i=r.get(i)),null!=i&&i<l&&(t[n]=i,v(s[i],e,n))}))}));var f=0;gp(t,(function(t,e){var i,n,r;mp(t)?(i=t,t={}):(i=t.name,t=pp.clone(t),n=t.dimsDef,r=t.otherDims,t.name=t.coordDim=t.coordDimIndex=t.dimsDef=t.otherDims=null);var o=fp(a.get(i));if(!o.length)for(var l=0;l<(n&&n.length||1);l++){for(;f<s.length&&null!=s[f].coordDim;)f++;f<s.length&&o.push(f++)}gp(o,(function(e,a){var o=s[e];v(vp(o,t),i,a),null==o.name&&n&&(o.name=o.tooltipName=n[a]),r&&vp(o.otherDims,r)}))}));for(var g=i.extraPrefix||"value",m=0;m<l;m++){null==(p=s[m]=s[m]||{}).coordDim&&(p.coordDim=y(g,o,i.extraFromZero),p.coordDimIndex=0,p.isExtraCoord=!0),null==p.name&&(p.name=y(p.coordDim,r)),null==p.type&&_p(e,m)&&(p.type="ordinal")}return s;function v(t,e,i){yp[e]?t.otherDims[e]=i:(t.coordDim=e,t.coordDimIndex=i,o.set(e,!0))}function y(t,e,i){if(i||null!=e.get(t)){for(var n=0;null!=e.get(t+n);)n++;t+=n}return e.set(t,!0),t}}var _p=xp.guessOrdinal=function(t,e){for(var i=0,n=t.length;i<n;i++){var a=bp(t[i]);if(!pp.isArray(a))return!1;if(null!=(a=a[e])&&isFinite(a)&&""!==a)return!1;if(mp(a)&&"-"!==a)return!0}return!1};function bp(t){return pp.isArray(t)?t:pp.isObject(t)?t.value:t}var wp=xp,Sp=b,Mp=dp,Ip=wp,Ap=ur,Tp=Ap.getDataItemValue,Cp=Ap.converDataValue,Lp=Ap.isDataItemOption,Dp=_c;function Pp(t){return"category"!==t&&"time"!==t}function kp(t){return"category"===t?"ordinal":"time"===t?"time":"float"}var Op={cartesian2d:function(t,e,i,n){var a=Sp.map(["xAxis","yAxis"],(function(t){return i.queryComponents({mainType:t,index:e.get(t+"Index"),id:e.get(t+"Id")})[0]})),r=a[0],o=a[1],s=r.get("type"),l=o.get("type"),h=[{name:"x",type:kp(s),stackable:Pp(s)},{name:"y",type:kp(l),stackable:Pp(l)}],u="category"===s,c="category"===l;h=Ip(h,t,n);var d={};return u&&(d.x=r),c&&(d.y=o),{dimensions:h,categoryIndex:u?0:c?1:-1,categoryAxesModels:d}},singleAxis:function(t,e,i,n){var a=i.queryComponents({mainType:"singleAxis",index:e.get("singleAxisIndex"),id:e.get("singleAxisId")})[0],r=a.get("type"),o="category"===r,s=[{name:"single",type:kp(r),stackable:Pp(r)}];s=Ip(s,t,n);var l={};return o&&(l.single=a),{dimensions:s,categoryIndex:o?0:-1,categoryAxesModels:l}},polar:function(t,e,i,n){var a=i.queryComponents({mainType:"polar",index:e.get("polarIndex"),id:e.get("polarId")})[0],r=a.findAxisModel("angleAxis"),o=a.findAxisModel("radiusAxis"),s=o.get("type"),l=r.get("type"),h=[{name:"radius",type:kp(s),stackable:Pp(s)},{name:"angle",type:kp(l),stackable:Pp(l)}],u="category"===l,c="category"===s;h=Ip(h,t,n);var d={};return c&&(d.radius=o),u&&(d.angle=r),{dimensions:h,categoryIndex:u?1:c?0:-1,categoryAxesModels:d}},geo:function(t,e,i,n){return{dimensions:Ip([{name:"lng"},{name:"lat"}],t,n)}}};var zp=function(t,e,i){t=t||[];var n=e.get("coordinateSystem"),a=Op[n],r=Dp.get(n),o={encodeDef:e.get("encode"),dimsDef:e.get("dimensions")},s=a&&a(t,e,i,o),l=s&&s.dimensions;l||(l=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"],l=Ip(l,t,o));var h=s?s.categoryIndex:-1,u=new Mp(l,e),c=function(t,e){var i,n=[],a=t&&t.dimensions[t.categoryIndex];a&&(i=t.categoryAxesModels[a.name]);if(i){var r=i.getCategories();if(r){var o=e.length;if(Sp.isArray(e[0])&&e[0].length>1){n=[];for(var s=0;s<o;s++)n[s]=r[e[s][t.categoryIndex||0]]}else n=r.slice(0)}}return n}(s,t),d={},p=h>=0&&function(t){var e=function(t){for(var e=0;e<t.length&&null==t[e];)e++;return t[e]}(t);return null!=e&&!Sp.isArray(Tp(e))}(t)?function(t,e,i,n){return Lp(t)&&(u.hasItemOption=!0),n===h?i:Cp(Tp(t),l[n])}:function(t,e,i,n){var a=Tp(t),r=Cp(a&&a[n],l[n]);Lp(t)&&(u.hasItemOption=!0);var o=s&&s.categoryAxesModels;return o&&o[e]&&"string"==typeof r&&(d[e]=d[e]||o[e].getCategories(),(r=Sp.indexOf(d[e],r))<0&&!isNaN(r)&&(r=+r)),r};return u.hasItemOption=!1,u.initData(t,c,p),u},Ep=zp,Rp={},Np=Ar;function Vp(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}Vp.prototype.parse=function(t){return t},Vp.prototype.getSetting=function(t){return this._setting[t]},Vp.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},Vp.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},Vp.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},Vp.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},Vp.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getDataExtent(e,!0))},Vp.prototype.getExtent=function(){return this._extent.slice()},Vp.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},Vp.prototype.getTicksLabels=function(){for(var t=[],e=this.getTicks(),i=0;i<e.length;i++)t.push(this.getLabel(e[i]));return t},Vp.prototype.isBlank=function(){return this._isBlank},Vp.prototype.setBlank=function(t){this._isBlank=t},Np.enableClassExtend(Vp),Np.enableClassManagement(Vp,{registerWhenExtend:!0});var Bp=Vp,Gp=b,Wp=Bp,Hp=Wp.prototype,Fp=Wp.extend({type:"ordinal",init:function(t,e){this._data=t,this._extent=e||[0,t.length-1]},parse:function(t){return"string"==typeof t?Gp.indexOf(this._data,t):Math.round(t)},contain:function(t){return t=this.parse(t),Hp.contain.call(this,t)&&null!=this._data[t]},normalize:function(t){return Hp.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(Hp.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._data[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getDataExtent(e,!1))},niceTicks:Gp.noop,niceExtent:Gp.noop});Fp.create=function(){return new Fp};var Zp=Fp,Up={},jp=dr,qp=jp.round;function Xp(t){return jp.getPrecisionSafe(t)+2}function Yp(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function $p(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Yp(t,0,e),Yp(t,1,e),t[0]>t[1]&&(t[0]=t[1])}Up.intervalScaleNiceTicks=function(t,e,i,n){var a={},r=t[1]-t[0],o=a.interval=jp.nice(r/e,!0);null!=i&&o<i&&(o=a.interval=i),null!=n&&o>n&&(o=a.interval=n);var s=a.intervalPrecision=Xp(o);return $p(a.niceTickExtent=[qp(Math.ceil(t[0]/o)*o,s),qp(Math.floor(t[1]/o)*o,s)],t),a},Up.getIntervalPrecision=Xp,Up.fixExtent=$p,Up.intervalScaleGetTicks=function(t,e,i,n){var a=[];if(!t)return a;e[0]<i[0]&&a.push(e[0]);for(var r=i[0];r<=i[1]&&(a.push(r),(r=qp(r+t,n))!==a[a.length-1]);)if(a.length>1e4)return[];return e[1]>(a.length?a[a.length-1]:i[1])&&a.push(e[1]),a};var Kp=dr,Jp=cr,Qp=Bp,tf=Up,ef=Kp.round,nf=Qp.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),nf.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=tf.getIntervalPrecision(t)},getTicks:function(){return tf.intervalScaleGetTicks(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getTicksLabels:function(){for(var t=[],e=this.getTicks(),i=0;i<e.length;i++)t.push(this.getLabel(e[i]));return t},getLabel:function(t,e){if(null==t)return"";var i=e&&e.precision;return null==i?i=Kp.getPrecisionSafe(t)||0:"auto"===i&&(i=this._intervalPrecision),t=ef(t,i,!0),Jp.addCommas(t)},niceTicks:function(t,e,i){t=t||5;var n=this._extent,a=n[1]-n[0];if(isFinite(a)){a<0&&(a=-a,n.reverse());var r=tf.intervalScaleNiceTicks(n,t,e,i);this._intervalPrecision=r.intervalPrecision,this._interval=r.interval,this._niceExtent=r.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var i=e[0];t.fixMax||(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]=ef(Math.floor(e[0]/a)*a)),t.fixMax||(e[1]=ef(Math.ceil(e[1]/a)*a))}});nf.create=function(){return new nf};var af=nf,rf=b,of=dr,sf=cr,lf=Up,hf=af,uf=hf.prototype,cf=Math.ceil,df=Math.floor,pf=864e5,ff=hf.extend({type:"time",getLabel:function(t){var e=this._stepLvl,i=new Date(t);return sf.formatTime(e[0],i,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=pf,e[1]+=pf),e[1]===-1/0&&e[0]===1/0){var i=new Date;e[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),e[0]=e[1]-pf}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var n=this._interval;t.fixMin||(e[0]=of.round(df(e[0]/n)*n)),t.fixMax||(e[1]=of.round(cf(e[1]/n)*n))},niceTicks:function(t,e,i){t=t||10;var n=this._extent,a=n[1]-n[0],r=a/t;null!=e&&r<e&&(r=e),null!=i&&r>i&&(r=i);var o=gf.length,s=function(t,e,i,n){for(;i<n;){var a=i+n>>>1;t[a][1]<e?i=a+1:n=a}return i}(gf,r,0,o),l=gf[Math.min(s,o-1)],h=l[1];if("year"===l[0]){var u=a/h;h*=of.nice(u/t,!0)}var c=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,d=[Math.round(cf((n[0]-c)/h)*h+c),Math.round(df((n[1]-c)/h)*h+c)];lf.fixExtent(d,n),this._stepLvl=l,this._interval=h,this._niceExtent=d},parse:function(t){return+of.parseDate(t)}});rf.each(["contain","normalize"],(function(t){ff.prototype[t]=function(e){return uf[t].call(this,this.parse(e))}}));var gf=[["hh:mm:ss",1e3],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",6e4],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",36e5],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",216e5],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",pf],["MM-dd\nyyyy",1728e5],["MM-dd\nyyyy",2592e5],["MM-dd\nyyyy",3456e5],["MM-dd\nyyyy",432e6],["MM-dd\nyyyy",5184e5],["week",6048e5],["MM-dd\nyyyy",864e6],["week",12096e5],["week",18144e5],["month",26784e5],["week",36288e5],["month",53568e5],["week",36288e5],["quarter",8208e6],["month",107136e5],["month",13392e6],["half-year",16416e6],["month",214272e5],["month",26784e6],["year",32832e6]];ff.create=function(t){return new ff({useUTC:t.ecModel.get("useUTC")})};var mf=b,vf=Bp,yf=dr,xf=af,_f=vf.prototype,bf=xf.prototype,wf=yf.getPrecisionSafe,Sf=yf.round,Mf=Math.floor,If=Math.ceil,Af=Math.pow,Tf=Math.log,Cf=vf.extend({type:"log",base:10,$constructor:function(){vf.apply(this,arguments),this._originalScale=new xf},getTicks:function(){var t=this._originalScale,e=this._extent,i=t.getExtent();return mf.map(bf.getTicks.call(this),(function(n){var a=yf.round(Af(this.base,n));return a=n===e[0]&&t.__fixMin?Lf(a,i[0]):a,a=n===e[1]&&t.__fixMax?Lf(a,i[1]):a}),this)},getLabel:bf.getLabel,scale:function(t){return t=_f.scale.call(this,t),Af(this.base,t)},setExtent:function(t,e){var i=this.base;t=Tf(t)/Tf(i),e=Tf(e)/Tf(i),bf.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=_f.getExtent.call(this);e[0]=Af(t,e[0]),e[1]=Af(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=Lf(e[0],n[0])),i.__fixMax&&(e[1]=Lf(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=Tf(t[0])/Tf(e),t[1]=Tf(t[1])/Tf(e),_f.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getDataExtent(e,!0,(function(t){return t>0})))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||i<=0)){var n=yf.quantity(i);for(t/i*n<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var a=[yf.round(If(e[0]/n)*n),yf.round(Mf(e[1]/n)*n)];this._interval=n,this._niceExtent=a}},niceExtent:function(t){bf.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});function Lf(t,e){return Sf(t,wf(e))}mf.each(["contain","normalize"],(function(t){Cf.prototype[t]=function(e){return e=Tf(e)/Tf(this.base),_f[t].call(this,e)}})),Cf.create=function(){return new Cf};var Df=b,Pf=Ni,kf=Zp,Of=af,zf=Bp,Ef=dr;function Rf(t,e){var i,n,a,r=t.type,o=e.getMin(),s=e.getMax(),l=null!=o,h=null!=s,u=t.getExtent();return"ordinal"===r?i=(e.get("data")||[]).length:(n=e.get("boundaryGap"),Df.isArray(n)||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=Ef.parsePercent(n[0],1),n[1]=Ef.parsePercent(n[1],1),a=u[1]-u[0]||Math.abs(u[0])),null==o&&(o="ordinal"===r?i?0:NaN:u[0]-n[0]*a),null==s&&(s="ordinal"===r?i?i-1:NaN:u[1]+n[1]*a),"dataMin"===o?o=u[0]:"function"==typeof o&&(o=o({min:u[0],max:u[1]})),"dataMax"===s?s=u[1]:"function"==typeof s&&(s=s({min:u[0],max:u[1]})),(null==o||!isFinite(o))&&(o=NaN),(null==s||!isFinite(s))&&(s=NaN),t.setBlank(Df.eqNaN(o)||Df.eqNaN(s)),e.getNeedCrossZero()&&(o>0&&s>0&&!l&&(o=0),o<0&&s<0&&!h&&(s=0)),[o,s]}function Nf(t,e){return"category"===t.type?t.scale.getLabel(e):e}Rp.getScaleExtent=Rf,Rp.niceScaleExtent=function(t,e){var i=Rf(t,e),n=null!=e.getMin(),a=null!=e.getMax(),r=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var o=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:r,fixMin:n,fixMax:a,minInterval:"interval"===o||"time"===o?e.get("minInterval"):null,maxInterval:"interval"===o||"time"===o?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)},Rp.createScaleByModel=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new kf(t.getCategories(),[1/0,-1/0]);case"value":return new Of;default:return(zf.getClass(e)||Of).create(t)}},Rp.ifAxisCrossZero=function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||i<0&&n<0)},Rp.getAxisLabelInterval=function(t,e,i,n,a){var r,o=0,s=0,l=(n-a)/180*Math.PI,h=1;e.length>40&&(h=Math.floor(e.length/40));for(var u=0;u<t.length;u+=h){var c=t[u],d=Pf.getBoundingRect(e[u],i,"center","top");d.x+=c*Math.cos(l),d.y+=c*Math.sin(l),d.width*=1.3,d.height*=1.3,r?r.intersect(d)?(s++,o=Math.max(o,s)):(r.union(d),s=0):r=d.clone()}return 0===o&&h>1?h:(o+1)*h-1},Rp.getFormattedLabels=function(t,e){var i,n=t.scale,a=n.getTicksLabels(),r=n.getTicks();return"string"==typeof e?(i=e,e=function(t){return i.replace("{value}",null!=t?t:"")},Df.map(a,e)):"function"==typeof e?Df.map(r,(function(i,n){return e(Nf(t,i),n)}),this):a},Rp.getAxisRawValue=Nf;var Vf=b,Bf=Rp;function Gf(t){return Vf.isObject(t)&&null!=t.value?t.value:t+""}var Wf={getFormattedLabels:function(){return Bf.getFormattedLabels(this.axis,this.get("axisLabel.formatter"))},getCategories:function(){return"category"===this.get("type")&&Vf.map(this.get("data"),Gf)},getMin:function(t){var e=this.option,i=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=i&&"dataMin"!==i&&"function"!=typeof i&&!Vf.eqNaN(i)&&(i=this.axis.scale.parse(i)),i},getMax:function(t){var e=this.option,i=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=i&&"dataMax"!==i&&"function"!=typeof i&&!Vf.eqNaN(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:Vf.noop,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},Hf={},Ff=b,Zf=Vr,Uf=Je,jf=Zf.extendShape({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,a=e.width/2,r=e.height/2;t.moveTo(i,n-r),t.lineTo(i+a,n+r),t.lineTo(i-a,n+r),t.closePath()}}),qf=Zf.extendShape({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,a=e.width/2,r=e.height/2;t.moveTo(i,n-r),t.lineTo(i+a,n),t.lineTo(i,n+r),t.lineTo(i-a,n),t.closePath()}}),Xf=Zf.extendShape({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,a=e.width/5*3,r=Math.max(a,e.height),o=a/2,s=o*o/(r-o),l=n-r+o+s,h=Math.asin(s/o),u=Math.cos(h)*o,c=Math.sin(h),d=Math.cos(h),p=.6*o,f=.7*o;t.moveTo(i-u,l+s),t.arc(i,l,o,Math.PI-h,2*Math.PI+h),t.bezierCurveTo(i+u-c*p,l+s+d*p,i,n-f,i,n),t.bezierCurveTo(i,n-f,i-u+c*p,l+s+d*p,i-u,l+s),t.closePath()}}),Yf=Zf.extendShape({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,a=e.x,r=e.y,o=n/3*2;t.moveTo(a,r),t.lineTo(a+o,r+i),t.lineTo(a,r+i/4*3),t.lineTo(a-o,r+i),t.lineTo(a,r),t.closePath()}}),$f={line:Zf.Line,rect:Zf.Rect,roundRect:Zf.Rect,square:Zf.Rect,circle:Zf.Circle,diamond:qf,pin:Xf,arrow:Yf,triangle:jf},Kf={line:function(t,e,i,n,a){a.x1=t,a.y1=e+n/2,a.x2=t+i,a.y2=e+n/2},rect:function(t,e,i,n,a){a.x=t,a.y=e,a.width=i,a.height=n},roundRect:function(t,e,i,n,a){a.x=t,a.y=e,a.width=i,a.height=n,a.r=Math.min(i,n)/4},square:function(t,e,i,n,a){var r=Math.min(i,n);a.x=t,a.y=e,a.width=r,a.height=r},circle:function(t,e,i,n,a){a.cx=t+i/2,a.cy=e+n/2,a.r=Math.min(i,n)/2},diamond:function(t,e,i,n,a){a.cx=t+i/2,a.cy=e+n/2,a.width=i,a.height=n},pin:function(t,e,i,n,a){a.x=t+i/2,a.y=e+n/2,a.width=i,a.height=n},arrow:function(t,e,i,n,a){a.x=t+i/2,a.y=e+n/2,a.width=i,a.height=n},triangle:function(t,e,i,n,a){a.cx=t+i/2,a.cy=e+n/2,a.width=i,a.height=n}},Jf={};Ff.each($f,(function(t,e){Jf[e]=new t}));var Qf=Zf.extendShape({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style;"pin"===this.shape.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e,i){var n=e.symbolType,a=Jf[n];"none"!==e.symbolType&&(a||(a=Jf[n="rect"]),Kf[n](e.x,e.y,e.width,e.height,a.shape),a.buildPath(t,a.shape,i))}});function tg(t,e){if("image"!==this.type){var i=this.style,n=this.shape;n&&"line"===n.symbolType?i.stroke=t:this.__isEmptyBrush?(i.stroke=t,i.fill=e||"#fff"):(i.fill&&(i.fill=t),i.stroke&&(i.stroke=t)),this.dirty(!1)}}Hf.createSymbol=function(t,e,i,n,a,r,o){var s,l=0===t.indexOf("empty");return l&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(s=0===t.indexOf("image://")?Zf.makeImage(t.slice(8),new Uf(e,i,n,a),o?"center":"cover"):0===t.indexOf("path://")?Zf.makePath(t.slice(7),{},new Uf(e,i,n,a),o?"center":"cover"):new Qf({shape:{symbolType:t,x:e,y:i,width:n,height:a}})).__isEmptyBrush=l,s.setColor=tg,s.setColor(r),s};var eg=b,ig=Ep,ng=Rp,ag=Wf,rg=ru,og=wp;jd.completeDimensions=og;var sg=Hf;jd.createSymbol=sg.createSymbol,jd.createList=function(t){var e=t.get("data");return ig(e,t,t.ecModel)},jd.createScale=function(t,e){var i=e;e instanceof rg||(i=new rg(e),eg.mixin(i,ag));var n=ng.createScaleByModel(i);return n.setExtent(t[0],t[1]),ng.niceScaleExtent(n,i),n},jd.mixinAxisModelCommonMethods=function(t){eg.mixin(t,ag)};var lg=b,hg=dr,ug=Rp,cg=hg.linearMap;function dg(t,e){var i=(t[1]-t[0])/e/2;t[0]+=i,t[1]-=i}var pg=[0,1],fg=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1,this._labelInterval};fg.prototype={constructor:fg,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&t<=n},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return hg.getPixelPrecision(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&"ordinal"===n.type&&dg(i=i.slice(),n.count()),cg(t,pg,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&dg(i=i.slice(),n.count());var a=cg(t,i,pg,e);return this.scale.scale(a)},pointToData:function(t,e){},getTicksCoords:function(t){if(this.onBand&&!t){for(var e=this.getBands(),i=[],n=0;n<e.length;n++)i.push(e[n][0]);return e[n-1]&&i.push(e[n-1][1]),i}return lg.map(this.scale.getTicks(),this.dataToCoord,this)},getLabelsCoords:function(){return lg.map(this.scale.getTicks(),this.dataToCoord,this)},getBands:function(){for(var t=this.getExtent(),e=[],i=this.scale.count(),n=t[0],a=t[1]-n,r=0;r<i;r++)e.push([a*r/i+n,a*(r+1)/i+n]);return e},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,getLabelInterval:function(){var t=this._labelInterval;if(!t){var e=this.model,i=e.getModel("axisLabel");t=i.get("interval"),"category"!==this.type||null!=t&&"auto"!==t||(t=ug.getAxisLabelInterval(lg.map(this.scale.getTicks(),this.dataToCoord,this),e.getFormattedLabels(),i.getFont(),this.getRotate?this.getRotate():this.isHorizontal&&!this.isHorizontal()?90:0,i.get("rotate"))),this._labelInterval=t}return t}};var gg=fg,mg={},vg=Uo;function yg(t,e){return Math.abs(t-e)<1e-8}mg.contain=function(t,e,i){var n=0,a=t[0];if(!a)return!1;for(var r=1;r<t.length;r++){var o=t[r];n+=vg(a[0],a[1],o[0],o[1],e,i),a=o}var s=t[0];return yg(a[0],s[0])&&yg(a[1],s[1])||(n+=vg(a[0],a[1],s[0],s[1],e,i)),0!==n};var xg=Je,_g=eo,bg=U,wg=mg;function Sg(t,e,i){if(this.name=t,this.geometries=e,i)i=[i[0],i[1]];else{var n=this.getBoundingRect();i=[n.x+n.width/2,n.y+n.height/2]}this.center=i}Sg.prototype={constructor:Sg,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=[],r=[],o=this.geometries,s=0;s<o.length;s++)if("polygon"===o[s].type){var l=o[s].exterior;_g.fromPoints(l,a,r),bg.min(i,i,a),bg.max(n,n,r)}return 0===s&&(i[0]=i[1]=n[0]=n[1]=0),this._rect=new xg(i[0],i[1],n[0]-i[0],n[1]-i[1])},contain:function(t){var e=this.getBoundingRect(),i=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var n=0,a=i.length;n<a;n++)if("polygon"===i[n].type){var r=i[n].exterior,o=i[n].interiors;if(wg.contain(r,t[0],t[1])){for(var s=0;s<(o?o.length:0);s++)if(wg.contain(o[s]))continue t;return!0}}return!1},transformTo:function(t,e,i,n){var a=this.getBoundingRect(),r=a.width/a.height;i?n||(n=i/r):i=r*n;for(var o=new xg(t,e,i,n),s=a.calculateTransform(o),l=this.geometries,h=0;h<l.length;h++)if("polygon"===l[h].type){for(var u=l[h].exterior,c=l[h].interiors,d=0;d<u.length;d++)bg.applyTransform(u[d],u[d],s);for(var p=0;p<(c?c.length:0);p++)for(d=0;d<c[p].length;d++)bg.applyTransform(c[p][d],c[p][d],s)}(a=this._rect).copy(o),this.center=[a.x+a.width/2,a.y+a.height/2]}};var Mg=Sg,Ig=b,Ag=Mg;function Tg(t,e,i){for(var n=[],a=e[0],r=e[1],o=0;o<t.length;o+=2){var s=t.charCodeAt(o)-64,l=t.charCodeAt(o+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),a=s+=a,r=l+=r,n.push([s/i,l/i])}return n}var Cg=function(t){return function(t){if(!t.UTF8Encoding)return t;var e=t.UTF8Scale;null==e&&(e=1024);for(var i=t.features,n=0;n<i.length;n++)for(var a=i[n].geometry,r=a.coordinates,o=a.encodeOffsets,s=0;s<r.length;s++){var l=r[s];if("Polygon"===a.type)r[s]=Tg(l,o[s],e);else if("MultiPolygon"===a.type)for(var h=0;h<l.length;h++){var u=l[h];l[h]=Tg(u,o[s][h],e)}}t.UTF8Encoding=!1}(t),Ig.map(Ig.filter(t.features,(function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0})),(function(t){var e=t.properties,i=t.geometry,n=i.coordinates,a=[];"Polygon"===i.type&&a.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),"MultiPolygon"===i.type&&Ig.each(n,(function(t){t[0]&&a.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})}));var r=new Ag(e.name,a,e.cp);return r.properties=e,r}))},Lg=v;Ud.zrender=Lg;var Dg=mt;Ud.matrix=Dg;var Pg=U;Ud.vector=Pg;var kg=b,Og=Pt;Ud.color=Og;var zg=Vr;Ud.graphic=zg;var Eg=dr;Ud.number=Eg;var Rg=cr;Ud.format=Rg;var Ng=Ed;Ng.throttle,Ud.throttle=Ng.throttle;var Vg=jd;Ud.helper=Vg;var Bg=dp;Ud.List=Bg;var Gg=ru;Ud.Model=Gg;var Wg=gg;Ud.Axis=Wg;var Hg=_;Ud.env=Hg;var Fg=Cg;Ud.parseGeoJson=Fg;var Zg={};kg.each(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],(function(t){Zg[t]=kg[t]})),Ud.util=Zg,function(t){var e=v,i=b,n=Pt,a=_,r=hi,o=ot,s=pc,l=mc,h=_c,u=kc,c=td,d=Zu,p=yd,f=Md,g=zd,m=Vr,y=ur,x=Ed.throttle,w=Gd,S=Zd,M=i.each,I=d.parseClassType,A={PROCESSOR:{FILTER:1e3,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,GLOBAL:2e3,CHART:3e3,COMPONENT:4e3,BRUSH:5e3}},T="__flagInMainProcess",C=/^[a-zA-Z0-9_]+$/;function L(t){return function(e,i,n){e=e&&e.toLowerCase(),o.prototype[t].call(this,e,i,n)}}function D(){o.call(this)}function P(t,n,a){a=a||{},"string"==typeof n&&(n=it[n]),this.id,this.group,this._dom=t;var s,u,d=this._zr=e.init(t,{renderer:a.renderer||"canvas",devicePixelRatio:a.devicePixelRatio,width:a.width,height:a.height});function p(t,e){return t.prio-e.prio}this._throttledZrFlush=x(i.bind(d.flush,d),17),(n=i.clone(n))&&c(n,!0),this._theme=n,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new h,this._api=(u=(s=this)._coordSysMgr,i.extend(new l(s),{getCoordinateSystems:i.bind(u.getCoordinateSystems,u),getComponentByElement:function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return s._model.getComponent(e.mainType,e.index);t=t.parent}}})),o.call(this),this._messageCenter=new D,this._initEvents(),this.resize=i.bind(this.resize,this),this._pendingActions=[],r(et,p),r(J,p),d.animation.on("frame",this._onframe,this),i.setAsPrimitive(this)}D.prototype.on=L("on"),D.prototype.off=L("off"),D.prototype.one=L("one"),i.mixin(D,o);var k=P.prototype;function O(t,e,i){var n,a=this._model,r=this._coordSysMgr.getCoordinateSystems();e=y.parseFinder(a,e);for(var o=0;o<r.length;o++){var s=r[o];if(s[t]&&null!=(n=s[t](a,e,i)))return n}}k._onframe=function(){if(this.__optionUpdated){var t=this.__optionUpdated.silent;this[T]=!0,z.prepareAndUpdate.call(this),this[T]=!1,this.__optionUpdated=!1,N.call(this,t),V.call(this,t)}},k.getDom=function(){return this._dom},k.getZr=function(){return this._zr},k.setOption=function(t,e,n){var a;if(i.isObject(e)&&(n=e.lazyUpdate,a=e.silent,e=e.notMerge),this[T]=!0,!this._model||e){var r=new u(this._api),o=this._theme;(this._model=new s(null,null,o,r)).init(null,null,o,r)}this._model.setOption(t,Q),n?(this.__optionUpdated={silent:a},this[T]=!1):(z.prepareAndUpdate.call(this),this._zr.flush(),this.__optionUpdated=!1,this[T]=!1,N.call(this,a),V.call(this,a))},k.setTheme=function(){console.log("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},k.getModel=function(){return this._model},k.getOption=function(){return this._model&&this._model.getOption()},k.getWidth=function(){return this._zr.getWidth()},k.getHeight=function(){return this._zr.getHeight()},k.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},k.getRenderedCanvas=function(t){if(a.canvasSupported){(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor");var e=this._zr,n=e.storage.getDisplayList();return i.each(n,(function(t){t.stopAnimation(!0)})),e.painter.getRenderedCanvas(t)}},k.getSvgDataUrl=function(){if(a.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return i.each(e,(function(t){t.stopAnimation(!0)})),t.painter.pathToSvg()}},k.getDataURL=function(t){var e=(t=t||{}).excludeComponents,i=this._model,n=[],a=this;M(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 r="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return M(n,(function(t){t.group.ignore=!1})),r},k.getConnectedDataURL=function(t){if(a.canvasSupported){var n=this.group,r=Math.min,o=Math.max,s=1/0;if(rt[n]){var l=s,h=s,u=-1/0,c=-1/0,d=[],p=t&&t.pixelRatio||1;i.each(at,(function(e,a){if(e.group===n){var s=e.getRenderedCanvas(i.clone(t)),p=e.getDom().getBoundingClientRect();l=r(p.left,l),h=r(p.top,h),u=o(p.right,u),c=o(p.bottom,c),d.push({dom:s,left:p.left,top:p.top})}}));var f=(u*=p)-(l*=p),g=(c*=p)-(h*=p),v=i.createCanvas();v.width=f,v.height=g;var y=e.init(v);return M(d,(function(t){var e=new m.Image({style:{x:t.left*p-l,y:t.top*p-h,image:t.dom}});y.add(e)})),y.refreshImmediately(),v.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},k.convertToPixel=i.curry(O,"convertToPixel"),k.convertFromPixel=i.curry(O,"convertFromPixel"),k.containPixel=function(t,e){var n,a=this._model;return t=y.parseFinder(a,t),i.each(t,(function(t,a){a.indexOf("Models")>=0&&i.each(t,(function(t){var i=t.coordinateSystem;if(i&&i.containPoint)n|=!!i.containPoint(e);else if("seriesModels"===a){var r=this._chartsMap[t.__viewId];r&&r.containPoint&&(n|=r.containPoint(e,t))}}),this)}),this),!!n},k.getVisual=function(t,e){var i=this._model,n=(t=y.parseFinder(i,t,{defaultMainType:"series"})).seriesModel.getData(),a=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?n.indexOfRawIndex(t.dataIndex):null;return null!=a?n.getItemVisual(a,e):n.getVisual(e)},k.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},k.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var z={update:function(t){var e=this._model,i=this._api,r=this._coordSysMgr,o=this._zr;if(e){e.restoreData(),r.create(this._model,this._api),W.call(this,e,i),H.call(this,e),r.update(e,i),Z.call(this,e,t),U.call(this,e,t);var s=e.get("backgroundColor")||"transparent",l=o.painter;if(l.isSingleCanvas&&l.isSingleCanvas())o.configLayer(0,{clearColor:s});else{if(!a.canvasSupported){var h=n.parse(s);s=n.stringify(h,"rgb"),0===h[3]&&(s="transparent")}s.colorStops||s.image?(o.configLayer(0,{clearColor:s}),this.__hasGradientOrPatternBg=!0,this._dom.style.background="transparent"):(this.__hasGradientOrPatternBg&&o.configLayer(0,{clearColor:null}),this.__hasGradientOrPatternBg=!1,this._dom.style.background=s)}M(tt,(function(t){t(e,i)}))}},updateView:function(t){var e=this._model;e&&(e.eachSeries((function(t){t.getData().clearAllVisual()})),Z.call(this,e,t),B.call(this,"updateView",e,t))},updateVisual:function(t){var e=this._model;e&&(e.eachSeries((function(t){t.getData().clearAllVisual()})),Z.call(this,e,t,!0),B.call(this,"updateVisual",e,t))},updateLayout:function(t){var e=this._model;e&&(F.call(this,e,t),B.call(this,"updateLayout",e,t))},prepareAndUpdate:function(t){var e=this._model;G.call(this,"component",e),G.call(this,"chart",e),z.update.call(this,t)}};function E(t,e,i,n,a){var r=t._model;if(n){var o={};o[n+"Id"]=i[n+"Id"],o[n+"Index"]=i[n+"Index"],o[n+"Name"]=i[n+"Name"];var s={mainType:n,query:o};a&&(s.subType=a),r&&r.eachComponent(s,(function(e,i){l(t["series"===n?"_chartsMap":"_componentsMap"][e.__viewId])}),t)}else M(t._componentsViews.concat(t._chartsViews),l);function l(n){n&&n.__alive&&n[e]&&n[e](n.__model,r,t._api,i)}}function R(t,e){var n=t.type,a=t.escapeConnect,r=$[n],o=r.actionInfo,s=(o.update||"update").split(":"),l=s.pop();s=null!=s[0]&&I(s[0]),this[T]=!0;var h=[t],u=!1;t.batch&&(u=!0,h=i.map(t.batch,(function(e){return(e=i.defaults(i.extend({},e),t)).batch=null,e})));var c,d=[],p="highlight"===n||"downplay"===n;M(h,(function(t){(c=(c=r.action(t,this._model,this._api))||i.extend({},t)).type=o.event||c.type,d.push(c),p?E(this,l,t,"series"):s&&E(this,l,t,s.main,s.sub)}),this),"none"===l||p||s||(this.__optionUpdated?(z.prepareAndUpdate.call(this,t),this.__optionUpdated=!1):z[l].call(this,t)),c=u?{type:o.event||n,escapeConnect:a,batch:d}:d[0],this[T]=!1,!e&&this._messageCenter.trigger(c.type,c)}function N(t){for(var e=this._pendingActions;e.length;){var i=e.shift();R.call(this,i,t)}}function V(t){!t&&this.trigger("updated")}function B(t,e,i){var n=this._api;M(this._componentsViews,(function(a){var r=a.__model;a[t](r,e,n,i),Y(r,a)}),this),e.eachSeries((function(a,r){var o=this._chartsMap[a.__viewId];o[t](a,e,n,i),Y(a,o),X(a,o)}),this),q(this._zr,e),M(tt,(function(t){t(e,n)}))}function G(t,e){for(var i="component"===t,n=i?this._componentsViews:this._chartsViews,a=i?this._componentsMap:this._chartsMap,r=this._zr,o=0;o<n.length;o++)n[o].__alive=!1;e[i?"eachComponent":"eachSeries"]((function(t,o){if(i){if("series"===t)return}else o=t;var s="_ec_"+o.id+"_"+o.type,l=a[s];if(!l){var h=I(o.type),u=i?f.getClass(h.main,h.sub):g.getClass(h.sub);if(!u)return;(l=new u).init(e,this._api),a[s]=l,n.push(l),r.add(l.group)}o.__viewId=l.__id=s,l.__alive=!0,l.__model=o,l.group.__ecComponentInfo={mainType:o.mainType,index:o.componentIndex}}),this);for(o=0;o<n.length;){var s=n[o];s.__alive?o++:(r.remove(s.group),s.dispose(e,this._api),n.splice(o,1),delete a[s.__id],s.__id=s.group.__ecComponentInfo=null)}}function W(t,e){M(J,(function(i){i.func(t,e)}))}function H(t){var e={};t.eachSeries((function(t){var i=t.get("stack"),n=t.getData();if(i&&"list"===n.type){var a=e[i];e.hasOwnProperty(i)&&a&&(n.stackedOn=a),e[i]=n}}))}function F(t,e){var i=this._api;M(et,(function(n){n.isLayout&&n.func(t,i,e)}))}function Z(t,e,i){var n=this._api;t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()})),M(et,(function(a){(!i||!a.isLayout)&&a.func(t,n,e)}))}function U(t,e){var i=this._api;M(this._componentsViews,(function(n){var a=n.__model;n.render(a,t,i,e),Y(a,n)}),this),M(this._chartsViews,(function(t){t.__alive=!1}),this),t.eachSeries((function(n,a){var r=this._chartsMap[n.__viewId];r.__alive=!0,r.render(n,t,i,e),r.group.silent=!!n.get("silent"),Y(n,r),X(n,r)}),this),q(this._zr,t),M(this._chartsViews,(function(e){e.__alive||e.remove(t,i)}),this)}k.resize=function(t){this[T]=!0,this._zr.resize(t);var e=this._model&&this._model.resetOption("media");z[e?"prepareAndUpdate":"update"].call(this),this._loadingFX&&this._loadingFX.resize(),this[T]=!1;var i=t&&t.silent;N.call(this,i),V.call(this,i)},k.showLoading=function(t,e){if(i.isObject(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),nt[t]){var n=nt[t](this._api,e),a=this._zr;this._loadingFX=n,a.add(n)}},k.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},k.makeActionFromEvent=function(t){var e=i.extend({},t);return e.type=K[t.type],e},k.dispatchAction=function(t,e){i.isObject(e)||(e={silent:!!e}),$[t.type]&&this._model&&(this[T]?this._pendingActions.push(t):(R.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&a.browser.weChat&&this._throttledZrFlush(),N.call(this,e.silent),V.call(this,e.silent)))},k.on=L("on"),k.off=L("off"),k.one=L("one");var j=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function q(t,e){var i=t.storage,n=0;i.traverse((function(t){t.isGroup||n++})),n>e.get("hoverLayerThreshold")&&!a.node&&i.traverse((function(t){t.isGroup||(t.useHoverLayer=!0)}))}function X(t,e){var i=0;e.group.traverse((function(t){"group"===t.type||t.ignore||i++}));var n=+t.get("progressive"),r=i>t.get("progressiveThreshold")&&n&&!a.node;r&&e.group.traverse((function(t){t.isGroup||(t.progressive=r?Math.floor(i++/n):-1,r&&t.stopAnimation(!0))}));var o=t.get("blendMode")||null;e.group.traverse((function(t){t.isGroup||t.setStyle("blend",o)}))}function Y(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse((function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))}))}k._initEvents=function(){M(j,(function(t){this._zr.on(t,(function(e){var n,a=this.getModel(),r=e.target;if("globalout"===t)n={};else if(r&&null!=r.dataIndex){var o=r.dataModel||a.getSeriesByIndex(r.seriesIndex);n=o&&o.getDataParams(r.dataIndex,r.dataType)||{}}else r&&r.eventData&&(n=i.extend({},r.eventData));n&&(n.event=e,n.type=t,this.trigger(t,n))}),this)}),this),M(K,(function(t,e){this._messageCenter.on(e,(function(t){this.trigger(e,t)}),this)}),this)},k.isDisposed=function(){return this._disposed},k.clear=function(){this.setOption({series:[]},!0)},k.dispose=function(){if(!this._disposed){this._disposed=!0;var t=this._api,e=this._model;M(this._componentsViews,(function(i){i.dispose(e,t)})),M(this._chartsViews,(function(i){i.dispose(e,t)})),this._zr.dispose(),delete at[this.id]}},i.mixin(P,o);var $={},K={},J=[],Q=[],tt=[],et=[],it={},nt={},at={},rt={},st=new Date-0,lt=new Date-0,ht="_echarts_instance_",ut={};function ct(t){rt[t]=!1}var dt=ct;function pt(t){var e;return e=t.getAttribute?t.getAttribute(ht):t._echarts_instance_,at[e]}function ft(t){Q.push(t)}function gt(t,e,n){"function"==typeof e&&(n=e,e="");var a=i.isObject(t)?t.type:[t,t={event:e}][0];t.event=(t.event||a).toLowerCase(),e=t.event,i.assert(C.test(a)&&C.test(e)),$[a]||($[a]={action:n,actionInfo:t}),K[e]=a}function mt(t,e){"function"==typeof t&&(e=t,t=3e3),et.push({prio:t,func:e})}function vt(t,e){nt[t]=e}mt(2e3,w),ft(c),vt("default",S),gt({type:"highlight",event:"highlight",update:"highlight"},i.noop),gt({type:"downplay",event:"downplay",update:"downplay"},i.noop);t.version="3.8.5",t.dependencies={zrender:"3.7.4"},t.PRIORITY=A,t.init=function(t,e,n){var a=pt(t);if(a)return a;var r=new P(t,e,n);return r.id="ec_"+st++,at[r.id]=r,t.setAttribute?t.setAttribute(ht,r.id):t._echarts_instance_=r.id,function(t){var e="__connectUpdateStatus";function n(t,i){for(var n=0;n<t.length;n++)t[n][e]=i}i.each(K,(function(a,r){t._messageCenter.on(r,(function(a){if(rt[t.group]&&0!==t[e]){if(a&&a.escapeConnect)return;var r=t.makeActionFromEvent(a),o=[];i.each(at,(function(e){e!==t&&e.group===t.group&&o.push(e)})),n(o,0),M(o,(function(t){1!==t[e]&&t.dispatchAction(r)})),n(o,2)}}))}))}(r),r},t.connect=function(t){if(i.isArray(t)){var e=t;t=null,i.each(e,(function(e){null!=e.group&&(t=e.group)})),t=t||"g_"+lt++,i.each(e,(function(e){e.group=t}))}return rt[t]=!0,t},t.disConnect=ct,t.disconnect=dt,t.dispose=function(t){"string"==typeof t?t=at[t]:t instanceof P||(t=pt(t)),t instanceof P&&!t.isDisposed()&&t.dispose()},t.getInstanceByDom=pt,t.getInstanceById=function(t){return at[t]},t.registerTheme=function(t,e){it[t]=e},t.registerPreprocessor=ft,t.registerProcessor=function(t,e){"function"==typeof t&&(e=t,t=1e3),J.push({prio:t,func:e})},t.registerPostUpdate=function(t){tt.push(t)},t.registerAction=gt,t.registerCoordinateSystem=function(t,e){h.register(t,e)},t.getCoordinateSystemDimensions=function(t){var e=h.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},t.registerLayout=function(t,e){"function"==typeof t&&(e=t,t=1e3),et.push({prio:t,func:e,isLayout:!0})},t.registerVisual=mt,t.registerLoading=vt,t.extendComponentModel=function(t){return d.extend(t)},t.extendComponentView=function(t){return f.extend(t)},t.extendSeriesModel=function(t){return p.extend(t)},t.extendChartView=function(t){return g.extend(t)},t.setCanvasCreator=function(t){i.$override("createCanvas",t)},t.registerMap=function(t,e,i){e.geoJson&&!e.features&&(i=e.specialAreas,e=e.geoJson),"string"==typeof e&&(e="undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")()),ut[t]={geoJson:e,specialAreas:i}},t.getMap=function(t){return ut[t]},t.dataTool={};var yt=Ud;!function(){for(var e in yt)yt.hasOwnProperty(e)&&(t[e]=yt[e])}()}(m);var Ug=Ep;yd.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){return Ug(t.data,this,e)},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clipOverflow:!0,label:{normal:{position:"top"}},lineStyle:{normal:{width:2,type:"solid"}},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:!1,connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}});var jg={},qg=ur.otherDimToDataDim;jg.findLabelValueDim=function(t){var e,i=qg(t,"label");if(i.length)e=i[0];else for(var n,a=t.dimensions.slice();a.length&&(e=a.pop(),"ordinal"===(n=t.getDimensionInfo(e).type)||"time"===n););return e};var Xg=b,Yg=Hf.createSymbol,$g=Vr,Kg=dr.parsePercent,Jg=jg.findLabelValueDim;function Qg(t){return[t[0]/2,t[1]/2]}function tm(t,e,i){$g.Group.call(this),this.updateData(t,e,i)}var em=tm.prototype;function im(t,e){this.parent.drift(t,e)}em._createSymbol=function(t,e,i,n){this.removeAll();var a=e.getItemVisual(i,"color"),r=Yg(t,-1,-1,2,2,a);r.attr({z2:100,culling:!0,scale:Qg(n)}),r.drift=im,this._symbolType=t,this.add(r)},em.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},em.getSymbolPath=function(){return this.childAt(0)},em.getScale=function(){return this.childAt(0).scale},em.highlight=function(){this.childAt(0).trigger("emphasis")},em.downplay=function(){this.childAt(0).trigger("normal")},em.setZ=function(t,e){var i=this.childAt(0);i.zlevel=t,i.z=e},em.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":"pointer"},em.updateData=function(t,e,i){this.silent=!1;var n=t.getItemVisual(e,"symbol")||"circle",a=t.hostModel,r=function(t,e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array?i.slice():[+i,+i]}(t,e),o=n!==this._symbolType;o?this._createSymbol(n,t,e,r):((s=this.childAt(0)).silent=!1,$g.updateProps(s,{scale:Qg(r)},a,e));if(this._updateCommon(t,e,r,i),o){var s=this.childAt(0),l=i&&i.fadeIn,h={scale:s.scale.slice()};l&&(h.style={opacity:s.style.opacity}),s.scale=[0,0],l&&(s.style.opacity=0),$g.initProps(s,h,a,e)}this._seriesModel=a};var nm=["itemStyle","normal"],am=["itemStyle","emphasis"],rm=["label","normal"],om=["label","emphasis"];em._updateCommon=function(t,e,i,n){var a=this.childAt(0),r=t.hostModel,o=t.getItemVisual(e,"color");"image"!==a.type&&a.useStyle({strokeNoScale:!0});var s=n&&n.itemStyle,l=n&&n.hoverItemStyle,h=n&&n.symbolRotate,u=n&&n.symbolOffset,c=n&&n.labelModel,d=n&&n.hoverLabelModel,p=n&&n.hoverAnimation,f=n&&n.cursorStyle;if(!n||t.hasItemOption){var g=n&&n.itemModel?n.itemModel:t.getItemModel(e);s=g.getModel(nm).getItemStyle(["color"]),l=g.getModel(am).getItemStyle(),h=g.getShallow("symbolRotate"),u=g.getShallow("symbolOffset"),c=g.getModel(rm),d=g.getModel(om),p=g.getShallow("hoverAnimation"),f=g.getShallow("cursor")}else l=Xg.extend({},l);var m=a.style;a.attr("rotation",(h||0)*Math.PI/180||0),u&&a.attr("position",[Kg(u[0],i[0]),Kg(u[1],i[1])]),f&&a.attr("cursor",f),a.setColor(o,n&&n.symbolInnerColor),a.setStyle(s);var v=t.getItemVisual(e,"opacity");null!=v&&(m.opacity=v);var y=n&&n.useNameLabel,x=!y&&Jg(t);(y||null!=x)&&$g.setLabelStyle(m,l,c,d,{labelFetcher:r,labelDataIndex:e,defaultText:y?t.getName(e):t.get(x,e),isRectText:!0,autoColor:o}),a.off("mouseover").off("mouseout").off("emphasis").off("normal"),a.hoverStyle=l,$g.setHoverStyle(a);var _=Qg(i);if(p&&r.isAnimationEnabled()){var b=function(){var t=_[1]/_[0];this.animateTo({scale:[Math.max(1.1*_[0],_[0]+3),Math.max(1.1*_[1],_[1]+3*t)]},400,"elasticOut")},w=function(){this.animateTo({scale:_},400,"elasticOut")};a.on("mouseover",b).on("mouseout",w).on("emphasis",b).on("normal",w)}},em.fadeOut=function(t,e){var i=this.childAt(0);this.silent=i.silent=!0,(!e||!e.keepLabel)&&(i.style.text=null),$g.updateProps(i,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},Xg.inherits(tm,$g.Group);var sm=tm,lm=Vr,hm=sm;function um(t){this.group=new lm.Group,this._symbolCtor=t||hm}var cm=um.prototype;function dm(t,e,i){var n=t.getItemLayout(e);return n&&!isNaN(n[0])&&!isNaN(n[1])&&!(i&&i(e))&&"none"!==t.getItemVisual(e,"symbol")}cm.updateData=function(t,e){var i=this.group,n=t.hostModel,a=this._data,r=this._symbolCtor,o={itemStyle:n.getModel("itemStyle.normal").getItemStyle(["color"]),hoverItemStyle:n.getModel("itemStyle.emphasis").getItemStyle(),symbolRotate:n.get("symbolRotate"),symbolOffset:n.get("symbolOffset"),hoverAnimation:n.get("hoverAnimation"),labelModel:n.getModel("label.normal"),hoverLabelModel:n.getModel("label.emphasis"),cursorStyle:n.get("cursor")};t.diff(a).add((function(n){var a=t.getItemLayout(n);if(dm(t,n,e)){var s=new r(t,n,o);s.attr("position",a),t.setItemGraphicEl(n,s),i.add(s)}})).update((function(s,l){var h=a.getItemGraphicEl(l),u=t.getItemLayout(s);dm(t,s,e)?(h?(h.updateData(t,s,o),lm.updateProps(h,{position:u},n)):(h=new r(t,s)).attr("position",u),i.add(h),t.setItemGraphicEl(s,h)):i.remove(h)})).remove((function(t){var e=a.getItemGraphicEl(t);e&&e.fadeOut((function(){i.remove(e)}))})).execute(),this._data=t},cm.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl((function(e,i){var n=t.getItemLayout(i);e.attr("position",n)}))},cm.remove=function(t){var e=this.group,i=this._data;i&&(t?i.eachItemGraphicEl((function(t){t.fadeOut((function(){e.remove(t)}))})):e.removeAll())};var pm=um;function fm(t){return t>=0?1:-1}function gm(t,e,i){for(var n,a=t.getBaseAxis(),r=t.getOtherAxis(a),o=a.onZero?0:r.scale.getExtent()[0],s=r.dim,l="x"===s||"radius"===s?1:0,h=e.stackedOn,u=e.get(s,i);h&&fm(h.get(s,i))===fm(u);){n=h;break}var c=[];return c[l]=e.get(a.dim,i),c[1-l]=n?n.get(s,i,!0):o,t.dataToPoint(c)}var mm=function(t,e,i,n,a,r){for(var o=function(t,e){var i=[];return e.diff(t).add((function(t){i.push({cmd:"+",idx:t})})).update((function(t,e){i.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){i.push({cmd:"-",idx:t})})).execute(),i}(t,e),s=[],l=[],h=[],u=[],c=[],d=[],p=[],f=r.dimensions,g=0;g<o.length;g++){var m=o[g],v=!0;switch(m.cmd){case"=":var y=t.getItemLayout(m.idx),x=e.getItemLayout(m.idx1);(isNaN(y[0])||isNaN(y[1]))&&(y=x.slice()),s.push(y),l.push(x),h.push(i[m.idx]),u.push(n[m.idx1]),p.push(e.getRawIndex(m.idx1));break;case"+":var _=m.idx;s.push(a.dataToPoint([e.get(f[0],_,!0),e.get(f[1],_,!0)])),l.push(e.getItemLayout(_).slice()),h.push(gm(a,e,_)),u.push(n[_]),p.push(e.getRawIndex(_));break;case"-":_=m.idx;var b=t.getRawIndex(_);b!==_?(s.push(t.getItemLayout(_)),l.push(r.dataToPoint([t.get(f[0],_,!0),t.get(f[1],_,!0)])),h.push(i[_]),u.push(gm(r,t,_)),p.push(b)):v=!1}v&&(c.push(m),d.push(d.length))}d.sort((function(t,e){return p[t]-p[e]}));var w=[],S=[],M=[],I=[],A=[];for(g=0;g<d.length;g++){_=d[g];w[g]=s[_],S[g]=l[_],M[g]=h[_],I[g]=u[_],A[g]=c[_]}return{current:w,next:S,stackedOnCurrent:M,stackedOnNext:I,status:A}},vm={},ym=ms,xm=U,_m=js,bm=xm.min,wm=xm.max,Sm=xm.scaleAndAdd,Mm=xm.copy,Im=[],Am=[],Tm=[];function Cm(t){return isNaN(t[0])||isNaN(t[1])}function Lm(t,e,i,n,a,r,o,s,l,h,u){for(var c=0,d=i,p=0;p<n;p++){var f=e[d];if(d>=a||d<0)break;if(Cm(f)){if(u){d+=r;continue}break}if(d===i)t[r>0?"moveTo":"lineTo"](f[0],f[1]),Mm(Am,f);else if(l>0){var g=d+r,m=e[g];if(u)for(;m&&Cm(e[g]);)m=e[g+=r];var v=.5,y=e[c];if(!(m=e[g])||Cm(m))Mm(Tm,f);else{var x,_;if(Cm(m)&&!u&&(m=f),xm.sub(Im,m,y),"x"===h||"y"===h){var b="x"===h?0:1;x=Math.abs(f[b]-y[b]),_=Math.abs(f[b]-m[b])}else x=xm.dist(f,y),_=xm.dist(f,m);Sm(Tm,f,Im,-l*(1-(v=_/(_+x))))}bm(Am,Am,s),wm(Am,Am,o),bm(Tm,Tm,s),wm(Tm,Tm,o),t.bezierCurveTo(Am[0],Am[1],Tm[0],Tm[1],f[0],f[1]),Sm(Am,f,Im,l*v)}else t.lineTo(f[0],f[1]);c=d,d+=r}return p}function Dm(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var a=0;a<t.length;a++){var r=t[a];r[0]<i[0]&&(i[0]=r[0]),r[1]<i[1]&&(i[1]=r[1]),r[0]>n[0]&&(n[0]=r[0]),r[1]>n[1]&&(n[1]=r[1])}return{min:e?i:n,max:e?n:i}}var Pm=ym.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:_m(ym.prototype.brush),buildPath:function(t,e){var i=e.points,n=0,a=i.length,r=Dm(i,e.smoothConstraint);if(e.connectNulls){for(;a>0&&Cm(i[a-1]);a--);for(;n<a&&Cm(i[n]);n++);}for(;n<a;)n+=Lm(t,i,n,a,a,1,r.min,r.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),km=ym.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:_m(ym.prototype.brush),buildPath:function(t,e){var i=e.points,n=e.stackedOnPoints,a=0,r=i.length,o=e.smoothMonotone,s=Dm(i,e.smoothConstraint),l=Dm(n,e.smoothConstraint);if(e.connectNulls){for(;r>0&&Cm(i[r-1]);r--);for(;a<r&&Cm(i[a]);a++);}for(;a<r;){var h=Lm(t,i,a,r,r,1,s.min,s.max,e.smooth,o,e.connectNulls);Lm(t,n,a+h-1,h,r,-1,l.min,l.max,e.stackedOnSmooth,o,e.connectNulls),a+=h+1,t.closePath()}}});vm.Polyline=Pm,vm.Polygon=km;var Om=b,zm=pm,Em=sm,Rm=mm,Nm=Vr,Vm=ur,Bm=vm,Gm=Bm.Polyline,Wm=Bm.Polygon,Hm=zd;function Fm(t,e){if(t.length===e.length){for(var i=0;i<t.length;i++){var n=t[i],a=e[i];if(n[0]!==a[0]||n[1]!==a[1])return}return!0}}function Zm(t){return"number"==typeof t?t:t?.3:0}function Um(t){var e=t.getGlobalExtent();if(t.onBand){var i=t.getBandWidth()/2-1,n=e[1]>e[0]?1:-1;e[0]+=n*i,e[1]-=n*i}return e}function jm(t){return t>=0?1:-1}function qm(t,e,i){return"polar"===t.type?function(t,e,i){var n=t.getAngleAxis(),a=t.getRadiusAxis().getExtent(),r=n.getExtent(),o=Math.PI/180,s=new Nm.Sector({shape:{cx:t.cx,cy:t.cy,r0:a[0],r:a[1],startAngle:-r[0]*o,endAngle:-r[1]*o,clockwise:n.inverse}});return e&&(s.shape.endAngle=-r[0]*o,Nm.initProps(s,{shape:{endAngle:-r[1]*o}},i)),s}(t,e,i):function(t,e,i){var n=Um(t.getAxis("x")),a=Um(t.getAxis("y")),r=t.getBaseAxis().isHorizontal(),o=Math.min(n[0],n[1]),s=Math.min(a[0],a[1]),l=Math.max(n[0],n[1])-o,h=Math.max(a[0],a[1])-s,u=i.get("lineStyle.normal.width")||2,c=i.get("clipOverflow")?u/2:Math.max(l,h);r?(s-=c,h+=2*c):(o-=c,l+=2*c);var d=new Nm.Rect({shape:{x:o,y:s,width:l,height:h}});return e&&(d.shape[r?"width":"height"]=0,Nm.initProps(d,{shape:{width:l,height:h}},i)),d}(t,e,i)}function Xm(t,e,i){for(var n=e.getBaseAxis(),a="x"===n.dim||"radius"===n.dim?0:1,r=[],o=0;o<t.length-1;o++){var s=t[o+1],l=t[o];r.push(l);var h=[];switch(i){case"end":h[a]=s[a],h[1-a]=l[1-a],r.push(h);break;case"middle":var u=(l[a]+s[a])/2,c=[];h[a]=c[a]=u,h[1-a]=l[1-a],c[1-a]=s[1-a],r.push(h),r.push(c);break;default:h[a]=l[a],h[1-a]=s[1-a],r.push(h)}}return t[o]&&r.push(t[o]),r}Hm.extend({type:"line",init:function(){var t=new Nm.Group,e=new zm;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,i){var n=t.coordinateSystem,a=this.group,r=t.getData(),o=t.getModel("lineStyle.normal"),s=t.getModel("areaStyle.normal"),l=r.mapArray(r.getItemLayout,!0),h="polar"===n.type,u=this._coordSys,c=this._symbolDraw,d=this._polyline,p=this._polygon,f=this._lineGroup,g=t.get("animation"),m=!s.isEmpty(),v=function(t,e){var i=t.getBaseAxis(),n=t.getOtherAxis(i),a=0;if(!i.onZero){var r=n.scale.getExtent();r[0]>0?a=r[0]:r[1]<0&&(a=r[1])}var o=n.dim,s="x"===o||"radius"===o?1:0;return e.mapArray([o],(function(n,r){for(var l,h=e.stackedOn;h&&jm(h.get(o,r))===jm(n);){l=h;break}var u=[];return u[s]=e.get(i.dim,r),u[1-s]=l?l.get(o,r,!0):a,t.dataToPoint(u)}),!0)}(n,r),y=t.get("showSymbol"),x=y&&!h&&!t.get("showAllSymbol")&&this._getSymbolIgnoreFunc(r,n),_=this._data;_&&_.eachItemGraphicEl((function(t,e){t.__temp&&(a.remove(t),_.setItemGraphicEl(e,null))})),y||c.remove(),a.add(f);var b=!h&&t.get("step");d&&u.type===n.type&&b===this._step?(m&&!p?p=this._newPolygon(l,v,n,g):p&&!m&&(f.remove(p),p=this._polygon=null),f.setClipPath(qm(n,!1,t)),y&&c.updateData(r,x),r.eachItemGraphicEl((function(t){t.stopAnimation(!0)})),Fm(this._stackedOnPoints,v)&&Fm(this._points,l)||(g?this._updateAnimation(r,v,n,i,b):(b&&(l=Xm(l,n,b),v=Xm(v,n,b)),d.setShape({points:l}),p&&p.setShape({points:l,stackedOnPoints:v})))):(y&&c.updateData(r,x),b&&(l=Xm(l,n,b),v=Xm(v,n,b)),d=this._newPolyline(l,n,g),m&&(p=this._newPolygon(l,v,n,g)),f.setClipPath(qm(n,!0,t)));var w=function(t,e){var i=t.getVisual("visualMeta");if(i&&i.length&&t.count()){for(var n,a=i.length-1;a>=0;a--)if(i[a].dimension<2){n=i[a];break}if(n&&"cartesian2d"===e.type){var r=n.dimension,o=t.dimensions[r],s=e.getAxis(o),l=Om.map(n.stops,(function(t){return{coord:s.toGlobalCoord(s.dataToCoord(t.value)),color:t.color}})),h=l.length,u=n.outerColors.slice();h&&l[0].coord>l[h-1].coord&&(l.reverse(),u.reverse());var c=l[0].coord-10,d=l[h-1].coord+10,p=d-c;if(p<.001)return"transparent";Om.each(l,(function(t){t.offset=(t.coord-c)/p})),l.push({offset:h?l[h-1].offset:.5,color:u[1]||"transparent"}),l.unshift({offset:h?l[0].offset:.5,color:u[0]||"transparent"});var f=new Nm.LinearGradient(0,0,0,0,l,!0);return f[o]=c,f[o+"2"]=d,f}}}(r,n)||r.getVisual("color");d.useStyle(Om.defaults(o.getLineStyle(),{fill:"none",stroke:w,lineJoin:"bevel"}));var S=t.get("smooth");if(S=Zm(t.get("smooth")),d.setShape({smooth:S,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),p){var M=r.stackedOn,I=0;if(p.useStyle(Om.defaults(s.getAreaStyle(),{fill:w,opacity:.7,lineJoin:"bevel"})),M)I=Zm(M.hostModel.get("smooth"));p.setShape({smooth:S,stackedOnSmooth:I,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=r,this._coordSys=n,this._stackedOnPoints=v,this._points=l,this._step=b},dispose:function(){},highlight:function(t,e,i,n){var a=t.getData(),r=Vm.queryDataIndex(a,n);if(!(r instanceof Array)&&null!=r&&r>=0){var o=a.getItemGraphicEl(r);if(!o){var s=a.getItemLayout(r);if(!s)return;(o=new Em(a,r)).position=s,o.setZ(t.get("zlevel"),t.get("z")),o.ignore=isNaN(s[0])||isNaN(s[1]),o.__temp=!0,a.setItemGraphicEl(r,o),o.stopSymbolAnimation(!0),this.group.add(o)}o.highlight()}else Hm.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var a=t.getData(),r=Vm.queryDataIndex(a,n);if(null!=r&&r>=0){var o=a.getItemGraphicEl(r);o&&(o.__temp?(a.setItemGraphicEl(r,null),this.group.remove(o)):o.downplay())}else Hm.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Gm({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new Wm({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_getSymbolIgnoreFunc:function(t,e){var i=e.getAxesByScale("ordinal")[0];if(i&&i.isLabelIgnored)return Om.bind(i.isLabelIgnored,i)},_updateAnimation:function(t,e,i,n,a){var r=this._polyline,o=this._polygon,s=t.hostModel,l=Rm(this._data,t,this._stackedOnPoints,e,this._coordSys,i),h=l.current,u=l.stackedOnCurrent,c=l.next,d=l.stackedOnNext;a&&(h=Xm(l.current,i,a),u=Xm(l.stackedOnCurrent,i,a),c=Xm(l.next,i,a),d=Xm(l.stackedOnNext,i,a)),r.shape.__points=l.current,r.shape.points=h,Nm.updateProps(r,{shape:{points:c}},s),o&&(o.setShape({points:h,stackedOnPoints:u}),Nm.updateProps(o,{shape:{points:c,stackedOnPoints:d}},s));for(var p=[],f=l.status,g=0;g<f.length;g++){if("="===f[g].cmd){var m=t.getItemGraphicEl(f[g].idx1);m&&p.push({el:m,ptIdx:g})}}r.animators&&r.animators.length&&r.animators[0].during((function(){for(var t=0;t<p.length;t++){p[t].el.attr("position",r.shape.__points[p[t].ptIdx])}}))},remove:function(t){var e=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl((function(t,n){t.__temp&&(e.remove(t),i.setItemGraphicEl(n,null))})),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});var Ym=function(t,e,i,n,a){n.eachRawSeriesByType(t,(function(t){var a=t.getData(),r=t.get("symbol")||e,o=t.get("symbolSize");a.setVisual({legendSymbol:i||r,symbol:r,symbolSize:o}),n.isSeriesFiltered(t)||("function"==typeof o&&a.each((function(e){var i=t.getRawValue(e),n=t.getDataParams(e);a.setItemVisual(e,"symbolSize",o(i,n))})),a.each((function(t){var e=a.getItemModel(t),i=e.getShallow("symbol",!0),n=e.getShallow("symbolSize",!0);null!=i&&a.setItemVisual(t,"symbol",i),null!=n&&a.setItemVisual(t,"symbolSize",n)})))}))};var $m=function(t,e){e.eachSeriesByType(t,(function(t){var e=t.getData(),i=t.coordinateSystem;if(i){for(var n=[],a=i.dimensions,r=0;r<a.length;r++)n.push(t.coordDimToDataDim(i.dimensions[r])[0]);1===n.length?e.each(n[0],(function(t,n){e.setItemLayout(n,isNaN(t)?[NaN,NaN]:i.dataToPoint(t))})):2===n.length&&e.each(n,(function(t,n,a){e.setItemLayout(a,isNaN(t)||isNaN(n)?[NaN,NaN]:i.dataToPoint([t,n]))}),!0)}}))},Km={average:function(t){for(var e=0,i=0,n=0;n<t.length;n++)isNaN(t[n])||(e+=t[n],i++);return 0===i?NaN:e/i},sum:function(t){for(var e=0,i=0;i<t.length;i++)e+=t[i]||0;return e},max:function(t){for(var e=-1/0,i=0;i<t.length;i++)t[i]>e&&(e=t[i]);return e},min:function(t){for(var e=1/0,i=0;i<t.length;i++)t[i]<e&&(e=t[i]);return e},nearest:function(t){return t[0]}},Jm=function(t,e){return Math.round(t.length/2)};var Qm=function(t,e,i){e.eachSeriesByType(t,(function(t){var e=t.getData(),i=t.get("sampling"),n=t.coordinateSystem;if("cartesian2d"===n.type&&i){var a,r=n.getBaseAxis(),o=n.getOtherAxis(r),s=r.getExtent(),l=s[1]-s[0],h=Math.round(e.count()/l);if(h>1)"string"==typeof i?a=Km[i]:"function"==typeof i&&(a=i),a&&(e=e.downSample(o.dim,1/h,a,Jm),t.setData(e))}}),this)},tv=b;function ev(t){return this._axes[t]}var iv=function(t){this._axes={},this._dimList=[],this.name=t||""};iv.prototype={constructor:iv,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return tv.map(this._dimList,ev,this)},getAxesByScale:function(t){return t=t.toLowerCase(),tv.filter(this.getAxes(),(function(e){return e.scale.type===t}))},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var i=this._dimList,n=t instanceof Array?[]:{},a=0;a<i.length;a++){var r=i[a],o=this._axes[r];n[r]=o[e](t[r])}return n}};var nv=b,av=iv;function rv(t){av.call(this,t)}rv.prototype={constructor:rv,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(t){var e=this.getAxis("x"),i=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e){var i=this.getAxis("x"),n=this.getAxis("y");return[i.toGlobalCoord(i.dataToCoord(t[0],e)),n.toGlobalCoord(n.dataToCoord(t[1],e))]},pointToData:function(t,e){var i=this.getAxis("x"),n=this.getAxis("y");return[i.coordToData(i.toLocalCoord(t[0]),e),n.coordToData(n.toLocalCoord(t[1]),e)]},getOtherAxis:function(t){return this.getAxis("x"===t.dim?"y":"x")}},nv.inherits(rv,av);var ov=rv,sv=b,lv=gg,hv=function(t,e,i,n,a){lv.call(this,t,e,i),this.type=n||"value",this.position=a||"bottom"};hv.prototype={constructor:hv,index:0,onZero:!1,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getGlobalExtent:function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},isLabelIgnored:function(t){if("category"===this.type){var e=this.getLabelInterval();return"function"==typeof e&&!e(t,this.scale.getLabel(t))||t%(e+1)}},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},sv.inherits(hv,lv);var uv=hv,cv=b,dv={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},pv={};pv.categoryAxis=cv.merge({boundaryGap:!0,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},dv),pv.valueAxis=cv.merge({boundaryGap:[0,0],splitNumber:5},dv),pv.timeAxis=cv.defaults({scale:!0,min:"dataMin",max:"dataMax"},pv.valueAxis),pv.logAxis=cv.defaults({scale:!0,logBase:10},pv.valueAxis);var fv=pv,gv=b,mv=fv,vv=Zu,yv=wu,xv=yv.getLayoutParams,_v=yv.mergeLayoutParam,bv=["value","category","time","log"];var wv=function(t,e,i,n){gv.each(bv,(function(a){e.extend({type:t+"Axis."+a,mergeDefaultAndTheme:function(e,n){var r=this.layoutMode,o=r?xv(e):{},s=n.getTheme();gv.merge(e,s.get(a+"Axis")),gv.merge(e,this.getDefaultOption()),e.type=i(t,e),r&&_v(e,o,r)},defaultOption:gv.mergeAll([{},mv[a+"Axis"],n],!0)})})),vv.registerSubTypeDefaulter(t+"Axis",gv.curry(i,t))},Sv=b,Mv=wv,Iv=Wf,Av=Zu.extend({type:"cartesian2dAxis",axis:null,init:function(){Av.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Av.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Av.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function Tv(t,e){return e.type||(e.data?"category":"value")}Sv.merge(Av.prototype,Iv);var Cv={offset:0};Mv("x",Av,Tv,Cv),Mv("y",Av,Tv,Cv),Zu.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var Lv=b,Dv=Je,Pv=wu.getLayoutRect,kv=Rp,Ov=ov,zv=uv,Ev=_c,Rv=Lv.each,Nv=kv.ifAxisCrossZero,Vv=kv.niceScaleExtent;function Bv(t,e,i){return t.getCoordSysModel()===e}function Gv(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}var Wv=Gv.prototype;function Hv(t,e,i){var n=t[e];if(i.onZero){var a=i.onZeroAxisIndex;if(null==a){for(var r in n){if(n.hasOwnProperty(r))if((o=n[r])&&!Fv(o)){a=+r;break}}null==a&&(i.onZero=!1),i.onZeroAxisIndex=a}else{var o;(o=n[a])&&Fv(o)&&(i.onZero=!1)}}}function Fv(t){return"category"===t.type||"time"===t.type||!Nv(t)}Wv.type="grid",Wv.axisPointerEnabled=!0,Wv.getRect=function(){return this._rect},Wv.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),Rv(i.x,(function(t){Vv(t.scale,t.model)})),Rv(i.y,(function(t){Vv(t.scale,t.model)})),Rv(i.x,(function(t){Hv(i,"y",t)})),Rv(i.y,(function(t){Hv(i,"x",t)})),this.resize(this.model,e)},Wv.resize=function(t,e,i){var n=Pv(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=n;var a=this._axesList;function r(){Rv(a,(function(t){var e=t.isHorizontal(),i=e?[0,n.width]:[0,n.height],a=t.inverse?1:0;t.setExtent(i[a],i[1-a]),function(t,e){var i=t.getExtent(),n=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}(t,e?n.x:n.y)}))}r(),!i&&t.get("containLabel")&&(Rv(a,(function(t){if(!t.model.get("axisLabel.inside")){var e=function(t){var e,i,n,a,r,o,s,l,h=t.model,u=h.getFormattedLabels(),c=h.getModel("axisLabel"),d=1,p=u.length;p>40&&(d=Math.ceil(p/40));for(var f=0;f<p;f+=d)if(!t.isLabelIgnored(f)){var g=(i=c.getTextRect(u[f]),n=void 0,a=void 0,r=void 0,o=void 0,s=void 0,l=void 0,n=(c.get("rotate")||0)*Math.PI/180,r=(a=i.plain()).width,o=a.height,s=r*Math.cos(n)+o*Math.sin(n),l=r*Math.sin(n)+o*Math.cos(n),new Dv(a.x,a.y,s,l));e?e.union(g):e=g}return e}(t);if(e){var i=t.isHorizontal()?"height":"width",a=t.model.get("axisLabel.margin");n[i]-=e[i]+a,"top"===t.position?n.y+=e.height+a:"left"===t.position&&(n.x+=e.width+a)}}})),r())},Wv.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]}},Wv.getAxes=function(){return this._axesList.slice()},Wv.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}Lv.isObject(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,a=this._coordsList;n<a.length;n++)if(a[n].getAxis("x").index===t||a[n].getAxis("y").index===e)return a[n]},Wv.getCartesians=function(){return this._coordsList.slice()},Wv.convertToPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.dataToPoint(i):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(i)):null},Wv.convertFromPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.pointToData(i):n.axis?n.axis.coordToData(n.axis.toLocalCoord(i)):null},Wv._findConvertTarget=function(t,e){var i,n,a=e.seriesModel,r=e.xAxisModel||a&&a.getReferringComponents("xAxis")[0],o=e.yAxisModel||a&&a.getReferringComponents("yAxis")[0],s=e.gridModel,l=this._coordsList;if(a)i=a.coordinateSystem,Lv.indexOf(l,i)<0&&(i=null);else if(r&&o)i=this.getCartesian(r.componentIndex,o.componentIndex);else if(r)n=this.getAxis("x",r.componentIndex);else if(o)n=this.getAxis("y",o.componentIndex);else if(s){s.coordinateSystem===this&&(i=this._coordsList[0])}return{cartesian:i,axis:n}},Wv.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},Wv._initCartesian=function(t,e,i){var n={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},r={x:0,y:0};if(e.eachComponent("xAxis",o("x"),this),e.eachComponent("yAxis",o("y"),this),!r.x||!r.y)return this._axesMap={},void(this._axesList=[]);function o(e){return function(i,o){if(Bv(i,t)){var s=i.get("position");"x"===e?"top"!==s&&"bottom"!==s&&n[s="bottom"]&&(s="top"===s?"bottom":"top"):"left"!==s&&"right"!==s&&n[s="left"]&&(s="left"===s?"right":"left"),n[s]=!0;var l=new zv(e,kv.createScaleByModel(i),[0,0],i.get("type"),s),h="category"===l.type;l.onBand=h&&i.get("boundaryGap"),l.inverse=i.get("inverse"),l.onZero=i.get("axisLine.onZero"),l.onZeroAxisIndex=i.get("axisLine.onZeroAxisIndex"),i.axis=l,l.model=i,l.grid=this,l.index=o,this._axesList.push(l),a[e][o]=l,r[e]++}}}this._axesMap=a,Rv(a.x,(function(e,i){Rv(a.y,(function(n,a){var r="x"+i+"y"+a,o=new Ov(r);o.grid=this,o.model=t,this._coordsMap[r]=o,this._coordsList.push(o),o.addAxis(e),o.addAxis(n)}),this)}),this)},Wv._updateScale=function(t,e){function i(t,e,i){Rv(i.coordDimToDataDim(e.dim),(function(i){e.scale.unionExtentFromData(t,i)}))}Lv.each(this._axesList,(function(t){t.scale.setExtent(1/0,-1/0)})),t.eachSeries((function(t){if(jv(t)){var n=Uv(t),a=n[0],r=n[1];if(!Bv(a,e)||!Bv(r,e))return;var o=this.getCartesian(a.componentIndex,r.componentIndex),s=t.getData(),l=o.getAxis("x"),h=o.getAxis("y");"list"===s.type&&(i(s,l,t),i(s,h,t))}}),this)},Wv.getTooltipAxes=function(t){var e=[],i=[];return Rv(this.getCartesians(),(function(n){var a=null!=t&&"auto"!==t?n.getAxis(t):n.getBaseAxis(),r=n.getOtherAxis(a);Lv.indexOf(e,a)<0&&e.push(a),Lv.indexOf(i,r)<0&&i.push(r)})),{baseAxes:e,otherAxes:i}};var Zv=["xAxis","yAxis"];function Uv(t,e){return Lv.map(Zv,(function(e){return t.getReferringComponents(e)[0]}))}function jv(t){return"cartesian2d"===t.get("coordinateSystem")}Gv.create=function(t,e){var i=[];return t.eachComponent("grid",(function(n,a){var r=new Gv(n,t,e);r.name="grid_"+a,r.resize(n,e,!0),n.coordinateSystem=r,i.push(r)})),t.eachSeries((function(t){if(jv(t)){var e=Uv(t),i=e[0],n=e[1],a=i.getCoordSysModel().coordinateSystem;t.coordinateSystem=a.getCartesian(i.componentIndex,n.componentIndex)}})),i},Gv.dimensions=Gv.prototype.dimensions=Ov.prototype.dimensions,Ev.register("cartesian2d",Gv);var qv=b,Xv=qv.retrieve,Yv=qv.defaults,$v=qv.extend,Kv=qv.each,Jv=cr,Qv=Vr,ty=ru,ey=dr,iy=ey.isRadianAroundZero,ny=ey.remRadian,ay=Hf.createSymbol,ry=mt,oy=U.applyTransform,sy=Math.PI;function ly(t){var e={componentType:t.mainType};return e[t.mainType+"Index"]=t.componentIndex,e}var hy=function(t,e){this.opt=e,this.axisModel=t,Yv(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new Qv.Group;var i=new Qv.Group({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};hy.prototype={constructor:hy,hasBuilder:function(t){return!!uy[t]},add:function(t){uy[t].call(this)},getGroup:function(){return this.group}};var uy={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],r=[i[1],0];n&&(oy(a,a,n),oy(r,r,n));var o=$v({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new Qv.Line(Qv.subPixelOptimizeLine({anid:"line",shape:{x1:a[0],y1:a[1],x2:r[0],y2:r[1]},style:o,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1})));var s=e.get("axisLine.symbol"),l=e.get("axisLine.symbolSize");if(null!=s){"string"==typeof s&&(s=[s,s]),"string"!=typeof l&&"number"!=typeof l||(l=[l,l]);var h=l[0],u=l[1];Kv([[t.rotation+Math.PI/2,a],[t.rotation-Math.PI/2,r]],(function(t,e){if("none"!==s[e]&&null!=s[e]){var i=ay(s[e],-h/2,-u/2,h,u,o.stroke,!0);i.attr({rotation:t[0],position:t[1],silent:!0}),this.group.add(i)}}),this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,i=function(t,e,i){var n=e.axis;if(!e.get("axisTick.show")||n.scale.isBlank())return;for(var a=e.getModel("axisTick"),r=a.getModel("lineStyle"),o=a.get("length"),s=vy(a,i.labelInterval),l=n.getTicksCoords(a.get("alignWithLabel")),h=n.scale.getTicks(),u=e.get("axisLabel.showMinLabel"),c=e.get("axisLabel.showMaxLabel"),d=[],p=[],f=t._transform,g=[],m=l.length,v=0;v<m;v++)if(!my(n,v,s,m,u,c)){var y=l[v];d[0]=y,d[1]=0,p[0]=y,p[1]=i.tickDirection*o,f&&(oy(d,d,f),oy(p,p,f));var x=new Qv.Line(Qv.subPixelOptimizeLine({anid:"tick_"+h[v],shape:{x1:d[0],y1:d[1],x2:p[0],y2:p[1]},style:Yv(r.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),z2:2,silent:!0}));t.group.add(x),g.push(x)}return g}(this,t,e),n=function(t,e,i){var n=e.axis;if(!Xv(i.axisLabelShow,e.get("axisLabel.show"))||n.scale.isBlank())return;var a=e.getModel("axisLabel"),r=a.get("margin"),o=n.scale.getTicks(),s=e.getFormattedLabels(),l=(Xv(i.labelRotate,a.get("rotate"))||0)*sy/180,h=cy(i.rotation,l,i.labelDirection),u=e.get("data"),c=[],d=dy(e),p=e.get("triggerEvent"),f=e.get("axisLabel.showMinLabel"),g=e.get("axisLabel.showMaxLabel");return Kv(o,(function(l,m){if(!my(n,m,i.labelInterval,o.length,f,g)){var v=a;u&&u[l]&&u[l].textStyle&&(v=new ty(u[l].textStyle,a,e.ecModel));var y=v.getTextColor()||e.get("axisLine.lineStyle.color"),x=[n.dataToCoord(l),i.labelOffset+i.labelDirection*r],_=n.scale.getLabel(l),b=new Qv.Text({anid:"label_"+l,position:x,rotation:h.rotation,silent:d,z2:10});Qv.setTextStyle(b.style,v,{text:s[m],textAlign:v.getShallow("align",!0)||h.textAlign,textVerticalAlign:v.getShallow("verticalAlign",!0)||v.getShallow("baseline",!0)||h.textVerticalAlign,textFill:"function"==typeof y?y("category"===n.type?_:"value"===n.type?l+"":l,m):y}),p&&(b.eventData=ly(e),b.eventData.targetType="axisLabel",b.eventData.value=_),t._dumbGroup.add(b),b.updateTransform(),c.push(b),t.group.add(b),b.decomposeTransform()}})),c}(this,t,e);!function(t,e,i){var n=t.get("axisLabel.showMinLabel"),a=t.get("axisLabel.showMaxLabel");i=i||[];var r=(e=e||[])[0],o=e[1],s=e[e.length-1],l=e[e.length-2],h=i[0],u=i[1],c=i[i.length-1],d=i[i.length-2];!1===n?(py(r),py(h)):fy(r,o)&&(n?(py(o),py(u)):(py(r),py(h)));!1===a?(py(s),py(c)):fy(l,s)&&(a?(py(l),py(d)):(py(s),py(c)))}(t,n,i)},axisName:function(){var t=this.opt,e=this.axisModel,i=Xv(t.axisName,e.get("name"));if(i){var n,a,r=e.get("nameLocation"),o=t.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,h=this.axisModel.axis.getExtent(),u=h[0]>h[1]?-1:1,c=["start"===r?h[0]-u*l:"end"===r?h[1]+u*l:(h[0]+h[1])/2,gy(r)?t.labelOffset+o*l:0],d=e.get("nameRotate");null!=d&&(d=d*sy/180),gy(r)?n=cy(t.rotation,null!=d?d:t.rotation,o):(n=function(t,e,i,n){var a,r,o=ny(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;iy(o-sy/2)?(r=l?"bottom":"top",a="center"):iy(o-1.5*sy)?(r=l?"top":"bottom",a="center"):(r="middle",a=o<1.5*sy&&o>sy/2?l?"left":"right":l?"right":"left");return{rotation:o,textAlign:a,textVerticalAlign:r}}(t,r,d||0,h),null!=(a=t.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(n.rotation)),!isFinite(a)&&(a=null)));var p=s.getFont(),f=e.get("nameTruncate",!0)||{},g=f.ellipsis,m=Xv(t.nameTruncateMaxWidth,f.maxWidth,a),v=null!=g&&null!=m?Jv.truncateText(i,m,p,g,{minChar:2,placeholder:f.placeholder}):i,y=e.get("tooltip",!0),x=e.mainType,_={componentType:x,name:i,$vars:["name"]};_[x+"Index"]=e.componentIndex;var b=new Qv.Text({anid:"name",__fullText:i,__truncatedText:v,position:c,rotation:n.rotation,silent:dy(e),z2:1,tooltip:y&&y.show?$v({content:i,formatter:function(){return i},formatterParams:_},y):null});Qv.setTextStyle(b.style,s,{text:v,textFont:p,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:n.textAlign,textVerticalAlign:n.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=ly(e),b.eventData.targetType="axisName",b.eventData.name=i),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},cy=hy.innerTextLayout=function(t,e,i){var n,a,r=ny(e-t);return iy(r)?(a=i>0?"top":"bottom",n="center"):iy(r-sy)?(a=i>0?"bottom":"top",n="center"):(a="middle",n=r>0&&r<sy?i>0?"right":"left":i>0?"left":"right"),{rotation:r,textAlign:n,textVerticalAlign:a}};function dy(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function py(t){t&&(t.ignore=!0)}function fy(t,e,i){var n=t&&t.getBoundingRect().clone(),a=e&&e.getBoundingRect().clone();if(n&&a){var r=ry.identity([]);return ry.rotate(r,r,-t.rotation),n.applyTransform(ry.mul([],r,t.getLocalTransform())),a.applyTransform(ry.mul([],r,e.getLocalTransform())),n.intersect(a)}}function gy(t){return"middle"===t||"center"===t}var my=hy.ifIgnoreOnTick=function(t,e,i,n,a,r){if(0===e&&a||e===n-1&&r)return!1;var o,s=t.scale;return"ordinal"===s.type&&("function"==typeof i?!i(o=s.getTicks()[e],s.getLabel(o)):e%(i+1))},vy=hy.getInterval=function(t,e){var i=t.get("interval");return null!=i&&"auto"!=i||(i=e),i};var yy=hy,xy={},_y=b,by=ru,wy=_y.each,Sy=_y.curry;function My(t,e){return"all"===t||_y.isArray(t)&&_y.indexOf(t,e)>=0||t===e}function Iy(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[Ty(t)]}function Ay(t){return!!t.get("handle.show")}function Ty(t){return t.type+"||"+t.id}xy.collect=function(t,e){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(t,e,i){var n=e.getComponent("tooltip"),a=e.getComponent("axisPointer"),r=a.get("link",!0)||[],o=[];wy(i.getCoordinateSystems(),(function(i){if(i.axisPointerEnabled){var s=Ty(i.model),l=t.coordSysAxesInfo[s]={};t.coordSysMap[s]=i;var h=i.model.getModel("tooltip",n);if(wy(i.getAxes(),Sy(p,!1,null)),i.getTooltipAxes&&n&&h.get("show")){var u="axis"===h.get("trigger"),c="cross"===h.get("axisPointer.type"),d=i.getTooltipAxes(h.get("axisPointer.axis"));(u||c)&&wy(d.baseAxes,Sy(p,!c||"cross",u)),c&&wy(d.otherAxes,Sy(p,"cross",!1))}}function p(n,s,u){var c=u.model.getModel("axisPointer",a),d=c.get("show");if(d&&("auto"!==d||n||Ay(c))){null==s&&(s=c.get("triggerTooltip")),c=n?function(t,e,i,n,a,r){var o=e.getModel("axisPointer"),s={};wy(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(t){s[t]=_y.clone(o.get(t))})),s.snap="category"!==t.type&&!!r,"cross"===o.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===a&&(l.show=!0,!r)){var h=s.lineStyle=o.get("crossStyle");h&&_y.defaults(l,h.textStyle)}return t.model.getModel("axisPointer",new by(s,i,n))}(u,h,a,e,n,s):c;var p=c.get("snap"),f=Ty(u.model),g=s||p||"category"===u.type,m=t.axesInfo[f]={key:f,axis:u,coordSys:i,axisPointerModel:c,triggerTooltip:s,involveSeries:g,snap:p,useHandle:Ay(c),seriesModels:[]};l[f]=m,t.seriesInvolved|=g;var v=function(t,e){for(var i=e.model,n=e.dim,a=0;a<t.length;a++){var r=t[a]||{};if(My(r[n+"AxisId"],i.id)||My(r[n+"AxisIndex"],i.componentIndex)||My(r[n+"AxisName"],i.name))return a}}(r,u);if(null!=v){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[f]=m,y.mapper=r[v].mapper,m.linkGroup=y}}}}))}(i,t,e),i.seriesInvolved&&function(t,e){e.eachSeries((function(e){var i=e.coordinateSystem,n=e.get("tooltip.trigger",!0),a=e.get("tooltip.show",!0);i&&"none"!==n&&!1!==n&&"item"!==n&&!1!==a&&!1!==e.get("axisPointer.show",!0)&&wy(t.coordSysAxesInfo[Ty(i.model)],(function(t){var n=t.axis;i.getAxis(n.dim)===n&&(t.seriesModels.push(e),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=e.getData().count())}))}),this)}(i,t),i},xy.fixValue=function(t){var e=Iy(t);if(e){var i=e.axisPointerModel,n=e.axis.scale,a=i.option,r=i.get("status"),o=i.get("value");null!=o&&(o=n.parse(o));var s=Ay(i);null==r&&(a.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==o||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),a.value=o,s&&(a.status=e.axis.scale.isBlank()?"hide":"show")}},xy.getAxisInfo=Iy,xy.getAxisPointerModel=function(t){var e=Iy(t);return e&&e.axisPointerModel},xy.makeKey=Ty;var Cy=xy,Ly=m.extendComponentView({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&Cy.fixValue(t),Ly.superApply(this,"render",arguments),Dy(this,t,e,i,n,!0)},updateAxisPointer:function(t,e,i,n,a){Dy(this,t,e,i,n,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),Ly.superApply(this,"remove",arguments)},dispose:function(t,e){Py(this,e),Ly.superApply(this,"dispose",arguments)}});function Dy(t,e,i,n,a,r){var o=Ly.getAxisPointerClass(t.axisPointerClass);if(o){var s=Cy.getAxisPointerModel(e);s?(t._axisPointer||(t._axisPointer=new o)).render(e,s,n,r):Py(t,n)}}function Py(t,e,i){var n=t._axisPointer;n&&n.dispose(e,i),t._axisPointer=null}var ky=[];Ly.registerAxisPointerClass=function(t,e){ky[t]=e},Ly.getAxisPointerClass=function(t){return t&&ky[t]};var Oy=Ly,zy={},Ey=b;zy.layout=function(t,e,i){i=i||{};var n=t.coordinateSystem,a=e.axis,r={},o=a.position,s=a.onZero?"onZero":o,l=a.dim,h=n.getRect(),u=[h.x,h.x+h.width,h.y,h.y+h.height],c={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,p="x"===l?[u[2]-d,u[3]+d]:[u[0]-d,u[1]+d];if(a.onZero){var f=n.getAxis("x"===l?"y":"x",a.onZeroAxisIndex),g=f.toGlobalCoord(f.dataToCoord(0));p[c.onZero]=Math.max(Math.min(g,p[1]),p[0])}r.position=["y"===l?p[c[s]]:u[0],"x"===l?p[c[s]]:u[3]],r.rotation=Math.PI/2*("x"===l?0:1),r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,left:-1,right:1}[o],r.labelOffset=a.onZero?p[c[o]]-p[c.onZero]:0,e.get("axisTick.inside")&&(r.tickDirection=-r.tickDirection),Ey.retrieve(i.labelInside,e.get("axisLabel.inside"))&&(r.labelDirection=-r.labelDirection);var m=e.get("axisLabel.rotate");return r.labelRotate="top"===s?-m:m,r.labelInterval=a.getLabelInterval(),r.z2=1,r};var Ry=b,Ny=Vr,Vy=yy,By=Oy,Gy=zy,Wy=Vy.ifIgnoreOnTick,Hy=Vy.getInterval,Fy=["axisLine","axisTickLabel","axisName"],Zy=["splitArea","splitLine"],Uy=By.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,i,n){this.group.removeAll();var a=this._axisGroup;if(this._axisGroup=new Ny.Group,this.group.add(this._axisGroup),t.get("show")){var r=t.getCoordSysModel(),o=Gy.layout(r,t),s=new Vy(t,o);Ry.each(Fy,s.add,s),this._axisGroup.add(s.getGroup()),Ry.each(Zy,(function(e){t.get(e+".show")&&this["_"+e](t,r,o.labelInterval)}),this),Ny.groupTransition(a,this._axisGroup,t),Uy.superCall(this,"render",t,e,i,n)}},_splitLine:function(t,e,i){var n=t.axis;if(!n.scale.isBlank()){var a=t.getModel("splitLine"),r=a.getModel("lineStyle"),o=r.get("color"),s=Hy(a,i);o=Ry.isArray(o)?o:[o];for(var l=e.coordinateSystem.getRect(),h=n.isHorizontal(),u=0,c=n.getTicksCoords(),d=n.scale.getTicks(),p=t.get("axisLabel.showMinLabel"),f=t.get("axisLabel.showMaxLabel"),g=[],m=[],v=r.getLineStyle(),y=0;y<c.length;y++)if(!Wy(n,y,s,c.length,p,f)){var x=n.toGlobalCoord(c[y]);h?(g[0]=x,g[1]=l.y,m[0]=x,m[1]=l.y+l.height):(g[0]=l.x,g[1]=x,m[0]=l.x+l.width,m[1]=x);var _=u++%o.length;this._axisGroup.add(new Ny.Line(Ny.subPixelOptimizeLine({anid:"line_"+d[y],shape:{x1:g[0],y1:g[1],x2:m[0],y2:m[1]},style:Ry.defaults({stroke:o[_]},v),silent:!0})))}}},_splitArea:function(t,e,i){var n=t.axis;if(!n.scale.isBlank()){var a=t.getModel("splitArea"),r=a.getModel("areaStyle"),o=r.get("color"),s=e.coordinateSystem.getRect(),l=n.getTicksCoords(),h=n.scale.getTicks(),u=n.toGlobalCoord(l[0]),c=n.toGlobalCoord(l[0]),d=0,p=Hy(a,i),f=r.getAreaStyle();o=Ry.isArray(o)?o:[o];for(var g=t.get("axisLabel.showMinLabel"),m=t.get("axisLabel.showMaxLabel"),v=1;v<l.length;v++)if(!Wy(n,v,p,l.length,g,m)){var y,x,_,b,w=n.toGlobalCoord(l[v]);n.isHorizontal()?(y=u,x=s.y,_=w-y,b=s.height):(y=s.x,x=c,_=s.width,b=w-x);var S=d++%o.length;this._axisGroup.add(new Ny.Rect({anid:"area_"+h[v],shape:{x:y,y:x,width:_,height:b},style:Ry.defaults({fill:o[S]},f),silent:!0})),u=y+_,c=x+b}}}});Uy.extend({type:"xAxis"}),Uy.extend({type:"yAxis"});var jy=m,qy=b,Xy=Vr;jy.extendComponentView({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new Xy.Rect({shape:t.coordinateSystem.getRect(),style:qy.defaults({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),jy.registerPreprocessor((function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}));var Yy=m,$y=b,Ky=Ym,Jy=$m,Qy=Qm;Yy.registerVisual($y.curry(Ky,"line","circle","line")),Yy.registerLayout($y.curry(Jy,"line")),Yy.registerProcessor(Yy.PRIORITY.PROCESSOR.STATISTIC,$y.curry(Qy,"line"));var tx=b,ex=dr.parsePercent;function ix(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function nx(t){return t.dim+t.index}function ax(t,e){var i={};tx.each(t,(function(t,e){var n=t.axisKey,a=t.bandWidth,r=i[n]||{bandWidth:a,remainedWidth:a,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},o=r.stacks;i[n]=r;var s=t.stackId;o[s]||r.autoWidthCount++,o[s]=o[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!o[s].width&&(o[s].width=l,l=Math.min(r.remainedWidth,l),r.remainedWidth-=l);var h=t.barMaxWidth;h&&(o[s].maxWidth=h);var u=t.barGap;null!=u&&(r.gap=u);var c=t.barCategoryGap;null!=c&&(r.categoryGap=c)}));var n={};return tx.each(i,(function(t,e){n[e]={};var i=t.stacks,a=t.bandWidth,r=ex(t.categoryGap,a),o=ex(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,h=(s-r)/(l+(l-1)*o);h=Math.max(h,0),tx.each(i,(function(t,e){var i=t.maxWidth;i&&i<h&&(i=Math.min(i,s),t.width&&(i=Math.min(i,t.width)),s-=i,t.width=i,l--)})),h=(s-r)/(l+(l-1)*o),h=Math.max(h,0);var u,c=0;tx.each(i,(function(t,e){t.width||(t.width=h),u=t,c+=t.width*(1+o)})),u&&(c-=u.width*o);var d=-c/2;tx.each(i,(function(t,i){n[e][i]=n[e][i]||{offset:d,width:t.width},d+=t.width*(1+o)}))})),n}function rx(t,e,i){var n,a=(n=tx.filter(e.getSeriesByType(t),(function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type})),ax(tx.map(n,(function(t){var e=t.getData(),i=t.coordinateSystem.getBaseAxis(),n=i.getExtent(),a="category"===i.type?i.getBandWidth():Math.abs(n[1]-n[0])/e.count();return{bandWidth:a,barWidth:ex(t.get("barWidth"),a),barMaxWidth:ex(t.get("barMaxWidth"),a),barGap:t.get("barGap"),barCategoryGap:t.get("barCategoryGap"),axisKey:nx(i),stackId:ix(t)}})))),r={},o={};e.eachSeriesByType(t,(function(t){if("cartesian2d"===t.coordinateSystem.type){var e=t.getData(),i=t.coordinateSystem,n=i.getBaseAxis(),s=ix(t),l=a[nx(n)][s],h=l.offset,u=l.width,c=i.getOtherAxis(n),d=t.get("barMinHeight")||0,p=n.onZero?c.toGlobalCoord(c.dataToCoord(0)):c.getGlobalExtent()[0],f=[t.coordDimToDataDim("x")[0],t.coordDimToDataDim("y")[0]],g=e.mapArray(f,(function(t,e){return i.dataToPoint([t,e])}),!0);r[s]=r[s]||[],o[s]=o[s]||[],e.setLayout({offset:h,size:u}),e.each(t.coordDimToDataDim(c.dim)[0],(function(t,i){if(!isNaN(t)){r[s][i]||(r[s][i]={p:p,n:p},o[s][i]={p:p,n:p});var n,a,l,f,m=t>=0?"p":"n",v=g[i],y=r[s][i][m],x=o[s][i][m];c.isHorizontal()?(n=y,a=v[1]+h,l=v[0]-x,f=u,o[s][i][m]+=l,Math.abs(l)<d&&(l=(l<0?-1:1)*d),r[s][i][m]+=l):(n=v[0]+h,a=y,l=u,f=v[1]-x,o[s][i][m]+=f,Math.abs(f)<d&&(f=(f<=0?-1:1)*d),r[s][i][m]+=f),e.setItemLayout(i,{x:n,y:a,width:l,height:f})}}),!0)}}),this)}rx.getLayoutOnAxis=function(t,e){var i=[],n=t.axis,a="axis0";if("category"===n.type){for(var r=n.getBandWidth(),o=0;o<t.count;o++)i.push(tx.defaults({bandWidth:r,axisKey:a,stackId:"__ec_stack_"+o},t));var s=ax(i),l=[];for(o=0;o<t.count;o++){var h=s.axis0["__ec_stack_"+o];h.offsetCenter=h.offset+h.width/2,l.push(h)}return l}};var ox=rx,sx=Ep,lx=yd.extend({type:"series.__base_bar__",getInitialData:function(t,e){return sx(t.data,this,e)},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var i=e.dataToPoint(t,!0),n=this.getData(),a=n.getLayout("offset"),r=n.getLayout("size");return i[e.getBaseAxis().isHorizontal()?0:1]+=a+r/2,i}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,itemStyle:{}}});lx.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect"});var hx={},ux=Vr;function cx(t,e){"outside"===t.textPosition&&(t.textPosition=e)}hx.setLabel=function(t,e,i,n,a,r,o){var s=i.getModel("label.normal"),l=i.getModel("label.emphasis");ux.setLabelStyle(t,e,s,l,{labelFetcher:a,labelDataIndex:r,defaultText:a.getRawValue(r),isRectText:!0,autoColor:n}),cx(t),cx(e)};var dx=Or([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),px={getBarItemStyle:function(t){var e=dx(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}},fx=m,gx=b,mx=Vr,vx=hx.setLabel,yx=ru,xx=px,_x=["itemStyle","normal","barBorderWidth"];gx.extend(yx.prototype,xx),fx.extendChartView({type:"bar",render:function(t,e,i){var n=t.get("coordinateSystem");return"cartesian2d"!==n&&"polar"!==n||this._render(t,e,i),this.group},dispose:gx.noop,_render:function(t,e,i){var n,a=this.group,r=t.getData(),o=this._data,s=t.coordinateSystem,l=s.getBaseAxis();"cartesian2d"===s.type?n=l.isHorizontal():"polar"===s.type&&(n="angle"===l.dim);var h=t.isAnimationEnabled()?t:null;r.diff(o).add((function(e){if(r.hasValue(e)){var i=r.getItemModel(e),o=Mx[s.type](r,e,i),l=bx[s.type](r,e,i,o,n,h);r.setItemGraphicEl(e,l),a.add(l),Ix(l,r,e,i,o,t,n,"polar"===s.type)}})).update((function(e,i){var l=o.getItemGraphicEl(i);if(r.hasValue(e)){var u=r.getItemModel(e),c=Mx[s.type](r,e,u);l?mx.updateProps(l,{shape:c},h,e):l=bx[s.type](r,e,u,c,n,h,!0),r.setItemGraphicEl(e,l),a.add(l),Ix(l,r,e,u,c,t,n,"polar"===s.type)}else a.remove(l)})).remove((function(t){var e=o.getItemGraphicEl(t);"cartesian2d"===s.type?e&&wx(t,h,e):e&&Sx(t,h,e)})).execute(),this._data=r},remove:function(t,e){var i=this.group,n=this._data;t.get("animation")?n&&n.eachItemGraphicEl((function(e){"sector"===e.type?Sx(e.dataIndex,t,e):wx(e.dataIndex,t,e)})):i.removeAll()}});var bx={cartesian2d:function(t,e,i,n,a,r,o){var s=new mx.Rect({shape:gx.extend({},n)});if(r){var l=a?"height":"width",h={};s.shape[l]=0,h[l]=n[l],mx[o?"updateProps":"initProps"](s,{shape:h},r,e)}return s},polar:function(t,e,i,n,a,r,o){var s=new mx.Sector({shape:gx.extend({},n)});if(r){var l=a?"r":"endAngle",h={};s.shape[l]=a?0:n.startAngle,h[l]=n[l],mx[o?"updateProps":"initProps"](s,{shape:h},r,e)}return s}};function wx(t,e,i){i.style.text=null,mx.updateProps(i,{shape:{width:0}},e,t,(function(){i.parent&&i.parent.remove(i)}))}function Sx(t,e,i){i.style.text=null,mx.updateProps(i,{shape:{r:i.shape.r0}},e,t,(function(){i.parent&&i.parent.remove(i)}))}var Mx={cartesian2d:function(t,e,i){var n=t.getItemLayout(e),a=function(t,e){var i=t.get(_x)||0;return Math.min(i,Math.abs(e.width),Math.abs(e.height))}(i,n),r=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+r*a/2,y:n.y+o*a/2,width:n.width-r*a,height:n.height-o*a}},polar:function(t,e,i){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle}}};function Ix(t,e,i,n,a,r,o,s){var l=e.getItemVisual(i,"color"),h=e.getItemVisual(i,"opacity"),u=n.getModel("itemStyle.normal"),c=n.getModel("itemStyle.emphasis").getBarItemStyle();s||t.setShape("r",u.get("barBorderRadius")||0),t.useStyle(gx.defaults({fill:l,opacity:h},u.getBarItemStyle()));var d=n.getShallow("cursor");d&&t.attr("cursor",d);var p=o?a.height>0?"bottom":"top":a.width>0?"left":"right";s||vx(t.style,c,n,l,r,i,p),mx.setHoverStyle(t,c)}var Ax=m,Tx=b,Cx=ox;Ax.registerLayout(Tx.curry(Cx,"bar")),Ax.registerVisual((function(t){t.eachSeriesByType("bar",(function(t){t.getData().setVisual("legendSymbol","roundRect")}))}));var Lx=b,Dx={updateSelectedMap:function(t){this._targetList=t.slice(),this._selectTargetMap=Lx.reduce(t||[],(function(t,e){return t.set(e.name,e),t}),Lx.createHashMap())},select:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);"single"===this.get("selectedMode")&&this._selectTargetMap.each((function(t){t.selected=!1})),i&&(i.selected=!0)},unSelect:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);i&&(i.selected=!1)},toggleSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);if(null!=i)return this[i.selected?"unSelect":"select"](t,e),i.selected},isSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return i&&i.selected}},Px=m,kx=dp,Ox=b,zx=ur,Ex=dr.getPercentWithPrecision,Rx=wp,Nx=Dx,Vx=Px.extendSeriesModel({type:"series.pie",init:function(t){Vx.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this.updateSelectedMap(t.data),this._defaultLabelLine(t)},mergeOption:function(t){Vx.superCall(this,"mergeOption",t),this.updateSelectedMap(this.option.data)},getInitialData:function(t,e){var i=Rx(["value"],t.data),n=new kx(i,this);return n.initData(t.data),n},getDataParams:function(t){var e=this.getData(),i=Vx.superCall(this,"getDataParams",t),n=[];return e.each("value",(function(t){n.push(t)})),i.percent=Ex(n,t,e.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(t){zx.defaultEmphasis(t.labelLine,["show"]);var e=t.labelLine.normal,i=t.labelLine.emphasis;e.show=e.show&&t.label.normal.show,i.show=i.show&&t.label.emphasis.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,label:{normal:{rotate:!1,show:!0,position:"outer"},emphasis:{}},labelLine:{normal:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}}},itemStyle:{normal:{borderWidth:1},emphasis:{}},animationType:"expansion",animationEasing:"cubicOut",data:[]}});Ox.mixin(Vx,Nx);var Bx=b,Gx=Vr,Wx=zd;function Hx(t,e,i,n){var a=e.getData(),r=this.dataIndex,o=a.getName(r),s=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:o,seriesId:e.id}),a.each((function(t){Fx(a.getItemGraphicEl(t),a.getItemLayout(t),e.isSelected(a.getName(t)),s,i)}))}function Fx(t,e,i,n,a){var r=(e.startAngle+e.endAngle)/2,o=i?n:0,s=[Math.cos(r)*o,Math.sin(r)*o];a?t.animate().when(200,{position:s}).start("bounceOut"):t.attr("position",s)}function Zx(t,e){Gx.Group.call(this);var i=new Gx.Sector({z2:2}),n=new Gx.Polyline,a=new Gx.Text;function r(){n.ignore=n.hoverIgnore,a.ignore=a.hoverIgnore}function o(){n.ignore=n.normalIgnore,a.ignore=a.normalIgnore}this.add(i),this.add(n),this.add(a),this.updateData(t,e,!0),this.on("emphasis",r).on("normal",o).on("mouseover",r).on("mouseout",o)}var Ux=Zx.prototype;Ux.updateData=function(t,e,i){var n=this.childAt(0),a=t.hostModel,r=t.getItemModel(e),o=t.getItemLayout(e),s=Bx.extend({},o);(s.label=null,i)?(n.setShape(s),"scale"===a.getShallow("animationType")?(n.shape.r=o.r0,Gx.initProps(n,{shape:{r:o.r}},a,e)):(n.shape.endAngle=o.startAngle,Gx.updateProps(n,{shape:{endAngle:o.endAngle}},a,e))):Gx.updateProps(n,{shape:s},a,e);var l=r.getModel("itemStyle"),h=t.getItemVisual(e,"color");n.useStyle(Bx.defaults({lineJoin:"bevel",fill:h},l.getModel("normal").getItemStyle())),n.hoverStyle=l.getModel("emphasis").getItemStyle();var u=r.getShallow("cursor");function c(){n.stopAnimation(!0),n.animateTo({shape:{r:o.r+a.get("hoverOffset")}},300,"elasticOut")}function d(){n.stopAnimation(!0),n.animateTo({shape:{r:o.r}},300,"elasticOut")}u&&n.attr("cursor",u),Fx(this,t.getItemLayout(e),r.get("selected"),a.get("selectedOffset"),a.get("animation")),n.off("mouseover").off("mouseout").off("emphasis").off("normal"),r.get("hoverAnimation")&&a.isAnimationEnabled()&&n.on("mouseover",c).on("mouseout",d).on("emphasis",c).on("normal",d),this._updateLabel(t,e),Gx.setHoverStyle(this)},Ux._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),a=t.hostModel,r=t.getItemModel(e),o=t.getItemLayout(e).label,s=t.getItemVisual(e,"color");Gx.updateProps(i,{shape:{points:o.linePoints||[[o.x,o.y],[o.x,o.y],[o.x,o.y]]}},a,e),Gx.updateProps(n,{style:{x:o.x,y:o.y}},a,e),n.attr({rotation:o.rotation,origin:[o.x,o.y],z2:10});var l=r.getModel("label.normal"),h=r.getModel("label.emphasis"),u=r.getModel("labelLine.normal"),c=r.getModel("labelLine.emphasis");s=t.getItemVisual(e,"color");Gx.setLabelStyle(n.style,n.hoverStyle={},l,h,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:s,useInsideStyle:!!o.inside},{textAlign:o.textAlign,textVerticalAlign:o.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),n.ignore=n.normalIgnore=!l.get("show"),n.hoverIgnore=!h.get("show"),i.ignore=i.normalIgnore=!u.get("show"),i.hoverIgnore=!c.get("show"),i.setStyle({stroke:s,opacity:t.getItemVisual(e,"opacity")}),i.setStyle(u.getModel("lineStyle").getLineStyle()),i.hoverStyle=c.getModel("lineStyle").getLineStyle();var d=u.get("smooth");d&&!0===d&&(d=.4),i.setShape({smooth:d})},Bx.inherits(Zx,Gx.Group),Wx.extend({type:"pie",init:function(){var t=new Gx.Group;this._sectorGroup=t},render:function(t,e,i,n){if(!n||n.from!==this.uid){var a=t.getData(),r=this._data,o=this.group,s=e.get("animation"),l=!r,h=t.get("animationType"),u=Bx.curry(Hx,this.uid,t,s,i),c=t.get("selectedMode");if(a.diff(r).add((function(t){var e=new Zx(a,t);l&&"scale"!==h&&e.eachChild((function(t){t.stopAnimation(!0)})),c&&e.on("click",u),a.setItemGraphicEl(t,e),o.add(e)})).update((function(t,e){var i=r.getItemGraphicEl(e);i.updateData(a,t),i.off("click"),c&&i.on("click",u),o.add(i),a.setItemGraphicEl(t,i)})).remove((function(t){var e=r.getItemGraphicEl(t);o.remove(e)})).execute(),s&&l&&a.count()>0&&"scale"!==h){var d=a.getItemLayout(0),p=Math.max(i.getWidth(),i.getHeight())/2,f=Bx.bind(o.removeClipPath,o);o.setClipPath(this._createClipPath(d.cx,d.cy,p,d.startAngle,d.clockwise,f,t))}this._data=a}},dispose:function(){},_createClipPath:function(t,e,i,n,a,r,o){var s=new Gx.Sector({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:a}});return Gx.initProps(s,{shape:{endAngle:n+(a?1:-1)*Math.PI*2}},o,r),s},containPoint:function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,a=t[1]-i.cy,r=Math.sqrt(n*n+a*a);return r<=i.r&&r>=i.r0}}});var jx=m,qx=b;var Xx=function(t,e){qx.each(e,(function(e){e.update="updateView",jx.registerAction(e,(function(i,n){var a={};return n.eachComponent({mainType:"series",subType:t,query:i},(function(t){t[e.method]&&t[e.method](i.name,i.dataIndex);var n=t.getData();n.each((function(e){var i=n.getName(e);a[i]=t.isSelected(i)||!1}))})),{name:i.name,selected:a}}))}))};var Yx=function(t,e){var i={};e.eachRawSeriesByType(t,(function(t){var n=t.getRawData(),a={};if(!e.isSeriesFiltered(t)){var r=t.getData();r.each((function(t){var e=r.getRawIndex(t);a[e]=t})),n.each((function(e){var o=a[e],s=null!=o&&r.getItemVisual(o,"color",!0);if(s)n.setItemVisual(e,"color",s);else{var l=n.getItemModel(e).get("itemStyle.normal.color")||t.getColorFromPalette(n.getName(e),i);n.setItemVisual(e,"color",l),null!=o&&r.setItemVisual(o,"color",l)}}))}}))},$x=Ni;function Kx(t,e,i,n,a,r,o){function s(e,i,n,a){for(var r=e;r<i;r++)if(t[r].y+=n,r>e&&r+1<i&&t[r+1].y>t[r].y+t[r].height)return void l(r,n/2);l(i-1,n/2)}function l(e,i){for(var n=e;n>=0&&(t[n].y-=i,!(n>0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function h(t,e,i,n,a,r){for(var o=e?Number.MAX_VALUE:0,s=0,l=t.length;s<l;s++)if("center"!==t[s].position){var h=Math.abs(t[s].y-n),u=t[s].len,c=t[s].len2,d=h<a+u?Math.sqrt((a+u+c)*(a+u+c)-h*h):Math.abs(t[s].x-i);e&&d>=o&&(d=o-10),!e&&d<=o&&(d=o+10),t[s].x=i+d*r,o=d}}t.sort((function(t,e){return t.y-e.y}));for(var u,c=0,d=t.length,p=[],f=[],g=0;g<d;g++)(u=t[g].y-c)<0&&s(g,d,-u),c=t[g].y+t[g].height;o-c<0&&l(d-1,c-o);for(g=0;g<d;g++)t[g].y>=i?f.push(t[g]):p.push(t[g]);h(p,!1,e,i,n,a),h(f,!0,e,i,n,a)}var Jx=function(t,e,i,n){var a,r,o=t.getData(),s=[],l=!1;o.each((function(i){var n,h,u,c,d=o.getItemLayout(i),p=o.getItemModel(i),f=p.getModel("label.normal"),g=f.get("position")||p.get("label.emphasis.position"),m=p.getModel("labelLine.normal"),v=m.get("length"),y=m.get("length2"),x=(d.startAngle+d.endAngle)/2,_=Math.cos(x),b=Math.sin(x);a=d.cx,r=d.cy;var w="inside"===g||"inner"===g;if("center"===g)n=d.cx,h=d.cy,c="center";else{var S=(w?(d.r+d.r0)/2*_:d.r*_)+a,M=(w?(d.r+d.r0)/2*b:d.r*b)+r;if(n=S+3*_,h=M+3*b,!w){var I=S+_*(v+e-d.r),A=M+b*(v+e-d.r),T=I+(_<0?-1:1)*y;n=T+(_<0?-5:5),h=A,u=[[S,M],[I,A],[T,A]]}c=w?"center":_>0?"left":"right"}var C=f.getFont(),L=f.get("rotate")?_<0?-x+Math.PI:-x:0,D=t.getFormattedLabel(i,"normal")||o.getName(i),P=$x.getBoundingRect(D,C,c,"top");l=!!L,d.label={x:n,y:h,position:g,height:P.height,len:v,len2:y,linePoints:u,textAlign:c,verticalAlign:"middle",rotation:L,inside:w},w||s.push(d.label)})),!l&&t.get("avoidLabelOverlap")&&function(t,e,i,n,a,r){for(var o=[],s=[],l=0;l<t.length;l++)t[l].x<e?o.push(t[l]):s.push(t[l]);for(Kx(s,e,i,n,1,0,r),Kx(o,e,i,n,-1,0,r),l=0;l<t.length;l++){var h=t[l].linePoints;if(h){var u=h[1][0]-h[2][0];t[l].x<e?h[2][0]=t[l].x+3:h[2][0]=t[l].x-3,h[1][1]=h[2][1]=t[l].y,h[1][0]=h[2][0]+u}}}(s,a,r,e,0,n)},Qx=dr,t_=Qx.parsePercent,e_=Qx.linearMap,i_=Jx,n_=b,a_=2*Math.PI,r_=Math.PI/180;var o_=function(t,e){var i=e.findComponents({mainType:"legend"});i&&i.length&&e.eachSeriesByType(t,(function(t){var e=t.getData();e.filterSelf((function(t){for(var n=e.getName(t),a=0;a<i.length;a++)if(!i[a].isSelected(n))return!1;return!0}),this)}),this)},s_=m,l_=b,h_=Yx,u_=function(t,e,i,n){e.eachSeriesByType(t,(function(t){var e=t.get("center"),n=t.get("radius");n_.isArray(n)||(n=[0,n]),n_.isArray(e)||(e=[e,e]);var a=i.getWidth(),r=i.getHeight(),o=Math.min(a,r),s=t_(e[0],a),l=t_(e[1],r),h=t_(n[0],o/2),u=t_(n[1],o/2),c=t.getData(),d=-t.get("startAngle")*r_,p=t.get("minAngle")*r_,f=0;c.each("value",(function(t){!isNaN(t)&&f++}));var g=c.getSum("value"),m=Math.PI/(g||f)*2,v=t.get("clockwise"),y=t.get("roseType"),x=t.get("stillShowZeroSum"),_=c.getDataExtent("value");_[0]=0;var b=a_,w=0,S=d,M=v?1:-1;if(c.each("value",(function(t,e){var i;if(isNaN(t))c.setItemLayout(e,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:v,cx:s,cy:l,r0:h,r:y?NaN:u});else{(i="area"!==y?0===g&&x?m:t*m:a_/f)<p?(i=p,b-=p):w+=t;var n=S+M*i;c.setItemLayout(e,{angle:i,startAngle:S,endAngle:n,clockwise:v,cx:s,cy:l,r0:h,r:y?e_(t,_,[h,u]):u}),S=n}}),!0),b<a_&&f)if(b<=.001){var I=a_/f;c.each("value",(function(t,e){if(!isNaN(t)){var i=c.getItemLayout(e);i.angle=I,i.startAngle=d+M*e*I,i.endAngle=d+M*(e+1)*I}}))}else m=b/w,S=d,c.each("value",(function(t,e){if(!isNaN(t)){var i=c.getItemLayout(e),n=i.angle===p?p:t*m;i.startAngle=S,i.endAngle=S+M*n,S+=M*n}}));i_(t,u,a,r)}))},c_=o_;Xx("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),s_.registerVisual(l_.curry(h_,"pie")),s_.registerLayout(l_.curry(u_,"pie")),s_.registerProcessor(l_.curry(c_,"pie"));var d_=Ep;yd.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(t,e){return d_(t.data,this,e)},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{normal:{opacity:.8}}}});var p_=Vr,f_=Hf.createSymbol,g_=p_.extendShape({shape:{points:null,sizes:null},symbolProxy:null,buildPath:function(t,e){for(var i=e.points,n=e.sizes,a=this.symbolProxy,r=a.shape,o=0;o<i.length;o++){var s=i[o];if(!isNaN(s[0])&&!isNaN(s[1])){var l=n[o];l[0]<4?t.rect(s[0]-l[0]/2,s[1]-l[1]/2,l[0],l[1]):(r.x=s[0]-l[0]/2,r.y=s[1]-l[1]/2,r.width=l[0],r.height=l[1],a.buildPath(t,r,!0))}}},findDataIndex:function(t,e){for(var i=this.shape,n=i.points,a=i.sizes,r=n.length-1;r>=0;r--){var o=n[r],s=a[r],l=o[0]-s[0]/2,h=o[1]-s[1]/2;if(t>=l&&e>=h&&t<=l+s[0]&&e<=h+s[1])return r}return-1}});function m_(){this.group=new p_.Group,this._symbolEl=new g_({})}var v_=m_.prototype;v_.updateData=function(t){this.group.removeAll();var e=this._symbolEl,i=t.hostModel;e.setShape({points:t.mapArray(t.getItemLayout),sizes:t.mapArray((function(e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array||(i=[i,i]),i}))}),e.symbolProxy=f_(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor,e.useStyle(i.getModel("itemStyle.normal").getItemStyle(["color"]));var n=t.getVisual("color");n&&e.setColor(n),e.seriesIndex=i.seriesIndex,e.on("mousemove",(function(t){e.dataIndex=null;var i=e.findDataIndex(t.offsetX,t.offsetY);i>=0&&(e.dataIndex=i)})),this.group.add(e)},v_.updateLayout=function(t){var e=t.getData();this._symbolEl.setShape({points:e.mapArray(e.getItemLayout)})},v_.remove=function(){this.group.removeAll()};var y_=pm,x_=m_;m.extendChartView({type:"scatter",init:function(){this._normalSymbolDraw=new y_,this._largeSymbolDraw=new x_},render:function(t,e,i){var n=t.getData(),a=this._largeSymbolDraw,r=this._normalSymbolDraw,o=this.group,s=t.get("large")&&n.count()>t.get("largeThreshold")?a:r;this._symbolDraw=s,s.updateData(n),o.add(s.group),o.remove(s===a?r.group:a.group)},updateLayout:function(t){this._symbolDraw.updateLayout(t)},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e,!0)},dispose:function(){}});var __=m,b_=b,w_=Ym,S_=$m;__.registerVisual(b_.curry(w_,"scatter","circle",null)),__.registerLayout(b_.curry(S_,"scatter"));var M_=gg;function I_(t,e,i){M_.call(this,t,e,i),this.type="value",this.angle=0,this.name="",this.model}b.inherits(I_,M_);var A_=b,T_=I_,C_=af,L_=dr,D_=Rp,P_=D_.getScaleExtent,k_=D_.niceScaleExtent,O_=_c;function z_(t,e,i){this._model=t,this.dimensions=[],this._indicatorAxes=A_.map(t.getIndicatorModels(),(function(t,e){var i="indicator_"+e,n=new T_(i,new C_);return n.name=t.get("name"),n.model=t,t.axis=n,this.dimensions.push(i),n}),this),this.resize(t,i),this.cx,this.cy,this.r,this.startAngle}z_.prototype.getIndicatorAxes=function(){return this._indicatorAxes},z_.prototype.dataToPoint=function(t,e){var i=this._indicatorAxes[e];return this.coordToPoint(i.dataToCoord(t),e)},z_.prototype.coordToPoint=function(t,e){var i=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(i),this.cy-t*Math.sin(i)]},z_.prototype.pointToData=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=Math.sqrt(e*e+i*i);e/=n,i/=n;for(var a,r=Math.atan2(-i,e),o=1/0,s=-1,l=0;l<this._indicatorAxes.length;l++){var h=this._indicatorAxes[l],u=Math.abs(r-h.angle);u<o&&(a=h,s=l,o=u)}return[s,+(a&&a.coodToData(n))]},z_.prototype.resize=function(t,e){var i=t.get("center"),n=e.getWidth(),a=e.getHeight(),r=Math.min(n,a)/2;this.cx=L_.parsePercent(i[0],n),this.cy=L_.parsePercent(i[1],a),this.startAngle=t.get("startAngle")*Math.PI/180,this.r=L_.parsePercent(t.get("radius"),r),A_.each(this._indicatorAxes,(function(t,e){t.setExtent(0,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)},z_.prototype.update=function(t,e){var i=this._indicatorAxes,n=this._model;A_.each(i,(function(t){t.scale.setExtent(1/0,-1/0)})),t.eachSeriesByType("radar",(function(e,a){if("radar"===e.get("coordinateSystem")&&t.getComponent("radar",e.get("radarIndex"))===n){var r=e.getData();A_.each(i,(function(t){t.scale.unionExtentFromData(r,t.dim)}))}}),this);var a=n.get("splitNumber");function r(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}A_.each(i,(function(t,e){var i=P_(t.scale,t.model);k_(t.scale,t.model);var n=t.model,o=t.scale,s=n.getMin(),l=n.getMax(),h=o.getInterval();if(null!=s&&null!=l)o.setExtent(+s,+l),o.setInterval((l-s)/a);else if(null!=s){var u;do{u=s+h*a,o.setExtent(+s,u),o.setInterval(h),h=r(h)}while(u<i[1]&&isFinite(u)&&isFinite(i[1]))}else if(null!=l){var c;do{c=l-h*a,o.setExtent(c,+l),o.setInterval(h),h=r(h)}while(c>i[0]&&isFinite(c)&&isFinite(i[0]))}else{o.getTicks().length-1>a&&(h=r(h));var d=Math.round((i[0]+i[1])/2/h)*h,p=Math.round(a/2);o.setExtent(L_.round(d-p*h),L_.round(d+(a-p)*h)),o.setInterval(h)}}))},z_.dimensions=[],z_.create=function(t,e){var i=[];return t.eachComponent("radar",(function(n){var a=new z_(n,t,e);i.push(a),n.coordinateSystem=a})),t.eachSeriesByType("radar",(function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])})),i},O_.register("radar",z_);var E_=m,R_=b,N_=ru,V_=Wf,B_=fv.valueAxis;function G_(t,e){return R_.defaults({show:e},t)}E_.extendComponentModel({type:"radar",optionUpdated:function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),i=this.get("scale"),n=this.get("axisLine"),a=this.get("axisTick"),r=this.get("axisLabel"),o=this.get("name"),s=this.get("name.show"),l=this.get("name.formatter"),h=this.get("nameGap"),u=this.get("triggerEvent"),c=R_.map(this.get("indicator")||[],(function(c){null!=c.max&&c.max>0&&!c.min?c.min=0:null!=c.min&&c.min<0&&!c.max&&(c.max=0);var d=o;if(null!=c.color&&(d=R_.defaults({color:c.color},o)),c=R_.merge(R_.clone(c),{boundaryGap:t,splitNumber:e,scale:i,axisLine:n,axisTick:a,axisLabel:r,name:c.text,nameLocation:"end",nameGap:h,nameTextStyle:d,triggerEvent:u},!1),s||(c.name=""),"string"==typeof l){var p=c.name;c.name=l.replace("{value}",null!=p?p:"")}else"function"==typeof l&&(c.name=l(c.name,c));var f=R_.extend(new N_(c,null,this.ecModel),V_);return f.mainType="radar",f.componentIndex=this.componentIndex,f}),this);this.getIndicatorModels=function(){return c}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:R_.merge({lineStyle:{color:"#bbb"}},B_.axisLine),axisLabel:G_(B_.axisLabel,!1),axisTick:G_(B_.axisTick,!1),splitLine:G_(B_.splitLine,!0),splitArea:G_(B_.splitArea,!0),indicator:[]}});var W_=b,H_=yy,F_=Vr,Z_=["axisLine","axisTickLabel","axisName"];m.extendComponentView({type:"radar",render:function(t,e,i){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem,i=e.getIndicatorAxes(),n=W_.map(i,(function(t){return new H_(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}));W_.each(n,(function(t){W_.each(Z_,t.add,t),this.group.add(t.getGroup())}),this)},_buildSplitLineAndArea:function(t){var e=t.coordinateSystem,i=e.getIndicatorAxes();if(i.length){var n=t.get("shape"),a=t.getModel("splitLine"),r=t.getModel("splitArea"),o=a.getModel("lineStyle"),s=r.getModel("areaStyle"),l=a.get("show"),h=r.get("show"),u=o.get("color"),c=s.get("color");u=W_.isArray(u)?u:[u],c=W_.isArray(c)?c:[c];var d=[],p=[];if("circle"===n)for(var f=i[0].getTicksCoords(),g=e.cx,m=e.cy,v=0;v<f.length;v++){if(l)d[I(d,u,v)].push(new F_.Circle({shape:{cx:g,cy:m,r:f[v]}}));if(h&&v<f.length-1)p[I(p,c,v)].push(new F_.Ring({shape:{cx:g,cy:m,r0:f[v],r:f[v+1]}}))}else{var y,x=W_.map(i,(function(t,i){var n=t.getTicksCoords();return y=null==y?n.length-1:Math.min(n.length-1,y),W_.map(n,(function(t){return e.coordToPoint(t,i)}))})),_=[];for(v=0;v<=y;v++){for(var b=[],w=0;w<i.length;w++)b.push(x[w][v]);if(b[0]&&b.push(b[0].slice()),l)d[I(d,u,v)].push(new F_.Polyline({shape:{points:b}}));if(h&&_)p[I(p,c,v-1)].push(new F_.Polygon({shape:{points:b.concat(_)}}));_=b.slice().reverse()}}var S=o.getLineStyle(),M=s.getAreaStyle();W_.each(p,(function(t,e){this.group.add(F_.mergePath(t,{style:W_.defaults({stroke:"none",fill:c[e%c.length]},M),silent:!0}))}),this),W_.each(d,(function(t,e){this.group.add(F_.mergePath(t,{style:W_.defaults({fill:"none",stroke:u[e%u.length]},S),silent:!0}))}),this)}function I(t,e,i){var n=i%e.length;return t[n]=t[n]||[],n}}});var U_=yd,j_=dp,q_=wp,X_=b,Y_=cr.encodeHTML,$_=U_.extend({type:"series.radar",dependencies:["radar"],init:function(t){$_.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},getInitialData:function(t,e){var i=t.data||[],n=q_([],i,{extraPrefix:"indicator_",extraFromZero:!0}),a=new j_(n,this);return a.initData(i),a},formatTooltip:function(t){var e=this.getRawValue(t),i=this.coordinateSystem.getIndicatorAxes(),n=this.getData().getName(t);return Y_(""===n?this.name:n)+"<br/>"+X_.map(i,(function(t,i){return Y_(t.name+" : "+e[i])})).join("<br />")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{normal:{width:2,type:"solid"}},label:{normal:{position:"top"}},symbol:"emptyCircle",symbolSize:4}}),K_=Vr,J_=b,Q_=Hf;m.extendChartView({type:"radar",render:function(t,e,i){var n=t.coordinateSystem,a=this.group,r=t.getData(),o=this._data;function s(t,e){var i=t.getItemVisual(e,"symbol")||"circle",n=t.getItemVisual(e,"color");if("none"!==i){var a=function(t){return J_.isArray(t)||(t=[+t,+t]),t}(t.getItemVisual(e,"symbolSize")),r=Q_.createSymbol(i,-1,-1,2,2,n);return r.attr({style:{strokeNoScale:!0},z2:100,scale:[a[0]/2,a[1]/2]}),r}}function l(e,i,n,a,r,o){n.removeAll();for(var l=0;l<i.length-1;l++){var h=s(a,r);h&&(h.__dimIdx=l,e[l]?(h.attr("position",e[l]),K_[o?"initProps":"updateProps"](h,{position:i[l]},t,r)):h.attr("position",i[l]),n.add(h))}}function h(t){return J_.map(t,(function(t){return[n.cx,n.cy]}))}r.diff(o).add((function(e){var i=r.getItemLayout(e);if(i){var n=new K_.Polygon,a=new K_.Polyline,o={shape:{points:i}};n.shape.points=h(i),a.shape.points=h(i),K_.initProps(n,o,t,e),K_.initProps(a,o,t,e);var s=new K_.Group,u=new K_.Group;s.add(a),s.add(n),s.add(u),l(a.shape.points,i,u,r,e,!0),r.setItemGraphicEl(e,s)}})).update((function(e,i){var n=o.getItemGraphicEl(i),a=n.childAt(0),s=n.childAt(1),h=n.childAt(2),u={shape:{points:r.getItemLayout(e)}};u.shape.points&&(l(a.shape.points,u.shape.points,h,r,e,!1),K_.updateProps(a,u,t),K_.updateProps(s,u,t),r.setItemGraphicEl(e,n))})).remove((function(t){a.remove(o.getItemGraphicEl(t))})).execute(),r.eachItemGraphicEl((function(t,e){var i=r.getItemModel(e),n=t.childAt(0),o=t.childAt(1),s=t.childAt(2),l=r.getItemVisual(e,"color");a.add(t),n.useStyle(J_.defaults(i.getModel("lineStyle.normal").getLineStyle(),{fill:"none",stroke:l})),n.hoverStyle=i.getModel("lineStyle.emphasis").getLineStyle();var h=i.getModel("areaStyle.normal"),u=i.getModel("areaStyle.emphasis"),c=h.isEmpty()&&h.parentModel.isEmpty(),d=u.isEmpty()&&u.parentModel.isEmpty();d=d&&c,o.ignore=c,o.useStyle(J_.defaults(h.getAreaStyle(),{fill:l,opacity:.7})),o.hoverStyle=u.getAreaStyle();var p=i.getModel("itemStyle.normal").getItemStyle(["color"]),f=i.getModel("itemStyle.emphasis").getItemStyle(),g=i.getModel("label.normal"),m=i.getModel("label.emphasis");function v(){o.attr("ignore",d)}function y(){o.attr("ignore",c)}s.eachChild((function(t){t.setStyle(p),t.hoverStyle=J_.clone(f),K_.setLabelStyle(t.style,t.hoverStyle,g,m,{labelFetcher:r.hostModel,labelDataIndex:e,labelDimIndex:t.__dimIdx,defaultText:r.get(r.dimensions[t.__dimIdx],e),autoColor:l,isRectText:!0})})),t.off("mouseover").off("mouseout").off("normal").off("emphasis"),t.on("emphasis",v).on("mouseover",v).on("normal",y).on("mouseout",y),K_.setHoverStyle(t)})),this._data=r},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});var tb=function(t){t.eachSeriesByType("radar",(function(t){var e=t.getData(),i=[],n=t.coordinateSystem;if(n){for(var a=0;a<n.getIndicatorAxes().length;a++){var r=e.dimensions[a];e.each(r,o)}e.each((function(t){i[t][0]&&i[t].push(i[t][0].slice()),e.setItemLayout(t,i[t])}))}function o(t,e){i[e]=i[e]||[],i[e][a]=n.dataToPoint(t,a)}}))},eb=b;var ib=m,nb=b,ab=Yx,rb=Ym,ob=tb,sb=o_,lb=function(t){var e=t.polar;if(e){eb.isArray(e)||(e=[e]);var i=[];eb.each(e,(function(e,n){e.indicator?(e.type&&!e.shape&&(e.shape=e.type),t.radar=t.radar||[],eb.isArray(t.radar)||(t.radar=[t.radar]),t.radar.push(e)):i.push(e)})),t.polar=i}eb.each(t.series,(function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)}))};ib.registerVisual(nb.curry(ab,"radar")),ib.registerVisual(nb.curry(rb,"radar","circle",null)),ib.registerLayout(ob),ib.registerProcessor(nb.curry(sb,"radar")),ib.registerPreprocessor(lb);var hb=b,ub=U,cb=mt,db=Je,pb=At,fb=ub.applyTransform;function gb(){pb.call(this)}function mb(t){this.name=t,this.zoomLimit,pb.call(this),this._roamTransform=new gb,this._viewTransform=new gb,this._center,this._zoom}function vb(t,e,i,n){var a=i.seriesModel,r=a?a.coordinateSystem:null;return r===this?r[t](n):null}hb.mixin(gb,pb),mb.prototype={constructor:mb,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,i,n){return this._rect=new db(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 db(t,e,i,n)},transformTo:function(t,e,i,n){var a=this.getBoundingRect(),r=this._viewTransform;r.transform=a.calculateTransform(new db(t,e,i,n)),r.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();return[t.x+t.width/2,t.y+t.height/2]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransform},_updateCenterAndZoom:function(){var t=this._viewTransform.getLocalTransform(),e=this._roamTransform,i=this.getDefaultCenter(),n=this.getCenter(),a=this.getZoom();n=ub.applyTransform([],n,t),i=ub.applyTransform([],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._roamTransform,e=this._viewTransform;e.parent=t,t.updateTransform(),e.updateTransform(),e.transform&&cb.copy(this.transform||(this.transform=[]),e.transform),this.transform?(this.invTransform=this.invTransform||[],cb.invert(this.invTransform,this.transform)):this.invTransform=null,this.decomposeTransform()},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t){var e=this.transform;return e?fb([],t,e):[t[0],t[1]]},pointToData:function(t){var e=this.invTransform;return e?fb([],t,e):[t[0],t[1]]},convertToPixel:hb.curry(vb,"dataToPoint"),convertFromPixel:hb.curry(vb,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},hb.mixin(mb,pb);for(var yb=mb,xb=b,_b=Mg,bb=[126,25],wb=[[[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]]],Sb=0;Sb<wb.length;Sb++)for(var Mb=0;Mb<wb[Sb].length;Mb++)wb[Sb][Mb][0]/=10.5,wb[Sb][Mb][1]/=-14,wb[Sb][Mb][0]+=bb[0],wb[Sb][Mb][1]+=bb[1];var Ib=b,Ab={"":[32,80],"广":[0,-10],"":[10,5],"":[-10,10],"":[5,5]};var Tb=b,Cb={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]};var Lb=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];var Db=function(t){if("china"===t.map)for(var e=0,i=t.regions.length;e<i;++e)""===t.regions[e].name&&t.regions[e].geometries.push({type:"polygon",exterior:Lb[0]})},Pb=b,kb=Je,Ob=Cg,zb=yb,Eb=[function(t){"china"===t.map&&t.regions.push(new _b("",xb.map(wb,(function(t){return{type:"polygon",exterior:t}})),bb))},function(t){Ib.each(t.regions,(function(t){var e=Ab[t.name];if(e){var i=t.center;i[0]+=e[0]/10.5,i[1]+=-e[1]/14}}))},function(t){Tb.each(t.regions,(function(t){var e=Cb[t.name];if(e){var i=t.center;i[0]=e[0],i[1]=e[1]}}))},Db];function Rb(t,e,i,n,a){zb.call(this,t),this.map=e,this._nameCoordMap=Pb.createHashMap(),this.loadGeoJson(i,n,a)}function Nb(t,e,i,n){var a=i.geoModel,r=i.seriesModel,o=a?a.coordinateSystem:r?r.coordinateSystem||(r.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return o===this?o[t](n):null}Rb.prototype={constructor:Rb,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,i=0;i<e.length;i++)if(e[i].contain(t))return!0;return!1},loadGeoJson:function(t,e,i){try{this.regions=t?Ob(t):[]}catch(l){throw"Invalid geoJson format\n"+l.message}e=e||{},i=i||{};for(var n=this.regions,a=Pb.createHashMap(),r=0;r<n.length;r++){var o=n[r].name;o=i.hasOwnProperty(o)?i[o]:o,n[r].name=o,a.set(o,n[r]),this.addGeoCoord(o,n[r].center);var s=e[o];s&&n[r].transformTo(s.left,s.top,s.width,s.height)}this._regionsMap=a,this._rect=null,Pb.each(Eb,(function(t){t(this)}),this)},transformTo:function(t,e,i,n){var a=this.getBoundingRect();(a=a.clone()).y=-a.y-a.height;var r=this._viewTransform;r.transform=a.calculateTransform(new kb(t,e,i,n)),r.decomposeTransform();var o=r.scale;o[1]=-o[1],r.updateTransform(),this._updateTransform()},getRegion:function(t){return this._regionsMap.get(t)},getRegionByCoord:function(t){for(var e=this.regions,i=0;i<e.length;i++)if(e[i].contain(t))return e[i]},addGeoCoord:function(t,e){this._nameCoordMap.set(t,e)},getGeoCoord:function(t){return this._nameCoordMap.get(t)},getBoundingRect:function(){if(this._rect)return this._rect;for(var t,e=this.regions,i=0;i<e.length;i++){var n=e[i].getBoundingRect();(t=t||n.clone()).union(n)}return this._rect=t||new kb(0,0,0,0)},dataToPoint:function(t){if("string"==typeof t&&(t=this.getGeoCoord(t)),t)return zb.prototype.dataToPoint.call(this,t)},convertToPixel:Pb.curry(Nb,"dataToPoint"),convertFromPixel:Pb.curry(Nb,"pointToData")},Pb.mixin(Rb,zb);var Vb=m,Bb=b,Gb=Rb,Wb=wu,Hb=dr;function Fb(t,e){var i=t.get("boundingCoords");if(null!=i){var n=i[0],a=i[1];isNaN(n[0])||isNaN(n[1])||isNaN(a[0])||isNaN(a[1])||this.setBoundingRect(n[0],n[1],a[0]-n[0],a[1]-n[1])}var r,o=this.getBoundingRect(),s=t.get("layoutCenter"),l=t.get("layoutSize"),h=e.getWidth(),u=e.getHeight(),c=t.get("aspectScale")||.75,d=o.width/o.height*c,p=!1;if(s&&l&&(s=[Hb.parsePercent(s[0],h),Hb.parsePercent(s[1],u)],l=Hb.parsePercent(l,Math.min(h,u)),isNaN(s[0])||isNaN(s[1])||isNaN(l)||(p=!0)),p){var f={};d>1?(f.width=l,f.height=l/d):(f.height=l,f.width=l*d),f.y=s[1]-f.height/2,f.x=s[0]-f.width/2}else(r=t.getBoxLayoutParams()).aspect=d,f=Wb.getLayoutRect(r,{width:h,height:u});this.setViewRect(f.x,f.y,f.width,f.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function Zb(t,e){Bb.each(e.get("geoCoord"),(function(e,i){t.addGeoCoord(i,e)}))}var Ub={dimensions:Gb.prototype.dimensions,create:function(t,e){var i=[];t.eachComponent("geo",(function(t,n){var a=t.get("map"),r=Vb.getMap(a),o=new Gb(a+n,a,r&&r.geoJson,r&&r.specialAreas,t.get("nameMap"));o.zoomLimit=t.get("scaleLimit"),i.push(o),Zb(o,t),t.coordinateSystem=o,o.model=t,o.resize=Fb,o.resize(t,e)})),t.eachSeries((function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=i[e]}}));var n={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();n[e]=n[e]||[],n[e].push(t)}})),Bb.each(n,(function(t,n){var a=Vb.getMap(n),r=Bb.map(t,(function(t){return t.get("nameMap")})),o=new Gb(n,n,a&&a.geoJson,a&&a.specialAreas,Bb.mergeAll(r));o.zoomLimit=Bb.retrieve.apply(null,Bb.map(t,(function(t){return t.get("scaleLimit")}))),i.push(o),o.resize=Fb,o.resize(t[0],e),Bb.each(t,(function(t){t.coordinateSystem=o,Zb(o,t)}))})),i},getFilledRegions:function(t,e,i){var n=(t||[]).slice();i=i||{};var a=Vb.getMap(e),r=a&&a.geoJson;if(!r)return t;for(var o=Bb.createHashMap(),s=r.features,l=0;l<n.length;l++)o.set(n[l].name,n[l]);for(l=0;l<s.length;l++){var h=s[l].properties.name;o.get(h)||(i.hasOwnProperty(h)&&(h=i[h]),n.push({name:h}))}return n}};Vb.registerCoordinateSystem("geo",Ub);var jb=Ub,qb=b,Xb=dp,Yb=yd,$b=wp,Kb=cr,Jb=Kb.encodeHTML,Qb=Kb.addCommas,tw=Dx,ew=jb,iw=Yb.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],init:function(t){this._fillOption(t,this.getMapType()),iw.superApply(this,"init",arguments),this.updateSelectedMap(t.data)},getInitialData:function(t){var e=$b(["value"],t.data||[]),i=new Xb(e,this);return i.initData(t.data),i},mergeOption:function(t){this._fillOption(t,this.getMapType()),iw.superApply(this,"mergeOption",arguments),this.updateSelectedMap(this.option.data)},getHostGeoModel:function(){var t=this.option.geoIndex;return null!=t?this.dependentModels.geo[t]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},_fillOption:function(t,e){t.data=ew.getFilledRegions(t.data,e,t.nameMap)},getRawValue:function(t){return this.getData().get("value",t)},getRegionModel:function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},formatTooltip:function(t){for(var e=this.getData(),i=Qb(this.getRawValue(t)),n=e.getName(t),a=this.seriesGroup,r=[],o=0;o<a.length;o++){var s=a[o].originalData.indexOfName(n);isNaN(a[o].originalData.get("value",s))||r.push(Jb(a[o].name))}return r.join(", ")+"<br />"+Jb(n+" : "+i)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),i=this.coordinateSystem,n=i.getRegion(e);return n&&i.dataToPoint(n.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{normal:{show:!1,color:"#000"},emphasis:{show:!0,color:"rgb(100,0,0)"}},itemStyle:{normal:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{areaColor:"rgba(255,215,0,0.8)"}}}});qb.mixin(iw,tw);var nw={},aw="\0_ec_interaction_mutex";function rw(t){return t[aw]||(t[aw]={})}m.registerAction({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},(function(){})),nw.take=function(t,e,i){rw(t)[e]=i},nw.release=function(t,e,i){var n=rw(t);n[e]===i&&(n[e]=null)},nw.isTaken=function(t,e){return!!rw(t)[e]};var ow=b,sw=ot,lw=fa,hw=nw;function uw(t){this.pointerChecker,this._zr=t,this._opt={};var e=ow.bind,i=e(cw,this),n=e(dw,this),a=e(pw,this),r=e(fw,this),o=e(gw,this);sw.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(e,s){this.disable(),this._opt=ow.defaults(ow.clone(s)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",i),t.on("mousemove",n),t.on("mouseup",a)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",r),t.on("pinch",o))},this.disable=function(){t.off("mousedown",i),t.off("mousemove",n),t.off("mouseup",a),t.off("mousewheel",r),t.off("pinch",o)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function cw(t){if(!(lw.notLeftMouse(t)||t.target&&t.target.draggable)){var e=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function dw(t){if(!lw.notLeftMouse(t)&&vw(this,"moveOnMouseMove",t)&&this._dragging&&"pinch"!==t.gestureEvent&&!hw.isTaken(this._zr,"globalPan")){var e=t.offsetX,i=t.offsetY,n=this._x,a=this._y,r=e-n,o=i-a;this._x=e,this._y=i,this._opt.preventDefaultMouseMove&&lw.stop(t.event),this.trigger("pan",r,o,n,a,e,i)}}function pw(t){lw.notLeftMouse(t)||(this._dragging=!1)}function fw(t){if(vw(this,"zoomOnMouseWheel",t)&&0!==t.wheelDelta){var e=t.wheelDelta>0?1.1:1/1.1;mw.call(this,t,e,t.offsetX,t.offsetY)}}function gw(t){if(!hw.isTaken(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;mw.call(this,t,e,t.pinchX,t.pinchY)}}function mw(t,e,i,n){this.pointerChecker&&this.pointerChecker(t,i,n)&&(lw.stop(t.event),this.trigger("zoom",e,i,n))}function vw(t,e,i){var n=t._opt[e];return n&&(!ow.isString(n)||i.event[n+"Key"])}ow.mixin(uw,sw);var yw=uw,xw={};xw.updateViewOnPan=function(t,e,i){var n=t.target,a=n.position;a[0]+=e,a[1]+=i,n.dirty()},xw.updateViewOnZoom=function(t,e,i,n){var a=t.target,r=t.zoomLimit,o=a.position,s=a.scale,l=t.zoom=t.zoom||1;if(l*=e,r){var h=r.min||0,u=r.max||1/0;l=Math.max(Math.min(u,l),h)}var c=l/t.zoom;t.zoom=l,o[0]-=(i-o[0])*(c-1),o[1]-=(n-o[1])*(c-1),s[0]*=c,s[1]*=c,a.dirty()};var _w={},bw={axisPointer:1,tooltip:1,brush:1};_w.onIrrelevantElement=function(t,e,i){var n=e.getComponentByElement(t.topTarget),a=n&&n.coordinateSystem;return n&&n!==i&&!bw[n.mainType]&&a&&a.model!==i};var ww=b,Sw=yw,Mw=xw,Iw=_w.onIrrelevantElement,Aw=Vr;function Tw(t,e){var i=t.getItemStyle(),n=t.get("areaColor");return null!=n&&(i.fill=n),i}function Cw(t,e){e.eachChild((function(e){ww.each(e.__regions,(function(i){e.trigger(t.isSelected(i.name)?"emphasis":"normal")}))}))}function Lw(t,e){var i=new Aw.Group;this._controller=new Sw(t.getZr()),this._controllerHost={target:e?i:null},this.group=i,this._updateGroup=e,this._mouseDownFlag}Lw.prototype={constructor:Lw,draw:function(t,e,i,n,a){var r="geo"===t.mainType,o=t.getData&&t.getData();r&&e.eachComponent({mainType:"series",subType:"map"},(function(e){o||e.getHostGeoModel()!==t||(o=e.getData())}));var s=t.coordinateSystem,l=this.group,h=s.scale,u={position:s.position,scale:h};!l.childAt(0)||a?l.attr(u):Aw.updateProps(l,u,t),l.removeAll();var c=["itemStyle","normal"],d=["itemStyle","emphasis"],p=["label","normal"],f=["label","emphasis"],g=ww.createHashMap();ww.each(s.regions,(function(e){var i=g.get(e.name)||g.set(e.name,new Aw.Group),n=new Aw.CompoundPath({shape:{paths:[]}});i.add(n);var a,s=(C=t.getRegionModel(e.name)||t).getModel(c),u=C.getModel(d),m=Tw(s),v=Tw(u),y=C.getModel(p),x=C.getModel(f);if(o){a=o.indexOfName(e.name);var _=o.getItemVisual(a,"color",!0);_&&(m.fill=_)}ww.each(e.geometries,(function(t){if("polygon"===t.type){n.shape.paths.push(new Aw.Polygon({shape:{points:t.exterior}}));for(var e=0;e<(t.interiors?t.interiors.length:0);e++)n.shape.paths.push(new Aw.Polygon({shape:{points:t.interiors[e]}}))}})),n.setStyle(m),n.style.strokeNoScale=!0,n.culling=!0;var b=y.get("show"),w=x.get("show"),S=o&&isNaN(o.get("value",a)),M=o&&o.getItemLayout(a);if(r||S&&(b||w)||M&&M.showLabel){var I,A=r?e.name:a;(!o||a>=0)&&(I=t);var T=new Aw.Text({position:e.center.slice(),scale:[1/h[0],1/h[1]],z2:10,silent:!0});Aw.setLabelStyle(T.style,T.hoverStyle={},y,x,{labelFetcher:I,labelDataIndex:A,defaultText:e.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),i.add(T)}if(o)o.setItemGraphicEl(a,i);else{var C=t.getRegionModel(e.name);n.eventData={componentType:"geo",geoIndex:t.componentIndex,name:e.name,region:C&&C.option||{}}}(i.__regions||(i.__regions=[])).push(e),Aw.setHoverStyle(i,v,{hoverSilentOnTouch:!!t.get("selectedMode")}),l.add(i)})),this._updateController(t,e,i),function(t,e,i,n,a){i.off("click"),i.off("mousedown"),e.get("selectedMode")&&(i.on("mousedown",(function(){t._mouseDownFlag=!0})),i.on("click",(function(r){if(t._mouseDownFlag){t._mouseDownFlag=!1;for(var o=r.target;!o.__regions;)o=o.parent;if(o){var s={type:("geo"===e.mainType?"geo":"map")+"ToggleSelect",batch:ww.map(o.__regions,(function(t){return{name:t.name,from:a.uid}}))};s[e.mainType+"Id"]=e.id,n.dispatchAction(s),Cw(e,i)}}})))}(this,t,l,i,n),Cw(t,l)},remove:function(){this.group.removeAll(),this._controller.dispose(),this._controllerHost={}},_updateController:function(t,e,i){var n=t.coordinateSystem,a=this._controller,r=this._controllerHost;r.zoomLimit=t.get("scaleLimit"),r.zoom=n.getZoom(),a.enable(t.get("roam")||!1);var o=t.mainType;function s(){var e={type:"geoRoam",componentType:o};return e[o+"Id"]=t.id,e}a.off("pan").on("pan",(function(t,e){this._mouseDownFlag=!1,Mw.updateViewOnPan(r,t,e),i.dispatchAction(ww.extend(s(),{dx:t,dy:e}))}),this),a.off("zoom").on("zoom",(function(t,e,n){if(this._mouseDownFlag=!1,Mw.updateViewOnZoom(r,t,e,n),i.dispatchAction(ww.extend(s(),{zoom:t,originX:e,originY:n})),this._updateGroup){var a=this.group,o=a.scale;a.traverse((function(t){"text"===t.type&&t.attr("scale",[1/o[0],1/o[1]])}))}}),this),a.setPointerChecker((function(e,a,r){return n.getViewRectAfterRoam().contain(a,r)&&!Iw(e,i,t)}))}};var Dw=Lw,Pw=b,kw=Vr,Ow=Dw;m.extendChartView({type:"map",render:function(t,e,i,n){if(!n||"mapToggleSelect"!==n.type||n.from!==this.uid){var a=this.group;if(a.removeAll(),!t.getHostGeoModel()){if(n&&"geoRoam"===n.type&&"series"===n.componentType&&n.seriesId===t.id)(r=this._mapDraw)&&a.add(r.group);else if(t.needsDrawMap){var r=this._mapDraw||new Ow(i,!0);a.add(r.group),r.draw(t,e,i,this,n),this._mapDraw=r}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,i)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(t,e,i){var n=t.originalData,a=this.group;n.each("value",(function(e,i){if(!isNaN(e)){var r=n.getItemLayout(i);if(r&&r.point){var o=r.point,s=r.offset,l=new kw.Circle({style:{fill:t.getData().getVisual("color")},shape:{cx:o[0]+9*s,cy:o[1],r:3},silent:!0,z2:s?8:10});if(!s){var h=t.mainSeries.getData(),u=n.getName(i),c=h.indexOfName(u),d=n.getItemModel(i),p=d.getModel("label.normal"),f=d.getModel("label.emphasis"),g=h.getItemGraphicEl(c),m=Pw.retrieve2(t.getFormattedLabel(i,"normal"),u),v=Pw.retrieve2(t.getFormattedLabel(i,"emphasis"),m),y=function(){var t=kw.setTextStyle({},f,{text:f.get("show")?v:null},{isRectText:!0,useInsideStyle:!1},!0);l.style.extendFrom(t),l.__mapOriginalZ2=l.z2,l.z2+=1},x=function(){kw.setTextStyle(l.style,p,{text:p.get("show")?m:null,textPosition:p.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),null!=l.__mapOriginalZ2&&(l.z2=l.__mapOriginalZ2,l.__mapOriginalZ2=null)};g.on("mouseover",y).on("mouseout",x).on("emphasis",y).on("normal",x),x()}a.add(l)}}}))}});var zw={};zw.updateCenterAndZoom=function(t,e,i){var n=t.getZoom(),a=t.getCenter(),r=e.zoom,o=t.dataToPoint(a);if(null!=e.dx&&null!=e.dy){o[0]-=e.dx,o[1]-=e.dy;a=t.pointToData(o);t.setCenter(a)}if(null!=r){if(i){var s=i.min||0,l=i.max||1/0;r=Math.max(Math.min(n*r,l),s)/n}t.scale[0]*=r,t.scale[1]*=r;var h=t.position,u=(e.originX-h[0])*(r-1),c=(e.originY-h[1])*(r-1);h[0]-=u,h[1]-=c,t.updateTransform();a=t.pointToData(o);t.setCenter(a),t.setZoom(r*n)}return{center:t.getCenter(),zoom:t.getZoom()}};var Ew=m,Rw=b,Nw=zw.updateCenterAndZoom;Ew.registerAction({type:"geoRoam",event:"geoRoam",update:"updateLayout"},(function(t,e){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},(function(e){var n=e.coordinateSystem;if("geo"===n.type){var a=Nw(n,t,e.get("scaleLimit"));e.setCenter&&e.setCenter(a.center),e.setZoom&&e.setZoom(a.zoom),"series"===i&&Rw.each(e.seriesGroup,(function(t){t.setCenter(a.center),t.setZoom(a.zoom)}))}}))}));var Vw=b;var Bw=b;var Gw=function(t){var e={};t.eachSeriesByType("map",(function(t){var i=t.getHostGeoModel(),n=i?"o"+i.id:"i"+t.getMapType();(e[n]=e[n]||[]).push(t)})),Bw.each(e,(function(t,e){for(var i,n,a,r,o=(i=Bw.map(t,(function(t){return t.getData()})),n=t[0].get("mapValueCalculation"),a={},r=["value"],Bw.each(i,(function(t){t.each(r,(function(e,i){var n="ec-"+t.getName(i);a[n]=a[n]||[],isNaN(e)||a[n].push(e)}))})),i[0].map(r,(function(t,e){for(var r="ec-"+i[0].getName(e),o=0,s=1/0,l=-1/0,h=a[r].length,u=0;u<h;u++)s=Math.min(s,a[r][u]),l=Math.max(l,a[r][u]),o+=a[r][u];return 0===h?NaN:"min"===n?s:"max"===n?l:"average"===n?o/h:o}))),s=0;s<t.length;s++)t[s].originalData=t[s].getData();for(s=0;s<t.length;s++)t[s].seriesGroup=t,t[s].needsDrawMap=0===s&&!t[s].getHostGeoModel(),t[s].setData(o.cloneShallow()),t[s].mainSeries=t[0]}))},Ww=b;var Hw=m,Fw=function(t){var e={};t.eachSeriesByType("map",(function(i){var n=i.getMapType();if(!i.getHostGeoModel()&&!e[n]){var a={};Vw.each(i.seriesGroup,(function(e){var i=e.coordinateSystem,n=e.originalData;e.get("showLegendSymbol")&&t.getComponent("legend")&&n.each("value",(function(t,e){var r=n.getName(e),o=i.getRegion(r);if(o&&!isNaN(t)){var s=a[r]||0,l=i.dataToPoint(o.center);a[r]=s+1,n.setItemLayout(e,{point:l,offset:s})}}))}));var r=i.getData();r.each((function(t){var e=r.getName(t),i=r.getItemLayout(t)||{};i.showLabel=!a[e],r.setItemLayout(t,i)})),e[n]=!0}}))},Zw=function(t){t.eachSeriesByType("map",(function(t){var e=t.get("color"),i=t.getModel("itemStyle.normal"),n=i.get("areaColor"),a=i.get("color")||e[t.seriesIndex%e.length];t.getData().setVisual({areaColor:n,color:a})}))},Uw=Gw,jw=function(t){Ww.each(t.series,(function(t){t&&"map"===t.type&&(t.map=t.map||t.mapType,Ww.defaults(t,t.mapLocation))}))},qw=Xx;Hw.registerLayout(Fw),Hw.registerVisual(Zw),Hw.registerProcessor(Hw.PRIORITY.PROCESSOR.STATISTIC,Uw),Hw.registerPreprocessor(jw),qw("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}]);var Xw=b,Yw=Xw.each,$w="\0__link_datas",Kw="\0__link_mainData";function Jw(t,e){if((n=this)[Kw]===n){var i=Xw.extend({},this[$w]);i[this.dataType]=e,iS(e,i,t)}else nS(e,this.dataType,this[Kw],t);var n;return e}function Qw(t,e){return t.struct&&t.struct.update(this),e}function tS(t,e){return Yw(e[$w],(function(i,n){i!==e&&nS(i.cloneShallow(),n,e,t)})),e}function eS(t){var e=this[Kw];return null==t||null==e?e:e[$w][t]}function iS(t,e,i){t[$w]={},Yw(e,(function(e,n){nS(e,n,t,i)}))}function nS(t,e,i,n){i[$w][e]=t,t[Kw]=i,t.dataType=e,n.struct&&(t[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=t),t.getLinkedData=eS}var aS=function(t){var e=t.mainData,i=t.datas;i||(i={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,iS(e,i,t),Yw(i,(function(i){Yw(e.TRANSFERABLE_METHODS,(function(e){i.wrapMethod(e,Xw.curry(Jw,t))}))})),e.wrapMethod("cloneShallow",Xw.curry(tS,t)),Yw(e.CHANGABLE_METHODS,(function(i){e.wrapMethod(i,Xw.curry(Qw,t))})),Xw.assert(i[e.dataType]===e)},rS=b,oS=ru,sS=dp,lS=aS,hS=wp,uS=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};function cS(t,e,i){this.root,this.data,this._nodes=[],this.hostModel=t,this.levelModels=rS.map(e||[],(function(e){return new oS(e,t,t.ecModel)})),this.leavesModel=new oS(i||{},t,t.ecModel)}uS.prototype={constructor:uS,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,i){"function"==typeof t&&(i=e,e=t,t=null),t=t||{},rS.isString(t)&&(t={order:t});var n,a=t.order||"preorder",r=this[t.attr||"children"];"preorder"===a&&(n=e.call(i,this));for(var o=0;!n&&o<r.length;o++)r[o].eachNode(t,e,i);"postorder"===a&&e.call(i,this)},updateDepthAndHeight:function(t){var e=0;this.depth=t;for(var i=0;i<this.children.length;i++){var n=this.children[i];n.updateDepthAndHeight(t+1),n.height>e&&(e=n.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;e<n;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;e<n;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,i=this.hostTree,n=i.data.getItemModel(this.dataIndex),a=this.getLevelModel();return a||0!==this.children.length&&(0===this.children.length||!1!==this.isExpand)||(e=this.getLeavesModel()),n.getModel(t,(a||e||i.hostModel).getModel(t))}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},getLeavesModel:function(){return this.hostTree.leavesModel},setVisual:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)}},cS.prototype={constructor:cS,type:"tree",eachNode:function(t,e,i){this.root.eachNode(t,e,i)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;i<n;i++)e[i].dataIndex=-1;for(i=0,n=t.count();i<n;i++)e[t.getRawIndex(i)].dataIndex=i},clearLayouts:function(){this.data.clearItemLayouts()}},cS.createTree=function(t,e,i){var n=new cS(e,i.levels,i.leaves),a=[],r=1;!function t(e,i){var o=e.value;r=Math.max(r,rS.isArray(o)?o.length:1),a.push(e);var s=new uS(e.name,n);i?function(t,e){var i=e.children;if(t.parentNode===e)return;i.push(t),t.parentNode=e}(s,i):n.root=s,n._nodes.push(s);var l=e.children;if(l)for(var h=0;h<l.length;h++)t(l[h],s)}(t),n.root.updateDepthAndHeight(0);var o=hS([{name:"value"}],a,{dimCount:r}),s=new sS(o,e);return s.initData(a),lS({mainData:s,struct:n,structAttr:"tree"}),n.update(),n};var dS=cS,pS=yd,fS=dS,gS=cr.encodeHTML;pS.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(t){var e={name:t.name,children:t.data},i=t.leaves||{},n={};n.leaves=i;var a=fS.createTree(e,this,n),r=0;a.eachNode("preorder",(function(t){t.depth>r&&(r=t.depth)}));var o=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:r;return a.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=o})),a.data},formatTooltip:function(t){for(var e=this.getData().tree,i=e.root.children[0],n=e.getNodeByDataIndex(t),a=n.getValue(),r=n.name;n&&n!==i;)r=n.parentNode.name+"."+r,n=n.parentNode;return gS(r+(isNaN(a)||null==a?"":" : "+a))},defaultOption:{zlevel:0,z:2,left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",orient:"horizontal",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{normal:{color:"#ccc",width:1.5,curveness:.5}},itemStyle:{normal:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5}},label:{normal:{show:!0,color:"#555"}},leaves:{label:{normal:{show:!0}}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});var mS={},vS=wu;function yS(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function xS(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function _S(t,e,i){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:i}function bS(t,e,i){var n=i/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=i,e.hierNode.modifier+=i,e.hierNode.prelim+=i,t.hierNode.change+=n}function wS(t,e){return t.parentNode===e.parentNode?1:2}mS.init=function(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,i,n=[t];e=n.pop();)if(i=e.children,e.isExpand&&i.length)for(var a=i.length-1;a>=0;a--){var r=i[a];r.hierNode={defaultAncestor:null,ancestor:r,prelim:0,modifier:0,change:0,shift:0,i:a,thread:null},n.push(r)}},mS.firstWalk=function(t,e){var i=t.isExpand?t.children:[],n=t.parentNode.children,a=t.hierNode.i?n[t.hierNode.i-1]:null;if(i.length){!function(t){var e=t.children,i=e.length,n=0,a=0;for(;--i>=0;){var r=e[i];r.hierNode.prelim+=n,r.hierNode.modifier+=n,a+=r.hierNode.change,n+=r.hierNode.shift+a}}(t);var r=(i[0].hierNode.prelim+i[i.length-1].hierNode.prelim)/2;a?(t.hierNode.prelim=a.hierNode.prelim+e(t,a),t.hierNode.modifier=t.hierNode.prelim-r):t.hierNode.prelim=r}else a&&(t.hierNode.prelim=a.hierNode.prelim+e(t,a));t.parentNode.hierNode.defaultAncestor=function(t,e,i,n){if(e){for(var a=t,r=t,o=r.parentNode.children[0],s=e,l=a.hierNode.modifier,h=r.hierNode.modifier,u=o.hierNode.modifier,c=s.hierNode.modifier;s=yS(s),r=xS(r),s&&r;){a=yS(a),o=xS(o),a.hierNode.ancestor=t;var d=s.hierNode.prelim+c-r.hierNode.prelim-h+n(s,r);d>0&&(bS(_S(s,t,i),t,d),h+=d,l+=d),c+=s.hierNode.modifier,h+=r.hierNode.modifier,l+=a.hierNode.modifier,u+=o.hierNode.modifier}s&&!yS(a)&&(a.hierNode.thread=s,a.hierNode.modifier+=c-l),r&&!xS(o)&&(o.hierNode.thread=r,o.hierNode.modifier+=h-u,i=t)}return i}(t,a,t.parentNode.hierNode.defaultAncestor||n[0],e)},mS.secondWalk=function(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier},mS.separation=function(t){return arguments.length?t:wS},mS.radialCoordinate=function(t,e){var i={};return t-=Math.PI/2,i.x=e*Math.cos(t),i.y=e*Math.sin(t),i},mS.getViewRect=function(t,e){return vS.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})};var SS=b,MS=Vr,IS=sm,AS=mS.radialCoordinate;function TS(t,e){var i=t.getItemLayout(e);return i&&!isNaN(i.x)&&!isNaN(i.y)&&"none"!==t.getItemVisual(e,"symbol")}function CS(t,e,i){return i.itemModel=e,i.itemStyle=e.getModel("itemStyle.normal").getItemStyle(),i.hoverItemStyle=e.getModel("itemStyle.emphasis").getItemStyle(),i.lineStyle=e.getModel("lineStyle.normal").getLineStyle(),i.labelModel=e.getModel("label.normal"),i.hoverLabelModel=e.getModel("label.emphasis"),!1===t.isExpand&&0!==t.children.length?i.symbolInnerColor=i.itemStyle.fill:i.symbolInnerColor="#fff",i}function LS(t,e,i,n,a,r){var o=!i,s=t.tree.getNodeByDataIndex(e),l=s.getModel(),h=(r=CS(s,l,r),t.tree.root),u=s.parentNode===h?s:s.parentNode||s,c=t.getItemGraphicEl(u.dataIndex),d=u.getLayout(),p=c?{x:c.position[0],y:c.position[1],rawX:c.__radialOldRawX,rawY:c.__radialOldRawY}:d,f=s.getLayout();o?(i=new IS(t,e,r)).attr("position",[p.x,p.y]):i.updateData(t,e,r),i.__radialOldRawX=i.__radialRawX,i.__radialOldRawY=i.__radialRawY,i.__radialRawX=f.rawX,i.__radialRawY=f.rawY,n.add(i),t.setItemGraphicEl(e,i),MS.updateProps(i,{position:[f.x,f.y]},a);var g=i.getSymbolPath();if("radial"===r.layout){var m,v,y=h.children[0],x=y.getLayout(),_=y.children.length;if(f.x===x.x&&!0===s.isExpand){var b={};b.x=(y.children[0].getLayout().x+y.children[_-1].getLayout().x)/2,b.y=(y.children[0].getLayout().y+y.children[_-1].getLayout().y)/2,(m=Math.atan2(b.y-x.y,b.x-x.x))<0&&(m=2*Math.PI+m),(v=b.x<x.x)&&(m-=Math.PI)}else(m=Math.atan2(f.y-x.y,f.x-x.x))<0&&(m=2*Math.PI+m),0===s.children.length||0!==s.children.length&&!1===s.isExpand?(v=f.x<x.x)&&(m-=Math.PI):(v=f.x>x.x)||(m-=Math.PI);var w=v?"left":"right";g.setStyle({textPosition:w,textRotation:-m,textOrigin:"center",verticalAlign:"middle"})}if(s.parentNode&&s.parentNode!==h){var S=i.__edge;S||(S=i.__edge=new MS.BezierCurve({shape:PS(r,p,p),style:SS.defaults({opacity:0},r.lineStyle)})),MS.updateProps(S,{shape:PS(r,d,f),style:{opacity:1}},a),n.add(S)}}function DS(t,e,i,n,a,r){for(var o,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,h=s.getModel(),u=(r=CS(s,h,r),s.parentNode===l?s:s.parentNode||s);null==(o=u.getLayout());)u=u.parentNode===l?u:u.parentNode||u;MS.updateProps(i,{position:[o.x+1,o.y+1]},a,(function(){n.remove(i),t.setItemGraphicEl(e,null)})),i.fadeOut(null,{keepLabel:!0});var c=i.__edge;c&&MS.updateProps(c,{shape:PS(r,o,o),style:{opacity:0}},a,(function(){n.remove(c)}))}function PS(t,e,i){var n,a,r,o,s=t.orient;if("radial"===t.layout){var l=e.rawX,h=e.rawY,u=i.rawX,c=i.rawY,d=AS(l,h),p=AS(l,h+(c-h)*t.curvature),f=AS(u,c+(h-c)*t.curvature),g=AS(u,c);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:p.x,cpy1:p.y,cpx2:f.x,cpy2:f.y}}l=e.x,h=e.y,u=i.x,c=i.y;return"horizontal"===s&&(n=l+(u-l)*t.curvature,a=h,r=u+(l-u)*t.curvature,o=c),"vertical"===s&&(n=l,a=h+(c-h)*t.curvature,r=u,o=c+(h-c)*t.curvature),{x1:l,y1:h,x2:u,y2:c,cpx1:n,cpy1:a,cpx2:r,cpy2:o}}m.extendChartView({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new MS.Group,this.group.add(this._mainGroup)},render:function(t,e,i,n){var a=t.getData(),r=t.layoutInfo,o=this._mainGroup,s=t.get("layout");"radial"===s?o.attr("position",[r.x+r.width/2,r.y+r.height/2]):o.attr("position",[r.x,r.y]);var l=this._data,h={expandAndCollapse:t.get("expandAndCollapse"),layout:s,orient:t.get("orient"),curvature:t.get("lineStyle.normal.curveness"),symbolRotate:t.get("symbolRotate"),symbolOffset:t.get("symbolOffset"),hoverAnimation:t.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};a.diff(l).add((function(e){TS(a,e)&&LS(a,e,null,o,t,h)})).update((function(e,i){var n=l.getItemGraphicEl(i);TS(a,e)?LS(a,e,n,o,t,h):n&&DS(a,e,n,o,t,h)})).remove((function(e){var i=l.getItemGraphicEl(e);DS(a,e,i,o,t,h)})).execute(),!0===h.expandAndCollapse&&a.eachItemGraphicEl((function(e,n){e.off("click").on("click",(function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:n})}))})),this._data=a},dispose:function(){},remove:function(){this._mainGroup.removeAll(),this._data=null}}),m.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},(function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},(function(e){var i=t.dataIndex,n=e.getData().tree.getNodeByDataIndex(i);n.isExpand=!n.isExpand}))}));var kS={};kS.eachAfter=function(t,e,i){for(var n,a=[t],r=[];n=a.pop();)if(r.push(n),n.isExpand){var o=n.children;if(o.length)for(var s=0;s<o.length;s++)a.push(o[s])}for(;n=r.pop();)e(n,i)},kS.eachBefore=function(t,e){for(var i,n=[t];i=n.pop();)if(e(i),i.isExpand){var a=i.children;if(a.length)for(var r=a.length-1;r>=0;r--)n.push(a[r])}};var OS=kS,zS=OS.eachAfter,ES=OS.eachBefore,RS=mS,NS=RS.init,VS=RS.firstWalk,BS=RS.secondWalk,GS=RS.separation,WS=RS.radialCoordinate,HS=RS.getViewRect;var FS=function(t,e){var i=HS(t,e);t.layoutInfo=i;var n=t.get("layout"),a=0,r=0,o=null;"radial"===n?(a=2*Math.PI,r=Math.min(i.height,i.width)/2,o=GS((function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth}))):(a=i.width,r=i.height,o=GS());var s=t.getData().tree.root,l=s.children[0];NS(s),zS(l,VS,o),s.hierNode.modifier=-l.hierNode.prelim,ES(l,BS);var h=l,u=l,c=l;ES(l,(function(t){var e=t.getLayout().x;e<h.getLayout().x&&(h=t),e>u.getLayout().x&&(u=t),t.depth>c.depth&&(c=t)}));var d=h===u?1:o(h,u)/2,p=d-h.getLayout().x,f=0,g=0,m=0,v=0;"radial"===n?(f=a/(u.getLayout().x+d+p),g=r/(c.depth-1||1),ES(l,(function(t){m=(t.getLayout().x+p)*f,v=(t.depth-1)*g;var e=WS(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)}))):"horizontal"===t.get("orient")?(g=r/(u.getLayout().x+d+p),f=a/(c.depth-1||1),ES(l,(function(t){v=(t.getLayout().x+p)*g,m=(t.depth-1)*f,t.setLayout({x:m,y:v},!0)}))):(f=a/(u.getLayout().x+d+p),g=r/(c.depth-1||1),ES(l,(function(t){m=(t.getLayout().x+p)*f,v=(t.depth-1)*g,t.setLayout({x:m,y:v},!0)})))},ZS=FS;var US=FS;var jS=m,qS=b,XS=Ym,YS=function(t,e){t.eachSeriesByType("tree",(function(t){ZS(t,e)}))},$S=function(t,e){t.eachSeriesByType("tree",(function(t){US(t,e)}))};jS.registerVisual(qS.curry(XS,"tree","circle",null)),jS.registerLayout(YS),jS.registerLayout($S);var KS={},JS=b;function QS(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}KS.retrieveTargetInfo=function(t,e){if(t&&("treemapZoomToNode"===t.type||"treemapRootToNode"===t.type)){var i=e.getData().tree.root,n=t.targetNode;if(n&&i.contains(n))return{node:n};var a=t.targetNodeId;if(null!=a&&(n=i.getNodeById(a)))return{node:n}}},KS.getPathToRoot=QS,KS.aboveViewRoot=function(t,e){var i=QS(t);return JS.indexOf(i,e)>=0},KS.wrapTreePathInfo=function(t,e){for(var i=[];t;){var n=t.dataIndex;i.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return i.reverse(),i};var tM=b,eM=yd,iM=dS,nM=ru,aM=cr,rM=aM.encodeHTML,oM=aM.addCommas,sM=KS.wrapTreePathInfo;function lM(t){var e=0;tM.each(t.children,(function(t){lM(t);var i=t.value;tM.isArray(i)&&(i=i[0]),e+=i}));var i=t.value;tM.isArray(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),i<0&&(i=0),tM.isArray(t.value)?t.value[0]=i:t.value=i}eM.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],_viewRoot:null,defaultOption:{progressive:0,hoverLayerThreshold:1/0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{normal:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}}},label:{normal:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0}},upperLabel:{normal:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},emphasis:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},itemStyle:{normal:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var i={name:t.name,children:t.data};lM(i);var n=t.levels||[];n=t.levels=function(t,e){var i,n=e.get("color");if(!n)return;if(t=t||[],tM.each(t,(function(t){var e=new nM(t),n=e.get("color");(e.get("itemStyle.normal.color")||n&&"none"!==n)&&(i=!0)})),!i){(t[0]||(t[0]={})).color=n.slice()}return t}(n,e);var a={};return a.levels=n,iM.createTree(i,this,a).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=tM.isArray(i)?oM(i[0]):oM(i),a=e.getName(t);return rM(a+": "+n)},getDataParams:function(t){var e=eM.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=sM(i,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},tM.extend(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=tM.createHashMap(),this._idIndexMapCount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idIndexMapCount++),i},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var hM=Vr,uM=wu,cM=b,dM=KS.wrapTreePathInfo;function pM(t){this.group=new hM.Group,t.add(this.group)}function fM(t,e,i,n,a,r){var o=[[a?t:t-5,e],[t+i,e],[t+i,e+n],[a?t:t-5,e+n]];return!r&&o.splice(2,0,[t+i+5,e+n/2]),!a&&o.push([t,e+n/2]),o}function gM(t,e,i){t.eventData={componentType:"series",componentSubType:"treemap",seriesIndex:e.componentIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:i&&i.dataIndex,name:i&&i.name},treePathInfo:i&&dM(i,e)}}pM.prototype={constructor:pM,render:function(t,e,i,n){var a=t.getModel("breadcrumb"),r=this.group;if(r.removeAll(),a.get("show")&&i){var o=a.getModel("itemStyle.normal"),s=o.getModel("textStyle"),l={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,l,s),this._renderContent(t,l,o,s,n),uM.positionElement(r,l.pos,l.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentNode){var a=n.getModel().get("name"),r=i.getTextRect(a),o=Math.max(r.width+16,e.emptyItemWidth);e.totalWidth+=o+8,e.renderList.push({node:n,text:a,width:o})}},_renderContent:function(t,e,i,n,a){for(var r=0,o=e.emptyItemWidth,s=t.get("breadcrumb.height"),l=uM.getAvailableSize(e.pos,e.box),h=e.totalWidth,u=e.renderList,c=u.length-1;c>=0;c--){var d=u[c],p=d.node,f=d.width,g=d.text;h>l.width&&(h-=f-o,f=o,g=null);var m=new hM.Polygon({shape:{points:fM(r,0,f,s,c===u.length-1,0===c)},style:cM.defaults(i.getItemStyle(),{lineJoin:"bevel",text:g,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:cM.curry(a,p)});this.group.add(m),gM(m,t,p),r+=f+8}},remove:function(){this.group.removeAll()}};var mM=pM,vM={},yM=b;vM.createWrap=function(){var t,e=[],i={};return{add:function(t,n,a,r,o){return yM.isString(r)&&(o=r,r=0),!i[t.id]&&(i[t.id]=1,e.push({el:t,target:n,time:a,delay:r,easing:o}),!0)},done:function(e){return t=e,this},start:function(){for(var n=e.length,a=0,r=e.length;a<r;a++){var o=e[a];o.el.animateTo(o.target,o.time,o.delay,o.easing,s)}return this;function s(){--n||(e.length=0,i={},t&&t())}}}};var xM=m,_M=b,bM=Vr,wM=$d,SM=KS,MM=mM,IM=yw,AM=Je,TM=mt,CM=vM,LM=Or,DM=_M.bind,PM=bM.Group,kM=bM.Rect,OM=_M.each,zM=["label","normal"],EM=["label","emphasis"],RM=["upperLabel","normal"],NM=["upperLabel","emphasis"],VM=LM([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),BM=function(t){var e=VM(t);return e.stroke=e.fill=e.lineWidth=null,e};function GM(t,e,i,n,a,r,o,s,l,h){if(o){var u=o.getLayout();if(u&&u.isInView){var c=u.width,d=u.height,p=u.borderWidth,f=u.invisible,g=o.getRawIndex(),m=s&&s.getRawIndex(),v=o.viewChildren,y=u.upperHeight,x=v&&v.length,_=o.getModel("itemStyle.normal"),b=o.getModel("itemStyle.emphasis"),w=T("nodeGroup",PM);if(w){if(l.add(w),w.attr("position",[u.x||0,u.y||0]),w.__tmNodeWidth=c,w.__tmNodeHeight=d,u.isAboveViewRoot)return w;var S=T("background",kM,h,1);if(S&&function(e,i,n){i.dataIndex=o.dataIndex,i.seriesIndex=t.seriesIndex,i.setShape({x:0,y:0,width:c,height:d});var a=o.getVisual("borderColor",!0),r=b.get("borderColor");I(i,(function(){var t=BM(_);t.fill=a;var e=VM(b);if(e.fill=r,n){var o=c-2*p;A(t,e,a,o,y,{x:p,y:0,width:o,height:y})}else t.text=e.text=null;i.setStyle(t),bM.setHoverStyle(i,e)})),e.add(i)}(w,S,x&&u.upperHeight),!x){var M=T("content",kM,h,2);M&&function(e,i){i.dataIndex=o.dataIndex,i.seriesIndex=t.seriesIndex;var n=Math.max(c-2*p,0),a=Math.max(d-2*p,0);i.culling=!0,i.setShape({x:p,y:p,width:n,height:a});var r=o.getVisual("color",!0);I(i,(function(){var t=BM(_);t.fill=r;var e=VM(b);A(t,e,r,n,a),i.setStyle(t),bM.setHoverStyle(i,e)})),e.add(i)}(w,M)}return w}}}function I(t,e){f?!t.invisible&&r.push(t):(e(),t.__tmWillVisible||(t.invisible=!1))}function A(e,i,n,a,r,s){var l=o.getModel(),h=_M.retrieve(t.getFormattedLabel(o.dataIndex,"normal",null,null,s?"upperLabel":"label"),l.get("name"));if(!s&&u.isLeafRoot){var c=t.get("drillDownIcon",!0);h=c?c+" "+h:h}var d=l.getModel(s?RM:zM),p=l.getModel(s?NM:EM),f=d.getShallow("show");bM.setLabelStyle(e,i,d,p,{defaultText:f?h:null,autoColor:n,isRectText:!0}),s&&(e.textRect=_M.clone(s)),e.truncate=f&&d.get("ellipsis")?{outerWidth:a,outerHeight:r,minChar:2}:null}function T(t,r,s,l){var h=null!=m&&i[t][m],u=a[t];return h?(i[t][m]=null,function(t,e,i){(t[g]={}).old="nodeGroup"===i?e.position.slice():_M.extend({},e.shape)}(u,h,t)):f||((h=new r({z:WM(s,l)})).__tmDepth=s,h.__tmStorageName=t,function(t,e,i){var r=t[g]={},s=o.parentNode;if(s&&(!n||"drillDown"===n.direction)){var l=0,h=0,u=a.background[s.getRawIndex()];!n&&u&&u.old&&(l=u.old.width,h=u.old.height),r.old="nodeGroup"===i?[0,h]:{x:l,y:h,width:0,height:0}}r.fadein="nodeGroup"!==i}(u,0,t)),e[t][g]=h}}function WM(t,e){var i=10*t+e;return(i-1)/i}xM.extendChartView({type:"treemap",init:function(t,e){this._containerGroup,this._storage={nodeGroup:[],background:[],content:[]},this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){var a=e.findComponents({mainType:"series",subType:"treemap",query:n});if(!(_M.indexOf(a,t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var r=SM.retrieveTargetInfo(n,t),o=n&&n.type,s=t.layoutInfo,l=!this._oldTree,h=this._storage,u="treemapRootToNode"===o&&r&&h?{rootNodeGroup:h.nodeGroup[r.node.getRawIndex()],direction:n.direction}:null,c=this._giveContainerGroup(s),d=this._doRender(c,t,u);l||o&&"treemapZoomToNode"!==o&&"treemapRootToNode"!==o?d.renderFinally():this._doAnimation(c,d,t,u),this._resetController(i),this._renderBreadcrumb(t,i,r)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new PM,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,i){var n=e.getData().tree,a=this._oldTree,r={nodeGroup:[],background:[],content:[]},o={nodeGroup:[],background:[],content:[]},s=this._storage,l=[],h=_M.curry(GM,e,o,s,i,r,l);!function t(e,i,n,a,r){a?(i=e,OM(e,(function(t,e){!t.isRemoved()&&s(e,e)}))):new wM(i,e,o,o).add(s).update(s).remove(_M.curry(s,null)).execute();function o(t){return t.getId()}function s(o,s){var l=null!=o?e[o]:null,u=null!=s?i[s]:null,c=h(l,u,n,r);c&&t(l&&l.viewChildren||[],u&&u.viewChildren||[],c,a,r+1)}}(n.root?[n.root]:[],a&&a.root?[a.root]:[],t,n===a||!a,0);var u,c,d=(c={nodeGroup:[],background:[],content:[]},(u=s)&&OM(u,(function(t,e){var i=c[e];OM(t,(function(t){t&&(i.push(t),t.__tmWillDelete=1)}))})),c);return this._oldTree=n,this._storage=o,{lastsForAnimation:r,willDeleteEls:d,renderFinally:function(){OM(d,(function(t){OM(t,(function(t){t.parent&&t.parent.remove(t)}))})),OM(l,(function(t){t.invisible=!0,t.dirty()}))}}},_doAnimation:function(t,e,i,n){if(i.get("animation")){var a=i.get("animationDurationUpdate"),r=i.get("animationEasing"),o=CM.createWrap();OM(e.willDeleteEls,(function(t,e){OM(t,(function(t,i){if(!t.invisible){var s,l=t.parent;if(n&&"drillDown"===n.direction)s=l===n.rootNodeGroup?{shape:{x:0,y:0,width:l.__tmNodeWidth,height:l.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var h=0,u=0;l.__tmWillDelete||(h=l.__tmNodeWidth/2,u=l.__tmNodeHeight/2),s="nodeGroup"===e?{position:[h,u],style:{opacity:0}}:{shape:{x:h,y:u,width:0,height:0},style:{opacity:0}}}s&&o.add(t,s,a,r)}}))})),OM(this._storage,(function(t,i){OM(t,(function(t,n){var s=e.lastsForAnimation[i][n],l={};s&&("nodeGroup"===i?s.old&&(l.position=t.position.slice(),t.attr("position",s.old)):(s.old&&(l.shape=_M.extend({},t.shape),t.setShape(s.old)),s.fadein?(t.setStyle("opacity",0),l.style={opacity:1}):1!==t.style.opacity&&(l.style={opacity:1})),o.add(t,l,a,r))}))}),this),this._state="animating",o.done(DM((function(){this._state="ready",e.renderFinally()}),this)).start()}},_resetController:function(t){var e=this._controller;e||((e=this._controller=new IM(t.getZr())).enable(this.seriesModel.get("roam")),e.on("pan",DM(this._onPan,this)),e.on("zoom",DM(this._onZoom,this)));var i=new AM(0,0,t.getWidth(),t.getHeight());e.setPointerChecker((function(t,e,n){return i.contain(e,n)}))},_clearController:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onPan:function(t,e){if("animating"!==this._state&&(Math.abs(t)>3||Math.abs(e)>3)){var i=this.seriesModel.getData().tree.root;if(!i)return;var n=i.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t,y:n.y+e,width:n.width,height:n.height}})}},_onZoom:function(t,e,i){if("animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var a=n.getLayout();if(!a)return;var r=new AM(a.x,a.y,a.width,a.height),o=this.seriesModel.layoutInfo;e-=o.x,i-=o.y;var s=TM.create();TM.translate(s,s,[-e,-i]),TM.scale(s,s,[t,t]),TM.translate(s,s,[e,i]),r.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:r.x,y:r.y,width:r.width,height:r.height}})}},_initEvents:function(t){t.on("click",(function(t){if("ready"===this._state){var e=this.seriesModel.get("nodeClick",!0);if(e){var i=this.findTarget(t.offsetX,t.offsetY);if(i){var n=i.node;if(n.getLayout().isLeafRoot)this._rootToNode(i);else if("zoomToNode"===e)this._zoomToNode(i);else if("link"===e){var a=n.hostTree.data.getItemModel(n.dataIndex),r=a.get("link",!0),o=a.get("target",!0)||"blank";r&&window.open(r,o)}}}}}),this)},_renderBreadcrumb:function(t,e,i){i||(i=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(i={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new MM(this.group))).render(t,e,i.node,DM((function(e){"animating"!==this._state&&(SM.aboveViewRoot(t.getViewRoot(),e)?this._rootToNode({node:e}):this._zoomToNode({node:e}))}),this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(t,e){var i;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(n){var a=this._storage.background[n.getRawIndex()];if(a){var r=a.transformCoordToLocal(t,e),o=a.shape;if(!(o.x<=r[0]&&r[0]<=o.x+o.width&&o.y<=r[1]&&r[1]<=o.y+o.height))return!1;i={node:n,offsetX:r[0],offsetY:r[1]}}}),this),i}});for(var HM=m,FM=KS,ZM=function(){},UM=["treemapZoomToNode","treemapRender","treemapMove"],jM=0;jM<UM.length;jM++)HM.registerAction({type:UM[jM],update:"updateView"},ZM);HM.registerAction({type:"treemapRootToNode",update:"updateView"},(function(t,e){e.eachComponent({mainType:"series",subType:"treemap",query:t},(function(e,i){var n=FM.retrieveTargetInfo(t,e);if(n){var a=e.getViewRoot();a&&(t.direction=FM.aboveViewRoot(a,n.node)?"rollUp":"drillDown"),e.resetViewRoot(n.node)}}))}));var qM=b,XM=Pt,YM=dr.linearMap,$M=qM.each,KM=qM.isObject,JM=function(t){var e=t.mappingMethod,i=t.type,n=this.option=qM.clone(t);this.type=i,this.mappingMethod=e,this._normalizeData=hI[e];var a=QM[i];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._doMap=a._doMap[e],"piecewise"===e?(tI(n),function(t){var e=t.pieceList;t.hasSpecialVisual=!1,qM.each(e,(function(e,i){e.originIndex=i,null!=e.visual&&(t.hasSpecialVisual=!0)}))}(n)):"category"===e?n.categories?function(t){var e=t.categories,i=t.visual,n=t.categoryMap={};if($M(e,(function(t,e){n[t]=e})),!qM.isArray(i)){var a=[];qM.isObject(i)?$M(i,(function(t,e){var i=n[e];a[null!=i?i:-1]=t})):a[-1]=i,i=lI(t,a)}for(var r=e.length-1;r>=0;r--)null==i[r]&&(delete n[e[r]],e.pop())}(n):tI(n,!0):(qM.assert("linear"!==e||n.dataExtent),tI(n))};JM.prototype={constructor:JM,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return qM.bind(this._normalizeData,this)}};var QM=JM.visualHandlers={color:{applyVisual:nI("color"),getColorMapper:function(){var t=this.option;return qM.bind("category"===t.mappingMethod?function(t,e){return!e&&(t=this._normalizeData(t)),aI.call(this,t)}:function(e,i,n){var a=!!n;return!i&&(e=this._normalizeData(e)),n=XM.fastLerp(e,t.parsedVisual,n),a?n:XM.stringify(n,"rgba")},this)},_doMap:{linear:function(t){return XM.stringify(XM.fastLerp(t,this.option.parsedVisual),"rgba")},category:aI,piecewise:function(t,e){var i=sI.call(this,e);return null==i&&(i=XM.stringify(XM.fastLerp(t,this.option.parsedVisual),"rgba")),i},fixed:rI}},colorHue:eI((function(t,e){return XM.modifyHSL(t,e)})),colorSaturation:eI((function(t,e){return XM.modifyHSL(t,null,e)})),colorLightness:eI((function(t,e){return XM.modifyHSL(t,null,null,e)})),colorAlpha:eI((function(t,e){return XM.modifyAlpha(t,e)})),opacity:{applyVisual:nI("opacity"),_doMap:oI([0,1])},symbol:{applyVisual:function(t,e,i){var n=this.mapValueToVisual(t);if(qM.isString(n))i("symbol",n);else if(KM(n))for(var a in n)n.hasOwnProperty(a)&&i(a,n[a])},_doMap:{linear:iI,category:aI,piecewise:function(t,e){var i=sI.call(this,e);return null==i&&(i=iI.call(this,t)),i},fixed:rI}},symbolSize:{applyVisual:nI("symbolSize"),_doMap:oI([0,1])}};function tI(t,e){var i=t.visual,n=[];qM.isObject(i)?$M(i,(function(t){n.push(t)})):null!=i&&n.push(i);e||1!==n.length||{color:1,symbol:1}.hasOwnProperty(t.type)||(n[1]=n[0]),lI(t,n)}function eI(t){return{applyVisual:function(e,i,n){e=this.mapValueToVisual(e),n("color",t(i("color"),e))},_doMap:oI([0,1])}}function iI(t){var e=this.option.visual;return e[Math.round(YM(t,[0,1],[0,e.length-1],!0))]||{}}function nI(t){return function(e,i,n){n(t,this.mapValueToVisual(e))}}function aI(t){var e=this.option.visual;return e[this.option.loop&&-1!==t?t%e.length:t]}function rI(){return this.option.visual[0]}function oI(t){return{linear:function(e){return YM(e,t,this.option.visual,!0)},category:aI,piecewise:function(e,i){var n=sI.call(this,i);return null==n&&(n=YM(e,t,this.option.visual,!0)),n},fixed:rI}}function sI(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=i[JM.findPieceIndex(t,i)];if(n&&n.visual)return n.visual[this.type]}}function lI(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=qM.map(e,(function(t){return XM.parse(t)}))),e}var hI={linear:function(t){return YM(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,i=JM.findPieceIndex(t,e,!0);if(null!=i)return YM(i,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?-1:e},fixed:qM.noop};function uI(t,e,i){return t?e<=i:e<i}JM.listVisualTypes=function(){var t=[];return qM.each(QM,(function(e,i){t.push(i)})),t},JM.addVisualHandler=function(t,e){QM[t]=e},JM.isValidType=function(t){return QM.hasOwnProperty(t)},JM.eachVisual=function(t,e,i){qM.isObject(t)?qM.each(t,e,i):e.call(i,t)},JM.mapVisual=function(t,e,i){var n,a=qM.isArray(t)?[]:qM.isObject(t)?{}:(n=!0,null);return JM.eachVisual(t,(function(t,r){var o=e.call(i,t,r);n?a=o:a[r]=o})),a},JM.retrieveVisuals=function(t){var e,i={};return t&&$M(QM,(function(n,a){t.hasOwnProperty(a)&&(i[a]=t[a],e=!0)})),e?i:null},JM.prepareVisualTypes=function(t){if(KM(t)){var e=[];$M(t,(function(t,i){e.push(i)})),t=e}else{if(!qM.isArray(t))return[];t=t.slice()}return t.sort((function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1})),t},JM.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},JM.findPieceIndex=function(t,e,i){for(var n,a=1/0,r=0,o=e.length;r<o;r++){var s=e[r].value;if(null!=s){if(s===t||"string"==typeof s&&s===t+"")return r;i&&c(s,r)}}for(r=0,o=e.length;r<o;r++){var l=e[r],h=l.interval,u=l.close;if(h){if(h[0]===-1/0){if(uI(u[1],t,h[1]))return r}else if(h[1]===1/0){if(uI(u[0],h[0],t))return r}else if(uI(u[0],h[0],t)&&uI(u[1],t,h[1]))return r;i&&c(h[0],r),i&&c(h[1],r)}}if(i)return t===1/0?e.length-1:t===-1/0?0:n;function c(e,i){var r=Math.abs(e-t);r<a&&(a=r,n=i)}};var cI=JM,dI=cI,pI=Pt,fI=b,gI=fI.isArray;function mI(t,e,i,n,a,r){var o=t.getModel(),s=t.getLayout();if(s&&!s.invisible&&s.isInView){var l,h=t.getModel("itemStyle.normal"),u=function(t,e,i,n){var a=fI.extend({},e);return fI.each(["color","colorAlpha","colorSaturation"],(function(r){var o=t.get(r,!0);null==o&&i&&(o=i[r]),null==o&&(o=e[r]),null==o&&(o=n.get(r)),null!=o&&(a[r]=o)})),a}(h,e,i[t.depth],n),c=h.get("borderColor"),d=h.get("borderColorSaturation");null!=d&&(c=function(t,e){return null!=e?pI.modifyHSL(e,null,null,t):null}(d,l=vI(u))),t.setVisual("borderColor",c);var p=t.viewChildren;if(p&&p.length){var f=function(t,e,i,n,a,r){if(!r||!r.length)return;var o=xI(e,"color")||null!=a.color&&"none"!==a.color&&(xI(e,"colorAlpha")||xI(e,"colorSaturation"));if(!o)return;var s=e.get("visualMin"),l=e.get("visualMax"),h=i.dataExtent.slice();null!=s&&s<h[0]&&(h[0]=s),null!=l&&l>h[1]&&(h[1]=l);var u=e.get("colorMappingBy"),c={type:o.name,dataExtent:h,visual:o.range};"color"!==c.type||"index"!==u&&"id"!==u?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new dI(c);return d.__drColorMappingBy=u,d}(0,o,s,0,u,p);fI.each(p,(function(t,e){if(t.depth>=a.length||t===a[t.depth]){var s=function(t,e,i,n,a,r){var o=fI.extend({},e);if(a){var s=a.type,l="color"===s&&a.__drColorMappingBy,h="index"===l?n:"id"===l?r.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));o[s]=a.mapValueToVisual(h)}return o}(o,u,t,e,f,r);mI(t,s,i,n,a,r)}}))}else l=vI(u),t.setVisual("color",l)}}function vI(t){var e=yI(t,"color");if(e){var i=yI(t,"colorAlpha"),n=yI(t,"colorSaturation");return n&&(e=pI.modifyHSL(e,null,null,n)),i&&(e=pI.modifyAlpha(e,i)),e}}function yI(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function xI(t,e){var i=t.get(e);return gI(i)&&i.length?{name:e,range:i}:null}var _I=function(t,e,i){var n={mainType:"series",subType:"treemap",query:i};t.eachComponent(n,(function(t){var e=t.getData().tree,i=e.root,n=t.getModel("itemStyle.normal");i.isRemoved()||mI(i,{},fI.map(e.levelModels,(function(t){return t?t.get("itemStyle.normal"):null})),n,t.getViewRoot().getAncestors(),t)}))},bI=b,wI=Je,SI=dr,MI=SI.parsePercent,II=SI.MAX_SAFE_INTEGER,AI=wu,TI=KS,CI=Math.max,LI=Math.min,DI=bI.retrieve,PI=bI.each,kI=["itemStyle","normal","borderWidth"],OI=["itemStyle","normal","gapWidth"],zI=["upperLabel","normal","show"],EI=["upperLabel","normal","height"];function RI(t,e,i,n){var a,r;if(!t.isRemoved()){var o=t.getLayout();a=o.width,r=o.height;var s=(p=t.getModel()).get(kI),l=p.get(OI)/2,h=GI(p),u=Math.max(s,h),c=s-l,d=u-l,p=t.getModel();t.setLayout({borderWidth:s,upperHeight:u,upperLabelHeight:h},!0);var f=(a=CI(a-2*c,0))*(r=CI(r-c-d,0)),g=function(t,e,i,n,a,r){var o=t.children||[],s=n.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=n.leafDepth&&n.leafDepth<=r;if(a&&!l)return t.viewChildren=[];o=bI.filter(o,(function(t){return!t.isRemoved()})),function(t,e){e&&t.sort((function(t,i){var n="asc"===e?t.getValue()-i.getValue():i.getValue()-t.getValue();return 0===n?"asc"===e?t.dataIndex-i.dataIndex:i.dataIndex-t.dataIndex:n}))}(o,s);var h=function(t,e,i){for(var n=0,a=0,r=e.length;a<r;a++)n+=e[a].getValue();var o=t.get("visualDimension");if(e&&e.length)if("value"===o&&i)s=[e[e.length-1].getValue(),e[0].getValue()],"asc"===i&&s.reverse();else{var s=[1/0,-1/0];PI(e,(function(t){var e=t.getValue(o);e<s[0]&&(s[0]=e),e>s[1]&&(s[1]=e)}))}else s=[NaN,NaN];return{sum:n,dataExtent:s}}(e,o,s);if(0===h.sum)return t.viewChildren=[];if(h.sum=function(t,e,i,n,a){if(!n)return i;for(var r=t.get("visibleMin"),o=a.length,s=o,l=o-1;l>=0;l--){var h=a["asc"===n?o-l-1:l].getValue();h/i*e<r&&(s=l,i-=h)}return"asc"===n?a.splice(0,o-s):a.splice(s,o-s),i}(e,i,h.sum,s,o),0===h.sum)return t.viewChildren=[];for(var u=0,c=o.length;u<c;u++){var d=o[u].getValue()/h.sum*i;o[u].setLayout({area:d})}l&&(o.length&&t.setLayout({isLeafRoot:!0},!0),o.length=0);return t.viewChildren=o,t.setLayout({dataExtent:h.dataExtent},!0),o}(t,p,f,e,i,n);if(g.length){var m={x:c,y:d,width:a,height:r},v=LI(a,r),y=1/0,x=[];x.area=0;for(var _=0,b=g.length;_<b;){var w=g[_];x.push(w),x.area+=w.getLayout().area;var S=NI(x,v,e.squareRatio);S<=y?(_++,y=S):(x.area-=x.pop().getLayout().area,VI(x,v,m,l,!1),v=LI(m.width,m.height),x.length=x.area=0,y=1/0)}if(x.length&&VI(x,v,m,l,!0),!i){var M=p.get("childrenVisibleMin");null!=M&&f<M&&(i=!0)}for(_=0,b=g.length;_<b;_++)RI(g[_],e,i,n+1)}}}function NI(t,e,i){for(var n,a=0,r=1/0,o=0,s=t.length;o<s;o++)(n=t[o].getLayout().area)&&(n<r&&(r=n),n>a&&(a=n));var l=t.area*t.area,h=e*e*i;return l?CI(h*a/l,l/(h*r)):1/0}function VI(t,e,i,n,a){var r=e===i.width?0:1,o=1-r,s=["x","y"],l=["width","height"],h=i[s[r]],u=e?t.area/e:0;(a||u>i[l[o]])&&(u=i[l[o]]);for(var c=0,d=t.length;c<d;c++){var p=t[c],f={},g=u?p.getLayout().area/u:0,m=f[l[o]]=CI(u-2*n,0),v=i[s[r]]+i[l[r]]-h,y=c===d-1||v<g?v:g,x=f[l[r]]=CI(y-2*n,0);f[s[o]]=i[s[o]]+LI(n,m/2),f[s[r]]=h+LI(n,x/2),h+=y,p.setLayout(f,!0)}i[s[o]]+=u,i[l[o]]-=u}function BI(t,e,i,n,a){var r=t.getLayout(),o=i[a],s=o&&o===t;if(!(o&&!s||a===i.length&&t!==n)){t.setLayout({isInView:!0,invisible:!s&&!e.intersect(r),isAboveViewRoot:s},!0);var l=new wI(e.x-r.x,e.y-r.y,e.width,e.height);PI(t.viewChildren||[],(function(t){BI(t,l,i,n,a+1)}))}}function GI(t){return t.get(zI)?t.get(EI):0}var WI=function(t,e,i){var n={mainType:"series",subType:"treemap",query:i};t.eachComponent(n,(function(t){var n=e.getWidth(),a=e.getHeight(),r=t.option,o=AI.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),s=r.size||[],l=MI(DI(o.width,s[0]),n),h=MI(DI(o.height,s[1]),a),u=i&&i.type,c=TI.retrieveTargetInfo(i,t),d="treemapRender"===u||"treemapMove"===u?i.rootRect:null,p=t.getViewRoot(),f=TI.getPathToRoot(p);if("treemapMove"!==u){var g="treemapZoomToNode"===u?function(t,e,i,n,a){var r,o=(e||{}).node,s=[n,a];if(!o||o===i)return s;var l=n*a,h=l*t.option.zoomToNodeRatio;for(;r=o.parentNode;){for(var u=0,c=r.children,d=0,p=c.length;d<p;d++)u+=c[d].getValue();var f=o.getValue();if(0===f)return s;h*=u/f;var g=r.getModel(),m=g.get(kI);(h+=4*m*m+(3*m+Math.max(m,GI(g)))*Math.pow(h,.5))>II&&(h=II),o=r}h<l&&(h=l);var v=Math.pow(h/l,.5);return[n*v,a*v]}(t,c,p,l,h):d?[d.width,d.height]:[l,h],m=r.sort;m&&"asc"!==m&&"desc"!==m&&(m="desc");var v={squareRatio:r.squareRatio,sort:m,leafDepth:r.leafDepth};p.hostTree.clearLayouts();var y={x:0,y:0,width:g[0],height:g[1],area:g[0]*g[1]};p.setLayout(y),RI(p,v,!1,0);y=p.getLayout();PI(f,(function(t,e){var i=(f[e+1]||p).getValue();t.setLayout(bI.extend({dataExtent:[i,i],borderWidth:0,upperHeight:0},y))}))}var x=t.getData().tree.root;x.setLayout(function(t,e,i){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!i)return n;var a=i.node,r=a.getLayout();if(!r)return n;var o=[r.width/2,r.height/2],s=a;for(;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:t.width/2-o[0],y:t.height/2-o[1]}}(o,d,c),!0),t.setLayoutInfo(o),BI(x,new wI(-o.x,-o.y,n,a),f,p,0)}))},HI=m,FI=_I,ZI=WI;HI.registerVisual(FI),HI.registerLayout(ZI);var UI=b;function jI(t){return"_EC_"+t}var qI=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},XI=qI.prototype;function YI(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==e?-1:e}function $I(t,e,i){this.node1=t,this.node2=e,this.dataIndex=null==i?-1:i}XI.type="graph",XI.isDirected=function(){return this._directed},XI.addNode=function(t,e){t=t||""+e;var i=this._nodesMap;if(!i[jI(t)]){var n=new YI(t,e);return n.hostGraph=this,this.nodes.push(n),i[jI(t)]=n,n}},XI.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},XI.getNodeById=function(t){return this._nodesMap[jI(t)]},XI.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]),t instanceof YI||(t=n[jI(t)]),e instanceof YI||(e=n[jI(e)]),t&&e){var r=t.id+"-"+e.id;if(!a[r]){var o=new $I(t,e,i);return o.hostGraph=this,this._directed&&(t.outEdges.push(o),e.inEdges.push(o)),t.edges.push(o),t!==e&&e.edges.push(o),this.edges.push(o),a[r]=o,o}}},XI.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},XI.getEdge=function(t,e){t instanceof YI&&(t=t.id),e instanceof YI&&(e=e.id);var i=this._edgesMap;return this._directed?i[t+"-"+e]:i[t+"-"+e]||i[e+"-"+t]},XI.eachNode=function(t,e){for(var i=this.nodes,n=i.length,a=0;a<n;a++)i[a].dataIndex>=0&&t.call(e,i[a],a)},XI.eachEdge=function(t,e){for(var i=this.edges,n=i.length,a=0;a<n;a++)i[a].dataIndex>=0&&i[a].node1.dataIndex>=0&&i[a].node2.dataIndex>=0&&t.call(e,i[a],a)},XI.breadthFirstTraverse=function(t,e,i,n){if(e instanceof YI||(e=this._nodesMap[jI(e)]),e){for(var a="out"===i?"outEdges":"in"===i?"inEdges":"edges",r=0;r<this.nodes.length;r++)this.nodes[r].__visited=!1;if(!t.call(n,e,null))for(var o=[e];o.length;){var s=o.shift(),l=s[a];for(r=0;r<l.length;r++){var h=l[r],u=h.node1===s?h.node2:h.node1;if(!u.__visited){if(t.call(n,u,s))return;o.push(u),u.__visited=!0}}}}},XI.update=function(){for(var t=this.data,e=this.edgeData,i=this.nodes,n=this.edges,a=0,r=i.length;a<r;a++)i[a].dataIndex=-1;for(a=0,r=t.count();a<r;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(a=0,r=n.length;a<r;a++)n[a].dataIndex=-1;for(a=0,r=e.count();a<r;a++)n[e.getRawIndex(a)].dataIndex=a},XI.clone=function(){for(var t=new qI(this._directed),e=this.nodes,i=this.edges,n=0;n<e.length;n++)t.addNode(e[n].id,e[n].dataIndex);for(n=0;n<i.length;n++){var a=i[n];t.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return t},YI.prototype={constructor:YI,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(t){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(t)}},$I.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)};var KI=function(t,e){return{getValue:function(i){var n=this[t][e];return n.get(n.getDimension(i||"value"),this.dataIndex)},setVisual:function(i,n){this.dataIndex>=0&&this[t][e].setItemVisual(this.dataIndex,i,n)},getVisual:function(i,n){return this[t][e].getItemVisual(this.dataIndex,i,n)},setLayout:function(i,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,i,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}};UI.mixin(YI,KI("hostGraph","data")),UI.mixin($I,KI("hostGraph","edgeData")),qI.Node=YI,qI.Edge=$I;var JI=b,QI=dp,tA=qI,eA=aS,iA=wp,nA=_c,aA=Ep;var rA=function(t,e,i,n,a){for(var r=new tA(n),o=0;o<t.length;o++)r.addNode(JI.retrieve(t[o].id,t[o].name,o),o);var s=[],l=[],h=0;for(o=0;o<e.length;o++){var u=e[o],c=u.source,d=u.target;r.addEdge(c,d,h)&&(l.push(u),s.push(JI.retrieve(u.id,c+" > "+d)),h++)}var p,f=i.get("coordinateSystem");if("cartesian2d"===f||"polar"===f)p=aA(t,i,i.ecModel);else{var g=nA.get(f),m=iA((g&&"view"!==g.type&&g.dimensions||[]).concat(["value"]),t);(p=new QI(m,i)).initData(t)}var v=new QI(["value"],i);return v.initData(l,s),a&&a(p,v),eA({mainData:p,struct:r,structAttr:"graph",datas:{node:p,edge:v},datasAttr:{node:"data",edge:"edgeData"}}),r.update(),r},oA=m,sA=dp,lA=b,hA=ur.defaultEmphasis,uA=ru,cA=cr.encodeHTML,dA=rA,pA=oA.extendSeriesModel({type:"series.graph",init:function(t){pA.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){pA.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){pA.superApply(this,"mergeDefaultAndTheme",arguments),hA(t.edgeLabel,["show"])},getInitialData:function(t,e){var i=t.edges||t.links||[],n=t.data||t.nodes||[],a=this;if(n&&i)return dA(n,i,this,!0,(function(t,i){t.wrapMethod("getItemModel",(function(t){var e=a._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));var n=a.getModel("edgeLabel"),r=new uA({label:n.option},n.parentModel,e);function o(t){return(t=this.parsePath(t))&&"label"===t[0]?r:this.parentModel}i.wrapMethod("getItemModel",(function(t){return t.customizeGetParent(o),t}))})).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getData(),a=this.getDataParams(t,i),r=n.graph.getEdgeByIndex(t),o=n.getName(r.node1.dataIndex),s=n.getName(r.node2.dataIndex),l=[];return null!=o&&l.push(o),null!=s&&l.push(s),l=cA(l.join(" > ")),a.value&&(l+=" : "+cA(a.value)),l}return pA.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=lA.map(this.option.categories||[],(function(t){return null!=t.value?t:lA.extend({value:0},t)})),e=new sA(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t,!0)}))},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return pA.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{normal:{position:"middle"},emphasis:{}},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{normal:{show:!1,formatter:"{b}"},emphasis:{show:!0}},itemStyle:{normal:{},emphasis:{}},lineStyle:{normal:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{}}}}),fA=Vr,gA=U,mA=fA.Line.prototype,vA=fA.BezierCurve.prototype;function yA(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var xA=fA.extendShape({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){(yA(e)?mA:vA).buildPath(t,e)},pointAt:function(t){return yA(this.shape)?mA.pointAt.call(this,t):vA.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,i=yA(e)?[e.x2-e.x1,e.y2-e.y1]:vA.tangentAt.call(this,t);return gA.normalize(i,i)}}),_A=b,bA=U,wA=Hf,SA=xA,MA=Vr,IA=dr.round,AA=["fromSymbol","toSymbol"];function TA(t){return"_"+t+"Type"}function CA(t,e,i){var n=e.getItemVisual(i,"color"),a=e.getItemVisual(i,t),r=e.getItemVisual(i,t+"Size");if(a&&"none"!==a){_A.isArray(r)||(r=[r,r]);var o=wA.createSymbol(a,-r[0]/2,-r[1]/2,r[0],r[1],n);return o.name=t,o}}function LA(t,e){var i=e[0],n=e[1],a=e[2];t.x1=i[0],t.y1=i[1],t.x2=n[0],t.y2=n[1],t.percent=1,a?(t.cpx1=a[0],t.cpy1=a[1]):(t.cpx1=NaN,t.cpy1=NaN)}function DA(t,e,i){MA.Group.call(this),this._createLine(t,e,i)}var PA=DA.prototype;PA.beforeUpdate=function(){var t=this,e=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.childOfName("label");if(e||i||!n.ignore){for(var a=1,r=this.parent;r;)r.scale&&(a/=r.scale[0]),r=r.parent;var o=t.childOfName("line");if(this.__dirty||o.__dirty){var s=o.shape.percent,l=o.pointAt(0),h=o.pointAt(s),u=bA.sub([],h,l);if(bA.normalize(u,u),e){e.attr("position",l);var c=o.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(c[1],c[0])),e.attr("scale",[a*s,a*s])}if(i){i.attr("position",h);c=o.tangentAt(1);i.attr("rotation",-Math.PI/2-Math.atan2(c[1],c[0])),i.attr("scale",[a*s,a*s])}if(!n.ignore){var d,p,f;n.attr("position",h);var g=5*a;if("end"===n.__position)d=[u[0]*g+h[0],u[1]*g+h[1]],p=u[0]>.8?"left":u[0]<-.8?"right":"center",f=u[1]>.8?"top":u[1]<-.8?"bottom":"middle";else if("middle"===n.__position){var m=s/2,v=[(c=o.tangentAt(m))[1],-c[0]],y=o.pointAt(m);v[1]>0&&(v[0]=-v[0],v[1]=-v[1]),d=[y[0]+v[0]*g,y[1]+v[1]*g],p="center",f="bottom";var x=-Math.atan2(c[1],c[0]);h[0]<l[0]&&(x=Math.PI+x),n.attr("rotation",x)}else d=[-u[0]*g+l[0],-u[1]*g+l[1]],p=u[0]>.8?"right":u[0]<-.8?"left":"center",f=u[1]>.8?"bottom":u[1]<-.8?"top":"middle";n.attr({style:{textVerticalAlign:n.__verticalAlign||f,textAlign:n.__textAlign||p},position:d,scale:[a,a]})}}}},PA._createLine=function(t,e,i){var n=t.hostModel,a=function(t){var e=new SA({name:"line"});return LA(e.shape,t),e}(t.getItemLayout(e));a.shape.percent=0,MA.initProps(a,{shape:{percent:1}},n,e),this.add(a);var r=new MA.Text({name:"label"});this.add(r),_A.each(AA,(function(i){var n=CA(i,t,e);this.add(n),this[TA(i)]=t.getItemVisual(e,i)}),this),this._updateCommonStl(t,e,i)},PA.updateData=function(t,e,i){var n=t.hostModel,a=this.childOfName("line"),r=t.getItemLayout(e),o={shape:{}};LA(o.shape,r),MA.updateProps(a,o,n,e),_A.each(AA,(function(i){var n=t.getItemVisual(e,i),a=TA(i);if(this[a]!==n){this.remove(this.childOfName(i));var r=CA(i,t,e);this.add(r)}this[a]=n}),this),this._updateCommonStl(t,e,i)},PA._updateCommonStl=function(t,e,i){var n=t.hostModel,a=this.childOfName("line"),r=i&&i.lineStyle,o=i&&i.hoverLineStyle,s=i&&i.labelModel,l=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var h=t.getItemModel(e);r=h.getModel("lineStyle.normal").getLineStyle(),o=h.getModel("lineStyle.emphasis").getLineStyle(),s=h.getModel("label.normal"),l=h.getModel("label.emphasis")}var u=t.getItemVisual(e,"color"),c=_A.retrieve3(t.getItemVisual(e,"opacity"),r.opacity,1);a.useStyle(_A.defaults({strokeNoScale:!0,fill:"none",stroke:u,opacity:c},r)),a.hoverStyle=o,_A.each(AA,(function(t){var e=this.childOfName(t);e&&(e.setColor(u),e.setStyle({opacity:c}))}),this);var d,p,f,g,m=s.getShallow("show"),v=l.getShallow("show"),y=this.childOfName("label");if(m||v){var x=n.getRawValue(e);p=null==x?p=t.getName(e):isFinite(x)?IA(x):x,d=u||"#000",f=_A.retrieve2(n.getFormattedLabel(e,"normal",t.dataType),p),g=_A.retrieve2(n.getFormattedLabel(e,"emphasis",t.dataType),f)}if(m){var _=MA.setTextStyle(y.style,s,{text:f},{autoColor:d});y.__textAlign=_.textAlign,y.__verticalAlign=_.textVerticalAlign,y.__position=s.get("position")||"middle"}else y.setStyle("text",null);y.hoverStyle=v?{text:g,textFill:l.getTextColor(!0),fontStyle:l.getShallow("fontStyle"),fontWeight:l.getShallow("fontWeight"),fontSize:l.getShallow("fontSize"),fontFamily:l.getShallow("fontFamily")}:{text:null},y.ignore=!m&&!v,MA.setHoverStyle(this)},PA.highlight=function(){this.trigger("emphasis")},PA.downplay=function(){this.trigger("normal")},PA.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},PA.setLinePoints=function(t){var e=this.childOfName("line");LA(e.shape,t),e.dirty()},_A.inherits(DA,MA.Group);var kA=DA,OA=Vr,zA=kA;function EA(t){return isNaN(t[0])||isNaN(t[1])}function RA(t){return!EA(t[0])&&!EA(t[1])}function NA(t){this._ctor=t||zA,this.group=new OA.Group}var VA=NA.prototype;VA.updateData=function(t){var e=this._lineData,i=this.group,n=this._ctor,a=t.hostModel,r={lineStyle:a.getModel("lineStyle.normal").getLineStyle(),hoverLineStyle:a.getModel("lineStyle.emphasis").getLineStyle(),labelModel:a.getModel("label.normal"),hoverLabelModel:a.getModel("label.emphasis")};t.diff(e).add((function(e){if(RA(t.getItemLayout(e))){var a=new n(t,e,r);t.setItemGraphicEl(e,a),i.add(a)}})).update((function(a,o){var s=e.getItemGraphicEl(o);RA(t.getItemLayout(a))?(s?s.updateData(t,a,r):s=new n(t,a,r),t.setItemGraphicEl(a,s),i.add(s)):i.remove(s)})).remove((function(t){i.remove(e.getItemGraphicEl(t))})).execute(),this._lineData=t},VA.updateLayout=function(){var t=this._lineData;t.eachItemGraphicEl((function(e,i){e.updateLayout(t,i)}),this)},VA.remove=function(){this.group.removeAll()};var BA=NA,GA=Gr,WA=U,HA=[],FA=[],ZA=[],UA=GA.quadraticAt,jA=WA.distSquare,qA=Math.abs;function XA(t,e,i){for(var n,a=t[0],r=t[1],o=t[2],s=1/0,l=i*i,h=.1,u=.1;u<=.9;u+=.1){HA[0]=UA(a[0],r[0],o[0],u),HA[1]=UA(a[1],r[1],o[1],u),(p=qA(jA(HA,e)-l))<s&&(s=p,n=u)}for(var c=0;c<32;c++){var d=n+h;FA[0]=UA(a[0],r[0],o[0],n),FA[1]=UA(a[1],r[1],o[1],n),ZA[0]=UA(a[0],r[0],o[0],d),ZA[1]=UA(a[1],r[1],o[1],d);var p=jA(FA,e)-l;if(qA(p)<.01)break;var f=jA(ZA,e)-l;h/=2,p<0?f>=0?n+=h:n-=h:f>=0?n-=h:n+=h}return n}var YA=function(t,e){var i=[],n=GA.quadraticSubdivide,a=[[],[],[]],r=[[],[]],o=[];function s(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),e}e/=2,t.eachEdge((function(t,l){var h=t.getLayout(),u=t.getVisual("fromSymbol"),c=t.getVisual("toSymbol");h.__original||(h.__original=[WA.clone(h[0]),WA.clone(h[1])],h[2]&&h.__original.push(WA.clone(h[2])));var d=h.__original;if(null!=h[2]){if(WA.copy(a[0],d[0]),WA.copy(a[1],d[2]),WA.copy(a[2],d[1]),u&&"none"!=u){var p=s(t.node1),f=XA(a,d[0],p*e);n(a[0][0],a[1][0],a[2][0],f,i),a[0][0]=i[3],a[1][0]=i[4],n(a[0][1],a[1][1],a[2][1],f,i),a[0][1]=i[3],a[1][1]=i[4]}if(c&&"none"!=c){p=s(t.node2),f=XA(a,d[1],p*e);n(a[0][0],a[1][0],a[2][0],f,i),a[1][0]=i[1],a[2][0]=i[2],n(a[0][1],a[1][1],a[2][1],f,i),a[1][1]=i[1],a[2][1]=i[2]}WA.copy(h[0],a[0]),WA.copy(h[1],a[2]),WA.copy(h[2],a[1])}else{if(WA.copy(r[0],d[0]),WA.copy(r[1],d[1]),WA.sub(o,r[1],r[0]),WA.normalize(o,o),u&&"none"!=u){p=s(t.node1);WA.scaleAndAdd(r[0],r[0],o,p*e)}if(c&&"none"!=c){p=s(t.node2);WA.scaleAndAdd(r[1],r[1],o,-p*e)}WA.copy(h[0],r[0]),WA.copy(h[1],r[1])}}))},$A=m,KA=b,JA=pm,QA=BA,tT=yw,eT=xw,iT=_w.onIrrelevantElement,nT=Vr,aT=YA,rT=["itemStyle","normal","opacity"],oT=["lineStyle","normal","opacity"];function sT(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function lT(t,e,i){var n=t.getGraphicEl(),a=sT(t,e);null!=i&&(null==a&&(a=1),a*=i),n.downplay&&n.downplay(),n.traverse((function(t){"group"!==t.type&&t.setStyle("opacity",a)}))}function hT(t,e){var i=sT(t,e),n=t.getGraphicEl();n.highlight&&n.highlight(),n.traverse((function(t){"group"!==t.type&&t.setStyle("opacity",i)}))}$A.extendChartView({type:"graph",init:function(t,e){var i=new JA,n=new QA,a=this.group;this._controller=new tT(e.getZr()),this._controllerHost={target:a},a.add(i.group),a.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._firstRender=!0},render:function(t,e,i){var n=t.coordinateSystem;this._model=t,this._nodeScaleRatio=t.get("nodeScaleRatio");var a=this._symbolDraw,r=this._lineDraw,o=this.group;if("view"===n.type){var s={position:n.position,scale:n.scale};this._firstRender?o.attr(s):nT.updateProps(o,s,t)}aT(t.getGraph(),this._getNodeGlobalScale(t));var l=t.getData();a.updateData(l);var h=t.getEdgeData();r.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,e,i),clearTimeout(this._layoutTimeout);var u=t.forceLayout,c=t.get("force.layoutAnimation");u&&this._startForceLayoutIteration(u,c),l.eachItemGraphicEl((function(e,n){var a=l.getItemModel(n);e.off("drag").off("dragend");var r=l.getItemModel(n).get("draggable");r&&e.on("drag",(function(){u&&(u.warmUp(),!this._layouting&&this._startForceLayoutIteration(u,c),u.setFixed(n),l.setItemLayout(n,e.position))}),this).on("dragend",(function(){u&&u.setUnfixed(n)}),this),e.setDraggable(r&&u),e.off("mouseover",e.__focusNodeAdjacency),e.off("mouseout",e.__unfocusNodeAdjacency),a.get("focusNodeAdjacency")&&(e.on("mouseover",e.__focusNodeAdjacency=function(){i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex})}),e.on("mouseout",e.__unfocusNodeAdjacency=function(){i.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t.id})}))}),this),l.graph.eachEdge((function(e){var n=e.getGraphicEl();n.off("mouseover",n.__focusNodeAdjacency),n.off("mouseout",n.__unfocusNodeAdjacency),e.getModel().get("focusNodeAdjacency")&&(n.on("mouseover",n.__focusNodeAdjacency=function(){i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex})}),n.on("mouseout",n.__unfocusNodeAdjacency=function(){i.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t.id})}))}));var d="circular"===t.get("layout")&&t.get("circular.rotateLabel"),p=l.getLayout("cx"),f=l.getLayout("cy");l.eachItemGraphicEl((function(t,e){var i=t.getSymbolPath();if(d){var n=l.getItemLayout(e),a=Math.atan2(n[1]-f,n[0]-p);a<0&&(a=2*Math.PI+a);var r=n[0]<p;r&&(a-=Math.PI);var o=r?"left":"right";i.setStyle({textRotation:-a,textPosition:o,textOrigin:"center"}),i.hoverStyle&&(i.hoverStyle.textPosition=o)}else i.setStyle({textRotation:0})})),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},focusNodeAdjacency:function(t,e,i,n){var a=this._model.getData().graph,r=n.dataIndex,o=n.edgeDataIndex,s=a.getNodeByIndex(r),l=a.getEdgeByIndex(o);(s||l)&&(a.eachNode((function(t){lT(t,rT,.1)})),a.eachEdge((function(t){lT(t,oT,.1)})),s&&(hT(s,rT),KA.each(s.edges,(function(t){t.dataIndex<0||(hT(t,oT),hT(t.node1,rT),hT(t.node2,rT))}))),l&&(hT(l,oT),hT(l.node1,rT),hT(l.node2,rT)))},unfocusNodeAdjacency:function(t,e,i,n){var a=this._model.getData().graph;a.eachNode((function(t){lT(t,rT)})),a.eachEdge((function(t){lT(t,oT)}))},_startForceLayoutIteration:function(t,e){var i=this;!function n(){t.step((function(t){i.updateLayout(i._model),(i._layouting=!t)&&(e?i._layoutTimeout=setTimeout(n,16):n())}))}()},_updateController:function(t,e,i){var n=this._controller,a=this._controllerHost,r=this.group;n.setPointerChecker((function(e,n,a){var o=r.getBoundingRect();return o.applyTransform(r.transform),o.contain(n,a)&&!iT(e,i,t)})),"view"===t.coordinateSystem.type?(n.enable(t.get("roam")),a.zoomLimit=t.get("scaleLimit"),a.zoom=t.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",(function(e,n){eT.updateViewOnPan(a,e,n),i.dispatchAction({seriesId:t.id,type:"graphRoam",dx:e,dy:n})})).on("zoom",(function(e,n,r){eT.updateViewOnZoom(a,e,n,r),i.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:e,originX:n,originY:r}),this._updateNodeAndLinkScale(),aT(t.getGraph(),this._getNodeGlobalScale(t)),this._lineDraw.updateLayout()}),this)):n.disable()},_updateNodeAndLinkScale:function(){var t=this._model,e=t.getData(),i=this._getNodeGlobalScale(t),n=[i,i];e.eachItemGraphicEl((function(t,e){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;return((e.getZoom()-1)*i+1)/a},updateLayout:function(t){aT(t.getGraph(),this._getNodeGlobalScale(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}});var uT=m,cT=zw.updateCenterAndZoom;uT.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},(function(t,e){e.eachComponent({mainType:"series",query:t},(function(e){var i=e.coordinateSystem,n=cT(i,t);e.setCenter&&e.setCenter(n.center),e.setZoom&&e.setZoom(n.zoom)}))})),uT.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series.graph:focusNodeAdjacency"},(function(){})),uT.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series.graph:unfocusNodeAdjacency"},(function(){}));var dT=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.eachSeriesByType("graph",(function(t){var i=t.getCategoriesData(),n=t.getGraph().data,a=i.mapArray(i.getName);n.filterSelf((function(t){var i=n.getItemModel(t).getShallow("category");if(null!=i){"number"==typeof i&&(i=a[i]);for(var r=0;r<e.length;r++)if(!e[r].isSelected(i))return!1}return!0}))}),this)};var pT=function(t){var e={};t.eachSeriesByType("graph",(function(t){var i=t.getCategoriesData(),n=t.getData(),a={};i.each((function(n){var r=i.getName(n);a["ec-"+r]=n;var o=i.getItemModel(n).get("itemStyle.normal.color")||t.getColorFromPalette(r,e);i.setItemVisual(n,"color",o)})),i.count()&&n.each((function(t){var e=n.getItemModel(t).getShallow("category");null!=e&&("string"==typeof e&&(e=a["ec-"+e]),n.getItemVisual(t,"color",!0)||n.setItemVisual(t,"color",i.getItemVisual(e,"color")))}))}))};function fT(t){return t instanceof Array||(t=[t,t]),t}var gT=function(t){t.eachSeriesByType("graph",(function(t){var e=t.getGraph(),i=t.getEdgeData(),n=fT(t.get("edgeSymbol")),a=fT(t.get("edgeSymbolSize")),r="lineStyle.normal.color".split("."),o="lineStyle.normal.opacity".split(".");i.setVisual("fromSymbol",n&&n[0]),i.setVisual("toSymbol",n&&n[1]),i.setVisual("fromSymbolSize",a&&a[0]),i.setVisual("toSymbolSize",a&&a[1]),i.setVisual("color",t.get(r)),i.setVisual("opacity",t.get(o)),i.each((function(t){var n=i.getItemModel(t),a=e.getEdgeByIndex(t),s=fT(n.getShallow("symbol",!0)),l=fT(n.getShallow("symbolSize",!0)),h=n.get(r),u=n.get(o);switch(h){case"source":h=a.node1.getVisual("color");break;case"target":h=a.node2.getVisual("color")}s[0]&&a.setVisual("fromSymbol",s[0]),s[1]&&a.setVisual("toSymbol",s[1]),l[0]&&a.setVisual("fromSymbolSize",l[0]),l[1]&&a.setVisual("toSymbolSize",l[1]),a.setVisual("color",h),a.setVisual("opacity",u)}))}))},mT={},vT=U;function yT(t){t.eachEdge((function(t){var e=t.getModel().get("lineStyle.normal.curveness")||0,i=vT.clone(t.node1.getLayout()),n=vT.clone(t.node2.getLayout()),a=[i,n];+e&&a.push([(i[0]+n[0])/2-(i[1]-n[1])*e,(i[1]+n[1])/2-(n[0]-i[0])*e]),t.setLayout(a)}))}mT.simpleLayout=function(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var i=t.getGraph();i.eachNode((function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])})),yT(i)}},mT.simpleLayoutEdge=yT;var xT=mT,_T=xT.simpleLayout,bT=xT.simpleLayoutEdge;var wT=function(t,e){t.eachSeriesByType("graph",(function(t){var e=t.get("layout"),i=t.coordinateSystem;if(i&&"view"!==i.type){var n=t.getData(),a=i.dimensions;n.each(a,(function(){for(var t,e=arguments,r=[],o=0;o<a.length;o++)isNaN(e[o])||(t=!0),r.push(e[o]);var s=e[e.length-1];t?n.setItemLayout(s,i.dataToPoint(r)):n.setItemLayout(s,[NaN,NaN])})),bT(n.graph)}else e&&"none"!==e||_T(t)}))},ST={},MT=U;ST.circularLayout=function(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var i=e.getBoundingRect(),n=t.getData(),a=n.graph,r=0,o=n.getSum("value"),s=2*Math.PI/(o||n.count()),l=i.width/2+i.x,h=i.height/2+i.y,u=Math.min(i.width,i.height)/2;a.eachNode((function(t){var e=t.getValue("value");r+=s*(o?e:1)/2,t.setLayout([u*Math.cos(r)+l,u*Math.sin(r)+h]),r+=s*(o?e:1)/2})),n.setLayout({cx:l,cy:h}),a.eachEdge((function(t){var e,i=t.getModel().get("lineStyle.normal.curveness")||0,n=MT.clone(t.node1.getLayout()),a=MT.clone(t.node2.getLayout()),r=(n[0]+a[0])/2,o=(n[1]+a[1])/2;+i&&(e=[l*(i*=3)+r*(1-i),h*i+o*(1-i)]),t.setLayout([n,a,e])}))}};var IT=ST.circularLayout;var AT=function(t){t.eachSeriesByType("graph",(function(t){"circular"===t.get("layout")&&IT(t)}))},TT={},CT=U,LT=CT.scaleAndAdd;TT.forceLayout=function(t,e,i){for(var n=i.rect,a=n.width,r=n.height,o=[n.x+a/2,n.y+r/2],s=null==i.gravity?.1:i.gravity,l=0;l<t.length;l++){var h=t[l];h.p||(h.p=CT.create(a*(Math.random()-.5)+o[0],r*(Math.random()-.5)+o[1])),h.pp=CT.clone(h.p),h.edges=null}var u=.6;return{warmUp:function(){u=.5},setFixed:function(e){t[e].fixed=!0},setUnfixed:function(e){t[e].fixed=!1},step:function(i){for(var n=[],a=t.length,r=0;r<e.length;r++){var l=e[r],h=l.n1,c=l.n2;CT.sub(n,c.p,h.p);var d=CT.len(n)-l.d,p=c.w/(h.w+c.w);isNaN(p)&&(p=0),CT.normalize(n,n),!h.fixed&&LT(h.p,h.p,n,p*d*u),!c.fixed&&LT(c.p,c.p,n,-(1-p)*d*u)}for(r=0;r<a;r++){(v=t[r]).fixed||(CT.sub(n,o,v.p),LT(v.p,v.p,n,s*u))}for(r=0;r<a;r++){h=t[r];for(var f=r+1;f<a;f++){c=t[f];CT.sub(n,c.p,h.p),0===(d=CT.len(n))&&(CT.set(n,Math.random()-.5,Math.random()-.5),d=1);var g=(h.rep+c.rep)/d/d;!h.fixed&&LT(h.pp,h.pp,n,g),!c.fixed&&LT(c.pp,c.pp,n,-g)}}var m=[];for(r=0;r<a;r++){var v;(v=t[r]).fixed||(CT.sub(m,v.p,v.pp),LT(v.p,v.p,m,u),CT.copy(v.pp,v.p))}u*=.992,i&&i(t,e,u<.01)}}};var DT=TT.forceLayout,PT=mT.simpleLayout,kT=ST.circularLayout,OT=dr.linearMap,zT=U,ET=b;var RT=function(t){t.eachSeriesByType("graph",(function(t){if(!(c=t.coordinateSystem)||"view"===c.type)if("force"===t.get("layout")){var e=t.preservedPoints||{},i=t.getGraph(),n=i.data,a=i.edgeData,r=t.getModel("force"),o=r.get("initLayout");t.preservedPoints?n.each((function(t){var i=n.getId(t);n.setItemLayout(t,e[i]||[NaN,NaN])})):o&&"none"!==o?"circular"===o&&kT(t):PT(t);var s=n.getDataExtent("value"),l=a.getDataExtent("value"),h=r.get("repulsion"),u=r.get("edgeLength");ET.isArray(h)||(h=[h,h]),ET.isArray(u)||(u=[u,u]),u=[u[1],u[0]];var c,d=n.mapArray("value",(function(t,e){var i=n.getItemLayout(e),a=OT(t,s,h);return isNaN(a)&&(a=(h[0]+h[1])/2),{w:a,rep:a,fixed:n.getItemModel(e).get("fixed"),p:!i||isNaN(i[0])||isNaN(i[1])?null:i}})),p=a.mapArray("value",(function(t,e){var n=i.getEdgeByIndex(e),a=OT(t,l,u);return isNaN(a)&&(a=(u[0]+u[1])/2),{n1:d[n.node1.dataIndex],n2:d[n.node2.dataIndex],d:a,curveness:n.getModel().get("lineStyle.normal.curveness")||0}})),f=(c=t.coordinateSystem).getBoundingRect(),g=DT(d,p,{rect:f,gravity:r.get("gravity")}),m=g.step;g.step=function(t){for(var a=0,r=d.length;a<r;a++)d[a].fixed&&zT.copy(d[a].p,i.getNodeByIndex(a).getLayout());m((function(a,r,o){for(var s=0,l=a.length;s<l;s++)a[s].fixed||i.getNodeByIndex(s).setLayout(a[s].p),e[n.getId(s)]=a[s].p;for(s=0,l=r.length;s<l;s++){var h=r[s],u=i.getEdgeByIndex(s),c=h.n1.p,d=h.n2.p,p=u.getLayout();(p=p?p.slice():[])[0]=p[0]||[],p[1]=p[1]||[],zT.copy(p[0],c),zT.copy(p[1],d),+h.curveness&&(p[2]=[(c[0]+d[0])/2-(c[1]-d[1])*h.curveness,(c[1]+d[1])/2-(d[0]-c[0])*h.curveness]),u.setLayout(p)}t&&t(o)}))},t.forceLayout=g,t.preservedPoints=e,g.step()}else t.forceLayout=null}))},NT=yb,VT=wu.getLayoutRect,BT=eo;var GT=m,WT=b,HT=dT,FT=Ym,ZT=pT,UT=gT,jT=wT,qT=AT,XT=RT,YT=function(t,e){var i=[];return t.eachSeriesByType("graph",(function(t){var n=t.get("coordinateSystem");if(!n||"view"===n){var a=t.getData(),r=a.mapArray((function(t){var e=a.getItemModel(t);return[+e.get("x"),+e.get("y")]})),o=[],s=[];BT.fromPoints(r,o,s),s[0]-o[0]==0&&(s[0]+=1,o[0]-=1),s[1]-o[1]==0&&(s[1]+=1,o[1]-=1);var l=(s[0]-o[0])/(s[1]-o[1]),h=function(t,e,i){var n=t.getBoxLayoutParams();return n.aspect=i,VT(n,{width:e.getWidth(),height:e.getHeight()})}(t,e,l);isNaN(l)&&(o=[h.x,h.y],s=[h.x+h.width,h.y+h.height]);var u=s[0]-o[0],c=s[1]-o[1],d=h.width,p=h.height,f=t.coordinateSystem=new NT;f.zoomLimit=t.get("scaleLimit"),f.setBoundingRect(o[0],o[1],u,c),f.setViewRect(h.x,h.y,d,p),f.setCenter(t.get("center")),f.setZoom(t.get("zoom")),i.push(f)}})),i};GT.registerProcessor(HT),GT.registerVisual(WT.curry(FT,"graph","circle",null)),GT.registerVisual(ZT),GT.registerVisual(UT),GT.registerLayout(jT),GT.registerLayout(qT),GT.registerLayout(XT),GT.registerCoordinateSystem("graphView",{create:YT});var $T=dp,KT=b;yd.extend({type:"series.gauge",getInitialData:function(t,e){var i=new $T(["value"],this),n=t.data||[];return KT.isArray(n)||(n=[n]),i.initData(n),i},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{normal:{color:"auto"}},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}});var JT=ms.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(t,e){var i=Math.cos,n=Math.sin,a=e.r,r=e.width,o=e.angle,s=e.x-i(o)*r*(r>=a/3?1:2),l=e.y-n(o)*r*(r>=a/3?1:2);o=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+i(o)*r,e.y+n(o)*r),t.lineTo(e.x+i(e.angle)*a,e.y+n(e.angle)*a),t.lineTo(e.x-i(o)*r,e.y-n(o)*r),t.lineTo(s,l)}}),QT=Vr,tC=zd,eC=dr,iC=eC.parsePercent,nC=eC.round,aC=eC.linearMap;function rC(t,e){return e&&("string"==typeof e?t=e.replace("{value}",null!=t?t:""):"function"==typeof e&&(t=e(t))),t}var oC=2*Math.PI;tC.extend({type:"gauge",render:function(t,e,i){this.group.removeAll();var n=t.get("axisLine.lineStyle.color"),a=function(t,e){var i=t.get("center"),n=e.getWidth(),a=e.getHeight(),r=Math.min(n,a);return{cx:iC(i[0],e.getWidth()),cy:iC(i[1],e.getHeight()),r:iC(t.get("radius"),r/2)}}(t,i);this._renderMain(t,e,i,n,a)},dispose:function(){},_renderMain:function(t,e,i,n,a){for(var r=this.group,o=t.getModel("axisLine").getModel("lineStyle"),s=t.get("clockwise"),l=-t.get("startAngle")/180*Math.PI,h=((p=-t.get("endAngle")/180*Math.PI)-l)%oC,u=l,c=o.get("width"),d=0;d<n.length;d++){var p=l+h*Math.min(Math.max(n[d][0],0),1),f=new QT.Sector({shape:{startAngle:u,endAngle:p,cx:a.cx,cy:a.cy,clockwise:s,r0:a.r-c,r:a.r},silent:!0});f.setStyle({fill:n[d][1]}),f.setStyle(o.getLineStyle(["color","borderWidth","borderColor"])),r.add(f),u=p}var g=function(t){if(t<=0)return n[0][1];for(var e=0;e<n.length;e++)if(n[e][0]>=t&&(0===e?0:n[e-1][0])<t)return n[e][1];return n[e-1][1]};if(!s){var m=l;l=p,p=m}this._renderTicks(t,e,i,g,a,l,p,s),this._renderPointer(t,e,i,g,a,l,p,s),this._renderTitle(t,e,i,g,a),this._renderDetail(t,e,i,g,a)},_renderTicks:function(t,e,i,n,a,r,o,s){for(var l=this.group,h=a.cx,u=a.cy,c=a.r,d=+t.get("min"),p=+t.get("max"),f=t.getModel("splitLine"),g=t.getModel("axisTick"),m=t.getModel("axisLabel"),v=t.get("splitNumber"),y=g.get("splitNumber"),x=iC(f.get("length"),c),_=iC(g.get("length"),c),b=r,w=(o-r)/v,S=w/y,M=f.getModel("lineStyle").getLineStyle(),I=g.getModel("lineStyle").getLineStyle(),A=0;A<=v;A++){var T=Math.cos(b),C=Math.sin(b);if(f.get("show")){var L=new QT.Line({shape:{x1:T*c+h,y1:C*c+u,x2:T*(c-x)+h,y2:C*(c-x)+u},style:M,silent:!0});"auto"===M.stroke&&L.setStyle({stroke:n(A/v)}),l.add(L)}if(m.get("show")){var D=rC(nC(A/v*(p-d)+d),m.get("formatter")),P=m.get("distance"),k=n(A/v);l.add(new QT.Text({style:QT.setTextStyle({},m,{text:D,x:T*(c-x-P)+h,y:C*(c-x-P)+u,textVerticalAlign:C<-.4?"top":C>.4?"bottom":"middle",textAlign:T<-.4?"left":T>.4?"right":"center"},{autoColor:k}),silent:!0}))}if(g.get("show")&&A!==v){for(var O=0;O<=y;O++){T=Math.cos(b),C=Math.sin(b);var z=new QT.Line({shape:{x1:T*c+h,y1:C*c+u,x2:T*(c-_)+h,y2:C*(c-_)+u},silent:!0,style:I});"auto"===I.stroke&&z.setStyle({stroke:n((A+O/y)/v)}),l.add(z),b+=S}b-=S}else b+=w}},_renderPointer:function(t,e,i,n,a,r,o,s){var l=this.group,h=this._data;if(t.get("pointer.show")){var u=[+t.get("min"),+t.get("max")],c=[r,o],d=t.getData();d.diff(h).add((function(e){var i=new JT({shape:{angle:r}});QT.initProps(i,{shape:{angle:aC(d.get("value",e),u,c,!0)}},t),l.add(i),d.setItemGraphicEl(e,i)})).update((function(e,i){var n=h.getItemGraphicEl(i);QT.updateProps(n,{shape:{angle:aC(d.get("value",e),u,c,!0)}},t),l.add(n),d.setItemGraphicEl(e,n)})).remove((function(t){var e=h.getItemGraphicEl(t);l.remove(e)})).execute(),d.eachItemGraphicEl((function(t,e){var i=d.getItemModel(e),r=i.getModel("pointer");t.setShape({x:a.cx,y:a.cy,width:iC(r.get("width"),a.r),r:iC(r.get("length"),a.r)}),t.useStyle(i.getModel("itemStyle.normal").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",n(aC(d.get("value",e),u,[0,1],!0))),QT.setHoverStyle(t,i.getModel("itemStyle.emphasis").getItemStyle())})),this._data=d}else h&&h.eachItemGraphicEl((function(t){l.remove(t)}))},_renderTitle:function(t,e,i,n,a){var r=t.getModel("title");if(r.get("show")){var o=r.get("offsetCenter"),s=a.cx+iC(o[0],a.r),l=a.cy+iC(o[1],a.r),h=+t.get("min"),u=+t.get("max"),c=t.getData().get("value",0),d=n(aC(c,[h,u],[0,1],!0));this.group.add(new QT.Text({silent:!0,style:QT.setTextStyle({},r,{x:s,y:l,text:t.getData().getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:d,forceRich:!0})}))}},_renderDetail:function(t,e,i,n,a){var r=t.getModel("detail"),o=+t.get("min"),s=+t.get("max");if(r.get("show")){var l=r.get("offsetCenter"),h=a.cx+iC(l[0],a.r),u=a.cy+iC(l[1],a.r),c=iC(r.get("width"),a.r),d=iC(r.get("height"),a.r),p=t.getData().get("value",0),f=n(aC(p,[o,s],[0,1],!0));this.group.add(new QT.Text({silent:!0,style:QT.setTextStyle({},r,{x:h,y:u,text:rC(p,r.get("formatter")),textWidth:isNaN(c)?null:c,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:f,forceRich:!0})}))}}});var sC=m,lC=dp,hC=ur.defaultEmphasis,uC=wp,cC=sC.extendSeriesModel({type:"series.funnel",init:function(t){cC.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this._defaultLabelLine(t)},getInitialData:function(t,e){var i=uC(["value"],t.data),n=new lC(i,this);return n.initData(t.data),n},_defaultLabelLine:function(t){hC(t.labelLine,["show"]);var e=t.labelLine.normal,i=t.labelLine.emphasis;e.show=e.show&&t.label.normal.show,i.show=i.show&&t.label.emphasis.show},getDataParams:function(t){var e=this.getData(),i=cC.superCall(this,"getDataParams",t),n=e.getSum("value");return i.percent=n?+(e.get("value",t)/n*100).toFixed(2):0,i.$vars.push("percent"),i},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{normal:{show:!0,position:"outer"},emphasis:{show:!0}},labelLine:{normal:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},emphasis:{}},itemStyle:{normal:{borderColor:"#fff",borderWidth:1},emphasis:{}}}}),dC=Vr,pC=b,fC=zd;function gC(t,e){dC.Group.call(this);var i=new dC.Polygon,n=new dC.Polyline,a=new dC.Text;function r(){n.ignore=n.hoverIgnore,a.ignore=a.hoverIgnore}function o(){n.ignore=n.normalIgnore,a.ignore=a.normalIgnore}this.add(i),this.add(n),this.add(a),this.updateData(t,e,!0),this.on("emphasis",r).on("normal",o).on("mouseover",r).on("mouseout",o)}var mC=gC.prototype,vC=["itemStyle","normal","opacity"];mC.updateData=function(t,e,i){var n=this.childAt(0),a=t.hostModel,r=t.getItemModel(e),o=t.getItemLayout(e),s=t.getItemModel(e).get(vC);s=null==s?1:s,n.useStyle({}),i?(n.setShape({points:o.points}),n.setStyle({opacity:0}),dC.initProps(n,{style:{opacity:s}},a,e)):dC.updateProps(n,{style:{opacity:s},shape:{points:o.points}},a,e);var l=r.getModel("itemStyle"),h=t.getItemVisual(e,"color");n.setStyle(pC.defaults({lineJoin:"round",fill:h},l.getModel("normal").getItemStyle(["opacity"]))),n.hoverStyle=l.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),dC.setHoverStyle(this)},mC._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),a=t.hostModel,r=t.getItemModel(e),o=t.getItemLayout(e).label,s=t.getItemVisual(e,"color");dC.updateProps(i,{shape:{points:o.linePoints||o.linePoints}},a,e),dC.updateProps(n,{style:{x:o.x,y:o.y}},a,e),n.attr({rotation:o.rotation,origin:[o.x,o.y],z2:10});var l=r.getModel("label.normal"),h=r.getModel("label.emphasis"),u=r.getModel("labelLine.normal"),c=r.getModel("labelLine.emphasis");s=t.getItemVisual(e,"color");dC.setLabelStyle(n.style,n.hoverStyle={},l,h,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:s,useInsideStyle:!!o.inside},{textAlign:o.textAlign,textVerticalAlign:o.verticalAlign}),n.ignore=n.normalIgnore=!l.get("show"),n.hoverIgnore=!h.get("show"),i.ignore=i.normalIgnore=!u.get("show"),i.hoverIgnore=!c.get("show"),i.setStyle({stroke:s}),i.setStyle(u.getModel("lineStyle").getLineStyle()),i.hoverStyle=c.getModel("lineStyle").getLineStyle()},pC.inherits(gC,dC.Group),fC.extend({type:"funnel",render:function(t,e,i){var n=t.getData(),a=this._data,r=this.group;n.diff(a).add((function(t){var e=new gC(n,t);n.setItemGraphicEl(t,e),r.add(e)})).update((function(t,e){var i=a.getItemGraphicEl(e);i.updateData(n,t),r.add(i),n.setItemGraphicEl(t,i)})).remove((function(t){var e=a.getItemGraphicEl(t);r.remove(e)})).execute(),this._data=n},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});var yC=wu,xC=dr,_C=xC.parsePercent,bC=xC.linearMap;var wC=function(t,e,i){t.eachSeriesByType("funnel",(function(t){var i=t.getData(),n=t.get("sort"),a=function(t,e){return yC.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),r=function(t,e){for(var i=t.mapArray("value",(function(t){return t})),n=[],a="ascending"===e,r=0,o=t.count();r<o;r++)n[r]=r;return"function"==typeof e?n.sort(e):"none"!==e&&n.sort((function(t,e){return a?i[t]-i[e]:i[e]-i[t]})),n}(i,n),o=[_C(t.get("minSize"),a.width),_C(t.get("maxSize"),a.width)],s=i.getDataExtent("value"),l=t.get("min"),h=t.get("max");null==l&&(l=Math.min(s[0],0)),null==h&&(h=s[1]);var u=t.get("funnelAlign"),c=t.get("gap"),d=(a.height-c*(i.count()-1))/i.count(),p=a.y,f=function(t,e){var n,r=i.get("value",t)||0,s=bC(r,[l,h],o,!0);switch(u){case"left":n=a.x;break;case"center":n=a.x+(a.width-s)/2;break;case"right":n=a.x+a.width-s}return[[n,e],[n+s,e]]};"ascending"===n&&(d=-d,c=-c,p+=a.height,r=r.reverse());for(var g=0;g<r.length;g++){var m=r[g],v=r[g+1],y=f(m,p),x=f(v,p+d);p+=d+c,i.setItemLayout(m,{points:y.concat(x.slice().reverse())})}!function(t){t.each((function(e){var i,n,a,r,o=t.getItemModel(e),s=o.getModel("label.normal").get("position"),l=o.getModel("labelLine.normal"),h=t.getItemLayout(e),u=h.points,c="inner"===s||"inside"===s||"center"===s;if(c)i="center",r=[[n=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,a=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4],[n,a]];else{var d,p,f,g=l.get("length");"left"===s?(d=(u[3][0]+u[0][0])/2,p=(u[3][1]+u[0][1])/2,n=(f=d-g)-5,i="right"):(d=(u[1][0]+u[2][0])/2,p=(u[1][1]+u[2][1])/2,n=(f=d+g)+5,i="left"),r=[[d,p],[f,p]],a=p}h.label={linePoints:r,x:n,y:a,verticalAlign:"middle",textAlign:i,inside:c}}))}(i)}))},SC=m,MC=b,IC=Yx,AC=wC,TC=o_;SC.registerVisual(MC.curry(IC,"funnel")),SC.registerLayout(AC),SC.registerProcessor(MC.curry(TC,"funnel"));var CC=b,LC=ur;var DC=function(t){!function(t){if(t.parallel)return;var e=!1;CC.each(t.series,(function(t){t&&"parallel"===t.type&&(e=!0)})),e&&(t.parallel=[{}])}(t),function(t){var e=LC.normalizeToArray(t.parallelAxis);CC.each(e,(function(e){if(CC.isObject(e)){var i=e.parallelIndex||0,n=LC.normalizeToArray(t.parallel)[i];n&&n.parallelAxisDefault&&CC.merge(e,n.parallelAxisDefault,!1)}}))}(t)},PC=b,kC=gg,OC=function(t,e,i,n,a){kC.call(this,t,e,i),this.type=n||"value",this.axisIndex=a};function zC(t,e){var i=t[e]-t[1-e];return{span:Math.abs(i),sign:i>0?-1:i<0?1:e?-1:1}}function EC(t,e){return Math.min(e[1],Math.max(e[0],t))}OC.prototype={constructor:OC,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},PC.inherits(OC,kC);var RC=function(t,e,i,n,a,r){e[0]=EC(e[0],i),e[1]=EC(e[1],i),t=t||0;var o=i[1]-i[0];null!=a&&(a=EC(a,[0,o])),null!=r&&(r=Math.max(r,null!=a?a:0)),"all"===n&&(a=r=Math.abs(e[1]-e[0]),n=0);var s=zC(e,n);e[n]+=t;var l=a||0,h=i.slice();s.sign<0?h[0]+=l:h[1]-=l,e[n]=EC(e[n],h);var u=zC(e,n);return null!=a&&(u.sign!==s.sign||u.span<a)&&(e[1-n]=e[n]+s.sign*a),u=zC(e,n),null!=r&&u.span>r&&(e[1-n]=e[n]+u.sign*r),e},NC=b,VC=mt,BC=wu,GC=Rp,WC=OC,HC=Vr,FC=dr,ZC=RC,UC=NC.each,jC=Math.min,qC=Math.max,XC=Math.floor,YC=Math.ceil,$C=FC.round,KC=Math.PI;function JC(t,e,i){this._axesMap=NC.createHashMap(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,i)}function QC(t,e){return jC(qC(t,e[0]),e[1])}function tL(t,e){var i=e.layoutLength/(e.axisCount-1);return{position:i*t,axisNameAvailableWidth:i,axisLabelShow:!0}}function eL(t,e){var i,n,a=e.layoutLength,r=e.axisExpandWidth,o=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,h=s,u=!1;return t<l[0]?(i=t*s,n=s):t<=l[1]?(i=e.axisExpandWindow0Pos+t*r-e.axisExpandWindow[0],h=r,u=!0):(i=a-(o-1-t)*s,n=s),{position:i,axisNameAvailableWidth:h,axisLabelShow:u,nameTruncateMaxWidth:n}}JC.prototype={type:"parallel",constructor:JC,_init:function(t,e,i){var n=t.dimensions,a=t.parallelAxisIndex;UC(n,(function(t,i){var n=a[i],r=e.getComponent("parallelAxis",n),o=this._axesMap.set(t,new WC(t,GC.createScaleByModel(r),[0,0],r.get("type"),n)),s="category"===o.type;o.onBand=s&&r.get("boundaryGap"),o.inverse=r.get("inverse"),r.axis=o,o.model=r,o.coordinateSystem=r.coordinateSystem=this}),this)},update:function(t,e){this._updateAxesFromSeries(this._model,t)},containPoint:function(t){var e=this._makeLayoutInfo(),i=e.axisBase,n=e.layoutBase,a=e.pixelDimIndex,r=t[1-a],o=t[a];return r>=i&&r<=i+e.axisLength&&o>=n&&o<=n+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(t,e){e.eachSeries((function(i){if(t.contains(i,e)){var n=i.getData();UC(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,t),GC.niceScaleExtent(e.scale,e.model)}),this)}}),this)},resize:function(t,e){this._rect=BC.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t,e=this._model,i=this._rect,n=["x","y"],a=["width","height"],r=e.get("layout"),o="horizontal"===r?0:1,s=i[a[o]],l=[0,s],h=this.dimensions.length,u=QC(e.get("axisExpandWidth"),l),c=QC(e.get("axisExpandCount")||0,[0,h]),d=e.get("axisExpandable")&&h>3&&h>c&&c>1&&u>0&&s>0,p=e.get("axisExpandWindow");p?(t=QC(p[1]-p[0],l),p[1]=p[0]+t):(t=QC(u*(c-1),l),(p=[u*(e.get("axisExpandCenter")||XC(h/2))-t/2])[1]=p[0]+t);var f=(s-t)/(h-c);f<3&&(f=0);var g=[XC($C(p[0]/u,1))+1,YC($C(p[1]/u,1))-1],m=f/u*p[0];return{layout:r,pixelDimIndex:o,layoutBase:i[n[o]],layoutLength:s,axisBase:i[n[1-o]],axisLength:i[a[1-o]],axisExpandable:d,axisExpandWidth:u,axisCollapseWidth:f,axisExpandWindow:p,axisCount:h,winInnerIndices:g,axisExpandWindow0Pos:m}},_layoutAxes:function(){var t=this._rect,e=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),a=n.layout;e.each((function(t){var e=[0,n.axisLength],i=t.inverse?1:0;t.setExtent(e[i],e[1-i])})),UC(i,(function(i,r){var o=(n.axisExpandable?eL:tL)(r,n),s={horizontal:{x:o.position,y:n.axisLength},vertical:{x:0,y:o.position}},l={horizontal:KC/2,vertical:0},h=[s[a].x+t.x,s[a].y+t.y],u=l[a],c=VC.create();VC.rotate(c,c,u),VC.translate(c,c,h),this._axesLayout[i]={position:h,rotation:u,transform:c,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1,labelInterval:e.get(i).getLabelInterval()}}),this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(t,e,i){for(var n=this.dimensions,a=this._axesMap,r=this.hasAxisBrushed(),o=0,s=t.count();o<s;o++){var l,h=t.getValues(n,o);if(r){l="active";for(var u=0,c=n.length;u<c;u++){var d=n[u];if("inactive"===a.get(d).model.getActiveState(h[u],u)){l="inactive";break}}}else l="normal";e.call(i,l,o)}},hasAxisBrushed:function(){for(var t=this.dimensions,e=this._axesMap,i=!1,n=0,a=t.length;n<a;n++)"normal"!==e.get(t[n]).model.getActiveState()&&(i=!0);return i},axisCoordToPoint:function(t,e){var i=this._axesLayout[e];return HC.applyTransform([t,0],i.transform)},getAxisLayout:function(t){return NC.clone(this._axesLayout[t])},getSlidedAxisExpandWindow:function(t){var e=this._makeLayoutInfo(),i=e.pixelDimIndex,n=e.axisExpandWindow.slice(),a=n[1]-n[0],r=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:n};var o,s=t[i]-e.layoutBase-e.axisExpandWindow0Pos,l="slide",h=e.axisCollapseWidth,u=this._model.get("axisExpandSlideTriggerArea"),c=null!=u[0];if(h)c&&h&&s<a*u[0]?(l="jump",o=s-a*u[2]):c&&h&&s>a*(1-u[0])?(l="jump",o=s-a*(1-u[2])):(o=s-a*u[1])>=0&&(o=s-a*(1-u[1]))<=0&&(o=0),(o*=e.axisExpandWidth/h)?ZC(o,n,r,"all"):l="none";else{a=n[1]-n[0];(n=[qC(0,r[1]*s/a-a/2)])[1]=jC(r[1],n[0]+a),n[0]=n[1]-a}return{axisExpandWindow:n,behavior:l}}};var iL=JC;_c.register("parallel",{create:function(t,e){var i=[];return t.eachComponent("parallel",(function(n,a){var r=new iL(n,t,e);r.name="parallel_"+a,r.resize(n,e),n.coordinateSystem=r,r.model=n,i.push(r)})),t.eachSeries((function(e){if("parallel"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"parallel",index:e.get("parallelIndex"),id:e.get("parallelId")})[0];e.coordinateSystem=i.coordinateSystem}})),i}});var nL=b,aL=Or,rL=wv,oL=dr,sL=Wf,lL=Zu.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return aL([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=nL.clone(t);if(e)for(var i=e.length-1;i>=0;i--)oL.asc(e[i])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t)return"inactive";for(var i=0,n=e.length;i<n;i++)if(e[i][0]<=t&&t<=e[i][1])return"active";return"inactive"}});nL.merge(lL.prototype,sL),rL("parallel",lL,(function(t,e){return e.type||(e.data?"category":"value")}),{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});var hL=b,uL=Zu;uL.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(){uL.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&hL.merge(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){hL.each(["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=hL.filter(this.dependentModels.parallelAxis,(function(t){return(t.get("parallelIndex")||0)===this.componentIndex}),this);hL.each(i,(function(i){t.push("dim"+i.get("dim")),e.push(i.componentIndex)}))}});var cL=m;cL.registerAction({type:"axisAreaSelect",event:"axisAreaSelected",update:"updateVisual"},(function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},(function(e){e.axis.model.setActiveIntervals(t.intervals)}))})),cL.registerAction("parallelAxisExpand",(function(t,e){e.eachComponent({mainType:"parallel",query:t},(function(e){e.setAxisExpand(t)}))}));var dL=b,pL=ot,fL=Vr,gL=nw,mL=$d,vL=dL.curry,yL=dL.each,xL=dL.map,_L=Math.min,bL=Math.max,wL=Math.pow,SL={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},ML={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},IL={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},AL=0;function TL(t){pL.call(this),this._zr=t,this.group=new fL.Group,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+AL++,this._handlers={},yL(tD,(function(t,e){this._handlers[e]=dL.bind(t,this)}),this)}function CL(t,e){var i=iD[e.brushType].createCover(t,e);return i.__brushOption=e,PL(i,e),t.group.add(i),i}function LL(t,e){var i=OL(e);return i.endCreating&&(i.endCreating(t,e),PL(e,e.__brushOption)),e}function DL(t,e){var i=e.__brushOption;OL(e).updateCoverShape(t,e,i.range,i)}function PL(t,e){var i=e.z;null==i&&(i=1e4),t.traverse((function(t){t.z=i,t.z2=i}))}function kL(t,e){OL(e).updateCommon(t,e),DL(t,e)}function OL(t){return iD[t.__brushOption.brushType]}function zL(t,e,i){var n,a=t._panels;if(!a)return!0;var r=t._transform;return yL(a,(function(t){t.isTargetByCursor(e,i,r)&&(n=t)})),n}function EL(t,e){var i=t._panels;if(!i)return!0;var n=e.__brushOption.panelId;return null==n||i[n]}function RL(t){var e=t._covers,i=e.length;return yL(e,(function(e){t.group.remove(e)}),t),e.length=0,!!i}function NL(t,e){var i=xL(t._covers,(function(t){var e=t.__brushOption,i=dL.clone(e.range);return{brushType:e.brushType,panelId:e.panelId,range:i}}));t.trigger("brush",i,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function VL(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function BL(t,e,i,n){var a=new fL.Group;return a.add(new fL.Rect({name:"main",style:FL(i),silent:!0,draggable:!0,cursor:"move",drift:vL(t,e,a,"nswe"),ondragend:vL(NL,e,{isEnd:!0})})),yL(n,(function(i){a.add(new fL.Rect({name:i,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:vL(t,e,a,i),ondragend:vL(NL,e,{isEnd:!0})}))})),a}function GL(t,e,i,n){var a=n.brushStyle.lineWidth||0,r=bL(a,6),o=i[0][0],s=i[1][0],l=o-a/2,h=s-a/2,u=i[0][1],c=i[1][1],d=u-r+a/2,p=c-r+a/2,f=u-o,g=c-s,m=f+a,v=g+a;HL(t,e,"main",o,s,f,g),n.transformable&&(HL(t,e,"w",l,h,r,v),HL(t,e,"e",d,h,r,v),HL(t,e,"n",l,h,m,r),HL(t,e,"s",l,p,m,r),HL(t,e,"nw",l,h,r,r),HL(t,e,"ne",d,h,r,r),HL(t,e,"sw",l,p,r,r),HL(t,e,"se",d,p,r,r))}function WL(t,e){var i=e.__brushOption,n=i.transformable,a=e.childAt(0);a.useStyle(FL(i)),a.attr({silent:!n,cursor:n?"move":"default"}),yL(["w","e","n","s","se","sw","ne","nw"],(function(i){var a=e.childOfName(i),r=UL(t,i);a&&a.attr({silent:!n,invisible:!n,cursor:n?ML[r]+"-resize":null})}))}function HL(t,e,i,n,a,r,o){var s=e.childOfName(i);s&&s.setShape(function(t){var e=_L(t[0][0],t[1][0]),i=_L(t[0][1],t[1][1]),n=bL(t[0][0],t[1][0]),a=bL(t[0][1],t[1][1]);return{x:e,y:i,width:n-e,height:a-i}}(YL(t,e,[[n,a],[n+r,a+o]])))}function FL(t){return dL.defaults({strokeNoScale:!0},t.brushStyle)}function ZL(t,e,i,n){var a=[_L(t,i),_L(e,n)],r=[bL(t,i),bL(e,n)];return[[a[0],r[0]],[a[1],r[1]]]}function UL(t,e){if(e.length>1)return("e"===(i=[UL(t,(e=e.split(""))[0]),UL(t,e[1])])[0]||"w"===i[0])&&i.reverse(),i.join("");var i=fL.transformDirection({w:"left",e:"right",n:"top",s:"bottom"}[e],function(t){return fL.getTransform(t.group)}(t));return{left:"w",right:"e",top:"n",bottom:"s"}[i]}function jL(t,e,i,n,a,r,o,s){var l=n.__brushOption,h=t(l.range),u=XL(i,r,o);yL(a.split(""),(function(t){var e=SL[t];h[e[0]][e[1]]+=u[e[0]]})),l.range=e(ZL(h[0][0],h[1][0],h[0][1],h[1][1])),kL(i,n),NL(i,{isEnd:!1})}function qL(t,e,i,n,a){var r=e.__brushOption.range,o=XL(t,i,n);yL(r,(function(t){t[0]+=o[0],t[1]+=o[1]})),kL(t,e),NL(t,{isEnd:!1})}function XL(t,e,i){var n=t.group,a=n.transformCoordToLocal(e,i),r=n.transformCoordToLocal(0,0);return[a[0]-r[0],a[1]-r[1]]}function YL(t,e,i){var n=EL(t,e);return n&&!0!==n?n.clipPath(i,t._transform):dL.clone(i)}function $L(t){var e=t.event;e.preventDefault&&e.preventDefault()}function KL(t,e,i){return t.childOfName("main").contain(e,i)}function JL(t,e,i,n){var a,r=t._creatingCover,o=t._creatingPanel,s=t._brushOption;if(t._track.push(i.slice()),function(t){var e=t._track;if(!e.length)return!1;var i=e[e.length-1],n=e[0],a=i[0]-n[0],r=i[1]-n[1];return wL(a*a+r*r,.5)>6}(t)||r){if(o&&!r){"single"===s.brushMode&&RL(t);var l=dL.clone(s);l.brushType=QL(l.brushType,o),l.panelId=!0===o?null:o.panelId,r=t._creatingCover=CL(t,l),t._covers.push(r)}if(r){var h=iD[QL(t._brushType,o)];r.__brushOption.range=h.getCreatingRange(YL(t,r,t._track)),n&&(LL(t,r),h.updateCommon(t,r)),DL(t,r),a={isEnd:n}}}else n&&"single"===s.brushMode&&s.removeOnClick&&zL(t,e,i)&&RL(t)&&(a={isEnd:n,removeOnClick:!0});return a}function QL(t,e){return"auto"===t?e.defaultBrushType:t}TL.prototype={constructor:TL,enableBrush:function(t){var e,i;return this._brushType&&(i=(e=this)._zr,gL.release(i,"globalPan",e._uid),yL(e._handlers,(function(t,e){i.off(e,t)})),e._brushType=e._brushOption=null),t.brushType&&function(t,e){var i=t._zr;t._enableGlobalPan||gL.take(i,"globalPan",t._uid);yL(t._handlers,(function(t,e){i.on(e,t)})),t._brushType=e.brushType,t._brushOption=dL.merge(dL.clone(IL),e,!0)}(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};dL.each(t,(function(t){e[t.panelId]=dL.clone(t)}))}else this._panels=null;return this},mount:function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getLocalTransform(),this},eachCover:function(t,e){yL(this._covers,t,e)},updateCovers:function(t){t=dL.map(t,(function(t){return dL.merge(dL.clone(IL),t,!0)}));var e=this._covers,i=this._covers=[],n=this,a=this._creatingCover;return new mL(e,t,(function(t,e){return r(t.__brushOption,e)}),r).add(o).update(o).remove((function(t){e[t]!==a&&n.group.remove(e[t])})).execute(),this;function r(t,e){return(null!=t.id?t.id:"\0-brush-index-"+e)+"-"+t.brushType}function o(r,o){var s=t[r];if(null!=o&&e[o]===a)i[r]=e[o];else{var l=i[r]=null!=o?(e[o].__brushOption=s,e[o]):LL(n,CL(n,s));kL(n,l)}}},unmount:function(){return this.enableBrush(!1),RL(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},dL.mixin(TL,pL);var tD={mousedown:function(t){if(this._dragging)eD.call(this,t);else if(!t.target||!t.target.draggable){$L(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=zL(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);if(function(t,e,i){if(t._brushType){var n=t._zr,a=t._covers,r=zL(t,e,i);if(!t._dragging)for(var o=0;o<a.length;o++){var s=a[o].__brushOption;if(r&&(!0===r||s.panelId===r.panelId)&&iD[s.brushType].contain(a[o],i[0],i[1]))return}r&&n.setCursorStyle("crosshair")}}(this,t,e),this._dragging){$L(t);var i=JL(this,t,e,!1);i&&NL(this,i)}},mouseup:eD};function eD(t){if(this._dragging){$L(t);var e=JL(this,t,this.group.transformCoordToLocal(t.offsetX,t.offsetY),!0);this._dragging=!1,this._track=[],this._creatingCover=null,e&&NL(this,e)}}var iD={lineX:nD(0),lineY:nD(1),rect:{createCover:function(t,e){return BL(vL(jL,(function(t){return t}),(function(t){return t})),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=VL(t);return ZL(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,i,n){GL(t,e,i,n)},updateCommon:WL,contain:KL},polygon:{createCover:function(t,e){var i=new fL.Group;return i.add(new fL.Polyline({name:"main",style:FL(e),silent:!0})),i},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new fL.Polygon({name:"main",draggable:!0,drift:vL(qL,t,e),ondragend:vL(NL,t,{isEnd:!0})}))},updateCoverShape:function(t,e,i,n){e.childAt(0).setShape({points:YL(t,e,i)})},updateCommon:WL,contain:KL}};function nD(t){return{createCover:function(e,i){return BL(vL(jL,(function(e){var i=[e,[0,100]];return t&&i.reverse(),i}),(function(e){return e[t]})),e,i,[["w","e"],["n","s"]][t])},getCreatingRange:function(e){var i=VL(e);return[_L(i[0][t],i[1][t]),bL(i[0][t],i[1][t])]},updateCoverShape:function(e,i,n,a){var r,o=EL(e,i);if(!0!==o&&o.getLinearBrushOtherExtent)r=o.getLinearBrushOtherExtent(t,e._transform);else{var s=e._zr;r=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[n,r];t&&l.reverse(),GL(e,i,l,a)},updateCommon:WL,contain:KL}}var aD=TL,rD={},oD=Je,sD=_w.onIrrelevantElement,lD=Vr;function hD(t){return oD.create(t)}rD.makeRectPanelClipPath=function(t){return t=hD(t),function(e,i){return lD.clipPointsByRect(e,t)}},rD.makeLinearBrushOtherExtent=function(t,e){return t=hD(t),function(i){var n=null!=e?e:i,a=n?t.width:t.height,r=n?t.x:t.y;return[r,r+(a||0)]}},rD.makeRectIsTargetByCursor=function(t,e,i){return t=hD(t),function(n,a,r){return t.contain(a[0],a[1])&&!sD(n,e,i)}};var uD=b,cD=yy,dD=aD,pD=rD,fD=Vr,gD=["axisLine","axisTickLabel","axisName"],mD=m.extendComponentView({type:"parallelAxis",init:function(t,e){mD.superApply(this,"init",arguments),(this._brushController=new dD(e.getZr())).on("brush",uD.bind(this._onBrush,this))},render:function(t,e,i,n){if(!function(t,e,i){return i&&"axisAreaSelect"===i.type&&e.findComponents({mainType:"parallelAxis",query:i})[0]===t}(t,e,n)){this.axisModel=t,this.api=i,this.group.removeAll();var a=this._axisGroup;if(this._axisGroup=new fD.Group,this.group.add(this._axisGroup),t.get("show")){var r=function(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}(t,e),o=r.coordinateSystem,s=t.getAreaSelectStyle(),l=s.width,h=t.axis.dim,u=o.getAxisLayout(h),c=uD.extend({strokeContainThreshold:l},u),d=new cD(t,c);uD.each(gD,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(c,s,t,r,l,i);var p=n&&!1===n.animation?null:t;fD.groupTransition(a,this._axisGroup,p)}}},updateVisual:function(t,e,i,n){this._brushController&&this._brushController.updateCovers(vD(t))},_refreshBrushController:function(t,e,i,n,a,r){var o=i.axis.getExtent(),s=o[1]-o[0],l=Math.min(30,.1*Math.abs(s)),h=fD.BoundingRect.create({x:o[0],y:-a/2,width:s,height:a});h.x-=l,h.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,position:t.position}).setPanels([{panelId:"pl",clipPath:pD.makeRectPanelClipPath(h),isTargetByCursor:pD.makeRectIsTargetByCursor(h,r,n),getLinearBrushOtherExtent:pD.makeLinearBrushOtherExtent(h,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(vD(i))},_onBrush:function(t,e){var i=this.axisModel,n=i.axis,a=uD.map(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()}});function vD(t){var e=t.axis;return uD.map(t.activeIntervals,(function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}}))}var yD=m,xD=b,_D=Ed,bD=DC;yD.extendComponentView({type:"parallel",render:function(t,e,i){this._model=t,this._api=i,this._handlers||(this._handlers={},xD.each(wD,(function(t,e){i.getZr().on(e,this._handlers[e]=xD.bind(t,this))}),this)),_D.createOrUpdate(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,e){xD.each(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(xD.extend({type:"parallelAxisExpand"},t))}});var wD={mousedown:function(t){SD(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(SD(this,"click")&&e){var i=[t.offsetX,t.offsetY];if(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2)>5)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==n.behavior&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&SD(this,"mousemove")){var e=this._model,i=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=i.behavior;"jump"===n&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===n?null:{axisExpandWindow:i.axisExpandWindow,animation:"jump"===n&&null})}}};function SD(t,e){var i=t._model;return i.get("axisExpandable")&&i.get("axisExpandTriggerOn")===e}yD.registerPreprocessor(bD);var MD=dp,ID=b,AD=wp;function TD(t){return+t.replace("dim","")}yd.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.normal.color",getInitialData:function(t,e){var i=e.getComponent("parallel",this.get("parallelIndex")),n=i.parallelAxisIndex,a=t.data,r=i.dimensions,o=function(t,e){var i=0;ID.each(t,(function(t){var e=TD(t);e>i&&(i=e)}));var n=e[0];n&&n.length-1>i&&(i=n.length-1);for(var a=[],r=0;r<=i;r++)a.push("dim"+r);return a}(r,a),s=ID.map(o,(function(t,i){var o=ID.indexOf(r,t),s=o>=0&&e.getComponent("parallelAxis",n[o]);return s&&"category"===s.get("type")?(function(t,e,i){var n=t.get("data"),a=TD(e);n&&n.length&&ID.each(i,(function(t){if(t){var e=ID.indexOf(n,t[a]);t[a]=e>=0?e:NaN}}))}(s,t,a),{name:t,type:"ordinal"}):o<0&&AD.guessOrdinal(a,i)?{name:t,type:"ordinal"}:t})),l=new MD(s,this);return l.initData(a),this.option.progressive&&(this.option.animation=!1),l},getRawIndicesByActiveState:function(t){var e=this.coordinateSystem,i=this.getData(),n=[];return e.eachActiveState(i,(function(e,a){t===e&&n.push(i.getRawIndex(a))})),n},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{normal:{show:!1},emphasis:{show:!1}},inactiveOpacity:.05,activeOpacity:1,lineStyle:{normal:{width:1,opacity:.45,type:"solid"}},progressive:!1,smooth:!1,animationEasing:"linear"}});var CD=Vr,LD=b;function DD(t,e,i,n){for(var a,r=[],o=0;o<i.length;o++){var s=i[o],l=t.get(s,e);a=l,("category"===n.getAxis(s).type?null==a:null==a||isNaN(a))||r.push(n.dataToPoint(l,s))}return r}zd.extend({type:"parallel",init:function(){this._dataGroup=new CD.Group,this.group.add(this._dataGroup),this._data},render:function(t,e,i,n){this._renderForNormal(t,n)},dispose:function(){},_renderForNormal:function(t,e){var i=this._dataGroup,n=t.getData(),a=this._data,r=t.coordinateSystem,o=r.dimensions,s=t.option.smooth?.3:null;if(n.diff(a).add((function(t){!function(t,e,i,n,a){var r=DD(t,i,n,a),o=new CD.Polyline({shape:{points:r},silent:!0,z2:10});e.add(o),t.setItemGraphicEl(i,o)}(n,i,t,o,r)})).update((function(i,s){var l=a.getItemGraphicEl(s),h=DD(n,i,o,r);n.setItemGraphicEl(i,l);var u=e&&!1===e.animation?null:t;CD.updateProps(l,{shape:{points:h}},u,i)})).remove((function(t){var e=a.getItemGraphicEl(t);i.remove(e)})).execute(),function(t,e){var i=t.hostModel.getModel("lineStyle.normal"),n=i.getLineStyle();t.eachItemGraphicEl((function(a,r){if(t.hasItemOption){var o=t.getItemModel(r).getModel("lineStyle.normal",i);n=o.getLineStyle(["color","stroke"])}a.useStyle(LD.extend(n,{fill:null,stroke:t.getItemVisual(r,"color"),opacity:t.getItemVisual(r,"opacity")})),a.shape.smooth=e}))}(n,s),!this._data){var l=function(t,e,i){var n=t.model,a=t.getRect(),r=new CD.Rect({shape:{x:a.x,y:a.y,width:a.width,height:a.height}}),o="horizontal"===n.get("layout")?"width":"height";return r.setShape(o,0),CD.initProps(r,{shape:{width:a.width,height:a.height}},e,i),r}(r,t,(function(){setTimeout((function(){i.removeClipPath()}))}));i.setClipPath(l)}this._data=n},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}});var PD=["lineStyle","normal","opacity"];m.registerVisual((function(t){t.eachSeriesByType("parallel",(function(e){var i=e.getModel("itemStyle.normal"),n=e.getModel("lineStyle.normal"),a=t.get("color"),r=n.get("color")||i.get("color")||a[e.seriesIndex%a.length],o=e.get("inactiveOpacity"),s=e.get("activeOpacity"),l=e.getModel("lineStyle.normal").getLineStyle(),h=e.coordinateSystem,u=e.getData(),c={normal:l.opacity,active:s,inactive:o};h.eachActiveState(u,(function(t,e){var i=u.getItemModel(e),n=c[t];if("normal"===t){var a=i.get(PD,!0);null!=a&&(n=a)}u.setItemVisual(e,"opacity",n)})),u.setVisual("color",r)}))}));var kD=yd,OD=rA,zD=cr.encodeHTML,ED=kD.extend({type:"series.sankey",layoutInfo:null,getInitialData:function(t){var e=t.edges||t.links,i=t.data||t.nodes;if(i&&e)return OD(i,e,this,!0).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getDataParams(t,i),a=n.data,r=a.source+" -- "+a.target;return n.value&&(r+=" : "+n.value),zD(r)}return ED.superCall(this,"formatTooltip",t,e)},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",nodeWidth:20,nodeGap:8,layoutIterations:32,label:{normal:{show:!0,position:"right",color:"#000",fontSize:12},emphasis:{show:!0}},itemStyle:{normal:{borderWidth:1,borderColor:"#333"}},lineStyle:{normal:{color:"#314656",opacity:.2,curveness:.5},emphasis:{opacity:.6}},animationEasing:"linear",animationDuration:1e3}}),RD=Vr,ND=m,VD=RD.extendShape({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0},buildPath:function(t,e){var i=e.extent/2;t.moveTo(e.x1,e.y1-i),t.bezierCurveTo(e.cpx1,e.cpy1-i,e.cpx2,e.cpy2-i,e.x2,e.y2-i),t.lineTo(e.x2,e.y2+i),t.bezierCurveTo(e.cpx2,e.cpy2+i,e.cpx1,e.cpy1+i,e.x1,e.y1+i),t.closePath()}});ND.extendChartView({type:"sankey",_model:null,render:function(t,e,i){var n=t.getGraph(),a=this.group,r=t.layoutInfo,o=t.getData(),s=t.getData("edge");this._model=t,a.removeAll(),a.attr("position",[r.x,r.y]),n.eachEdge((function(e){var i=new VD;i.dataIndex=e.dataIndex,i.seriesIndex=t.seriesIndex,i.dataType="edge";var n=e.getModel("lineStyle.normal"),r=n.get("curveness"),o=e.node1.getLayout(),l=e.node2.getLayout(),h=e.getLayout();i.shape.extent=Math.max(1,h.dy);var u=o.x+o.dx,c=o.y+h.sy+h.dy/2,d=l.x,p=l.y+h.ty+h.dy/2,f=u*(1-r)+d*r,g=c,m=u*r+d*(1-r),v=p;switch(i.setShape({x1:u,y1:c,x2:d,y2:p,cpx1:f,cpy1:g,cpx2:m,cpy2:v}),i.setStyle(n.getItemStyle()),i.style.fill){case"source":i.style.fill=e.node1.getVisual("color");break;case"target":i.style.fill=e.node2.getVisual("color")}RD.setHoverStyle(i,e.getModel("lineStyle.emphasis").getItemStyle()),a.add(i),s.setItemGraphicEl(e.dataIndex,i)})),n.eachNode((function(e){var i=e.getLayout(),n=e.getModel(),r=n.getModel("label.normal"),s=n.getModel("label.emphasis"),l=new RD.Rect({shape:{x:i.x,y:i.y,width:e.getLayout().dx,height:e.getLayout().dy},style:n.getModel("itemStyle.normal").getItemStyle()}),h=e.getModel("itemStyle.emphasis").getItemStyle();RD.setLabelStyle(l.style,h,r,s,{labelFetcher:t,labelDataIndex:e.dataIndex,defaultText:e.id,isRectText:!0}),l.setStyle("fill",e.getVisual("color")),RD.setHoverStyle(l,h),a.add(l),o.setItemGraphicEl(e.dataIndex,l),l.dataType="node"})),!this._data&&t.get("animation")&&a.setClipPath(function(t,e,i){var n=new RD.Rect({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return RD.initProps(n,{shape:{width:t.width+20,height:t.height+20}},e,i),n}(a.getBoundingRect(),t,(function(){a.removeClipPath()}))),this._data=t.getData()},dispose:function(){}});var BD=b;var GD=function(){var t=[],e=[];function i(e,n){if(n>=t.length)return e;for(var a=-1,r=e.length,o=t[n++],s={},l={};++a<r;){var h=o(e[a]),u=l[h];u?u.push(e[a]):l[h]=[e[a]]}return BD.each(l,(function(t,e){s[e]=i(t,n)})),s}function n(i,a){if(a>=t.length)return i;var r=[],o=e[a++];return BD.each(i,(function(t,e){r.push({key:e,values:n(t,a)})})),o?r.sort((function(t,e){return o(t.key,e.key)})):r}return{key:function(e){return t.push(e),this},sortKeys:function(i){return e[t.length-1]=i,this},entries:function(t){return n(i(t,0),0)}}},WD=wu,HD=GD,FD=b;function ZD(t,e,i){FD.each(t,(function(t){var n,a,r,o=0,s=t.length;for(t.sort(QD),r=0;r<s;r++){if((a=o-(n=t[r]).getLayout().y)>0){var l=n.getLayout().y+a;n.setLayout({y:l},!0)}o=n.getLayout().y+n.getLayout().dy+e}if((a=o-e-i)>0){l=n.getLayout().y-a;for(n.setLayout({y:l},!0),o=n.getLayout().y,r=s-2;r>=0;--r)(a=(n=t[r]).getLayout().y+n.getLayout().dy+e-o)>0&&(l=n.getLayout().y-a,n.setLayout({y:l},!0)),o=n.getLayout().y}}))}function UD(t,e){FD.each(t.slice().reverse(),(function(t){FD.each(t,(function(t){if(t.outEdges.length){var i=KD(t.outEdges,jD)/KD(t.outEdges,eP),n=t.getLayout().y+(i-JD(t))*e;t.setLayout({y:n},!0)}}))}))}function jD(t){return JD(t.node2)*t.getValue()}function qD(t,e){FD.each(t,(function(t){FD.each(t,(function(t){if(t.inEdges.length){var i=KD(t.inEdges,XD)/KD(t.inEdges,eP),n=t.getLayout().y+(i-JD(t))*e;t.setLayout({y:n},!0)}}))}))}function XD(t){return JD(t.node1)*t.getValue()}function YD(t,e){return t.node2.getLayout().y-e.node2.getLayout().y}function $D(t,e){return t.node1.getLayout().y-e.node1.getLayout().y}function KD(t,e){for(var i=0,n=t.length,a=-1;++a<n;){var r=+e.call(t,t[a],a);isNaN(r)||(i+=r)}return i}function JD(t){return t.getLayout().y+t.getLayout().dy/2}function QD(t,e){return t.getLayout().y-e.getLayout().y}function tP(t,e){return t<e?-1:t>e?1:t===e?0:NaN}function eP(t){return t.getValue()}var iP=function(t,e,i){t.eachSeriesByType("sankey",(function(t){var i=t.get("nodeWidth"),n=t.get("nodeGap"),a=function(t,e){return WD.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=a;var r=a.width,o=a.height,s=t.getGraph(),l=s.nodes,h=s.edges;!function(t){FD.each(t,(function(t){var e=KD(t.outEdges,eP),i=KD(t.inEdges,eP),n=Math.max(e,i);t.setLayout({value:n},!0)}))}(l),function(t,e,i,n,a,r,o){(function(t,e,i){var n=t,a=null,r=0;for(;n.length;){a=[];for(var o=0,s=n.length;o<s;o++){var l=n[o];l.setLayout({x:r},!0),l.setLayout({dx:e},!0);for(var h=0,u=l.outEdges.length;h<u;h++)a.push(l.outEdges[h].node2)}n=a,++r}(function(t,e){FD.each(t,(function(t){t.outEdges.length||t.setLayout({x:e-1},!0)}))})(t,r),function(t,e){FD.each(t,(function(t){var i=t.getLayout().x*e;t.setLayout({x:i},!0)}))}(t,(i-e)/(r-1))})(t,i,a),function(t,e,i,n,a){var r=HD().key((function(t){return t.getLayout().x})).sortKeys(tP).entries(t).map((function(t){return t.values}));(function(t,e,i,n,a){var r=[];FD.each(e,(function(t){var e=t.length,i=0;FD.each(t,(function(t){i+=t.getLayout().value}));var o=(n-(e-1)*a)/i;r.push(o)})),r.sort((function(t,e){return t-e}));var o=r[0];FD.each(e,(function(t){FD.each(t,(function(t,e){t.setLayout({y:e},!0);var i=t.getLayout().value*o;t.setLayout({dy:i},!0)}))})),FD.each(i,(function(t){var e=+t.getValue()*o;t.setLayout({dy:e},!0)}))})(0,r,e,i,n),ZD(r,n,i);for(var o=1;a>0;a--)UD(r,o*=.99),ZD(r,n,i),qD(r,o),ZD(r,n,i)}(t,e,r,n,o),function(t){FD.each(t,(function(t){t.outEdges.sort(YD),t.inEdges.sort($D)})),FD.each(t,(function(t){var e=0,i=0;FD.each(t.outEdges,(function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy})),FD.each(t.inEdges,(function(t){t.setLayout({ty:i},!0),i+=t.getLayout().dy}))}))}(t)}(l,h,i,n,r,o,0!==FD.filter(l,(function(t){return 0===t.getLayout().value})).length?0:t.get("layoutIterations"))}))},nP=cI,aP=b;var rP=m,oP=iP,sP=function(t,e){t.eachSeriesByType("sankey",(function(t){var e=t.getGraph().nodes;e.sort((function(t,e){return t.getLayout().value-e.getLayout().value}));var i=e[0].getLayout().value,n=e[e.length-1].getLayout().value;aP.each(e,(function(e){var a=new nP({type:"color",mappingMethod:"linear",dataExtent:[i,n],visual:t.get("color")}).mapValueToVisual(e.getLayout().value);e.setVisual("color",a);var r=e.getModel().get("itemStyle.normal.color");null!=r&&e.setVisual("color",r)}))}))};rP.registerLayout(oP),rP.registerVisual(sP);var lP={},hP=b,uP=Vr,cP=ms.extend({type:"whiskerInBox",shape:{},buildPath:function(t,e){for(var i in e)if(e.hasOwnProperty(i)&&0===i.indexOf("ends")){var n=e[i];t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1])}}});function dP(t,e,i,n){uP.Group.call(this),this.bodyIndex,this.whiskerIndex,this.styleUpdater=i,this._createContent(t,e,n),this.updateData(t,e,n),this._seriesModel}var pP=dP.prototype;function fP(t,e,i){return hP.map(t,(function(t){return(t=t.slice())[e]=i.initBaseline,t}))}function gP(t){var e={};return hP.each(t,(function(t,i){e["ends"+i]=t})),e}function mP(t){this.group=new uP.Group,this.styleUpdater=t}pP._createContent=function(t,e,i){var n=t.getItemLayout(e),a="horizontal"===n.chartLayout?1:0,r=0;this.add(new uP.Polygon({shape:{points:i?fP(n.bodyEnds,a,n):n.bodyEnds},style:{strokeNoScale:!0},z2:100})),this.bodyIndex=r++;var o=hP.map(n.whiskerEnds,(function(t){return i?fP(t,a,n):t}));this.add(new cP({shape:gP(o),style:{strokeNoScale:!0},z2:100})),this.whiskerIndex=r++},pP.updateData=function(t,e,i){var n=this._seriesModel=t.hostModel,a=t.getItemLayout(e),r=uP[i?"initProps":"updateProps"];r(this.childAt(this.bodyIndex),{shape:{points:a.bodyEnds}},n,e),r(this.childAt(this.whiskerIndex),{shape:gP(a.whiskerEnds)},n,e),this.styleUpdater.call(null,this,t,e)},hP.inherits(dP,uP.Group);var vP=mP.prototype;vP.updateData=function(t){var e=this.group,i=this._data,n=this.styleUpdater;t.diff(i).add((function(i){if(t.hasValue(i)){var a=new dP(t,i,n,!0);t.setItemGraphicEl(i,a),e.add(a)}})).update((function(a,r){var o=i.getItemGraphicEl(r);t.hasValue(a)?(o?o.updateData(t,a):o=new dP(t,a,n),e.add(o),t.setItemGraphicEl(a,o)):e.remove(o)})).remove((function(t){var n=i.getItemGraphicEl(t);n&&e.remove(n)})).execute(),this._data=t},vP.remove=function(){var t=this.group,e=this._data;this._data=null,e&&e.eachItemGraphicEl((function(e){e&&t.remove(e)}))};var yP=dp,xP=wp,_P=mP,bP=b,wP={_baseAxisDim:null,getInitialData:function(t,e){var i,n,a=e.getComponent("xAxis",this.get("xAxisIndex")),r=e.getComponent("yAxis",this.get("yAxisIndex")),o=a.get("type"),s=r.get("type");"category"===o?(t.layout="horizontal",i=a.getCategories(),n=!0):"category"===s?(t.layout="vertical",i=r.getCategories(),n=!0):t.layout=t.layout||"horizontal";var l=["x","y"],h="horizontal"===t.layout?0:1,u=this._baseAxisDim=l[h],c=l[1-h],d=t.data;n&&bP.each(d,(function(t,e){t.value&&bP.isArray(t.value)?t.value.unshift(e):bP.isArray(t)&&t.unshift(e)}));var p=this.defaultValueDimensions,f=[{name:u,otherDims:{tooltip:!1},dimsDef:["base"]},{name:c,dimsDef:p.slice()}];f=xP(f,d,{encodeDef:this.get("encode"),dimsDef:this.get("dimensions"),dimCount:p.length+1});var g=new yP(f,this);return g.initData(d,i?i.slice():null),g},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}},SP={init:function(){var t=this._whiskerBoxDraw=new _P(this.getStyleUpdater());this.group.add(t.group)},render:function(t,e,i){this._whiskerBoxDraw.updateData(t.getData())},remove:function(t){this._whiskerBoxDraw.remove()}};lP.seriesModelMixin=wP,lP.viewMixin=SP;var MP=b,IP=yd,AP=lP.seriesModelMixin,TP=IP.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:["min","Q1","median","Q3","max"],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{normal:{color:"#fff",borderWidth:1},emphasis:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}});MP.mixin(TP,AP,!0);var CP=b,LP=zd,DP=Vr,PP=lP.viewMixin,kP=LP.extend({type:"boxplot",getStyleUpdater:function(){return EP},dispose:CP.noop});CP.mixin(kP,PP,!0);var OP=["itemStyle","normal"],zP=["itemStyle","emphasis"];function EP(t,e,i){var n=e.getItemModel(i),a=n.getModel(OP),r=e.getItemVisual(i,"color"),o=a.getItemStyle(["borderColor"]),s=t.childAt(t.whiskerIndex);s.style.set(o),s.style.stroke=r,s.dirty();var l=t.childAt(t.bodyIndex);l.style.set(o),l.style.stroke=r,l.dirty();var h=n.getModel(zP).getItemStyle();DP.setHoverStyle(t,h)}var RP=["itemStyle","normal","borderColor"];var NP=function(t,e){var i=t.get("color");t.eachRawSeriesByType("boxplot",(function(e){var n=i[e.seriesIndex%i.length],a=e.getData();a.setVisual({legendSymbol:"roundRect",color:e.get(RP)||n}),t.isSeriesFiltered(e)||a.each((function(t){var e=a.getItemModel(t);a.setItemVisual(t,{color:e.get(RP,!0)})}))}))},VP=b,BP=dr.parsePercent,GP=VP.each;var WP=m,HP=NP,FP=function(t){var e=function(t){var e=[],i=[];return t.eachSeriesByType("boxplot",(function(t){var n=t.getBaseAxis(),a=VP.indexOf(i,n);a<0&&(a=i.length,i[a]=n,e[a]={axis:n,seriesModels:[]}),e[a].seriesModels.push(t)})),e}(t);GP(e,(function(t){var e=t.seriesModels;e.length&&(!function(t){var e,i,n=t.axis,a=t.seriesModels,r=a.length,o=t.boxWidthList=[],s=t.boxOffsetList=[],l=[];if("category"===n.type)i=n.getBandWidth();else{var h=0;GP(a,(function(t){h=Math.max(h,t.getData().count())})),e=n.getExtent(),Math.abs(e[1]-e[0])}GP(a,(function(t){var e=t.get("boxWidth");VP.isArray(e)||(e=[e,e]),l.push([BP(e[0],i)||0,BP(e[1],i)||0])}));var u=.8*i-2,c=u/r*.3,d=(u-c*(r-1))/r,p=d/2-u/2;GP(a,(function(t,e){s.push(p),p+=c+d,o.push(Math.min(Math.max(d,l[e][0]),l[e][1]))}))}(t),GP(e,(function(e,i){!function(t,e,i){var n,a=t.coordinateSystem,r=t.getData(),o=i/2,s=t.get("layout"),l="horizontal"===s?0:1,h=1-l,u=["x","y"],c=[];if(VP.each(r.dimensions,(function(t){var e=r.getDimensionInfo(t).coordDim;e===u[h]?c.push(t):e===u[l]&&(n=t)})),null==n||c.length<5)return;r.each([n].concat(c),(function(){var t=arguments,i=t[0],n=t[c.length+1],u=m(t[3]),d=m(t[1]),p=m(t[5]),f=[[d,m(t[2])],[p,m(t[4])]];y(d),y(p),y(u);var g=[];function m(t){var n,r=[];return r[l]=i,r[h]=t,isNaN(i)||isNaN(t)?n=[NaN,NaN]:(n=a.dataToPoint(r))[l]+=e,n}function v(t,e){var i=t.slice(),n=t.slice();i[l]+=o,n[l]-=o,e?g.push(i,n):g.push(n,i)}function y(t){var e=[t.slice(),t.slice()];e[0][l]-=o,e[1][l]+=o,f.push(e)}v(f[0][1],0),v(f[1][1],1),r.setItemLayout(n,{chartLayout:s,initBaseline:u[h],median:u,bodyEnds:g,whiskerEnds:f})}))}(e,t.boxOffsetList[i],t.boxWidthList[i])})))}))};WP.registerVisual(HP),WP.registerLayout(FP);var ZP=b,UP=yd,jP=lP.seriesModelMixin,qP=UP.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:["open","close","lowest","highest"],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,itemStyle:{normal:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(t,e,i){var n=e.getItemLayout(t);return i.rect(n.brushRect)}});ZP.mixin(qP,jP,!0);var XP=b,YP=zd,$P=Vr,KP=lP.viewMixin,JP=YP.extend({type:"candlestick",getStyleUpdater:function(){return ek},dispose:XP.noop});XP.mixin(JP,KP,!0);var QP=["itemStyle","normal"],tk=["itemStyle","emphasis"];function ek(t,e,i){var n=e.getItemModel(i),a=n.getModel(QP),r=e.getItemVisual(i,"color"),o=e.getItemVisual(i,"borderColor")||r,s=a.getItemStyle(["color","color0","borderColor","borderColor0"]),l=t.childAt(t.whiskerIndex);l.useStyle(s),l.style.stroke=o;var h=t.childAt(t.bodyIndex);h.useStyle(s),h.style.fill=r,h.style.stroke=o;var u=n.getModel(tk).getItemStyle();$P.setHoverStyle(t,u)}var ik=b;var nk=function(t){t&&ik.isArray(t.series)&&ik.each(t.series,(function(t){ik.isObject(t)&&"k"===t.type&&(t.type="candlestick")}))},ak=["itemStyle","normal","borderColor"],rk=["itemStyle","normal","borderColor0"],ok=["itemStyle","normal","color"],sk=["itemStyle","normal","color0"];var lk=function(t,e){t.eachRawSeriesByType("candlestick",(function(e){var i=e.getData();i.setVisual({legendSymbol:"roundRect"}),t.isSeriesFiltered(e)||i.each((function(t){var e=i.getItemModel(t),n=i.getItemLayout(t).sign;i.setItemVisual(t,{color:e.get(n>0?ok:sk),borderColor:e.get(n>0?ak:rk)})}))}))},hk=b,uk=dr.parsePercent,ck=Vr.subPixelOptimize,dk=hk.retrieve2;var pk=m,fk=nk,gk=lk,mk=function(t){t.eachSeriesByType("candlestick",(function(t){var e,i=t.coordinateSystem,n=t.getData(),a=function(t,e){var i,n=t.getBaseAxis(),a="category"===n.type?n.getBandWidth():(i=n.getExtent(),Math.abs(i[1]-i[0])/e.count()),r=uk(dk(t.get("barMaxWidth"),a),a),o=uk(dk(t.get("barMinWidth"),1),a),s=t.get("barWidth");return null!=s?uk(s,a):Math.max(Math.min(a/2,r),o)}(t,n),r=t.get("layout"),o="horizontal"===r?0:1,s=1-o,l=["x","y"],h=[];if(hk.each(n.dimensions,(function(t){var i=n.getDimensionInfo(t).coordDim;i===l[s]?h.push(t):i===l[o]&&(e=t)})),!(null==e||h.length<4)){var u=0;n.each([e].concat(h),(function(){var t,e=arguments,l=e[0],c=e[h.length+1],d=e[1],p=e[2],f=e[3],g=e[4],m=Math.min(d,p),v=Math.max(d,p),y=M(m),x=M(v),_=M(f),b=M(g),w=[[T(b),T(x)],[T(_),T(y)]],S=[];function M(t){var e=[];return e[o]=l,e[s]=t,isNaN(l)||isNaN(t)?[NaN,NaN]:i.dataToPoint(e)}function I(t,e){var i=t.slice(),n=t.slice();i[o]=ck(i[o]+a/2,1,!1),n[o]=ck(n[o]-a/2,1,!0),e?S.push(i,n):S.push(n,i)}function A(){var t=M(Math.min(d,p,f,g)),e=M(Math.max(d,p,f,g));return t[o]-=a/2,e[o]-=a/2,{x:t[0],y:t[1],width:s?a:e[0]-t[0],height:s?e[1]-t[1]:a}}function T(t){return t[o]=ck(t[o],1),t}I(x,0),I(y,1),t=d>p?-1:d<p?1:u>0?n.getItemModel(u-1).get()[2]<=p?1:-1:1,n.setItemLayout(c,{chartLayout:r,sign:t,initBaseline:d>p?x[s]:y[s],bodyEnds:S,whiskerEnds:w,brushRect:A()}),++u}),!0)}}))};pk.registerPreprocessor(fk),pk.registerVisual(gk),pk.registerLayout(mk);var vk=Ep;yd.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){return vk(t.data,this,e)},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});var yk=b,xk=Hf.createSymbol,_k=Vr.Group,bk=dr.parsePercent,wk=sm;function Sk(t,e){t.eachChild((function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?e.color:null,fill:"fill"===e.brushType?e.color:null}})}))}function Mk(t,e){_k.call(this);var i=new wk(t,e),n=new _k;this.add(i),this.add(n),n.beforeUpdate=function(){this.attr(i.getScale())},this.updateData(t,e)}var Ik=Mk.prototype;Ik.stopEffectAnimation=function(){this.childAt(1).removeAll()},Ik.startEffectAnimation=function(t){for(var e=t.symbolType,i=t.color,n=this.childAt(1),a=0;a<3;a++){var r=xk(e,-1,-1,2,2,i);r.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var o=-a/3*t.period+t.effectOffset;r.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(o).start(),r.animateStyle(!0).when(t.period,{opacity:0}).delay(o).start(),n.add(r)}Sk(n,t)},Ik.updateEffectAnimation=function(t){for(var e=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale"],a=0;a<n.length;a++){var r=n[a];if(e[r]!==t[r])return this.stopEffectAnimation(),void this.startEffectAnimation(t)}Sk(i,t)},Ik.highlight=function(){this.trigger("emphasis")},Ik.downplay=function(){this.trigger("normal")},Ik.updateData=function(t,e){var i=t.hostModel;this.childAt(0).updateData(t,e);var n=this.childAt(1),a=t.getItemModel(e),r=t.getItemVisual(e,"symbol"),o=function(t){return yk.isArray(t)||(t=[+t,+t]),t}(t.getItemVisual(e,"symbolSize")),s=t.getItemVisual(e,"color");n.attr("scale",o),n.traverse((function(t){t.attr({fill:s})}));var l=a.getShallow("symbolOffset");if(l){var h=n.position;h[0]=bk(l[0],o[0]),h[1]=bk(l[1],o[1])}n.rotation=(a.getShallow("symbolRotate")||0)*Math.PI/180||0;var u={};if(u.showEffectOn=i.get("showEffectOn"),u.rippleScale=a.get("rippleEffect.scale"),u.brushType=a.get("rippleEffect.brushType"),u.period=1e3*a.get("rippleEffect.period"),u.effectOffset=e/t.count(),u.z=a.getShallow("z")||0,u.zlevel=a.getShallow("zlevel")||0,u.symbolType=r,u.color=s,this.off("mouseover").off("mouseout").off("emphasis").off("normal"),"render"===u.showEffectOn)this._effectCfg?this.updateEffectAnimation(u):this.startEffectAnimation(u),this._effectCfg=u;else{this._effectCfg=null,this.stopEffectAnimation();var c=this.childAt(0),d=function(){c.highlight(),"render"!==u.showEffectOn&&this.startEffectAnimation(u)},p=function(){c.downplay(),"render"!==u.showEffectOn&&this.stopEffectAnimation()};this.on("mouseover",d,this).on("mouseout",p,this).on("emphasis",d,this).on("normal",p,this)}this._effectCfg=u},Ik.fadeOut=function(t){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),t&&t()},yk.inherits(Mk,_k);var Ak=pm,Tk=Mk;m.extendChartView({type:"effectScatter",init:function(){this._symbolDraw=new Ak(Tk)},render:function(t,e,i){var n=t.getData(),a=this._symbolDraw;a.updateData(n),this.group.add(a.group)},updateLayout:function(){this._symbolDraw.updateLayout()},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e)},dispose:function(){}});var Ck=m,Lk=b,Dk=Ym,Pk=$m;Ck.registerVisual(Lk.curry(Dk,"effectScatter","circle",null)),Ck.registerLayout(Lk.curry(Pk,"effectScatter"));var kk=yd,Ok=dp,zk=b,Ek=cr.encodeHTML;function Rk(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=zk.map(e,(function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),zk.mergeAll([e,t[0],t[1]])})))}var Nk=kk.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.normal.color",init:function(t){Rk(t),Nk.superApply(this,"init",arguments)},mergeOption:function(t){Rk(t),Nk.superApply(this,"mergeOption",arguments)},getInitialData:function(t,e){var i=new Ok(["value"],this);return i.hasItemOption=!1,i.initData(t.data,[],(function(t,e,n,a){if(t instanceof Array)return NaN;i.hasItemOption=!0;var r=t.value;return null!=r?r instanceof Array?r[a]:r:void 0})),i},formatTooltip:function(t){var e=this.getData().getItemModel(t),i=e.get("name");if(i)return i;var n=e.get("fromName"),a=e.get("toName"),r=[];return null!=n&&r.push(n),null!=a&&r.push(a),Ek(r.join(" > "))},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,label:{normal:{show:!1,position:"end"}},lineStyle:{normal:{opacity:.5}}}}),Vk=Vr,Bk=kA,Gk=b,Wk=Hf.createSymbol,Hk=U,Fk=Gr;function Zk(t,e,i){Vk.Group.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}var Uk=Zk.prototype;Uk.createLine=function(t,e,i){return new Bk(t,e,i)},Uk._updateEffectSymbol=function(t,e){var i=t.getItemModel(e).getModel("effect"),n=i.get("symbolSize"),a=i.get("symbol");Gk.isArray(n)||(n=[n,n]);var r=i.get("color")||t.getItemVisual(e,"color"),o=this.childAt(1);this._symbolType!==a&&(this.remove(o),(o=Wk(a,-.5,-.5,1,1,r)).z2=100,o.culling=!0,this.add(o)),o&&(o.setStyle("shadowColor",r),o.setStyle(i.getItemStyle(["color"])),o.attr("scale",n),o.setColor(r),o.attr("scale",n),this._symbolType=a,this._updateEffectAnimation(t,i,e))},Uk._updateEffectAnimation=function(t,e,i){var n=this.childAt(1);if(n){var a=this,r=t.getItemLayout(i),o=1e3*e.get("period"),s=e.get("loop"),l=e.get("constantSpeed"),h=Gk.retrieve(e.get("delay"),(function(e){return e/t.count()*o/3})),u="function"==typeof h;if(n.ignore=!0,this.updateAnimationPoints(n,r),l>0&&(o=this.getLineLength(n)/l*1e3),o!==this._period||s!==this._loop){n.stopAnimation();var c=h;u&&(c=h(i)),n.__t>0&&(c=-o*n.__t),n.__t=0;var d=n.animate("",s).when(o,{__t:1}).delay(c).during((function(){a.updateSymbolPosition(n)}));s||d.done((function(){a.remove(n)})),d.start()}this._period=o,this._loop=s}},Uk.getLineLength=function(t){return Hk.dist(t.__p1,t.__cp1)+Hk.dist(t.__cp1,t.__p2)},Uk.updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},Uk.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},Uk.updateSymbolPosition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,a=t.__t,r=t.position,o=Fk.quadraticAt,s=Fk.quadraticDerivativeAt;r[0]=o(e[0],n[0],i[0],a),r[1]=o(e[1],n[1],i[1],a);var l=s(e[0],n[0],i[0],a),h=s(e[1],n[1],i[1],a);t.rotation=-Math.atan2(h,l)-Math.PI/2,t.ignore=!1},Uk.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var i=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,i,e)},Gk.inherits(Zk,Vk.Group);var jk=Zk,qk=Vr,Xk=b;function Yk(t,e,i){qk.Group.call(this),this._createPolyline(t,e,i)}var $k=Yk.prototype;$k._createPolyline=function(t,e,i){var n=t.getItemLayout(e),a=new qk.Polyline({shape:{points:n}});this.add(a),this._updateCommonStl(t,e,i)},$k.updateData=function(t,e,i){var n=t.hostModel,a=this.childAt(0),r={shape:{points:t.getItemLayout(e)}};qk.updateProps(a,r,n,e),this._updateCommonStl(t,e,i)},$k._updateCommonStl=function(t,e,i){var n=this.childAt(0),a=t.getItemModel(e),r=t.getItemVisual(e,"color"),o=i&&i.lineStyle,s=i&&i.hoverLineStyle;i&&!t.hasItemOption||(o=a.getModel("lineStyle.normal").getLineStyle(),s=a.getModel("lineStyle.emphasis").getLineStyle()),n.useStyle(Xk.defaults({strokeNoScale:!0,fill:"none",stroke:r},o)),n.hoverStyle=s,qk.setHoverStyle(this)},$k.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},Xk.inherits(Yk,qk.Group);var Kk=Yk,Jk=Kk,Qk=b,tO=jk,eO=U;function iO(t,e,i){tO.call(this,t,e,i),this._lastFrame=0,this._lastFramePercent=0}var nO=iO.prototype;nO.createLine=function(t,e,i){return new Jk(t,e,i)},nO.updateAnimationPoints=function(t,e){this._points=e;for(var i=[0],n=0,a=1;a<e.length;a++){var r=e[a-1],o=e[a];n+=eO.dist(r,o),i.push(n)}if(0!==n){for(a=0;a<i.length;a++)i[a]/=n;this._offsets=i,this._length=n}},nO.getLineLength=function(t){return this._length},nO.updateSymbolPosition=function(t){var e=t.__t,i=this._points,n=this._offsets,a=i.length;if(n){var r=this._lastFrame;if(e<this._lastFramePercent){for(o=Math.min(r+1,a-1);o>=0&&!(n[o]<=e);o--);o=Math.min(o,a-2)}else{for(var o=r;o<a&&!(n[o]>e);o++);o=Math.min(o-1,a-2)}eO.lerp(t.position,i[o],i[o+1],(e-n[o])/(n[o+1]-n[o]));var s=i[o+1][0]-i[o][0],l=i[o+1][1]-i[o][1];t.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=e,t.ignore=!1}},Qk.inherits(iO,tO);var aO=iO,rO=Vr,oO=Eo,sO=Vo,lO=rO.extendShape({shape:{polyline:!1,segs:[]},buildPath:function(t,e){for(var i=e.segs,n=e.polyline,a=0;a<i.length;a++){var r=i[a];if(n){t.moveTo(r[0][0],r[0][1]);for(var o=1;o<r.length;o++)t.lineTo(r[o][0],r[o][1])}else t.moveTo(r[0][0],r[0][1]),r.length>2?t.quadraticCurveTo(r[2][0],r[2][1],r[1][0],r[1][1]):t.lineTo(r[1][0],r[1][1])}},findDataIndex:function(t,e){for(var i=this.shape,n=i.segs,a=i.polyline,r=Math.max(this.style.lineWidth,1),o=0;o<n.length;o++){var s=n[o];if(a){for(var l=1;l<s.length;l++)if(oO.containStroke(s[l-1][0],s[l-1][1],s[l][0],s[l][1],r,t,e))return o}else if(s.length>2){if(sO.containStroke(s[0][0],s[0][1],s[2][0],s[2][1],s[1][0],s[1][1],r,t,e))return o}else if(oO.containStroke(s[0][0],s[0][1],s[1][0],s[1][1],r,t,e))return o}return-1}});function hO(){this.group=new rO.Group,this._lineEl=new lO}var uO=hO.prototype;uO.updateData=function(t){this.group.removeAll();var e=this._lineEl,i=t.hostModel;e.setShape({segs:t.mapArray(t.getItemLayout),polyline:i.get("polyline")}),e.useStyle(i.getModel("lineStyle.normal").getLineStyle());var n=t.getVisual("color");n&&e.setStyle("stroke",n),e.setStyle("fill"),e.seriesIndex=i.seriesIndex,e.on("mousemove",(function(t){e.dataIndex=null;var i=e.findDataIndex(t.offsetX,t.offsetY);i>0&&(e.dataIndex=i)})),this.group.add(e)},uO.updateLayout=function(t){var e=t.getData();this._lineEl.setShape({segs:e.mapArray(e.getItemLayout)})},uO.remove=function(){this.group.removeAll()};var cO=BA,dO=jk,pO=kA,fO=Kk,gO=aO,mO=hO;m.extendChartView({type:"lines",init:function(){},render:function(t,e,i){var n=t.getData(),a=this._lineDraw,r=t.get("effect.show"),o=t.get("polyline"),s=t.get("large")&&n.count()>=t.get("largeThreshold");r===this._hasEffet&&o===this._isPolyline&&s===this._isLarge||(a&&a.remove(),a=this._lineDraw=s?new mO:new cO(o?r?gO:fO:r?dO:pO),this._hasEffet=r,this._isPolyline=o,this._isLarge=s);var l=t.get("zlevel"),h=t.get("effect.trailLength"),u=i.getZr(),c="svg"===u.painter.getType();c||u.painter.getLayer(l).clear(!0),null==this._lastZlevel||c||u.configLayer(this._lastZlevel,{motionBlur:!1}),r&&h&&(c||u.configLayer(l,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(h/10+.9,1),0)})),this.group.add(a.group),a.updateData(n),this._lastZlevel=l},updateLayout:function(t,e,i){this._lineDraw.updateLayout(t);var n=i.getZr();"svg"===n.painter.getType()||n.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(e,!0);var i=e.getZr();"svg"===i.painter.getType()||i.painter.getLayer(this._lastZlevel).clear(!0)},dispose:function(){}});var vO=function(t){t.eachSeriesByType("lines",(function(t){var e=t.coordinateSystem,i=t.getData();i.each((function(n){var a=i.getItemModel(n),r=a.option instanceof Array?a.option:a.get("coords"),o=[];if(t.get("polyline"))for(var s=0;s<r.length;s++)o.push(e.dataToPoint(r[s]));else{o[0]=e.dataToPoint(r[0]),o[1]=e.dataToPoint(r[1]);var l=a.get("lineStyle.normal.curveness");+l&&(o[2]=[(o[0][0]+o[1][0])/2-(o[0][1]-o[1][1])*l,(o[0][1]+o[1][1])/2-(o[1][0]-o[0][0])*l])}i.setItemLayout(n,o)}))}))};function yO(t){return t instanceof Array||(t=[t,t]),t}var xO=m,_O=vO,bO=function(t){t.eachSeriesByType("lines",(function(t){var e=t.getData(),i=yO(t.get("symbol")),n=yO(t.get("symbolSize")),a="lineStyle.normal.opacity".split(".");e.setVisual("fromSymbol",i&&i[0]),e.setVisual("toSymbol",i&&i[1]),e.setVisual("fromSymbolSize",n&&n[0]),e.setVisual("toSymbolSize",n&&n[1]),e.setVisual("opacity",t.get(a)),e.each((function(t){var i=e.getItemModel(t),n=yO(i.getShallow("symbol",!0)),r=yO(i.getShallow("symbolSize",!0)),o=i.get(a);n[0]&&e.setItemVisual(t,"fromSymbol",n[0]),n[1]&&e.setItemVisual(t,"toSymbol",n[1]),r[0]&&e.setItemVisual(t,"fromSymbolSize",r[0]),r[1]&&e.setItemVisual(t,"toSymbolSize",r[1]),e.setItemVisual(t,"opacity",o)}))}))};xO.registerLayout(_O),xO.registerVisual(bO);var wO=Ep;yd.extend({type:"series.heatmap",getInitialData:function(t,e){return wO(t.data,this,e)},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}});var SO=b;function MO(){var t=SO.createCanvas();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}MO.prototype={update:function(t,e,i,n,a,r){var o=this._getBrush(),s=this._getGradient(t,a,"inRange"),l=this._getGradient(t,a,"outOfRange"),h=this.pointSize+this.blurSize,u=this.canvas,c=u.getContext("2d"),d=t.length;u.width=e,u.height=i;for(var p=0;p<d;++p){var f=t[p],g=f[0],m=f[1],v=n(f[2]);c.globalAlpha=v,c.drawImage(o,g-h,m-h)}if(!u.width||!u.height)return u;for(var y=c.getImageData(0,0,u.width,u.height),x=y.data,_=0,b=x.length,w=this.minOpacity,S=this.maxOpacity-w;_<b;){v=x[_+3]/256;var M=4*Math.floor(255*v);if(v>0){var I=r(v)?s:l;v>0&&(v=v*S+w),x[_++]=I[M],x[_++]=I[M+1],x[_++]=I[M+2],x[_++]=I[M+3]*v*256}else _+=4}return c.putImageData(y,0,0),u},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=SO.createCanvas()),e=this.pointSize+this.blurSize,i=2*e;t.width=i,t.height=i;var n=t.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-e,e,this.pointSize,0,2*Math.PI,!0),n.closePath(),n.fill(),t},_getGradient:function(t,e,i){for(var n=this._gradientPixels,a=n[i]||(n[i]=new Uint8ClampedArray(1024)),r=[0,0,0,0],o=0,s=0;s<256;s++)e[i](s/255,!0,r),a[o++]=r[0],a[o++]=r[1],a[o++]=r[2],a[o++]=r[3];return a}};var IO=Vr,AO=MO,TO=b;m.extendChartView({type:"heatmap",render:function(t,e,i){var n;e.eachComponent("visualMap",(function(e){e.eachTargetSeries((function(i){i===t&&(n=e)}))})),this.group.removeAll();var a=t.coordinateSystem;"cartesian2d"===a.type||"calendar"===a.type?this._renderOnCartesianAndCalendar(a,t,i):function(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}(a)&&this._renderOnGeo(a,t,n,i)},dispose:function(){},_renderOnCartesianAndCalendar:function(t,e,i){if("cartesian2d"===t.type)var n=t.getAxis("x"),a=t.getAxis("y"),r=n.getBandWidth(),o=a.getBandWidth();var s=this.group,l=e.getData(),h="itemStyle.normal",u="itemStyle.emphasis",c=e.getModel(h).getItemStyle(["color"]),d=e.getModel(u).getItemStyle(),p=e.getModel("label.normal"),f=e.getModel("label.emphasis"),g=t.type,m="cartesian2d"===g?[e.coordDimToDataDim("x")[0],e.coordDimToDataDim("y")[0],e.coordDimToDataDim("value")[0]]:[e.coordDimToDataDim("time")[0],e.coordDimToDataDim("value")[0]];l.each((function(i){var n;if("cartesian2d"===g){if(isNaN(l.get(m[2],i)))return;var a=t.dataToPoint([l.get(m[0],i),l.get(m[1],i)]);n=new IO.Rect({shape:{x:a[0]-r/2,y:a[1]-o/2,width:r,height:o},style:{fill:l.getItemVisual(i,"color"),opacity:l.getItemVisual(i,"opacity")}})}else{if(isNaN(l.get(m[1],i)))return;n=new IO.Rect({z2:1,shape:t.dataToRect([l.get(m[0],i)]).contentShape,style:{fill:l.getItemVisual(i,"color"),opacity:l.getItemVisual(i,"opacity")}})}var v=l.getItemModel(i);l.hasItemOption&&(c=v.getModel(h).getItemStyle(["color"]),d=v.getModel(u).getItemStyle(),p=v.getModel("label.normal"),f=v.getModel("label.emphasis"));var y=e.getRawValue(i),x="-";y&&null!=y[2]&&(x=y[2]),IO.setLabelStyle(c,d,p,f,{labelFetcher:e,labelDataIndex:i,defaultText:x,isRectText:!0}),n.setStyle(c),IO.setHoverStyle(n,l.hasItemOption?d:TO.extend({},d)),s.add(n),l.setItemGraphicEl(i,n)}))},_renderOnGeo:function(t,e,i,n){var a=i.targetVisuals.inRange,r=i.targetVisuals.outOfRange,o=e.getData(),s=this._hmLayer||this._hmLayer||new AO;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),h=t.getRoamTransform().transform;l.applyTransform(h);var u=Math.max(l.x,0),c=Math.max(l.y,0),d=Math.min(l.width+l.x,n.getWidth()),p=Math.min(l.height+l.y,n.getHeight()),f=d-u,g=p-c,m=o.mapArray(["lng","lat","value"],(function(e,i,n){var a=t.dataToPoint([e,i]);return a[0]-=u,a[1]-=c,a.push(n),a})),v=i.getExtent(),y="visualMap.continuous"===i.type?function(t,e){var i=t[1]-t[0];return e=[(e[0]-t[0])/i,(e[1]-t[0])/i],function(t){return t>=e[0]&&t<=e[1]}}(v,i.option.range):function(t,e,i){var n=t[1]-t[0],a=(e=TO.map(e,(function(e){return{interval:[(e.interval[0]-t[0])/n,(e.interval[1]-t[0])/n]}}))).length,r=0;return function(t){for(var n=r;n<a;n++)if((o=e[n].interval)[0]<=t&&t<=o[1]){r=n;break}if(n===a)for(n=r-1;n>=0;n--){var o;if((o=e[n].interval)[0]<=t&&t<=o[1]){r=n;break}}return n>=0&&n<a&&i[n]}}(v,i.getPieceList(),i.option.selected);s.update(m,f,g,a.color.getNormalizer(),{inRange:a.color.getColorMapper(),outOfRange:r.color.getColorMapper()},y);var x=new IO.Image({style:{width:f,height:g,x:u,y:c,image:s.canvas},silent:!0});this.group.add(x)}});var CO=lx.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,CO.superApply(this,"getInitialData",arguments)}}),LO=m,DO=b,PO=Vr,kO=Hf.createSymbol,OO=dr,zO=OO.parsePercent,EO=OO.isNumeric,RO=hx.setLabel,NO=["itemStyle","normal","borderWidth"],VO=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],BO=new PO.Circle;function GO(t,e,i,n){var a=t.getItemLayout(e),r=i.get("symbolRepeat"),o=i.get("symbolClip"),s=i.get("symbolPosition")||"start",l=(i.get("symbolRotate")||0)*Math.PI/180||0,h=i.get("symbolPatternSize")||2,u=i.isAnimationEnabled(),c={dataIndex:e,layout:a,itemModel:i,symbolType:t.getItemVisual(e,"symbol")||"circle",color:t.getItemVisual(e,"color"),symbolClip:o,symbolRepeat:r,symbolRepeatDirection:i.get("symbolRepeatDirection"),symbolPatternSize:h,rotation:l,animationModel:u?i:null,hoverAnimation:u&&i.get("hoverAnimation"),z2:i.getShallow("z",!0)||0};!function(t,e,i,n,a){var r,o=n.valueDim,s=t.get("symbolBoundingData"),l=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),h=l.toGlobalCoord(l.dataToCoord(0)),u=1-+(i[o.wh]<=0);if(DO.isArray(s)){var c=[WO(l,s[0])-h,WO(l,s[1])-h];c[1]<c[0]&&c.reverse(),r=c[u]}else r=null!=s?WO(l,s)-h:e?n.coordSysExtent[o.index][u]-h:i[o.wh];a.boundingLength=r,e&&(a.repeatCutLength=i[o.wh]);a.pxSign=r>0?1:r<0?-1:0}(i,r,a,n,c),function(t,e,i,n,a,r,o,s,l,h){var u=l.valueDim,c=l.categoryDim,d=Math.abs(i[c.wh]),p=t.getItemVisual(e,"symbolSize");DO.isArray(p)?p=p.slice():(null==p&&(p="100%"),p=[p,p]);p[c.index]=zO(p[c.index],d),p[u.index]=zO(p[u.index],n?d:Math.abs(r)),h.symbolSize=p,(h.symbolScale=[p[0]/s,p[1]/s])[u.index]*=(l.isHorizontal?-1:1)*o}(t,e,a,r,0,c.boundingLength,c.pxSign,h,n,c),function(t,e,i,n,a){var r=t.get(NO)||0;r&&(BO.attr({scale:e.slice(),rotation:i}),BO.updateTransform(),r/=BO.getLineScale(),r*=e[n.valueDim.index]);a.valueLineWidth=r}(i,c.symbolScale,l,n,c);var d=c.symbolSize,p=i.get("symbolOffset");return DO.isArray(p)&&(p=[zO(p[0],d[0]),zO(p[1],d[1])]),function(t,e,i,n,a,r,o,s,l,h,u,c){var d=u.categoryDim,p=u.valueDim,f=c.pxSign,g=Math.max(e[p.index]+s,0),m=g;if(n){var v=Math.abs(l),y=DO.retrieve(t.get("symbolMargin"),"15%")+"",x=!1;y.lastIndexOf("!")===y.length-1&&(x=!0,y=y.slice(0,y.length-1)),y=zO(y,e[p.index]);var _=Math.max(g+2*y,0),b=x?0:2*y,w=EO(n),S=w?n:nz((v+b)/_);_=g+2*(y=(v-S*g)/2/(x?S:S-1)),b=x?0:2*y,w||"fixed"===n||(S=h?nz((Math.abs(h)+b)/_):0),m=S*_-b,c.repeatTimes=S,c.symbolMargin=y}var M=f*(m/2),I=c.pathPosition=[];I[d.index]=i[d.wh]/2,I[p.index]="start"===o?M:"end"===o?l-M:l/2,r&&(I[0]+=r[0],I[1]+=r[1]);var A=c.bundlePosition=[];A[d.index]=i[d.xy],A[p.index]=i[p.xy];var T=c.barRectShape=DO.extend({},i);T[p.wh]=f*Math.max(Math.abs(i[p.wh]),Math.abs(I[p.index]+M)),T[d.wh]=i[d.wh];var C=c.clipShape={};C[d.xy]=-i[d.xy],C[d.wh]=u.ecSize[d.wh],C[p.xy]=0,C[p.wh]=i[p.wh]}(i,d,a,r,0,p,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,n,c),c}function WO(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function HO(t){var e=t.symbolPatternSize,i=kO(t.symbolType,-e/2,-e/2,e,e,t.color);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function FO(t,e,i,n){var a=t.__pictorialBundle,r=i.symbolSize,o=i.valueLineWidth,s=i.pathPosition,l=e.valueDim,h=i.repeatTimes||0,u=0,c=r[e.valueDim.index]+o+2*i.symbolMargin;for(tz(t,(function(t){t.__pictorialAnimationIndex=u,t.__pictorialRepeatTimes=h,u<h?ez(t,null,f(u),i,n):ez(t,null,{scale:[0,0]},i,n,(function(){a.remove(t)})),$O(t,i),u++}));u<h;u++){var d=HO(i);d.__pictorialAnimationIndex=u,d.__pictorialRepeatTimes=h,a.add(d);var p=f(u);ez(d,{position:p.position,scale:[0,0]},{scale:p.scale,rotation:p.rotation},i,n),d.on("mouseover",g).on("mouseout",m),$O(d,i)}function f(t){var e=s.slice(),n=i.pxSign,a=t;return("start"===i.symbolRepeatDirection?n>0:n<0)&&(a=h-1-t),e[l.index]=c*(a-h/2+.5)+s[l.index],{position:e,scale:i.symbolScale.slice(),rotation:i.rotation}}function g(){tz(t,(function(t){t.trigger("emphasis")}))}function m(){tz(t,(function(t){t.trigger("normal")}))}}function ZO(t,e,i,n){var a=t.__pictorialBundle,r=t.__pictorialMainPath;r?ez(r,null,{position:i.pathPosition.slice(),scale:i.symbolScale.slice(),rotation:i.rotation},i,n):(r=t.__pictorialMainPath=HO(i),a.add(r),ez(r,{position:i.pathPosition.slice(),scale:[0,0],rotation:i.rotation},{scale:i.symbolScale.slice()},i,n),r.on("mouseover",(function(){this.trigger("emphasis")})).on("mouseout",(function(){this.trigger("normal")}))),$O(r,i)}function UO(t,e,i){var n=DO.extend({},e.barRectShape),a=t.__pictorialBarRect;a?ez(a,null,{shape:n},e,i):(a=t.__pictorialBarRect=new PO.Rect({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(a))}function jO(t,e,i,n){if(i.symbolClip){var a=t.__pictorialClipPath,r=DO.extend({},i.clipShape),o=e.valueDim,s=i.animationModel,l=i.dataIndex;if(a)PO.updateProps(a,{shape:r},s,l);else{r[o.wh]=0,a=new PO.Rect({shape:r}),t.__pictorialBundle.setClipPath(a),t.__pictorialClipPath=a;var h={};h[o.wh]=i.clipShape[o.wh],PO[n?"updateProps":"initProps"](a,{shape:h},s,l)}}}function qO(t,e){var i=t.getItemModel(e);return i.getAnimationDelayParams=XO,i.isAnimationEnabled=YO,i}function XO(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function YO(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function $O(t,e){t.off("emphasis").off("normal");var i=e.symbolScale.slice();e.hoverAnimation&&t.on("emphasis",(function(){this.animateTo({scale:[1.1*i[0],1.1*i[1]]},400,"elasticOut")})).on("normal",(function(){this.animateTo({scale:i.slice()},400,"elasticOut")}))}function KO(t,e,i,n){var a=new PO.Group,r=new PO.Group;return a.add(r),a.__pictorialBundle=r,r.attr("position",i.bundlePosition.slice()),i.symbolRepeat?FO(a,e,i):ZO(a,0,i),UO(a,i,n),jO(a,e,i,n),a.__pictorialShapeStr=QO(t,i),a.__pictorialSymbolMeta=i,a}function JO(t,e,i,n){var a=n.__pictorialBarRect;a&&(a.style.text=null);var r=[];tz(n,(function(t){r.push(t)})),n.__pictorialMainPath&&r.push(n.__pictorialMainPath),n.__pictorialClipPath&&(i=null),DO.each(r,(function(t){PO.updateProps(t,{scale:[0,0]},i,e,(function(){n.parent&&n.parent.remove(n)}))})),t.setItemGraphicEl(e,null)}function QO(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function tz(t,e,i){DO.each(t.__pictorialBundle.children(),(function(n){n!==t.__pictorialBarRect&&e.call(i,n)}))}function ez(t,e,i,n,a,r){e&&t.attr(e),n.symbolClip&&!a?i&&t.attr(i):i&&PO[a?"updateProps":"initProps"](t,i,n.animationModel,n.dataIndex,r)}function iz(t,e,i){var n=i.color,a=i.dataIndex,r=i.itemModel,o=r.getModel("itemStyle.normal").getItemStyle(["color"]),s=r.getModel("itemStyle.emphasis").getItemStyle(),l=r.getShallow("cursor");tz(t,(function(t){t.setColor(n),t.setStyle(DO.defaults({fill:n,opacity:i.opacity},o)),PO.setHoverStyle(t,s),l&&(t.cursor=l),t.z2=i.z2}));var h={},u=e.valueDim.posDesc[+(i.boundingLength>0)],c=t.__pictorialBarRect;RO(c.style,h,r,n,e.seriesModel,a,u),PO.setHoverStyle(c,h)}function nz(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}LO.extendChartView({type:"pictorialBar",render:function(t,e,i){var n=this.group,a=t.getData(),r=this._data,o=t.coordinateSystem,s=!!o.getBaseAxis().isHorizontal(),l=o.grid.getRect(),h={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:o,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:VO[+s],categoryDim:VO[1-s]};return a.diff(r).add((function(t){if(a.hasValue(t)){var e=qO(a,t),i=GO(a,t,e,h),r=KO(a,h,i);a.setItemGraphicEl(t,r),n.add(r),iz(r,h,i)}})).update((function(t,e){var i=r.getItemGraphicEl(e);if(a.hasValue(t)){var o=qO(a,t),s=GO(a,t,o,h),l=QO(a,s);i&&l!==i.__pictorialShapeStr&&(n.remove(i),a.setItemGraphicEl(t,null),i=null),i?function(t,e,i){var n=i.animationModel,a=i.dataIndex,r=t.__pictorialBundle;PO.updateProps(r,{position:i.bundlePosition.slice()},n,a),i.symbolRepeat?FO(t,e,i,!0):ZO(t,e,i,!0);UO(t,i,!0),jO(t,e,i,!0)}(i,h,s):i=KO(a,h,s,!0),a.setItemGraphicEl(t,i),i.__pictorialSymbolMeta=s,n.add(i),iz(i,h,s)}else n.remove(i)})).remove((function(t){var e=r.getItemGraphicEl(t);e&&JO(r,t,e.__pictorialSymbolMeta.animationModel,e)})).execute(),this._data=a,this.group},dispose:DO.noop,remove:function(t,e){var i=this.group,n=this._data;t.get("animation")?n&&n.eachItemGraphicEl((function(e){JO(n,e.dataIndex,t,e)})):i.removeAll()}});var az=m,rz=b,oz=ox,sz=Ym;az.registerLayout(rz.curry(oz,"pictorialBar")),az.registerVisual(rz.curry(sz,"pictorialBar","roundRect",null));var lz=b,hz=gg,uz=function(t,e,i,n,a){hz.call(this,t,e,i),this.type=n||"value",this.position=a||"bottom",this.orient=null,this._labelInterval=null};uz.prototype={constructor:uz,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},pointToData:function(t,e){return this.coordinateSystem.pointToData(t,e)[0]},toGlobalCoord:null,toLocalCoord:null},lz.inherits(uz,hz);var cz=uz,dz=Rp,pz=wu.getLayoutRect;function fz(t,e,i){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,i),this.model=t}fz.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:fz,_init:function(t,e,i){var n=this.dimension,a=new cz(n,dz.createScaleByModel(t),[0,0],t.get("type"),t.get("position")),r="category"===a.type;a.onBand=r&&t.get("boundaryGap"),a.inverse=t.get("inverse"),a.orient=t.get("orient"),t.axis=a,a.model=t,a.coordinateSystem=this,this._axis=a},update:function(t,e){t.eachSeries((function(t){if(t.coordinateSystem===this){var e=t.getData(),i=this.dimension;this._axis.scale.unionExtentFromData(e,t.coordDimToDataDim(i)),dz.niceScaleExtent(this._axis.scale,this._axis.model)}}),this)},resize:function(t,e){this._rect=pz({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var t=this._rect,e=this._axis,i=e.isHorizontal(),n=i?[0,t.width]:[0,t.height],a=e.reverse?1:0;e.setExtent(n[a],n[1-a]),this._updateAxisTransform(e,i?t.x:t.y)},_updateAxisTransform:function(t,e){var i=t.getExtent(),n=i[0]+i[1],a=t.isHorizontal();t.toGlobalCoord=a?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord=a?function(t){return t-e}:function(t){return n-t+e}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(t){var e=this.getRect(),i=this.getAxis();return"horizontal"===i.orient?i.contain(i.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),i=this.getRect(),n=[],a="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[a]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-a]=0===a?i.y+i.height/2:i.x+i.width/2,n}};var gz=fz;_c.register("single",{create:function(t,e){var i=[];return t.eachComponent("singleAxis",(function(n,a){var r=new gz(n,t,e);r.name="single_"+a,r.resize(n,e),n.coordinateSystem=r,i.push(r)})),t.eachSeries((function(e){if("singleAxis"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"singleAxis",index:e.get("singleAxisIndex"),id:e.get("singleAxisId")})[0];e.coordinateSystem=i&&i.coordinateSystem}})),i},dimensions:gz.prototype.dimensions});var mz={},vz=b;mz.layout=function(t,e){e=e||{};var i=t.coordinateSystem,n=t.axis,a={},r=n.position,o=n.orient,s=i.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],h={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};a.position=["vertical"===o?h.vertical[r]:l[0],"horizontal"===o?h.horizontal[r]:l[3]],a.rotation=Math.PI/2*{horizontal:0,vertical:1}[o],a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,right:1,left:-1}[r],t.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),vz.retrieve(e.labelInside,t.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var u=e.rotate;return null==u&&(u=t.get("axisLabel.rotate")),a.labelRotation="top"===r?-u:u,a.labelInterval=n.getLabelInterval(),a.z2=1,a};var yz=b,xz=yy,_z=Vr,bz=mz,wz=Oy,Sz=xz.getInterval,Mz=xz.ifIgnoreOnTick,Iz=["axisLine","axisTickLabel","axisName"],Az=wz.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,i,n){var a=this.group;a.removeAll();var r=bz.layout(t),o=new xz(t,r);yz.each(Iz,o.add,o),a.add(o.getGroup()),t.get("splitLine.show")&&this._splitLine(t,r.labelInterval),Az.superCall(this,"render",t,e,i,n)},_splitLine:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitLine"),a=n.getModel("lineStyle"),r=a.get("width"),o=a.get("color"),s=Sz(n,e);o=o instanceof Array?o:[o];for(var l=t.coordinateSystem.getRect(),h=i.isHorizontal(),u=[],c=0,d=i.getTicksCoords(),p=[],f=[],g=t.get("axisLabel.showMinLabel"),m=t.get("axisLabel.showMaxLabel"),v=0;v<d.length;++v)if(!Mz(i,v,s,d.length,g,m)){var y=i.toGlobalCoord(d[v]);h?(p[0]=y,p[1]=l.y,f[0]=y,f[1]=l.y+l.height):(p[0]=l.x,p[1]=y,f[0]=l.x+l.width,f[1]=y);var x=c++%o.length;u[x]=u[x]||[],u[x].push(new _z.Line(_z.subPixelOptimizeLine({shape:{x1:p[0],y1:p[1],x2:f[0],y2:f[1]},style:{lineWidth:r},silent:!0})))}for(v=0;v<u.length;++v)this.group.add(_z.mergePath(u[v],{style:{stroke:o[v%o.length],lineDash:a.getLineDash(r),lineWidth:r},silent:!0}))}}}),Tz=b,Cz=wv,Lz=Wf,Dz=Zu.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}});Tz.merge(Dz.prototype,Lz),Cz("single",Dz,(function(t,e){return e.type||(e.data?"category":"value")}),{left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:2,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:2}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}});var Pz=b,kz=ur;var Oz=function(t,e){var i,n=[],a=t.seriesIndex;if(null==a||!(i=e.getSeriesByIndex(a)))return{point:[]};var r=i.getData(),o=kz.queryDataIndex(r,t);if(null==o||Pz.isArray(o))return{point:[]};var s=r.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)n=l.dataToPoint(r.getValues(Pz.map(l.dimensions,(function(t){return i.coordDimToDataDim(t)[0]})),o,!0))||[];else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}},zz=b,Ez=ur,Rz=xy,Nz=Oz,Vz=zz.each,Bz=zz.curry,Gz=Ez.makeGetter();function Wz(t,e,i,n,a){var r=t.axis;if(!r.scale.isBlank()&&r.containData(e))if(t.involveSeries){var o=function(t,e){var i=e.axis,n=i.dim,a=t,r=[],o=Number.MAX_VALUE,s=-1;return Vz(e.seriesModels,(function(e,l){var h,u,c=e.coordDimToDataDim(n);if(e.getAxisTooltipData){var d=e.getAxisTooltipData(c,t,i);u=d.dataIndices,h=d.nestestValue}else{if(!(u=e.getData().indicesOfNearest(c[0],t,!1,"category"===i.type?.5:null)).length)return;h=e.getData().get(c[0],u[0])}if(null!=h&&isFinite(h)){var p=t-h,f=Math.abs(p);f<=o&&((f<o||p>=0&&s<0)&&(o=f,s=p,a=h,r.length=0),Vz(u,(function(t){r.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:r,snapToValue:a}}(e,t),s=o.payloadBatch,l=o.snapToValue;s[0]&&null==a.seriesIndex&&zz.extend(a,s[0]),!n&&t.snap&&r.containData(l)&&null!=l&&(e=l),i.showPointer(t,e,s,a),i.showTooltip(t,o,l)}else i.showPointer(t,e)}function Hz(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function Fz(t,e,i,n){var a=i.payloadBatch,r=e.axis,o=r.model,s=e.axisPointerModel;if(e.triggerTooltip&&a.length){var l=e.coordSys.model,h=Rz.makeKey(l),u=t.map[h];u||(u=t.map[h]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(u)),u.dataByAxis.push({axisDim:r.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:a.slice()})}}function Zz(t){var e=t.axis.model,i={},n=i.axisDim=t.axis.dim;return i.axisIndex=i[n+"AxisIndex"]=e.componentIndex,i.axisName=i[n+"AxisName"]=e.name,i.axisId=i[n+"AxisId"]=e.id,i}function Uz(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}var jz=function(t,e,i){var n=t.currTrigger,a=[t.x,t.y],r=t,o=t.dispatchAction||zz.bind(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){Uz(a)&&(a=Nz({seriesIndex:r.seriesIndex,dataIndex:r.dataIndex},e).point);var l=Uz(a),h=r.axesInfo,u=s.axesInfo,c="leave"===n||Uz(a),d={},p={},f={list:[],map:{}},g={showPointer:Bz(Hz,p),showTooltip:Bz(Fz,f)};Vz(s.coordSysMap,(function(t,e){var i=l||t.containPoint(a);Vz(s.coordSysAxesInfo[e],(function(t,e){var n=t.axis,r=function(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}(h,t);if(!c&&i&&(!h||r)){var o=r&&r.value;null!=o||l||(o=n.pointToData(a)),null!=o&&Wz(t,o,g,!1,d)}}))}));var m={};return Vz(u,(function(t,e){var i=t.linkGroup;i&&!p[e]&&Vz(i.axesInfo,(function(e,n){var a=p[n];if(e!==t&&a){var r=a.value;i.mapper&&(r=t.axis.scale.parse(i.mapper(r,Zz(e),Zz(t)))),m[t.key]=r}}))})),Vz(m,(function(t,e){Wz(u[e],t,g,!0,d)})),function(t,e,i){var n=i.axesInfo=[];Vz(e,(function(e,i){var a=e.axisPointerModel.option,r=t[i];r?(!e.useHandle&&(a.status="show"),a.value=r.value,a.seriesDataIndices=(r.payloadBatch||[]).slice()):!e.useHandle&&(a.status="hide"),"show"===a.status&&n.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:a.value})}))}(p,u,d),function(t,e,i,n){if(Uz(e)||!t.list.length)return void n({type:"hideTip"});var a=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:t.list})}(f,a,t,o),function(t,e,i){var n=i.getZr(),a="axisPointerLastHighlights",r=Gz(n)[a]||{},o=Gz(n)[a]={};Vz(t,(function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&Vz(i.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;o[e]=t}))}));var s=[],l=[];zz.each(r,(function(t,e){!o[e]&&l.push(t)})),zz.each(o,(function(t,e){!r[e]&&s.push(t)})),l.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}(u,0,i),d}};m.extendComponentModel({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}});var qz={},Xz=b,Yz=_,$z=ur.makeGetter(),Kz=Xz.each;function Jz(t,e,i){t.handler("leave",null,i)}function Qz(t,e,i,n){e.handler(t,i,n)}qz.register=function(t,e,i){if(!Yz.node){var n=e.getZr();$z(n).records||($z(n).records={}),function(t,e){if($z(t).initialized)return;function i(i,n){t.on(i,(function(i){var a=function(t){var e={showTip:[],hideTip:[]},i=function(n){var a=e[n.type];a?a.push(n):(n.dispatchAction=i,t.dispatchAction(n))};return{dispatchAction:i,pendings:e}}(e);Kz($z(t).records,(function(t){t&&n(t,i,a.dispatchAction)})),function(t,e){var i,n=t.showTip.length,a=t.hideTip.length;n?i=t.showTip[n-1]:a&&(i=t.hideTip[a-1]);i&&(i.dispatchAction=null,e.dispatchAction(i))}(a.pendings,e)}))}$z(t).initialized=!0,i("click",Xz.curry(Qz,"click")),i("mousemove",Xz.curry(Qz,"mousemove")),i("globalout",Jz)}(n,e),($z(n).records[t]||($z(n).records[t]={})).handler=i}},qz.unregister=function(t,e){if(!Yz.node){var i=e.getZr();($z(i).records||{})[t]&&($z(i).records[t]=null)}};var tE=qz,eE=m.extendComponentView({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),a=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";tE.register("axisPointer",i,(function(t,e,i){"none"!==a&&("leave"===t||a.indexOf(t)>=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},remove:function(t,e){tE.unregister(e.getZr(),"axisPointer"),eE.superApply(this._model,"remove",arguments)},dispose:function(t,e){tE.unregister("axisPointer",e),eE.superApply(this._model,"dispose",arguments)}}),iE=b,nE=Ar,aE=Vr,rE=xy,oE=fa,sE=Ed,lE=ur.makeGetter(),hE=iE.clone,uE=iE.bind;function cE(){}function dE(t,e,i,n){pE(lE(i).lastProp,n)||(lE(i).lastProp=n,e?aE.updateProps(i,n,t):(i.stopAnimation(),i.attr(n)))}function pE(t,e){if(iE.isObject(t)&&iE.isObject(e)){var i=!0;return iE.each(e,(function(e,n){i=i&&pE(t[n],e)})),!!i}return t===e}function fE(t,e){t[e.get("label.show")?"show":"hide"]()}function gE(t){return{position:t.position.slice(),rotation:t.rotation||0}}function mE(t,e,i){var n=e.get("z"),a=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=a&&(t.zlevel=a),t.silent=i)}))}cE.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,n){var a=e.get("value"),r=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==a||this._lastStatus!==r){this._lastValue=a,this._lastStatus=r;var o=this._group,s=this._handle;if(!r||"hide"===r)return o&&o.hide(),void(s&&s.hide());o&&o.show(),s&&s.show();var l={};this.makeElOption(l,a,t,e,i);var h=l.graphicKey;h!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=h;var u=this._moveAnimation=this.determineAnimation(t,e);if(o){var c=iE.curry(dE,e,u);this.updatePointerEl(o,l,c,e),this.updateLabelEl(o,l,c,e)}else o=this._group=new aE.Group,this.createPointerEl(o,l,t,e),this.createLabelEl(o,l,t,e),i.getZr().add(o);mE(o,e,!0),this._renderHandle(a)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,a="category"===n.type,r=e.get("snap");if(!r&&!a)return!1;if("auto"===i||null==i){var o=this.animationThreshold;if(a&&n.getBandWidth()>o)return!0;if(r){var s=rE.getAxisInfo(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1}return!0===i},makeElOption:function(t,e,i,n,a){},createPointerEl:function(t,e,i,n){var a=e.pointer;if(a){var r=lE(t).pointerEl=new aE[a.type](hE(e.pointer));t.add(r)}},createLabelEl:function(t,e,i,n){if(e.label){var a=lE(t).labelEl=new aE.Rect(hE(e.label));t.add(a),fE(a,n)}},updatePointerEl:function(t,e,i){var n=lE(t).pointerEl;n&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var a=lE(t).labelEl;a&&(a.setStyle(e.label.style),i(a,{shape:e.label.shape,position:e.label.position}),fE(a,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,i=this._axisPointerModel,n=this._api.getZr(),a=this._handle,r=i.getModel("handle"),o=i.get("status");if(!r.get("show")||!o||"hide"===o)return a&&n.remove(a),void(this._handle=null);this._handle||(e=!0,a=this._handle=aE.createIcon(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){oE.stop(t.event)},onmousedown:uE(this._onHandleDragMove,this,0,0),drift:uE(this._onHandleDragMove,this),ondragend:uE(this._onHandleDragEnd,this)}),n.add(a)),mE(a,i,!1);a.setStyle(r.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=r.get("size");iE.isArray(s)||(s=[s,s]),a.attr("scale",[s[0]/2,s[1]/2]),sE.createOrUpdate(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){dE(this._axisPointerModel,!e&&this._moveAnimation,this._handle,gE(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(gE(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(gE(n)),lE(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}},cE.prototype.constructor=cE,nE.enableClassExtend(cE);var vE=cE,yE={},xE=b,_E=Vr,bE=Ni,wE=cr,SE=mt,ME=Rp,IE=yy;function AE(t,e,i,n,a){var r=TE(i.get("value"),e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),o=i.getModel("label"),s=wE.normalizeCssArray(o.get("padding")||0),l=o.getFont(),h=bE.getBoundingRect(r,l),u=a.position,c=h.width+s[1]+s[3],d=h.height+s[0]+s[2],p=a.align;"right"===p&&(u[0]-=c),"center"===p&&(u[0]-=c/2);var f=a.verticalAlign;"bottom"===f&&(u[1]-=d),"middle"===f&&(u[1]-=d/2),function(t,e,i,n){var a=n.getWidth(),r=n.getHeight();t[0]=Math.min(t[0]+e,a)-e,t[1]=Math.min(t[1]+i,r)-i,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(u,c,d,n);var g=o.get("backgroundColor");g&&"auto"!==g||(g=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:d,r:o.get("borderRadius")},position:u.slice(),style:{text:r,textFont:l,textFill:o.getTextColor(),textPosition:"inside",fill:g,stroke:o.get("borderColor")||"transparent",lineWidth:o.get("borderWidth")||0,shadowBlur:o.get("shadowBlur"),shadowColor:o.get("shadowColor"),shadowOffsetX:o.get("shadowOffsetX"),shadowOffsetY:o.get("shadowOffsetY")},z2:10}}function TE(t,e,i,n,a){var r=e.scale.getLabel(t,{precision:a.precision}),o=a.formatter;if(o){var s={value:ME.getAxisRawValue(e,t),seriesData:[]};xE.each(n,(function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,a=e&&e.getDataParams(n);a&&s.seriesData.push(a)})),xE.isString(o)?r=o.replace("{value}",r):xE.isFunction(o)&&(r=o(s))}return r}function CE(t,e,i){var n=SE.create();return SE.rotate(n,n,i.rotation),SE.translate(n,n,i.position),_E.applyTransform([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}yE.buildElStyle=function(t){var e,i=t.get("type"),n=t.getModel(i+"Style");return"line"===i?(e=n.getLineStyle()).fill=null:"shadow"===i&&((e=n.getAreaStyle()).stroke=null),e},yE.buildLabelElOption=AE,yE.getValueLabel=TE,yE.getTransformedPosition=CE,yE.buildCartesianSingleLabelElOption=function(t,e,i,n,a,r){var o=IE.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=a.get("label.margin"),AE(e,n,a,r,{position:CE(n.axis,t,i),align:o.textAlign,verticalAlign:o.textVerticalAlign})},yE.makeLineShape=function(t,e,i){return{x1:t[i=i||0],y1:t[1-i],x2:e[i],y2:e[1-i]}},yE.makeRectShape=function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}},yE.makeSectorShape=function(t,e,i,n,a,r){return{cx:t,cy:e,r0:i,r:n,startAngle:a,endAngle:r,clockwise:!0}};var LE=Vr,DE=yE,PE=zy,kE=Oy,OE=vE.extend({makeElOption:function(t,e,i,n,a){var r=i.axis,o=r.grid,s=n.get("type"),l=zE(o,r).getOtherAxis(r).getGlobalExtent(),h=r.toGlobalCoord(r.dataToCoord(e,!0));if(s&&"none"!==s){var u=DE.buildElStyle(n),c=EE[s](r,h,l,u);c.style=u,t.graphicKey=c.type,t.pointer=c}var d=PE.layout(o.model,i);DE.buildCartesianSingleLabelElOption(e,t,d,i,n,a)},getHandleTransform:function(t,e,i){var n=PE.layout(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:DE.getTransformedPosition(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var a=i.axis,r=a.grid,o=a.getGlobalExtent(!0),s=zE(r,a).getOtherAxis(a).getGlobalExtent(),l="x"===a.dim?0:1,h=t.position;h[l]+=e[l],h[l]=Math.min(o[1],h[l]),h[l]=Math.max(o[0],h[l]);var u=(s[1]+s[0])/2,c=[u,u];c[l]=h[l];return{position:h,rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}});function zE(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}var EE={line:function(t,e,i,n){var a=DE.makeLineShape([e,i[0]],[e,i[1]],RE(t));return LE.subPixelOptimizeLine({shape:a,style:n}),{type:"Line",shape:a}},shadow:function(t,e,i,n){var a=t.getBandWidth(),r=i[1]-i[0];return{type:"Rect",shape:DE.makeRectShape([e-a/2,i[0]],[a,r],RE(t))}}};function RE(t){return"x"===t.dim?0:1}kE.registerAxisPointerClass("CartesianAxisPointer",OE);var NE=m,VE=b,BE=xy,GE=jz;NE.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!VE.isArray(e)&&(t.axisPointer.link=[e])}})),NE.registerProcessor(NE.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=BE.collect(t,e)})),NE.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},GE);var WE=Vr,HE=yE,FE=mz,ZE=Oy,UE=["x","y"],jE=["width","height"],qE=vE.extend({makeElOption:function(t,e,i,n,a){var r=i.axis,o=r.coordinateSystem,s=$E(o,1-YE(r)),l=o.dataToPoint(e)[0],h=n.get("type");if(h&&"none"!==h){var u=HE.buildElStyle(n),c=XE[h](r,l,s,u);c.style=u,t.graphicKey=c.type,t.pointer=c}var d=FE.layout(i);HE.buildCartesianSingleLabelElOption(e,t,d,i,n,a)},getHandleTransform:function(t,e,i){var n=FE.layout(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:HE.getTransformedPosition(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var a=i.axis,r=a.coordinateSystem,o=YE(a),s=$E(r,o),l=t.position;l[o]+=e[o],l[o]=Math.min(s[1],l[o]),l[o]=Math.max(s[0],l[o]);var h=$E(r,1-o),u=(h[1]+h[0])/2,c=[u,u];return c[o]=l[o],{position:l,rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}}}),XE={line:function(t,e,i,n){var a=HE.makeLineShape([e,i[0]],[e,i[1]],YE(t));return WE.subPixelOptimizeLine({shape:a,style:n}),{type:"Line",shape:a}},shadow:function(t,e,i,n){var a=t.getBandWidth(),r=i[1]-i[0];return{type:"Rect",shape:HE.makeRectShape([e-a/2,i[0]],[a,r],YE(t))}}};function YE(t){return t.isHorizontal()?0:1}function $E(t,e){var i=t.getRect();return[i[UE[e]],i[UE[e]]+i[jE[e]]]}ZE.registerAxisPointerClass("SingleAxisPointer",qE),m.extendComponentView({type:"single"});var KE=wp,JE=yd,QE=dp,tR=b,eR=cr.encodeHTML,iR=GD,nR=JE.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){nR.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},fixData:function(t){for(var e=t.length,i=iR().key((function(t){return t[2]})).entries(t),n=tR.map(i,(function(t){return{name:t.key,dataList:t.values}})),a=n.length,r=-1,o=-1,s=0;s<a;++s){var l=n[s].dataList.length;l>r&&(r=l,o=s)}for(var h=0;h<a;++h)if(h!==o)for(var u=n[h].name,c=0;c<r;++c){for(var d=n[o].dataList[c][0],p=n[h].dataList.length,f=-1,g=0;g<p;++g){if(n[h].dataList[g][0]===d){f=g;break}}-1===f&&(t[e]=[],t[e][0]=d,t[e][1]=0,t[e][2]=u,e++)}return t},getInitialData:function(t,e){var i=[],n=e.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0].get("type");i=[{name:"time",type:"category"===n?"ordinal":"time"===n?"time":"float"},{name:"value",type:"float"},{name:"name",type:"ordinal"}];for(var a=tR.filter(t.data,(function(t){return void 0!==t[2]})),r=this.fixData(a||[]),o=[],s=this.nameMap=tR.createHashMap(),l=0,h=0;h<r.length;++h)o.push(r[h][2]),s.get(r[h][2])||(s.set(r[h][2],l),l++);i=KE(i,r);var u=new QE(i,this);return u.initData(r,o),u},coordDimToDataDim:function(t){return["time"]},getLayerSeries:function(){for(var t=this.getData(),e=t.count(),i=[],n=0;n<e;++n)i[n]=n;for(var a=iR().key((function(e){return t.get("name",e)})).entries(i),r=tR.map(a,(function(t){return{name:t.key,indices:t.values}})),o=0;o<r.length;++o)r[o].indices.sort(s);function s(e,i){return t.get("time",e)-t.get("time",i)}return r},getAxisTooltipData:function(t,e,i){tR.isArray(t)||(t=t?[t]:[]);for(var n,a=this.getData(),r=this.getLayerSeries(),o=[],s=r.length,l=0;l<s;++l){for(var h=Number.MAX_VALUE,u=-1,c=r[l].indices.length,d=0;d<c;++d){var p=a.get(t[0],r[l].indices[d]),f=Math.abs(p-e);f<=h&&(n=p,h=f,u=r[l].indices[d])}o.push(u)}return{dataIndices:o,nestestValue:n}},formatTooltip:function(t){var e=this.getData(),i=e.get("name",t),n=e.get("value",t);return(isNaN(n)||null==n)&&(n="-"),eR(i+" : "+n)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{normal:{margin:4,textAlign:"right",show:!0,position:"left",color:"#000",fontSize:11},emphasis:{show:!0}}}}),aR=m,rR=vm.Polygon,oR=Vr,sR=b,lR=sR.bind,hR=sR.extend,uR=$d;aR.extendChartView({type:"themeRiver",init:function(){this._layers=[]},render:function(t,e,i){var n=t.getData(),a=this.group,r=t.getLayerSeries(),o=n.getLayout("layoutInfo"),s=o.rect,l=o.boundaryGap;function h(t){return t.name}a.attr("position",[0,s.y+l[0]]);var u=new uR(this._layersSeries||[],r,h,h),c={};function d(e,i,o){var s=this._layers;if("remove"!==e){for(var l,h,u,d=[],p=[],f=r[i].indices,g=0;g<f.length;g++){var m=n.getItemLayout(f[g]),v=m.x,y=m.y0,x=m.y;d.push([v,y]),p.push([v,y+x]),l=n.getItemVisual(f[g],"color")}var _=n.getItemLayout(f[0]),b=n.getItemModel(f[g-1]),w=b.getModel("label.normal"),S=w.get("margin");if("add"===e){var M=c[i]=new oR.Group;h=new rR({shape:{points:d,stackedOnPoints:p,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),u=new oR.Text({style:{x:_.x-S,y:_.y0+_.y/2}}),M.add(h),M.add(u),a.add(M),h.setClipPath(function(t,e,i){var n=new oR.Rect({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return oR.initProps(n,{shape:{width:t.width+20,height:t.height+20}},e,i),n}(h.getBoundingRect(),t,(function(){h.removeClipPath()})))}else{M=s[o];h=M.childAt(0),u=M.childAt(1),a.add(M),c[i]=M,oR.updateProps(h,{shape:{points:d,stackedOnPoints:p}},t),oR.updateProps(u,{style:{x:_.x-S,y:_.y0+_.y/2}},t)}var I=b.getModel("itemStyle.emphasis"),A=b.getModel("itemStyle.normal");oR.setTextStyle(u.style,w,{text:w.get("show")?t.getFormattedLabel(f[g-1],"normal")||n.getName(f[g-1]):null,textVerticalAlign:"middle"}),h.setStyle(hR({fill:l},A.getItemStyle(["color"]))),oR.setHoverStyle(h,I.getItemStyle())}else a.remove(s[i])}u.add(lR(d,this,"add")).update(lR(d,this,"update")).remove(lR(d,this,"remove")).execute(),this._layersSeries=r,this._layers=c},dispose:function(){}});var cR=b,dR=dr;function pR(t,e,i){if(t.count())for(var n,a=e.coordinateSystem,r=e.getLayerSeries(),o=cR.map(r,(function(e){return cR.map(e.indices,(function(e){var i=a.dataToPoint(t.get("time",e));return i[1]=t.get("value",e),i}))})),s=function(t){for(var e=t.length,i=t[0].length,n=[],a=[],r=0,o={},s=0;s<i;++s){for(var l=0,h=0;l<e;++l)h+=t[l][s][1];h>r&&(r=h),n.push(h)}for(var u=0;u<i;++u)a[u]=(r-n[u])/2;r=0;for(var c=0;c<i;++c){var d=n[c]+a[c];d>r&&(r=d)}return o.y0=a,o.max=r,o}(o),l=s.y0,h=i/s.max,u=r.length,c=r[0].indices.length,d=0;d<c;++d){n=l[d]*h,t.setItemLayout(r[0].indices[d],{layerIndex:0,x:o[0][d][0],y0:n,y:o[0][d][1]*h});for(var p=1;p<u;++p)n+=o[p-1][d][1]*h,t.setItemLayout(r[p].indices[d],{layerIndex:p,x:o[p][d][0],y0:n,y:o[p][d][1]*h})}}var fR=function(t,e){t.eachSeriesByType("themeRiver",(function(t){var e=t.getData(),i=t.coordinateSystem,n={},a=i.getRect();n.rect=a;var r=t.get("boundaryGap"),o=i.getAxis();(n.boundaryGap=r,"horizontal"===o.orient)?(r[0]=dR.parsePercent(r[0],a.height),r[1]=dR.parsePercent(r[1],a.height),pR(e,t,a.height-r[0]-r[1])):(r[0]=dR.parsePercent(r[0],a.width),r[1]=dR.parsePercent(r[1],a.width),pR(e,t,a.width-r[0]-r[1]));e.setLayout("layoutInfo",n)}))},gR=b.createHashMap;var mR=m,vR=b,yR=fR,xR=function(t){t.eachSeriesByType("themeRiver",(function(t){var e=t.getData(),i=t.getRawData(),n=t.get("color"),a=gR();e.each((function(t){a.set(e.getRawIndex(t),t)})),i.each((function(r){var o=i.getName(r),s=n[(t.nameMap.get(o)-1)%n.length];i.setItemVisual(r,"color",s);var l=a.get(r);null!=l&&e.setItemVisual(l,"color",s)}))}))},_R=o_;mR.registerLayout(yR),mR.registerVisual(xR),mR.registerProcessor(vR.curry(_R,"themeRiver"));var bR=b;function wR(t,e){return e=e||[0,0],bR.map(["x","y"],(function(i,n){var a=this.getAxis(i),r=e[n],o=t[n]/2;return"category"===a.type?a.getBandWidth():Math.abs(a.dataToCoord(r-o)-a.dataToCoord(r+o))}),this)}var SR=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:bR.bind(t.dataToPoint,t),size:bR.bind(wR,t)}}},MR=b;function IR(t,e){return e=e||[0,0],MR.map([0,1],(function(i){var n=e[i],a=t[i]/2,r=[],o=[];return r[i]=n-a,o[i]=n+a,r[1-i]=o[1-i]=e[1-i],Math.abs(this.dataToPoint(r)[i]-this.dataToPoint(o)[i])}),this)}var AR=function(t){var e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:MR.bind(t.dataToPoint,t),size:MR.bind(IR,t)}}},TR=b;function CR(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))}var LR=function(t){var e=t.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:TR.bind(t.dataToPoint,t),size:TR.bind(CR,t)}}},DR=b;function PR(t,e){return DR.map(["Radius","Angle"],(function(i,n){var a=this["get"+i+"Axis"](),r=e[n],o=t[n]/2,s="dataTo"+i,l="category"===a.type?a.getBandWidth():Math.abs(a[s](r-o)-a[s](r+o));return"Angle"===i&&(l=l*Math.PI/180),l}),this)}var kR=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:DR.bind((function(n){var a=e.dataToRadius(n[0]),r=i.dataToAngle(n[1]),o=t.coordToPoint([a,r]);return o.push(a,r*Math.PI/180),o})),size:DR.bind(PR,t)}}},OR=b;var zR=function(t){var e=t.getRect(),i=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:i.start,end:i.end,weeks:i.weeks,dayCount:i.allDay}},api:{coord:OR.bind(t.dataToPoint,t)}}},ER=m,RR=b,NR=Vr,VR=jg.findLabelValueDim,BR=Ep,GR=ox,WR=$d,HR=["itemStyle","normal"],FR=["itemStyle","emphasis"],ZR=["label","normal"],UR=["label","emphasis"],jR={cartesian2d:SR,geo:AR,singleAxis:LR,polar:kR,calendar:zR};function qR(t,e,i,n,a){null==i[t]||a||(e[t]=i[t],i[t]=n[t])}function XR(t){var e={};return RR.each(t.dimensions,(function(i,n){var a=t.getDimensionInfo(i);if(!a.isExtraCoord){var r=a.coordDim;(e[r]=e[r]||[])[a.coordDimIndex]=n}})),e}function YR(t,e,i,n,a,r){(t=$R(t,e,i,n,a,r))&&r.setItemGraphicEl(e,t)}function $R(t,e,i,n,a,r){var o=i.type;if(!t||o===t.__customGraphicType||"path"===o&&i.pathData===t.__customPathData||"image"===o&&i.style.image===t.__customImagePath||"text"===o&&i.style.text===t.__customText||(a.remove(t),t=null),null!=o){var s,l=!t;if(!t&&(t=function(t){var e,i=t.type;if("path"===i){var n=t.shape;(e=NR.makePath(n.pathData,null,{x:n.x||0,y:n.y||0,width:n.width||0,height:n.height||0},"center")).__customPathData=t.pathData}else"image"===i?(e=new NR.Image({})).__customImagePath=t.style.image:"text"===i?(e=new NR.Text({})).__customText=t.style.text:e=new(0,NR[i.charAt(0).toUpperCase()+i.slice(1)]);return e.__customGraphicType=i,e.name=t.name,e}(i)),function(t,e,i,n,a,r){var o={},s=i.style||{};if(i.shape&&(o.shape=RR.clone(i.shape)),i.position&&(o.position=i.position.slice()),i.scale&&(o.scale=i.scale.slice()),i.origin&&(o.origin=i.origin.slice()),i.rotation&&(o.rotation=i.rotation),"image"===t.type&&i.style){var l=o.style={};RR.each(["x","y","width","height"],(function(e){qR(e,l,s,t.style,r)}))}"text"===t.type&&i.style&&(l=o.style={},RR.each(["x","y"],(function(e){qR(e,l,s,t.style,r)})),!s.hasOwnProperty("textFill")&&s.fill&&(s.textFill=s.fill),!s.hasOwnProperty("textStroke")&&s.stroke&&(s.textStroke=s.stroke));if("group"!==t.type&&(t.useStyle(s),r)){t.style.opacity=0;var h=s.opacity;null==h&&(h=1),NR.initProps(t,{style:{opacity:h}},n,e)}r?t.attr(o):NR.updateProps(t,o,n,e),t.attr({z2:i.z2||0,silent:i.silent}),!1!==i.styleEmphasis&&NR.setHoverStyle(t,i.styleEmphasis)}(t,e,i,n,0,l),"group"===o){var h=t.children()||[],u=i.children||[];if(i.diffChildrenByName)new WR((s={oldChildren:h,newChildren:u,dataIndex:e,animatableModel:n,group:t,data:r}).oldChildren,s.newChildren,KR,KR,s).add(JR).update(JR).remove(QR).execute();else{for(var c=0;c<u.length;c++)$R(t.childAt(c),e,u[c],n,t,r);for(;c<h.length;c++)h[c]&&t.remove(h[c])}}return a.add(t),t}}function KR(t,e){var i=t&&t.name;return null!=i?i:"e\0\0"+e}function JR(t,e){var i=this.context,n=null!=t?i.newChildren[t]:null;$R(null!=e?i.oldChildren[e]:null,i.dataIndex,n,i.animatableModel,i.group,i.data)}function QR(t){var e=this.context,i=e.oldChildren[t];i&&e.group.remove(i)}ER.extendSeriesModel({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0},getInitialData:function(t,e){return BR(t.data,this,e)}}),ER.extendChartView({type:"custom",_data:null,render:function(t,e,i){var n=this._data,a=t.getData(),r=this.group,o=function(t,e,i,n){var a=t.get("renderItem"),r=t.coordinateSystem,o={};r&&(o=r.prepareCustoms?r.prepareCustoms():jR[r.type](r));var s,l,h,u,c,d,p=RR.defaults({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:v,style:y,styleEmphasis:x,visual:_,barLayout:b,currentSeriesIndices:w,font:S},o.api||{}),f={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:o.coordSys,dataInsideLength:e.count(),encode:XR(t.getData())},g=!0;return function(t){return s=t,g=!0,a&&a(RR.defaults({dataIndexInside:t,dataIndex:e.getRawIndex(t)},f),p)||{}};function m(t){null==t&&(t=s),g&&(l=e.getItemModel(t),h=l.getModel(ZR),u=l.getModel(UR),c=VR(e),d=e.getItemVisual(t,"color"),g=!1)}function v(t,i){return null==i&&(i=s),e.get(e.getDimension(t||0),i)}function y(i,n){null==n&&(n=s),m(n);var a=l.getModel(HR).getItemStyle();null!=d&&(a.fill=d);var r=e.getItemVisual(n,"opacity");return null!=r&&(a.opacity=r),null!=c&&(NR.setTextStyle(a,h,null,{autoColor:d,isRectText:!0}),a.text=h.getShallow("show")?RR.retrieve2(t.getFormattedLabel(n,"normal"),e.get(c,n)):null),i&&RR.extend(a,i),a}function x(i,n){null==n&&(n=s),m(n);var a=l.getModel(FR).getItemStyle();return null!=c&&(NR.setTextStyle(a,u,null,{isRectText:!0},!0),a.text=u.getShallow("show")?RR.retrieve3(t.getFormattedLabel(n,"emphasis"),t.getFormattedLabel(n,"normal"),e.get(c,n)):null),i&&RR.extend(a,i),a}function _(t,i){return null==i&&(i=s),e.getItemVisual(i,t)}function b(t){if(r.getBaseAxis){var e=r.getBaseAxis();return GR.getLayoutOnAxis(RR.defaults({axis:e},t),n)}}function w(){return i.getCurrentSeriesIndices()}function S(t){return NR.getFont(t,i)}}(t,a,e,i);a.diff(n).add((function(e){a.hasValue(e)&&YR(null,e,o(e),t,r,a)})).update((function(e,i){var s=n.getItemGraphicEl(i);a.hasValue(e)?YR(s,e,o(e),t,r,a):s&&r.remove(s)})).remove((function(t){var e=n.getItemGraphicEl(t);e&&r.remove(e)})).execute(),this._data=a},dispose:RR.noop});var tN=m,eN=b,iN=ur,nN=Vr,aN=wu;tN.registerPreprocessor((function(t){var e=t.graphic;eN.isArray(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])}));var rN=tN.extendComponentModel({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(t){var e=this.option.elements;this.option.elements=null,rN.superApply(this,"mergeOption",arguments),this.option.elements=e},optionUpdated:function(t,e){var i=this.option,n=(e?i:t).elements,a=i.elements=e?[]:i.elements,r=[];this._flatten(n,r);var o=iN.mappingToExists(a,r);iN.makeIdAndName(o);var s=this._elOptionsToUpdate=[];eN.each(o,(function(t,e){var i=t.option;i&&(s.push(i),function(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}(t,i),function(t,e,i){var n=eN.extend({},i),a=t[e],r=i.$action||"merge";"merge"===r?a?(eN.merge(a,n,!0),aN.mergeLayoutParam(a,n,{ignoreSize:!0}),aN.copyLayoutParams(i,a)):t[e]=n:"replace"===r?t[e]=n:"remove"===r&&a&&(t[e]=null)}(a,e,i),function(t,e){if(!t)return;t.hv=e.hv=[lN(e,["left","right"]),lN(e,["top","bottom"])],"group"===t.type&&(null==t.width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0))}(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){eN.each(t,(function(t){if(t){i&&(t.parentOption=i),e.push(t);var n=t.children;"group"===t.type&&n&&this._flatten(n,e,t),delete t.children}}),this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});function oN(t,e,i,n){var a=i.type,r=new(0,nN[a.charAt(0).toUpperCase()+a.slice(1)])(i);e.add(r),n.set(t,r),r.__ecGraphicId=t}function sN(t,e){var i=t&&t.parent;i&&("group"===t.type&&t.traverse((function(t){sN(t,e)})),e.removeKey(t.__ecGraphicId),i.remove(t))}function lN(t,e){var i;return eN.each(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(i=!0)})),i}tN.extendComponentView({type:"graphic",init:function(t,e){this._elMap=eN.createHashMap(),this._lastGraphicModel},render:function(t,e,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t,i),this._relocate(t,i)},_updateElements:function(t,e){var i=t.useElOptionsToUpdate();if(i){var n=this._elMap,a=this.group;eN.each(i,(function(t){var e=t.$action,i=t.id,r=n.get(i),o=t.parentId,s=null!=o?n.get(o):a;if("text"===t.type){var l=t.style;t.hv&&t.hv[1]&&(l.textVerticalAlign=l.textBaseline=null),!l.hasOwnProperty("textFill")&&l.fill&&(l.textFill=l.fill),!l.hasOwnProperty("textStroke")&&l.stroke&&(l.textStroke=l.stroke)}var h=function(t){return t=eN.extend({},t),eN.each(["id","parentId","$action","hv","bounding"].concat(aN.LOCATION_PARAMS),(function(e){delete t[e]})),t}(t);e&&"merge"!==e?"replace"===e?(sN(r,n),oN(i,s,h,n)):"remove"===e&&sN(r,n):r?r.attr(h):oN(i,s,h,n);var u=n.get(i);u&&(u.__ecGraphicWidth=t.width,u.__ecGraphicHeight=t.height)}))}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,a=this._elMap,r=i.length-1;r>=0;r--){var o=i[r],s=a.get(o.id);if(s){var l=s.parent,h=l===n?{width:e.getWidth(),height:e.getHeight()}:{width:l.__ecGraphicWidth||0,height:l.__ecGraphicHeight||0};aN.positionElement(s,o,h,null,{hv:o.hv,boundingMode:o.bounding})}}},_clear:function(){var t=this._elMap;t.each((function(e){sN(e,t)})),this._elMap=eN.createHashMap()},dispose:function(){this._clear()}});var hN=b,uN=ru,cN=m.extendComponentModel({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{}},mergeOption:function(t){cN.superCall(this,"mergeOption",t)},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i<t.length;i++){var n=t[i].get("name");if(this.isSelected(n)){this.select(n),e=!0;break}}!e&&this.select(t[0].get("name"))}},_updateData:function(t){var e=hN.map(this.get("data")||[],(function(t){return"string"!=typeof t&&"number"!=typeof t||(t={name:t}),new uN(t,this,this.ecModel)}),this);this._data=e;var i=hN.map(t.getSeries(),(function(t){return t.name}));t.eachSeries((function(t){if(t.legendDataProvider){var e=t.legendDataProvider();i=i.concat(e.mapArray(e.getName))}})),this._availableNames=i},getData:function(){return this._data},select:function(t){var e=this.option.selected;if("single"===this.get("selectedMode")){var i=this._data;hN.each(i,(function(t){e[t.get("name")]=!1}))}e[t]=!0},unSelect:function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},toggleSelected:function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&hN.indexOf(this._availableNames,t)>=0},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:!0,tooltip:{show:!1}}}),dN=cN,pN=m,fN=b;function gN(t,e,i){var n,a={},r="toggleSelected"===t;return i.eachComponent("legend",(function(i){r&&null!=n?i[n?"select":"unSelect"](e.name):(i[t](e.name),n=i.isSelected(e.name));var o=i.getData();fN.each(o,(function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);a.hasOwnProperty(e)?a[e]=a[e]&&n:a[e]=n}}))})),{name:e.name,selected:a}}pN.registerAction("legendToggleSelect","legendselectchanged",fN.curry(gN,"toggleSelected")),pN.registerAction("legendSelect","legendselected",fN.curry(gN,"select")),pN.registerAction("legendUnSelect","legendunselected",fN.curry(gN,"unSelect"));var mN={},vN=wu,yN=vN.getLayoutRect,xN=vN.box,_N=vN.positionElement,bN=cr,wN=Vr;mN.layout=function(t,e,i){var n=e.getBoxLayoutParams(),a=e.get("padding"),r={width:i.getWidth(),height:i.getHeight()},o=yN(n,r,a);xN(e.get("orient"),t,e.get("itemGap"),o.width,o.height),_N(t,n,r,a)},mN.makeBackground=function(t,e){var i=bN.normalizeCssArray(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),t=new wN.Rect({shape:{x:t.x-i[3],y:t.y-i[0],width:t.width+i[1]+i[3],height:t.height+i[0]+i[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1})};var SN=m,MN=b,IN=Hf.createSymbol,AN=Vr,TN=mN.makeBackground,CN=wu,LN=MN.curry,DN=MN.each,PN=AN.Group;function kN(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function ON(t,e,i){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||t.get("legendHoverLink")&&i.dispatchAction({type:"highlight",seriesName:t.name,name:e})}function zN(t,e,i){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||t.get("legendHoverLink")&&i.dispatchAction({type:"downplay",seriesName:t.name,name:e})}var EN=SN.extendComponentView({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new PN),this._backgroundEl},getContentGroup:function(){return this._contentGroup},render:function(t,e,i){if(this.resetInner(),t.get("show",!0)){var n=t.get("align");n&&"auto"!==n||(n="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderInner(n,t,e,i);var a=t.getBoxLayoutParams(),r={width:i.getWidth(),height:i.getHeight()},o=t.get("padding"),s=CN.getLayoutRect(a,r,o),l=this.layoutInner(t,n,s),h=CN.getLayoutRect(MN.defaults({width:l.width,height:l.height},a),r,o);this.group.attr("position",[h.x-l.x,h.y-l.y]),this.group.add(this._backgroundEl=TN(l,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(t,e,i,n){var a=this.getContentGroup(),r=MN.createHashMap(),o=e.get("selectedMode");DN(e.getData(),(function(s,l){var h=s.get("name");if(this.newlineDisabled||""!==h&&"\n"!==h){var u=i.getSeriesByName(h)[0];if(!r.get(h))if(u){var c=u.getData(),d=c.getVisual("color");"function"==typeof d&&(d=d(u.getDataParams(0)));var p=c.getVisual("legendSymbol")||"roundRect",f=c.getVisual("symbol");this._createItem(h,l,s,e,p,f,t,d,o).on("click",LN(kN,h,n)).on("mouseover",LN(ON,u,null,n)).on("mouseout",LN(zN,u,null,n)),r.set(h,!0)}else i.eachRawSeries((function(i){if(!r.get(h)&&i.legendDataProvider){var a=i.legendDataProvider(),u=a.indexOfName(h);if(u<0)return;var c=a.getItemVisual(u,"color");this._createItem(h,l,s,e,"roundRect",null,t,c,o).on("click",LN(kN,h,n)).on("mouseover",LN(ON,i,h,n)).on("mouseout",LN(zN,i,h,n)),r.set(h,!0)}}),this)}else a.add(new PN({newline:!0}))}),this)},_createItem:function(t,e,i,n,a,r,o,s,l){var h=n.get("itemWidth"),u=n.get("itemHeight"),c=n.get("inactiveColor"),d=n.isSelected(t),p=new PN,f=i.getModel("textStyle"),g=i.get("icon"),m=i.getModel("tooltip"),v=m.parentModel;if(a=g||a,p.add(IN(a,0,0,h,u,d?s:c,!0)),!g&&r&&(r!==a||"none"==r)){var y=.8*u;"none"===r&&(r="circle"),p.add(IN(r,(h-y)/2,(u-y)/2,y,y,d?s:c))}var x="left"===o?h+5:-5,_=o,b=n.get("formatter"),w=t;"string"==typeof b&&b?w=b.replace("{name}",null!=t?t:""):"function"==typeof b&&(w=b(t)),p.add(new AN.Text({style:AN.setTextStyle({},f,{text:w,x:x,y:u/2,textFill:d?f.getTextColor():c,textAlign:_,textVerticalAlign:"middle"})}));var S=new AN.Rect({shape:p.getBoundingRect(),invisible:!0,tooltip:m.get("show")?MN.extend({content:t,formatter:v.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},m.option):null});return p.add(S),p.eachChild((function(t){t.silent=!0})),S.silent=!l,this.getContentGroup().add(p),AN.setHoverStyle(p),p.__legendDataIndex=e,p},layoutInner:function(t,e,i){var n=this.getContentGroup();CN.box(t.get("orient"),n,t.get("itemGap"),i.width,i.height);var a=n.getBoundingRect();return n.attr("position",[-a.x,-a.y]),this.group.getBoundingRect()}});var RN=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries((function(t){for(var i=0;i<e.length;i++)if(!e[i].isSelected(t.name))return!1;return!0}))},NN=Zu;m.registerProcessor(RN),NN.registerSubTypeDefaulter("legend",(function(){return"plain"}));var VN=dN,BN=wu,GN=BN.mergeLayoutParam,WN=BN.getLayoutParams,HN=VN.extend({type:"legend.scroll",setScrollDataIndex:function(t){this.option.scrollDataIndex=t},defaultOption:{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800},init:function(t,e,i,n){var a=WN(t);HN.superCall(this,"init",t,e,i,n),FN(this,t,a)},mergeOption:function(t,e){HN.superCall(this,"mergeOption",t,e),FN(this,this.option,t)},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}}});function FN(t,e,i){var n=[1,1];n[t.getOrient().index]=0,GN(e,i,{type:"box",ignoreSize:n})}var ZN=b,UN=Vr,jN=wu,qN=EN,XN=UN.Group,YN=["width","height"],$N=["x","y"],KN=qN.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){KN.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new XN),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new XN),this._showController},resetInner:function(){KN.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,e,i,n){var a=this;KN.superCall(this,"renderInner",t,e,i,n);var r=this._controllerGroup,o=e.get("pageIconSize",!0);ZN.isArray(o)||(o=[o,o]),l("pagePrev",0);var s=e.getModel("pageTextStyle");function l(t,i){var s=t+"DataIndex",l=UN.createIcon(e.get("pageIcons",!0)[e.getOrient().name][i],{onclick:ZN.bind(a._pageGo,a,s,e,n)},{x:-o[0]/2,y:-o[1]/2,width:o[0],height:o[1]});l.name=t,r.add(l)}r.add(new UN.Text({name:"pageText",style:{textFill:s.getTextColor(),font:s.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),l("pageNext",1)},layoutInner:function(t,e,i){var n=this.getContentGroup(),a=this._containerGroup,r=this._controllerGroup,o=t.getOrient().index,s=YN[o],l=YN[1-o],h=$N[1-o];jN.box(t.get("orient"),n,t.get("itemGap"),o?i.width:null,o?null:i.height),jN.box("horizontal",r,t.get("pageButtonItemGap",!0));var u=n.getBoundingRect(),c=r.getBoundingRect(),d=this._showController=u[s]>i[s],p=[-u.x,-u.y];p[o]=n.position[o];var f=[0,0],g=[-c.x,-c.y],m=ZN.retrieve2(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?g[o]+=i[s]-c[s]:f[o]+=c[s]+m);g[1-o]+=u[l]/2-c[l]/2,n.attr("position",p),a.attr("position",f),r.attr("position",g);var v=this.group.getBoundingRect();if((v={x:0,y:0})[s]=d?i[s]:u[s],v[l]=Math.max(u[l],c[l]),v[h]=Math.min(0,c[h]+g[1-o]),a.__rectSize=i[s],d){var y={x:0,y:0};y[s]=Math.max(i[s]-c[s]-m,0),y[l]=v[l],a.setClipPath(new UN.Rect({shape:y})),a.__rectSize=y[s]}else r.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var x=this._getPageInfo(t);return null!=x.pageIndex&&UN.updateProps(n,{position:x.contentPosition},!!d&&t),this._updatePageInfoView(t,x),v},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(t,e){var i=this._controllerGroup;ZN.each(["pagePrev","pageNext"],(function(n){var a=null!=e[n+"DataIndex"],r=i.childOfName(n);r&&(r.setStyle("fill",a?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),r.cursor=a?"pointer":"default")}));var n=i.childOfName("pageText"),a=t.get("pageFormatter"),r=e.pageIndex,o=null!=r?r+1:0,s=e.pageCount;n&&a&&n.setStyle("text",ZN.isString(a)?a.replace("{current}",o).replace("{total}",s):a({current:o,total:s}))},_getPageInfo:function(t){var e,i,n,a,r=t.get("scrollDataIndex",!0),o=this.getContentGroup(),s=o.getBoundingRect(),l=this._containerGroup.__rectSize,h=t.getOrient().index,u=YN[h],c=YN[1-h],d=$N[h],p=o.position.slice();this._showController?o.eachChild((function(t){t.__legendDataIndex===r&&(a=t)})):a=o.childAt(0);var f=l?Math.ceil(s[u]/l):0;if(a){var g=a.getBoundingRect(),m=a.position[h]+g[d];p[h]=-m-s[d],e=Math.floor(f*(m+g[d]+l/2)/s[u]),e=s[u]&&f?Math.max(0,Math.min(f-1,e)):-1;var v,y={x:0,y:0};y[u]=l,y[c]=s[c],y[d]=-p[h]-s[d];var x=o.children();if(o.eachChild((function(t,e){var i=b(t);i.intersect(y)&&(null==v&&(v=e),n=t.__legendDataIndex),e===x.length-1&&i[d]+i[u]<=y[d]+y[u]&&(n=null)})),null!=v){var _=b(x[v]);if(y[d]=_[d]+_[u]-y[u],v<=0&&_[d]>=y[d])i=null;else{for(;v>0&&b(x[v-1]).intersect(y);)v--;i=x[v].__legendDataIndex}}}return{contentPosition:p,pageIndex:e,pageCount:f,pagePrevDataIndex:i,pageNextDataIndex:n};function b(t){var e=t.getBoundingRect().clone();return e[d]+=t.position[h],e}}});m.registerAction("legendScroll","legendscroll",(function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(i)}))})),m.extendComponentModel({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:8,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var JN=b,QN=Pt,tV=fa,eV=_,iV=cr,nV=JN.each,aV=iV.toCamelCase,rV=["","-webkit-","-moz-","-o-"];function oV(t){var e,i,n,a=[],r=t.get("transitionDuration"),o=t.get("backgroundColor"),s=t.getModel("textStyle"),l=t.get("padding");return r&&a.push((n="left "+(e=r)+"s "+(i="cubic-bezier(0.23, 1, 0.32, 1)")+",top "+e+"s "+i,JN.map(rV,(function(t){return t+"transition:"+n})).join(";"))),o&&(eV.canvasSupported?a.push("background-Color:"+o):(a.push("background-Color:#"+QN.toHex(o)),a.push("filter:alpha(opacity=70)"))),nV(["width","color","radius"],(function(e){var i="border-"+e,n=aV(i),r=t.get(n);null!=r&&a.push(i+":"+r+("color"===e?"":"px"))})),a.push(function(t){var e=[],i=t.get("fontSize"),n=t.getTextColor();return n&&e.push("color:"+n),e.push("font:"+t.getFont()),i&&e.push("line-height:"+Math.round(3*i/2)+"px"),nV(["decoration","align"],(function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)})),e.join(";")}(s)),null!=l&&a.push("padding:"+iV.normalizeCssArray(l).join("px ")+"px"),a.join(";")+";"}function sV(t,e){var i=document.createElement("div"),n=this._zr=e.getZr();this.el=i,this._x=e.getWidth()/2,this._y=e.getHeight()/2,t.appendChild(i),this._container=t,this._show=!1,this._hideTimeout;var a=this;i.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},i.onmousemove=function(e){if(e=e||window.event,!a._enterable){var i=n.handler;tV.normalizeEvent(t,e,!0),i.dispatch("mousemove",e)}},i.onmouseleave=function(){a._enterable&&a._show&&a.hideLater(a._hideDelay),a._inContent=!1}}sV.prototype={constructor:sV,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==e.position&&(i.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+oV(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var i,n=this._zr;n&&n.painter&&(i=n.painter.getViewportRootOffset())&&(t+=i.offsetLeft,e+=i.offsetTop);var a=this.el.style;a.left=t+"px",a.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(JN.bind(this.hide,this),t)):this.hide())},isShow:function(){return this._show}};var lV=m,hV=b,uV=_,cV=sV,dV=cr,pV=dr,fV=Vr,gV=Oz,mV=wu,vV=ru,yV=qz,xV=Rp,_V=yE,bV=hV.bind,wV=hV.each,SV=pV.parsePercent,MV=new fV.Rect({shape:{x:-1,y:-1,width:2,height:2}});function IV(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(i instanceof vV&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new vV(i,e,e.ecModel))}return e}function AV(t,e){return t.dispatchAction||hV.bind(e.dispatchAction,e)}function TV(t){var e=t.clientWidth,i=t.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var n=document.defaultView.getComputedStyle(t);n&&(e+=parseInt(n.paddingLeft,10)+parseInt(n.paddingRight,10)+parseInt(n.borderLeftWidth,10)+parseInt(n.borderRightWidth,10),i+=parseInt(n.paddingTop,10)+parseInt(n.paddingBottom,10)+parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10))}return{width:e,height:i}}function CV(t){return"center"===t||"middle"===t}lV.extendComponentView({type:"tooltip",init:function(t,e){if(!uV.node){var i=new cV(e.getDom(),e);this._tooltipContent=i}},render:function(t,e,i){if(!uV.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var n=this._tooltipContent;n.update(),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel.get("triggerOn");yV.register("itemTooltip",this._api,bV((function(e,i,n){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(i,n):"leave"===e&&this._hide(n))}),this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})}))}},manuallyShowTip:function(t,e,i,n){if(n.from!==this.uid&&!uV.node){var a=AV(n,i);this._ticket="";var r=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var o=MV;o.position=[n.x,n.y],o.update(),o.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:o},a)}else if(r)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,event:{},dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},a);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var s=gV(n,e),l=s.point[0],h=s.point[1];null!=l&&null!=h&&this._tryShow({offsetX:l,offsetY:h,position:n.position,target:s.el,event:{}},a)}else null!=n.x&&null!=n.y&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target,event:{}},a))}},manuallyHideTip:function(t,e,i,n){var a=this._tooltipContent;this._alwaysShowContent||a.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(AV(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var a=n.seriesIndex,r=n.dataIndex,o=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=a&&null!=r&&null!=o){var s=e.getSeriesByIndex(a);if(s)if("axis"===(t=IV([s.getData().getItemModel(r),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:a,dataIndex:r,position:n.position}),!0}},_tryShow:function(t,e){var i=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var n=t.dataByCoordSys;n&&n.length?this._showAxisTooltip(n,t):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,i,e)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,i,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var i=t.get("showDelay");e=hV.bind(e,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var i=this._ecModel,n=this._tooltipModel,a=[e.offsetX,e.offsetY],r=[],o=[],s=IV([e.tooltipOption,n]);wV(t,(function(t){wV(t.dataByAxis,(function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),n=t.value,a=[];if(e&&null!=n){var s=_V.getValueLabel(n,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);hV.each(t.seriesDataIndices,(function(r){var l=i.getSeriesByIndex(r.seriesIndex),h=r.dataIndexInside,u=l&&l.getDataParams(h);u.axisDim=t.axisDim,u.axisIndex=t.axisIndex,u.axisType=t.axisType,u.axisId=t.axisId,u.axisValue=xV.getAxisRawValue(e.axis,n),u.axisValueLabel=s,u&&(o.push(u),a.push(l.formatTooltip(h,!0)))}));var l=s;r.push((l?dV.encodeHTML(l)+"<br />":"")+a.join("<br />"))}}))}),this),r.reverse(),r=r.join("<br /><br />");var l=e.position;this._showOrMove(s,(function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(s,l,a[0],a[1],this._tooltipContent,o):this._showTooltipContent(s,r,o,Math.random(),a[0],a[1],l)}))},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,a=e.seriesIndex,r=n.getSeriesByIndex(a),o=e.dataModel||r,s=e.dataIndex,l=e.dataType,h=o.getData(),u=IV([h.getItemModel(s),o,r&&(r.coordinateSystem||{}).model,this._tooltipModel]),c=u.get("trigger");if(null==c||"item"===c){var d=o.getDataParams(s,l),p=o.formatTooltip(s,!1,l),f="item_"+o.name+"_"+s;this._showOrMove(u,(function(){this._showTooltipContent(u,p,d,f,t.offsetX,t.offsetY,t.position,t.target)})),i({type:"showTip",dataIndexInside:s,dataIndex:h.getRawIndex(s),seriesIndex:a,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){n={content:n,formatter:n}}var a=new vV(n,this._tooltipModel,this._ecModel),r=a.get("content"),o=Math.random();this._showOrMove(a,(function(){this._showTooltipContent(a,r,a.get("formatterParams")||{},o,t.offsetX,t.offsetY,t.position,e)})),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,a,r,o,s){if(this._ticket="",t.get("showContent")&&t.get("show")){var l=this._tooltipContent,h=t.get("formatter");o=o||t.get("position");var u=e;if(h&&"string"==typeof h)u=dV.formatTpl(h,i,!0);else if("function"==typeof h){var c=bV((function(e,n){e===this._ticket&&(l.setContent(n),this._updatePosition(t,o,a,r,l,i,s))}),this);this._ticket=n,u=h(i,n,c)}l.setContent(u),l.show(t),this._updatePosition(t,o,a,r,l,i,s)}},_updatePosition:function(t,e,i,n,a,r,o){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var h=a.getSize(),u=t.get("align"),c=t.get("verticalAlign"),d=o&&o.getBoundingRect().clone();if(o&&d.applyTransform(o.transform),"function"==typeof e&&(e=e([i,n],r,a.el,d,{viewSize:[s,l],contentSize:h.slice()})),hV.isArray(e))i=SV(e[0],s),n=SV(e[1],l);else if(hV.isObject(e)){e.width=h[0],e.height=h[1];var p=mV.getLayoutRect(e,{width:s,height:l});i=p.x,n=p.y,u=null,c=null}else if("string"==typeof e&&o){var f=function(t,e,i){var n=i[0],a=i[1],r=5,o=0,s=0,l=e.width,h=e.height;switch(t){case"inside":o=e.x+l/2-n/2,s=e.y+h/2-a/2;break;case"top":o=e.x+l/2-n/2,s=e.y-a-r;break;case"bottom":o=e.x+l/2-n/2,s=e.y+h+r;break;case"left":o=e.x-n-r,s=e.y+h/2-a/2;break;case"right":o=e.x+l+r,s=e.y+h/2-a/2}return[o,s]}(e,d,h);i=f[0],n=f[1]}else{f=function(t,e,i,n,a,r,o){var s=TV(i),l=s.width,h=s.height;null!=r&&(t+l+r>n?t-=l+r:t+=r);null!=o&&(e+h+o>a?e-=h+o:e+=o);return[t,e]}(i,n,a.el,s,l,u?null:20,c?null:20);i=f[0],n=f[1]}if(u&&(i-=CV(u)?h[0]/2:"right"===u?h[0]:0),c&&(n-=CV(c)?h[1]/2:"bottom"===c?h[1]:0),t.get("confine")){f=function(t,e,i,n,a){var r=TV(i),o=r.width,s=r.height;return t=Math.min(t+o,n)-o,e=Math.min(e+s,a)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(i,n,a.el,s,l);i=f[0],n=f[1]}a.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&wV(e,(function(e,n){var a=e.dataByAxis||{},r=(t[n]||{}).dataByAxis||[];(i&=a.length===r.length)&&wV(a,(function(t,e){var n=r[e]||{},a=t.seriesDataIndices||[],o=n.seriesDataIndices||[];(i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&a.length===o.length)&&wV(a,(function(t,e){var n=o[e];i&=t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex}))}))})),this._lastDataByCoordSys=t,!!i},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){uV.node||(this._tooltipContent.hide(),yV.unregister("itemTooltip",e))}});var LV=m;LV.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},(function(){})),LV.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},(function(){}));var DV=b,PV=dr.parsePercent;function kV(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function OV(t){return t.dim}var zV=function(t,e,i){var n=i.getWidth(),a=i.getHeight(),r={},o={},s=function(t,e){var i={};DV.each(t,(function(t,e){var n=t.getData(),a=t.coordinateSystem.getBaseAxis(),r=a.getExtent(),o="category"===a.type?a.getBandWidth():Math.abs(r[1]-r[0])/n.count(),s=i[OV(a)]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},l=s.stacks;i[OV(a)]=s;var h=kV(t);l[h]||s.autoWidthCount++,l[h]=l[h]||{width:0,maxWidth:0};var u=PV(t.get("barWidth"),o),c=PV(t.get("barMaxWidth"),o),d=t.get("barGap"),p=t.get("barCategoryGap");u&&!l[h].width&&(u=Math.min(s.remainedWidth,u),l[h].width=u,s.remainedWidth-=u),c&&(l[h].maxWidth=c),null!=d&&(s.gap=d),null!=p&&(s.categoryGap=p)}));var n={};return DV.each(i,(function(t,e){n[e]={};var i=t.stacks,a=t.bandWidth,r=PV(t.categoryGap,a),o=PV(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,h=(s-r)/(l+(l-1)*o);h=Math.max(h,0),DV.each(i,(function(t,e){var i=t.maxWidth;i&&i<h&&(i=Math.min(i,s),t.width&&(i=Math.min(i,t.width)),s-=i,t.width=i,l--)})),h=(s-r)/(l+(l-1)*o),h=Math.max(h,0);var u,c=0;DV.each(i,(function(t,e){t.width||(t.width=h),u=t,c+=t.width*(1+o)})),u&&(c-=u.width*o);var d=-c/2;DV.each(i,(function(t,i){n[e][i]=n[e][i]||{offset:d,width:t.width},d+=t.width*(1+o)}))})),n}(DV.filter(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(),i=t.coordinateSystem,l=i.getAngleAxis(),h=i.getBaseAxis(),u=kV(t),c=s[OV(h)][u],d=c.offset,p=c.width,f=i.getOtherAxis(h),g=t.get("center")||["50%","50%"],m=PV(g[0],n),v=PV(g[1],a),y=t.get("barMinHeight")||0,x=t.get("barMinAngle")||0,_=f.getExtent()[0],b=f.model.get("max"),w=f.model.get("min"),S=[t.coordDimToDataDim("radius")[0],t.coordDimToDataDim("angle")[0]],M=e.mapArray(S,(function(t,e){return i.dataToPoint([t,e])}),!0);r[u]=r[u]||[],o[u]=o[u]||[],e.each(t.coordDimToDataDim(f.dim)[0],(function(t,n){if(!isNaN(t)){r[u][n]||(r[u][n]={p:_,n:_},o[u][n]={p:_,n:_});var a,s,h,c,g=t>=0?"p":"n",S=i.pointToCoord(M[n]),I=o[u][n][g];if("radius"===f.dim)a=I,s=S[0],c=(h=(-S[1]+d)*Math.PI/180)+p*Math.PI/180,Math.abs(s)<y&&(s=a+(s<0?-1:1)*y),o[u][n][g]=s;else{s=(a=S[0]+d)+p,null!=b&&(t=Math.min(t,b)),null!=w&&(t=Math.max(t,w));var A=l.dataToAngle(t);Math.abs(A-I)<x&&(A=I-(t<0?-1:1)*x),h=-I*Math.PI/180,c=-A*Math.PI/180;var T=l.getExtent(),C=A;C===T[0]&&t>0?C=T[1]:C===T[1]&&t<0&&(C=T[0]),o[u][n][g]=C}e.setItemLayout(n,{cx:m,cy:v,r0:a,r:s,startAngle:h,endAngle:c})}}),!0)}}),this)},EV=b,RV=gg;function NV(t,e){RV.call(this,"radius",t,e),this.type="category"}NV.prototype={constructor:NV,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:RV.prototype.dataToCoord,radiusToData:RV.prototype.coordToData},EV.inherits(NV,RV);var VV=NV,BV=b,GV=gg;function WV(t,e){e=e||[0,360],GV.call(this,"angle",t,e),this.type="category"}WV.prototype={constructor:WV,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:GV.prototype.dataToCoord,angleToData:GV.prototype.coordToData},BV.inherits(WV,GV);var HV=VV,FV=WV,ZV=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new HV,this._angleAxis=new FV,this._radiusAxis.polar=this._angleAxis.polar=this};ZV.prototype={type:"polar",axisPointerEnabled:!0,constructor:ZV,dimensions:["radius","angle"],model:null,containPoint:function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},containData:function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},getAxis:function(t){return this["_"+t+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(t){var e=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===t&&e.push(i),n.scale.type===t&&e.push(n),e},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},dataToPoint:function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},pointToData:function(t,e){var i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],e),this._angleAxis.angleToData(i[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getAngleAxis(),a=n.getExtent(),r=Math.min(a[0],a[1]),o=Math.max(a[0],a[1]);n.inverse?r=o-360:o=r+360;var s=Math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=Math.atan2(-i,e)/Math.PI*180,h=l<r?1:-1;l<r||l>o;)l+=360*h;return[s,l]},coordToPoint:function(t){var e=t[0],i=t[1]/180*Math.PI;return[Math.cos(i)*e+this.cx,-Math.sin(i)*e+this.cy]}};var UV=ZV,jV=b,qV=wv,XV=Wf,YV=Zu.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});jV.merge(YV.prototype,XV);var $V={splitNumber:5};function KV(t,e){return e.type||(e.data?"category":"value")}qV("angle",YV,KV,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),qV("radius",YV,KV,$V),m.extendComponentModel({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e;return this.ecModel.eachComponent(t,(function(t){t.getCoordSysModel()===this&&(e=t)}),this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});var JV=UV,QV=dr.parsePercent,tB=Rp,eB=tB.createScaleByModel,iB=tB.niceScaleExtent,nB=_c;function aB(t,e){var i=this,n=i.getAngleAxis(),a=i.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),t.eachSeries((function(t){if(t.coordinateSystem===i){var e=t.getData();a.scale.unionExtentFromData(e,"radius"),n.scale.unionExtentFromData(e,"angle")}})),iB(n.scale,n.model),iB(a.scale,a.model),"category"===n.type&&!n.onBand){var r=n.getExtent(),o=360/n.scale.count();n.inverse?r[1]+=o:r[1]-=o,n.setExtent(r[0],r[1])}}function rB(t,e){if(t.type=e.get("type"),t.scale=eB(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType){t.inverse^=e.get("clockwise");var i=e.get("startAngle");t.setExtent(i,i+(t.inverse?-360:360))}e.axis=t,t.model=e}var oB={dimensions:JV.prototype.dimensions,create:function(t,e){var i=[];return t.eachComponent("polar",(function(t,n){var a=new JV(n);a.update=aB;var r=a.getRadiusAxis(),o=a.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");rB(r,s),rB(o,l),function(t,e,i){var n=e.get("center"),a=i.getWidth(),r=i.getHeight();t.cx=QV(n[0],a),t.cy=QV(n[1],r);var o=t.getRadiusAxis(),s=Math.min(a,r)/2,l=QV(e.get("radius"),s);o.inverse?o.setExtent(l,0):o.setExtent(0,l)}(a,t,e),i.push(a),t.coordinateSystem=a,a.model=t})),t.eachSeries((function(e){if("polar"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"polar",index:e.get("polarIndex"),id:e.get("polarId")})[0];e.coordinateSystem=i.coordinateSystem}})),i}};nB.register("polar",oB);var sB=b,lB=Vr,hB=ru,uB=["axisLine","axisLabel","axisTick","splitLine","splitArea"];function cB(t,e,i){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),a=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:a[0],y2:a[1]}}function dB(t){return t.getRadiusAxis().inverse?0:1}Oy.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),t.get("show")){var i=t.axis,n=i.polar,a=n.getRadiusAxis().getExtent(),r=i.getTicksCoords();"category"!==i.type&&r.pop(),sB.each(uB,(function(e){!t.get(e+".show")||i.scale.isBlank()&&"axisLine"!==e||this["_"+e](t,n,r,a)}),this)}},_axisLine:function(t,e,i,n){var a=t.getModel("axisLine.lineStyle"),r=new lB.Circle({shape:{cx:e.cx,cy:e.cy,r:n[dB(e)]},style:a.getLineStyle(),z2:1,silent:!0});r.style.fill=null,this.group.add(r)},_axisTick:function(t,e,i,n){var a=t.getModel("axisTick"),r=(a.get("inside")?-1:1)*a.get("length"),o=n[dB(e)],s=sB.map(i,(function(t){return new lB.Line({shape:cB(e,[o,o+r],t)})}));this.group.add(lB.mergePath(s,{style:sB.defaults(a.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_axisLabel:function(t,e,i,n){for(var a=t.axis,r=t.get("data"),o=t.getModel("axisLabel"),s=t.getFormattedLabels(),l=o.get("margin"),h=a.getLabelsCoords(),u=0;u<i.length;u++){var c=n[dB(e)],d=e.coordToPoint([c+l,h[u]]),p=e.cx,f=e.cy,g=Math.abs(d[0]-p)/c<.3?"center":d[0]>p?"left":"right",m=Math.abs(d[1]-f)/c<.3?"middle":d[1]>f?"top":"bottom";r&&r[u]&&r[u].textStyle&&(o=new hB(r[u].textStyle,o,o.ecModel));var v=new lB.Text({silent:!0});this.group.add(v),lB.setTextStyle(v.style,o,{x:d[0],y:d[1],textFill:o.getTextColor()||t.get("axisLine.lineStyle.color"),text:s[u],textAlign:g,textVerticalAlign:m})}},_splitLine:function(t,e,i,n){var a=t.getModel("splitLine").getModel("lineStyle"),r=a.get("color"),o=0;r=r instanceof Array?r:[r];for(var s=[],l=0;l<i.length;l++){var h=o++%r.length;s[h]=s[h]||[],s[h].push(new lB.Line({shape:cB(e,n,i[l])}))}for(l=0;l<s.length;l++)this.group.add(lB.mergePath(s[l],{style:sB.defaults({stroke:r[l%r.length]},a.getLineStyle()),silent:!0,z:t.get("z")}))},_splitArea:function(t,e,i,n){var a=t.getModel("splitArea").getModel("areaStyle"),r=a.get("color"),o=0;r=r instanceof Array?r:[r];for(var s=[],l=Math.PI/180,h=-i[0]*l,u=Math.min(n[0],n[1]),c=Math.max(n[0],n[1]),d=t.get("clockwise"),p=1;p<i.length;p++){var f=o++%r.length;s[f]=s[f]||[],s[f].push(new lB.Sector({shape:{cx:e.cx,cy:e.cy,r0:u,r:c,startAngle:h,endAngle:-i[p]*l,clockwise:d},silent:!0})),h=-i[p]*l}for(p=0;p<s.length;p++)this.group.add(lB.mergePath(s[p],{style:sB.defaults({fill:r[p%r.length]},a.getAreaStyle()),silent:!0}))}});var pB=b,fB=Vr,gB=yy,mB=["axisLine","axisTickLabel","axisName"],vB=["splitLine","splitArea"];Oy.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),t.get("show")){var i=t.axis,n=i.polar,a=n.getAngleAxis(),r=i.getTicksCoords(),o=a.getExtent()[0],s=i.getExtent(),l=function(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}}(n,t,o),h=new gB(t,l);pB.each(mB,h.add,h),this.group.add(h.getGroup()),pB.each(vB,(function(e){t.get(e+".show")&&!i.scale.isBlank()&&this["_"+e](t,n,o,s,r)}),this)}},_splitLine:function(t,e,i,n,a){var r=t.getModel("splitLine").getModel("lineStyle"),o=r.get("color"),s=0;o=o instanceof Array?o:[o];for(var l=[],h=0;h<a.length;h++){var u=s++%o.length;l[u]=l[u]||[],l[u].push(new fB.Circle({shape:{cx:e.cx,cy:e.cy,r:a[h]},silent:!0}))}for(h=0;h<l.length;h++)this.group.add(fB.mergePath(l[h],{style:pB.defaults({stroke:o[h%o.length],fill:null},r.getLineStyle()),silent:!0}))},_splitArea:function(t,e,i,n,a){var r=t.getModel("splitArea").getModel("areaStyle"),o=r.get("color"),s=0;o=o instanceof Array?o:[o];for(var l=[],h=a[0],u=1;u<a.length;u++){var c=s++%o.length;l[c]=l[c]||[],l[c].push(new fB.Sector({shape:{cx:e.cx,cy:e.cy,r0:h,r:a[u],startAngle:0,endAngle:2*Math.PI},silent:!0})),h=a[u]}for(u=0;u<l.length;u++)this.group.add(fB.mergePath(l[u],{style:pB.defaults({fill:o[u%o.length]},r.getAreaStyle()),silent:!0}))}});var yB=cr,xB=Vr,_B=yE,bB=mt,wB=yy,SB=Oy,MB=vE.extend({makeElOption:function(t,e,i,n,a){var r=i.axis;"angle"===r.dim&&(this.animationThreshold=Math.PI/18);var o,s=r.polar,l=s.getOtherAxis(r).getExtent();o=r["dataTo"+yB.capitalFirst(r.dim)](e);var h=n.get("type");if(h&&"none"!==h){var u=_B.buildElStyle(n),c=IB[h](r,s,o,l,u);c.style=u,t.graphicKey=c.type,t.pointer=c}var d=function(t,e,i,n,a){var r=e.axis,o=r.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,h,u,c=n.getRadiusAxis().getExtent();if("radius"===r.dim){var d=bB.create();bB.rotate(d,d,s),bB.translate(d,d,[n.cx,n.cy]),l=xB.applyTransform([o,-a],d);var p=e.getModel("axisLabel").get("rotate")||0,f=wB.innerTextLayout(s,p*Math.PI/180,-1);h=f.textAlign,u=f.textVerticalAlign}else{var g=c[1];l=n.coordToPoint([g+a,o]);var m=n.cx,v=n.cy;h=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",u=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:h,verticalAlign:u}}(e,i,0,s,n.get("label.margin"));_B.buildLabelElOption(t,i,n,a,d)}});var IB={line:function(t,e,i,n,a){return"angle"===t.dim?{type:"Line",shape:_B.makeLineShape(e.coordToPoint([n[0],i]),e.coordToPoint([n[1],i]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:i}}},shadow:function(t,e,i,n,a){var r=t.getBandWidth(),o=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:_B.makeSectorShape(e.cx,e.cy,n[0],n[1],(-i-r/2)*o,(r/2-i)*o)}:{type:"Sector",shape:_B.makeSectorShape(e.cx,e.cy,i-r/2,i+r/2,0,2*Math.PI)}}};SB.registerAxisPointerClass("PolarAxisPointer",MB);var AB=m,TB=b,CB=zV;AB.registerLayout(TB.curry(CB,"bar")),AB.extendComponentView({type:"polar"});var LB=b,DB=ur,PB=Zu,kB=ru,OB=Dx,zB=jb,EB=PB.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){PB.prototype.init.apply(this,arguments),DB.defaultEmphasis(t.label,["show"])},optionUpdated:function(){var t=this.option,e=this;t.regions=zB.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=LB.reduce(t.regions||[],(function(t,i){return i.name&&t.set(i.name,new kB(i,e)),t}),LB.createHashMap()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:.75,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{normal:{show:!1,color:"#000"},emphasis:{show:!0,color:"rgb(100,0,0)"}},itemStyle:{normal:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new kB(null,this,this.ecModel)},getFormattedLabel:function(t,e){var i=this.getRegionModel(t).get("label."+e+".formatter"),n={name:t};return"function"==typeof i?(n.status=e,i(n)):"string"==typeof i?i.replace("{a}",null!=t?t:""):void 0},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}});LB.mixin(EB,OB);var RB=Dw;m.extendComponentView({type:"geo",init:function(t,e){var i=new RB(e,!0);this._mapDraw=i,this.group.add(i.group)},render:function(t,e,i,n){if(!n||"geoToggleSelect"!==n.type||n.from!==this.uid){var a=this._mapDraw;t.get("show")?a.draw(t,e,i,this,n):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}});var NB=m,VB=b;function BB(t,e){e.update="updateView",NB.registerAction(e,(function(e,i){var n={};return i.eachComponent({mainType:"geo",query:e},(function(i){i[t](e.name);var a=i.coordinateSystem;VB.each(a.regions,(function(t){n[t.name]=i.isSelected(t.name)||!1}))})),{selected:n,name:e.name}}))}BB("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),BB("select",{type:"geoSelect",event:"geoselected"}),BB("unSelect",{type:"geoUnSelect",event:"geounselected"});var GB=b,WB=["rect","polygon","keep","clear"];var HB=function(t,e){var i=t&&t.brush;if(GB.isArray(i)||(i=i?[i]:[]),i.length){var n=[];GB.each(i,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))}));var a=t&&t.toolbox;GB.isArray(a)&&(a=a[0]),a||(a={feature:{}},t.toolbox=[a]);var r,o,s=a.feature||(a.feature={}),l=s.brush||(s.brush={}),h=l.type||(l.type=[]);h.push.apply(h,n),r=h,o={},GB.each(r,(function(t){o[t]=1})),r.length=0,GB.each(o,(function(t,e){r.push(e)})),e&&!h.length&&h.push.apply(h,WB)}},FB={},ZB=b,UB=cI,jB=ZB.each;function qB(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}FB.createVisualMappings=function(t,e,i){var n={};return jB(e,(function(e){var a,r=n[e]=((a=function(){}).prototype.__hidden=a.prototype,new a);jB(t[e],(function(t,n){if(UB.isValidType(n)){var a={type:n,visual:t};i&&i(a,e),r[n]=new UB(a),"opacity"===n&&((a=ZB.clone(a)).type="colorAlpha",r.__hidden.__alphaForOpacity=new UB(a))}}))})),n},FB.replaceVisualOption=function(t,e,i){var n;ZB.each(i,(function(t){e.hasOwnProperty(t)&&qB(e[t])&&(n=!0)})),n&&ZB.each(i,(function(i){e.hasOwnProperty(i)&&qB(e[i])?t[i]=ZB.clone(e[i]):delete t[i]}))},FB.applyVisual=function(t,e,i,n,a,r){var o,s={};function l(t){return i.getItemVisual(o,t)}function h(t,e){i.setItemVisual(o,t,e)}function u(t,u){o=null==r?t:u;var c=i.getRawDataItem(o);if(!c||!1!==c.visualMap)for(var d=n.call(a,t),p=e[d],f=s[d],g=0,m=f.length;g<m;g++){var v=f[g];p[v]&&p[v].applyVisual(t,l,h)}}ZB.each(t,(function(t){var i=UB.prepareVisualTypes(e[t]);s[t]=i})),null==r?i.each(u,!0):i.each([r],u,!0)};var XB=mg,YB=Je,$B={lineX:KB(0),lineY:KB(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])&&XB.contain(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,r=t.y,o=t.width,s=t.height,l=n[0];return!!(XB.contain(n,a,r)||XB.contain(n,a+o,r)||XB.contain(n,a,r+s)||XB.contain(n,a+o,r+s)||YB.create(t).contain(l[0],l[1])||QB(a,r,a+o,r,n)||QB(a,r,a,r+s,n)||QB(a+o,r,a+o,r+s,n)||QB(a,r+s,a+o,r+s,n))||void 0}}};function KB(t){var e=["x","y"],i=["width","height"];return{point:function(e,i,n){if(e){var a=n.range;return JB(e[t],a)}},rect:function(n,a,r){if(n){var o=r.range,s=[n[e[t]],n[e[t]]+n[i[t]]];return s[1]<s[0]&&s.reverse(),JB(s[0],o)||JB(s[1],o)||JB(o[0],s)||JB(o[1],s)}}}}function JB(t,e){return e[0]<=t&&t<=e[1]}function QB(t,e,i,n,a){for(var r=0,o=a[a.length-1];r<a.length;r++){var s=a[r];if(tG(t,e,i,n,s[0],s[1],o[0],o[1]))return!0;o=s}}function tG(t,e,i,n,a,r,o,s){var l,h=eG(i-t,a-o,n-e,r-s);if((l=h)<=1e-6&&l>=-1e-6)return!1;var u=eG(a-t,a-o,r-e,r-s)/h;if(u<0||u>1)return!1;var c=eG(i-t,a-t,n-e,r-e)/h;return!(c<0||c>1)}function eG(t,e,i,n){return t*n-e*i}var iG=$B,nG=b,aG=Vr,rG=ur,oG=rD,sG=nG.each,lG=nG.indexOf,hG=nG.curry,uG=["dataToPoint","pointToData"],cG=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function dG(t,e,i){var n=this._targetInfoList=[],a={},r=gG(e,t);sG(mG,(function(t,e){(!i||!i.include||lG(i.include,e)>=0)&&t(r,n,a)}))}var pG=dG.prototype;function fG(t){return t[0]>t[1]&&t.reverse(),t}function gG(t,e){return rG.parseFinder(t,e,{includeMainTypes:cG})}pG.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,(function(t,e,i){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var n=xG[t.brushType](0,i,e);t.__rangeOffset={offset:bG[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}}))},pG.matchOutputRanges=function(t,e,i){sG(t,(function(t){var n=this.findTargetInfo(t,e);n&&!0!==n&&nG.each(n.coordSyses,(function(n){var a=xG[t.brushType](1,n,t.range);i(t,a.values,n,e)}))}),this)},pG.setInputRanges=function(t,e){sG(t,(function(t){var i,n,a,r,o,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=xG[t.brushType](0,s.coordSys,t.coordRange),h=t.__rangeOffset;t.range=h?bG[t.brushType](l.values,h.offset,(i=l.xyMinMax,n=h.xyMinMax,a=SG(i),r=SG(n),o=[a[0]/r[0],a[1]/r[1]],isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o)):l.values}}),this)},pG.makePanelOpts=function(t,e){return nG.map(this._targetInfoList,(function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:e&&e(i),clipPath:oG.makeRectPanelClipPath(n),isTargetByCursor:oG.makeRectIsTargetByCursor(n,t,i.coordSysModel),getLinearBrushOtherExtent:oG.makeLinearBrushOtherExtent(n)}}))},pG.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return!0===n||n&&lG(n.coordSyses,e.coordinateSystem)>=0},pG.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=gG(e,t),a=0;a<i.length;a++){var r=i[a],o=t.panelId;if(o){if(r.panelId===o)return r}else for(a=0;a<vG.length;a++)if(vG[a](n,r))return r}return!0};var mG={grid:function(t,e){var i=t.xAxisModels,n=t.yAxisModels,a=t.gridModels,r=nG.createHashMap(),o={},s={};(i||n||a)&&(sG(i,(function(t){var e=t.axis.grid.model;r.set(e.id,e),o[e.id]=!0})),sG(n,(function(t){var e=t.axis.grid.model;r.set(e.id,e),s[e.id]=!0})),sG(a,(function(t){r.set(t.id,t),o[t.id]=!0,s[t.id]=!0})),r.each((function(t){var a=t.coordinateSystem,r=[];sG(a.getCartesians(),(function(t,e){(lG(i,t.getAxis("x").model)>=0||lG(n,t.getAxis("y").model)>=0)&&r.push(t)})),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:r[0],coordSyses:r,getPanelRect:yG.grid,xAxisDeclared:o[t.id],yAxisDeclared:s[t.id]})})))},geo:function(t,e){sG(t.geoModels,(function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:yG.geo})}))}},vG=[function(t,e){var i=t.xAxisModel,n=t.yAxisModel,a=t.gridModel;return!a&&i&&(a=i.axis.grid.model),!a&&n&&(a=n.axis.grid.model),a&&a===e.gridModel},function(t,e){var i=t.geoModel;return i&&i===e.geoModel}],yG={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(aG.getTransform(t)),e}},xG={lineX:hG(_G,0),lineY:hG(_G,1),rect:function(t,e,i){var n=e[uG[t]]([i[0][0],i[1][0]]),a=e[uG[t]]([i[0][1],i[1][1]]),r=[fG([n[0],a[0]]),fG([n[1],a[1]])];return{values:r,xyMinMax:r}},polygon:function(t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]];return{values:nG.map(i,(function(i){var a=e[uG[t]](i);return n[0][0]=Math.min(n[0][0],a[0]),n[1][0]=Math.min(n[1][0],a[1]),n[0][1]=Math.max(n[0][1],a[0]),n[1][1]=Math.max(n[1][1],a[1]),a})),xyMinMax:n}}};function _G(t,e,i,n){var a=i.getAxis(["x","y"][t]),r=fG(nG.map([0,1],(function(t){return e?a.coordToData(a.toLocalCoord(n[t])):a.toGlobalCoord(a.dataToCoord(n[t]))}))),o=[];return o[t]=r,o[1-t]=[NaN,NaN],{values:r,xyMinMax:o}}var bG={lineX:hG(wG,0),lineY:hG(wG,1),rect:function(t,e,i){return[[t[0][0]-i[0]*e[0][0],t[0][1]-i[0]*e[0][1]],[t[1][0]-i[1]*e[1][0],t[1][1]-i[1]*e[1][1]]]},polygon:function(t,e,i){return nG.map(t,(function(t,n){return[t[0]-i[0]*e[n][0],t[1]-i[1]*e[n][1]]}))}};function wG(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function SG(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var MG=dG,IG=m,AG=b,TG=Je,CG=FB,LG=iG,DG=Ed,PG=MG,kG=["inBrush","outOfBrush"],OG="__ecInBrushSelectEvent",zG=IG.PRIORITY.VISUAL.BRUSH;function EG(t,e){if(!t.isDisposed()){var i=t.getZr();i[OG]=!0,t.dispatchAction({type:"brushSelect",batch:e}),i[OG]=!1}}function RG(t,e,i,n){for(var a=0,r=e.length;a<r;a++){var o=e[a];if(t[o.brushType](n,i,o.selectors,o))return!0}}function NG(t){var e=t.brushSelector;if(AG.isString(e)){var i=[];return AG.each(LG,(function(t,n){i[n]=function(i,n,a,r){var o=n.getItemLayout(i);return t[e](o,a,r)}})),i}if(AG.isFunction(e)){var n={};return AG.each(LG,(function(t,i){n[i]=e})),n}return e}IG.registerLayout(zG,(function(t,e,i){t.eachComponent({mainType:"brush"},(function(e){i&&"takeGlobalCursor"===i.type&&e.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1}),(e.brushTargetManager=new PG(e.option,t)).setInputRanges(e.areas,t)}))})),IG.registerVisual(zG,(function(t,e,i){var n,a,r=[];t.eachComponent({mainType:"brush"},(function(e,i){var o={brushId:e.id,brushIndex:i,brushName:e.name,areas:AG.clone(e.areas),selected:[]};r.push(o);var s=e.option,l=s.brushLink,h=[],u=[],c=[],d=0;i||(n=s.throttleType,a=s.throttleDelay);var p=AG.map(e.areas,(function(t){return function(t){var e=t.selectors={};return AG.each(LG[t.brushType],(function(i,n){e[n]=function(n){return i(n,e,t)}})),t}(AG.defaults({boundingRect:VG[t.brushType](t)},t))})),f=CG.createVisualMappings(e.option,kG,(function(t){t.mappingMethod="fixed"}));function g(t){return"all"===l||h[t]}function m(t){return!!t.length}AG.isArray(l)&&AG.each(l,(function(t){h[t]=1})),t.eachSeries((function(i,n){var a=c[n]=[];"parallel"===i.subType?function(t,e){var i=t.coordinateSystem;d|=i.hasAxisBrushed(),g(e)&&i.eachActiveState(t.getData(),(function(t,e){"active"===t&&(u[e]=1)}))}(i,n):function(i,n,a){var r=NG(i);if(!r||function(t,e){var i=t.option.seriesIndex;return null!=i&&"all"!==i&&(AG.isArray(i)?AG.indexOf(i,e)<0:e!==i)}(e,n))return;if(AG.each(p,(function(n){r[n.brushType]&&e.brushTargetManager.controlSeries(n,i,t)&&a.push(n),d|=m(a)})),g(n)&&m(a)){var o=i.getData();o.each((function(t){RG(r,a,o,t)&&(u[t]=1)}))}}(i,n,a)})),t.eachSeries((function(t,e){var i={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};o.selected.push(i);var n=NG(t),a=c[e],r=t.getData(),s=g(e)?function(t){return u[t]?(i.dataIndex.push(r.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return RG(n,a,r,t)?(i.dataIndex.push(r.getRawIndex(t)),"inBrush"):"outOfBrush"};(g(e)?d:m(a))&&CG.applyVisual(kG,f,r,s)}))})),function(t,e,i,n,a){if(!a)return;var r=t.getZr();if(r[OG])return;r.__ecBrushSelect||(r.__ecBrushSelect=EG);DG.createOrUpdate(r,"__ecBrushSelect",i,e)(t,n)}(e,n,a,r,i)}));var VG={lineX:AG.noop,lineY:AG.noop,rect:function(t){return BG(t.range)},polygon:function(t){for(var e,i=t.range,n=0,a=i.length;n<a;n++){e=e||[[1/0,-1/0],[1/0,-1/0]];var r=i[n];r[0]<e[0][0]&&(e[0][0]=r[0]),r[0]>e[0][1]&&(e[0][1]=r[0]),r[1]<e[1][0]&&(e[1][0]=r[1]),r[1]>e[1][1]&&(e[1][1]=r[1])}return e&&BG(e)}};function BG(t){return new TG(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var GG=b,WG=FB,HG=ru,FG=["#ddd"];function ZG(t,e){return GG.merge({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new HG(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}m.extendComponentModel({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var i=this.option;!e&&WG.replaceVisualOption(i,t,["inBrush","outOfBrush"]),i.inBrush=i.inBrush||{},i.outOfBrush=i.outOfBrush||{color:FG}},setAreas:function(t){t&&(this.areas=GG.map(t,(function(t){return ZG(this.option,t)}),this))},setBrushOption:function(t){this.brushOption=ZG(this.option,t),this.brushType=this.brushOption.brushType}});var UG=b,jG=aD;function qG(t,e,i,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}m.extendComponentView({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new jG(e.getZr())).on("brush",UG.bind(this._onBrush,this)).mount()},render:function(t){return this.model=t,qG.apply(this,arguments)},updateView:qG,updateLayout:qG,updateVisual:qG,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var i=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:i,areas:UG.clone(t),$from:i})}});var XG=m;XG.registerAction({type:"brush",event:"brush",update:"updateView"},(function(t,e){e.eachComponent({mainType:"brush",query:t},(function(e){e.setAreas(t.areas)}))})),XG.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},(function(){}));var YG={},$G={};YG.register=function(t,e){$G[t]=e},YG.get=function(t){return $G[t]};var KG={toolbox:{brush:{title:{rect:"",polygon:"",lineX:"",lineY:"",keep:"",clear:""}},dataView:{title:"",lang:["","",""]},dataZoom:{title:{zoom:"",back:""}},magicType:{title:{line:"线",bar:"",stack:"",tiled:""}},restore:{title:""},saveAsImage:{title:"",lang:[""]}}},JG=b,QG=YG,tW=KG.toolbox.brush;function eW(t,e,i){this.model=t,this.ecModel=e,this.api=i,this._brushType,this._brushMode}eW.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:JG.clone(tW.title)};var iW=eW.prototype;iW.render=iW.updateView=iW.updateLayout=function(t,e,i){var n,a,r;e.eachComponent({mainType:"brush"},(function(t){n=t.brushType,a=t.brushOption.brushMode||"single",r|=t.areas.length})),this._brushType=n,this._brushMode=a,JG.each(t.get("type",!0),(function(e){t.setIconStatus(e,("keep"===e?"multiple"===a:"clear"===e?r:e===n)?"emphasis":"normal")}))},iW.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return JG.each(t.get("type",!0),(function(t){e[t]&&(i[t]=e[t])})),i},iW.onclick=function(t,e,i){var n=this._brushType,a=this._brushMode;"clear"===i?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n!==i&&i,brushMode:"keep"===i?"multiple"===a?"single":"multiple":a}})},QG.register("brush",eW),m.registerPreprocessor(HB);var nW=b,aW=wu,rW=dr,oW=_c;function sW(t,e,i){this._model=t}function lW(t,e,i,n){var a=i.calendarModel,r=i.seriesModel,o=a?a.coordinateSystem:r?r.coordinateSystem:null;return o===this?o[t](n):null}sW.prototype={constructor:sW,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"}]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){var e=(t=rW.parseDate(t)).getFullYear(),i=t.getMonth()+1;i=i<10?"0"+i:i;var n=t.getDate();n=n<10?"0"+n:n;var a=t.getDay();return{y:e,m:i,d:n,day:a=Math.abs((a+7-this.getFirstDayOfWeek())%7),time:t.getTime(),formatedDate:e+"-"+i+"-"+n,date:t}},getNextNDay:function(t,e){return 0===(e=e||0)||(t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t)},update:function(t,e){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle.normal").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var i=this._rangeInfo.weeks||1,n=["width","height"],a=this._model.get("cellSize").slice(),r=this._model.getBoxLayoutParams(),o="horizontal"===this._orient?[i,7]:[7,i];nW.each([0,1],(function(t){h(a,t)&&(r[n[t]]=a[t]*o[t])}));var s={width:e.getWidth(),height:e.getHeight()},l=this._rect=aW.getLayoutRect(r,s);function h(t,e){return null!=t[e]&&"auto"!==t[e]}nW.each([0,1],(function(t){h(a,t)||(a[t]=l[n[t]]/o[t])})),this._sw=a[0],this._sh=a[1]},dataToPoint:function(t,e){nW.isArray(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getDateInfo(t),n=this._rangeInfo,a=i.formatedDate;if(e&&!(i.time>=n.start.time&&i.time<=n.end.time))return[NaN,NaN];var r=i.day,o=this._getRangeInfo([n.start.time,a]).nthWeek;return"vertical"===this._orient?[this._rect.x+r*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]:[this._rect.x+o*this._sw+this._sw/2,this._rect.y+r*this._sh+this._sh/2]},pointToData:function(t){var e=this.pointToDate(t);return e&&e.time},dataToRect:function(t,e){var i=this.dataToPoint(t,e);return{contentShape:{x:i[0]-(this._sw-this._lineWidth)/2,y:i[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:i,tl:[i[0]-this._sw/2,i[1]-this._sh/2],tr:[i[0]+this._sw/2,i[1]-this._sh/2],br:[i[0]+this._sw/2,i[1]+this._sh/2],bl:[i[0]-this._sw/2,i[1]+this._sh/2]}},pointToDate:function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,i=Math.floor((t[1]-this._rect.y)/this._sh)+1,n=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(i,e-1,n):this._getDateByWeeksAndDay(e,i-1,n)},convertToPixel:nW.curry(lW,"dataToPoint"),convertFromPixel:nW.curry(lW,"pointToData"),_initRangeOption:function(){var t=this._model.get("range"),e=t;if(nW.isArray(e)&&1===e.length&&(e=e[0]),/^\d{4}$/.test(e)&&(t=[e+"-01-01",e+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(e)){var i=this.getDateInfo(e),n=i.date;n.setMonth(n.getMonth()+1);var a=this.getNextNDay(n,-1);t=[i.formatedDate,a.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(e)&&(t=[e,e]);var r=this._getRangeInfo(t);return r.start.time>r.end.time&&t.reverse(),t},_getRangeInfo:function(t){var e;(t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var i=Math.floor(t[1].time/864e5)-Math.floor(t[0].time/864e5)+1,n=new Date(t[0].time),a=n.getDate(),r=t[1].date.getDate();if(n.setDate(a+i-1),n.getDate()!==r)for(var o=n.getTime()-t[1].time>0?1:-1;n.getDate()!==r&&(n.getTime()-t[1].time)*o>0;)i-=o,n.setDate(a+i-1);var s=Math.floor((i+t[0].day+6)/7),l=e?1-s:s-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:s,nthWeek:l,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,i){var n=this._getRangeInfo(i);if(t>n.weeks||0===t&&e<n.fweek||t===n.weeks&&e>n.lweek)return!1;var a=7*(t-1)-n.fweek+e,r=new Date(n.start.time);return r.setDate(n.start.d+a),this.getDateInfo(r)}},sW.dimensions=sW.prototype.dimensions,sW.getDimensionsInfo=sW.prototype.getDimensionsInfo,sW.create=function(t,e){var i=[];return t.eachComponent("calendar",(function(t){var e=new sW(t);i.push(e),t.coordinateSystem=e})),t.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])})),i},oW.register("calendar",sW);var hW=b,uW=Zu,cW=wu,dW=cW.getLayoutParams,pW=cW.sizeCalculable,fW=cW.mergeLayoutParam,gW=uW.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{normal:{color:"#fff",borderWidth:1,borderColor:"#ccc"}},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,i,n){var a=dW(t);gW.superApply(this,"init",arguments),mW(t,a)},mergeOption:function(t,e){gW.superApply(this,"mergeOption",arguments),mW(this.option,t)}});function mW(t,e){var i=t.cellSize;hW.isArray(i)?1===i.length&&(i[1]=i[0]):i=t.cellSize=[i,i];var n=hW.map([0,1],(function(t){return pW(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]}));fW(t,e,{type:"box",ignoreSize:n})}var vW=b,yW=Vr,xW=cr,_W=dr,bW={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["","","","","","","","","","","",""]},wW={EN:["S","M","T","W","T","F","S"],CN:["","","","","","",""]};m.extendComponentView({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,i){var n=this.group;n.removeAll();var a=t.coordinateSystem,r=a.getRangeInfo(),o=a.getOrient();this._renderDayRect(t,r,n),this._renderLines(t,r,o,n),this._renderYearText(t,r,o,n),this._renderMonthText(t,o,n),this._renderWeekText(t,r,o,n)},_renderDayRect:function(t,e,i){for(var n=t.coordinateSystem,a=t.getModel("itemStyle.normal").getItemStyle(),r=n.getCellWidth(),o=n.getCellHeight(),s=e.start.time;s<=e.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,h=new yW.Rect({shape:{x:l[0],y:l[1],width:r,height:o},cursor:"default",style:a});i.add(h)}},_renderLines:function(t,e,i,n){var a=this,r=t.coordinateSystem,o=t.getModel("splitLine.lineStyle").getLineStyle(),s=t.get("splitLine.show"),l=o.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=e.start,u=0;h.time<=e.end.time;u++){d(h.formatedDate),0===u&&(h=r.getDateInfo(e.start.y+"-"+e.start.m));var c=h.date;c.setMonth(c.getMonth()+1),h=r.getDateInfo(c)}function d(e){a._firstDayOfMonth.push(r.getDateInfo(e)),a._firstDayPoints.push(r.dataToRect([e],!1).tl);var l=a._getLinePointsOfOneWeek(t,e,i);a._tlpoints.push(l[0]),a._blpoints.push(l[l.length-1]),s&&a._drawSplitline(l,o,n)}d(r.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,l,i),o,n),s&&this._drawSplitline(a._getEdgesPoints(a._blpoints,l,i),o,n)},_getEdgesPoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],a="horizontal"===i?0:1;return n[0][a]=n[0][a]-e/2,n[1][a]=n[1][a]+e/2,n},_drawSplitline:function(t,e,i){var n=new yW.Polyline({z2:20,shape:{points:t},style:e});i.add(n)},_getLinePointsOfOneWeek:function(t,e,i){var n=t.coordinateSystem;e=n.getDateInfo(e);for(var a=[],r=0;r<7;r++){var o=n.getNextNDay(e.time,r),s=n.dataToRect([o.time],!1);a[2*o.day]=s.tl,a[2*o.day+1]=s["horizontal"===i?"bl":"tr"]}return a},_formatterLabel:function(t,e){return"string"==typeof t&&t?xW.formatTplSimple(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,i,n,a){e=e.slice();var r=["center","bottom"];"bottom"===n?(e[1]+=a,r=["center","top"]):"left"===n?e[0]-=a:"right"===n?(e[0]+=a,r=["center","top"]):e[1]-=a;var o=0;return"left"!==n&&"right"!==n||(o=Math.PI/2),{rotation:o,position:e,style:{textAlign:r[0],textVerticalAlign:r[1]}}},_renderYearText:function(t,e,i,n){var a=t.getModel("yearLabel");if(a.get("show")){var r=a.get("margin"),o=a.get("position");o||(o="horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,h=(s[0][1]+s[1][1])/2,u="horizontal"===i?0:1,c={top:[l,s[u][1]],bottom:[l,s[1-u][1]],left:[s[1-u][0],h],right:[s[u][0],h]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var p=a.get("formatter"),f={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(p,f),m=new yW.Text({z2:30});yW.setTextStyle(m.style,a,{text:g}),m.attr(this._yearTextPositionControl(m,c[o],i,o,r)),n.add(m)}},_monthTextPositionControl:function(t,e,i,n,a){var r="left",o="top",s=t[0],l=t[1];return"horizontal"===i?(l+=a,e&&(r="center"),"start"===n&&(o="bottom")):(s+=a,e&&(o="middle"),"start"===n&&(r="right")),{x:s,y:l,textAlign:r,textVerticalAlign:o}},_renderMonthText:function(t,e,i){var n=t.getModel("monthLabel");if(n.get("show")){var a=n.get("nameMap"),r=n.get("margin"),o=n.get("position"),s=n.get("align"),l=[this._tlpoints,this._blpoints];vW.isString(a)&&(a=bW[a.toUpperCase()]||[]);var h="start"===o?0:1,u="horizontal"===e?0:1;r="start"===o?-r:r;for(var c="center"===s,d=0;d<l[h].length-1;d++){var p=l[h][d].slice(),f=this._firstDayOfMonth[d];if(c){var g=this._firstDayPoints[d];p[u]=(g[u]+l[0][d+1][u])/2}var m=n.get("formatter"),v=a[+f.m-1],y={yyyy:f.y,yy:(f.y+"").slice(2),MM:f.m,M:+f.m,nameMap:v},x=this._formatterLabel(m,y),_=new yW.Text({z2:30});vW.extend(yW.setTextStyle(_.style,n,{text:x}),this._monthTextPositionControl(p,c,e,o,r)),i.add(_)}}},_weekTextPositionControl:function(t,e,i,n,a){var r="center",o="middle",s=t[0],l=t[1],h="start"===i;return"horizontal"===e?(s=s+n+(h?1:-1)*a[0]/2,r=h?"right":"left"):(l=l+n+(h?1:-1)*a[1]/2,o=h?"bottom":"top"),{x:s,y:l,textAlign:r,textVerticalAlign:o}},_renderWeekText:function(t,e,i,n){var a=t.getModel("dayLabel");if(a.get("show")){var r=t.coordinateSystem,o=a.get("position"),s=a.get("nameMap"),l=a.get("margin"),h=r.getFirstDayOfWeek();vW.isString(s)&&(s=wW[s.toUpperCase()]||[]);var u=r.getNextNDay(e.end.time,7-e.lweek).time,c=[r.getCellWidth(),r.getCellHeight()];l=_W.parsePercent(l,c["horizontal"===i?0:1]),"start"===o&&(u=r.getNextNDay(e.start.time,-(7+e.fweek)).time,l=-l);for(var d=0;d<7;d++){var p,f=r.getNextNDay(u,d),g=r.dataToRect([f.time],!1).center;p=Math.abs((d+h)%7);var m=new yW.Text({z2:30});vW.extend(yW.setTextStyle(m.style,a,{text:s[p]}),this._weekTextPositionControl(g,i,o,l,c)),n.add(m)}}}});var SW=m,MW=Vr,IW=wu.getLayoutRect;SW.extendComponentModel({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"}}}),SW.extendComponentView({type:"title",render:function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,a=t.getModel("textStyle"),r=t.getModel("subtextStyle"),o=t.get("textAlign"),s=t.get("textBaseline"),l=new MW.Text({style:MW.setTextStyle({},a,{text:t.get("text"),textFill:a.getTextColor()},{disableBox:!0}),z2:10}),h=l.getBoundingRect(),u=t.get("subtext"),c=new MW.Text({style:MW.setTextStyle({},r,{text:u,textFill:r.getTextColor(),y:h.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),p=t.get("sublink");l.silent=!d,c.silent=!p,d&&l.on("click",(function(){window.open(d,"_"+t.get("target"))})),p&&c.on("click",(function(){window.open(p,"_"+t.get("subtarget"))})),n.add(l),u&&n.add(c);var f=n.getBoundingRect(),g=t.getBoxLayoutParams();g.width=f.width,g.height=f.height;var m=IW(g,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));o||("middle"===(o=t.get("left")||t.get("right"))&&(o="center"),"right"===o?m.x+=m.width:"center"===o&&(m.x+=m.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?m.y+=m.height:"middle"===s&&(m.y+=m.height/2),s=s||"top"),n.attr("position",[m.x,m.y]);var v={textAlign:o,textVerticalAlign:s};l.setStyle(v),c.setStyle(v),f=n.getBoundingRect();var y=m.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var _=new MW.Rect({shape:{x:f.x-y[3],y:f.y-y[0],width:f.width+y[1]+y[3],height:f.height+y[0]+y[2],r:t.get("borderRadius")},style:x,silent:!0});MW.subPixelOptimizeRect(_),n.add(_)}}}),Zu.registerSubTypeDefaulter("dataZoom",(function(){return"slider"}));var AW={},TW=b,CW=cr,LW=["cartesian2d","polar","singleAxis"];function DW(t,e){t=t.slice();var i=TW.map(t,CW.capitalFirst);e=(e||[]).slice();var n=TW.map(e,CW.capitalFirst);return function(a,r){TW.each(t,(function(t,o){for(var s={name:t,capital:i[o]},l=0;l<e.length;l++)s[e[l]]=t+n[l];a.call(r,s)}))}}var PW=DW(["x","y","z","radius","angle","single"],["axisIndex","axis","index","id"]);AW.isCoordSupported=function(t){return TW.indexOf(LW,t)>=0},AW.createNameEach=DW,AW.eachAxisDim=PW,AW.createLinkedNodesFinder=function(t,e,i){return function(a){var r,o={nodes:[],records:{}};if(e((function(t){o.records[t.name]={}})),!a)return o;n(a,o);do{r=!1,t(s)}while(r);function s(t){!function(t,e){return TW.indexOf(e.nodes,t)>=0}(t,o)&&function(t,n){var a=!1;return e((function(e){TW.each(i(t,e)||[],(function(t){n.records[e.name][t]&&(a=!0)}))})),a}(t,o)&&(n(t,o),r=!0)}return o};function n(t,n){n.nodes.push(t),e((function(e){TW.each(i(t,e)||[],(function(t){n.records[e.name][t]=!0}))}))}};var kW=b,OW=dr,zW=AW,EW=kW.each,RW=OW.asc,NW=function(t,e,i,n){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=n,this._dataZoomModel=i};function VW(t,e){var i=t.getAxisModel(),n=t._percentWindow,a=t._valueWindow;if(n){var r=OW.getPixelPrecision(a,[0,500]);r=Math.min(r,20);var o=e||0===n[0]&&100===n[1];i.setRange(o?null:+a[0].toFixed(r),o?null:+a[1].toFixed(r))}}NW.prototype={constructor:NW,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var t=[],e=this.ecModel;return e.eachSeries((function(i){if(zW.isCoordSupported(i.get("coordinateSystem"))){var n=this._dimName,a=e.queryComponents({mainType:n+"Axis",index:i.get(n+"AxisIndex"),id:i.get(n+"AxisId")})[0];this._axisIndex===(a&&a.componentIndex)&&t.push(i)}}),this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,i,n=this._dimName,a=this.ecModel,r=this.getAxisModel();return"x"===n||"y"===n?(e="gridIndex",t="x"===n?"y":"x"):(e="polarIndex",t="angle"===n?"radius":"angle"),a.eachComponent(t+"Axis",(function(t){(t.get(e)||0)===(r.get(e)||0)&&(i=t)})),i},getMinMaxSpan:function(){return kW.clone(this._minMaxSpan)},calculateDataWindow:function(t){var e=this._dataExtent,i=this.getAxisModel().axis.scale,n=this._dataZoomModel.getRangePropMode(),a=[0,100],r=[t.start,t.end],o=[];return EW(["startValue","endValue"],(function(e){o.push(null!=t[e]?i.parse(t[e]):null)})),EW([0,1],(function(t){var s=o[t],l=r[t];"percent"===n[t]?(null==l&&(l=a[t]),s=i.parse(OW.linearMap(l,a,e,!0))):l=OW.linearMap(s,e,a,!0),o[t]=s,r[t]=l})),{valueWindow:RW(o),percentWindow:RW(r)}},reset:function(t){if(t===this._dataZoomModel){this._dataExtent=function(t,e,i){var n=[1/0,-1/0];EW(i,(function(t){var i=t.getData();i&&EW(t.coordDimToDataDim(e),(function(t){var e=i.getDataExtent(t);e[0]<n[0]&&(n[0]=e[0]),e[1]>n[1]&&(n[1]=e[1])}))})),n[1]<n[0]&&(n=[NaN,NaN]);return function(t,e){var i=t.getAxisModel(),n=i.getMin(!0),a="category"===i.get("type"),r=a&&(i.get("data")||[]).length;null!=n&&"dataMin"!==n&&"function"!=typeof n?e[0]=n:a&&(e[0]=r>0?0:NaN);var o=i.getMax(!0);null!=o&&"dataMax"!==o&&"function"!=typeof o?e[1]=o:a&&(e[1]=r>0?r-1:NaN);i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0))}(t,n),n}(this,this._dimName,this.getTargetSeriesModels());var e=this.calculateDataWindow(t.option);this._valueWindow=e.valueWindow,this._percentWindow=e.percentWindow,function(t){var e=t._minMaxSpan={},i=t._dataZoomModel;EW(["min","max"],(function(n){e[n+"Span"]=i.get(n+"Span");var a=i.get(n+"ValueSpan");if(null!=a&&(e[n+"ValueSpan"]=a,null!=(a=t.getAxisModel().axis.scale.parse(a)))){var r=t._dataExtent;e[n+"Span"]=OW.linearMap(r[0]+a,r,[0,100],!0)}}))}(this),VW(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,VW(this,!0))},filterData:function(t){if(t===this._dataZoomModel){var e=this._dimName,i=this.getTargetSeriesModels(),n=t.get("filterMode"),a=this._valueWindow;if("none"!==n){var r=this.getOtherAxisModel();t.get("$fromToolbox")&&r&&"category"===r.get("type")&&(n="empty"),EW(i,(function(t){var i=t.getData(),r=t.coordDimToDataDim(e);"weakFilter"===n?i&&i.filterSelf((function(t){for(var e,n,o,s=0;s<r.length;s++){var l=i.get(r[s],t),h=!isNaN(l),u=l<a[0],c=l>a[1];if(h&&!u&&!c)return!0;h&&(o=!0),u&&(e=!0),c&&(n=!0)}return o&&e&&n})):i&&EW(r,(function(e){"empty"===n?t.setData(i.map(e,(function(t){return o(t)?t:NaN}))):i.filterSelf(e,o)}))}))}}function o(t){return t>=a[0]&&t<=a[1]}}};var BW=m,GW=b,WW=_,HW=ur,FW=AW,ZW=NW,UW=GW.each,jW=FW.eachAxisDim,qW=BW.extendComponentModel({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=XW(t);this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=XW(t);GW.merge(this.option,t,!0),this.doInit(e)},doInit:function(t){var e=this.option;WW.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),YW(this,t),UW([["start","startValue"],["end","endValue"]],(function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=null)}),this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis((function(e,i,n,a){var r=this.dependentModels[e.axis][i],o=r.__dzAxisProxy||(r.__dzAxisProxy=new ZW(e.name,i,this,a));t[e.name+"_"+i]=o}),this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();jW((function(e){var i=e.axisIndex;t[i]=HW.normalizeToArray(t[i])}),this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;jW((function(i){null!=t[i.axisIndex]&&(e=!0)}),this);var i=t.orient;return null==i&&e?"orient":e?void 0:(null==i&&(t.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),i=this.option,n=this.dependentModels;if(t){var a="vertical"===e?"y":"x";n[a+"Axis"].length?(i[a+"AxisIndex"]=[0],t=!1):UW(n.singleAxis,(function(n){t&&n.get("orient",!0)===e&&(i.singleAxisIndex=[n.componentIndex],t=!1)}))}t&&jW((function(e){if(t){var n=[],a=this.dependentModels[e.axis];if(a.length&&!n.length)for(var r=0,o=a.length;r<o;r++)"category"===a[r].get("type")&&n.push(r);i[e.axisIndex]=n,n.length&&(t=!1)}}),this),t&&this.ecModel.eachSeries((function(t){this._isSeriesHasAllAxesTypeOf(t,"value")&&jW((function(e){var n=i[e.axisIndex],a=t.get(e.axisIndex),r=t.get(e.axisId);a=t.ecModel.queryComponents({mainType:e.axis,index:a,id:r})[0].componentIndex,GW.indexOf(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 jW((function(n){var a=t.get(n.axisIndex),r=this.dependentModels[n.axis][a];r&&r.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 jW((function(e){if(null==t){var i=this.get(e.axisIndex);i.length&&(t=this.dependentModels[e.axis][i[0]])}}),this),t},eachTargetAxis:function(t,e){var i=this.ecModel;jW((function(n){UW(this.get(n.axisIndex),(function(a){t.call(e,n,a,this,i)}),this)}),this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var i=this.getAxisProxy(t,e);return i&&i.getAxisModel()},setRawRange:function(t,e){var i=this.option;UW([["start","startValue"],["end","endValue"]],(function(e){null==t[e[0]]&&null==t[e[1]]||(i[e[0]]=t[e[0]],i[e[1]]=t[e[1]])}),this),!e&&YW(this,t)},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var i in e)if(e.hasOwnProperty(i)&&e[i].hostedBy(this))return e[i];for(var i in e)if(e.hasOwnProperty(i)&&!e[i].hostedBy(this))return e[i]},getRangePropMode:function(){return this._rangePropMode.slice()}});function XW(t){var e={};return UW(["start","end","startValue","endValue","throttle"],(function(i){t.hasOwnProperty(i)&&(e[i]=t[i])})),e}function YW(t,e){var i=t._rangePropMode,n=t.get("rangeMode");UW([["start","startValue"],["end","endValue"]],(function(t,a){var r=null!=e[t[0]],o=null!=e[t[1]];r&&!o?i[a]="percent":!r&&o?i[a]="value":n?i[a]=n[a]:r&&(i[a]="percent")}))}var $W=qW,KW=Md.extend({type:"dataZoom",render:function(t,e,i,n){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetCoordInfo:function(){var t=this.dataZoomModel,e=this.ecModel,i={};return t.eachTargetAxis((function(t,n){var a=e.getComponent(t.axis,n);if(a){var r=a.getCoordSysModel();r&&function(t,e,i,n){for(var a,r=0;r<i.length;r++)if(i[r].model===t){a=i[r];break}a||i.push(a={model:t,axisModels:[],coordIndex:n});a.axisModels.push(e)}(r,a,i[r.mainType]||(i[r.mainType]=[]),r.componentIndex)}}),this),i}}),JW=KW;$W.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}});var QW=b,tH=fa,eH=Vr,iH=Ed,nH=JW,aH=dr,rH=wu,oH=RC,sH=eH.Rect,lH=aH.linearMap,hH=aH.asc,uH=QW.bind,cH=QW.each,dH=["line","bar","candlestick","scatter"],pH=nH.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,i,n){pH.superApply(this,"render",arguments),iH.createOrUpdate(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),!1!==this.dataZoomModel.get("show")?(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){pH.superApply(this,"remove",arguments),iH.clear(this,"_dispatchZoomAction")},dispose:function(){pH.superApply(this,"dispose",arguments),iH.clear(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new eH.Group;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,i=this._findCoordRect(),n={width:e.getWidth(),height:e.getHeight()},a="horizontal"===this._orient?{right:n.width-i.x-i.width,top:n.height-30-7,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},r=rH.getLayoutParams(t.option);QW.each(["right","top","width","height"],(function(t){"ph"===r[t]&&(r[t]=a[t])}));var o=rH.getLayoutRect(r,n,t.padding);this._location={x:o.x,y:o.y},this._size=[o.width,o.height],"vertical"===this._orient&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),a=n&&n.get("inverse"),r=this._displayables.barGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;r.attr("horizontal"!==i||a?"horizontal"===i&&a?{scale:o?[-1,1]:[-1,-1]}:"vertical"!==i||a?{scale:o?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:o?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:o?[1,1]:[1,-1]});var s=t.getBoundingRect([r]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,i=this._displayables.barGroup;i.add(new sH({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),i.add(new sH({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:QW.bind(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,i=t.series,n=i.getRawData(),a=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=a){var r=n.getDataExtent(a),o=.3*(r[1]-r[0]);r=[r[0]-o,r[1]+o];var s,l=[0,e[1]],h=[0,e[0]],u=[[e[0],0],[0,0]],c=[],d=h[1]/(n.count()-1),p=0,f=Math.round(n.count()/e[0]);n.each([a],(function(t,e){if(f>0&&e%f)p+=d;else{var i=null==t||isNaN(t)||""===t,n=i?0:lH(t,r,l,!0);i&&!s&&e?(u.push([u[u.length-1][0],0]),c.push([c[c.length-1][0],0])):!i&&s&&(u.push([p,0]),c.push([p,0])),u.push([p,n]),c.push([p,n]),p+=d,s=i}}));var g=this.dataZoomModel;this._displayables.barGroup.add(new eH.Polygon({shape:{points:u},style:QW.defaults({fill:g.get("dataBackgroundColor")},g.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new eH.Polyline({shape:{points:c},style:g.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var i,n=this.ecModel;return t.eachTargetAxis((function(a,r){var o=t.getAxisProxy(a.name,r).getTargetSeriesModels();QW.each(o,(function(t){if(!(i||!0!==e&&QW.indexOf(dH,t.get("type"))<0)){var o,s=n.getComponent(a.axis,r).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[a.name],h=t.coordinateSystem;null!=l&&h.getOtherAxis&&(o=h.getOtherAxis(s).inverse),i={thisAxis:s,series:t,thisDim:a.name,otherDim:l,otherAxisInverse:o}}}),this)}),this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,a=this._size,r=this.dataZoomModel;n.add(t.filler=new sH({draggable:!0,cursor:fH(this._orient),drift:uH(this._onDragMove,this,"all"),onmousemove:function(t){tH.stop(t.event)},ondragstart:uH(this._showDataInfo,this,!0),ondragend:uH(this._onDragEnd,this),onmouseover:uH(this._showDataInfo,this,!0),onmouseout:uH(this._showDataInfo,this,!1),style:{fill:r.get("fillerColor"),textPosition:"inside"}})),n.add(new sH(eH.subPixelOptimizeRect({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{stroke:r.get("dataBackgroundColor")||r.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}}))),cH([0,1],(function(t){var a=eH.createIcon(r.get("handleIcon"),{cursor:fH(this._orient),draggable:!0,drift:uH(this._onDragMove,this,t),onmousemove:function(t){tH.stop(t.event)},ondragend:uH(this._onDragEnd,this),onmouseover:uH(this._showDataInfo,this,!0),onmouseout:uH(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),o=a.getBoundingRect();this._handleHeight=aH.parsePercent(r.get("handleSize"),this._size[1]),this._handleWidth=o.width/o.height*this._handleHeight,a.setStyle(r.getModel("handleStyle").getItemStyle());var s=r.get("handleColor");null!=s&&(a.style.fill=s),n.add(e[t]=a);var l=r.textStyleModel;this.group.add(i[t]=new eH.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:l.getTextColor(),textFont:l.getFont()},z2:10}))}),this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[lH(t[0],[0,100],e,!0),lH(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,a=this._getViewExtent(),r=i.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];oH(e,n,a,i.get("zoomLock")?"all":t,null!=r.minSpan?lH(r.minSpan,o,a,!0):null,null!=r.maxSpan?lH(r.maxSpan,o,a,!0):null),this._range=hH([lH(n[0],a,o,!0),lH(n[1],a,o,!0)])},_updateView:function(t){var e=this._displayables,i=this._handleEnds,n=hH(i.slice()),a=this._size;cH([0,1],(function(t){var n=e.handles[t],r=this._handleHeight;n.attr({scale:[r/2,r/2],position:[i[t],a[1]/2-r/2]})}),this),e.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:a[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){var e=this.dataZoomModel,i=this._displayables,n=i.handleLabels,a=this._orient,r=["",""];if(e.get("showDetail")){var o=e.findRepresentativeAxisProxy();if(o){var s=o.getAxisModel().axis,l=this._range,h=t?o.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:o.getDataValueWindow();r=[this._formatLabel(h[0],s),this._formatLabel(h[1],s)]}}var u=hH(this._handleEnds.slice());function c(t){var e=eH.getTransform(i.handles[t].parent,this.group),o=eH.transformDirection(0===t?"right":"left",e),s=this._handleWidth/2+5,l=eH.applyTransform([u[t]+(0===t?-s:s),this._size[1]/2],e);n[t].setStyle({x:l[0],y:l[1],textVerticalAlign:"horizontal"===a?"middle":o,textAlign:"horizontal"===a?o:"center",text:r[t]})}c.call(this,0),c.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter"),a=i.get("labelPrecision");null!=a&&"auto"!==a||(a=e.getPixelPrecision());var r=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(a,20));return QW.isFunction(n)?n(t,r):QW.isString(n)?n.replace("{value}",r):r},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,i){this._dragging=!0;var n=this._displayables.barGroup.getLocalTransform(),a=eH.applyTransform([e,i],n,!0);this._updateInterval(t,a[0]);var r=this.dataZoomModel.get("realtime");this._updateView(!r),r&&r&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,i=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,a=(n[0]+n[1])/2;this._updateInterval("all",i[0]-a),this._updateView(),this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(cH(this.getTargetCoordInfo(),(function(e){if(!t&&e.length){var i=e[0].model.coordinateSystem;t=i.getRect&&i.getRect()}})),!t){var e=this.api.getWidth(),i=this.api.getHeight();t={x:.2*e,y:.2*i,width:.6*e,height:.6*i}}return t}});function fH(t){return"vertical"===t?"ns-resize":"ew-resize"}$W.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,preventDefaultMouseMove:!0}});var gH={},mH=b,vH=yw,yH=Ed,xH=mH.curry,_H="\0_ec_dataZoom_roams";function bH(t){var e=t.getZr();return e[_H]||(e[_H]={})}function wH(t){mH.each(t,(function(e,i){e.count||(e.controller.dispose(),delete t[i])}))}function SH(t,e,i,n,a,r,o){IH(t,(function(s){return s.panGetRange(t.controller,e,i,n,a,r,o)}))}function MH(t,e,i,n){IH(t,(function(a){return a.zoomGetRange(t.controller,e,i,n)}))}function IH(t,e){var i=[];mH.each(t.dataZoomInfos,(function(t){var n=e(t);!t.disabled&&n&&i.push({dataZoomId:t.dataZoomId,start:n[0],end:n[1]})})),t.dispatchAction(i)}function AH(t,e){t.dispatchAction({type:"dataZoom",batch:e})}gH.register=function(t,e){var i=bH(t),n=e.dataZoomId,a=e.coordId;mH.each(i,(function(t,i){var r=t.dataZoomInfos;r[n]&&mH.indexOf(e.allCoordIds,a)<0&&(delete r[n],t.count--)})),wH(i);var r=i[a];r||((r=i[a]={coordId:a,dataZoomInfos:{},count:0}).controller=function(t,e){var i=new vH(t.getZr());return i.on("pan",xH(SH,e)),i.on("zoom",xH(MH,e)),i}(t,r),r.dispatchAction=mH.curry(AH,t)),!r.dataZoomInfos[n]&&r.count++,r.dataZoomInfos[n]=e;var o,s,l,h,u=(o=r.dataZoomInfos,l={},h={true:2,move:1,false:0,undefined:-1},mH.each(o,(function(t){var e=!t.disabled&&(!t.zoomLock||"move");h[e]>h[s]&&(s=e),mH.extend(l,t.roamControllerOpt)})),{controlType:s,opt:l});r.controller.enable(u.controlType,u.opt),r.controller.setPointerChecker(e.containsPoint),yH.createOrUpdate(r,"dispatchAction",e.throttleRate,"fixRate")},gH.unregister=function(t,e){var i=bH(t);mH.each(i,(function(t){t.controller.dispose();var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)})),wH(i)},gH.shouldRecordRange=function(t,e){if(t&&"dataZoom"===t.type&&t.batch)for(var i=0,n=t.batch.length;i<n;i++)if(t.batch[i].dataZoomId===e)return!1;return!0},gH.generateCoordId=function(t){return t.type+"\0_"+t.id};var TH=b,CH=JW,LH=RC,DH=gH,PH=TH.bind,kH=CH.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(t,e,i,n){kH.superApply(this,"render",arguments),DH.shouldRecordRange(n,t.id)&&(this._range=t.getPercentRange()),TH.each(this.getTargetCoordInfo(),(function(e,n){var a=TH.map(e,(function(t){return DH.generateCoordId(t.model)}));TH.each(e,(function(e){var r=e.model,o=t.option;DH.register(i,{coordId:DH.generateCoordId(r),allCoordIds:a,containsPoint:function(t,e,i){return r.coordinateSystem.containPoint([e,i])},dataZoomId:t.id,throttleRate:t.get("throttle",!0),panGetRange:PH(this._onPan,this,e,n),zoomGetRange:PH(this._onZoom,this,e,n),zoomLock:o.zoomLock,disabled:o.disabled,roamControllerOpt:{zoomOnMouseWheel:o.zoomOnMouseWheel,moveOnMouseMove:o.moveOnMouseMove,preventDefaultMouseMove:o.preventDefaultMouseMove}})}),this)}),this)},dispose:function(){DH.unregister(this.api,this.dataZoomModel.id),kH.superApply(this,"dispose",arguments),this._range=null},_onPan:function(t,e,i,n,a,r,o,s,l){var h=this._range.slice(),u=t.axisModels[0];if(u){var c=OH[e]([r,o],[s,l],u,i,t),d=c.signal*(h[1]-h[0])*c.pixel/c.pixelLength;return LH(d,h,[0,100],"all"),this._range=h}},_onZoom:function(t,e,i,n,a,r){var o=this._range.slice(),s=t.axisModels[0];if(s){var l=OH[e](null,[a,r],s,i,t),h=(l.signal>0?l.pixelStart+l.pixelLength-l.pixel:l.pixel-l.pixelStart)/l.pixelLength*(o[1]-o[0])+o[0];n=Math.max(1/n,0),o[0]=(o[0]-h)*n+h,o[1]=(o[1]-h)*n+h;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return LH(0,o,[0,100],0,u.minSpan,u.maxSpan),this._range=o}}}),OH={grid:function(t,e,i,n,a){var r=i.axis,o={},s=a.model.coordinateSystem.getRect();return t=t||[0,0],"x"===r.dim?(o.pixel=e[0]-t[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=r.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=r.inverse?-1:1),o},polar:function(t,e,i,n,a){var r=i.axis,o={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),h=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===i.mainType?(o.pixel=e[0]-t[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=r.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=h[1]-h[0],o.pixelStart=h[0],o.signal=r.inverse?-1:1),o},singleAxis:function(t,e,i,n,a){var r=i.axis,o=a.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===r.orient?(s.pixel=e[0]-t[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=r.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=r.inverse?-1:1),s}};function zH(t,e,i){i.getAxisProxy(t.name,e).reset(i)}function EH(t,e,i){i.getAxisProxy(t.name,e).filterData(i)}m.registerProcessor((function(t,e){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis(zH),t.eachTargetAxis(EH)})),t.eachComponent("dataZoom",(function(t){var e=t.findRepresentativeAxisProxy(),i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setRawRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]},!0)}))}));var RH=b,NH=AW;m.registerAction("dataZoom",(function(t,e){var i=NH.createLinkedNodesFinder(RH.bind(e.eachComponent,e,"dataZoom"),NH.eachAxisDim,(function(t,e){return t.get(e.axisIndex)})),n=[];e.eachComponent({mainType:"dataZoom",query:t},(function(t,e){n.push.apply(n,i(t).nodes)})),RH.each(n,(function(e,i){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}));var VH=b,BH=VH.each;function GH(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}var WH=function(t){var e=t&&t.visualMap;VH.isArray(e)||(e=e?[e]:[]),BH(e,(function(t){if(t){GH(t,"splitList")&&!GH(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&VH.isArray(e)&&BH(e,(function(t){VH.isObject(t)&&(GH(t,"start")&&!GH(t,"min")&&(t.min=t.start),GH(t,"end")&&!GH(t,"max")&&(t.max=t.end))}))}}))};Zu.registerSubTypeDefaulter("visualMap",(function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"}));var HH=m,FH=b,ZH=FB,UH=cI;function jH(t,e,i,n){for(var a=e.targetVisuals[n],r=UH.prepareVisualTypes(a),o={color:t.getData().getVisual("color")},s=0,l=r.length;s<l;s++){var h=r[s],u=a["opacity"===h?"__alphaForOpacity":h];u&&u.applyVisual(i,c,d)}return o.color;function c(t){return o[t]}function d(t,e){o[t]=e}}HH.registerVisual(HH.PRIORITY.VISUAL.COMPONENT,(function(t){t.eachComponent("visualMap",(function(t){!function(t,e){t.eachTargetSeries((function(e){var i=e.getData();ZH.applyVisual(t.stateList,t.targetVisuals,i,t.getValueState,t,t.getDataDimension(i))}))}(t)})),function(t){t.eachSeries((function(e){var i=e.getData(),n=[];t.eachComponent("visualMap",(function(t){if(t.isTargetSeries(e)){var a=t.getVisualMeta(FH.bind(jH,null,e,t))||{stops:[],outerColors:[]};a.dimension=t.getDataDimension(i),n.push(a)}})),e.getData().setVisual("visualMeta",n)}))}(t)}));var qH=b,XH={get:function(t,e,i){var n=qH.clone((YH[t]||{})[e]);return i&&qH.isArray(n)?n[n.length-1]:n}},YH={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]}},$H=XH,KH=m,JH=b,QH=_,tF=$H,eF=cI,iF=FB,nF=ur,aF=dr,rF=eF.mapVisual,oF=eF.eachVisual,sF=JH.isArray,lF=JH.each,hF=aF.asc,uF=aF.linearMap,cF=JH.noop,dF=["#f6efa6","#d88273","#bf444c"],pF=KH.extendComponentModel({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;QH.canvasSupported||(i.realtime=!1),!e&&iF.replaceVisualOption(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=JH.bind(t,this),this.controllerVisuals=iF.createVisualMappings(this.option.controller,e,t),this.targetVisuals=iF.createVisualMappings(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=nF.normalizeToArray(t),e},eachTargetSeries:function(t,e){JH.each(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){var n,a,r=this.option,o=r.precision,s=this.dataBound,l=r.formatter;return i=i||["<",">"],JH.isArray(t)&&(t=t.slice(),n=!0),a=e?t:n?[h(t[0]),h(t[1])]:h(t),JH.isString(l)?l.replace("{value}",n?a[0]:a).replace("{value2}",n?a[1]:a):JH.isFunction(l)?n?l(t[0],t[1]):l(t):n?t[0]===s[0]?i[0]+" "+a[1]:t[1]===s[1]?i[1]+" "+a[0]:a[0]+" - "+a[1]:a;function h(t){return t===s[0]?"min":t===s[1]?"max":(+t).toFixed(Math.min(o,20))}},resetExtent:function(){var t=this.option,e=hF([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension;return null!=e?e:t.dimensions.length-1},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var t=this.option,e={inRange:t.inRange,outOfRange:t.outOfRange},i=t.target||(t.target={}),n=t.controller||(t.controller={});JH.merge(i,e),JH.merge(n,e);var a=this.isCategory();function r(e){sF(t.color)&&!e.inRange&&(e.inRange={color:t.color.slice().reverse()}),e.inRange=e.inRange||{color:dF},lF(this.stateList,(function(t){var i=e[t];if(JH.isString(i)){var n=tF.get(i,"active",a);n?(e[t]={},e[t][i]=n):delete e[t]}}),this)}r.call(this,i),r.call(this,n),function(t,e,i){var n=t[e],r=t[i];n&&!r&&(r=t[i]={},lF(n,(function(t,e){if(eF.isValidType(e)){var i=tF.get(e,"inactive",a);null!=i&&(r[e]=i,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}})))}.call(this,i,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,i=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,n=this.get("inactiveColor");lF(this.stateList,(function(r){var o=this.itemSize,s=t[r];s||(s=t[r]={color:a?n:[n]}),null==s.symbol&&(s.symbol=e&&JH.clone(e)||(a?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=i&&JH.clone(i)||(a?o[0]:[o[0],o[0]])),s.symbol=rF(s.symbol,(function(t){return"none"===t||"square"===t?"roundRect":t}));var l=s.symbolSize;if(null!=l){var h=-1/0;oF(l,(function(t){t>h&&(h=t)})),s.symbolSize=rF(l,(function(t){return uF(t,[0,h],[0,o[0]],!0)}))}}),this)}.call(this,n)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:cF,getValueState:cF,getVisualMeta:cF}),fF=pF,gF=b,mF=fF,vF=dr,yF=[20,140],xF=mF.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(t,e){xF.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},resetItemSize:function(){xF.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=yF[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=yF[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):gF.isArray(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){mF.prototype.completeVisualOption.apply(this,arguments),gF.each(this.stateList,(function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)}),this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=vF.asc((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]<t[0]&&(e[0]=t[0]),e[1]<t[0]&&(e[1]=t[0]),e},getValueState:function(t){var e=this.option.range,i=this.getExtent();return(e[0]<=i[0]||e[0]<=t)&&(e[1]>=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries((function(i){var n=[],a=i.getData();a.each(this.getDataDimension(a),(function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)}),!0,this),e.push({seriesId:i.id,dataIndex:n})}),this),e},getVisualMeta:function(t){var e=_F(this,"outOfRange",this.getExtent()),i=_F(this,"inRange",this.option.range.slice()),n=[];function a(e,i){n.push({value:e,color:t(e,i)})}for(var r=0,o=0,s=i.length,l=e.length;o<l&&(!i.length||e[o]<=i[0]);o++)e[o]<i[r]&&a(e[o],"outOfRange");for(var h=1;r<s;r++,h=0)h&&n.length&&a(i[r],"outOfRange"),a(i[r],"inRange");for(h=1;o<l;o++)(!i.length||i[i.length-1]<e[o])&&(h&&(n.length&&a(n[n.length-1].value,"outOfRange"),h=0),a(e[o],"outOfRange"));var u=n.length;return{stops:n,outerColors:[u?n[0].color:"transparent",u?n[u-1].color:"transparent"]}}});function _F(t,e,i){if(i[0]===i[1])return i.slice();for(var n=(i[1]-i[0])/200,a=i[0],r=[],o=0;o<=200&&a<i[1];o++)r.push(a),a+=n;return r.push(i[1]),r}var bF=b,wF=Vr,SF=cr,MF=wu,IF=cI,AF=m.extendComponentView({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(t,e){this.ecModel=t,this.api=e,this.visualMapModel},render:function(t,e,i,n){this.visualMapModel=t,!1!==t.get("show")?this.doRender.apply(this,arguments):this.group.removeAll()},renderBackground:function(t){var e=this.visualMapModel,i=SF.normalizeCssArray(e.get("padding")||0),n=t.getBoundingRect();t.add(new wF.Rect({z2:-1,silent:!0,shape:{x:n.x-i[3],y:n.y-i[0],width:n.width+i[3]+i[1],height:n.height+i[0]+i[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},getControllerVisual:function(t,e,i){var n=(i=i||{}).forceState,a=this.visualMapModel,r={};if("symbol"===e&&(r.symbol=a.get("itemSymbol")),"color"===e){var o=a.get("contentColor");r.color=o}function s(t){return r[t]}function l(t,e){r[t]=e}var h=a.controllerVisuals[n||a.getValueState(t)],u=IF.prepareVisualTypes(h);return bF.each(u,(function(n){var a=h[n];i.convertOpacityToAlpha&&"opacity"===n&&(n="colorAlpha",a=h.__alphaForOpacity),IF.dependsOn(n,e)&&a&&a.applyVisual(t,s,l)})),r[e]},positionGroup:function(t){var e=this.visualMapModel,i=this.api;MF.positionElement(t,e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},doRender:bF.noop}),TF={},CF=b,LF=wu.getLayoutRect;TF.getItemAlign=function(t,e,i){var n=t.option,a=n.align;if(null!=a&&"auto"!==a)return a;for(var r={width:e.getWidth(),height:e.getHeight()},o="horizontal"===n.orient?1:0,s=[["left","right","width"],["top","bottom","height"]],l=s[o],h=[0,null,10],u={},c=0;c<3;c++)u[s[1-o][c]]=h[c],u[l[c]]=2===c?i[0]:n[l[c]];var d=[["x","width",3],["y","height",0]][o],p=LF(u,r,n.padding);return l[(p.margin[d[2]]||0)+p[d[0]]+.5*p[d[1]]<.5*r[d[1]]?0:1]},TF.convertDataIndex=function(t){return CF.each(t||[],(function(e){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null)})),t};var DF=b,PF=Gl,kF=fa,OF=AF,zF=Vr,EF=RC,RF=TF,NF=ur,VF=dr.linearMap,BF=DF.each,GF=Math.min,WF=Math.max,HF=OF.extend({type:"visualMap.continuous",init:function(){HF.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(t,e,i,n){n&&"selectDataRange"===n.type&&n.from===this.uid||this._buildView()},_buildView:function(){this.group.removeAll();var t=this.visualMapModel,e=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(e);var i=t.get("text");this._renderEndsText(e,i,0),this._renderEndsText(e,i,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},_renderEndsText:function(t,e,i){if(e){var n=e[1-i];n=null!=n?n+"":"";var a=this.visualMapModel,r=a.get("textGap"),o=a.itemSize,s=this._shapes.barGroup,l=this._applyTransform([o[0]/2,0===i?-r:o[1]+r],s),h=this._applyTransform(0===i?"bottom":"top",s),u=this._orient,c=this.visualMapModel.textStyleModel;this.group.add(new zF.Text({style:{x:l[0],y:l[1],textVerticalAlign:"horizontal"===u?"middle":h,textAlign:"horizontal"===u?h:"center",text:n,textFont:c.getFont(),textFill:c.getTextColor()}}))}},_renderBar:function(t){var e=this.visualMapModel,i=this._shapes,n=e.itemSize,a=this._orient,r=this._useHandle,o=RF.getItemAlign(e,this.api,n),s=i.barGroup=this._createBarGroup(o);s.add(i.outOfRange=FF()),s.add(i.inRange=FF(null,r?UF(this._orient):null,DF.bind(this._dragHandle,this,"all",!1),DF.bind(this._dragHandle,this,"all",!0)));var l=e.textStyleModel.getTextRect(""),h=WF(l.width,l.height);r&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(s,0,n,h,a,o),this._createHandle(s,1,n,h,a,o)),this._createIndicator(s,n,h,a),t.add(s)},_createHandle:function(t,e,i,n,a){var r=DF.bind(this._dragHandle,this,e,!1),o=DF.bind(this._dragHandle,this,e,!0),s=FF(function(t,e){return 0===t?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}(e,n),UF(this._orient),r,o);s.position[0]=i[0],t.add(s);var l=this.visualMapModel.textStyleModel,h=new zF.Text({draggable:!0,drift:r,onmousemove:function(t){kF.stop(t.event)},ondragend:o,style:{x:0,y:0,text:"",textFont:l.getFont(),textFill:l.getTextColor()}});this.group.add(h);var u=["horizontal"===a?n/2:1.5*n,"horizontal"===a?0===e?-1.5*n:1.5*n:0===e?-n/2:n/2],c=this._shapes;c.handleThumbs[e]=s,c.handleLabelPoints[e]=u,c.handleLabels[e]=h},_createIndicator:function(t,e,i,n){var a=FF([[0,0]],"move");a.position[0]=e[0],a.attr({invisible:!0,silent:!0}),t.add(a);var r=this.visualMapModel.textStyleModel,o=new zF.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:r.getFont(),textFill:r.getTextColor()}});this.group.add(o);var s=["horizontal"===n?i/2:9,0],l=this._shapes;l.indicator=a,l.indicatorLabel=o,l.indicatorLabelPoint=s},_dragHandle:function(t,e,i,n){if(this._useHandle){if(this._dragging=!e,!e){var a=this._applyTransform([i,n],this._shapes.barGroup,!0);this._updateInterval(t,a[1]),this._updateView()}e===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),e?!this._hovering&&this._clearHoverLinkToSeries():ZF(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},_resetInterval:function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),i=t.getExtent(),n=[0,t.itemSize[1]];this._handleEnds=[VF(e[0],i,n,!0),VF(e[1],i,n,!0)]},_updateInterval:function(t,e){e=e||0;var i=this.visualMapModel,n=this._handleEnds,a=[0,i.itemSize[1]];EF(e,n,a,t,0);var r=i.getExtent();this._dataInterval=[VF(n[0],a,r,!0),VF(n[1],a,r,!0)]},_updateView:function(t){var e=this.visualMapModel,i=e.getExtent(),n=this._shapes,a=[0,e.itemSize[1]],r=t?a:this._handleEnds,o=this._createBarVisual(this._dataInterval,i,r,"inRange"),s=this._createBarVisual(i,i,a,"outOfRange");n.inRange.setStyle({fill:o.barColor,opacity:o.opacity}).setShape("points",o.barPoints),n.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(r,o)},_createBarVisual:function(t,e,i,n){var a={forceState:n,convertOpacityToAlpha:!0},r=this._makeColorGradient(t,a),o=[this.getControllerVisual(t[0],"symbolSize",a),this.getControllerVisual(t[1],"symbolSize",a)],s=this._createBarPoints(i,o);return{barColor:new PF(0,0,0,1,r),barPoints:s,handlesColor:[r[0].color,r[r.length-1].color]}},_makeColorGradient:function(t,e){var i=[],n=(t[1]-t[0])/100;i.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var a=1;a<100;a++){var r=t[0]+n*a;if(r>t[1])break;i.push({color:this.getControllerVisual(r,"color",e),offset:a/100})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new zF.Group("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(t,e){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,a=i.handleThumbs,r=i.handleLabels;BF([0,1],(function(o){var s=a[o];s.setStyle("fill",e.handlesColor[o]),s.position[1]=t[o];var l=zF.applyTransform(i.handleLabelPoints[o],zF.getTransform(s,this.group));r[o].setStyle({x:l[0],y:l[1],text:n.formatValueText(this._dataInterval[o]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===o?"bottom":"top":"left",i.barGroup)})}),this)}},_showIndicator:function(t,e,i,n){var a=this.visualMapModel,r=a.getExtent(),o=a.itemSize,s=[0,o[1]],l=VF(t,r,s,!0),h=this._shapes,u=h.indicator;if(u){u.position[1]=l,u.attr("invisible",!1),u.setShape("points",function(t,e,i,n){return t?[[0,-GF(e,WF(i,0))],[6,0],[0,GF(e,WF(n-i,0))]]:[[0,0],[5,-5],[5,5]]}(!!i,n,l,o[1]));var c=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0});u.setStyle("fill",c);var d=zF.applyTransform(h.indicatorLabelPoint,zF.getTransform(u,this.group)),p=h.indicatorLabel;p.attr("invisible",!1);var f=this._applyTransform("left",h.barGroup),g=this._orient;p.setStyle({text:(i||"")+a.formatValueText(e),textVerticalAlign:"horizontal"===g?f:"middle",textAlign:"horizontal"===g?"center":f,x:d[0],y:d[1]})}},_enableHoverLinkToSeries:function(){var t=this;this._shapes.barGroup.on("mousemove",(function(e){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,n=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);n[1]=GF(WF(0,n[1]),i[1]),t._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[0])}})).on("mouseout",(function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()}))},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var a=[0,n[1]],r=i.getExtent();t=GF(WF(a[0],t),a[1]);var o=function(t,e,i){var n=6,a=t.get("hoverLinkDataSize");a&&(n=VF(a,e,i,!0)/2);return n}(i,r,a),s=[t-o,t+o],l=VF(t,a,r,!0),h=[VF(s[0],a,r,!0),VF(s[1],a,r,!0)];s[0]<a[0]&&(h[0]=-1/0),s[1]>a[1]&&(h[1]=1/0),e&&(h[0]===-1/0?this._showIndicator(l,h[1],"< ",o):h[1]===1/0?this._showIndicator(l,h[0],"> ",o):this._showIndicator(l,l," ",o));var u=this._hoverLinkDataIndices,c=[];(e||ZF(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(h));var d=NF.compressBatches(u,c);this._dispatchHighDown("downplay",RF.convertDataIndex(d[0])),this._dispatchHighDown("highlight",RF.convertDataIndex(d[1]))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,i=this.visualMapModel;if(e&&null!=e.dataIndex){var n=this.ecModel.getSeriesByIndex(e.seriesIndex);if(i.isTargetSeries(n)){var a=n.getData(e.dataType),r=a.getDimension(i.getDataDimension(a)),o=a.get(r,e.dataIndex,!0);isNaN(o)||this._showIndicator(o,o)}}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",RF.convertDataIndex(t)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,i,n){var a=zF.getTransform(e,n?null:this.group);return zF[DF.isArray(t)?"applyTransform":"transformDirection"](t,a,i)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});function FF(t,e,i,n){return new zF.Polygon({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){kF.stop(t.event)},ondragend:n})}function ZF(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function UF(t){return"vertical"===t?"ns-resize":"ew-resize"}m.registerAction({type:"selectDataRange",event:"dataRangeSelected",update:"update"},(function(t,e){e.eachComponent({mainType:"visualMap",query:t},(function(e){e.setSelected(t.selected)}))})),m.registerPreprocessor(WH);var jF=b,qF=fF,XF=cI,YF=$H,$F=dr.reformIntervals,KF=qF.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){KF.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var i=this._mode=this._determineMode();JF[this._mode].call(this),this._resetSelected(t,e);var n=this.option.categories;this.resetVisual((function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=jF.clone(n)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=jF.map(this._pieceList,(function(t){t=jF.clone(t);return"inRange"!==e&&(t.visual=null),t})))}))},completeVisualOption:function(){var t=this.option,e={},i=XF.listVisualTypes(),n=this.isCategory();function a(t,e,i){return t&&t[e]&&(jF.isObject(t[e])?t[e].hasOwnProperty(i):t[e]===i)}jF.each(t.pieces,(function(t){jF.each(i,(function(i){t.hasOwnProperty(i)&&(e[i]=1)}))})),jF.each(e,(function(e,i){var r=0;jF.each(this.stateList,(function(e){r|=a(t,e,i)||a(t.target,e,i)}),this),!r&&jF.each(this.stateList,(function(e){(t[e]||(t[e]={}))[i]=YF.get(i,"inRange"===e?"active":"inactive",n)}))}),this),qF.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i=this.option,n=this._pieceList,a=(e?i:t).selected||{};if(i.selected=a,jF.each(n,(function(t,e){var i=this.getSelectedMapKey(t);a.hasOwnProperty(i)||(a[i]=!0)}),this),"single"===i.selectedMode){var r=!1;jF.each(n,(function(t,e){var i=this.getSelectedMapKey(t);a[i]&&(r?a[i]=!1:r=!0)}),this)}},getSelectedMapKey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=jF.clone(t)},getValueState:function(t){var e=XF.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries((function(i){var n=[],a=i.getData();a.each(this.getDataDimension(a),(function(e,i){XF.findPieceIndex(e,this._pieceList)===t&&n.push(i)}),!0,this),e.push({seriesId:i.id,dataIndex:n})}),this),e},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return e},getVisualMeta:function(t){if(!this.isCategory()){var e=[],i=[],n=this,a=this._pieceList.slice();if(a.length){var r=a[0].interval[0];r!==-1/0&&a.unshift({interval:[-1/0,r]}),(r=a[a.length-1].interval[1])!==1/0&&a.push({interval:[r,1/0]})}else a.push({interval:[-1/0,1/0]});var o=-1/0;return jF.each(a,(function(t){var e=t.interval;e&&(e[0]>o&&s([o,e[0]],"outOfRange"),s(e.slice()),o=e[1])}),this),{stops:e,outerColors:i}}function s(a,r){var o=n.getRepresentValue({interval:a});r||(r=n.getValueState(o));var s=t(o,r);a[0]===-1/0?i[0]=s:a[1]===1/0?i[1]=s:e.push({value:a[0],color:s},{value:a[1],color:s})}}}),JF={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),a=t.splitNumber;a=Math.max(parseInt(a,10),1),t.splitNumber=a;for(var r=(n[1]-n[0])/a;+r.toFixed(i)!==r&&i<5;)i++;t.precision=i,r=+r.toFixed(i);var o=0;t.minOpen&&e.push({index:o++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=o+a;o<l;s+=r){var h=o===a-1?n[1]:s+r;e.push({index:o++,interval:[s,h],close:[1,1]})}t.maxOpen&&e.push({index:o++,interval:[n[1],1/0],close:[0,0]}),$F(e),jF.each(e,(function(t){t.text=this.formatValueText(t.interval)}),this)},categories:function(){var t=this.option;jF.each(t.categories,(function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})}),this),QF(t,this._pieceList)},pieces:function(){var t=this.option,e=this._pieceList;jF.each(t.pieces,(function(t,i){jF.isObject(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 r=n.interval=[],o=n.close=[0,0],s=[1,0,1],l=[-1/0,1/0],h=[],u=0;u<2;u++){for(var c=[["gte","gt","min"],["lte","lt","max"]][u],d=0;d<3&&null==r[u];d++)r[u]=t[c[d]],o[u]=s[d],h[u]=2===d;null==r[u]&&(r[u]=l[u])}h[0]&&r[1]===1/0&&(o[0]=0),h[1]&&r[0]===-1/0&&(o[1]=0),r[0]===r[1]&&o[0]&&o[1]&&(n.value=r[0])}n.visual=XF.retrieveVisuals(t),e.push(n)}),this),QF(t,e),$F(e),jF.each(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)}};function QF(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}var tZ=b,eZ=AF,iZ=Vr,nZ=Hf.createSymbol,aZ=wu,rZ=TF;eZ.extend({type:"visualMap.piecewise",doRender:function(){var t=this.group;t.removeAll();var e=this.visualMapModel,i=e.get("textGap"),n=e.textStyleModel,a=n.getFont(),r=n.getTextColor(),o=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),h=l.endsText,u=tZ.retrieve(e.get("showLabel",!0),!h);h&&this._renderEndsText(t,h[0],s,u,o),tZ.each(l.viewPieceList,(function(n){var l=n.piece,h=new iZ.Group;h.onclick=tZ.bind(this._onItemClick,this,l),this._enableHoverLink(h,n.indexInModelPieceList);var c=e.getRepresentValue(l);if(this._createItemSymbol(h,c,[0,0,s[0],s[1]]),u){var d=this.visualMapModel.getValueState(c);h.add(new iZ.Text({style:{x:"right"===o?-i:s[0]+i,y:s[1]/2,text:l.text,textVerticalAlign:"middle",textAlign:o,textFont:a,textFill:r,opacity:"outOfRange"===d?.5:1}}))}t.add(h)}),this),h&&this._renderEndsText(t,h[1],s,u,o),aZ.box(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},_enableHoverLink:function(t,e){function i(t){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:t,batch:rZ.convertDataIndex(i.findTargetDataIndices(e))})}t.on("mouseover",tZ.bind(i,this,"highlight")).on("mouseout",tZ.bind(i,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return rZ.getItemAlign(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,a){if(e){var r=new iZ.Group,o=this.visualMapModel.textStyleModel;r.add(new iZ.Text({style:{x:n?"right"===a?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?a:"center",text:e,textFont:o.getFont(),textFill:o.getTextColor()}})),t.add(r)}},_getViewData:function(){var t=this.visualMapModel,e=tZ.map(t.getPieceList(),(function(t,e){return{piece:t,indexInModelPieceList:e}})),i=t.get("text"),n=t.get("orient"),a=t.get("inverse");return("horizontal"===n?a:!a)?e.reverse():i&&(i=i.slice().reverse()),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(nZ(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,i=e.option,n=tZ.clone(i.selected),a=e.getSelectedMapKey(t);"single"===i.selectedMode?(n[a]=!0,tZ.each(n,(function(t,e){n[e]=e===a}))):n[a]=!n[a],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:n})}}),m.registerPreprocessor(WH);var oZ=m,sZ=b,lZ=_,hZ=ur,uZ=cr,cZ=uZ.addCommas,dZ=uZ.encodeHTML;function pZ(t){hZ.defaultEmphasis(t.label,["show"])}var fZ=oZ.extendComponentModel({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i),this.mergeOption(t,i,n.createdBySelf,!0)},isAnimationEnabled:function(){if(lZ.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e,i,n){var a=this.constructor,r=this.mainType+"Model";i||e.eachSeries((function(t){var i=t.get(this.mainType),o=t[r];i&&i.data?(o?o.mergeOption(i,e,!0):(n&&pZ(i),sZ.each(i.data,(function(t){t instanceof Array?(pZ(t[0]),pZ(t[1])):pZ(t)})),o=new a(i,this,e),sZ.extend(o,{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),o.__hostSeries=t),t[r]=o):t[r]=null}),this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=sZ.isArray(i)?sZ.map(i,cZ).join(", "):cZ(i),a=e.getName(t),r=dZ(this.name);return(null!=i||a)&&(r+="<br />"),a&&(r+=dZ(a),null!=i&&(r+=" : ")),null!=i&&(r+=dZ(n)),r},getData:function(){return this._data},setData:function(t){this._data=t}});sZ.mixin(fZ,hZ.dataFormatMixin);var gZ=fZ;gZ.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{normal:{show:!0,position:"inside"},emphasis:{show:!0}},itemStyle:{normal:{borderWidth:2}}}});var mZ={},vZ=b,yZ=dr,xZ=vZ.indexOf;function _Z(t,e,i,n,a,r){var o=[],s=MZ(e,n,t),l=e.indicesOfNearest(n,s,!0)[0];o[a]=e.get(i,l,!0),o[r]=e.get(n,l,!0);var h=function(t,e,i){var n=-1;do{n=Math.max(yZ.getPrecision(t.get(e,i)),n),t=t.stackedOn}while(t);return n}(e,n,l);return(h=Math.min(h,20))>=0&&(o[r]=+o[r].toFixed(h)),o}var bZ=vZ.curry,wZ={min:bZ(_Z,"min"),max:bZ(_Z,"max"),average:bZ(_Z,"average")};function SZ(t,e,i,n){var a={};return null!=t.valueIndex||null!=t.valueDim?(a.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,a.valueAxis=i.getAxis(n.dataDimToCoordDim(a.valueDataDim)),a.baseAxis=i.getOtherAxis(a.valueAxis),a.baseDataDim=n.coordDimToDataDim(a.baseAxis.dim)[0]):(a.baseAxis=n.getBaseAxis(),a.valueAxis=i.getOtherAxis(a.baseAxis),a.baseDataDim=n.coordDimToDataDim(a.baseAxis.dim)[0],a.valueDataDim=n.coordDimToDataDim(a.valueAxis.dim)[0]),a}function MZ(t,e,i){if("average"===i){var n=0,a=0;return t.each(e,(function(t,e){isNaN(t)||(n+=t,a++)}),!0),n/a}return t.getDataExtent(e,!0)["max"===i?1:0]}mZ.dataTransform=function(t,e){var i=t.getData(),n=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!vZ.isArray(e.coord)&&n){var a=n.dimensions,r=SZ(e,i,n,t);if((e=vZ.clone(e)).type&&wZ[e.type]&&r.baseAxis&&r.valueAxis){var o=xZ(a,r.baseAxis.dim),s=xZ(a,r.valueAxis.dim);e.coord=wZ[e.type](i,r.baseDataDim,r.valueDataDim,o,s),e.value=e.coord[s]}else{for(var l=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)if(wZ[l[h]]){var u=t.coordDimToDataDim(a[h])[0];l[h]=MZ(i,u,l[h])}e.coord=l}}return e},mZ.getAxisInfo=SZ,mZ.dataFilter=function(t,e){return!(t&&t.containData&&e.coord&&!function(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}(e))||t.containData(e.coord)},mZ.dimValueGetter=function(t,e,i,n){return n<2?t.coord&&t.coord[n]:t.value},mZ.numCalculate=MZ;var IZ=b,AZ=m.extendComponentView({type:"marker",init:function(){this.markerGroupMap=IZ.createHashMap()},render:function(t,e,i){var n=this.markerGroupMap;n.each((function(t){t.__keep=!1}));var a=this.type+"Model";e.eachSeries((function(t){var n=t[a];n&&this.renderSeries(t,n,e,i)}),this),n.each((function(t){!t.__keep&&this.group.remove(t.group)}),this)},renderSeries:function(){}}),TZ=b,CZ=pm,LZ=dr,DZ=dp,PZ=mZ;function kZ(t,e,i){var n=e.coordinateSystem;t.each((function(a){var r,o=t.getItemModel(a),s=LZ.parsePercent(o.get("x"),i.getWidth()),l=LZ.parsePercent(o.get("y"),i.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)r=e.getMarkerPosition(t.getValues(t.dimensions,a));else if(n){var h=t.get(n.dimensions[0],a),u=t.get(n.dimensions[1],a);r=n.dataToPoint([h,u])}}else r=[s,l];isNaN(s)||(r[0]=s),isNaN(l)||(r[1]=l),t.setItemLayout(a,r)}))}AZ.extend({type:"markPoint",updateLayout:function(t,e,i){e.eachSeries((function(t){var e=t.markPointModel;e&&(kZ(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout(e))}),this)},renderSeries:function(t,e,i,n){var a=t.coordinateSystem,r=t.id,o=t.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,new CZ),h=function(t,e,i){var n;n=t?TZ.map(t&&t.dimensions,(function(t){var i=e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0])||{};return i.name=t,i})):[{name:"value",type:"float"}];var a=new DZ(n,i),r=TZ.map(i.get("data"),TZ.curry(PZ.dataTransform,e));t&&(r=TZ.filter(r,TZ.curry(PZ.dataFilter,t)));return a.initData(r,null,t?PZ.dimValueGetter:function(t){return t.value}),a}(a,t,e);e.setData(h),kZ(e.getData(),t,n),h.each((function(t){var i=h.getItemModel(t),n=i.getShallow("symbolSize");"function"==typeof n&&(n=n(e.getRawValue(t),e.getDataParams(t))),h.setItemVisual(t,{symbolSize:n,color:i.get("itemStyle.normal.color")||o.getVisual("color"),symbol:i.getShallow("symbol")})})),l.updateData(h),this.group.add(l.group),h.eachItemGraphicEl((function(t){t.traverse((function(t){t.dataModel=e}))})),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),m.registerPreprocessor((function(t){t.markPoint=t.markPoint||{}})),gZ.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{normal:{show:!0,position:"end"},emphasis:{show:!0}},lineStyle:{normal:{type:"dashed"},emphasis:{width:3}},animationEasing:"linear"}});var OZ=b,zZ=dp,EZ=dr,RZ=mZ,NZ=BA,VZ=function(t,e,i,n){var a=t.getData(),r=n.type;if(!OZ.isArray(n)&&("min"===r||"max"===r||"average"===r||null!=n.xAxis||null!=n.yAxis)){var o,s;if(null!=n.yAxis||null!=n.xAxis)o=null!=n.yAxis?"y":"x",e.getAxis(o),s=OZ.retrieve(n.yAxis,n.xAxis);else{var l=RZ.getAxisInfo(n,a,e,t);o=l.valueDataDim,l.valueAxis,s=RZ.numCalculate(a,o,r)}var h="x"===o?0:1,u=1-h,c=OZ.clone(n),d={};c.type=null,c.coord=[],d.coord=[],c.coord[u]=-1/0,d.coord[u]=1/0;var p=i.get("precision");p>=0&&"number"==typeof s&&(s=+s.toFixed(Math.min(p,20))),c.coord[h]=d.coord[h]=s,n=[c,d,{type:r,valueIndex:n.valueIndex,value:s}]}return(n=[RZ.dataTransform(t,n[0]),RZ.dataTransform(t,n[1]),OZ.extend({},n[2])])[2].type=n[2].type||"",OZ.merge(n[2],n[0]),OZ.merge(n[2],n[1]),n};function BZ(t){return!isNaN(t)&&!isFinite(t)}function GZ(t,e,i,n){var a=1-t,r=n.dimensions[t];return BZ(e[a])&&BZ(i[a])&&e[t]===i[t]&&n.getAxis(r).containData(e[t])}function WZ(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(GZ(1,i,n,t)||GZ(0,i,n,t)))return!0}return RZ.dataFilter(t,e[0])&&RZ.dataFilter(t,e[1])}function HZ(t,e,i,n,a){var r,o=n.coordinateSystem,s=t.getItemModel(e),l=EZ.parsePercent(s.get("x"),a.getWidth()),h=EZ.parsePercent(s.get("y"),a.getHeight());if(isNaN(l)||isNaN(h)){if(n.getMarkerPosition)r=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var u=o.dimensions,c=t.get(u[0],e),d=t.get(u[1],e);r=o.dataToPoint([c,d])}if("cartesian2d"===o.type){var p=o.getAxis("x"),f=o.getAxis("y");u=o.dimensions;BZ(t.get(u[0],e))?r[0]=p.toGlobalCoord(p.getExtent()[i?0:1]):BZ(t.get(u[1],e))&&(r[1]=f.toGlobalCoord(f.getExtent()[i?0:1]))}isNaN(l)||(r[0]=l),isNaN(h)||(r[1]=h)}else r=[l,h];t.setItemLayout(e,r)}AZ.extend({type:"markLine",updateLayout:function(t,e,i){e.eachSeries((function(t){var e=t.markLineModel;if(e){var n=e.getData(),a=e.__from,r=e.__to;a.each((function(e){HZ(a,e,!0,t,i),HZ(r,e,!1,t,i)})),n.each((function(t){n.setItemLayout(t,[a.getItemLayout(t),r.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},renderSeries:function(t,e,i,n){var a=t.coordinateSystem,r=t.id,o=t.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,new NZ);this.group.add(l.group);var h=function(t,e,i){var n;n=t?OZ.map(t&&t.dimensions,(function(t){var i=e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0])||{};return i.name=t,i})):[{name:"value",type:"float"}];var a=new zZ(n,i),r=new zZ(n,i),o=new zZ([],i),s=OZ.map(i.get("data"),OZ.curry(VZ,e,t,i));t&&(s=OZ.filter(s,OZ.curry(WZ,t)));var l=t?RZ.dimValueGetter:function(t){return t.value};return a.initData(OZ.map(s,(function(t){return t[0]})),null,l),r.initData(OZ.map(s,(function(t){return t[1]})),null,l),o.initData(OZ.map(s,(function(t){return t[2]}))),o.hasItemOption=!0,{from:a,to:r,line:o}}(a,t,e),u=h.from,c=h.to,d=h.line;e.__from=u,e.__to=c,e.setData(d);var p=e.get("symbol"),f=e.get("symbolSize");function g(e,i,a){var r=e.getItemModel(i);HZ(e,i,a,t,n),e.setItemVisual(i,{symbolSize:r.get("symbolSize")||f[a?0:1],symbol:r.get("symbol",!0)||p[a?0:1],color:r.get("itemStyle.normal.color")||o.getVisual("color")})}OZ.isArray(p)||(p=[p,p]),"number"==typeof f&&(f=[f,f]),h.from.each((function(t){g(u,t,!0),g(c,t,!1)})),d.each((function(t){var e=d.getItemModel(t).get("lineStyle.normal.color");d.setItemVisual(t,{color:e||u.getItemVisual(t,"color")}),d.setItemLayout(t,[u.getItemLayout(t),c.getItemLayout(t)]),d.setItemVisual(t,{fromSymbolSize:u.getItemVisual(t,"symbolSize"),fromSymbol:u.getItemVisual(t,"symbol"),toSymbolSize:c.getItemVisual(t,"symbolSize"),toSymbol:c.getItemVisual(t,"symbol")})})),l.updateData(d),h.line.eachItemGraphicEl((function(t,i){t.traverse((function(t){t.dataModel=e}))})),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),m.registerPreprocessor((function(t){t.markLine=t.markLine||{}})),gZ.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{normal:{show:!0,position:"top"},emphasis:{show:!0,position:"top"}},itemStyle:{normal:{borderWidth:0}}}});var FZ=b,ZZ=Pt,UZ=dp,jZ=dr,qZ=Vr,XZ=mZ,YZ=function(t,e,i,n){var a=XZ.dataTransform(t,n[0]),r=XZ.dataTransform(t,n[1]),o=FZ.retrieve,s=a.coord,l=r.coord;s[0]=o(s[0],-1/0),s[1]=o(s[1],-1/0),l[0]=o(l[0],1/0),l[1]=o(l[1],1/0);var h=FZ.mergeAll([{},a,r]);return h.coord=[a.coord,r.coord],h.x0=a.x,h.y0=a.y,h.x1=r.x,h.y1=r.y,h};function $Z(t){return!isNaN(t)&&!isFinite(t)}function KZ(t,e,i,n){var a=1-t;return $Z(e[a])&&$Z(i[a])}function JZ(t,e){var i=e.coord[0],n=e.coord[1];return!("cartesian2d"!==t.type||!i||!n||!KZ(1,i,n)&&!KZ(0,i,n))||(XZ.dataFilter(t,{coord:i,x:e.x0,y:e.y0})||XZ.dataFilter(t,{coord:n,x:e.x1,y:e.y1}))}function QZ(t,e,i,n,a){var r,o=n.coordinateSystem,s=t.getItemModel(e),l=jZ.parsePercent(s.get(i[0]),a.getWidth()),h=jZ.parsePercent(s.get(i[1]),a.getHeight());if(isNaN(l)||isNaN(h)){if(n.getMarkerPosition)r=n.getMarkerPosition(t.getValues(i,e));else{var u=t.get(i[0],e),c=t.get(i[1],e);r=o.dataToPoint([u,c],!0)}if("cartesian2d"===o.type){var d=o.getAxis("x"),p=o.getAxis("y");u=t.get(i[0],e),c=t.get(i[1],e);$Z(u)?r[0]=d.toGlobalCoord(d.getExtent()["x0"===i[0]?0:1]):$Z(c)&&(r[1]=p.toGlobalCoord(p.getExtent()["y0"===i[1]?0:1]))}isNaN(l)||(r[0]=l),isNaN(h)||(r[1]=h)}else r=[l,h];return r}var tU=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];AZ.extend({type:"markArea",updateLayout:function(t,e,i){e.eachSeries((function(t){var e=t.markAreaModel;if(e){var n=e.getData();n.each((function(e){var a=FZ.map(tU,(function(a){return QZ(n,e,a,t,i)}));n.setItemLayout(e,a),n.getItemGraphicEl(e).setShape("points",a)}))}}),this)},renderSeries:function(t,e,i,n){var a=t.coordinateSystem,r=t.name,o=t.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,{group:new qZ.Group});this.group.add(l.group),l.__keep=!0;var h=function(t,e,i){var n,a,r=["x0","y0","x1","y1"];t?(n=FZ.map(t&&t.dimensions,(function(t){var i=e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0])||{};return i.name=t,i})),a=new UZ(FZ.map(r,(function(t,e){return{name:t,type:n[e%2].type}})),i)):a=new UZ(n=[{name:"value",type:"float"}],i);var o=FZ.map(i.get("data"),FZ.curry(YZ,e,t,i));t&&(o=FZ.filter(o,FZ.curry(JZ,t)));var s=t?function(t,e,i,n){return t.coord[Math.floor(n/2)][n%2]}:function(t){return t.value};return a.initData(o,null,s),a.hasItemOption=!0,a}(a,t,e);e.setData(h),h.each((function(e){h.setItemLayout(e,FZ.map(tU,(function(i){return QZ(h,e,i,t,n)}))),h.setItemVisual(e,{color:o.getVisual("color")})})),h.diff(l.__data).add((function(t){var e=new qZ.Polygon({shape:{points:h.getItemLayout(t)}});h.setItemGraphicEl(t,e),l.group.add(e)})).update((function(t,i){var n=l.__data.getItemGraphicEl(i);qZ.updateProps(n,{shape:{points:h.getItemLayout(t)}},e,t),l.group.add(n),h.setItemGraphicEl(t,n)})).remove((function(t){var e=l.__data.getItemGraphicEl(t);l.group.remove(e)})).execute(),h.eachItemGraphicEl((function(t,i){var n=h.getItemModel(i),a=n.getModel("label.normal"),r=n.getModel("label.emphasis"),o=h.getItemVisual(i,"color");t.useStyle(FZ.defaults(n.getModel("itemStyle.normal").getItemStyle(),{fill:ZZ.modifyAlpha(o,.4),stroke:o})),t.hoverStyle=n.getModel("itemStyle.emphasis").getItemStyle(),qZ.setLabelStyle(t.style,t.hoverStyle,a,r,{labelFetcher:e,labelDataIndex:i,defaultText:h.getName(i)||"",isRectText:!0,autoColor:o}),qZ.setHoverStyle(t,{}),t.dataModel=e})),l.__data=h,l.group.silent=e.get("silent")||t.get("silent")}}),m.registerPreprocessor((function(t){t.markArea=t.markArea||{}}));var eU=b;function iU(t){var e=t.itemStyle||(t.itemStyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},a=n.normal||(n.normal={}),r={normal:1,emphasis:1};eU.each(n,(function(t,e){r[e]||nU(a,e)||(a[e]=t)})),i.label&&!nU(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function nU(t,e){return t.hasOwnProperty(e)}var aU=function(t){var e=t&&t.timeline;eU.isArray(e)||(e=e?[e]:[]),eU.each(e,(function(t){t&&function(t){var e=t.type,i={number:"value",time:"time"};i[e]&&(t.axisType=i[e],delete t.type);if(iU(t),nU(t,"controlPosition")){var n=t.controlStyle||(t.controlStyle={});nU(n,"position")||(n.position=t.controlPosition),"none"!==n.position||nU(n,"show")||(n.show=!1,delete n.position),delete t.controlPosition}eU.each(t.data||[],(function(t){eU.isObject(t)&&!eU.isArray(t)&&(!nU(t,"value")&&nU(t,"name")&&(t.value=t.name),iU(t))}))}(t)}))};Zu.registerSubTypeDefaulter("timeline",(function(){return"slider"}));var rU=m,oU=b;rU.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},(function(t,e){var i=e.getComponent("timeline");return i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),e.resetOption("timeline"),oU.defaults({currentIndex:i.option.currentIndex},t)})),rU.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},(function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)}));var sU=b,lU=dp,hU=ur,uU=Zu.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{normal:{},emphasis:{}},label:{normal:{color:"#000"},emphasis:{}},data:[]},init:function(t,e,i){this._data,this._names,this.mergeDefaultAndTheme(t,i),this._initData()},mergeOption:function(t){uU.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],i=t.axisType,n=this._names=[];if("category"===i){var a=[];sU.each(e,(function(t,e){var i,r=hU.getDataItemValue(t);sU.isObject(t)?(i=sU.clone(t)).value=e:i=e,a.push(i),sU.isString(r)||null!=r&&!isNaN(r)||(r=""),n.push(r+"")})),e=a}var r={category:"ordinal",time:"time"}[i]||"number";(this._data=new lU([{name:"value",type:r}],this)).initData(e,n)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}}),cU=b,dU=ur,pU=uU.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",normal:{show:!0,interval:"auto",rotate:0,color:"#304654"},emphasis:{show:!0,color:"#c23531"}},itemStyle:{normal:{color:"#304654",borderWidth:1},emphasis:{color:"#c23531"}},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",normal:{color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}});cU.mixin(pU,dU.dataFormatMixin);var fU=Md.extend({type:"timeline"}),gU=b,mU=gg,vU=Rp,yU=function(t,e,i,n){mU.call(this,t,e,i),this.type=n||"value",this._autoLabelInterval,this.model=null};yU.prototype={constructor:yU,getLabelInterval:function(){var t,e=this.model,i=e.getModel("label.normal");return null!=(t=i.get("interval"))&&"auto"!=t||(t=this._autoLabelInterval)||(t=this._autoLabelInterval=vU.getAxisLabelInterval(gU.map(this.scale.getTicks(),this.dataToCoord,this),vU.getFormattedLabels(this,i.get("formatter")),i.getFont(),"horizontal"===e.get("orient")?0:90,i.get("rotate"))),t},isLabelIgnored:function(t){if("category"===this.type){var e=this.getLabelInterval();return"function"==typeof e&&!e(t,this.scale.getLabel(t))||t%(e+1)}}},gU.inherits(yU,mU);var xU=b,_U=Je,bU=mt,wU=Vr,SU=wu,MU=fU,IU=yU,AU=Hf.createSymbol,TU=Rp,CU=dr,LU=cr.encodeHTML,DU=xU.bind,PU=xU.each,kU=Math.PI;function OU(t,e,i,n,a,r){var o=e.get("color");if(a)a.setColor(o),i.add(a),r&&r.onUpdate(a);else{var s=t.get("symbol");(a=AU(s,-1,-1,2,2,o)).setStyle("strokeNoScale",!0),i.add(a),r&&r.onCreate(a)}var l=e.getItemStyle(["color","symbol","symbolSize"]);a.setStyle(l),n=xU.merge({rectHover:!0,z2:100},n,!0);var h=t.get("symbolSize");(h=h instanceof Array?h.slice():[+h,+h])[0]/=2,h[1]/=2,n.scale=h;var u=t.get("symbolOffset");if(u){var c=n.position=n.position||[0,0];c[0]+=CU.parsePercent(u[0],h[0]),c[1]+=CU.parsePercent(u[1],h[1])}var d=t.get("symbolRotate");return n.rotation=(d||0)*Math.PI/180||0,a.attr(n),a.updateTransform(),a}function zU(t,e,i,n,a){if(!t.dragging){var r=n.getModel("checkpointStyle"),o=i.dataToCoord(n.getData().get(["value"],e));a||!r.get("animation",!0)?t.attr({position:[o,0]}):(t.stopAnimation(!0),t.animateTo({position:[o,0]},r.get("animationDuration",!0),r.get("animationEasing",!0)))}}MU.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(t,e,i,n){if(this.model=t,this.api=i,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var a=this._layout(t,i),r=this._createGroup("mainGroup"),o=this._createGroup("labelGroup"),s=this._axis=this._createAxis(a,t);t.formatTooltip=function(t){return LU(s.scale.getLabel(t))},PU(["AxisLine","AxisTick","Control","CurrentPointer"],(function(e){this["_render"+e](a,r,s,t)}),this),this._renderAxisLabel(a,o,s,t),this._position(a,t)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.normal.position"),n=t.get("orient"),a=function(t,e){return SU.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e);null==i||"auto"===i?i="horizontal"===n?a.y+a.height/2<e.getHeight()/2?"-":"+":a.x+a.width/2<e.getWidth()/2?"+":"-":isNaN(i)&&(i={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[n][i]);var r,o,s,l,h={horizontal:"center",vertical:i>=0||"+"===i?"left":"right"},u={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:kU/2},d="vertical"===n?a.height:a.width,p=t.getModel("controlStyle"),f=(y=p.get("show"))?p.get("itemSize"):0,g=y?p.get("itemGap"):0,m=f+g,v=t.get("label.normal.rotate")||0;v=v*kU/180;var y,x=p.get("position",!0),_=(y=p.get("show",!0))&&p.get("showPlayBtn",!0),b=y&&p.get("showPrevBtn",!0),w=y&&p.get("showNextBtn",!0),S=0,M=d;return"left"===x||"bottom"===x?(_&&(r=[0,0],S+=m),b&&(o=[S,0],S+=m),w&&(s=[M-f,0],M-=m)):(_&&(r=[M-f,0],M-=m),b&&(o=[0,0],S+=m),w&&(s=[M-f,0],M-=m)),l=[S,M],t.get("inverse")&&l.reverse(),{viewRect:a,mainLength:d,orient:n,rotation:c[n],labelRotation:v,labelPosOpt:i,labelAlign:t.get("label.normal.align")||h[n],labelBaseline:t.get("label.normal.verticalAlign")||t.get("label.normal.baseline")||u[n],playPosition:r,prevBtnPosition:o,nextBtnPosition:s,axisExtent:l,controlSize:f,controlGap:g}},_position:function(t,e){var i=this._mainGroup,n=this._labelGroup,a=t.viewRect;if("vertical"===t.orient){var r=bU.create(),o=a.x,s=a.y+a.height;bU.translate(r,r,[-o,-s]),bU.rotate(r,r,-kU/2),bU.translate(r,r,[o,s]),(a=a.clone()).applyTransform(r)}var l=m(a),h=m(i.getBoundingRect()),u=m(n.getBoundingRect()),c=i.position,d=n.position;d[0]=c[0]=l[0][0];var p,f=t.labelPosOpt;isNaN(f)?(v(c,h,l,1,p="+"===f?0:1),v(d,u,l,1,1-p)):(v(c,h,l,1,p=f>=0?0:1),d[1]=c[1]+f);function g(t){var e=t.position;t.origin=[l[0][0]-e[0],l[1][0]-e[1]]}function m(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function v(t,e,i,n,a){t[n]+=i[n][a]-e[n][a]}i.attr("position",c),n.attr("position",d),i.rotation=n.rotation=t.rotation,g(i),g(n)},_createAxis:function(t,e){var i=e.getData(),n=e.get("axisType"),a=TU.createScaleByModel(e,n),r=i.getDataExtent("value");a.setExtent(r[0],r[1]),this._customizeScale(a,i),a.niceTicks();var o=new IU("value",a,t.axisExtent,n);return o.model=e,o},_customizeScale:function(t,e){t.getTicks=function(){return e.mapArray(["value"],(function(t){return t}))},t.getTicksLabels=function(){return xU.map(this.getTicks(),t.getLabel,t)}},_createGroup:function(t){var e=this["_"+t]=new wU.Group;return this.group.add(e),e},_renderAxisLine:function(t,e,i,n){var a=i.getExtent();n.get("lineStyle.show")&&e.add(new wU.Line({shape:{x1:a[0],y1:0,x2:a[1],y2:0},style:xU.extend({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,i,n){var a=n.getData(),r=i.scale.getTicks();PU(r,(function(t,r){var o=i.dataToCoord(t),s=a.getItemModel(r),l=s.getModel("itemStyle.normal"),h=s.getModel("itemStyle.emphasis"),u={position:[o,0],onclick:DU(this._changeTimeline,this,r)},c=OU(s,l,e,u);wU.setHoverStyle(c,h.getItemStyle()),s.get("tooltip")?(c.dataIndex=r,c.dataModel=n):c.dataIndex=c.dataModel=null}),this)},_renderAxisLabel:function(t,e,i,n){var a=n.getModel("label.normal");if(a.get("show")){var r=n.getData(),o=i.scale.getTicks(),s=TU.getFormattedLabels(i,a.get("formatter")),l=i.getLabelInterval();PU(o,(function(n,a){if(!i.isLabelIgnored(a,l)){var o=r.getItemModel(a),h=o.getModel("label.normal"),u=o.getModel("label.emphasis"),c=i.dataToCoord(n),d=new wU.Text({position:[c,0],rotation:t.labelRotation-t.rotation,onclick:DU(this._changeTimeline,this,a),silent:!1});wU.setTextStyle(d.style,h,{text:s[a],textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(d),wU.setHoverStyle(d,wU.setTextStyle({},u))}}),this)}},_renderControl:function(t,e,i,n){var a=t.controlSize,r=t.rotation,o=n.getModel("controlStyle.normal").getItemStyle(),s=n.getModel("controlStyle.emphasis").getItemStyle(),l=[0,-a/2,a,a],h=n.getPlayState(),u=n.get("inverse",!0);function c(t,i,h,u){if(t){var c=function(t,e,i,n){return wU.makePath(t.get(e).replace(/^path:\/\//,""),xU.clone(n||{}),new _U(i[0],i[1],i[2],i[3]),"center")}(n,i,l,{position:t,origin:[a/2,0],rotation:u?-r:0,rectHover:!0,style:o,onclick:h});e.add(c),wU.setHoverStyle(c,s)}}c(t.nextBtnPosition,"controlStyle.nextIcon",DU(this._changeTimeline,this,u?"-":"+")),c(t.prevBtnPosition,"controlStyle.prevIcon",DU(this._changeTimeline,this,u?"+":"-")),c(t.playPosition,"controlStyle."+(h?"stopIcon":"playIcon"),DU(this._handlePlayClick,this,!h),!0)},_renderCurrentPointer:function(t,e,i,n){var a=n.getData(),r=n.getCurrentIndex(),o=a.getItemModel(r).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=DU(s._handlePointerDrag,s),t.ondragend=DU(s._handlePointerDragend,s),zU(t,r,i,n,!0)},onUpdate:function(t){zU(t,r,i,n)}};this._currentPointer=OU(o,o,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var i=this._toAxisCoord(t)[0],n=this._axis,a=CU.asc(n.getExtent().slice());i>a[1]&&(i=a[1]),i<a[0]&&(i=a[0]),this._currentPointer.position[0]=i,this._currentPointer.dirty();var r=this._findNearestTick(i),o=this.model;(e||r!==o.getCurrentIndex()&&o.get("realtime"))&&this._changeTimeline(r)},_doPlayStop:function(){this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(DU((function(){var t=this.model;this._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))}),this),this.model.get("playInterval")))},_toAxisCoord:function(t){var e=this._mainGroup.getLocalTransform();return wU.applyTransform(t,e,!0)},_findNearestTick:function(t){var e,i=this.model.getData(),n=1/0,a=this._axis;return i.each(["value"],(function(i,r){var o=a.dataToCoord(i),s=Math.abs(o-t);s<n&&(n=s,e=r)})),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})}}),m.registerPreprocessor(aU);var EU=b,RU=YG,NU=m.extendComponentModel({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},mergeDefaultAndTheme:function(t){NU.superApply(this,"mergeDefaultAndTheme",arguments),EU.each(this.option.feature,(function(t,e){var i=RU.get(e);i&&EU.merge(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:{normal:{borderColor:"#666",color:"none"},emphasis:{borderColor:"#3E98C5"}}}}),VU=b,BU=Ni,GU=YG,WU=Vr,HU=ru,FU=$d,ZU=mN;m.extendComponentView({type:"toolbox",render:function(t,e,i,n){var a=this.group;if(a.removeAll(),t.get("show")){var r=+t.get("itemSize"),o=t.get("feature")||{},s=this._features||(this._features={}),l=[];VU.each(o,(function(t,e){l.push(e)})),new FU(this._featureNames||[],l).add(h).update(h).remove(VU.curry(h,null)).execute(),this._featureNames=l,ZU.layout(a,t,i),a.add(ZU.makeBackground(a.getBoundingRect(),t)),a.eachChild((function(t){var e=t.__title,n=t.hoverStyle;if(n&&e){var o=BU.getBoundingRect(e,BU.makeFont(n)),s=t.position[0]+a.position[0],l=!1;t.position[1]+a.position[1]+r+o.height>i.getHeight()&&(n.textPosition="top",l=!0);var h=l?-5-o.height:r+8;s+o.width/2>i.getWidth()?(n.textPosition=["100%",h],n.textAlign="right"):s-o.width/2<0&&(n.textPosition=[0,h],n.textAlign="left")}}))}function h(h,u){var c,d=l[h],p=l[u],f=o[d],g=new HU(f,t,t.ecModel);if(d&&!p){if(function(t){return 0===t.indexOf("my")}(d))c={model:g,onclick:g.option.onclick,featureName:d};else{var m=GU.get(d);if(!m)return;c=new m(g,e,i)}s[d]=c}else{if(!(c=s[p]))return;c.model=g,c.ecModel=e,c.api=i}d||!p?g.get("show")&&!c.unusable?(!function(n,o,s){var l=n.getModel("iconStyle"),h=o.getIcons?o.getIcons():n.get("icon"),u=n.get("title")||{};if("string"==typeof h){var c=h,d=u;u={},(h={})[s]=c,u[s]=d}var p=n.iconPaths={};VU.each(h,(function(s,h){var c=WU.createIcon(s,{},{x:-r/2,y:-r/2,width:r,height:r});c.setStyle(l.getModel("normal").getItemStyle()),c.hoverStyle=l.getModel("emphasis").getItemStyle(),WU.setHoverStyle(c),t.get("showTitle")&&(c.__title=u[h],c.on("mouseover",(function(){var t=l.getModel("emphasis").getItemStyle();c.setStyle({text:u[h],textPosition:t.textPosition||"bottom",textFill:t.fill||t.stroke||"#000",textAlign:t.textAlign||"center"})})).on("mouseout",(function(){c.setStyle({textFill:null})}))),c.trigger(n.get("iconStatus."+h)||"normal"),a.add(c),c.on("click",VU.bind(o.onclick,o,e,i,h)),p[h]=c}))}(g,c,d),g.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},c.render&&c.render(g,e,i,n)):c.remove&&c.remove(e,i):c.dispose&&c.dispose(e,i)}},updateView:function(t,e,i,n){VU.each(this._features,(function(t){t.updateView&&t.updateView(t.model,e,i,n)}))},updateLayout:function(t,e,i,n){VU.each(this._features,(function(t){t.updateLayout&&t.updateLayout(t.model,e,i,n)}))},remove:function(t,e){VU.each(this._features,(function(i){i.remove&&i.remove(t,e)})),this.group.removeAll()},dispose:function(t,e){VU.each(this._features,(function(i){i.dispose&&i.dispose(t,e)}))}});var UU=_,jU=YG,qU=KG.toolbox.saveAsImage;function XU(t){this.model=t}XU.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:qU.title,type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:qU.lang.slice()},XU.prototype.unusable=!UU.canvasSupported,XU.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",a=document.createElement("a"),r=i.get("type",!0)||"png";a.download=n+"."+r,a.target="_blank";var o=e.getConnectedDataURL({type:r,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if(a.href=o,"function"!=typeof MouseEvent||UU.browser.ie||UU.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(o.split(",")[1]),l=s.length,h=new Uint8Array(l);l--;)h[l]=s.charCodeAt(l);var u=new Blob([h]);window.navigator.msSaveOrOpenBlob(u,n+"."+r)}else{var c=i.get("lang"),d='<body style="margin:0;"><img src="'+o+'" style="max-width:100%;" title="'+(c&&c[0]||"")+'" /></body>';window.open().document.write(d)}else{var p=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});a.dispatchEvent(p)}},jU.register("saveAsImage",XU);var YU=m,$U=b,KU=YG,JU=KG.toolbox.magicType;function QU(t){this.model=t}QU.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z",tiled:"M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"},title:$U.clone(JU.title),option:{},seriesIndex:{}};var tj=QU.prototype;tj.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return $U.each(t.get("type"),(function(t){e[t]&&(i[t]=e[t])})),i};var ej={line:function(t,e,i,n){if("bar"===t)return $U.merge({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0)},bar:function(t,e,i,n){if("line"===t)return $U.merge({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0)},stack:function(t,e,i,n){if("line"===t||"bar"===t)return $U.merge({id:e,stack:"__ec_magicType_stack__"},n.get("option.stack")||{},!0)},tiled:function(t,e,i,n){if("line"===t||"bar"===t)return $U.merge({id:e,stack:""},n.get("option.tiled")||{},!0)}},ij=[["line","bar"],["stack","tiled"]];tj.onclick=function(t,e,i){var n=this.model,a=n.get("seriesIndex."+i);if(ej[i]){var r={series:[]};$U.each(ij,(function(t){$U.indexOf(t,i)>=0&&$U.each(t,(function(t){n.setIconStatus(t,"normal")}))})),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==a?null:{seriesIndex:a}},(function(e){var a=e.subType,o=e.id,s=ej[i](a,o,e,n);s&&($U.defaults(s,e.option),r.series.push(s));var l=e.coordinateSystem;if(l&&"cartesian2d"===l.type&&("line"===i||"bar"===i)){var h=l.getAxesByScale("ordinal")[0];if(h){var u=h.dim+"Axis",c=t.queryComponents({mainType:u,index:e.get(name+"Index"),id:e.get(name+"Id")})[0].componentIndex;r[u]=r[u]||[];for(var d=0;d<=c;d++)r[u][c]=r[u][c]||{};r[u][c].boundaryGap="bar"===i}}})),e.dispatchAction({type:"changeMagicType",currentType:i,newOption:r})}},YU.registerAction({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)})),KU.register("magicType",QU);var nj=m,aj=b,rj=fa,oj=YG,sj=KG.toolbox.dataView,lj=new Array(60).join("-");function hj(t){return aj.map(t,(function(t){var e=t.getRawData(),i=[t.name],n=[];return e.each(e.dimensions,(function(){for(var t=arguments.length,a=arguments[t-1],r=e.getName(a),o=0;o<t-1;o++)n[o]=arguments[o];i.push((r?r+"\t":"")+n.join("\t"))})),i.join("\n")})).join("\n\n"+lj+"\n\n")}function uj(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var cj=new RegExp("[\t]+","g");function dj(t,e){var i=t.split(new RegExp("\n*"+lj+"\n*","g")),n={series:[]};return aj.each(i,(function(t,i){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf("\t")>=0)return!0}(t)){var a=function(t){for(var e=t.split(/\n+/g),i=uj(e.shift()).split(cj),n=[],a=aj.map(i,(function(t){return{name:t,data:[]}})),r=0;r<e.length;r++){var o=uj(e[r]).split(cj);n.push(o.shift());for(var s=0;s<o.length;s++)a[s]&&(a[s].data[r]=o[s])}return{series:a,categories:n}}(t),r=e[i],o=r.axisDim+"Axis";r&&(n[o]=n[o]||[],n[o][r.axisIndex]={data:a.categories},n.series=n.series.concat(a.series))}else{a=function(t){for(var e=t.split(/\n+/g),i=uj(e.shift()),n=[],a=0;a<e.length;a++){var r,o=uj(e[a]).split(cj),s="",l=!1;isNaN(o[0])?(l=!0,s=o[0],o=o.slice(1),n[a]={name:s,value:[]},r=n[a].value):r=n[a]=[];for(var h=0;h<o.length;h++)r.push(+o[h]);1===r.length&&(l?n[a].value=r[0]:n[a]=r[0])}return{name:i,data:n}}(t);n.series.push(a)}})),n}function pj(t){this._dom=null,this.model=t}function fj(t,e){return aj.map(t,(function(t,i){var n=e&&e[i];return aj.isObject(n)&&!aj.isArray(n)?(aj.isObject(t)&&!aj.isArray(t)&&(t=t.value),aj.defaults({value:t},n)):t}))}pj.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:aj.clone(sj.title),lang:aj.clone(sj.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},pj.prototype.onclick=function(t,e){var i=e.getDom(),n=this.model;this._dom&&i.removeChild(this._dom);var a=document.createElement("div");a.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",a.style.backgroundColor=n.get("backgroundColor")||"#fff";var r=document.createElement("h4"),o=n.get("lang")||[];r.innerHTML=o[0]||n.get("title"),r.style.cssText="margin: 10px 20px;",r.style.color=n.get("textColor");var s=document.createElement("div"),l=document.createElement("textarea");s.style.cssText="display:block;width:100%;overflow:auto;";var h=n.get("optionToContent"),u=n.get("contentToOption"),c=function(t){var e,i,n=function(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 r=a.getBaseAxis();if("category"===r.type){var o=r.dim+"_"+r.index;e[o]||(e[o]={categoryAxis:r,valueAxis:a.getOtherAxis(r),series:[]},n.push({axisDim:r.dim,axisIndex:r.index})),e[o].series.push(t)}else i.push(t)}})),{seriesGroupByCategoryAxis:e,other:i,meta:n}}(t);return{value:aj.filter([(e=n.seriesGroupByCategoryAxis,i=[],aj.each(e,(function(t,e){var n=t.categoryAxis,a=t.valueAxis.dim,r=[" "].concat(aj.map(t.series,(function(t){return t.name}))),o=[n.model.getCategories()];aj.each(t.series,(function(t){o.push(t.getRawData().mapArray(a,(function(t){return t})))}));for(var s=[r.join("\t")],l=0;l<o[0].length;l++){for(var h=[],u=0;u<o.length;u++)h.push(o[u][l]);s.push(h.join("\t"))}i.push(s.join("\n"))})),i.join("\n\n"+lj+"\n\n")),hj(n.other)],(function(t){return t.replace(/[\n\t\s]/g,"")})).join("\n\n"+lj+"\n\n"),meta:n.meta}}(t);if("function"==typeof h){var d=h(e.getOption());"string"==typeof d?s.innerHTML=d:aj.isDom(d)&&s.appendChild(d)}else s.appendChild(l),l.readOnly=n.get("readOnly"),l.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",l.style.color=n.get("textColor"),l.style.borderColor=n.get("textareaBorderColor"),l.style.backgroundColor=n.get("textareaColor"),l.value=c.value;var p=c.meta,f=document.createElement("div");f.style.cssText="position:absolute;bottom:0;left:0;right:0;";var g="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",m=document.createElement("div"),v=document.createElement("div");g+=";background-color:"+n.get("buttonColor"),g+=";color:"+n.get("buttonTextColor");var y=this;function x(){i.removeChild(a),y._dom=null}rj.addEventListener(m,"click",x),rj.addEventListener(v,"click",(function(){var t;try{t="function"==typeof u?u(s,e.getOption()):dj(l.value,p)}catch(i){throw x(),new Error("Data view format error "+i)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),x()})),m.innerHTML=o[1],v.innerHTML=o[2],v.style.cssText=g,m.style.cssText=g,!n.get("readOnly")&&f.appendChild(v),f.appendChild(m),rj.addEventListener(l,"keydown",(function(t){if(9===(t.keyCode||t.which)){var e=this.value,i=this.selectionStart,n=this.selectionEnd;this.value=e.substring(0,i)+"\t"+e.substring(n),this.selectionStart=this.selectionEnd=i+1,rj.stop(t)}})),a.appendChild(r),a.appendChild(s),a.appendChild(f),s.style.height=i.clientHeight-80+"px",i.appendChild(a),this._dom=a},pj.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},pj.prototype.dispose=function(t,e){this.remove(t,e)},oj.register("dataView",pj),nj.registerAction({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},(function(t,e){var i=[];aj.each(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:fj(t.data,a)})}else i.push(aj.extend({type:"scatter"},t))})),e.mergeOption(aj.defaults({series:i},t.newOption))}));var gj={},mj=b.each,vj="\0_ec_hist_store";function yj(t){var e=t[vj];return e||(e=t[vj]=[{}]),e}gj.push=function(t,e){var i=yj(t);mj(e,(function(e,n){for(var a=i.length-1;a>=0;a--){if(i[a][n])break}if(a<0){var r=t.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(r){var o=r.getPercentRange();i[0][n]={dataZoomId:n,start:o[0],end:o[1]}}}})),i.push(e)},gj.pop=function(t){var e=yj(t),i=e[e.length-1];e.length>1&&e.pop();var n={};return mj(i,(function(t,i){for(var a=e.length-1;a>=0;a--){if(t=e[a][i]){n[i]=t;break}}})),n},gj.clear=function(t){t[vj]=null},gj.count=function(t){return yj(t).length},$W.extend({type:"dataZoom.select"}),JW.extend({type:"dataZoom.select"});var xj=m,_j=b,bj=aD,wj=MG,Sj=gj,Mj=RC,Ij=YG,Aj=KG.toolbox.dataZoom,Tj=_j.each;function Cj(t,e,i){(this._brushController=new bj(i.getZr())).on("brush",_j.bind(this._onBrush,this)).mount(),this._isZoomActive}Cj.defaultOption={show:!0,icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:_j.clone(Aj.title)};var Lj=Cj.prototype;Lj.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,function(t,e,i,n,a){var r=i._isZoomActive;n&&"takeGlobalCursor"===n.type&&(r="dataZoomSelect"===n.key&&n.dataZoomSelectActive);i._isZoomActive=r,t.setIconStatus("zoom",r?"emphasis":"normal");var o=new wj(Pj(t.option),e,{include:["grid"]});i._brushController.setPanels(o.makePanelOpts(a,(function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"}))).enableBrush(!!r&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}})}(t,e,this,n,i),function(t,e){t.setIconStatus("back",Sj.count(e)>1?"emphasis":"normal")}(t,e)},Lj.onclick=function(t,e,i){Dj[i].call(this)},Lj.remove=function(t,e){this._brushController.unmount()},Lj.dispose=function(t,e){this._brushController.dispose()};var Dj={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(Sj.pop(this.ecModel))}};function Pj(t){var e={};return _j.each(["xAxisIndex","yAxisIndex"],(function(i){e[i]=t[i],null==e[i]&&(e[i]="all"),(!1===e[i]||"none"===e[i])&&(e[i]=[])})),e}Lj._onBrush=function(t,e){if(e.isEnd&&t.length){var i={},n=this.ecModel;this._brushController.updateCovers([]),new wj(Pj(this.model.option),n,{include:["grid"]}).matchOutputRanges(t,n,(function(t,e,i){if("cartesian2d"===i.type){var n=t.brushType;"rect"===n?(a("x",i,e[0]),a("y",i,e[1])):a({lineX:"x",lineY:"y"}[n],i,e)}})),Sj.push(n,i),this._dispatchZoomAction(i)}function a(t,e,a){var r=e.getAxis(t),o=r.model,s=function(t,e,i){var n;return i.eachComponent({mainType:"dataZoom",subType:"select"},(function(i){i.getAxisModel(t,e.componentIndex)&&(n=i)})),n}(t,o,n),l=s.findRepresentativeAxisProxy(o).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(a=Mj(0,a.slice(),r.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(i[s.id]={dataZoomId:s.id,startValue:a[0],endValue:a[1]})}},Lj._dispatchZoomAction=function(t){var e=[];Tj(t,(function(t,i){e.push(_j.clone(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},Ij.register("dataZoom",Cj),xj.registerPreprocessor((function(t){if(t){var e=t.dataZoom||(t.dataZoom=[]);_j.isArray(e)||(t.dataZoom=e=[e]);var i=t.toolbox;if(i&&(_j.isArray(i)&&(i=i[0]),i&&i.feature)){var n=i.feature.dataZoom;a("xAxis",n),a("yAxis",n)}}function a(i,n){if(n){var a=i+"Index",r=n[a];null==r||"all"==r||_j.isArray(r)||(r=!1===r||"none"===r?[]:[r]),function(e,i){var n=t[e];_j.isArray(n)||(n=n?[n]:[]);Tj(n,i)}(i,(function(t,n){if(null==r||"all"==r||-1!==_j.indexOf(r,n)){var o={type:"select",$fromToolbox:!0,id:"\0_ec_\0toolbox-dataZoom_"+i+n};o[a]=n,e.push(o)}}))}}}));var kj=m,Oj=gj,zj=YG,Ej=KG.toolbox.restore;function Rj(t){this.model=t}Rj.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:Ej.title},Rj.prototype.onclick=function(t,e,i){Oj.clear(t),e.dispatchAction({type:"restore",from:this.uid})},zj.register("restore",Rj),kj.registerAction({type:"restore",event:"restore",update:"prepareAndUpdate"},(function(t,e){e.resetOption("recreate")}));var Nj,Vj={},Bj=_,Gj="urn:schemas-microsoft-com:vml",Wj="undefined"==typeof window?null:window,Hj=!1,Fj=Wj&&Wj.document;if(Fj&&!Bj.canvasSupported)try{!Fj.namespaces.zrvml&&Fj.namespaces.add("zrvml",Gj),Nj=function(t){return Fj.createElement("<zrvml:"+t+' class="zrvml">')}}catch(PY){Nj=function(t){return Fj.createElement("<"+t+' xmlns="'+Gj+'" class="zrvml">')}}Vj.doc=Fj,Vj.createNode=function(t){return Nj(t)},Vj.initVML=function(){if(!Hj&&Fj){Hj=!0;var t=Fj.styleSheets;t.length<31?Fj.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}};var Zj=_,Uj=U.applyTransform,jj=Je,qj=Pt,Xj=Ni,Yj=Ri,$j=Gn,Kj=jn,Jj=Jn,Qj=Hs,tq=ms,eq=Oo,iq=Rl,nq=Vj,aq=eq.CMD,rq=Math.round,oq=Math.sqrt,sq=Math.abs,lq=Math.cos,hq=Math.sin,uq=Math.max;if(!Zj.canvasSupported){var cq=21600,dq=cq/2,pq=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=cq+","+cq,t.coordorigin="0,0"},fq=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},gq=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},mq=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},vq=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},yq=function(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t},xq=function(t,e,i){var n=qj.parse(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=fq(n[0],n[1],n[2]),t.opacity=i*n[3])},_q=function(t){var e=qj.parse(t);return[fq(e[0],e[1],e[2]),e[3]]},bq=function(t,e,i,n){var a="fill"==e,r=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(a||!a&&i.lineWidth)?(t[a?"filled":"stroked"]="true",i[e]instanceof iq&&mq(t,r),r||(r=nq.createNode(e)),a?function(t,e,i){var n=e.fill;if(null!=n)if(n instanceof iq){var a,r=0,o=[0,0],s=0,l=1,h=i.getBoundingRect(),u=h.width,c=h.height;if("linear"===n.type){a="gradient";var d=i.transform,p=[n.x*u,n.y*c],f=[n.x2*u,n.y2*c];d&&(Uj(p,p,d),Uj(f,f,d));var g=f[0]-p[0],m=f[1]-p[1];(r=180*Math.atan2(g,m)/Math.PI)<0&&(r+=360),r<1e-6&&(r=0)}else{a="gradientradial",p=[n.x*u,n.y*c],d=i.transform;var v=i.scale,y=u,x=c;o=[(p[0]-h.x)/y,(p[1]-h.y)/x],d&&Uj(p,p,d),y/=v[0]*cq,x/=v[1]*cq;var _=uq(y,x);s=0/_,l=2*n.r/_-s}var b=n.colorStops.slice();b.sort((function(t,e){return t.offset-e.offset}));for(var w=b.length,S=[],M=[],I=0;I<w;I++){var A=b[I],T=_q(A.color);M.push(A.offset*l+s+" "+T[0]),0!==I&&I!==w-1||S.push(T)}if(w>=2){var C=S[0][0],L=S[1][0],D=S[0][1]*e.opacity,P=S[1][1]*e.opacity;t.type=a,t.method="none",t.focus="100%",t.angle=r,t.color=C,t.color2=L,t.colors=M.join(","),t.opacity=P,t.opacity2=D}"radial"===a&&(t.focusposition=o.join(","))}else xq(t,n,e.opacity)}(r,i,n):function(t,e){null!=e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof iq||xq(t,e.stroke,e.opacity)}(r,i),gq(t,r)):(t[a?"filled":"stroked"]="false",mq(t,r))},wq=[[],[],[]];tq.prototype.brushVML=function(t){var e=this.style,i=this._vmlEl;i||(i=nq.createNode("shape"),pq(i),this._vmlEl=i),bq(i,"fill",e,this),bq(i,"stroke",e,this);var n=this.transform,a=null!=n,r=i.getElementsByTagName("stroke")[0];if(r){var o=e.lineWidth;if(a&&!e.strokeNoScale){var s=n[0]*n[3]-n[1]*n[2];o*=oq(sq(s))}r.weight=o+"px"}var l=this.path||(this.path=new eq);this.__dirtyPath&&(l.beginPath(),this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),i.path=function(t,e){var i,n,a,r,o,s,l=aq.M,h=aq.C,u=aq.L,c=aq.A,d=aq.Q,p=[],f=t.data,g=t.len();for(r=0;r<g;){switch(n="",i=0,a=f[r++]){case l:n=" m ",i=1,o=f[r++],s=f[r++],wq[0][0]=o,wq[0][1]=s;break;case u:n=" l ",i=1,o=f[r++],s=f[r++],wq[0][0]=o,wq[0][1]=s;break;case d:case h:n=" c ",i=3;var m,v,y=f[r++],x=f[r++],_=f[r++],b=f[r++];a===d?(m=_,v=b,_=(_+2*y)/3,b=(b+2*x)/3,y=(o+2*y)/3,x=(s+2*x)/3):(m=f[r++],v=f[r++]),wq[0][0]=y,wq[0][1]=x,wq[1][0]=_,wq[1][1]=b,wq[2][0]=m,wq[2][1]=v,o=m,s=v;break;case c:var w=0,S=0,M=1,I=1,A=0;e&&(w=e[4],S=e[5],M=oq(e[0]*e[0]+e[1]*e[1]),I=oq(e[2]*e[2]+e[3]*e[3]),A=Math.atan2(-e[1]/I,e[0]/M));var T=f[r++],C=f[r++],L=f[r++],D=f[r++],P=f[r++]+A,k=f[r++]+P+A;r++;var O=f[r++],z=T+lq(P)*L,E=C+hq(P)*D,R=(y=T+lq(k)*L,x=C+hq(k)*D,O?" wa ":" at ");Math.abs(z-y)<1e-4&&(Math.abs(k-P)>.01?O&&(z+=270/cq):Math.abs(E-C)<1e-4?O&&z<T||!O&&z>T?x-=270/cq:x+=270/cq:O&&E<C||!O&&E>C?y+=270/cq:y-=270/cq),p.push(R,rq(((T-L)*M+w)*cq-dq),",",rq(((C-D)*I+S)*cq-dq),",",rq(((T+L)*M+w)*cq-dq),",",rq(((C+D)*I+S)*cq-dq),",",rq((z*M+w)*cq-dq),",",rq((E*I+S)*cq-dq),",",rq((y*M+w)*cq-dq),",",rq((x*I+S)*cq-dq)),o=y,s=x;break;case aq.R:var N=wq[0],V=wq[1];N[0]=f[r++],N[1]=f[r++],V[0]=N[0]+f[r++],V[1]=N[1]+f[r++],e&&(Uj(N,N,e),Uj(V,V,e)),N[0]=rq(N[0]*cq-dq),V[0]=rq(V[0]*cq-dq),N[1]=rq(N[1]*cq-dq),V[1]=rq(V[1]*cq-dq),p.push(" m ",N[0],",",N[1]," l ",V[0],",",N[1]," l ",V[0],",",V[1]," l ",N[0],",",V[1]);break;case aq.Z:p.push(" x ")}if(i>0){p.push(n);for(var B=0;B<i;B++){var G=wq[B];e&&Uj(G,G,e),p.push(rq(G[0]*cq-dq),",",rq(G[1]*cq-dq),B<i-1?",":"")}}}return p.join("")}(l,this.transform),i.style.zIndex=vq(this.zlevel,this.z,this.z2),gq(t,i),null!=e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},tq.prototype.onRemove=function(t){mq(t,this._vmlEl),this.removeRectText(t)},tq.prototype.onAdd=function(t){gq(t,this._vmlEl),this.appendRectText(t)};Jj.prototype.brushVML=function(t){var e,i,n,a=this.style,r=a.image;if("object"==typeof(n=r)&&n.tagName&&"IMG"===n.tagName.toUpperCase()){var o=r.src;if(o===this._imageSrc)e=this._imageWidth,i=this._imageHeight;else{var s=r.runtimeStyle,l=s.width,h=s.height;s.width="auto",s.height="auto",e=r.width,i=r.height,s.width=l,s.height=h,this._imageSrc=o,this._imageWidth=e,this._imageHeight=i}r=o}else r===this._imageSrc&&(e=this._imageWidth,i=this._imageHeight);if(r){var u=a.x||0,c=a.y||0,d=a.width,p=a.height,f=a.sWidth,g=a.sHeight,m=a.sx||0,v=a.sy||0,y=f&&g,x=this._vmlEl;x||(x=nq.doc.createElement("div"),pq(x),this._vmlEl=x);var _,b=x.style,w=!1,S=1,M=1;if(this.transform&&(_=this.transform,S=oq(_[0]*_[0]+_[1]*_[1]),M=oq(_[2]*_[2]+_[3]*_[3]),w=_[1]||_[2]),w){var I=[u,c],A=[u+d,c],T=[u,c+p],C=[u+d,c+p];Uj(I,I,_),Uj(A,A,_),Uj(T,T,_),Uj(C,C,_);var L=uq(I[0],A[0],T[0],C[0]),D=uq(I[1],A[1],T[1],C[1]),P=[];P.push("M11=",_[0]/S,",","M12=",_[2]/M,",","M21=",_[1]/S,",","M22=",_[3]/M,",","Dx=",rq(u*S+_[4]),",","Dy=",rq(c*M+_[5])),b.padding="0 "+rq(L)+"px "+rq(D)+"px 0",b.filter="progid:DXImageTransform.Microsoft.Matrix("+P.join("")+", SizingMethod=clip)"}else _&&(u=u*S+_[4],c=c*M+_[5]),b.filter="",b.left=rq(u)+"px",b.top=rq(c)+"px";var k=this._imageEl,O=this._cropEl;k||(k=nq.doc.createElement("div"),this._imageEl=k);var z=k.style;if(y){if(e&&i)z.width=rq(S*e*d/f)+"px",z.height=rq(M*i*p/g)+"px";else{var E=new Image,R=this;E.onload=function(){E.onload=null,e=E.width,i=E.height,z.width=rq(S*e*d/f)+"px",z.height=rq(M*i*p/g)+"px",R._imageWidth=e,R._imageHeight=i,R._imageSrc=r},E.src=r}O||((O=nq.doc.createElement("div")).style.overflow="hidden",this._cropEl=O);var N=O.style;N.width=rq((d+m*d/f)*S),N.height=rq((p+v*p/g)*M),N.filter="progid:DXImageTransform.Microsoft.Matrix(Dx="+-m*d/f*S+",Dy="+-v*p/g*M+")",O.parentNode||x.appendChild(O),k.parentNode!=O&&O.appendChild(k)}else z.width=rq(S*d)+"px",z.height=rq(M*p)+"px",x.appendChild(k),O&&O.parentNode&&(x.removeChild(O),this._cropEl=null);var V="",B=a.opacity;B<1&&(V+=".Alpha(opacity="+rq(100*B)+") "),V+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+r+", SizingMethod=scale)",z.filter=V,x.style.zIndex=vq(this.zlevel,this.z,this.z2),gq(t,x),null!=a.text&&this.drawRectText(t,this.getBoundingRect())}},Jj.prototype.onRemove=function(t){mq(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},Jj.prototype.onAdd=function(t){gq(t,this._vmlEl),this.appendRectText(t)};var Sq,Mq={},Iq=0,Aq=document.createElement("div");Xj.$override("measureText",(function(t,e){var i=nq.doc;Sq||((Sq=i.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",nq.doc.body.appendChild(Sq));try{Sq.style.font=e}catch(n){}return Sq.innerHTML="",Sq.appendChild(i.createTextNode(t)),{width:Sq.offsetWidth}}));for(var Tq=new jj,Cq=function(t,e,i,n){var a=this.style;this.__dirty&&Yj.normalizeTextStyle(a,!0);var r=a.text;if(null!=r&&(r+=""),r){if(a.rich){var o=Xj.parseRichText(r,a);r=[];for(var s=0;s<o.lines.length;s++){for(var l=o.lines[s].tokens,h=[],u=0;u<l.length;u++)h.push(l[u].text);r.push(h.join(""))}r=r.join("\n")}var c,d,p=a.textAlign,f=a.textVerticalAlign,g=function(t){var e=Mq[t];if(!e){Iq>100&&(Iq=0,Mq={});var i,n=Aq.style;try{n.font=t,i=n.fontFamily.split(",")[0]}catch(PY){}e={style:n.fontStyle||"normal",variant:n.fontVariant||"normal",weight:n.fontWeight||"normal",size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},Mq[t]=e,Iq++}return e}(a.font),m=g.style+" "+g.variant+" "+g.weight+" "+g.size+'px "'+g.family+'"';i=i||Xj.getBoundingRect(r,m,p,f);var v=this.transform;if(v&&!n&&(Tq.copy(e),Tq.applyTransform(v),e=Tq),n)c=e.x,d=e.y;else{var y=a.textPosition,x=a.textDistance;if(y instanceof Array)c=e.x+yq(y[0],e.width),d=e.y+yq(y[1],e.height),p=p||"left";else{var _=Xj.adjustTextPositionOnRect(y,e,x);c=_.x,d=_.y,p=p||_.textAlign,f=f||_.textVerticalAlign}}c=Xj.adjustTextX(c,i.width,p),d=Xj.adjustTextY(d,i.height,f),d+=i.height/2;var b,w,S,M=nq.createNode,I=this._textVmlEl;I?w=(b=(S=I.firstChild).nextSibling).nextSibling:(I=M("line"),b=M("path"),w=M("textpath"),S=M("skew"),w.style["v-text-align"]="left",pq(I),b.textpathok=!0,w.on=!0,I.from="0 0",I.to="1000 0.05",gq(I,S),gq(I,b),gq(I,w),this._textVmlEl=I);var A=[c,d],T=I.style;v&&n?(Uj(A,A,v),S.on=!0,S.matrix=v[0].toFixed(3)+","+v[2].toFixed(3)+","+v[1].toFixed(3)+","+v[3].toFixed(3)+",0,0",S.offset=(rq(A[0])||0)+","+(rq(A[1])||0),S.origin="0 0",T.left="0px",T.top="0px"):(S.on=!1,T.left=rq(c)+"px",T.top=rq(d)+"px"),w.string=String(r).replace(/&/g,"&amp;").replace(/"/g,"&quot;");try{w.style.font=m}catch(PY){}bq(I,"fill",{fill:a.textFill,opacity:a.opacity},this),bq(I,"stroke",{stroke:a.textStroke,opacity:a.opacity,lineDash:a.lineDash},this),I.style.zIndex=vq(this.zlevel,this.z,this.z2),gq(t,I)}},Lq=function(t){mq(t,this._textVmlEl),this._textVmlEl=null},Dq=function(t){gq(t,this._textVmlEl)},Pq=[$j,Kj,Jj,tq,Qj],kq=0;kq<Pq.length;kq++){var Oq=Pq[kq].prototype;Oq.drawRectText=Cq,Oq.removeRectText=Lq,Oq.appendRectText=Dq}Qj.prototype.brushVML=function(t){var e=this.style;null!=e.text?this.drawRectText(t,{x:e.x||0,y:e.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(t)},Qj.prototype.onRemove=function(t){this.removeRectText(t)},Qj.prototype.onAdd=function(t){this.appendRectText(t)}}var zq=Ae,Eq=Vj,Rq=b.each;function Nq(t){return parseInt(t,10)}function Vq(t,e){Eq.initVML(),this.root=t,this.storage=e;var i=document.createElement("div"),n=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",n.style.cssText="position:absolute;left:0;top:0;",t.appendChild(i),this._vmlRoot=n,this._vmlViewport=i,this.resize();var a=e.delFromStorage,r=e.addToStorage;e.delFromStorage=function(t){a.call(e,t),t&&t.onRemove&&t.onRemove(n)},e.addToStorage=function(t){t.onAdd&&t.onAdd(n),r.call(e,t)},this._firstPaint=!0}Vq.prototype={constructor:Vq,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0,!0);this._paintList(t)},_paintList:function(t){for(var e=this._vmlRoot,i=0;i<t.length;i++){var n=t[i];n.invisible||n.ignore?(n.__alreadyNotVisible||n.onRemove(e),n.__alreadyNotVisible=!0):(n.__alreadyNotVisible&&n.onAdd(e),n.__alreadyNotVisible=!1,n.__dirty&&(n.beforeBrush&&n.beforeBrush(),(n.brushVML||n.brush).call(n,e),n.afterBrush&&n.afterBrush())),n.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(e),this._firstPaint=!1)},resize:function(t,e){t=null==t?this._getWidth():t,e=null==e?this._getHeight():e;if(this._width!=t||this._height!=e){this._width=t,this._height=e;var i=this._vmlViewport.style;i.width=t+"px",i.height=e+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var t=this.root,e=t.currentStyle;return(t.clientWidth||Nq(e.width))-Nq(e.paddingLeft)-Nq(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=t.currentStyle;return(t.clientHeight||Nq(e.height))-Nq(e.paddingTop)-Nq(e.paddingBottom)|0}},Rq(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],(function(t){var e;Vq.prototype[t]=(e=t,function(){zq('In IE8.0 VML mode painter not support method "'+e+'"')})}));var Bq=Vq;(0,v.registerPainter)("vml",Bq);var Gq={},Wq={};Wq.createElement=function(t){return document.createElementNS("http://www.w3.org/2000/svg",t)};var Hq=Wq.createElement,Fq=Je,Zq=Ni,Uq=Ri,jq=Hs,qq=Oo.CMD,Xq=Array.prototype.join,Yq="none",$q=Math.round,Kq=Math.sin,Jq=Math.cos,Qq=Math.PI,tX=2*Math.PI,eX=180/Qq;function iX(t){return $q(1e4*t)/1e4}function nX(t){return t<1e-4&&t>-1e-4}function aX(t,e){e&&rX(t,"transform","matrix("+Xq.call(e,",")+")")}function rX(t,e,i){(!i||"linear"!==i.type&&"radial"!==i.type)&&t.setAttribute(e,i)}function oX(t,e,i){if(function(t,e){var i=e?t.textFill:t.fill;return null!=i&&i!==Yq}(e,i)){var n=i?e.textFill:e.fill;n="transparent"===n?Yq:n,"none"!==t.getAttribute("clip-path")&&n===Yq&&(n="rgba(0, 0, 0, 0.002)"),rX(t,"fill",n),rX(t,"fill-opacity",e.opacity)}else rX(t,"fill",Yq);if(function(t,e){var i=e?t.textStroke:t.stroke;return null!=i&&i!==Yq}(e,i)){var a=i?e.textStroke:e.stroke;rX(t,"stroke",a="transparent"===a?Yq:a),rX(t,"stroke-width",(i?e.textStrokeWidth:e.lineWidth)/(e.strokeNoScale?e.host.getLineScale():1)),rX(t,"paint-order","stroke"),rX(t,"stroke-opacity",e.opacity),e.lineDash?(rX(t,"stroke-dasharray",e.lineDash.join(",")),rX(t,"stroke-dashoffset",$q(e.lineDashOffset||0))):rX(t,"stroke-dasharray",""),e.lineCap&&rX(t,"stroke-linecap",e.lineCap),e.lineJoin&&rX(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&rX(t,"stroke-miterlimit",e.miterLimit)}else rX(t,"stroke",Yq)}var sX={};sX.brush=function(t){var e=t.style,i=t.__svgEl;i||(i=Hq("path"),t.__svgEl=i),t.path||t.createPathProxy();var n=t.path;if(t.__dirtyPath){n.beginPath(),t.buildPath(n,t.shape),t.__dirtyPath=!1;var a=function(t){for(var e=[],i=t.data,n=t.len(),a=0;a<n;){var r="",o=0;switch(i[a++]){case qq.M:r="M",o=2;break;case qq.L:r="L",o=2;break;case qq.Q:r="Q",o=4;break;case qq.C:r="C",o=6;break;case qq.A:var s=i[a++],l=i[a++],h=i[a++],u=i[a++],c=i[a++],d=i[a++],p=i[a++],f=i[a++],g=Math.abs(d),m=nX(g%tX)&&!nX(g),v=!1;v=g>=tX||!nX(g)&&(d>-Qq&&d<0||d>Qq)==!!f;var y=iX(s+h*Jq(c)),x=iX(l+u*Kq(c));m&&(d=f?tX-1e-4:1e-4-tX,v=!0,9===a&&e.push("M",y,x));var _=iX(s+h*Jq(c+d)),b=iX(l+u*Kq(c+d));e.push("A",iX(h),iX(u),$q(p*eX),+v,+f,_,b);break;case qq.Z:r="Z";break;case qq.R:_=iX(i[a++]),b=iX(i[a++]);var w=iX(i[a++]),S=iX(i[a++]);e.push("M",_,b,"L",_+w,b,"L",_+w,b+S,"L",_,b+S,"L",_,b)}r&&e.push(r);for(var M=0;M<o;M++)e.push(iX(i[a++]))}return e.join(" ")}(n);a.indexOf("NaN")<0&&rX(i,"d",a)}oX(i,e),aX(i,t.transform),null!=e.text&&cX(t,t.getBoundingRect())};var lX={brush:function(t){var e=t.style,i=e.image;i instanceof HTMLImageElement&&(i=i.src);if(i){var n=e.x||0,a=e.y||0,r=e.width,o=e.height,s=t.__svgEl;s||(s=Hq("image"),t.__svgEl=s),i!==t.__imageSrc&&(!function(t,e,i){t.setAttributeNS("http://www.w3.org/1999/xlink",e,i)}(s,"href",i),t.__imageSrc=i),rX(s,"width",r),rX(s,"height",o),rX(s,"x",n),rX(s,"y",a),aX(s,t.transform),null!=e.text&&cX(t,t.getBoundingRect())}}},hX={},uX=new Fq,cX=function(t,e,i){var n=t.style;t.__dirty&&Uq.normalizeTextStyle(n,!0);var a=n.text;if(null!=a){a+="";var r,o,s=t.__textSvgEl;if(s||(s=Hq("text"),t.__textSvgEl=s),oX(s,n,!0),t instanceof jq||t.style.transformText)aX(s,t.transform);else if(t.transform)uX.copy(e),uX.applyTransform(t.transform),e=uX;else{var l=t.transformCoordToGlobal(e.x,e.y);e.x=l[0],e.y=l[1]}var h=n.textPosition,u=n.textDistance,c=n.textAlign||"left";"number"==typeof n.fontSize&&(n.fontSize+="px");var d=n.font||[n.fontStyle||"",n.fontWeight||"",n.fontSize||"",n.fontFamily||""].join(" ")||Zq.DEFAULT_FONT,p=dX(n.textVerticalAlign),f=(i=Zq.getBoundingRect(a,d,c,p)).lineHeight;if(h instanceof Array)r=e.x+h[0],o=e.y+h[1];else{var g=Zq.adjustTextPositionOnRect(h,e,u);r=g.x,o=g.y,p=dX(g.textVerticalAlign),c=g.textAlign}rX(s,"alignment-baseline",p),d&&(s.style.font=d);var m=n.textPadding;rX(s,"x",r),rX(s,"y",o);var v=a.split("\n"),y=v.length,x=c;"left"===x?(x="start",m&&(r+=m[3])):"right"===x?(x="end",m&&(r-=m[1])):"center"===x&&(x="middle",m&&(r+=(m[3]-m[1])/2));var _=0;if("baseline"===p?(_=-i.height+f,m&&(_-=m[2])):"middle"===p?(_=(-i.height+f)/2,m&&(o+=(m[0]-m[2])/2)):m&&(_+=m[0]),t.__text!==a||t.__textFont!==d){var b=t.__tspanList||[];t.__tspanList=b;for(var w=0;w<y;w++){(M=b[w])?M.innerHTML="":(M=b[w]=Hq("tspan"),s.appendChild(M),rX(M,"alignment-baseline",p),rX(M,"text-anchor",x)),rX(M,"x",r),rX(M,"y",o+w*f+_),M.appendChild(document.createTextNode(v[w]))}for(;w<b.length;w++)s.removeChild(b[w]);b.length=y,t.__text=a,t.__textFont=d}else if(t.__tspanList.length){var S=t.__tspanList.length;for(w=0;w<S;++w){var M;(M=t.__tspanList[w])&&(rX(M,"x",r),rX(M,"y",o+w*f+_))}}}};function dX(t){return"middle"===t?"middle":"bottom"===t?"baseline":"hanging"}function pX(){}function fX(t,e,i,n){for(var a=0,r=e.length,o=0,s=0;a<r;a++){var l=e[a];if(l.removed){for(h=[],u=s;u<s+l.count;u++)h.push(u);l.indices=h,s+=l.count}else{for(var h=[],u=o;u<o+l.count;u++)h.push(u);l.indices=h,o+=l.count,l.added||(s+=l.count)}}return e}hX.drawRectText=cX,hX.brush=function(t){var e=t.style;null!=e.text&&(e.textPosition=[0,0],cX(t,{x:e.x||0,y:e.y||0,width:0,height:0},t.getBoundingRect()))},Gq.path=sX,Gq.image=lX,Gq.text=hX,pX.prototype={diff:function(t,e,i){i||(i=function(t,e){return t===e}),this.equals=i;var n=this;t=t.slice();var a=(e=e.slice()).length,r=t.length,o=1,s=a+r,l=[{newPos:-1,components:[]}],h=this.extractCommon(l[0],e,t,0);if(l[0].newPos+1>=a&&h+1>=r){for(var u=[],c=0;c<e.length;c++)u.push(c);return[{indices:u,count:e.length}]}function d(){for(var i=-1*o;i<=o;i+=2){var s,h=l[i-1],u=l[i+1],c=(u?u.newPos:0)-i;h&&(l[i-1]=void 0);var d=h&&h.newPos+1<a,p=u&&0<=c&&c<r;if(d||p){if(!d||p&&h.newPos<u.newPos?(s={newPos:(f=u).newPos,components:f.components.slice(0)},n.pushComponent(s.components,void 0,!0)):((s=h).newPos++,n.pushComponent(s.components,!0,void 0)),c=n.extractCommon(s,e,t,i),s.newPos+1>=a&&c+1>=r)return fX(n,s.components);l[i]=s}else l[i]=void 0}var f;o++}for(;o<=s;){var p=d();if(p)return p}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var a=e.length,r=i.length,o=t.newPos,s=o-n,l=0;o+1<a&&s+1<r&&this.equals(e[o+1],i[s+1]);)o++,s++,l++;return l&&t.components.push({count:l}),t.newPos=o,s},tokenize:function(t){return t.slice()},join:function(t){return t.slice()}};var gX=new pX;var mX=function(t,e,i){return gX.diff(t,e,i)},vX=Wq.createElement,yX=b,xX=ms,_X=Jn,bX=Hs,wX=Gq,SX=wX.path,MX=wX.image,IX=wX.text;function AX(t,e,i){this._svgRoot=t,this._tagNames="string"==typeof e?[e]:e,this._markLabel=i,this.nextId=0}AX.prototype.createElement=vX,AX.prototype.getDefs=function(t){var e=this._svgRoot,i=this._svgRoot.getElementsByTagName("defs");return 0===i.length?t?((i=e.insertBefore(this.createElement("defs"),e.firstChild)).contains||(i.contains=function(t){var e=i.children;if(!e)return!1;for(var n=e.length-1;n>=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},AX.prototype.update=function(t,e){if(t){var i=this.getDefs(!1);if(t._dom&&i.contains(t._dom))"function"==typeof e&&e();else{var n=this.add(t);n&&(t._dom=n)}}},AX.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},AX.prototype.removeDom=function(t){this.getDefs(!1).removeChild(t._dom)},AX.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return yX.each(this._tagNames,(function(i){var n=t.getElementsByTagName(i);e=e.concat([].slice.call(n))})),e},AX.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;yX.each(t,(function(t){t[e._markLabel]="0"}))},AX.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},AX.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this.getDoms(),i=this;yX.each(e,(function(e){"1"!==e[i._markLabel]&&t.removeChild(e)}))}},AX.prototype.getSvgProxy=function(t){return t instanceof xX?SX:t instanceof _X?MX:t instanceof bX?IX:SX},AX.prototype.getTextSvgElement=function(t){return t.__textSvgEl},AX.prototype.getSvgElement=function(t){return t.__svgEl};var TX=AX,CX=TX,LX=b,DX=Ae;function PX(t){CX.call(this,t,["linearGradient","radialGradient"],"__gradient_in_use__")}LX.inherits(PX,CX),PX.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var i=this;LX.each(["fill","stroke"],(function(n){if(e.style[n]&&("linear"===e.style[n].type||"radial"===e.style[n].type)){var a,r=e.style[n],o=i.getDefs(!0);r._dom?(a=r._dom,o.contains(r._dom)||i.addDom(a)):a=i.add(r),i.markUsed(e);var s=a.getAttribute("id");t.setAttribute(n,"url(#"+s+")")}}))}},PX.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return DX("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},PX.prototype.update=function(t){var e=this;CX.prototype.update.call(this,t,(function(){var i=t.type,n=t._dom.tagName;"linear"===i&&"linearGradient"===n||"radial"===i&&"radialGradient"===n?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))}))},PX.prototype.updateDom=function(t,e){if("linear"===t.type)e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else{if("radial"!==t.type)return void DX("Illegal gradient type.");e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r)}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var i=t.colorStops,n=0,a=i.length;n<a;++n){var r=this.createElement("stop");r.setAttribute("offset",100*i[n].offset+"%"),r.setAttribute("stop-color",i[n].color),e.appendChild(r)}t._dom=e},PX.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&CX.prototype.markUsed.call(this,e._dom),(e=t.style.stroke)&&e._dom&&CX.prototype.markUsed.call(this,e._dom)}};var kX=PX,OX=TX,zX=b,EX=mt;function RX(t){OX.call(this,t,"clipPath","__clippath_in_use__")}zX.inherits(RX,OX),RX.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var i=this.getTextSvgElement(t);i&&this.updateDom(i,t.__clipPaths,!0),this.markUsed(t)},RX.prototype.updateDom=function(t,e,i){if(e&&e.length>0){var n,a,r=this.getDefs(!0),o=e[0],s=i?"_textDom":"_dom";o[s]?(a=o[s].getAttribute("id"),n=o[s],r.contains(n)||r.appendChild(n)):(a="zr-clip-"+this.nextId,++this.nextId,(n=this.createElement("clipPath")).setAttribute("id",a),r.appendChild(n),o[s]=n);var l=this.getSvgProxy(o);if(o.transform&&o.parent.invTransform&&!i){var h=Array.prototype.slice.call(o.transform);EX.mul(o.transform,o.parent.invTransform,o.transform),l.brush(o),o.transform=h}else l.brush(o);var u=this.getSvgElement(o);n.appendChild(u.cloneNode()),t.setAttribute("clip-path","url(#"+a+")"),e.length>1&&this.updateDom(n,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},RX.prototype.markUsed=function(t){var e=this;t.__clipPaths&&t.__clipPaths.length>0&&zX.each(t.__clipPaths,(function(t){t._dom&&OX.prototype.markUsed.call(e,t._dom),t._textDom&&OX.prototype.markUsed.call(e,t._textDom)}))};var NX=RX,VX=Wq.createElement,BX=b,GX=BX.each,WX=Ae,HX=ms,FX=Jn,ZX=Hs,UX=mX,jX=kX,qX=NX,XX=Gq,YX=XX.path,$X=XX.image,KX=XX.text;function JX(t){return parseInt(t,10)}function QX(t,e){return e&&t&&e.parentNode!==t}function tY(t,e,i){if(QX(t,e)&&i){var n=i.nextSibling;n?t.insertBefore(e,n):t.appendChild(e)}}function eY(t,e){if(QX(t,e)){var i=t.firstChild;i?t.insertBefore(e,i):t.appendChild(e)}}function iY(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function nY(t){return t.__textSvgEl}function aY(t){return t.__svgEl}var rY=function(t,e,i){this.root=t,this.storage=e,this._opts=i=BX.extend({},i||{});var n=VX("svg");n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.setAttribute("version","1.1"),n.setAttribute("baseProfile","full"),n.style["user-select"]="none",n.style.cssText="position:absolute;left:0;top:0;",this.gradientManager=new jX(n),this.clipPathManager=new qX(n);var a=document.createElement("div");a.style.cssText="overflow:hidden;position:relative",this._svgRoot=n,this._viewport=a,t.appendChild(a),a.appendChild(n),this.resize(i.width,i.height),this._visibleList=[]};rY.prototype={constructor:rY,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused();var e,i,n=this._svgRoot,a=this._visibleList,r=t.length,o=[];for(e=0;e<r;e++){var s=t[e],l=(i=s)instanceof HX?YX:i instanceof FX?$X:i instanceof ZX?KX:YX;s.invisible||(s.__dirty&&(l&&l.brush(s),this.clipPathManager.update(s),s.style&&(this.gradientManager.update(s.style.fill),this.gradientManager.update(s.style.stroke)),s.__dirty=!1),o.push(s))}var h,u=UX(a,o);for(e=0;e<u.length;e++){if((f=u[e]).removed)for(var c=0;c<f.count;c++){var d=aY(s=a[f.indices[c]]),p=nY(s);iY(n,d),iY(n,p)}}for(e=0;e<u.length;e++){var f;if((f=u[e]).added)for(c=0;c<f.count;c++){d=aY(s=o[f.indices[c]]),p=nY(s);h?tY(n,d,h):eY(n,d),d?tY(n,p,d):h?tY(n,p,h):eY(n,p),tY(n,p,d),h=p||d||h,this.gradientManager.addWithoutUpdate(d,s),this.clipPathManager.markUsed(s)}else if(!f.removed)for(c=0;c<f.count;c++){h=d=nY(s=o[f.indices[c]])||aY(s)||h,this.gradientManager.markUsed(s),this.gradientManager.addWithoutUpdate(d,s),this.clipPathManager.markUsed(s)}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this._visibleList=o},_getDefs:function(t){var e,i=this._svgRoot;return 0===(e=this._svgRoot.getElementsByTagName("defs")).length?t?((e=i.insertBefore(VX("defs"),i.firstChild)).contains||(e.contains=function(t){var i=e.children;if(!i)return!1;for(var n=i.length-1;n>=0;--n)if(i[n]===t)return!0;return!1}),e):null:e[0]},resize:function(t,e){var i=this._viewport;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!==t&&this._height!==e){this._width=t,this._height=e;var a=i.style;a.width=t+"px",a.height=e+"px";var r=this._svgRoot;r.setAttribute("width",t),r.setAttribute("height",e)}},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],a=["paddingLeft","paddingTop"][t],r=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[n]||JX(s[i])||JX(o.style[i]))-(JX(s[a])||0)-(JX(s[r])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},pathToSvg:function(){this.refresh();var t=this._svgRoot.outerHTML;return"data:img/svg+xml;utf-8,"+unescape(t)}},GX(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],(function(t){var e;rY.prototype[t]=(e=t,function(){WX('In SVG mode painter not support method "'+e+'"')})}));var oY=rY;(0,v.registerPainter)("svg",oY),function(t){var e=m;!function(){for(var i in e){if(null==e||!e.hasOwnProperty(i)||"default"===i||"__esModule"===i)return;t[i]=e[i]}}();var i=Ud;!function(){for(var e in i){if(null==i||!i.hasOwnProperty(e)||"default"===e||"__esModule"===e)return;t[e]=i[e]}}()}(g);const sY={class:"market-temperature"},lY={class:"container"},hY={class:"border3"},uY={class:"chart-section"},cY={class:"border4"},dY={class:"border1"},pY={class:"title"},fY=["src"],gY={class:"titleContent"},mY={class:"secondTitle"},vY={class:"secondTitleItem"},yY={class:"calendar"},xY={key:0,class:"month"},_Y={class:"monthContent"},bY={class:"calendarItemTitle"},wY={key:1,class:"calendarItemContent"},SY=["src"],MY={key:2,class:"calendarItemContent"},IY={key:3,class:"calendarItemContent"},AY={key:0},TY={key:1},CY={__name:"marketTemperature",props:{companyName:{type:String,default:""},stockCode:{type:String,default:""}},setup(t,{expose:e}){const m=t,v=i(["#32A3FF","#2BD977","#A239FF","#FF7945","#FF5289","#5791CB"]),y=i(["1","2","3","4","5","6","7","8","9","10","11","12"]),x=i(),_=i(["","","","","","",""]),b=i(),w=i([]),S=i([]);let M=null;const I=["NDX","DJIA","SPX","STI","KLSE","TSX","N225","KS11","JKSE","1A0001","HSI","I63","VNINDE"],A=n((()=>I.includes(m.stockCode))),T=i([]);function C(){const t=document.querySelector(".border4 .el-table");if(t){const e=t.offsetWidth/7,i=Math.min(.15*e,20),n=document.querySelectorAll(".WDRL_date"),a=document.querySelectorAll(".WDRL_data");n.forEach((t=>{t.style.fontSize=`${i}px`})),a.forEach((t=>{t.style.fontSize=.8*i+"px"}))}}return a((()=>{M&&(M.dispose(),M=null),window.marketTempResizeHandler&&(window.removeEventListener("resize",window.marketTempResizeHandler),window.marketTempResizeHandler=null),window.marketTempContainerObserver&&(window.marketTempContainerObserver.disconnect(),window.marketTempContainerObserver=null)})),e({initChart:function(t,e,n){if(!t||!e||!n)return void console.error("initChart: raw, klineDataRawValue or WDRLValue is undefined");console.log(m),M&&(M.dispose(),M=null);const a=e.map((t=>[t[1],t[2],t[3],t[4]]));let r=1/0,o=-1/0;e.forEach((t=>{const e=t[3],i=t[4];r=Math.min(r,e),o=Math.max(o,i)}));const s=Math.floor(r),l=Math.ceil(o);w.value=n,S.value=e,(()=>{const t=i([]);T.value=JSON.parse(JSON.stringify(w.value));for(let i=0;i<T.value.length;i++){const e=f(T.value[i].date).date();T.value[i].day=e,0!=i&&1!=e||(t.value.push({year:f(T.value[i].date).year(),month:f(T.value[i].date).month()+1}),T.value[i].month=f(T.value[i].date).month()+1);const n=T.value[i].stock_temperature;""==n||null==n||""==n?T.value[i].color=v.value[5]:n<="20"?T.value[i].color=v.value[0]:parseInt(n)<="50"?T.value[i].color=v.value[1]:parseInt(n)<="70"?T.value[i].color=v.value[2]:parseInt(n)<="90"?T.value[i].color=v.value[3]:T.value[i].color=v.value[4]}const e=t.value[0],n=t.value[t.value.length-1];x.value=`${e.year}${e.month} ~`,e.year!=n.year?x.value+=`${n.year}${n.month}`:x.value+=`${n.month}`,console.log(T.value)})();const h=t.map((t=>t[0])),u=t.map((t=>Math.round(t[1]))),c=t.map((t=>Math.round(t[2]))),d=c.every(((t,e)=>t===u[e])),p=d?c.map((()=>null)):c;M=g.init(b.value),M.setOption({tooltip:{trigger:"axis",confine:!0,position:function(t,e,i,n,a){const r=a.viewSize[0],o=a.viewSize[1],s=a.contentSize[0],l=a.contentSize[1];if(window.innerWidth<=768)return{top:10,left:Math.max(10,(r-s)/2)};{let e=t[0],i=t[1];return e+s>r&&(e=r-s-10),i+l>o&&(i=o-l-10),[Math.max(10,e),Math.max(10,i)]}},axisPointer:{type:"cross",crossStyle:{color:"#999",width:1,type:"dashed"},lineStyle:{color:"#999",width:1,type:"dashed"}},backgroundColor:"#646E71",borderColor:"#fff",borderWidth:1,padding:[8,12],textStyle:{color:"#fff",fontSize:window.innerWidth<=768?10:12},extraCssText:window.innerWidth<=768?"max-width: 280px; word-wrap: break-word; white-space: normal; box-shadow: 0 2px 8px rgba(0,0,0,0.3);":"max-width: 350px; word-wrap: break-word; white-space: normal; box-shadow: 0 2px 8px rgba(0,0,0,0.3);",formatter:function(t){if(t&&t.length>0){const e=window.innerWidth<=768,i=e?"10px":"12px",n=e?"1.3":"1.5",a=e?"4px":"6px";let r=`<div style="font-weight: bold; color: #fff; margin-bottom: ${a}; font-size: ${i}; line-height: ${n};">: ${t[0].name}</div>`;return t.forEach((t=>{if("candlestick"===t.seriesType){const o=t.data[1],s=t.data[2],l=t.data[3],h=t.data[4];e?(r+=`<div style="margin-bottom: ${a}; font-size: ${i}; line-height: ${n};">`,r+=`<div style="color: #fff; font-weight: bold; margin-bottom: 2px;">${t.seriesName}</div>`,r+=`<div style="color: #fff; display: flex; justify-content: space-between;"><span>:</span><span>${o}</span></div>`,r+=`<div style="color: #fff; display: flex; justify-content: space-between;"><span>:</span><span>${s}</span></div>`,r+=`<div style="color: #fff; display: flex; justify-content: space-between;"><span>:</span><span>${l}</span></div>`,r+=`<div style="color: #fff; display: flex; justify-content: space-between;"><span>:</span><span>${h}</span></div>`,r+="</div>"):(r+=`<div style="margin-bottom: ${a}; font-size: ${i}; line-height: ${n};">`,r+=`<div style="color: #fff; font-weight: bold;">${t.seriesName}</div>`,r+=`<div style="color: #fff;">: ${o}</div>`,r+=`<div style="color: #fff;">: ${s}</div>`,r+=`<div style="color: #fff;">: ${l}</div>`,r+=`<div style="color: #fff;">: ${h}</div>`,r+="</div>")}else"line"===t.seriesType&&(r+=`<div style="color: #fff; margin-bottom: 2px; font-size: ${i}; line-height: ${n};">${t.seriesName}: ${t.value}</div>`)})),r}return""}},legend:{data:["K线","",""],textStyle:{color:"white",fontSize:window.innerWidth<=768?14:18}},grid:{left:window.innerWidth<=768?"15%":"100px",right:window.innerWidth<=768?"40px":"100px",top:window.innerWidth<=768?"40px":"60px",bottom:window.innerWidth<=768?"60px":"80px",containLabel:!1,height:window.innerWidth<=768?"200px":"300px",width:window.innerWidth<=768?"70%":"80%"},xAxis:{type:"category",data:h,axisLine:{lineStyle:{color:"#00BFFF"}},axisLabel:{color:"#FFFFFF",fontSize:12,fontWeight:"bold"},axisTick:{show:!0,alignWithLabel:!0,lineStyle:{color:"white",width:1,type:"dashed"}},axisPointer:{show:!0,type:"line",lineStyle:{color:"#999",width:1,type:"dashed"},label:{show:!0,color:"black"}},splitLine:{show:!1,lineStyle:{color:"#999",width:1,type:"dashed",opacity:.3}}},yAxis:[{min:s,max:l,axisLine:{lineStyle:{color:"#00FF7F"}},axisLabel:{color:"#FFFFFF",fontSize:window.innerWidth<=768?10:12,fontWeight:"bold",formatter:function(t){return t.toString()},margin:8},axisTick:{lineStyle:{color:"#00FF7F"}},splitLine:{show:!1,lineStyle:{color:"#333333",type:"solid",opacity:.3}},axisPointer:{show:!0,type:"line",label:{show:!0,color:"black"},lineStyle:{color:"#999",width:1,type:"dashed"}}},{min:0,max:100,position:"right",axisLabel:{color:"#FFFF00",fontSize:window.innerWidth<=768?10:12,fontWeight:"bold",margin:8},axisLine:{lineStyle:{color:"#FF1493",width:2}},axisTick:{lineStyle:{color:"#FF1493"}},splitLine:{show:!1,lineStyle:{color:"#444444",type:"solid",opacity:.3}},axisPointer:{show:!0,type:"line",lineStyle:{color:"#999",width:1,type:"dashed"},label:{show:!0,color:"black"}}}],color:["#f00","white"],series:[{name:"K线",type:"candlestick",data:a,z:1,itemStyle:{normal:{color:"#00FF00",color0:"#FF0000",borderColor:"#00FF00",borderColor0:"#FF0000"}}},{name:"",type:"line",yAxisIndex:1,data:p,z:2,connectNulls:!1,lineStyle:{width:2},symbol:"circle",symbolSize:4},{name:"",type:"line",yAxisIndex:1,data:u,z:3,lineStyle:{width:2},symbol:"circle",symbolSize:4}],dataZoom:[{type:"slider",xAxisIndex:0,filterMode:"filter",textStyle:{color:"white"},start:50,end:100,bottom:"0%"},{type:"inside",xAxisIndex:0,filterMode:"filter"}]}),M&&(M.on("dataZoom",(()=>{window.handleChartInteractionStart&&window.handleChartInteractionStart()})),M.on("mousewheel",(()=>{window.handleChartInteractionStart&&window.handleChartInteractionStart()})),M.on("mousedown",(()=>{window.handleChartInteractionStart&&window.handleChartInteractionStart()})),M.on("mouseup",(()=>{window.handleChartInteractionEnd&&window.handleChartInteractionEnd()})),M.on("click",(()=>{window.handleChartInteractionStart&&window.handleChartInteractionStart()})));const y=(t,e)=>{let i;return function(...n){clearTimeout(i),i=setTimeout((()=>{clearTimeout(i),t(...n)}),e)}},_=y((()=>{if(M&&!M.isDisposed())try{M.resize(),C(),console.log("")}catch(t){console.error("resize:",t)}}),100);window.marketTempResizeHandler&&window.removeEventListener("resize",window.marketTempResizeHandler),window.addEventListener("resize",_),window.marketTempResizeHandler=_;const I=document.querySelector(".KlineClass");if(I&&window.ResizeObserver){const t=new ResizeObserver(y((()=>{if(M&&!M.isDisposed())try{M.resize(),console.log("")}catch(t){console.error("resize:",t)}}),100));t.observe(I),window.marketTempContainerObserver=t}C()}}),(t,e)=>(r(),o("div",sY,[s("div",lY,[s("div",hY,[s("section",uY,[s("div",null,[l(' <div class="trapezoid">\r\n <span>{{ companyName }}</span>\r\n <span>{{ stockCode }}</span>\r\n </div> '),s("div",{ref_key:"KlineCanvs",ref:b,class:"KlineClass"},null,512)])])]),s("div",cY,[s("div",dY,[s("div",pY,[s("img",{src:h("/aixiaocaishen/static/images/-d851a441.png"),alt:"",class:"titleImg"},null,8,fY),s("div",gY,u(x.value),1)]),s("div",mY,[(r(!0),o(c,null,d(_.value,(t=>(r(),o("div",{key:t,class:"secondTitleItems"},[s("div",vY,u(t),1)])))),128))]),s("div",yY,[(r(),o(c,null,d(5,(t=>s("div",{key:t,class:"calendarCol"},[(r(!0),o(c,null,d(T.value.slice(7*(t-1),7*t),(t=>(r(),o("div",{key:t,class:"calendarRow"},[s("div",{class:"calendarItem",style:p({backgroundColor:t.color})},[t.month?(r(),o("div",xY,[s("div",_Y,u(y.value[t.month-1]),1)])):l("v-if",!0),s("div",bY,u(t.day),1),""==t.stock_temperature?(r(),o("div",wY,[s("img",{src:h("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAgCAYAAACcuBHKAAAAAXNSR0IArs4c6QAAAj5JREFUWEftl7FrFEEUxr93im/mbjEolkpQQdRCJHaCCgrxHzBYphJsRAKKgq2FhQGxsFY7UVtBE0GxtbEQBEEjKkEQDIi3M4e7n6zkjs3e3d7c7QkWN+XOe9/+eG/eezOCIZf3fj/JcwBOAZgGYACsisirNE3vW2ufDykJCXUgqd77RQDnAWwq8VtKkmS+0WishmoHQawDPAFwMlD4K8lj1tqPIfZBEM65WwAuhgjmbN6q6oyItAb5DYRwzu0F8A7A5pzYZxG52mq1lqMo8nEcH6zVagsA5go/vGyMuVkZwnt/jeT1nNAaycPW2k9FcefcbQAXct/fG2P2VYZwzj0EcCYntGiMudRLmOSU9/4bAG3vq+o2EVkrAwlJxwsAJ9oiIjKnqo/6iTrnXgM40t4nudtau1IV4iWA4zmR08aYZyUQWZ/oVBHJPYOqJCQSRYhZY8xSCcTyeiP7azKByJ2J6ukgWS+06VhEfvdLRw/7XyKSjnQwSW4BUBtU40PsexFhL/uugxnH8bSIPAYwA4QPuACYHyQXrLX3irZdEN77uyTnA0RHMWmp6g4R+Zl37oJwzm1oTqP8qTT/IgdUNZtFnTWB6IyCYugm6WhHZBKJSST+1+p4CmB23J2yrZem6a56vf5lUMe8AeDKP4L4YIzJnhAbVlfbbjabO0XkjYhsHzMIReSsqma393KIbNd7f4jkHQBHxzTOV7LHkqo+CLpP5I1Ibo3jeKpKRJIkcVEUfe93ocm0B962qwCE+v4BZnoUMEqdbwsAAAAASUVORK5CYII="),alt:"",class:"ciImg"},null,8,SY)])):""==t.stock_temperature?(r(),o("div",MY," ")):(r(),o("div",IY,[A.value?(r(),o("div",AY,u(t.market_temperature),1)):(r(),o("div",TY,u(t.market_temperature)+" | "+u(t.stock_temperature),1))]))],4)])))),128))]))),64))])]),l(' <el-table :data="groupedWDRL" border :row-style="tableRowStyle" header-cell-class-name="table_header"\r\n :cell-style="tableCellStyle" :column-width="cellWidth">\r\n <el-table-column v-for="(day, colIndex) in [\'\', \'\', \'\', \'\', \'\', \'\', \'\']" :key="colIndex" :label="day">\r\n <template #default="{ $index: rowIndex }">\r\n <div v-if="getDayData(rowIndex, colIndex + 1)">\r\n <p class="WDRL_date">\r\n {{ formatDate(getDayData(rowIndex, colIndex + 1).date) }}\r\n <span class="month-display">{{ formatMonth(getDayData(rowIndex, colIndex + 1).date) }}</span>\r\n </p>\r\n <p class="WDRL_data">\r\n <template v-if="isIndexCode">\r\n <span v-if="getDayData(rowIndex, colIndex + 1).market_temperature">\r\n {{ getDayData(rowIndex, colIndex + 1).market_temperature }}\r\n </span>\r\n </template>\r\n<template v-else>\r\n <template v-if="isBothRest(rowIndex, colIndex + 1)"></template>\r\n<template v-else>\r\n <span v-if="getDayData(rowIndex, colIndex + 1).stock_temperature">\r\n {{ getDayData(rowIndex, colIndex + 1).stock_temperature }}\r\n </span>\r\n <span v-if="shouldShowDivider(rowIndex, colIndex + 1)"> | </span>\r\n <span v-if="getDayData(rowIndex, colIndex + 1).market_temperature">\r\n {{ getDayData(rowIndex, colIndex + 1).market_temperature }}\r\n </span>\r\n </template>\r\n</template>\r\n</p>\r\n</div>\r\n<div v-else-if="shouldShowRest(rowIndex, colIndex + 1)">\r\n <p class="WDRL_date"></p>\r\n</div>\r\n</template>\r\n</el-table-column>\r\n</el-table> ')])])]))}};var LY=e(CY,[["__scopeId","data-v-5d79aa79"],["__file","C:/Users/Administrator/Desktop/AIxiaocaishen/src/views/components/marketTemperature.vue"]]),DY=Object.freeze(Object.defineProperty({__proto__:null,default:LY},Symbol.toStringTag,{value:"Module"}));export{DY as a,g as e,LY as m};