!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.zrender={})}(this,function(t){"use strict";function e(t){if(null==t||"object"!=typeof t)return t;var i=t,r=qr.call(t);if("[object Array]"===r){if(!k(t)){i=[];for(var n=0,a=t.length;n=0){var n="touchend"!==r?e.targetTouches[0]:e.changedTouches[0];n&&q(t,n,e,i)}else q(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&cn.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function Y(t,e,i){un?t.addEventListener(e,i):t.attachEvent("on"+e,i)}function U(t,e,i){un?t.removeEventListener(e,i):t.detachEvent("on"+e,i)}function G(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}function Z(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}function Q(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,stop:$}}function $(t){fn(this.event)}function K(){}function J(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var r,n=t;n;){if(n.clipPath&&!n.clipPath.contain(e,i))return!1;n.silent&&(r=!0),n=n.parent}return!r||gn}return!1}function tt(){var t=new yn(6);return et(t),t}function et(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function it(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function rt(t,e,i){var r=e[0]*i[0]+e[2]*i[1],n=e[1]*i[0]+e[3]*i[1],a=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],h=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=r,t[1]=n,t[2]=a,t[3]=o,t[4]=s,t[5]=h,t}function nt(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}function at(t,e,i){var r=e[0],n=e[2],a=e[4],o=e[1],s=e[3],h=e[5],l=Math.sin(i),u=Math.cos(i);return t[0]=r*u+o*l,t[1]=-r*l+o*u,t[2]=n*u+s*l,t[3]=-n*l+u*s,t[4]=u*a+l*h,t[5]=u*h-l*a,t}function ot(t,e,i){var r=i[0],n=i[1];return t[0]=e[0]*r,t[1]=e[1]*n,t[2]=e[2]*r,t[3]=e[3]*n,t[4]=e[4]*r,t[5]=e[5]*n,t}function st(t,e){var i=e[0],r=e[2],n=e[4],a=e[1],o=e[3],s=e[5],h=i*o-a*r;return h?(h=1/h,t[0]=o*h,t[1]=-a*h,t[2]=-r*h,t[3]=i*h,t[4]=(r*s-o*n)*h,t[5]=(a*n-i*s)*h,t):null}function ht(t){return t>wn||t<-wn}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}function ut(t){return(t=Math.round(t))<0?0:t>255?255:t}function ct(t){return(t=Math.round(t))<0?0:t>360?360:t}function ft(t){return t<0?0:t>1?1:t}function dt(t){return ut(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100*255:parseInt(t,10))}function pt(t){return ft(t.length&&"%"===t.charAt(t.length-1)?parseFloat(t)/100:parseFloat(t))}function gt(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 vt(t,e,i){return t+(e-t)*i}function _t(t,e,i,r,n){return t[0]=e,t[1]=i,t[2]=r,t[3]=n,t}function yt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function mt(t,e){On&&yt(On,e),On=In.put(t,On||e.slice())}function xt(t,e){if(t){e=e||[];var i=In.get(t);if(i)return yt(e,i);var r=(t+="").replace(/ /g,"").toLowerCase();if(r in Bn)return yt(e,Bn[r]),mt(t,e),e;if("#"!==r.charAt(0)){var n=r.indexOf("("),a=r.indexOf(")");if(-1!==n&&a+1===r.length){var o=r.substr(0,n),s=r.substr(n+1,a-(n+1)).split(","),h=1;switch(o){case"rgba":if(4!==s.length)return void _t(e,0,0,0,1);h=pt(s.pop());case"rgb":return 3!==s.length?void _t(e,0,0,0,1):(_t(e,dt(s[0]),dt(s[1]),dt(s[2]),h),mt(t,e),e);case"hsla":return 4!==s.length?void _t(e,0,0,0,1):(s[3]=pt(s[3]),wt(s,e),mt(t,e),e);case"hsl":return 3!==s.length?void _t(e,0,0,0,1):(wt(s,e),mt(t,e),e);default:return}}_t(e,0,0,0,1)}else{if(4===r.length)return(l=parseInt(r.substr(1),16))>=0&&l<=4095?(_t(e,(3840&l)>>4|(3840&l)>>8,240&l|(240&l)>>4,15&l|(15&l)<<4,1),mt(t,e),e):void _t(e,0,0,0,1);if(7===r.length){var l=parseInt(r.substr(1),16);return l>=0&&l<=16777215?(_t(e,(16711680&l)>>16,(65280&l)>>8,255&l,1),mt(t,e),e):void _t(e,0,0,0,1)}}}}function wt(t,e){var i=(parseFloat(t[0])%360+360)%360/360,r=pt(t[1]),n=pt(t[2]),a=n<=.5?n*(r+1):n+r-n*r,o=2*n-a;return e=e||[],_t(e,ut(255*gt(o,a,i+1/3)),ut(255*gt(o,a,i)),ut(255*gt(o,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function bt(t){if(t){var e,i,r=t[0]/255,n=t[1]/255,a=t[2]/255,o=Math.min(r,n,a),s=Math.max(r,n,a),h=s-o,l=(s+o)/2;if(0===h)e=0,i=0;else{i=l<.5?h/(s+o):h/(2-s-o);var u=((s-r)/6+h/2)/h,c=((s-n)/6+h/2)/h,f=((s-a)/6+h/2)/h;r===s?e=f-c:n===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,i,l];return null!=t[3]&&d.push(t[3]),d}}function kt(t){var e=xt(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Tt(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var r=t*(e.length-1),n=Math.floor(r),a=Math.ceil(r),o=e[n],s=e[a],h=r-n;return i[0]=ut(vt(o[0],s[0],h)),i[1]=ut(vt(o[1],s[1],h)),i[2]=ut(vt(o[2],s[2],h)),i[3]=ft(vt(o[3],s[3],h)),i}}function St(t,e,i){if(e&&e.length&&t>=0&&t<=1){var r=t*(e.length-1),n=Math.floor(r),a=Math.ceil(r),o=xt(e[n]),s=xt(e[a]),h=r-n,l=Mt([ut(vt(o[0],s[0],h)),ut(vt(o[1],s[1],h)),ut(vt(o[2],s[2],h)),ft(vt(o[3],s[3],h))],"rgba");return i?{color:l,leftIndex:n,rightIndex:a,value:r}:l}}function Mt(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+")"}}function Ct(t,e){return t[e]}function At(t,e,i){t[e]=i}function Pt(t,e,i){return(e-t)*i+t}function Lt(t,e,i){return i>.5?e:t}function zt(t,e,i,r,n){var a=t.length;if(1===n)for(s=0;sn)t.length=n;else for(o=r;o=0&&!(v[i]<=e);i--);i=Math.min(i,u-2)}else{for(i=L;ie);i++);i=Math.min(i-1,u-2)}L=i,z=e;var r=v[i+1]-v[i];if(0!==r)if(S=(e-v[i])/r,h)if(C=_[i],M=_[0===i?i:i-1],A=_[i>u-2?u-1:i+1],P=_[i>u-3?u-1:i+2],f)It(M,C,A,P,S,S*S,S*S*S,o(t,n),g);else{if(d)a=It(M,C,A,P,S,S*S,S*S*S,D,1),a=Et(D);else{if(p)return Lt(C,A,S);a=Ot(M,C,A,P,S,S*S,S*S*S)}s(t,n,a)}else if(f)zt(_[i],_[i+1],S,o(t,n),g);else{var a;if(d)zt(_[i],_[i+1],S,D,1),a=Et(D);else{if(p)return Lt(_[i],_[i+1],S);a=Pt(_[i],_[i+1],S)}s(t,n,a)}},ondestroy:i});return e&&"spline"!==e&&(B.easing=e),B}}}function Nt(t,e,i,r,n,a,o,s){g(r)?(a=n,n=r,r=0):p(n)?(a=n,n="linear",r=0):p(r)?(a=r,r=0):p(i)?(a=i,i=500):i||(i=500),t.stopAnimation(),Wt(t,"",t,e,i,r,s);var h=t.animators.slice(),l=h.length;l||a&&a();for(var u=0;u0&&t.animate(e,!1).when(null==n?500:n,s).delay(a||0)}function Vt(t,e,i,r){if(e){var n={};n[e]={},n[e][i]=r,t.attr(n)}else t.attr(i,r)}function qt(t,e,i,r){i<0&&(t+=i,i=-i),r<0&&(e+=r,r=-r),this.x=t,this.y=e,this.width=i,this.height=r}function Xt(t){for(var e=0;t>=$n;)e|=1&t,t>>=1;return t+e}function jt(t,e,i,r){var n=e+1;if(n===i)return 1;if(r(t[n++],t[e])<0){for(;n=0;)n++;return n-e}function Yt(t,e,i){for(i--;e>>1])<0?h=a:s=a+1;var l=r-s;switch(l){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(;l>0;)t[s+l]=t[s+l-1],l--}t[s]=o}}function Gt(t,e,i,r,n,a){var o=0,s=0,h=1;if(a(t,e[i+n])>0){for(s=r-n;h0;)o=h,(h=1+(h<<1))<=0&&(h=s);h>s&&(h=s),o+=n,h+=n}else{for(s=n+1;hs&&(h=s);var l=o;o=n-h,h=n-l}for(o++;o>>1);a(t,e[i+u])>0?o=u+1:h=u}return h}function Zt(t,e,i,r,n,a){var o=0,s=0,h=1;if(a(t,e[i+n])<0){for(s=n+1;hs&&(h=s);var l=o;o=n-h,h=n-l}else{for(s=r-n;h=0;)o=h,(h=1+(h<<1))<=0&&(h=s);h>s&&(h=s),o+=n,h+=n}for(o++;o>>1);a(t,e[i+u])<0?h=u:o=u+1}return h}function Qt(t,e){function i(i){var s=a[i],l=o[i],u=a[i+1],c=o[i+1];o[i]=l+c,i===h-3&&(a[i+1]=a[i+2],o[i+1]=o[i+2]),h--;var f=Zt(t[u],t,s,l,0,e);s+=f,0!==(l-=f)&&0!==(c=Gt(t[s+l-1],t,u,c,c-1,e))&&(l<=c?r(s,l,u,c):n(s,l,u,c))}function r(i,r,n,a){var o=0;for(o=0;o=Kn||d>=Kn);if(p)break;g<0&&(g=0),g+=2}if((s=g)<1&&(s=1),1===r){for(o=0;o=0;o--)t[d+o]=t[f+o];if(0===r){_=!0;break}}if(t[c--]=l[u--],1==--a){_=!0;break}if(0!=(v=a-Gt(t[h],l,0,a,a-1,e))){for(a-=v,d=(c-=v)+1,f=(u-=v)+1,o=0;o=Kn||v>=Kn);if(_)break;p<0&&(p=0),p+=2}if((s=p)<1&&(s=1),1===a){for(d=(c-=r)+1,f=(h-=r)+1,o=r-1;o>=0;o--)t[d+o]=t[f+o];t[c]=l[u]}else{if(0===a)throw new Error;for(f=c-(a-1),o=0;o=0;o--)t[d+o]=t[f+o];t[c]=l[u]}else for(f=c-(a-1),o=0;o1;){var t=h-2;if(t>=1&&o[t-1]<=o[t]+o[t+1]||t>=2&&o[t-2]<=o[t]+o[t-1])o[t-1]o[t+1])break;i(t)}},this.forceMergeRuns=function(){for(;h>1;){var t=h-2;t>0&&o[t-1]s&&(h=s),Ut(t,i,i+h,i+a,e),a=h}o.pushRun(i,a),o.mergeRuns(),n-=a,i+=a}while(0!==n);o.forceMergeRuns()}}function Kt(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function Jt(t,e,i){var r=null==e.x?0:e.x,n=null==e.x2?1:e.x2,a=null==e.y?0:e.y,o=null==e.y2?0:e.y2;return e.global||(r=r*i.width+i.x,n=n*i.width+i.x,a=a*i.height+i.y,o=o*i.height+i.y),r=isNaN(r)?0:r,n=isNaN(n)?1:n,a=isNaN(a)?0:a,o=isNaN(o)?0:o,t.createLinearGradient(r,a,n,o)}function te(t,e,i){var r=i.width,n=i.height,a=Math.min(r,n),o=null==e.x?.5:e.x,s=null==e.y?.5:e.y,h=null==e.r?.5:e.r;return e.global||(o=o*r+i.x,s=s*n+i.y,h*=a),t.createRadialGradient(o,s,0,o,s,h)}function ee(){return!1}function ie(t,e,i){var r=$r(),n=e.getWidth(),a=e.getHeight(),o=r.style;return o&&(o.position="absolute",o.left=0,o.top=0,o.width=n+"px",o.height=a+"px",r.setAttribute("data-zr-dom-id",t)),r.width=n*i,r.height=a*i,r}function re(t){if("string"==typeof t){var e=fa.get(t);return e&&e.image}return t}function ne(t,e,i,r,n){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!i)return e;var a=fa.get(t),o={hostEl:i,cb:r,cbPayload:n};return a?!oe(e=a.image)&&a.pending.push(o):((e=new Image).onload=e.onerror=ae,fa.put(t,e.__cachedImgObj={image:e,pending:[o]}),e.src=e.__zrImageSrc=t),e}return t}return e}function ae(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;ega&&(pa=0,da={}),pa++,da[i]=n,n}function he(t,e,i,r,n,a,o,s){return o?ue(t,e,i,r,n,a,o,s):le(t,e,i,r,n,a,s)}function le(t,e,i,r,n,a,o){var s=xe(t,e,n,a,o),h=se(t,e);n&&(h+=n[1]+n[3]);var l=s.outerHeight,u=new qt(ce(0,h,i),fe(0,l,r),h,l);return u.lineHeight=s.lineHeight,u}function ue(t,e,i,r,n,a,o,s){var h=we(t,{rich:o,truncate:s,font:e,textAlign:i,textPadding:n,textLineHeight:a}),l=h.outerWidth,u=h.outerHeight;return new qt(ce(0,l,i),fe(0,u,r),l,u)}function ce(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function fe(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function de(t,e,i){var r=e.x,n=e.y,a=e.height,o=e.width,s=a/2,h="left",l="top";switch(t){case"left":r-=i,n+=s,h="right",l="middle";break;case"right":r+=i+o,n+=s,l="middle";break;case"top":r+=o/2,n-=i,h="center",l="bottom";break;case"bottom":r+=o/2,n+=a+i,h="center";break;case"inside":r+=o/2,n+=s,h="center",l="middle";break;case"insideLeft":r+=i,n+=s,l="middle";break;case"insideRight":r+=o-i,n+=s,h="right",l="middle";break;case"insideTop":r+=o/2,n+=i,h="center";break;case"insideBottom":r+=o/2,n+=a-i,h="center",l="bottom";break;case"insideTopLeft":r+=i,n+=i;break;case"insideTopRight":r+=o-i,n+=i,h="right";break;case"insideBottomLeft":r+=i,n+=a-i,l="bottom";break;case"insideBottomRight":r+=o-i,n+=a-i,h="right",l="bottom"}return{x:r,y:n,textAlign:h,textVerticalAlign:l}}function pe(t,e,i,r,n){if(!e)return"";var a=(t+"").split("\n");n=ge(e,i,r,n);for(var o=0,s=a.length;o=o;h++)s-=o;var l=se(i,e);return l>s&&(i="",l=0),s=t-l,n.ellipsis=i,n.ellipsisWidth=l,n.contentWidth=s,n.containerWidth=t,n}function ve(t,e){var i=e.containerWidth,r=e.font,n=e.contentWidth;if(!i)return"";var a=se(t,r);if(a<=i)return t;for(var o=0;;o++){if(a<=n||o>=e.maxIterations){t+=e.ellipsis;break}var s=0===o?_e(t,n,e.ascCharWidth,e.cnCharWidth):a>0?Math.floor(t.length*n/a):0;a=se(t=t.substr(0,s),r)}return""===t&&(t=e.placeholder),t}function _e(t,e,i,r){for(var n=0,a=0,o=t.length;al)t="",o=[];else if(null!=u)for(var c=ge(u-(i?i[1]+i[3]:0),e,n.ellipsis,{minChar:n.minChar,placeholder:n.placeholder}),f=0,d=o.length;fn&&be(i,t.substring(n,a)),be(i,r[2],r[1]),n=va.lastIndex}nd)return{lines:[],width:0,height:0};z.textWidth=se(z.text,b);var T=y.textWidth,S=null==T||"auto"===T;if("string"==typeof T&&"%"===T.charAt(T.length-1))z.percentWidth=T,l.push(z),T=0;else{if(S){T=z.textWidth;var M=y.textBackgroundColor,C=M&&M.image;C&&oe(C=re(C))&&(T=Math.max(T,C.width*k/C.height))}var A=w?w[1]+w[3]:0;T+=A;var P=null!=f?f-v:null;null!=P&&Ph&&(i*=h/(c=i+r),r*=h/c),n+a>h&&(n*=h/(c=n+a),a*=h/c),r+n>l&&(r*=l/(c=r+n),n*=l/c),i+a>l&&(i*=l/(c=i+a),a*=l/c),t.moveTo(o+i,s),t.lineTo(o+h-r,s),0!==r&&t.arc(o+h-r,s+r,r,-Math.PI/2,0),t.lineTo(o+h,s+l-n),0!==n&&t.arc(o+h-n,s+l-n,n,0,Math.PI/2),t.lineTo(o+a,s+l),0!==a&&t.arc(o+a,s+l-a,a,Math.PI/2,Math.PI),t.lineTo(o,s+i),0!==i&&t.arc(o+i,s+i,i,Math.PI,1.5*Math.PI)}function Se(t){return Me(t),u(t.rich,Me),t}function Me(t){if(t){t.font=ke(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||xa[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||wa[i]?i:"top",t.textPadding&&(t.textPadding=w(t.textPadding))}}function Ce(t,e,i,r,n,a){r.rich?Pe(t,e,i,r,n,a):Ae(t,e,i,r,n,a)}function Ae(t,e,i,r,n,a){var o,s=Be(r),h=!1,l=e.__attrCachedBy===ia.PLAIN_TEXT;a!==ra?(a&&(o=a.style,h=!s&&l&&o),e.__attrCachedBy=s?ia.NONE:ia.PLAIN_TEXT):l&&(e.__attrCachedBy=ia.NONE);var u=r.font||ma;h&&u===(o.font||ma)||(e.font=u);var c=t.__computedFont;t.__styleFont!==u&&(t.__styleFont=u,c=t.__computedFont=e.font);var f=r.textPadding,d=r.textLineHeight,p=t.__textCotentBlock;p&&!t.__dirtyText||(p=t.__textCotentBlock=xe(i,c,f,d,r.truncate));var g=p.outerHeight,v=p.lines,_=p.lineHeight,y=Re(g,r,n),m=y.baseX,x=y.baseY,w=y.textAlign||"left",b=y.textVerticalAlign;ze(e,r,n,m,x);var k=fe(x,g,b),T=m,S=k;if(s||f){var M=se(i,c);f&&(M+=f[1]+f[3]);var C=ce(m,M,w);s&&Ie(t,e,r,C,k,M,g),f&&(T=We(m,w,f),S+=f[0])}e.textAlign=w,e.textBaseline="middle",e.globalAlpha=r.opacity||1;for(F=0;F=0&&"right"===(x=b[P]).textAlign;)De(t,e,x,r,T,_,A,"right"),S-=x.width,A-=x.width,P--;for(C+=(a-(C-v)-(y-A)-S)/2;M<=P;)De(t,e,x=b[M],r,T,_,C+x.width/2,"center"),C+=x.width,M++;_+=T}}function ze(t,e,i,r,n){if(i&&e.textRotation){var a=e.textOrigin;"center"===a?(r=i.width/2+i.x,n=i.height/2+i.y):a&&(r=a[0]+i.x,n=a[1]+i.y),t.translate(r,n),t.rotate(-e.textRotation),t.translate(-r,-n)}}function De(t,e,i,r,n,a,o,s){var h=r.rich[i.styleName]||{};h.text=i.text;var l=i.textVerticalAlign,u=a+n/2;"top"===l?u=a+i.height/2:"bottom"===l&&(u=a+n-i.height/2),!i.isLineHolder&&Be(h)&&Ie(t,e,h,"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=We(o,s,c),u-=i.height/2-c[2]-i.textHeight/2),Ee(e,"shadowBlur",x(h.textShadowBlur,r.textShadowBlur,0)),Ee(e,"shadowColor",h.textShadowColor||r.textShadowColor||"transparent"),Ee(e,"shadowOffsetX",x(h.textShadowOffsetX,r.textShadowOffsetX,0)),Ee(e,"shadowOffsetY",x(h.textShadowOffsetY,r.textShadowOffsetY,0)),Ee(e,"textAlign",s),Ee(e,"textBaseline","middle"),Ee(e,"font",i.font||ma);var f=Fe(h.textStroke||r.textStroke,p),d=He(h.textFill||r.textFill),p=m(h.textStrokeWidth,r.textStrokeWidth);f&&(Ee(e,"lineWidth",p),Ee(e,"strokeStyle",f),e.strokeText(i.text,o,u)),d&&(Ee(e,"fillStyle",d),e.fillText(i.text,o,u))}function Be(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function Ie(t,e,i,r,n,a,o){var s=i.textBackgroundColor,h=i.textBorderWidth,l=i.textBorderColor,u=g(s);if(Ee(e,"shadowBlur",i.textBoxShadowBlur||0),Ee(e,"shadowColor",i.textBoxShadowColor||"transparent"),Ee(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),Ee(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),u||h&&l){e.beginPath();var c=i.textBorderRadius;c?Te(e,{x:r,y:n,width:a,height:o,r:c}):e.rect(r,n,a,o),e.closePath()}if(u)if(Ee(e,"fillStyle",s),null!=i.fillOpacity){d=e.globalAlpha;e.globalAlpha=i.fillOpacity*i.opacity,e.fill(),e.globalAlpha=d}else e.fill();else if(v(s)){var f=s.image;(f=ne(f,null,t,Oe,s))&&oe(f)&&e.drawImage(f,r,n,a,o)}if(h&&l)if(Ee(e,"lineWidth",h),Ee(e,"strokeStyle",l),null!=i.strokeOpacity){var d=e.globalAlpha;e.globalAlpha=i.strokeOpacity*i.opacity,e.stroke(),e.globalAlpha=d}else e.stroke()}function Oe(t,e){e.image=t}function Re(t,e,i){var r=e.x||0,n=e.y||0,a=e.textAlign,o=e.textVerticalAlign;if(i){var s=e.textPosition;if(s instanceof Array)r=i.x+Ne(s[0],i.width),n=i.y+Ne(s[1],i.height);else{var h=de(s,i,e.textDistance);r=h.x,n=h.y,a=a||h.textAlign,o=o||h.textVerticalAlign}var l=e.textOffset;l&&(r+=l[0],n+=l[1])}return{baseX:r,baseY:n,textAlign:a,textVerticalAlign:o}}function Ee(t,e,i){return t[e]=ea(t,e,i),t[e]}function Fe(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function He(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function Ne(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function We(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function Ve(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function qe(t){t=t||{},Yn.call(this,t);for(var e in t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new aa(t.style,this),this._rect=null,this.__clipPaths=[]}function Xe(t){qe.call(this,t)}function je(t){return parseInt(t,10)}function Ye(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}function Ue(t,e,i){return Sa.copy(t.getBoundingRect()),t.transform&&Sa.applyTransform(t.transform),Ma.width=e,Ma.height=i,!Sa.intersect(Ma)}function Ge(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i-Wa&&tWa||t<-Wa}function oi(t,e,i,r,n){var a=1-n;return a*a*(a*t+3*n*e)+n*n*(n*r+3*a*i)}function si(t,e,i,r,n){var a=1-n;return 3*(((e-t)*a+2*(i-e)*n)*a+(r-i)*n*n)}function hi(t,e,i,r,n,a){var o=r+3*(e-i)-t,s=3*(i-2*e+t),h=3*(e-t),l=t-n,u=s*s-3*o*h,c=s*h-9*o*l,f=h*h-3*s*l,d=0;if(ni(u)&&ni(c))ni(s)?a[0]=0:(T=-h/s)>=0&&T<=1&&(a[d++]=T);else{var p=c*c-4*u*f;if(ni(p)){var g=c/u,v=-g/2;(T=-s/o+g)>=0&&T<=1&&(a[d++]=T),v>=0&&v<=1&&(a[d++]=v)}else if(p>0){var _=Na(p),y=u*s+1.5*o*(-c+_),m=u*s+1.5*o*(-c-_);(T=(-s-((y=y<0?-Ha(-y,Xa):Ha(y,Xa))+(m=m<0?-Ha(-m,Xa):Ha(m,Xa))))/(3*o))>=0&&T<=1&&(a[d++]=T)}else{var x=(2*u*s-3*o*c)/(2*Na(u*u*u)),w=Math.acos(x)/3,b=Na(u),k=Math.cos(w),T=(-s-2*b*k)/(3*o),v=(-s+b*(k+qa*Math.sin(w)))/(3*o),S=(-s+b*(k-qa*Math.sin(w)))/(3*o);T>=0&&T<=1&&(a[d++]=T),v>=0&&v<=1&&(a[d++]=v),S>=0&&S<=1&&(a[d++]=S)}}return d}function li(t,e,i,r,n){var a=6*i-12*e+6*t,o=9*e+3*r-3*t-9*i,s=3*e-3*t,h=0;if(ni(o))ai(a)&&(c=-s/a)>=0&&c<=1&&(n[h++]=c);else{var l=a*a-4*o*s;if(ni(l))n[0]=-a/(2*o);else if(l>0){var u=Na(l),c=(-a+u)/(2*o),f=(-a-u)/(2*o);c>=0&&c<=1&&(n[h++]=c),f>=0&&f<=1&&(n[h++]=f)}}return h}function ui(t,e,i,r,n,a){var o=(e-t)*n+t,s=(i-e)*n+e,h=(r-i)*n+i,l=(s-o)*n+o,u=(h-s)*n+s,c=(u-l)*n+l;a[0]=t,a[1]=o,a[2]=l,a[3]=c,a[4]=c,a[5]=u,a[6]=h,a[7]=r}function ci(t,e,i,r,n,a,o,s,h,l,u){var c,f,d,p,g,v=.005,_=1/0;ja[0]=h,ja[1]=l;for(var y=0;y<1;y+=.05)Ya[0]=oi(t,i,n,o,y),Ya[1]=oi(e,r,a,s,y),(p=on(ja,Ya))<_&&(c=y,_=p);_=1/0;for(var m=0;m<32&&!(v=0&&p<_?(c=f,_=p):(Ua[0]=oi(t,i,n,o,d),Ua[1]=oi(e,r,a,s,d),g=on(Ua,ja),d<=1&&g<_?(c=d,_=g):v*=.5);return u&&(u[0]=oi(t,i,n,o,c),u[1]=oi(e,r,a,s,c)),Na(_)}function fi(t,e,i,r){var n=1-r;return n*(n*t+2*r*e)+r*r*i}function di(t,e,i,r){return 2*((1-r)*(e-t)+r*(i-e))}function pi(t,e,i,r,n){var a=t-2*e+i,o=2*(e-t),s=t-r,h=0;if(ni(a))ai(o)&&(c=-s/o)>=0&&c<=1&&(n[h++]=c);else{var l=o*o-4*a*s;if(ni(l))(c=-o/(2*a))>=0&&c<=1&&(n[h++]=c);else if(l>0){var u=Na(l),c=(-o+u)/(2*a),f=(-o-u)/(2*a);c>=0&&c<=1&&(n[h++]=c),f>=0&&f<=1&&(n[h++]=f)}}return h}function gi(t,e,i){var r=t+i-2*e;return 0===r?.5:(t-e)/r}function vi(t,e,i,r,n){var a=(e-t)*r+t,o=(i-e)*r+e,s=(o-a)*r+a;n[0]=t,n[1]=a,n[2]=s,n[3]=s,n[4]=o,n[5]=i}function _i(t,e,i,r,n,a,o,s,h){var l,u=.005,c=1/0;ja[0]=o,ja[1]=s;for(var f=0;f<1;f+=.05)Ya[0]=fi(t,i,n,f),Ya[1]=fi(e,r,a,f),(v=on(ja,Ya))=0&&v1e-4)return s[0]=t-i,s[1]=e-r,h[0]=t+i,void(h[1]=e+r);if(Ja[0]=$a(n)*i+t,Ja[1]=Qa(n)*r+e,to[0]=$a(a)*i+t,to[1]=Qa(a)*r+e,l(s,Ja,to),u(h,Ja,to),(n%=Ka)<0&&(n+=Ka),(a%=Ka)<0&&(a+=Ka),n>a&&!o?a+=Ka:nn&&(eo[0]=$a(d)*i+t,eo[1]=Qa(d)*r+e,l(s,eo,s),u(h,eo,h))}function bi(t,e,i,r,n,a,o){if(0===n)return!1;var s=n,h=0,l=t;if(o>e+s&&o>r+s||ot+s&&a>i+s||ae+c&&u>r+c&&u>a+c&&u>s+c||ut+c&&l>i+c&&l>n+c&&l>o+c||le+l&&h>r+l&&h>a+l||ht+l&&s>i+l&&s>n+l||si||u+ln&&(n+=mo);var f=Math.atan2(h,s);return f<0&&(f+=mo),f>=r&&f<=n||f+mo>=r&&f+mo<=n}function Ci(t,e,i,r,n,a){if(a>e&&a>r||an?o:0}function Ai(t,e){return Math.abs(t-e)e&&l>r&&l>a&&l>s||l1&&Pi(),c=oi(e,r,a,s,To[0]),p>1&&(f=oi(e,r,a,s,To[1]))),2===p?ve&&s>r&&s>a||s=0&&l<=1){for(var u=0,c=fi(e,r,a,l),f=0;fi||s<-i)return 0;l=Math.sqrt(i*i-s*s);ko[0]=-l,ko[1]=l;var h=Math.abs(r-n);if(h<1e-4)return 0;if(h%wo<1e-4){r=0,n=wo;p=a?1:-1;return o>=ko[0]+t&&o<=ko[1]+t?p:0}if(a){var l=r;r=Si(n),n=Si(l)}else r=Si(r),n=Si(n);r>n&&(n+=wo);for(var u=0,c=0;c<2;c++){var f=ko[c];if(f+t>o){var d=Math.atan2(s,f),p=a?1:-1;d<0&&(d=wo+d),(d>=r&&d<=n||d+wo>=r&&d+wo<=n)&&(d>Math.PI/2&&d<1.5*Math.PI&&(p=-p),u+=p)}}return u}function Bi(t,e,i,r,n){for(var a=0,o=0,s=0,h=0,l=0,u=0;u1&&(i||(a+=Ci(o,s,h,l,r,n))),1===u&&(h=o=t[u],l=s=t[u+1]),c){case xo.M:o=h=t[u++],s=l=t[u++];break;case xo.L:if(i){if(bi(o,s,t[u],t[u+1],e,r,n))return!0}else a+=Ci(o,s,t[u],t[u+1],r,n)||0;o=t[u++],s=t[u++];break;case xo.C:if(i){if(ki(o,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],e,r,n))return!0}else a+=Li(o,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],r,n)||0;o=t[u++],s=t[u++];break;case xo.Q:if(i){if(Ti(o,s,t[u++],t[u++],t[u],t[u+1],e,r,n))return!0}else a+=zi(o,s,t[u++],t[u++],t[u],t[u+1],r,n)||0;o=t[u++],s=t[u++];break;case xo.A:var f=t[u++],d=t[u++],p=t[u++],g=t[u++],v=t[u++],_=t[u++];u+=1;var y=1-t[u++],m=Math.cos(v)*p+f,x=Math.sin(v)*g+d;u>1?a+=Ci(o,s,m,x,r,n):(h=m,l=x);var w=(r-f)*g/p+f;if(i){if(Mi(f,d,g,v,v+_,y,e,w,n))return!0}else a+=Di(f,d,g,v,v+_,y,w,n);o=Math.cos(v+_)*p+f,s=Math.sin(v+_)*g+d;break;case xo.R:h=o=t[u++],l=s=t[u++];var m=h+t[u++],x=l+t[u++];if(i){if(bi(h,l,m,l,e,r,n)||bi(m,l,m,x,e,r,n)||bi(m,x,h,x,e,r,n)||bi(h,x,h,l,e,r,n))return!0}else a+=Ci(m,l,m,x,r,n),a+=Ci(h,x,h,l,r,n);break;case xo.Z:if(i){if(bi(o,s,h,l,e,r,n))return!0}else a+=Ci(o,s,h,l,r,n);o=h,s=l}}return i||Ai(s,l)||(a+=Ci(o,s,h,l,r,n)||0),0!==a}function Ii(t,e,i){return Bi(t,0,!1,e,i)}function Oi(t,e,i,r){return Bi(t,e,!0,i,r)}function Ri(t){qe.call(this,t),this.path=null}function Ei(t,e,i,r,n,a,o,s,h,l,u){var c=h*(Ro/180),f=Oo(c)*(t-i)/2+Io(c)*(e-r)/2,d=-1*Io(c)*(t-i)/2+Oo(c)*(e-r)/2,p=f*f/(o*o)+d*d/(s*s);p>1&&(o*=Bo(p),s*=Bo(p));var g=(n===a?-1:1)*Bo((o*o*(s*s)-o*o*(d*d)-s*s*(f*f))/(o*o*(d*d)+s*s*(f*f)))||0,v=g*o*d/s,_=g*-s*f/o,y=(t+i)/2+Oo(c)*v-Io(c)*_,m=(e+r)/2+Io(c)*v+Oo(c)*_,x=Ho([1,0],[(f-v)/o,(d-_)/s]),w=[(f-v)/o,(d-_)/s],b=[(-1*f-v)/o,(-1*d-_)/s],k=Ho(w,b);Fo(w,b)<=-1&&(k=Ro),Fo(w,b)>=1&&(k=0),0===a&&k>0&&(k-=2*Ro),1===a&&k<0&&(k+=2*Ro),u.addData(l,y,m,o,s,x,k,c,a)}function Fi(t){if(!t)return new _o;for(var e,i=0,r=0,n=i,a=r,o=new _o,s=_o.CMD,h=t.match(No),l=0;l=2){if(n&&"spline"!==n){var a=Ko(r,n,i,e.smoothConstraint);t.moveTo(r[0][0],r[0][1]);for(var o=r.length,s=0;s<(i?o:o-1);s++){var h=a[2*s],l=a[2*s+1],u=r[(s+1)%o];t.bezierCurveTo(h[0],h[1],l[0],l[1],u[0],u[1])}}else{"spline"===n&&(r=$o(r,i)),t.moveTo(r[0][0],r[0][1]);for(var s=1,c=r.length;s0?parseInt(r,10)/100:r?parseFloat(r):0;var n=i.getAttribute("stop-color")||"#000000";e.addColorStop(r,n)}i=i.nextSibling}}function Zi(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),n(e.__inheritedStyle,t.__inheritedStyle))}function Qi(t){for(var e=b(t).split(rs),i=[],r=0;r0;a-=2){var o=n[a],s=n[a-1];switch(r=r||tt(),s){case"translate":o=b(o).split(rs),nt(r,r,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=b(o).split(rs),ot(r,r,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=b(o).split(rs),at(r,r,parseFloat(o[0]));break;case"skew":o=b(o).split(rs),console.warn("Skew transform is not supported yet");break;case"matrix":o=b(o).split(rs);r[0]=parseFloat(o[0]),r[1]=parseFloat(o[1]),r[2]=parseFloat(o[2]),r[3]=parseFloat(o[3]),r[4]=parseFloat(o[4]),r[5]=parseFloat(o[5])}}e.setLocalTransform(r)}}function tr(t){var e=t.getAttribute("style"),i={};if(!e)return i;var r={};ls.lastIndex=0;for(var n;null!=(n=ls.exec(e));)r[n[1]]=n[2];for(var a in os)os.hasOwnProperty(a)&&null!=r[a]&&(i[os[a]]=r[a]);return i}function er(t,e,i){var r=e/t.width,n=i/t.height,a=Math.min(r,n);return{scale:[a,a],position:[-(t.x+t.width/2)*a+e/2,-(t.y+t.height/2)*a+i/2]}}function ir(t){qe.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}function rr(t,e,i){var r=t.cpx2,n=t.cpy2;return null===r||null===n?[(i?si:oi)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?si:oi)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?di:fi)(t.x1,t.cpx1,t.x2,e),(i?di:fi)(t.y1,t.cpy1,t.y2,e)]}function nr(t){return document.createElementNS(Rs,t)}function ar(t){return Ns(1e4*t)/1e4}function or(t){return t-Ys}function sr(t,e){var i=e?t.textFill:t.fill;return null!=i&&i!==Hs}function hr(t,e){var i=e?t.textStroke:t.stroke;return null!=i&&i!==Hs}function lr(t,e){e&&ur(t,"transform","matrix("+Fs.call(e,",")+")")}function ur(t,e,i){(!i||"linear"!==i.type&&"radial"!==i.type)&&t.setAttribute(e,i)}function cr(t,e,i){t.setAttributeNS("http://www.w3.org/1999/xlink",e,i)}function fr(t,e,i,r){if(sr(e,i)){var n=i?e.textFill:e.fill;n="transparent"===n?Hs:n,"none"!==t.getAttribute("clip-path")&&n===Hs&&(n="rgba(0, 0, 0, 0.002)"),ur(t,"fill",n),ur(t,"fill-opacity",null!=e.fillOpacity?e.fillOpacity*e.opacity:e.opacity)}else ur(t,"fill",Hs);if(hr(e,i)){var a=i?e.textStroke:e.stroke;ur(t,"stroke",a="transparent"===a?Hs:a),ur(t,"stroke-width",(i?e.textStrokeWidth:e.lineWidth)/(!i&&e.strokeNoScale?r.getLineScale():1)),ur(t,"paint-order",i?"stroke":"fill"),ur(t,"stroke-opacity",null!=e.strokeOpacity?e.strokeOpacity:e.opacity),e.lineDash?(ur(t,"stroke-dasharray",e.lineDash.join(",")),ur(t,"stroke-dashoffset",Ns(e.lineDashOffset||0))):ur(t,"stroke-dasharray",""),e.lineCap&&ur(t,"stroke-linecap",e.lineCap),e.lineJoin&&ur(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&ur(t,"stroke-miterlimit",e.miterLimit)}else ur(t,"stroke",Hs)}function dr(t){for(var e=[],i=t.data,r=t.len(),n=0;n=Xs||!or(g)&&(f>-qs&&f<0||f>qs)==!!p;var y=ar(s+l*Vs(c)),m=ar(h+u*Ws(c));v&&(f=p?Xs-1e-4:1e-4-Xs,_=!0,9===n&&e.push("M",y,m));var x=ar(s+l*Vs(c+f)),w=ar(h+u*Ws(c+f));e.push("A",ar(l),ar(u),Ns(d*js),+_,+p,x,w);break;case Es.Z:a="Z";break;case Es.R:var x=ar(i[n++]),w=ar(i[n++]),b=ar(i[n++]),k=ar(i[n++]);e.push("M",x,w,"L",x+b,w,"L",x+b,w+k,"L",x,w+k,"L",x,w)}a&&e.push(a);for(var T=0;T=11),domSupported:"undefined"!=typeof document}}(navigator.userAgent),Wr={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},Vr={"[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},qr=Object.prototype.toString,Xr=Array.prototype,jr=Xr.forEach,Yr=Xr.filter,Ur=Xr.slice,Gr=Xr.map,Zr=Xr.reduce,Qr={},$r=function(){return Qr.createCanvas()};Qr.createCanvas=function(){return document.createElement("canvas")};var Kr,Jr="__ec_primitive__";T.prototype={constructor:T,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){void 0!==e&&(t=f(t,e));for(var i in this.data)this.data.hasOwnProperty(i)&&t(this.data[i],i)},removeKey:function(t){delete this.data[t]}};var tn=(Object.freeze||Object)({$override:function(t,e){"createCanvas"===t&&(Kr=null),Qr[t]=e},clone:e,merge:i,mergeAll:function(t,e){for(var r=t[0],n=1,a=t.length;n3&&(r=hn.call(r,1));for(var a=e.length,o=0;o4&&(r=hn.call(r,1,r.length-1));for(var a=r[r.length-1],o=e.length,s=0;s1&&r&&r.length>1){var a=G(r)/G(n);!isFinite(a)&&(a=1),e.pinchScale=a;var o=Z(r);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}},gn="silent";K.prototype.dispose=function(){};var vn=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],_n=function(t,e,i,r){ln.call(this),this.storage=t,this.painter=e,this.painterRoot=r,i=i||new K,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,F.call(this),this.setHandlerProxy(i)};_n.prototype={constructor:_n,setHandlerProxy:function(t){this.proxy&&this.proxy.dispose(),t&&(u(vn,function(e){t.on&&t.on(e,this[e],this)},this),t.handler=this),this.proxy=t},mousemove:function(t){var e=t.zrX,i=t.zrY,r=this._hovered,n=r.target;n&&!n.__zr&&(n=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=this.findHover(e,i),o=a.target,s=this.proxy;s.setCursor&&s.setCursor(o?o.cursor:"default"),n&&o!==n&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),o&&o!==n&&this.dispatchToElement(a,"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 r=(t=t||{}).target;if(!r||!r.silent){for(var n="on"+e,a=Q(e,t,i);r&&(r[n]&&(a.cancelBubble=r[n].call(r,a)),r.trigger(e,a),r=r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[n]&&t[n].call(t,a),t.trigger&&t.trigger(e,a)}))}},findHover:function(t,e,i){for(var r=this.storage.getDisplayList(),n={x:t,y:e},a=r.length-1;a>=0;a--){var o;if(r[a]!==i&&!r[a].ignore&&(o=J(r[a],t,e))&&(!n.topTarget&&(n.topTarget=r[a]),o!==gn)){n.target=r[a];break}}return n},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new dn);var i=this._gestureMgr;"start"===e&&i.clear();var r=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),r){var n=r.type;t.gestureEvent=n,this.dispatchToElement({target:r.target},n,r.event)}}},u(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(t){_n.prototype[t]=function(e){var i=this.findHover(e.zrX,e.zrY),r=i.target;if("mousedown"===t)this._downEl=r,this._downPoint=[e.zrX,e.zrY],this._upEl=r;else if("mouseup"===t)this._upEl=r;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||an(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}}),h(_n,ln),h(_n,F);var yn="undefined"==typeof Float32Array?Array:Float32Array,mn=(Object.freeze||Object)({create:tt,identity:et,copy:it,mul:rt,translate:nt,rotate:at,scale:ot,invert:st,clone:function(t){var e=tt();return it(e,t),e}}),xn=et,wn=5e-5,bn=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},kn=bn.prototype;kn.transform=null,kn.needLocalTransform=function(){return ht(this.rotation)||ht(this.position[0])||ht(this.position[1])||ht(this.scale[0]-1)||ht(this.scale[1]-1)};var Tn=[];kn.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),r=this.transform;if(i||e){r=r||tt(),i?this.getLocalTransform(r):xn(r),e&&(i?rt(r,t.transform,r):it(r,t.transform)),this.transform=r;var n=this.globalScaleRatio;if(null!=n&&1!==n){this.getGlobalScale(Tn);var a=Tn[0]<0?-1:1,o=Tn[1]<0?-1:1,s=((Tn[0]-a)*n+a)/Tn[0]||0,h=((Tn[1]-o)*n+o)/Tn[1]||0;r[0]*=s,r[1]*=s,r[2]*=h,r[3]*=h}this.invTransform=this.invTransform||tt(),st(this.invTransform,r)}else r&&xn(r)},kn.getLocalTransform=function(t){return bn.getLocalTransform(this,t)},kn.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)},kn.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var Sn=[],Mn=tt();kn.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],r=this.position,n=this.scale;ht(e-1)&&(e=Math.sqrt(e)),ht(i-1)&&(i=Math.sqrt(i)),t[0]<0&&(e=-e),t[3]<0&&(i=-i),r[0]=t[4],r[1]=t[5],n[0]=e,n[1]=i,this.rotation=Math.atan2(-t[1]/i,t[0]/e)}},kn.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(rt(Sn,t.invTransform,e),e=Sn);var i=this.origin;i&&(i[0]||i[1])&&(Mn[4]=i[0],Mn[5]=i[1],rt(Sn,e,Mn),Sn[4]-=i[0],Sn[5]-=i[1],e=Sn),this.setLocalTransform(e)}},kn.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},kn.transformCoordToLocal=function(t,e){var i=[t,e],r=this.invTransform;return r&&O(i,i,r),i},kn.transformCoordToGlobal=function(t,e){var i=[t,e],r=this.transform;return r&&O(i,i,r),i},bn.getLocalTransform=function(t,e){xn(e=e||[]);var i=t.origin,r=t.scale||[1,1],n=t.rotation||0,a=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),ot(e,e,r),n&&at(e,e,n),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=a[0],e[5]+=a[1],e};var Cn={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;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*.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-Cn.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*Cn.bounceIn(2*t):.5*Cn.bounceOut(2*t-1)+.5}};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 r=this.easing,n="string"==typeof r?Cn[r]:r,a="function"==typeof n?n(i):i;return this.fire("frame",a),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 An=function(){this.head=null,this.tail=null,this._len=0},Pn=An.prototype;Pn.insert=function(t){var e=new Ln(t);return this.insertEntry(e),e},Pn.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++},Pn.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--},Pn.len=function(){return this._len},Pn.clear=function(){this.head=this.tail=null,this._len=0};var Ln=function(t){this.value=t,this.next,this.prev},zn=function(t){this._list=new An,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},Dn=zn.prototype;Dn.put=function(t,e){var i=this._list,r=this._map,n=null;if(null==r[t]){var a=i.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=i.head;i.remove(s),delete r[s.key],n=s.value,this._lastRemovedEntry=s}o?o.value=e:o=new Ln(e),o.key=t,i.insertEntry(o),r[t]=o}return n},Dn.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},Dn.clear=function(){this._list.clear(),this._map={}};var Bn={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]},In=new zn(20),On=null,Rn=Tt,En=St,Fn=(Object.freeze||Object)({parse:xt,lift:function(t,e){var i=xt(t);if(i){for(var r=0;r<3;r++)i[r]=e<0?i[r]*(1-e)|0:(255-i[r])*e+i[r]|0,i[r]>255?i[r]=255:t[r]<0&&(i[r]=0);return Mt(i,4===i.length?"rgba":"rgb")}},toHex:kt,fastLerp:Tt,fastMapToColor:Rn,lerp:St,mapToColor:En,modifyHSL:function(t,e,i,r){if(t=xt(t))return t=bt(t),null!=e&&(t[0]=ct(e)),null!=i&&(t[1]=pt(i)),null!=r&&(t[2]=pt(r)),Mt(wt(t),"rgba")},modifyAlpha:function(t,e){if((t=xt(t))&&null!=e)return t[3]=ft(e),Mt(t,"rgba")},stringify:Mt}),Hn=Array.prototype.slice,Nn=function(t,e,i,r){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||Ct,this._setter=r||At,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};Nn.prototype={when:function(t,e){var i=this._tracks;for(var r in e)if(e.hasOwnProperty(r)){if(!i[r]){i[r]=[];var n=this._getter(this._target,r);if(null==n)continue;0!==t&&i[r].push({time:0,value:Rt(n)})}i[r].push({time:t,value:e[r]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new qt(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}}},qt.create=function(t){return new qt(t.x,t.y,t.width,t.height)};var Qn=function(t){t=t||{},Yn.call(this,t);for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};Qn.prototype={constructor:Qn,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i=0&&(i.splice(r,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 Qn&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,r=this._children,n=o(r,t);return n<0?this:(r.splice(n,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof Qn&&t.delChildrenFromStorage(i)),e&&e.refresh(),this)},removeAll:function(){var t,e,i=this._children,r=this.__storage;for(e=0;e=0&&(this.delFromStorage(t),this._roots.splice(n,1),t instanceof Qn&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:Kt};var ta={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},ea=function(t,e,i){return ta.hasOwnProperty(e)?i*=t.dpr:i},ia={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},ra=9,na=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],aa=function(t){this.extendFrom(t,!1)};aa.prototype={constructor:aa,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){var r=this,n=i&&i.style,a=!n||t.__attrCachedBy!==ia.STYLE_BIND;t.__attrCachedBy=ia.STYLE_BIND;for(var o=0;o0},extendFrom:function(t,e){if(t)for(var i in t)!t.hasOwnProperty(i)||!0!==e&&(!1===e?this.hasOwnProperty(i):null==t[i])||(this[i]=t[i])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,i){for(var r=("radial"===e.type?te:Jt)(t,e,i),n=e.colorStops,a=0;a=0&&i.splice(r,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;i15)break}s.__drawIndex=v,s.__drawIndex0&&t>r[0]){for(o=0;ot);o++);a=i[r[o]]}if(r.splice(o+1,0,t),i[t]=e,!e.virtual)if(a){var h=a.dom;h.nextSibling?s.insertBefore(e.dom,h.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else Xn("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,r,n=this._zlevelList;for(r=0;r0?.01:0),this._needsManuallyCompositing),a.__builtin__||Xn("ZLevel "+s+" has been used by unkown layer "+a.id),a!==i&&(a.__used=!0,a.__startIndex!==n&&(a.__dirty=!0),a.__startIndex=n,a.incremental?a.__drawIndex=-1:a.__drawIndex=n,e(n),i=a),o.__dirty&&(a.__dirty=!0,a.incremental&&a.__drawIndex<0&&(a.__drawIndex=n))}e(n),this.eachBuiltinLayer(function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var r=this._layerConfig;r[t]?i(r[t],e,!0):r[t]=e;for(var n=0;n=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;ithis._ux||go(e-this._yi)>this._uy||this._len<5;return this.addData(no.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,r,n,a){return this.addData(no.C,t,e,i,r,n,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,r,n,a):this._ctx.bezierCurveTo(t,e,i,r,n,a)),this._xi=n,this._yi=a,this},quadraticCurveTo:function(t,e,i,r){return this.addData(no.Q,t,e,i,r),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,r):this._ctx.quadraticCurveTo(t,e,i,r)),this._xi=i,this._yi=r,this},arc:function(t,e,i,r,n,a){return this.addData(no.A,t,e,i,i,r,n-r,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,r,n,a),this._xi=co(n)*i+t,this._yi=fo(n)*i+e,this},arcTo:function(t,e,i,r,n){return this._ctx&&this._ctx.arcTo(t,e,i,r,n),this},rect:function(t,e,i,r){return this._ctx&&this._ctx.rect(t,e,i,r),this.addData(no.R,t,e,i,r),this},closePath:function(){this.addData(no.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,i=0;ie.length&&(this._expandData(),e=this.data);for(var i=0;i0&&d<=t||u<0&&d>=t||0===u&&(c>0&&p<=e||c<0&&p>=e);)d+=u*(i=o[r=this._dashIdx]),p+=c*i,this._dashIdx=(r+1)%g,u>0&&dh||c>0&&pl||s[r%2?"moveTo":"lineTo"](u>=0?lo(d,t):uo(d,t),c>=0?lo(p,e):uo(p,e));u=d-t,c=p-e,this._dashOffset=-po(u*u+c*c)},_dashedBezierTo:function(t,e,i,r,n,a){var o,s,h,l,u,c=this._dashSum,f=this._dashOffset,d=this._lineDash,p=this._ctx,g=this._xi,v=this._yi,_=oi,y=0,m=this._dashIdx,x=d.length,w=0;for(f<0&&(f=c+f),f%=c,o=0;o<1;o+=.1)s=_(g,t,i,n,o+.1)-_(g,t,i,n,o),h=_(v,e,r,a,o+.1)-_(v,e,r,a,o),y+=po(s*s+h*h);for(;mf);m++);for(o=(w-f)/y;o<=1;)l=_(g,t,i,n,o),u=_(v,e,r,a,o),m%2?p.moveTo(l,u):p.lineTo(l,u),o+=d[m]/y,m=(m+1)%x;m%2!=0&&p.lineTo(n,a),s=n-l,h=a-u,this._dashOffset=-po(s*s+h*h)},_dashedQuadraticTo:function(t,e,i,r){var n=i,a=r;i=(i+2*t)/3,r=(r+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,r,n,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,vo&&(this.data=new Float32Array(t)))},getBoundingRect:function(){ao[0]=ao[1]=so[0]=so[1]=Number.MAX_VALUE,oo[0]=oo[1]=ho[0]=ho[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,r=0,n=0,a=0;ah||go(o-n)>l||c===u-1)&&(t.lineTo(a,o),r=a,n=o);break;case no.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),r=s[c-2],n=s[c-1];break;case no.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),r=s[c-2],n=s[c-1];break;case no.A:var d=s[c++],p=s[c++],g=s[c++],v=s[c++],_=s[c++],y=s[c++],m=s[c++],x=s[c++],w=g>v?g:v,b=g>v?1:g/v,k=g>v?v/g:1,T=_+y;Math.abs(g-v)>.001?(t.translate(d,p),t.rotate(m),t.scale(b,k),t.arc(0,0,w,_,T,1-x),t.scale(1/b,1/k),t.rotate(-m),t.translate(-d,-p)):t.arc(d,p,w,_,T,1-x),1===c&&(e=co(_)*g+d,i=fo(_)*v+p),r=co(T)*g+d,n=fo(T)*v+p;break;case no.R:e=r=s[c],i=n=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case no.Z:t.closePath(),r=e,n=i}}}},_o.CMD=no;var yo=2*Math.PI,mo=2*Math.PI,xo=_o.CMD,wo=2*Math.PI,bo=1e-4,ko=[-1,-1,-1],To=[-1,-1],So=la.prototype.getCanvasPattern,Mo=Math.abs,Co=new _o(!0);Ri.prototype={constructor:Ri,type:"path",__dirtyPath:!0,strokeContainThreshold:5,subPixelOptimize:!1,brush:function(t,e){var i=this.style,r=this.path||Co,n=i.hasStroke(),a=i.hasFill(),o=i.fill,s=i.stroke,h=a&&!!o.colorStops,l=n&&!!s.colorStops,u=a&&!!o.image,c=n&&!!s.image;if(i.bind(t,this,e),this.setTransform(t),this.__dirty){var f;h&&(f=f||this.getBoundingRect(),this._fillGradient=i.getGradient(t,o,f)),l&&(f=f||this.getBoundingRect(),this._strokeGradient=i.getGradient(t,s,f))}h?t.fillStyle=this._fillGradient:u&&(t.fillStyle=So.call(o,t)),l?t.strokeStyle=this._strokeGradient:c&&(t.strokeStyle=So.call(s,t));var d=i.lineDash,p=i.lineDashOffset,g=!!t.setLineDash,v=this.getGlobalScale();if(r.setScale(v[0],v[1]),this.__dirtyPath||d&&!g&&n?(r.beginPath(t),d&&!g&&(r.setLineDash(d),r.setLineDashOffset(p)),this.buildPath(r,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),a)if(null!=i.fillOpacity){_=t.globalAlpha;t.globalAlpha=i.fillOpacity*i.opacity,r.fill(t),t.globalAlpha=_}else r.fill(t);if(d&&g&&(t.setLineDash(d),t.lineDashOffset=p),n)if(null!=i.strokeOpacity){var _=t.globalAlpha;t.globalAlpha=i.strokeOpacity*i.opacity,r.stroke(t),t.globalAlpha=_}else r.stroke(t);d&&g&&t.setLineDash([]),null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,i){},createPathProxy:function(){this.path=new _o},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var r=this.path;r||(r=this.path=new _o),this.__dirtyPath&&(r.beginPath(),this.buildPath(r,this.shape,!1)),t=r.getBoundingRect()}if(this._rect=t,e.hasStroke()){var n=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){n.copy(t);var a=e.lineWidth,o=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),o>1e-10&&(n.width+=a/o,n.height+=a/o,n.x-=a/o/2,n.y-=a/o/2)}return n}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),r=this.getBoundingRect(),n=this.style;if(t=i[0],e=i[1],r.contain(t,e)){var a=this.path.data;if(n.hasStroke()){var o=n.lineWidth,s=n.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(n.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),Oi(a,o/s,t,e)))return!0}if(n.hasFill())return Ii(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):qe.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(v(t))for(var r in t)t.hasOwnProperty(r)&&(i[r]=t[r]);else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&Mo(t[0]-1)>1e-10&&Mo(t[3]-1)>1e-10?Math.sqrt(Mo(t[0]*t[3]-t[2]*t[1])):1}},Ri.extend=function(t){var e=function(e){Ri.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var r=this.shape;for(var n in i)!r.hasOwnProperty(n)&&i.hasOwnProperty(n)&&(r[n]=i[n])}t.init&&t.init.call(this,e)};s(e,Ri);for(var i in t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},s(Ri,qe);var Ao=_o.CMD,Po=[[],[],[]],Lo=Math.sqrt,zo=Math.atan2,Do=function(t,e){var i,r,n,a,o,s,h=t.data,l=Ao.M,u=Ao.C,c=Ao.L,f=Ao.R,d=Ao.A,p=Ao.Q;for(n=0,a=0;ni-2?i-1:c+1],l=t[c>i-3?i-1:c+2]);var p=f*f,g=f*p;r.push([Xi(s[0],d[0],h[0],l[0],f,p,g),Xi(s[1],d[1],h[1],l[1],f,p,g)])}return r},Ko=function(t,e,i,r){var n,a,o,s,h=[],l=[],u=[],c=[];if(r){o=[1/0,1/0],s=[-1/0,-1/0];for(var f=0,d=t.length;f=4&&(h={x:parseFloat(u[0]||0),y:parseFloat(u[1]||0),width:parseFloat(u[2]),height:parseFloat(u[3])})}if(h&&null!=a&&null!=o&&(l=er(h,a,o),!e.ignoreViewBox)){var c=r;(r=new Qn).add(c),c.scale=l.scale.slice(),c.position=l.position.slice()}return e.ignoreRootClip||null==a||null==o||r.setClipPath(new Uo({shape:{x:0,y:0,width:a,height:o}})),{root:r,width:a,height:o,viewBoxRect:h,viewBoxTransform:l}},Ui.prototype._parseNode=function(t,e){var i=t.nodeName.toLowerCase();"defs"===i?this._isDefine=!0:"text"===i&&(this._isText=!0);var r;if(this._isDefine){if(o=as[i]){var n=o.call(this,t),a=t.getAttribute("id");a&&(this._defs[a]=n)}}else{var o=ns[i];o&&(r=o.call(this,t,e),e.add(r))}for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,r),3===s.nodeType&&this._isText&&this._parseText(s,r),s=s.nextSibling;"defs"===i?this._isDefine=!1:"text"===i&&(this._isText=!1)},Ui.prototype._parseText=function(t,e){if(1===t.nodeType){var i=t.getAttribute("dx")||0,r=t.getAttribute("dy")||0;this._textX+=parseFloat(i),this._textY+=parseFloat(r)}var n=new qo({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});Zi(e,n),$i(t,n,this._defs);var a=n.style.fontSize;a&&a<9&&(n.style.fontSize=9,n.scale=n.scale||[1,1],n.scale[0]*=a/9,n.scale[1]*=a/9);var o=n.getBoundingRect();return this._textX+=o.width,e.add(n),n};var ns={g:function(t,e){var i=new Qn;return Zi(e,i),$i(t,i,this._defs),i},rect:function(t,e){var i=new Uo;return Zi(e,i),$i(t,i,this._defs),i.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),i},circle:function(t,e){var i=new Xo;return Zi(e,i),$i(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),i},line:function(t,e){var i=new Qo;return Zi(e,i),$i(t,i,this._defs),i.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),i},ellipse:function(t,e){var i=new Go;return Zi(e,i),$i(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),i},polygon:function(t,e){var i=t.getAttribute("points");i&&(i=Qi(i));var r=new Jo({shape:{points:i||[]}});return Zi(e,r),$i(t,r,this._defs),r},polyline:function(t,e){var i=new Ri;Zi(e,i),$i(t,i,this._defs);var r=t.getAttribute("points");return r&&(r=Qi(r)),new ts({shape:{points:r||[]}})},image:function(t,e){var i=new Xe;return Zi(e,i),$i(t,i,this._defs),i.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),i},text:function(t,e){var i=t.getAttribute("x")||0,r=t.getAttribute("y")||0,n=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0;this._textX=parseFloat(i)+parseFloat(n),this._textY=parseFloat(r)+parseFloat(a);var o=new Qn;return Zi(e,o),$i(t,o,this._defs),o},tspan:function(t,e){var i=t.getAttribute("x"),r=t.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=r&&(this._textY=parseFloat(r));var n=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0,o=new Qn;return Zi(e,o),$i(t,o,this._defs),this._textX+=n,this._textY+=a,o},path:function(t,e){var i=Ni(t.getAttribute("d")||"");return Zi(e,i),$i(t,i,this._defs),i}},as={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),i=parseInt(t.getAttribute("y1")||0,10),r=parseInt(t.getAttribute("x2")||10,10),n=parseInt(t.getAttribute("y2")||0,10),a=new is(e,i,r,n);return Gi(t,a),a},radialgradient:function(t){}},os={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"},ss=/url\(\s*#(.*?)\)/,hs=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,ls=/([^\s:;]+)\s*:\s*([^:;]+)/g,us=Ri.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i=11?function(){var e,i=this.__clipPaths,r=this.style;if(i)for(var n=0;n4?a*Ps(2*As/i)/Ps(As/i):a/3);var s=As/i,h=-As/2,l=r+a*Ps(h),u=n+a*Ls(h);h+=s,t.moveTo(l,u);for(var c,f=0,d=2*i-1;f=n&&l+1>=a){for(var u=[],c=0;c=n&&c+1>=a)return vr(0,s.components);h[i]=s}else h[i]=void 0}o++}();if(f)return f}},pushComponent:function(t,e,i){var r=t[t.length-1];r&&r.added===e&&r.removed===i?t[t.length-1]={count:r.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,r){for(var n=e.length,a=i.length,o=t.newPos,s=o-r,h=0;o+1=0;--r)if(e[r]===t)return!0;return!1}),i):null:i[0]},yr.prototype.update=function(t,e){if(t){var i=this.getDefs(!1);if(t[this._domName]&&i.contains(t[this._domName]))"function"==typeof e&&e(t);else{var r=this.add(t);r&&(t[this._domName]=r)}}},yr.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},yr.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},yr.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return u(this._tagNames,function(i){var r=t.getElementsByTagName(i);e=e.concat([].slice.call(r))}),e},yr.prototype.markAllUnused=function(){var t=this;u(this.getDoms(),function(e){e[t._markLabel]="0"})},yr.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},yr.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this;u(this.getDoms(),function(i){"1"!==i[e._markLabel]&&t.removeChild(i)})}},yr.prototype.getSvgProxy=function(t){return t instanceof Ri?Us:t instanceof Xe?Gs:t instanceof qo?Zs:Us},yr.prototype.getTextSvgElement=function(t){return t.__textSvgEl},yr.prototype.getSvgElement=function(t){return t.__svgEl},s(mr,yr),mr.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var i=this;u(["fill","stroke"],function(r){if(e.style[r]&&("linear"===e.style[r].type||"radial"===e.style[r].type)){var n,a=e.style[r],o=i.getDefs(!0);a._dom?(n=a._dom,o.contains(a._dom)||i.addDom(n)):n=i.add(a),i.markUsed(e);var s=n.getAttribute("id");t.setAttribute(r,"url(#"+s+")")}})}},mr.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return Xn("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},mr.prototype.update=function(t){var e=this;yr.prototype.update.call(this,t,function(){var i=t.type,r=t._dom.tagName;"linear"===i&&"linearGradient"===r||"radial"===i&&"radialGradient"===r?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))})},mr.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 Xn("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,r=0,n=i.length;r0){var r,n,a=this.getDefs(!0),o=e[0],s=i?"_textDom":"_dom";o[s]?(n=o[s].getAttribute("id"),r=o[s],a.contains(r)||a.appendChild(r)):(n="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(r=this.createElement("clipPath")).setAttribute("id",n),a.appendChild(r),o[s]=r);var h=this.getSvgProxy(o);if(o.transform&&o.parent.invTransform&&!i){var l=Array.prototype.slice.call(o.transform);rt(o.transform,o.parent.invTransform,o.transform),h.brush(o),o.transform=l}else h.brush(o);var u=this.getSvgElement(o);r.innerHTML="",r.appendChild(u.cloneNode()),t.setAttribute("clip-path","url(#"+n+")"),e.length>1&&this.updateDom(r,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},xr.prototype.markUsed=function(t){var e=this;t.__clipPaths&&t.__clipPaths.length>0&&u(t.__clipPaths,function(t){t._dom&&yr.prototype.markUsed.call(e,t._dom),t._textDom&&yr.prototype.markUsed.call(e,t._textDom)})},s(wr,yr),wr.prototype.addWithoutUpdate=function(t,e){if(e&&br(e.style)){var i,r=e.style;r._shadowDom?(i=r._shadowDom,this.getDefs(!0).contains(r._shadowDom)||this.addDom(i)):i=this.add(e),this.markUsed(e);var n=i.getAttribute("id");t.style.filter="url(#"+n+")"}},wr.prototype.add=function(t){var e=this.createElement("filter"),i=t.style;return i._shadowDomId=i._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+i._shadowDomId),this.updateDom(t,e),this.addDom(e),e},wr.prototype.update=function(t,e){var i=e.style;if(br(i)){var r=this;yr.prototype.update.call(this,e,function(t){r.updateDom(e,t._shadowDom)})}else this.remove(t,i)},wr.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(e),t.style.filter="")},wr.prototype.updateDom=function(t,e){var i=e.getElementsByTagName("feDropShadow");i=0===i.length?this.createElement("feDropShadow"):i[0];var r,n,a,o,s=t.style,h=t.scale?t.scale[0]||1:1,l=t.scale?t.scale[1]||1:1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)r=s.shadowOffsetX||0,n=s.shadowOffsetY||0,a=s.shadowBlur,o=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);r=s.textShadowOffsetX||0,n=s.textShadowOffsetY||0,a=s.textShadowBlur,o=s.textShadowColor}i.setAttribute("dx",r/h),i.setAttribute("dy",n/l),i.setAttribute("flood-color",o);var u=a/2/h+" "+a/2/l;i.setAttribute("stdDeviation",u),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(a/2*200)+"%"),e.setAttribute("height",Math.ceil(a/2*200)+"%"),e.appendChild(i),s._shadowDom=e},wr.prototype.markUsed=function(t){var e=t.style;e&&e._shadowDom&&yr.prototype.markUsed.call(this,e._shadowDom)};var th=function(t,e,i,n){this.root=t,this.storage=e,this._opts=i=r({},i||{});var a=nr("svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("version","1.1"),a.setAttribute("baseProfile","full"),a.style.cssText="user-select:none;position:absolute;left:0;top:0;",this.gradientManager=new mr(n,a),this.clipPathManager=new xr(n,a),this.shadowManager=new wr(n,a);var o=document.createElement("div");o.style.cssText="overflow:hidden;position:relative",this._svgRoot=a,this._viewport=o,t.appendChild(o),o.appendChild(a),this.resize(i.width,i.height),this._visibleList=[]};th.prototype={constructor:th,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)},setBackgroundColor:function(t){this._viewport.style.background=t},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var e,i=this._svgRoot,r=this._visibleList,n=t.length,a=[];for(e=0;e=0;--r)if(e[r]===t)return!0;return!1}),i):null:i[0]},resize:function(t,e){var i=this._viewport;i.style.display="none";var r=this._opts;if(null!=t&&(r.width=t),null!=e&&(r.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 n=i.style;n.width=t+"px",n.height=e+"px";var a=this._svgRoot;a.setAttribute("width",t),a.setAttribute("height",e)}},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],r=["clientWidth","clientHeight"][t],n=["paddingLeft","paddingTop"][t],a=["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[r]||kr(s[i])||kr(o.style[i]))-(kr(s[n])||0)-(kr(s[a])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},pathToDataUrl:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+this._svgRoot.outerHTML}},u(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){th.prototype[t]=zr(t)}),ii("svg",th);var eh,ih="urn:schemas-microsoft-com:vml",rh="undefined"==typeof window?null:window,nh=!1,ah=rh&&rh.document;if(ah&&!Nr.canvasSupported)try{!ah.namespaces.zrvml&&ah.namespaces.add("zrvml",ih),eh=function(t){return ah.createElement("')}}catch(t){eh=function(t){return ah.createElement("<"+t+' xmlns="'+ih+'" class="zrvml">')}}var oh=_o.CMD,sh=Math.round,hh=Math.sqrt,lh=Math.abs,uh=Math.cos,ch=Math.sin,fh=Math.max;if(!Nr.canvasSupported){var dh=21600,ph=dh/2,gh=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=dh+","+dh,t.coordorigin="0,0"},vh=function(t){return String(t).replace(/&/g,"&").replace(/"/g,""")},_h=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},yh=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},mh=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},xh=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},wh=function(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t},bh=function(t,e,i){var r=xt(e);i=+i,isNaN(i)&&(i=1),r&&(t.color=_h(r[0],r[1],r[2]),t.opacity=i*r[3])},kh=function(t){var e=xt(t);return[_h(e[0],e[1],e[2]),e[3]]},Th=function(t,e,i){var r=e.fill;if(null!=r)if(r instanceof es){var n,a=0,o=[0,0],s=0,h=1,l=i.getBoundingRect(),u=l.width,c=l.height;if("linear"===r.type){n="gradient";var f=i.transform,d=[r.x*u,r.y*c],p=[r.x2*u,r.y2*c];f&&(O(d,d,f),O(p,p,f));var g=p[0]-d[0],v=p[1]-d[1];(a=180*Math.atan2(g,v)/Math.PI)<0&&(a+=360),a<1e-6&&(a=0)}else{n="gradientradial";var d=[r.x*u,r.y*c],f=i.transform,_=i.scale,y=u,m=c;o=[(d[0]-l.x)/y,(d[1]-l.y)/m],f&&O(d,d,f),y/=_[0]*dh,m/=_[1]*dh;var x=fh(y,m);s=0/x,h=2*r.r/x-s}var w=r.colorStops.slice();w.sort(function(t,e){return t.offset-e.offset});for(var b=w.length,k=[],T=[],S=0;S=2){var A=k[0][0],P=k[1][0],L=k[0][1]*e.opacity,z=k[1][1]*e.opacity;t.type=n,t.method="none",t.focus="100%",t.angle=a,t.color=A,t.color2=P,t.colors=T.join(","),t.opacity=z,t.opacity2=L}"radial"===n&&(t.focusposition=o.join(","))}else bh(t,r,e.opacity)},Sh=function(t,e){null!=e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof es||bh(t,e.stroke,e.opacity)},Mh=function(t,e,i,r){var n="fill"===e,a=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(n||!n&&i.lineWidth)?(t[n?"filled":"stroked"]="true",i[e]instanceof es&&mh(t,a),a||(a=Dr(e)),n?Th(a,i,r):Sh(a,i),yh(t,a)):(t[n?"filled":"stroked"]="false",mh(t,a))},Ch=[[],[],[]],Ah=function(t,e){var i,r,n,a,o,s,h=oh.M,l=oh.C,u=oh.L,c=oh.A,f=oh.Q,d=[],p=t.data,g=t.len();for(a=0;a.01?B&&(I+=.0125):Math.abs(R-A)<1e-4?B&&IC?m-=.0125:m+=.0125:B&&RA?y+=.0125:y-=.0125),d.push(E,sh(((C-P)*T+b)*dh-ph),",",sh(((A-L)*S+k)*dh-ph),",",sh(((C+P)*T+b)*dh-ph),",",sh(((A+L)*S+k)*dh-ph),",",sh((I*T+b)*dh-ph),",",sh((R*S+k)*dh-ph),",",sh((y*T+b)*dh-ph),",",sh((m*S+k)*dh-ph)),o=y,s=m;break;case oh.R:var F=Ch[0],H=Ch[1];F[0]=p[a++],F[1]=p[a++],H[0]=F[0]+p[a++],H[1]=F[1]+p[a++],e&&(O(F,F,e),O(H,H,e)),F[0]=sh(F[0]*dh-ph),H[0]=sh(H[0]*dh-ph),F[1]=sh(F[1]*dh-ph),H[1]=sh(H[1]*dh-ph),d.push(" m ",F[0],",",F[1]," l ",H[0],",",F[1]," l ",H[0],",",H[1]," l ",F[0],",",H[1]);break;case oh.Z:d.push(" x ")}if(i>0){d.push(r);for(var N=0;N100&&(Dh=0,zh={});var i,r=Bh.style;try{r.font=t,i=r.fontFamily.split(",")[0]}catch(t){}e={style:r.fontStyle||"normal",variant:r.fontVariant||"normal",weight:r.fontWeight||"normal",size:0|parseFloat(r.fontSize||12),family:i||"Microsoft YaHei"},zh[t]=e,Dh++}return e};!function(t,e){ya[t]=e}("measureText",function(t,e){var i=ah;Lh||((Lh=i.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",ah.body.appendChild(Lh));try{Lh.style.font=e}catch(t){}return Lh.innerHTML="",Lh.appendChild(i.createTextNode(t)),{width:Lh.offsetWidth}});for(var Oh=new qt,Rh=[Ta,qe,Xe,Ri,qo],Eh=0;Eh