!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("echarts")):"function"==typeof define&&define.amd?define(["echarts"],e):"object"==typeof exports?exports["echarts-wordcloud"]=e(require("echarts")):t["echarts-wordcloud"]=e(t.echarts)}(this,function(t){return function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=25)}([function(t,e){function r(t){if(null==t||"object"!=typeof t)return t;var e=t,n=W.call(t);if("[object Array]"===n){e=[];for(var i=0,a=t.length;i1e-10&&(i.width+=a/s,i.height+=a/s,i.x-=a/s/2,i.y-=a/s/2)}return i}return t},contain:function(t,e){var r=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),i=this.style;if(t=r[0],e=r[1],n.contain(t,e)){var a=this.path.data;if(i.hasStroke()){var o=i.lineWidth,l=i.strokeNoScale?this.getLineScale():1;if(l>1e-10&&(i.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),s.containStroke(a,o/l,t,e)))return!0}if(i.hasFill())return s.contain(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):i.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var r=this.shape;if(r){if(a.isObject(t))for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);else r[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&u(t[0]-1)>1e-10&&u(t[3]-1)>1e-10?Math.sqrt(u(t[0]*t[3]-t[2]*t[1])):1}},n.extend=function(t){var e=function(e){n.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var r=t.shape;if(r){this.shape=this.shape||{};var i=this.shape;for(var a in r)!i.hasOwnProperty(a)&&r.hasOwnProperty(a)&&(i[a]=r[a])}t.init&&t.init.call(this,e)};a.inherits(e,n);for(var r in t)"style"!==r&&"shape"!==r&&(e.prototype[r]=t[r]);return e},a.inherits(n,i),t.exports=n},function(t,e){var r="undefined"==typeof Float32Array?Array:Float32Array,n={create:function(t,e){var n=new r(2);return null==t&&(t=0),null==e&&(e=0),n[0]=t,n[1]=e,n},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},clone:function(t){var e=new r(2);return e[0]=t[0],e[1]=t[1],e},set:function(t,e,r){return t[0]=e,t[1]=r,t},add:function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t},scaleAndAdd:function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t},sub:function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t},len:function(t){return Math.sqrt(this.lenSquare(t))},lenSquare:function(t){return t[0]*t[0]+t[1]*t[1]},mul:function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t},div:function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t},normalize:function(t,e){var r=n.len(e);return 0===r?(t[0]=0,t[1]=0):(t[0]=e[0]/r,t[1]=e[1]/r),t},distance:function(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))},distanceSquare:function(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])},negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:function(t,e,r,n){return t[0]=e[0]+n*(r[0]-e[0]),t[1]=e[1]+n*(r[1]-e[1]),t},applyTransform:function(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[2]*i+r[4],t[1]=r[1]*n+r[3]*i+r[5],t},min:function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t},max:function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t}};n.length=n.len,n.lengthSquare=n.lenSquare,n.dist=n.distance,n.distSquare=n.distanceSquare,t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){r<0&&(t+=r,r=-r),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=r,this.height=n}var i=r(2),a=r(8),o=i.applyTransform,s=Math.min,l=Math.max;n.prototype={constructor:n,union:function(t){var e=s(t.x,this.x),r=s(t.y,this.y);this.width=l(t.x+t.width,this.x+this.width)-e,this.height=l(t.y+t.height,this.y+this.height)-r,this.x=e,this.y=r},applyTransform:function(){var t=[],e=[],r=[],n=[];return function(i){if(i){t[0]=r[0]=this.x,t[1]=n[1]=this.y,e[0]=n[0]=this.x+this.width,e[1]=r[1]=this.y+this.height,o(t,t,i),o(e,e,i),o(r,r,i),o(n,n,i),this.x=s(t[0],e[0],r[0],n[0]),this.y=s(t[1],e[1],r[1],n[1]);var a=l(t[0],e[0],r[0],n[0]),h=l(t[1],e[1],r[1],n[1]);this.width=a-this.x,this.height=h-this.y}}}(),calculateTransform:function(t){var e=this,r=t.width/e.width,n=t.height/e.height,i=a.create();return a.translate(i,i,[-e.x,-e.y]),a.scale(i,i,[r,n]),a.translate(i,i,[t.x,t.y]),i},intersect:function(t){if(!t)return!1;t instanceof n||(t=n.create(t));var e=this,r=e.x,i=e.x+e.width,a=e.y,o=e.y+e.height,s=t.x,l=t.x+t.width,h=t.y,u=t.y+t.height;return!(i=r.x&&t<=r.x+r.width&&e>=r.y&&e<=r.y+r.height},clone:function(){return new n(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}}},n.create=function(t){return new n(t.x,t.y,t.width,t.height)},t.exports=n},function(t,e,r){"use strict";function n(t){return t>-b&&tb||t<-b}function a(t,e,r,n,i){var a=1-i;return a*a*(a*t+3*i*e)+i*i*(i*n+3*a*r)}function o(t,e,r,n,i){var a=1-i;return 3*(((e-t)*a+2*(r-e)*i)*a+(n-r)*i*i)}function s(t,e,r,i,a,o){var s=i+3*(e-r)-t,l=3*(r-2*e+t),h=3*(e-t),u=t-a,c=l*l-3*s*h,f=l*h-9*s*u,d=h*h-3*l*u,g=0;if(n(c)&&n(f))if(n(l))o[0]=0;else{var p=-h/l;p>=0&&p<=1&&(o[g++]=p)}else{var v=f*f-4*c*d;if(n(v)){var m=f/c,p=-l/s+m,x=-m/2;p>=0&&p<=1&&(o[g++]=p),x>=0&&x<=1&&(o[g++]=x)}else if(v>0){var y=_(v),b=c*l+1.5*s*(-f+y),S=c*l+1.5*s*(-f-y);b=b<0?-w(-b,T):w(b,T),S=S<0?-w(-S,T):w(S,T);var p=(-l-(b+S))/(3*s);p>=0&&p<=1&&(o[g++]=p)}else{var k=(2*c*l-3*s*f)/(2*_(c*c*c)),C=Math.acos(k)/3,P=_(c),I=Math.cos(C),p=(-l-2*P*I)/(3*s),x=(-l+P*(I+M*Math.sin(C)))/(3*s),A=(-l+P*(I-M*Math.sin(C)))/(3*s);p>=0&&p<=1&&(o[g++]=p),x>=0&&x<=1&&(o[g++]=x),A>=0&&A<=1&&(o[g++]=A)}}return g}function l(t,e,r,a,o){var s=6*r-12*e+6*t,l=9*e+3*a-3*t-9*r,h=3*e-3*t,u=0;if(n(l)){if(i(s)){var c=-h/s;c>=0&&c<=1&&(o[u++]=c)}}else{var f=s*s-4*l*h;if(n(f))o[0]=-s/(2*l);else if(f>0){var d=_(f),c=(-s+d)/(2*l),g=(-s-d)/(2*l);c>=0&&c<=1&&(o[u++]=c),g>=0&&g<=1&&(o[u++]=g)}}return u}function h(t,e,r,n,i,a){var o=(e-t)*i+t,s=(r-e)*i+e,l=(n-r)*i+r,h=(s-o)*i+o,u=(l-s)*i+s,c=(u-h)*i+h;a[0]=t,a[1]=o,a[2]=h,a[3]=c,a[4]=c,a[5]=u,a[6]=l,a[7]=n}function u(t,e,r,n,i,o,s,l,h,u,c){var f,d,g,p,v,m=.005,x=1/0;k[0]=h,k[1]=u;for(var w=0;w<1;w+=.05)C[0]=a(t,r,i,s,w),C[1]=a(e,n,o,l,w),(p=y(k,C))=0&&p=0&&c<=1&&(o[u++]=c)}}else{var f=l*l-4*s*h;if(n(f)){var c=-l/(2*s);c>=0&&c<=1&&(o[u++]=c)}else if(f>0){var d=_(f),c=(-l+d)/(2*s),g=(-l-d)/(2*s);c>=0&&c<=1&&(o[u++]=c),g>=0&&g<=1&&(o[u++]=g)}}return u}function g(t,e,r){var n=t+r-2*e;return 0===n?.5:(t-e)/n}function p(t,e,r,n,i){var a=(e-t)*n+t,o=(r-e)*n+e,s=(o-a)*n+a;i[0]=t,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=r}function v(t,e,r,n,i,a,o,s,l){var h,u=.005,f=1/0;k[0]=o,k[1]=s;for(var d=0;d<1;d+=.05){C[0]=c(t,r,i,d),C[1]=c(e,n,a,d);var g=y(k,C);g=0&&gT&&(M=0,S={}),M++,S[r]=i,i}function i(t,e,r,n,i,s,l){return s?o(t,e,r,n,i,s,l):a(t,e,r,n,i,l)}function a(t,e,r,i,a,o){var h=v(t,e,a,o),u=n(t,e);a&&(u+=a[1]+a[3]);var c=h.outerHeight,f=s(0,u,r),d=l(0,c,i),g=new _(f,d,u,c);return g.lineHeight=h.lineHeight,g}function o(t,e,r,n,i,a,o){var h=m(t,{rich:a,truncate:o,font:e,textAlign:r,textPadding:i}),u=h.outerWidth,c=h.outerHeight,f=s(0,u,r),d=l(0,c,n);return new _(f,d,u,c)}function s(t,e,r){return"right"===r?t-=e:"center"===r&&(t-=e/2),t}function l(t,e,r){return"middle"===r?t-=e/2:"bottom"===r&&(t-=e),t}function h(t,e,r){var n=e.x,i=e.y,a=e.height,o=e.width,s=a/2,l="left",h="top";switch(t){case"left":n-=r,i+=s,l="right",h="middle";break;case"right":n+=r+o,i+=s,h="middle";break;case"top":n+=o/2,i-=r,l="center",h="bottom";break;case"bottom":n+=o/2,i+=a+r,l="center";break;case"inside":n+=o/2,i+=s,l="center",h="middle";break;case"insideLeft":n+=r,i+=s,h="middle";break;case"insideRight":n+=o-r,i+=s,l="right",h="middle";break;case"insideTop":n+=o/2,i+=r,l="center";break;case"insideBottom":n+=o/2,i+=a-r,l="center",h="bottom";break;case"insideTopLeft":n+=r,i+=r;break;case"insideTopRight":n+=o-r,i+=r,l="right";break;case"insideBottomLeft":n+=r,i+=a-r,h="bottom";break;case"insideBottomRight":n+=o-r,i+=a-r,l="right",h="bottom"}return{x:n,y:i,textAlign:l,textVerticalAlign:h}}function u(t,e,r,n,i){if(!e)return"";var a=(t+"").split("\n");i=c(e,r,n,i);for(var o=0,s=a.length;o=o;l++)s-=o;var h=n(r);return h>s&&(r="",h=0),s=t-h,i.ellipsis=r,i.ellipsisWidth=h,i.contentWidth=s,i.containerWidth=t,i}function f(t,e){var r=e.containerWidth,i=e.font,a=e.contentWidth;if(!r)return"";var o=n(t,i);if(o<=r)return t;for(var s=0;;s++){if(o<=a||s>=e.maxIterations){t+=e.ellipsis;break}var l=0===s?d(t,a,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*a/o):0;t=t.substr(0,l),o=n(t,i)}return""===t&&(t=e.placeholder),t}function d(t,e,r,n){for(var i=0,a=0,o=t.length;al)t="",a=[];else if(null!=h)for(var u=c(h-(r?r[1]+r[3]:0),e,n.ellipsis,{minChar:n.minChar,placeholder:n.placeholder}),d=0,p=a.length;di&&x(r,t.substring(i,a)),x(r,n[2],n[1]),i=k.lastIndex}ig)return{lines:[],width:0,height:0};_.textWidth=A.getWidth(_.text,T);var O=S.textWidth,D=null==O||"auto"===O;if("string"==typeof O&&"%"===O.charAt(O.length-1))_.percentWidth=O,h.push(_),O=0;else{if(D){O=_.textWidth;var L=S.textBackgroundColor,F=L&&L.image;F&&(F=b.findExistImage(F),b.isImageReady(F)&&(O=Math.max(O,F.width*C/F.height)))}var R=M?M[1]+M[3]:0;O+=R;var B=null!=d?d-y:null;null!=B&&Bthis._ux||x(e-this._yi)>this._uy||this._len<5;return this.addData(l.L,t,e),this._ctx&&r&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),r&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,r,n,i,a){return this.addData(l.C,t,e,r,n,i,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,r,n,i,a):this._ctx.bezierCurveTo(t,e,r,n,i,a)),this._xi=i,this._yi=a,this},quadraticCurveTo:function(t,e,r,n){return this.addData(l.Q,t,e,r,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,r,n):this._ctx.quadraticCurveTo(t,e,r,n)),this._xi=r,this._yi=n,this},arc:function(t,e,r,n,i,a){return this.addData(l.A,t,e,r,r,n,i-n,0,a?0:1),this._ctx&&this._ctx.arc(t,e,r,n,i,a),this._xi=p(i)*r+t,this._yi=v(i)*r+t,this},arcTo:function(t,e,r,n,i){return this._ctx&&this._ctx.arcTo(t,e,r,n,i),this},rect:function(t,e,r,n){return this._ctx&&this._ctx.rect(t,e,r,n),this.addData(l.R,t,e,r,n),this},closePath:function(){this.addData(l.Z);var t=this._ctx,e=this._x0,r=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,r),t.closePath()),this._xi=e,this._yi=r,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,r=0;re.length&&(this._expandData(),e=this.data);for(var r=0;r0&&p<=t||u<0&&p>=t||0==u&&(c>0&&v<=e||c<0&&v>=e);)n=this._dashIdx,r=o[n],p+=u*r,v+=c*r,this._dashIdx=(n+1)%x,u>0&&pl||c>0&&vh||s[n%2?"moveTo":"lineTo"](u>=0?d(p,t):g(p,t),c>=0?d(v,e):g(v,e));u=p-t,c=v-e,this._dashOffset=-m(u*u+c*c)},_dashedBezierTo:function(t,e,r,i,a,o){var s,l,h,u,c,f=this._dashSum,d=this._dashOffset,g=this._lineDash,p=this._ctx,v=this._xi,x=this._yi,y=n.cubicAt,w=0,_=this._dashIdx,b=g.length,S=0;for(d<0&&(d=f+d),d%=f,s=0;s<1;s+=.1)l=y(v,t,r,a,s+.1)-y(v,t,r,a,s),h=y(x,e,i,o,s+.1)-y(x,e,i,o,s),w+=m(l*l+h*h);for(;_d);_++);for(s=(S-d)/w;s<=1;)u=y(v,t,r,a,s),c=y(x,e,i,o,s),_%2?p.moveTo(u,c):p.lineTo(u,c),s+=g[_]/w,_=(_+1)%b;_%2!=0&&p.lineTo(a,o),l=a-u,h=o-c,this._dashOffset=-m(l*l+h*h)},_dashedQuadraticTo:function(t,e,r,n){var i=r,a=n;r=(r+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,r,n,i,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,y&&(this.data=new Float32Array(t)))},getBoundingRect:function(){h[0]=h[1]=c[0]=c[1]=Number.MAX_VALUE,u[0]=u[1]=f[0]=f[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,r=0,n=0,s=0,d=0;dh||x(o-i)>u||f===c-1)&&(t.lineTo(a,o),n=a,i=o);break;case l.C:t.bezierCurveTo(s[f++],s[f++],s[f++],s[f++],s[f++],s[f++]),n=s[f-2],i=s[f-1];break;case l.Q:t.quadraticCurveTo(s[f++],s[f++],s[f++],s[f++]),n=s[f-2],i=s[f-1];break;case l.A:var g=s[f++],m=s[f++],y=s[f++],w=s[f++],_=s[f++],b=s[f++],S=s[f++],M=s[f++],T=y>w?y:w,k=y>w?1:y/w,C=y>w?w/y:1,P=Math.abs(y-w)>.001,I=_+b;P?(t.translate(g,m),t.rotate(S),t.scale(k,C),t.arc(0,0,T,_,I,1-M),t.scale(1/k,1/C),t.rotate(-S),t.translate(-g,-m)):t.arc(g,m,T,_,I,1-M),1==f&&(e=p(_)*y+g,r=v(_)*w+m),n=p(I)*y+g,i=v(I)*w+m;break;case l.R:e=n=s[f],r=i=s[f+1],t.rect(s[f++],s[f++],s[f++],s[f++]);break;case l.Z:t.closePath(),n=e,i=r}}}},w.CMD=l,t.exports=w},function(e,r){e.exports=t},function(t,e){var r="undefined"==typeof Float32Array?Array:Float32Array,n={create:function(){var t=new r(6);return n.identity(t),t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},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},mul:function(t,e,r){var n=e[0]*r[0]+e[2]*r[1],i=e[1]*r[0]+e[3]*r[1],a=e[0]*r[2]+e[2]*r[3],o=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],l=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=n,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t},translate:function(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t},rotate:function(t,e,r){var n=e[0],i=e[2],a=e[4],o=e[1],s=e[3],l=e[5],h=Math.sin(r),u=Math.cos(r);return t[0]=n*u+o*h,t[1]=-n*h+o*u,t[2]=i*u+s*h,t[3]=-i*h+u*s,t[4]=u*a+h*l,t[5]=u*l-h*a,t},scale:function(t,e,r){var n=r[0],i=r[1];return t[0]=e[0]*n,t[1]=e[1]*i,t[2]=e[2]*n,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*i,t},invert:function(t,e){var r=e[0],n=e[2],i=e[4],a=e[1],o=e[3],s=e[5],l=r*o-a*n;return l?(l=1/l,t[0]=o*l,t[1]=-a*l,t[2]=-n*l,t[3]=r*l,t[4]=(n*s-o*i)*l,t[5]=(a*i-r*s)*l,t):null}};t.exports=n},function(t,e,r){function n(t){return t.replace(/^\s+/,"").replace(/\s+$/,"")}function i(t){return Math.floor(Math.log(t)/Math.LN10)}var a=r(0),o={};o.linearMap=function(t,e,r,n){var i=e[1]-e[0],a=r[1]-r[0];if(0===i)return 0===a?r[0]:(r[0]+r[1])/2;if(n)if(i>0){if(t<=e[0])return r[0];if(t>=e[1])return r[1]}else{if(t>=e[0])return r[0];if(t<=e[1])return r[1]}else{if(t===e[0])return r[0];if(t===e[1])return r[1]}return(t-e[0])/i*a+r[0]},o.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?n(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t},o.round=function(t,e,r){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),r?t:+t},o.asc=function(t){return t.sort(function(t,e){return t-e}),t},o.getPrecision=function(t){if(t=+t,isNaN(t))return 0;for(var e=1,r=0;Math.round(t*e)/e!==t;)e*=10,r++;return r},o.getPrecisionSafe=function(t){var e=t.toString(),r=e.indexOf("e");if(r>0){var n=+e.slice(r+1);return n<0?-n:0}var i=e.indexOf(".");return i<0?0:e.length-1-i},o.getPixelPrecision=function(t,e){var r=Math.log,n=Math.LN10,i=Math.floor(r(t[1]-t[0])/n),a=Math.round(r(Math.abs(e[1]-e[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20},o.getPercentWithPrecision=function(t,e,r){if(!t[e])return 0;var n=a.reduce(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===n)return 0;for(var i=Math.pow(10,r),o=a.map(t,function(t){return(isNaN(t)?0:t)/n*i*100}),s=100*i,l=a.map(o,function(t){return Math.floor(t)}),h=a.reduce(l,function(t,e){return t+e},0),u=a.map(o,function(t,e){return t-l[e]});hc&&(c=u[d],f=d);++l[f],u[f]=0,++h}return l[e]/i},o.MAX_SAFE_INTEGER=9007199254740991,o.remRadian=function(t){var e=2*Math.PI;return(t%e+e)%e},o.isRadianAroundZero=function(t){return t>-1e-4&&t<1e-4};var s=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;o.parseDate=function(t){if(t instanceof Date)return t;if("string"==typeof t){var e=s.exec(t);if(!e)return new Date(NaN);if(e[8]){var r=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(r-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,r,+(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))},o.quantity=function(t){return Math.pow(10,i(t))},o.nice=function(t,e){var r,n=i(t),a=Math.pow(10,n),o=t/a;return r=e?o<1.5?1:o<2.5?2:o<4?3:o<7?5:10:o<1?1:o<2?2:o<3?3:o<5?5:10,t=r*a,n>=-20?+t.toFixed(n<0?-n:0):t},o.reformIntervals=function(t){function e(t,r,n){return t.interval[n]=0},t.exports=o},function(t,e,r){function n(){var t=this.__cachedImgObj;this.onload=this.__cachedImgObj=null;for(var e=0;e=0||r&&n.indexOf(r,o)<0)){var s=this.getShallow(o);null!=s&&(i[t[a][0]]=s)}}return i}}},function(t,e,r){function n(t){t=t||{},o.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new a(t.style,this),this._rect=null,this.__clipPaths=[]}var i=r(0),a=r(38),o=r(16),s=r(46);n.prototype={constructor:n,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 r=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(r[0],r[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?o.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 a(t,this),this.dirty(!1),this}},i.inherits(n,o),i.mixin(n,s),t.exports=n},function(t,e,r){var n=r(0),i=r(9),a=r(5),o={};o.addCommas=function(t){return isNaN(t)?"-":(t=(t+"").split("."),t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:""))},o.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},o.normalizeCssArray=n.normalizeCssArray;var s=o.encodeHTML=function(t){return String(t).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},l=["a","b","c","d","e","f","g"],h=function(t,e){return"{"+t+(null==e?"":e)+"}"};o.formatTpl=function(t,e,r){n.isArray(e)||(e=[e]);var i=e.length;if(!i)return"";for(var a=e[0].$vars||[],o=0;o':""};var u=function(t){return t<10?"0"+t:t};o.formatTime=function(t,e,r){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=i.parseDate(e),a=r?"UTC":"",o=n["get"+a+"FullYear"](),s=n["get"+a+"Month"]()+1,l=n["get"+a+"Date"](),h=n["get"+a+"Hours"](),c=n["get"+a+"Minutes"](),f=n["get"+a+"Seconds"]();return t=t.replace("MM",u(s)).replace("M",s).replace("yyyy",o).replace("yy",o%100).replace("dd",u(l)).replace("d",l).replace("hh",u(h)).replace("h",h).replace("mm",u(c)).replace("m",c).replace("ss",u(f)).replace("s",f)},o.capitalFirst=function(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t},o.truncateText=a.truncateText,o.getTextRect=a.getBoundingRect,t.exports=o},function(t,e){var r=function(){this.head=null,this.tail=null,this._len=0},n=r.prototype;n.insert=function(t){var e=new i(t);return this.insertEntry(e),e},n.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++},n.remove=function(t){var e=t.prev,r=t.next;e?e.next=r:this.head=r,r?r.prev=e:this.tail=e,t.next=t.prev=null,this._len--},n.len=function(){return this._len},n.clear=function(){this.head=this.tail=null,this._len=0};var i=function(t){this.value=t,this.next,this.prev},a=function(t){this._list=new r,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},o=a.prototype;o.put=function(t,e){var r=this._list,n=this._map,a=null;if(null==n[t]){var o=r.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=r.head;r.remove(l),delete n[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new i(e),s.key=t,r.insertEntry(s),n[t]=s}return a},o.get=function(t){var e=this._map[t],r=this._list;if(null!=e)return e!==r.tail&&(r.remove(e),r.insertEntry(e)),e.value},o.clear=function(){this._list.clear(),this._map={}},t.exports=a},function(t,e){var r={};r="undefined"==typeof navigator?{browser:{},os:{},node:!0,canvasSupported:!0}:function(t){var e={},r={},n=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge\/([\d.]+)/),o=/micromessenger/i.test(t);return n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1]),o&&(r.weChat=!0),{browser:r,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,touchEventsSupported:"ontouchstart"in window&&!r.ie&&!r.edge,pointerEventsSupported:"onpointerdown"in window&&(r.edge||r.ie&&r.version>=11)}}(navigator.userAgent),t.exports=r},function(t,e,r){"use strict";var n=r(39),i=r(40),a=r(17),o=r(41),s=r(0),l=function(t){a.call(this,t),i.call(this,t),o.call(this,t),this.id=t.id||n()};l.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 r=this.transform;r||(r=this.transform=[1,0,0,1,0,0]),r[4]+=t,r[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 r=this[t];r||(r=this[t]=[]),r[0]=e[0],r[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(s.isObject(t))for(var r in t)t.hasOwnProperty(r)&&this.attrKV(r,t[r]);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 r=0;rs||t<-s}var i=r(8),a=r(2),o=i.identity,s=5e-5,l=function(t){t=t||{},t.position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},h=l.prototype;h.transform=null,h.needLocalTransform=function(){return n(this.rotation)||n(this.position[0])||n(this.position[1])||n(this.scale[0]-1)||n(this.scale[1]-1)},h.updateTransform=function(){var t=this.parent,e=t&&t.transform,r=this.needLocalTransform(),n=this.transform;if(!r&&!e)return void(n&&o(n));n=n||i.create(),r?this.getLocalTransform(n):o(n),e&&(r?i.mul(n,t.transform,n):i.copy(n,t.transform)),this.transform=n,this.invTransform=this.invTransform||i.create(),i.invert(this.invTransform,n)},h.getLocalTransform=function(t){return l.getLocalTransform(this,t)},h.setTransform=function(t){var e=this.transform,r=t.dpr||1;e?t.setTransform(r*e[0],r*e[1],r*e[2],r*e[3],r*e[4],r*e[5]):t.setTransform(r,0,0,r,0,0)},h.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var u=[];h.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(i.mul(u,t.invTransform,e),e=u);var r=e[0]*e[0]+e[1]*e[1],a=e[2]*e[2]+e[3]*e[3],o=this.position,s=this.scale;n(r-1)&&(r=Math.sqrt(r)),n(a-1)&&(a=Math.sqrt(a)),e[0]<0&&(r=-r),e[3]<0&&(a=-a),o[0]=e[4],o[1]=e[5],s[0]=r,s[1]=a,this.rotation=Math.atan2(-e[1]/a,e[0]/r)}},h.getGlobalScale=function(){var t=this.transform;if(!t)return[1,1];var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]),r=Math.sqrt(t[2]*t[2]+t[3]*t[3]);return t[0]<0&&(e=-e),t[3]<0&&(r=-r),[e,r]},h.transformCoordToLocal=function(t,e){var r=[t,e],n=this.invTransform;return n&&a.applyTransform(r,r,n),r},h.transformCoordToGlobal=function(t,e){var r=[t,e],n=this.transform;return n&&a.applyTransform(r,r,n),r},l.getLocalTransform=function(t,e){e=e||[],o(e);var r=t.origin,n=t.scale||[1,1],a=t.rotation||0,s=t.position||[0,0];return r&&(e[4]-=r[0],e[5]-=r[1]),i.scale(e,e,n),a&&i.rotate(e,e,a),r&&(e[4]+=r[0],e[5]+=r[1]),e[4]+=s[0],e[5]+=s[1],e},t.exports=l},function(t,e,r){function n(t){return t=Math.round(t),t<0?0:t>255?255:t}function i(t){return t=Math.round(t),t<0?0:t>360?360:t}function a(t){return t<0?0:t>1?1:t}function o(t){return n(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function s(t){return a(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function l(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}function h(t,e,r){return t+(e-t)*r}function u(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}function c(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function f(t,e){k&&c(k,e),k=T.put(t,k||e.slice())}function d(t,e){if(t){e=e||[];var r=T.get(t);if(r)return c(e,r);t+="";var n=t.replace(/ /g,"").toLowerCase();if(n in M)return c(e,M[n]),f(t,e),e;if("#"!==n.charAt(0)){var i=n.indexOf("("),a=n.indexOf(")");if(-1!==i&&a+1===n.length){var l=n.substr(0,i),h=n.substr(i+1,a-(i+1)).split(","),d=1;switch(l){case"rgba":if(4!==h.length)return void u(e,0,0,0,1);d=s(h.pop());case"rgb":return 3!==h.length?void u(e,0,0,0,1):(u(e,o(h[0]),o(h[1]),o(h[2]),d),f(t,e),e);case"hsla":return 4!==h.length?void u(e,0,0,0,1):(h[3]=s(h[3]),g(h,e),f(t,e),e);case"hsl":return 3!==h.length?void u(e,0,0,0,1):(g(h,e),f(t,e),e);default:return}}u(e,0,0,0,1)}else{if(4===n.length){var p=parseInt(n.substr(1),16);return p>=0&&p<=4095?(u(e,(3840&p)>>4|(3840&p)>>8,240&p|(240&p)>>4,15&p|(15&p)<<4,1),f(t,e),e):void u(e,0,0,0,1)}if(7===n.length){var p=parseInt(n.substr(1),16);return p>=0&&p<=16777215?(u(e,(16711680&p)>>16,(65280&p)>>8,255&p,1),f(t,e),e):void u(e,0,0,0,1)}}}}function g(t,e){var r=(parseFloat(t[0])%360+360)%360/360,i=s(t[1]),a=s(t[2]),o=a<=.5?a*(i+1):a+i-a*i,h=2*a-o;return e=e||[],u(e,n(255*l(h,o,r+1/3)),n(255*l(h,o,r)),n(255*l(h,o,r-1/3)),1),4===t.length&&(e[3]=t[3]),e}function p(t){if(t){var e,r,n=t[0]/255,i=t[1]/255,a=t[2]/255,o=Math.min(n,i,a),s=Math.max(n,i,a),l=s-o,h=(s+o)/2;if(0===l)e=0,r=0;else{r=h<.5?l/(s+o):l/(2-s-o);var u=((s-n)/6+l/2)/l,c=((s-i)/6+l/2)/l,f=((s-a)/6+l/2)/l;n===s?e=f-c:i===s?e=1/3+u-f:a===s&&(e=2/3+c-u),e<0&&(e+=1),e>1&&(e-=1)}var d=[360*e,r,h];return null!=t[3]&&d.push(t[3]),d}}function v(t,e){var r=d(t);if(r){for(var n=0;n<3;n++)r[n]=e<0?r[n]*(1-e)|0:(255-r[n])*e+r[n]|0;return b(r,4===r.length?"rgba":"rgb")}}function m(t,e){var r=d(t);if(r)return((1<<24)+(r[0]<<16)+(r[1]<<8)+ +r[2]).toString(16).slice(1)}function x(t,e,r){if(e&&e.length&&t>=0&&t<=1){r=r||[];var i=t*(e.length-1),o=Math.floor(i),s=Math.ceil(i),l=e[o],u=e[s],c=i-o;return r[0]=n(h(l[0],u[0],c)),r[1]=n(h(l[1],u[1],c)),r[2]=n(h(l[2],u[2],c)),r[3]=a(h(l[3],u[3],c)),r}}function y(t,e,r){if(e&&e.length&&t>=0&&t<=1){var i=t*(e.length-1),o=Math.floor(i),s=Math.ceil(i),l=d(e[o]),u=d(e[s]),c=i-o,f=b([n(h(l[0],u[0],c)),n(h(l[1],u[1],c)),n(h(l[2],u[2],c)),a(h(l[3],u[3],c))],"rgba");return r?{color:f,leftIndex:o,rightIndex:s,value:i}:f}}function w(t,e,r,n){if(t=d(t))return t=p(t),null!=e&&(t[0]=i(e)),null!=r&&(t[1]=s(r)),null!=n&&(t[2]=s(n)),b(g(t),"rgba")}function _(t,e){if((t=d(t))&&null!=e)return t[3]=a(e),b(t,"rgba")}function b(t,e){if(t&&t.length){var r=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(r+=","+t[3]),e+"("+r+")"}}var S=r(14),M={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]},T=new S(20),k=null;t.exports={parse:d,lift:v,toHex:m,fastLerp:x,fastMapToColor:x,lerp:y,mapToColor:y,modifyHSL:w,modifyAlpha:_,stringify:b}},function(t,e){var r=1;"undefined"!=typeof window&&(r=Math.max(window.devicePixelRatio||1,1));var n={debugMode:0,devicePixelRatio:r};t.exports=n},function(t,e,r){function n(t){if(t){t.font=v.makeFont(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||b[e]?e:"left";var r=t.textVerticalAlign||t.textBaseline;"center"===r&&(r="middle"),t.textVerticalAlign=null==r||S[r]?r:"top";t.textPadding&&(t.textPadding=m.normalizeCssArray(t.textPadding))}}function i(t,e,r,n,i){var a=d(e,"font",n.font||v.DEFAULT_FONT),o=n.textPadding,l=t.__textCotentBlock;l&&!t.__dirty||(l=t.__textCotentBlock=v.parsePlainText(r,a,o,n.truncate));var c=l.outerHeight,g=l.lines,m=l.lineHeight,x=f(c,n,i),y=x.baseX,w=x.baseY,_=x.textAlign,b=x.textVerticalAlign;s(e,n,i,y,w);var S=v.adjustTextY(w,c,b),M=y,C=S,P=h(n);if(P||o){var I=v.getWidth(r,a),A=I;o&&(A+=o[1]+o[3]);var O=v.adjustTextX(y,A,_);P&&u(t,e,n,O,S,A,c),o&&(M=p(y,_,o),C+=o[0])}d(e,"textAlign",_||"left"),d(e,"textBaseline","middle"),d(e,"shadowBlur",n.textShadowBlur||0),d(e,"shadowColor",n.textShadowColor||"transparent"),d(e,"shadowOffsetX",n.textShadowOffsetX||0),d(e,"shadowOffsetY",n.textShadowOffsetY||0),C+=m/2;var D=n.textStrokeWidth,L=T(n.textStroke,D),F=k(n.textFill);L&&(d(e,"lineWidth",D),d(e,"strokeStyle",L)),F&&d(e,"fillStyle",F);for(var R=0;R=0&&(k=P[R],"right"===k.textAlign);)l(t,e,k,n,A,S,F,"right"),O-=k.width,F-=k.width,R--;for(L+=(a-(L-b)-(M-F)-O)/2;D<=R;)k=P[D],l(t,e,k,n,A,S,L+k.width/2,"center"),L+=k.width,D++;S+=A}}function s(t,e,r,n,i){if(r&&e.textRotation){var a=e.textOrigin;"center"===a?(n=r.width/2+r.x,i=r.height/2+r.y):a&&(n=a[0]+r.x,i=a[1]+r.y),t.translate(n,i),t.rotate(-e.textRotation),t.translate(-n,-i)}}function l(t,e,r,n,i,a,o,s){var l=n.rich[r.styleName]||{},c=r.textVerticalAlign,f=a+i/2;"top"===c?f=a+r.height/2:"bottom"===c&&(f=a+i-r.height/2),!r.isLineHolder&&h(l)&&u(t,e,l,"right"===s?o-r.width:"center"===s?o-r.width/2:o,f-r.height/2,r.width,r.height);var g=r.textPadding;g&&(o=p(o,s,g),f-=r.height/2-g[2]-r.textHeight/2),d(e,"shadowBlur",w(l.textShadowBlur,n.textShadowBlur,0)),d(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),d(e,"shadowOffsetX",w(l.textShadowOffsetX,n.textShadowOffsetX,0)),d(e,"shadowOffsetY",w(l.textShadowOffsetY,n.textShadowOffsetY,0)),d(e,"textAlign",s),d(e,"textBaseline","middle"),d(e,"font",r.font||v.DEFAULT_FONT);var m=T(l.textStroke||n.textStroke,y),x=k(l.textFill||n.textFill),y=_(l.textStrokeWidth,n.textStrokeWidth);m&&(d(e,"lineWidth",y),d(e,"strokeStyle",m),e.strokeText(r.text,o,f)),x&&(d(e,"fillStyle",x),e.fillText(r.text,o,f))}function h(t){return t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor}function u(t,e,r,n,i,a,o){var s=r.textBackgroundColor,l=r.textBorderWidth,h=r.textBorderColor,u=m.isString(s);if(d(e,"shadowBlur",r.textBoxShadowBlur||0),d(e,"shadowColor",r.textBoxShadowColor||"transparent"),d(e,"shadowOffsetX",r.textBoxShadowOffsetX||0),d(e,"shadowOffsetY",r.textBoxShadowOffsetY||0),u||l&&h){e.beginPath();var f=r.textBorderRadius;f?x.buildPath(e,{x:n,y:i,width:a,height:o,r:f}):e.rect(n,i,a,o),e.closePath()}if(u)d(e,"fillStyle",s),e.fill();else if(m.isObject(s)){var g=s.image;g=y.createOrUpdateImage(g,null,t,c,s),g&&y.isImageReady(g)&&e.drawImage(g,n,i,a,o)}l&&h&&(d(e,"lineWidth",l),d(e,"strokeStyle",h),e.stroke())}function c(t,e){e.image=t}function f(t,e,r){var n=e.x||0,i=e.y||0,a=e.textAlign,o=e.textVerticalAlign;if(r){var s=e.textPosition;if(s instanceof Array)n=r.x+g(s[0],r.width),i=r.y+g(s[1],r.height);else{var l=v.adjustTextPositionOnRect(s,r,e.textDistance);n=l.x,i=l.y,a=a||l.textAlign,o=o||l.textVerticalAlign}var h=e.textOffset;h&&(n+=h[0],i+=h[1])}return{baseX:n,baseY:i,textAlign:a,textVerticalAlign:o}}function d(t,e,r){return t[e]=r,t[e]}function g(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function p(t,e,r){return"right"===e?t-r[1]:"center"===e?t+r[3]/2-r[1]/2:t+r[3]}var v=r(5),m=r(0),x=r(21),y=r(10),w=m.retrieve3,_=m.retrieve2,b={left:1,right:1,center:1},S={top:1,bottom:1,middle:1},M={};M.normalizeTextStyle=function(t){return n(t),m.each(t.rich,n),t},M.renderText=function(t,e,r,n,o){n.rich?a(t,e,r,n,o):i(t,e,r,n,o)};var T=M.getStroke=function(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t},k=M.getFill=function(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t};M.needDrawText=function(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)},t.exports=M},function(t,e){t.exports={buildPath:function(t,e){var r,n,i,a,o=e.x,s=e.y,l=e.width,h=e.height,u=e.r;l<0&&(o+=l,l=-l),h<0&&(s+=h,h=-h),"number"==typeof u?r=n=i=a=u:u instanceof Array?1===u.length?r=n=i=a=u[0]:2===u.length?(r=i=u[0],n=a=u[1]):3===u.length?(r=u[0],n=a=u[1],i=u[2]):(r=u[0],n=u[1],i=u[2],a=u[3]):r=n=i=a=0;var c;r+n>l&&(c=r+n,r*=l/c,n*=l/c),i+a>l&&(c=i+a,i*=l/c,a*=l/c),n+i>h&&(c=n+i,n*=h/c,i*=h/c),r+a>h&&(c=r+a,r*=h/c,a*=h/c),t.moveTo(o+r,s),t.lineTo(o+l-n,s),0!==n&&t.quadraticCurveTo(o+l,s,o+l,s+n),t.lineTo(o+l,s+h-i),0!==i&&t.quadraticCurveTo(o+l,s+h,o+l-i,s+h),t.lineTo(o+a,s+h),0!==a&&t.quadraticCurveTo(o,s+h,o,s+h-a),t.lineTo(o,s+r),0!==r&&t.quadraticCurveTo(o,s,o+r,s)}}},function(t,e){var r=2*Math.PI;t.exports={normalizeRadian:function(t){return t%=r,t<0&&(t+=r),t}}},function(t,e,r){var n=r(64),i=r(65);t.exports={buildPath:function(t,e,r){var a=e.points,o=e.smooth;if(a&&a.length>=2){if(o&&"spline"!==o){var s=i(a,o,r,e.smoothConstraint);t.moveTo(a[0][0],a[0][1]);for(var l=a.length,h=0;h<(r?l:l-1);h++){var u=s[2*h],c=s[2*h+1],f=a[(h+1)%l];t.bezierCurveTo(u[0],u[1],c[0],c[1],f[0],f[1])}}else{"spline"===o&&(a=n(a,r)),t.moveTo(a[0][0],a[0][1]);for(var h=1,d=a.length;h128){var l=r.data[o]+r.data[o+1]+r.data[o+2];i+=l,++a}}for(var h=i/a,o=0;oh?(n.data[o]=0,n.data[o+1]=0,n.data[o+2]=0,n.data[o+3]=0):(n.data[o]=255,n.data[o+1]=255,n.data[o+2]=255,n.data[o+3]=255)}e.putImageData(n,0,0)}var i=r(7),a=r(27);r(28),r(75);var o=r(76);if(!o.isSupported)throw new Error("Sorry your browser not support wordCloud");i.registerLayout(function(t,e){t.eachSeriesByType("wordCloud",function(r){function s(t){var e=t.detail.item;t.detail.drawn&&r.layoutInstance.ondraw&&(t.detail.drawn.gx+=l.x/m,t.detail.drawn.gy+=l.y/m,r.layoutInstance.ondraw(e[0],e[1],e[2],t.detail.drawn))}var l=a.getLayoutRect(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),h=r.getData(),u=document.createElement("canvas");u.width=l.width,u.height=l.height;var c=u.getContext("2d"),f=r.get("maskImage");if(f)try{c.drawImage(f,0,0,u.width,u.height),n(u)}catch(t){console.error("Invalid mask image"),console.error(t.toString())}var d=r.get("sizeRange"),g=r.get("rotationRange"),p=h.getDataExtent("value"),v=Math.PI/180,m=r.get("gridSize");o(u,{list:h.mapArray("value",function(t,e){var r=h.getItemModel(e);return[h.getName(e),r.get("textStyle.normal.textSize",!0)||i.number.linearMap(t,p,d),e]}).sort(function(t,e){return e[1]-t[1]}),fontFamily:r.get("textStyle.normal.fontFamily")||r.get("textStyle.emphasis.fontFamily")||t.get("textStyle.fontFamily"),fontWeight:r.get("textStyle.normal.fontWeight")||r.get("textStyle.emphasis.fontWeight")||t.get("textStyle.fontWeight"),gridSize:m,ellipticity:l.height/l.width,minRotation:g[0]*v,maxRotation:g[1]*v,clearCanvas:!f,rotateRatio:1,rotationStep:r.get("rotationStep")*v,drawOutOfBound:r.get("drawOutOfBound"),shuffle:!1,shape:r.get("shape")}),u.addEventListener("wordclouddrawn",s),r.layoutInstance&&r.layoutInstance.dispose(),r.layoutInstance={ondraw:null,dispose:function(){u.removeEventListener("wordclouddrawn",s),u.addEventListener("wordclouddrawn",function(t){t.preventDefault()})}}})}),i.registerPreprocessor(function(t){function e(t){t&&i.util.each(n,function(e){t.hasOwnProperty(e)&&(t["text"+i.format.capitalFirst(e)]=t[e])})}var r=(t||{}).series;!i.util.isArray(r)&&(r=r?[r]:[]);var n=["shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];i.util.each(r,function(t){if(t&&"wordCloud"===t.type){var r=t.textStyle||{};e(r.normal),e(r.emphasis)}})})},function(t,e,r){"use strict";function n(t,e,r,n,i){var a=0,o=0;null==n&&(n=1/0),null==i&&(i=1/0);var s=0;e.eachChild(function(l,h){var u,c,f=l.position,d=l.getBoundingRect(),g=e.childAt(h+1),p=g&&g.getBoundingRect();if("horizontal"===t){var v=d.width+(p?-p.x+d.x:0);u=a+v,u>n||l.newline?(a=0,u=v,o+=s+r,s=d.height):s=Math.max(s,d.height)}else{var m=d.height+(p?-p.y+d.y:0);c=o+m,c>i||l.newline?(a+=s+r,o=0,c=m,s=d.width):s=Math.max(s,d.width)}l.newline||(f[0]=a,f[1]=o,"horizontal"===t?a=u+r:o=c+r)})}var i=r(0),a=r(3),o=r(9),s=r(13),l=o.parsePercent,h=i.each,u={},c=u.LOCATION_PARAMS=["left","right","top","bottom","width","height"],f=u.HV_NAMES=[["width","left","right"],["height","top","bottom"]];u.box=n,u.vbox=i.curry(n,"vertical"),u.hbox=i.curry(n,"horizontal"),u.getAvailableSize=function(t,e,r){var n=e.width,i=e.height,a=l(t.x,n),o=l(t.y,i),h=l(t.x2,n),u=l(t.y2,i);return(isNaN(a)||isNaN(parseFloat(t.x)))&&(a=0),(isNaN(h)||isNaN(parseFloat(t.x2)))&&(h=n),(isNaN(o)||isNaN(parseFloat(t.y)))&&(o=0),(isNaN(u)||isNaN(parseFloat(t.y2)))&&(u=i),r=s.normalizeCssArray(r||0),{width:Math.max(h-a-r[1]-r[3],0),height:Math.max(u-o-r[0]-r[2],0)}},u.getLayoutRect=function(t,e,r){r=s.normalizeCssArray(r||0);var n=e.width,i=e.height,o=l(t.left,n),h=l(t.top,i),u=l(t.right,n),c=l(t.bottom,i),f=l(t.width,n),d=l(t.height,i),g=r[2]+r[0],p=r[1]+r[3],v=t.aspect;switch(isNaN(f)&&(f=n-u-p-o),isNaN(d)&&(d=i-c-g-h),null!=v&&(isNaN(f)&&isNaN(d)&&(v>n/i?f=.8*n:d=.8*i),isNaN(f)&&(f=v*d),isNaN(d)&&(d=f/v)),isNaN(o)&&(o=n-u-f-p),isNaN(h)&&(h=i-c-d-g),t.left||t.right){case"center":o=n/2-f/2-r[3];break;case"right":o=n-f-p}switch(t.top||t.bottom){case"middle":case"center":h=i/2-d/2-r[0];break;case"bottom":h=i-d-g}o=o||0,h=h||0,isNaN(f)&&(f=n-p-o-(u||0)),isNaN(d)&&(d=i-g-h-(c||0));var m=new a(o+r[3],h+r[0],f,d);return m.margin=r,m},u.positionElement=function(t,e,r,n,o){var s=!o||!o.hv||o.hv[0],l=!o||!o.hv||o.hv[1],h=o&&o.boundingMode||"all";if(s||l){var c;if("raw"===h)c="group"===t.type?new a(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(c=t.getBoundingRect(),t.needLocalTransform()){var f=t.getLocalTransform();c=c.clone(),c.applyTransform(f)}e=u.getLayoutRect(i.defaults({width:c.width,height:c.height},e),r,n);var d=t.position,g=s?e.x-c.x:0,p=l?e.y-c.y:0;t.attr("position","raw"===h?[g,p]:[d[0]+g,d[1]+p])}},u.sizeCalculable=function(t,e){return null!=t[f[e][0]]||null!=t[f[e][1]]&&null!=t[f[e][2]]},u.mergeLayoutParam=function(t,e,r){function n(r,n){var i={},s=0,u={},c=0;if(h(r,function(e){u[e]=t[e]}),h(r,function(t){a(e,t)&&(i[t]=u[t]=e[t]),o(i,t)&&s++,o(u,t)&&c++}),l[n])return o(e,r[1])?u[r[2]]=null:o(e,r[2])&&(u[r[1]]=null),u;if(2!==c&&s){if(s>=2)return i;for(var f=0;f=r.length&&r.push({option:t})}}),r},u.makeIdAndName=function(t){var e=s.createHashMap();l(t,function(t,r){var n=t.exist;n&&e.set(n.id,t)}),l(t,function(t,r){var n=t.option;s.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={})}),l(t,function(t,r){var n=t.exist,i=t.option,a=t.keyInfo;if(h(i)){if(a.name=null!=i.name?i.name+"":n?n.name:"\0-",n)a.id=n.id;else if(null!=i.id)a.id=i.id+"";else{var o=0;do{a.id="\0"+a.name+"\0"+o++}while(e.get(a.id))}e.set(a.id,t)}})},u.isIdInner=function(t){return h(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")},u.compressBatches=function(t,e){function r(t,e,r){for(var n=0,i=t.length;n=0)&&(n={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth},t.textFill="#fff",null==t.textStroke&&(t.textStroke=r.autoColor,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),n}function w(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth)}function _(t,e,r,n,i,a){if("function"==typeof i&&(a=i,i=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(i,n.getAnimationDelayParams?n.getAnimationDelayParams(e,i):null)),"function"==typeof s&&(s=s(i)),s>0?e.animateTo(r,s,h||0,l,a,!!a):(e.stopAnimation(),e.attr(r),a&&a())}else e.stopAnimation(),e.attr(r),a&&a()}var b=r(0),S=r(37),M=r(1),T=r(18),k=r(8),C=r(2),P=r(17),I=r(3),A=Math.round,O=Math.max,D=Math.min,L={},F={};F.Group=r(56),F.Image=r(57),F.Text=r(58),F.Circle=r(59),F.Sector=r(60),F.Ring=r(62),F.Polygon=r(63),F.Polyline=r(66),F.Rect=r(67),F.Line=r(68),F.BezierCurve=r(69),F.Arc=r(70),F.CompoundPath=r(71),F.LinearGradient=r(72),F.RadialGradient=r(73),F.BoundingRect=I,F.extendShape=function(t){return M.extend(t)},F.extendPath=function(t,e){return S.extendFromString(t,e)},F.makePath=function(t,e,r,n){var i=S.createFromString(t,e),a=i.getBoundingRect();if(r){var o=a.width/a.height;if("center"===n){var s,l=r.height*o;l<=r.width?s=r.height:(l=r.width,s=l/o);var h=r.x+r.width/2,u=r.y+r.height/2;r.x=h-l/2,r.y=u-s/2,r.width=l,r.height=s}F.resizePath(i,r)}return i},F.mergePath=S.mergePath,F.resizePath=function(t,e){if(t.applyTransform){var r=t.getBoundingRect(),n=r.calculateTransform(e);t.applyTransform(n)}},F.subPixelOptimizeLine=function(t){var e=t.shape,r=t.style.lineWidth;return A(2*e.x1)===A(2*e.x2)&&(e.x1=e.x2=R(e.x1,r,!0)),A(2*e.y1)===A(2*e.y2)&&(e.y1=e.y2=R(e.y1,r,!0)),t},F.subPixelOptimizeRect=function(t){var e=t.shape,r=t.style.lineWidth,n=e.x,i=e.y,a=e.width,o=e.height;return e.x=R(e.x,r,!0),e.y=R(e.y,r,!0),e.width=Math.max(R(n+a,r,!1)-e.x,0===a?0:1),e.height=Math.max(R(i+o,r,!1)-e.y,0===o?0:1),t};var R=F.subPixelOptimize=function(t,e,r){var n=A(2*t);return(n+A(e))%2==0?n/2:(n+(r?1:-1))/2};F.setHoverStyle=function(t,e,r){t.__hoverSilentOnTouch=r&&r.hoverSilentOnTouch,"group"===t.type?t.traverse(function(t){"group"!==t.type&&u(t,e)}):u(t,e),t.on("mouseover",c).on("mouseout",f),t.on("emphasis",d).on("normal",g)},F.setLabelStyle=function(t,e,r,n,i,a,o){i=i||L;var s=i.labelFetcher,l=i.labelDataIndex,h=i.labelDimIndex,u=r.getShallow("show"),c=n.getShallow("show"),f=u||c?b.retrieve2(s?s.getFormattedLabel(l,"normal",null,h):null,i.defaultText):null,d=u?f:null,g=c?b.retrieve2(s?s.getFormattedLabel(l,"emphasis",null,h):null,f):null;null==d&&null==g||(B(t,r,a,i),B(e,n,o,i,!0)),t.text=d,e.text=g};var B=F.setTextStyle=function(t,e,r,n,i){return p(t,e,n,i),r&&b.extend(t,r),t.host&&t.host.dirty&&t.host.dirty(!1),t};F.setText=function(t,e,r){var n,i={isRectText:!0};!1===r?n=!0:i.autoColor=r,p(t,e,i,n),t.host&&t.host.dirty&&t.host.dirty(!1)},F.getFont=function(t,e){var r=e||e.getModel("textStyle");return[t.fontStyle||r&&r.getShallow("fontStyle")||"",t.fontWeight||r&&r.getShallow("fontWeight")||"",(t.fontSize||r&&r.getShallow("fontSize")||12)+"px",t.fontFamily||r&&r.getShallow("fontFamily")||"sans-serif"].join(" ")},F.updateProps=function(t,e,r,n,i){_(!0,t,e,r,n,i)},F.initProps=function(t,e,r,n,i){_(!1,t,e,r,n,i)},F.getTransform=function(t,e){for(var r=k.identity([]);t&&t!==e;)k.mul(r,t.getLocalTransform(),r),t=t.parent;return r},F.applyTransform=function(t,e,r){return e&&!b.isArrayLike(e)&&(e=P.getLocalTransform(e)),r&&(e=k.invert([],e)),C.applyTransform([],t,e)},F.transformDirection=function(t,e,r){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),i=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-n:"right"===t?n:0,"top"===t?-i:"bottom"===t?i:0];return a=F.applyTransform(a,e,r),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"},F.groupTransition=function(t,e,r,n){function i(t){var e={position:C.clone(t.position),rotation:t.rotation};return t.shape&&(e.shape=b.extend({},t.shape)),e}if(t&&e){var a=function(t){var e={};return t.traverse(function(t){!t.isGroup&&t.anid&&(e[t.anid]=t)}),e}(t);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=a[t.anid];if(e){var n=i(t);t.attr(i(e)),F.updateProps(t,n,r,t.dataIndex)}}})}},F.clipPointsByRect=function(t,e){return b.map(t,function(t){var r=t[0];r=O(r,e.x),r=D(r,e.x+e.width);var n=t[1];return n=O(n,e.y),n=D(n,e.y+e.height),[r,n]})},F.clipRectByRect=function(t,e){var r=O(t.x,e.x),n=D(t.x+t.width,e.x+e.width),i=O(t.y,e.y),a=D(t.y+t.height,e.y+e.height);if(n>=r&&a>=i)return{x:r,y:i,width:n-r,height:a-i}},F.createIcon=function(t,e,r){e=b.extend({rectHover:!0},e);var n=e.style={strokeNoScale:!0};if(r=r||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(n.image=t.slice(8),b.defaults(n,r),new F.Image(e)):F.makePath(t.replace("path://",""),e,r,"center")},t.exports=F},function(t,e,r){function n(t,e,r,n,i,a,o,s,l,h,g){var m=l*(d/180),x=f(m)*(t-r)/2+c(m)*(e-n)/2,y=-1*c(m)*(t-r)/2+f(m)*(e-n)/2,w=x*x/(o*o)+y*y/(s*s);w>1&&(o*=u(w),s*=u(w));var _=(i===a?-1:1)*u((o*o*(s*s)-o*o*(y*y)-s*s*(x*x))/(o*o*(y*y)+s*s*(x*x)))||0,b=_*o*y/s,S=_*-s*x/o,M=(t+r)/2+f(m)*b-c(m)*S,T=(e+n)/2+c(m)*b+f(m)*S,k=v([1,0],[(x-b)/o,(y-S)/s]),C=[(x-b)/o,(y-S)/s],P=[(-1*x-b)/o,(-1*y-S)/s],I=v(C,P);p(C,P)<=-1&&(I=d),p(C,P)>=1&&(I=0),0===a&&I>0&&(I-=2*d),1===a&&I<0&&(I+=2*d),g.addData(h,M,T,o,s,k,I,m,a)}function i(t){if(!t)return[];var e,r=t.replace(/-/g," -").replace(/ /g," ").replace(/ /g,",").replace(/,,/g,",");for(e=0;e0&&""===v[0]&&v.shift();for(var m=0;m0},extendFrom:function(t,e){if(t)for(var r in t)!t.hasOwnProperty(r)||!0!==e&&(!1===e?this.hasOwnProperty(r):null==t[r])||(this[r]=t[r])},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 a="radial"===e.type?n:r,o=a(t,e,i),s=e.colorStops,l=0;l3&&(e=r.call(e,1));for(var i=this._$handlers[t],a=i.length,o=0;o4&&(e=r.call(e,1,e.length-1));for(var i=e[e.length-1],a=this._$handlers[t],o=a.length,s=0;s0&&this.animate(t,!1).when(null==n?500:n,o).delay(a||0),this}},t.exports=h},function(t,e,r){function n(t,e){return t[e]}function i(t,e,r){t[e]=r}function a(t,e,r){return(e-t)*r+t}function o(t,e,r){return r>.5?e:t}function s(t,e,r,n,i){var o=t.length;if(1==i)for(var s=0;si)t.length=i;else for(var a=n;a=0&&!(P[r]<=e);r--);r=Math.min(r,_-2)}else{for(r=H;r<_&&!(P[r]>e);r++);r=Math.min(r-1,_-2)}H=r,j=e;var n=P[r+1]-P[r];if(0!==n)if(z=(e-P[r])/n,w)if(E=I[r],N=I[0===r?r:r-1],W=I[r>_-2?_-1:r+1],q=I[r>_-3?_-1:r+2],M)u(N,E,W,q,z,z*z,z*z*z,p(t,i),C);else{var l;if(T)l=u(N,E,W,q,z,z*z,z*z*z,X,1),l=d(X);else{if(k)return o(E,W,z);l=c(N,E,W,q,z,z*z,z*z*z)}x(t,i,l)}else if(M)s(I[r],I[r+1],z,p(t,i),C);else{var l;if(T)s(I[r],I[r+1],z,X,1),l=d(X);else{if(k)return o(I[r],I[r+1],z);l=a(I[r],I[r+1],z)}x(t,i,l)}},V=new v({target:t._target,life:b,loop:t._loop,delay:t._delay,onframe:Y,ondestroy:r});return e&&"spline"!==e&&(V.easing=e),V}}}var v=r(43),m=r(18),x=r(0),y=x.isArrayLike,w=Array.prototype.slice,_=function(t,e,r,a){this._tracks={},this._target=t,this._loop=e||!1,this._getter=r||n,this._setter=a||i,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};_.prototype={when:function(t,e){var r=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!r[n]){r[n]=[];var i=this._getter(this._target,n);if(null==i)continue;0!==t&&r[n].push({time:0,value:f(i)})}r[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t1)for(var t in arguments)console.log(arguments[t])}},function(t,e,r){var n=r(20),i=r(3),a=new i,o=function(){};o.prototype={constructor:o,drawRectText:function(t,e){var r=this.style;e=r.textRect||e,this.__dirty&&n.normalizeTextStyle(r,!0);var i=r.text;if(null!=i&&(i+=""),n.needDrawText(i,r)){t.save();var o=this.transform;r.transformText?this.setTransform(t):o&&(a.copy(e),a.applyTransform(o),e=a),n.renderText(this,t,i,r,e),t.restore()}}},t.exports=o},function(t,e,r){var n=r(2),i=r(4),a={},o=Math.min,s=Math.max,l=Math.sin,h=Math.cos,u=n.create(),c=n.create(),f=n.create(),d=2*Math.PI;a.fromPoints=function(t,e,r){if(0!==t.length){var n,i=t[0],a=i[0],l=i[0],h=i[1],u=i[1];for(n=1;n1e-4)return g[0]=t-r,g[1]=e-i,p[0]=t+r,void(p[1]=e+i);if(u[0]=h(a)*r+t,u[1]=l(a)*i+e,c[0]=h(o)*r+t,c[1]=l(o)*i+e,v(g,u,c),m(p,u,c),a%=d,a<0&&(a+=d),o%=d,o<0&&(o+=d),a>o&&!s?o+=d:aa&&(f[0]=h(w)*r+t,f[1]=l(w)*i+e,v(g,f,g),m(p,f,p))},t.exports=a},function(t,e,r){"use strict";function n(t,e){return Math.abs(t-e)e&&u>n&&u>o&&u>l||u1&&i(),f=p.cubicAt(e,n,o,l,_[0]),v>1&&(d=p.cubicAt(e,n,o,l,_[1]))),2==v?x<_[0]?g+=fe&&s>n&&s>a||s=0&&h<=1){for(var u=0,c=p.quadraticAt(e,n,a,h),f=0;fr||s<-r)return 0;var l=Math.sqrt(r*r-s*s);w[0]=-l,w[1]=l;var h=Math.abs(n-i);if(h<1e-4)return 0;if(h%x<1e-4){n=0,i=x;var u=a?1:-1;return o>=w[0]+t&&o<=w[1]+t?u:0}if(a){var l=n;n=g(i),i=g(l)}else n=g(n),i=g(i);n>i&&(i+=x);for(var c=0,f=0;f<2;f++){var d=w[f];if(d+t>o){var p=Math.atan2(s,d),u=a?1:-1;p<0&&(p=x+p),(p>=n&&p<=i||p+x>=n&&p+x<=i)&&(p>Math.PI/2&&p<1.5*Math.PI&&(u=-u),c+=u)}}return c}function l(t,e,r,i,l){for(var u=0,g=0,p=0,x=0,y=0,w=0;w1&&(r||(u+=v(g,p,x,y,i,l))),1==w&&(g=t[w],p=t[w+1],x=g,y=p),_){case h.M:x=t[w++],y=t[w++],g=x,p=y;break;case h.L:if(r){if(m(g,p,t[w],t[w+1],e,i,l))return!0}else u+=v(g,p,t[w],t[w+1],i,l)||0;g=t[w++],p=t[w++];break;case h.C:if(r){if(c.containStroke(g,p,t[w++],t[w++],t[w++],t[w++],t[w],t[w+1],e,i,l))return!0}else u+=a(g,p,t[w++],t[w++],t[w++],t[w++],t[w],t[w+1],i,l)||0;g=t[w++],p=t[w++];break;case h.Q:if(r){if(f.containStroke(g,p,t[w++],t[w++],t[w],t[w+1],e,i,l))return!0}else u+=o(g,p,t[w++],t[w++],t[w],t[w+1],i,l)||0;g=t[w++],p=t[w++];break;case h.A:var b=t[w++],S=t[w++],M=t[w++],T=t[w++],k=t[w++],C=t[w++],P=(t[w++],1-t[w++]),I=Math.cos(k)*M+b,A=Math.sin(k)*T+S;w>1?u+=v(g,p,I,A,i,l):(x=I,y=A);var O=(i-b)*T/M+b;if(r){if(d.containStroke(b,S,T,k,k+C,P,e,O,l))return!0}else u+=s(b,S,T,k,k+C,P,O,l);g=Math.cos(k+C)*M+b,p=Math.sin(k+C)*T+S;break;case h.R:x=g=t[w++],y=p=t[w++];var D=t[w++],L=t[w++],I=x+D,A=y+L;if(r){if(m(x,y,I,y,e,i,l)||m(I,y,I,A,e,i,l)||m(I,A,x,A,e,i,l)||m(x,A,x,y,e,i,l))return!0}else u+=v(I,y,I,A,i,l),u+=v(x,A,x,y,i,l);break;case h.Z:if(r){if(m(g,p,x,y,e,i,l))return!0}else u+=v(g,p,x,y,i,l);g=x,p=y}}return r||n(p,y)||(u+=v(g,p,x,y,i,l)||0),0!==u}var h=r(6).CMD,u=r(49),c=r(50),f=r(51),d=r(52),g=r(22).normalizeRadian,p=r(4),v=r(53),m=u.containStroke,x=2*Math.PI,y=1e-4,w=[-1,-1,-1],_=[-1,-1];t.exports={contain:function(t,e,r){return l(t,0,!1,e,r)},containStroke:function(t,e,r,n){return l(t,e,!0,r,n)}}},function(t,e){t.exports={containStroke:function(t,e,r,n,i,a,o){if(0===i)return!1;var s=i,l=0,h=t;if(o>e+s&&o>n+s||ot+s&&a>r+s||ae+f&&c>i+f&&c>o+f&&c>l+f||ct+f&&u>r+f&&u>a+f&&u>s+f||ue+u&&h>i+u&&h>o+u||ht+u&&l>r+u&&l>a+u||lr||f+co&&(o+=i);var g=Math.atan2(u,h);return g<0&&(g+=i),g>=a&&g<=o||g+i>=a&&g+i<=o}}},function(t,e){t.exports=function(t,e,r,n,i,a){if(a>e&&a>n||ai?o:0}},function(t,e){var r=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};r.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")},t.exports=r},function(t,e,r){function n(t,e){var r,n,a,u,c,f,d=t.data,g=i.M,p=i.C,v=i.L,m=i.R,x=i.A,y=i.Q;for(a=0,u=0;a=0&&(r.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,r=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof o&&t.addChildrenToStorage(e)),r&&r.refresh()},remove:function(t){var e=this.__zr,r=this.__storage,i=this._children,a=n.indexOf(i,t);return a<0?this:(i.splice(a,1),t.parent=null,r&&(r.delFromStorage(t),t instanceof o&&t.delChildrenFromStorage(r)),e&&e.refresh(),this)},removeAll:function(){var t,e,r=this._children,n=this.__storage;for(e=0;e=11?function(){var e,r=this.__clipPaths,n=this.style;if(r)for(var a=0;ar-2?r-1:d+1],c=t[d>r-3?r-1:d+2]);var v=g*g,m=g*v;a.push([n(h[0],p[0],u[0],c[0],g,v,m),n(h[1],p[1],u[1],c[1],g,v,m)])}return a}},function(t,e,r){var n=r(2),i=n.min,a=n.max,o=n.scale,s=n.distance,l=n.add;t.exports=function(t,e,r,h){var u,c,f,d,g=[],p=[],v=[],m=[];if(h){f=[1/0,1/0],d=[-1/0,-1/0];for(var x=0,y=t.length;x=0?1/(Math.cos(2*Math.PI/10-e)+3.07768*Math.sin(2*Math.PI/10-e)):1/(Math.cos(e)+3.07768*Math.sin(e))}}n.gridSize=Math.max(Math.floor(n.gridSize),4);var h,u,c,f,d,g,p,v=n.gridSize,m=v-n.maskGapWidth,x=Math.abs(n.maxRotation-n.minRotation),y=Math.min(n.maxRotation,n.minRotation),w=n.rotationStep;switch(n.color){case"random-dark":p=function(){return r(10,50)};break;case"random-light":p=function(){return r(50,90)};break;default:"function"==typeof n.color&&(p=n.color)}var _=null;"function"==typeof n.classes&&(_=n.classes);var b,S=!1,M=[],T=function(t){var e,r,n=t.currentTarget,i=n.getBoundingClientRect();t.touches?(e=t.touches[0].clientX,r=t.touches[0].clientY):(e=t.clientX,r=t.clientY);var a=e-i.left,o=r-i.top,s=Math.floor(a*(n.width/i.width||1)/v),l=Math.floor(o*(n.height/i.height||1)/v);return M[s][l]},k=function(t){var e=T(t);if(b!==e){if(b=e,!e)return void n.hover(void 0,void 0,t);n.hover(e.item,e.dimension,t)}},C=function(t){var e=T(t);e&&(n.click(e.item,e.dimension,t),t.preventDefault())},P=[],I=function(t){if(P[t])return P[t];var e=8*t,r=e,i=[];for(0===t&&i.push([f[0],f[1],0]);r--;){var a=1;"circle"!==n.shape&&(a=n.shape(r/e*2*Math.PI)),i.push([f[0]+t*a*Math.cos(-r/e*2*Math.PI),f[1]+t*a*Math.sin(-r/e*2*Math.PI)*n.ellipticity,r/e*2*Math.PI])}return P[t]=i,i},A=function(){return n.abortThreshold>0&&(new Date).getTime()-g>n.abortThreshold},O=function(){return 0===n.rotateRatio?0:Math.random()>n.rotateRatio?0:0===x?y:y+Math.round(Math.random()*x/w)*w},D=function(t,e,r){var i=n.weightFactor(e);if(i<=n.minSize)return!1;var a=1;iP[1]&&(P[1]=C),SP[2]&&(P[2]=S);break t}}return{mu:a,occupied:k,bounds:P,gw:y,gh:x,fillTextOffsetX:p,fillTextOffsetY:m,fillTextWidth:h,fillTextHeight:u,fontSize:i}},L=function(t,e,r,i,a){for(var o=a.length;o--;){var s=t+a[o][0],l=e+a[o][1];if(s>=u||l>=c||s<0||l<0){if(!n.drawOutOfBound)return!1}else if(!h[s][l])return!1}return!0},F=function(e,r,i,a,o,s,l,h,u){var c,f=i.fontSize;c=p?p(a,o,f,s,l):n.color;var d;d=_?_(a,o,f,s,l):n.classes;var g=i.bounds;g[3],g[0],g[1],g[3],g[2],g[0],t.forEach(function(t){if(t.getContext){var o=t.getContext("2d"),s=i.mu;o.save(),o.scale(1/s,1/s),o.font=n.fontWeight+" "+(f*s).toString(10)+"px "+n.fontFamily,o.fillStyle=c,o.translate((e+i.gw/2)*v*s,(r+i.gh/2)*v*s),0!==h&&o.rotate(-h),o.textBaseline="middle",o.fillText(a,i.fillTextOffsetX*s,(i.fillTextOffsetY+.5*f)*s),o.restore()}else{var l=document.createElement("span"),g="";g="rotate("+-h/Math.PI*180+"deg) ",1!==i.mu&&(g+="translateX(-"+i.fillTextWidth/4+"px) scale("+1/i.mu+")");var p={position:"absolute",display:"block",font:n.fontWeight+" "+f*i.mu+"px "+n.fontFamily,left:(e+i.gw/2)*v+i.fillTextOffsetX+"px",top:(r+i.gh/2)*v+i.fillTextOffsetY+"px",width:i.fillTextWidth+"px",height:i.fillTextHeight+"px",lineHeight:f+"px",whiteSpace:"nowrap",transform:g,webkitTransform:g,msTransform:g,transformOrigin:"50% 40%",webkitTransformOrigin:"50% 40%",msTransformOrigin:"50% 40%"};c&&(p.color=c),l.textContent=a;for(var m in p)l.style[m]=p[m];if(u)for(var x in u)l.setAttribute(x,u[x]);d&&(l.className+=d),t.appendChild(l)}})},R=function(e,r,n,i,a){if(!(e>=u||r>=c||e<0||r<0)){if(h[e][r]=!1,n){t[0].getContext("2d").fillRect(e*v,r*v,m,m)}S&&(M[e][r]={item:a,dimension:i})}},B=function(e,r,i,a,o,s){var l,h=o.occupied,f=n.drawMask;f&&(l=t[0].getContext("2d"),l.save(),l.fillStyle=n.maskColor);var d;if(S){var g=o.bounds;d={x:(e+g[3])*v,y:(r+g[0])*v,w:(g[1]-g[3]+1)*v,h:(g[2]-g[0]+1)*v}}for(var p=h.length;p--;){var m=e+h[p][0],x=r+h[p][1];m>=u||x>=c||m<0||x<0||R(m,x,f,d,s)}f&&l.restore()},z=function(t){var e,r,i;Array.isArray(t)?(e=t[0],r=t[1]):(e=t.word,r=t.weight,i=t.attributes);var a=O(),o=D(e,r,a);if(!o)return!1;if(A())return!1;if(!n.drawOutOfBound){var l=o.bounds;if(l[1]-l[3]+1>u||l[2]-l[0]+1>c)return!1}for(var h=d+1;h--;){var f=I(d-h);n.shuffle&&(f=[].concat(f),s(f));for(var g=0;g=n.list.length)return w(P),N("wordcloudstop",!1),void _("wordcloudstart",T);g=(new Date).getTime();var e=z(n.list[o]),r=!N("wordclouddrawn",!0,{item:n.list[o],drawn:e});if(A()||r)return w(P),n.abort(),N("wordcloudabort",!1),N("wordcloudstop",!1),void _("wordcloudstart",T);o++,P=y(t,n.wait)},n.wait)}}()}};l.isSupported=a,l.minFontSize=o,n=[],void 0!==(i=function(){return l}.apply(e,n))&&(t.exports=i)}()}])});