!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).zrender={})}(this,function(t){"use strict";var e=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},c=new function(){this.browser=new e,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(c.wxa=!0,c.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?c.worker=!0:!c.hasGlobalWindow||"Deno"in window||"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent&&-1>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[h]+":0",n[l]+":0",i[1-h]+":auto",n[1-l]+":auto",""].join("!important;"),t.appendChild(a),r.push(a)}return e.clearMarkers=function(){R(r,function(t){t.parentNode&&t.parentNode.removeChild(t)})},r}(e,o),o,n);if(a)return a(t,r,i),1}}function qt(t){return"CANVAS"===t.nodeName.toUpperCase()}var jt=/([&<>"'])/g,Vt={"&":"&","<":"<",">":">",'"':""","'":"'"};var Ut=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Gt=[],Zt=c.browser.firefox&&+c.browser.version.split(".")[0]<39;function Kt(t,e,r,i){return r=r||{},i?Qt(t,e,r):Zt&&null!=e.layerX&&e.layerX!==e.offsetX?(r.zrX=e.layerX,r.zrY=e.layerY):null!=e.offsetX?(r.zrX=e.offsetX,r.zrY=e.offsetY):Qt(t,e,r),r}function Qt(t,e,r){if(c.domSupported&&t.getBoundingClientRect){var i=e.clientX,n=e.clientY;if(qt(t)){var o=t.getBoundingClientRect();return r.zrX=i-o.left,void(r.zrY=n-o.top)}if(Yt(Gt,t,i,n))return r.zrX=Gt[0],void(r.zrY=Gt[1])}r.zrX=r.zrY=0}function $t(t){return t||window.event}function Jt(t,e,r){if(null!=(e=$t(e)).zrX)return e;var i,n,o=e.type;o&&0<=o.indexOf("touch")?(i="touchend"!==o?e.targetTouches[0]:e.changedTouches[0])&&Kt(t,i,e,r):(Kt(t,e,e,r),n=function(t){var e=t.wheelDelta;if(e)return e;var r=t.deltaX,i=t.deltaY;return null!=r&&null!=i?3*(0!==i?Math.abs(i):Math.abs(r))*(0=t.x&&e<=t.x+t.width&&r>=t.y&&r<=t.y+t.height},De.prototype.contain=function(t,e){return De.contain(this,t,e)},De.prototype.clone=function(){return new De(this.x,this.y,this.width,this.height)},De.prototype.copy=function(t){De.copy(this,t)},De.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},De.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},De.prototype.isZero=function(){return 0===this.width||0===this.height},De.create=function(t){return new De(t.x,t.y,t.width,t.height)},De.copy=function(t,e){return t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t},De.applyTransform=function(t,e,r){if(r){if(r[1]<1e-5&&-1e-5i.getWidth()||r<0||r>i.getHeight()}R(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(a){qe.prototype[a]=function(t){var e,r,i=t.zrX,n=t.zrY,o=Ue(this,i,n);if("mouseup"===a&&o||(r=(e=this.findHover(i,n)).target),"mousedown"===a)this._downEl=r,this._downPoint=[t.zrX,t.zrY],this._upEl=r;else if("mouseup"===a)this._upEl=r;else if("click"===a){if(this._downEl!==this._upEl||!this._downPoint||4>>1])<0?h=o:s=1+o;var l=i-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(;0>>1);0>>1);o(t,e[r+u])<0?h=u:a=u+1}return h}function tr(d,y){var a,s,v=Ze,h=0,g=[];function e(t){var e=a[t],r=s[t],i=a[t+1],n=s[t+1];s[t]=r+n,t===h-3&&(a[t+1]=a[t+2],s[t+1]=s[t+2]),h--;var o=Je(d[i],d,e,r,0,y);e+=o,0!=(r-=o)&&0!==(n=$e(d[e+r-1],d,i,n,n-1,y))&&(r<=n?function(t,e,r,i){var n=0;for(n=0;ns[t+1])break;e(t)}},forceMergeRuns:function(){for(;1>=1;return t+e}(n);do{(o=Ke(t,r,i,e))=this._maxSize&&0>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,5===o?parseInt(i.slice(4),16)/15:1),Qr(t,e),e):void Ur(e,0,0,0,1):7===o||9===o?0<=(n=parseInt(i.slice(1,7),16))&&n<=16777215?(Ur(e,(16711680&n)>>16,(65280&n)>>8,255&n,9===o?parseInt(i.slice(7),16)/255:1),Qr(t,e),e):void Ur(e,0,0,0,1):void 0;var a=i.indexOf("("),s=i.indexOf(")");if(-1!==a&&s+1===o){var h=i.substr(0,a),l=i.substr(a+1,s-(a+1)).split(","),u=1;switch(h){case"rgba":if(4!==l.length)return 3===l.length?Ur(e,+l[0],+l[1],+l[2],1):Ur(e,0,0,0,1);u=qr(l.pop());case"rgb":return 3<=l.length?(Ur(e,Yr(l[0]),Yr(l[1]),Yr(l[2]),3===l.length?u:qr(l[3])),Qr(t,e),e):void Ur(e,0,0,0,1);case"hsla":return 4!==l.length?void Ur(e,0,0,0,1):(l[3]=qr(l[3]),Jr(l,e),Qr(t,e),e);case"hsl":return 3!==l.length?void Ur(e,0,0,0,1):(Jr(l,e),Qr(t,e),e);default:return}}Ur(e,0,0,0,1)}}function Jr(t,e){var r=(parseFloat(t[0])%360+360)%360/360,i=qr(t[1]),n=qr(t[2]),o=n<=.5?n*(i+1):n+i-n*i,a=2*n-o;return Ur(e=e||[],Er(255*jr(a,o,r+1/3)),Er(255*jr(a,o,r)),Er(255*jr(a,o,r-1/3)),1),4===t.length&&(e[3]=t[3]),e}function ti(t,e){var r=$r(t);if(r){for(var i=0;i<3;i++)r[i]=e<0?r[i]*(1-e)|0:(255-r[i])*e+r[i]|0,255e);x++);x=m(x-1,y-2)}i=d[x+1],r=d[x]}r&&i&&(this._lastFr=x,this._lastFrP=e,n=i.percent-r.percent,o=0==n?1:m((e-r.percent)/n,1),i.easingFunc&&(o=i.easingFunc(o)),a=c?this._additiveValue:g?Oi:t[v],!Ri(f)&&!g||a||(a=this._additiveValue=[]),this.discrete?t[v]=o<1?r.rawValue:i.rawValue:Ri(f)?(1===f?Mi:function(t,e,r,i){for(var n=e.length,o=n&&e[0].length,a=0;athis._sleepAfterStill&&this.animation.stop())},io.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},io.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},io.prototype.refreshHover=function(){this._needsRefreshHover=!0},io.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},io.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},io.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},io.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},io.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},io.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},io.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},io.prototype.on=function(t,e,r){return this._disposed||this.handler.on(t,e,r),this},io.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},io.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},io.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;ethis._ux||n>this._uy;return this.addData(Do.L,t,e),this._ctx&&o&&this._ctx.lineTo(t,e),o?(this._xi=t,this._yi=e,this._pendingPtDist=0):(r=i*i+n*n)>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=r),this},Zo.prototype.bezierCurveTo=function(t,e,r,i,n,o){return this._drawPendingPt(),this.addData(Do.C,t,e,r,i,n,o),this._ctx&&this._ctx.bezierCurveTo(t,e,r,i,n,o),this._xi=n,this._yi=o,this},Zo.prototype.quadraticCurveTo=function(t,e,r,i){return this._drawPendingPt(),this.addData(Do.Q,t,e,r,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,r,i),this._xi=r,this._yi=i,this},Zo.prototype.arc=function(t,e,r,i,n,o){this._drawPendingPt(),jo[0]=i,jo[1]=n,function(t,e){var r=Vo(t[0]);r<0&&(r+=Yo);var i=r-t[0],n=t[1];n+=i,!e&&Yo<=n-r?n=r+Yo:e&&Yo<=r-n?n=r-Yo:!e&&nl.length&&(this._expandData(),l=this.data);for(var u=0;ur||Eo(v)>i||c===e-1)&&(d=Math.sqrt(A*A+v*v),n=y,o=m);break;case Do.C:var g=t[c++],_=t[c++],y=t[c++],m=t[c++],x=t[c++],w=t[c++],d=function(t,e,r,i,n,o,a,s,h){for(var l=t,u=e,c=0,p=1/h,f=1;f<=h;f++){var d=f*p,y=br(t,r,n,a,d),v=br(e,i,o,s,d),g=y-l,_=v-u;c+=Math.sqrt(g*g+_*_),l=y,u=v}return c}(n,o,g,_,y,m,x,w,10),n=x,o=w;break;case Do.Q:d=function(t,e,r,i,n,o,a){for(var s=t,h=e,l=0,u=1/a,c=1;c<=a;c++){var p=c*u,f=Pr(t,r,n,p),d=Pr(e,i,o,p),y=f-s,v=d-h;l+=Math.sqrt(y*y+v*v),s=f,h=d}return l}(n,o,g=t[c++],_=t[c++],y=t[c++],m=t[c++],10),n=y,o=m;break;case Do.A:var b=t[c++],S=t[c++],T=t[c++],k=t[c++],C=t[c++],P=t[c++],M=P+C;c+=1,f&&(a=Ho(C)*T+b,s=Wo(C)*k+S),d=No(T,k)*Bo(Yo,Math.abs(P)),n=Ho(M)*T+b,o=Wo(M)*k+S;break;case Do.R:a=n=t[c++],s=o=t[c++],d=2*t[c++]+2*t[c++];break;case Do.Z:var A=a-n,v=s-o;d=Math.sqrt(A*A+v*v),n=a,o=s}0<=d&&(l+=h[u++]=d)}return this._pathLen=l},Zo.prototype.rebuildPath=function(t,e){var r,i,n,o,a,s,h,l,u,c,p=this.data,f=this._ux,d=this._uy,y=this._len,v=e<1,g=0,_=0,m=0;if(!v||(this._pathSegLen||this._calculateLength(),h=this._pathSegLen,l=e*this._pathLen))t:for(var x=0;x=aa[i=0]+t&&a<=aa[1]+t?c:0}nMath.PI/2&&d<1.5*Math.PI&&(c=-c),p+=c))}return p}(g,_,x,w,w+b,S,C,n);u=Math.cos(w+b)*m+g,c=Math.sin(w+b)*x+_;break;case ia.R:p=u=s[d++],f=c=s[d++];if(T=p+s[d++],k=f+s[d++],r){if(Ko(p,f,T,f,e,i,n)||Ko(T,f,T,k,e,i,n)||Ko(T,k,p,k,e,i,n)||Ko(p,k,p,f,e,i,n))return!0}else l+=ra(T,f,T,k,i,n),l+=ra(p,k,p,f,i,n);break;case ia.Z:if(r){if(Ko(u,c,p,f,e,i,n))return!0}else l+=ra(u,c,p,f,i,n);u=p,c=f}}return r||(o=c,a=f,Math.abs(o-a)=r.maxIterations){e+=r.ellipsis;break}var s=0===a?function(t,e,r){for(var i=0,n=0,o=t.length;nc){var R=o.lines.length;0i.width&&(o=e.split("\n"),y=!0),i.accumWidth=l):(u=Xs(e,d,i.width,i.breakAll,i.accumWidth),i.accumWidth=u.accumWidth+h,a=u.linesWidths,o=u.lines)),o=o||e.split("\n");for(var v=Mn(d),g=0;gMath.abs(l),c=Eh([h,l],u?0:1,e),p=(u?s:l)/c.length,f=0;fg,m=(_=_.slice(0,g)).length*p),n&&u&&null!=y)for(var x=Rs(y,l,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),w={},b=0;b<_.length;b++)Os(w,_[b],x),_[b]=w.textLine,d=d||w.isTruncated;for(var S=v,T=0,k=Mn(l),b=0;b<_.length;b++)T=Math.max(zn(k,_[b]),T);null==y&&(y=T);var C=y;return{lines:_,height:v,outerWidth:C+=s,outerHeight:S+=h,lineHeight:p,calculatedLineHeight:c,contentWidth:T,contentHeight:m,width:y,isTruncated:d}}(zl(t),t,_l.outerWidth,_l.outerHeight),l=Il(t),u=!!t.backgroundColor,c=h.outerHeight,p=h.outerWidth,f=h.lines,d=h.lineHeight;this.isTruncated=!!h.isTruncated;var y,v,g=n,_=Rn(o,h.contentHeight,s);(l||r)&&(y=In(n,p,a),v=Rn(o,c,s),l&&this._renderBackground(t,t,y,v,p,c)),_+=d/2,r&&(g=Ll(n,a,r),"top"===s?_+=r[0]:"bottom"===s&&(_-=r[2]));for(var m=0,x=!1,w=!1,b=(Dl("fill"in t?t.fill:(w=!0,i.fill))),S=(Al("stroke"in t?t.stroke:u||i.autoStroke&&!w?null:(m=2,x=!0,i.stroke))),T=0Bu.len()&&(s=p}}for(var o,a=this.__startIndex;an[0]){for(h=0;ht);h++);s=i[n[h]]}n.splice(h+1,0,t),(i[t]=e).virtual||(s?(r=s.dom).nextSibling?a.insertBefore(e.dom,r.nextSibling):a.appendChild(e.dom):a.firstChild?a.insertBefore(e.dom,a.firstChild):a.appendChild(e.dom)),e.painter||(e.painter=this)}},_c.prototype.eachLayer=function(t,e){for(var r=this._zlevelList,i=0;i"}(n,o)+("style"!==n?null==(r=a)?"":(r+"").replace(jt,function(t,e){return Vt[e]}):a||"")+(i?""+s+D(i,t).join(s)+s:"")+""}(t)}function Hc(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function Wc(t,e,r,i){return Bc("svg","root",{width:t,height:e,xmlns:Lc,"xmlns:xlink":zc,version:"1.1",baseProfile:"full",viewBox:!!i&&"0 0 "+t+" "+e},r)}var Ec=0;function Xc(){return Ec++}var Yc={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},qc="transform-origin";var jc={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function Vc(t,e){var r=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[r]=t,r}function Uc(t){return N(t)?Yc[t]?"cubic-bezier("+Yc[t]+")":zr(t)?t:"":""}function Gc(A,D,L,z){var t=A.animators,e=t.length,r=[];if(A instanceof ul){if(i=function(t,e,c){var p,f,r=t.shape.paths,d={};if(R(r,function(t){var e=Hc(c.zrId);e.animation=!0,Gc(t,{},e,!0);var r=e.cssAnims,i=e.cssNodes,n=F(r),o=n.length;if(o){var a=r[f=n[o-1]];for(var s in a){var h=a[s];d[s]=d[s]||{d:""},d[s].d+=h.d||""}for(var l in i){var u=i[l].animation;0<=u.indexOf(f)&&(p=u)}}}),p){e.d=!1;var i=Vc(d,c);return p.replace(f,i)}}(A,D,L))r.push(i);else if(!e)return}else if(!e)return;for(var i,n,o={},a=0;a"].join(p):"")&&(l=Bc("style","stl",{},[],h),o.push(l))),Wc(r,i,o,t.useViewBox)},zp.prototype.renderToString=function(t){return t=t||{},Nc(this.renderToVNode({animation:Z(t.cssAnimation,!0),emphasis:Z(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Z(t.useViewBox,!0)}),{newline:!0})},zp.prototype.setBackgroundColor=function(t){this._backgroundColor=t},zp.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},zp.prototype._paintList=function(t,e,r){for(var i,n,o,a,s,h,l,u,c,p=t.length,f=[],d=0,y=0,v=0;v