!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},l=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?(l.wxa=!0,l.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?l.worker=!0:"undefined"==typeof navigator?(l.node=!0,l.svgSupported=!0):function(t,e){var r=e.browser,i=t.match(/Firefox\/([\d.]+)/),n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(r.firefox=!0,r.version=i[1]);n&&(r.ie=!0,r.version=n[1]);o&&(r.edge=!0,r.version=o[1],r.newEdge=18<+o[1].split(".")[0]);a&&(r.weChat=!0);e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,e.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&11<=+r.version),e.domSupported="undefined"!=typeof document;var s=document.documentElement.style;e.transform3dSupported=(r.ie&&"transition"in s||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||r.ie&&9<=+r.version}(navigator.userAgent,l);var h=12,v="sans-serif",E=h+"px "+v;var u,c,p=function(t){var e={};if("undefined"==typeof JSON)return e;for(var r=0;r>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 r}(e,o),o,n);if(a)return a(t,r,i),1}}function Et(t){return"CANVAS"===t.nodeName.toUpperCase()}var Wt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Xt=[],qt=l.browser.firefox&&+l.browser.version.split(".")[0]<39;function jt(t,e,r,i){return r=r||{},i?Yt(t,e,r):qt&&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):Yt(t,e,r),r}function Yt(t,e,r){if(l.domSupported&&t.getBoundingClientRect){var i=e.clientX,n=e.clientY;if(Et(t)){var o=t.getBoundingClientRect();return r.zrX=i-o.left,void(r.zrY=n-o.top)}if(Nt(Xt,t,i,n))return r.zrX=Xt[0],void(r.zrY=Xt[1])}r.zrX=r.zrY=0}function Vt(t){return t||window.event}function Ut(t,e,r){if(null!=(e=Vt(e)).zrX)return e;var i,n,o=e.type;o&&0<=o.indexOf("touch")?(i="touchend"!==o?e.targetTouches[0]:e.changedTouches[0])&&jt(t,i,e,r):(jt(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))*(0i.getWidth()||r<0||r>i.getHeight()}O(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(a){se.prototype[a]=function(t){var e,r,i=t.zrX,n=t.zrY,o=le(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 ve(d,y){var a,s,v=ce,h=0,g=(d.length,[]);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=ye(d[i],d,e,r,0,y);e+=o,0!=(r-=o)&&0!==(n=de(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=pe(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),fr(t,e),e):void lr(e,0,0,0,1):7===o||9===o?0<=(n=parseInt(i.slice(1,7),16))&&n<=16777215?(lr(e,(16711680&n)>>16,(65280&n)>>8,255&n,9===o?parseInt(i.slice(7),16)/255:1),fr(t,e),e):void lr(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?lr(e,+l[0],+l[1],+l[2],1):lr(e,0,0,0,1);u=ar(l.pop());case"rgb":return 3!==l.length?void lr(e,0,0,0,1):(lr(e,or(l[0]),or(l[1]),or(l[2]),u),fr(t,e),e);case"hsla":return 4!==l.length?void lr(e,0,0,0,1):(l[3]=ar(l[3]),yr(l,e),fr(t,e),e);case"hsl":return 3!==l.length?void lr(e,0,0,0,1):(yr(l,e),fr(t,e),e);default:return}}lr(e,0,0,0,1)}}function yr(t,e){var r=(parseFloat(t[0])%360+360)%360/360,i=ar(t[1]),n=ar(t[2]),o=n<=.5?n*(i+1):n+i-n*i,a=2*n-o;return lr(e=e||[],ir(255*sr(a,o,r+1/3)),ir(255*sr(a,o,r)),ir(255*sr(a,o,r-1/3)),1),4===t.length&&(e[3]=t[3]),e}function vr(t,e,r){if(e&&e.length&&0<=t&&t<=1){r=r||[];var i=t*(e.length-1),n=Math.floor(i),o=Math.ceil(i),a=e[n],s=e[o],h=i-n;return r[0]=ir(hr(a[0],s[0],h)),r[1]=ir(hr(a[1],s[1],h)),r[2]=ir(hr(a[2],s[2],h)),r[3]=nr(hr(a[3],s[3],h)),r}}function gr(t,e,r){if(e&&e.length&&0<=t&&t<=1){var i=t*(e.length-1),n=Math.floor(i),o=Math.ceil(i),a=dr(e[n]),s=dr(e[o]),h=i-n,l=_r([ir(hr(a[0],s[0],h)),ir(hr(a[1],s[1],h)),ir(hr(a[2],s[2],h)),nr(hr(a[3],s[3],h))],"rgba");return r?{color:l,leftIndex:n,rightIndex:o,value:i}:l}}function _r(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+")"}}function mr(t,e){var r=dr(t);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*e:0}var xr=Object.freeze({__proto__:null,parse:dr,lift:function(t,e){var r=dr(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?jr:t[v],!qr(f)&&!g||a||(a=this._additiveValue=[]),this.discrete?t[v]=o<1?r.rawValue:i.rawValue:qr(f)?(1===f?Br:function(t,e,r,i){for(var n=e.length,o=n&&e[0].length,a=0;a=r.x&&t<=r.x+r.width&&e>=r.y&&e<=r.y+r.height},en.prototype.clone=function(){return new en(this.x,this.y,this.width,this.height)},en.prototype.copy=function(t){en.copy(this,t)},en.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},en.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},en.prototype.isZero=function(){return 0===this.width||0===this.height},en.create=function(t){return new en(t.x,t.y,t.width,t.height)},en.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},en.applyTransform=function(t,e,r){if(r){if(r[1]<1e-5&&-1e-5this._sleepAfterStill&&this.animation.stop())},Mn.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},Mn.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},Mn.prototype.refreshHover=function(){this._needsRefreshHover=!0},Mn.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},Mn.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},Mn.prototype.clearAnimation=function(){this.animation.clear()},Mn.prototype.getWidth=function(){return this.painter.getWidth()},Mn.prototype.getHeight=function(){return this.painter.getHeight()},Mn.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},Mn.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},Mn.prototype.on=function(t,e,r){return this.handler.on(t,e,r),this},Mn.prototype.off=function(t,e){this.handler.off(t,e)},Mn.prototype.trigger=function(t,e){this.handler.trigger(t,e)},Mn.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;ethis._ux||n>this._uy;return this.addData(Jn.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},mo.prototype.bezierCurveTo=function(t,e,r,i,n,o){return this._drawPendingPt(),this.addData(Jn.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},mo.prototype.quadraticCurveTo=function(t,e,r,i){return this._drawPendingPt(),this.addData(Jn.Q,t,e,r,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,r,i),this._xi=r,this._yi=i,this},mo.prototype.arc=function(t,e,r,i,n,o){this._drawPendingPt(),yo[0]=i,yo[1]=n,function(t,e){var r=vo(t[0]);r<0&&(r+=po);var i=r-t[0],n=t[1];n+=i,!e&&po<=n-r?n=r+po:e&&po<=r-n?n=r-po:!e&&nl.length&&(this._expandData(),l=this.data);for(var u=0;ur||uo(v)>i||c===e-1)&&(d=Math.sqrt(A*A+v*v),n=y,o=m);break;case Jn.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=He(t,r,n,a,d),v=He(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 Jn.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=qe(t,r,n,p),d=qe(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 Jn.A:var b=t[c++],k=t[c++],S=t[c++],T=t[c++],C=t[c++],P=t[c++],M=P+C;c+=1,t[c++],f&&(a=ho(C)*S+b,s=lo(C)*T+k),d=so(S,T)*ao(po,Math.abs(P)),n=ho(M)*S+b,o=lo(M)*T+k;break;case Jn.R:a=n=t[c++],s=o=t[c++],d=2*t[c++]+2*t[c++];break;case Jn.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},mo.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=Lo[i=0]+t&&a<=Lo[1]+t?c:0}nMath.PI/2&&d<1.5*Math.PI&&(c=-c),p+=c))}return p}(g,_,x,w,w+b,k,C,n);u=Math.cos(w+b)*m+g,c=Math.sin(w+b)*x+_;break;case Po.R:p=u=s[d++],f=c=s[d++];if(S=p+s[d++],T=f+s[d++],r){if(xo(p,f,S,f,e,i,n)||xo(S,f,S,T,e,i,n)||xo(S,T,p,T,e,i,n)||xo(p,T,p,f,e,i,n))return!0}else l+=Co(S,f,S,T,i,n),l+=Co(p,T,p,f,i,n);break;case Po.Z:if(r){if(xo(u,c,p,f,e,i,n))return!0}else l+=Co(u,c,p,f,i,n);u=p,c=f}}return r||(o=c,a=f,Math.abs(o-a)Math.abs(l),c=Ys([h,l],u?0:1,e),p=(u?s:l)/c.length,f=0;f=e.maxIterations){t+=e.ellipsis;break}var a=0===o?function(t,e,r,i){for(var n=0,o=0,a=t.length;oo){0i.width&&(o=e.split("\n"),y=!0),i.accumWidth=l):(u=Ih(e,d,i.width,i.breakAll,i.accumWidth),i.accumWidth=u.accumWidth+h,a=u.linesWidths,o=u.lines)):o=e.split("\n");for(var v=0;vi.len()&&(l=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=this}},Du.prototype.eachLayer=function(t,e){for(var r=this._zlevelList,i=0;i"}(i,e.attrs)+(e.text||"")+(r?""+n+L(r,t).join(n)+n:"")+""}(t)}function Qu(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssClassIdx:0,cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function $u(t,e,r,i){return Zu("svg","root",{width:t,height:e,xmlns:ju,"xmlns:xlink":Yu,version:"1.1",baseProfile:"full",viewBox:!!i&&"0 0 "+t+" "+e},r)}var Ju={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"},tc="transform-origin";var ec={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function rc(t,e){var r=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[r]=t,r}function ic(t){return H(t)?Ju[t]?"cubic-bezier("+Ju[t]+")":Ge(t)?t:"":""}function nc(A,L,D,z){var t=A.animators,e=t.length,r=[];if(A instanceof dh){if(i=function(t,e,c){var p,f,r=t.shape.paths,d={};if(O(r,function(t){var e=Qu(c.zrId);e.animation=!0,nc(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=rc(d,c);return p.replace(f,i)}}(A,L,D))r.push(i);else if(!e)return}else if(!e)return;for(var i,n,o={},a=0;a"].join(y):"")&&(p=Zu("style","stl",{},[],c),l.push(p))),$u(i,n,l,t.useViewBox)},Hc.prototype.renderToString=function(t){return t=t||{},Ku(this.renderToVNode({animation:Z(t.cssAnimation,!0),willUpdate:!1,compress:!0,useViewBox:Z(t.useViewBox,!0)}),{newline:!0})},Hc.prototype.setBackgroundColor=function(t){this._backgroundColor=t;var e,r,i,n=this._bgVNode;n&&n.elm&&(r=(e=br(t)).color,i=e.opacity,n.elm.setAttribute("fill",r),i<1&&n.elm.setAttribute("fill-opacity",i))},Hc.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},Hc.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