1 line
216 KiB
JavaScript
1 line
216 KiB
JavaScript
!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<navigator.userAgent.indexOf("Node.js")?(c.node=!0,c.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);{var s;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)&&(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,c);var h=12,v="sans-serif",H=h+"px "+v;var l,u,p=function(t){var e={};if("undefined"==typeof JSON)return e;for(var r=0;r<t.length;r++){var i=String.fromCharCode(r+32),n=(t.charCodeAt(r)-20)/100;e[i]=n}return e}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),d={createCanvas:function(){return"undefined"!=typeof document&&document.createElement("canvas")},measureText:function(t,e){var r;if(l||(r=d.createCanvas(),l=r&&r.getContext("2d")),l)return u!==e&&(u=l.font=e||H),l.measureText(t);t=t||"";var i=/((?:\d+)?\.?\d*)px/.exec(e=e||H),n=i&&+i[1]||h,o=0;if(0<=e.indexOf("mono"))o=n*t.length;else for(var a=0;a<t.length;a++){var s=p[t[a]];o+=null==s?n:s*n}return{width:o}},loadImage:function(t,e,r){var i=new Image;return i.onload=e,i.onerror=r,i.src=t,i},getTime:function(){return Date.now?Date.now():+new Date}};var s=O(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(t,e){return t["[object "+e+"]"]=!0,t},{}),f=O(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(t,e){return t["[object "+e+"Array]"]=!0,t},{}),y=Object.prototype.toString,r=Array.prototype,a=r.forEach,g=r.filter,n=r.slice,_=r.map,i=function(){}.constructor,o=i?i.prototype:null,m="__proto__",x=2311,w=Math.pow(2,53)-1;function b(){return w<=x&&(x=0),x++}function S(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];"undefined"!=typeof console&&console.error.apply(console,t)}function C(t){if(null==t||"object"!=typeof t)return t;var e=t,r=y.call(t);if("[object Array]"===r){if(!nt(t)){e=[];for(var i=0,n=t.length;i<n;i++)e[i]=C(t[i])}}else if(f[r]){if(!nt(t)){var o=t.constructor;if(o.from)e=o.from(t);else{e=new o(t.length);for(i=0,n=t.length;i<n;i++)e[i]=t[i]}}}else if(!s[r]&&!nt(t)&&!V(t))for(var a in e={},t)t.hasOwnProperty(a)&&a!==m&&(e[a]=C(t[a]));return e}function T(t,e,r){if(!Y(e)||!Y(t))return r?C(e):t;for(var i in e){var n,o;e.hasOwnProperty(i)&&i!==m&&(n=t[i],!Y(o=e[i])||!Y(n)||G(o)||G(n)||V(o)||V(n)||q(o)||q(n)||nt(o)||nt(n)?!r&&i in t||(t[i]=C(e[i])):T(n,o,r))}return t}function L(t,e){if(Object.assign)Object.assign(t,e);else for(var r in e)e.hasOwnProperty(r)&&r!==m&&(t[r]=e[r]);return t}function k(t,e,r){t=t||{};for(var i=0;i<r.length;i++){var n=r[i];t[n]=e[n]}return t}function P(t,e,r){for(var i=B(e),n=0,o=i.length;n<o;n++){var a=i[n];(r?null!=e[a]:null==t[a])&&(t[a]=e[a])}return t}var M=d.createCanvas;function A(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r}return-1}function D(t,e,r){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(e),n=0;n<i.length;n++){var o=i[n];"constructor"!==o&&(r?null!=e[o]:null==t[o])&&(t[o]=e[o])}else P(t,e,r)}function z(t){return!!t&&("string"!=typeof t&&"number"==typeof t.length)}function R(t,e,r){if(t&&e)if(t.forEach&&t.forEach===a)t.forEach(e,r);else if(t.length===+t.length)for(var i=0,n=t.length;i<n;i++)e.call(r,t[i],i,t);else for(var o in t)t.hasOwnProperty(o)&&e.call(r,t[o],o,t)}function I(t,e,r){if(!t)return[];if(!e)return J(t);if(t.map&&t.map===_)return t.map(e,r);for(var i=[],n=0,o=t.length;n<o;n++)i.push(e.call(r,t[n],n,t));return i}function O(t,e,r,i){if(t&&e){for(var n=0,o=t.length;n<o;n++)r=e.call(i,r,t[n],n,t);return r}}function F(t,e,r){if(!t)return[];if(!e)return J(t);if(t.filter&&t.filter===g)return t.filter(e,r);for(var i=[],n=0,o=t.length;n<o;n++)e.call(r,t[n],n,t)&&i.push(t[n]);return i}function B(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e=[];for(var r in t)t.hasOwnProperty(r)&&e.push(r);return e}var N=o&&W(o.bind)?o.call.bind(o.bind):function(t,e){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return function(){return t.apply(e,r.concat(n.call(arguments)))}};function G(t){return Array.isArray?Array.isArray(t):"[object Array]"===y.call(t)}function W(t){return"function"==typeof t}function E(t){return"string"==typeof t}function X(t){return"number"==typeof t}function Y(t){var e=typeof t;return"function"==e||!!t&&"object"==e}function q(t){return!!s[y.call(t)]}function j(t){return!!f[y.call(t)]}function V(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function U(t){return null!=t.colorStops}function Z(t){return null!=t.image}function K(t){return t!=t}function Q(t,e){return null!=t?t:e}function $(t,e,r){return null!=t?t:null!=e?e:r}function J(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return n.apply(t,e)}function tt(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function et(t,e){if(!t)throw new Error(e)}function rt(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var it="__ec_primitive__";function nt(t){return t[it]}var ot=(at.prototype.delete=function(t){var e=this.has(t);return e&&delete this.data[t],e},at.prototype.has=function(t){return this.data.hasOwnProperty(t)},at.prototype.get=function(t){return this.data[t]},at.prototype.set=function(t,e){return this.data[t]=e,this},at.prototype.keys=function(){return B(this.data)},at.prototype.forEach=function(t){var e=this.data;for(var r in e)e.hasOwnProperty(r)&&t(e[r],r)},at);function at(){this.data={}}var st="function"==typeof Map;var ht=(lt.prototype.hasKey=function(t){return this.data.has(t)},lt.prototype.get=function(t){return this.data.get(t)},lt.prototype.set=function(t,e){return this.data.set(t,e),e},lt.prototype.each=function(r,i){this.data.forEach(function(t,e){r.call(i,t,e)})},lt.prototype.keys=function(){var t=this.data.keys();return st?Array.from(t):t},lt.prototype.removeKey=function(t){this.data.delete(t)},lt);function lt(t){var r=G(t);this.data=new(st?Map:ot);var i=this;function e(t,e){r?i.set(t,e):i.set(e,t)}t instanceof lt?t.each(e):t&&R(t,e)}function ut(t){return new ht(t)}function ct(t,e){var r,i=Object.create?Object.create(t):((r=function(){}).prototype=t,new r);return e&&L(i,e),i}function pt(t){var e=t.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function ft(t,e){return t.hasOwnProperty(e)}function dt(){}var yt=180/Math.PI,vt=Number.EPSILON||Math.pow(2,-52),gt=Object.freeze({__proto__:null,guid:b,logError:S,clone:C,merge:T,mergeAll:function(t,e){for(var r=t[0],i=1,n=t.length;i<n;i++)r=T(r,t[i],e);return r},extend:L,assignProps:k,defaults:P,createCanvas:M,indexOf:A,inherits:function(t,e){var r=t.prototype;function i(){}for(var n in i.prototype=e.prototype,t.prototype=new i,r)r.hasOwnProperty(n)&&(t.prototype[n]=r[n]);(t.prototype.constructor=t).superClass=e},mixin:D,isArrayLike:z,each:R,map:I,reduce:O,filter:F,find:function(t,e,r){if(t&&e)for(var i=0,n=t.length;i<n;i++)if(e.call(r,t[i],i,t))return t[i]},keys:B,bind:N,curry:function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return function(){return t.apply(this,e.concat(n.call(arguments)))}},isArray:G,isFunction:W,isString:E,isStringSafe:function(t){return"[object String]"===y.call(t)},isNumber:X,isObject:Y,isBuiltInObject:q,isTypedArray:j,isDom:V,isGradientObject:U,isImagePatternObject:Z,isRegExp:function(t){return"[object RegExp]"===y.call(t)},eqNaN:K,retrieve:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=0,i=t.length;r<i;r++)if(null!=t[r])return t[r]},retrieve2:Q,retrieve3:$,slice:J,normalizeCssArray:tt,assert:et,trim:rt,setAsPrimitive:function(t){t[it]=!0},isPrimitive:nt,HashMap:ht,createHashMap:ut,concatArray:function(t,e){for(var r=new t.constructor(t.length+e.length),i=0;i<t.length;i++)r[i]=t[i];for(var n=t.length,i=0;i<e.length;i++)r[i+n]=e[i];return r},createObject:ct,disableUserSelect:pt,hasOwn:ft,noop:dt,RADIAN_TO_DEGREE:yt,EPSILON:vt}),_t=function(t,e){return(_t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)};function mt(t,e){function r(){this.constructor=t}_t(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}function xt(t,e){return null==t&&(t=0),null==e&&(e=0),[t,e]}function wt(t){return[t[0],t[1]]}function bt(t,e,r){return t[0]=e,t[1]=r,t}function St(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t}function Tt(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t}function kt(t){return Math.sqrt(Ct(t))}function Ct(t){return t[0]*t[0]+t[1]*t[1]}function Pt(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t}function Mt(t,e){var r=kt(e);return 0===r?(t[0]=0,t[1]=0):(t[0]=e[0]/r,t[1]=e[1]/r),t}function At(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var Dt=At;function zt(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var It=zt;function Lt(t,e,r,i){return t[0]=e[0]+i*(r[0]-e[0]),t[1]=e[1]+i*(r[1]-e[1]),t}function Rt(t,e,r){var i=e[0],n=e[1];return t[0]=r[0]*i+r[2]*n+r[4],t[1]=r[1]*i+r[3]*n+r[5],t}function Ot(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t}function Ft(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t}var Bt=Object.freeze({__proto__:null,create:xt,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},clone:wt,set:bt,add:St,scaleAndAdd:function(t,e,r,i){return t[0]=e[0]+r[0]*i,t[1]=e[1]+r[1]*i,t},sub:Tt,len:kt,length:kt,lenSquare:Ct,lengthSquare:Ct,mul:function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t},div:function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:Pt,normalize:Mt,distance:At,dist:Dt,distanceSquare:zt,distSquare:It,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:Lt,applyTransform:Rt,min:Ot,max:Ft}),Nt=function(t,e){this.target=t,this.topTarget=e&&e.topTarget},Ht=(Wt.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent||e.__hostTarget;e&&((this._draggingTarget=e).dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new Nt(e,t),"dragstart",t.event))},Wt.prototype._drag=function(t){var e,r,i,n,o,a,s=this._draggingTarget;s&&(e=t.offsetX,r=t.offsetY,i=e-this._x,n=r-this._y,this._x=e,this._y=r,s.drift(i,n,t),this.handler.dispatchToElement(new Nt(s,t),"drag",t.event),o=this.handler.findHover(e,r,s).target,a=this._dropTarget,s!==(this._dropTarget=o)&&(a&&o!==a&&this.handler.dispatchToElement(new Nt(a,t),"dragleave",t.event),o&&o!==a&&this.handler.dispatchToElement(new Nt(o,t),"dragenter",t.event)))},Wt.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new Nt(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new Nt(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},Wt);function Wt(t){(this.handler=t).on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}var Et=(Xt.prototype.on=function(t,e,r,i){this._$handlers||(this._$handlers={});var n=this._$handlers;if("function"==typeof e&&(i=r,r=e,e=null),!r||!t)return this;var o=this._$eventProcessor;null!=e&&o&&o.normalizeQuery&&(e=o.normalizeQuery(e)),n[t]||(n[t]=[]);for(var a=0;a<n[t].length;a++)if(n[t][a].h===r)return this;var s={h:r,query:e,ctx:i||this,callAtLast:r.zrEventfulCallAtLast},h=n[t].length-1,l=n[t][h];return l&&l.callAtLast?n[t].splice(h,0,s):n[t].push(s),this},Xt.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},Xt.prototype.off=function(t,e){var r=this._$handlers;if(!r)return this;if(!t)return this._$handlers={},this;if(e){if(r[t]){for(var i=[],n=0,o=r[t].length;n<o;n++)r[t][n].h!==e&&i.push(r[t][n]);r[t]=i}r[t]&&0===r[t].length&&delete r[t]}else delete r[t];return this},Xt.prototype.trigger=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(!this._$handlers)return this;var i=this._$handlers[t],n=this._$eventProcessor;if(i)for(var o=e.length,a=i.length,s=0;s<a;s++){var h=i[s];if(!n||!n.filter||null==h.query||n.filter(t,h.query))switch(o){case 0:h.h.call(h.ctx);break;case 1:h.h.call(h.ctx,e[0]);break;case 2:h.h.call(h.ctx,e[0],e[1]);break;default:h.h.apply(h.ctx,e)}}return n&&n.afterTrigger&&n.afterTrigger(t),this},Xt.prototype.triggerWithContext=function(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(!this._$handlers)return this;var i=this._$handlers[t],n=this._$eventProcessor;if(i)for(var o=e.length,a=e[o-1],s=i.length,h=0;h<s;h++){var l=i[h];if(!n||!n.filter||null==l.query||n.filter(t,l.query))switch(o){case 0:l.h.call(a);break;case 1:l.h.call(a,e[0]);break;case 2:l.h.call(a,e[0],e[1]);break;default:l.h.apply(a,e.slice(1,o-1))}}return n&&n.afterTrigger&&n.afterTrigger(t),this},Xt);function Xt(t){t&&(this._$eventProcessor=t)}var Yt=Math.log(2);function qt(t,e,r,i,n,o){var a=i+"-"+n,s=t.length;if(o.hasOwnProperty(a))return o[a];if(1===e){var h=Math.round(Math.log((1<<s)-1&~n)/Yt);return t[r][h]}for(var l=i|1<<r,u=r+1;i&1<<u;)u++;for(var c=0,p=0,f=0;p<s;p++){var d=1<<p;d&n||(c+=(f%2?-1:1)*t[r][p]*qt(t,e-1,u,l,n|d,o),f++)}return o[a]=c}function jt(t,e){var r=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],i={},n=qt(r,8,0,0,0,i);if(0!==n){for(var o=[],a=0;a<8;a++)for(var s=0;s<8;s++)null==o[s]&&(o[s]=0),o[s]+=((a+s)%2?-1:1)*qt(r,7,0===a?1:0,1<<a,1<<s,i)/n*e[a];return function(t,e,r){var i=e*o[6]+r*o[7]+1;t[0]=(e*o[0]+r*o[1]+o[2])/i,t[1]=(e*o[3]+r*o[4]+o[5])/i}}}var Vt="___zrEVENTSAVED";function Ut(t,e,r,i,n){if(e.getBoundingClientRect&&c.domSupported&&!Gt(e)){var o=e[Vt]||(e[Vt]={}),a=function(t,e,r){for(var i=r?"invTrans":"trans",n=e[i],o=e.srcCoords,a=[],s=[],h=!0,l=0;l<4;l++){var u=t[l].getBoundingClientRect(),c=2*l,p=u.left,f=u.top;a.push(p,f),h=h&&o&&p===o[c]&&f===o[1+c],s.push(t[l].offsetLeft,t[l].offsetTop)}return h&&n?n:(e.srcCoords=a,e[i]=r?jt(s,a):jt(a,s))}(function(t,e){var r=e.markers;if(r)return r;r=e.markers=[];for(var i=["left","right"],n=["top","bottom"],o=0;o<4;o++){var a=document.createElement("div"),s=a.style,h=o%2,l=(o>>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 Gt(t){return"CANVAS"===t.nodeName.toUpperCase()}var Zt=/([&<>"'])/g,Kt={"&":"&","<":"<",">":">",'"':""","'":"'"};var Qt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,$t=[],Jt=c.browser.firefox&&+c.browser.version.split(".")[0]<39;function te(t,e,r,i){return r=r||{},i?ee(t,e,r):Jt&&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):ee(t,e,r),r}function ee(t,e,r){if(c.domSupported&&t.getBoundingClientRect){var i=e.clientX,n=e.clientY;if(Gt(t)){var o=t.getBoundingClientRect();return r.zrX=i-o.left,void(r.zrY=n-o.top)}if(Ut($t,t,i,n))return r.zrX=$t[0],void(r.zrY=$t[1])}r.zrX=r.zrY=0}function re(t){return t||window.event}function ie(t,e,r){if(null!=(e=re(e)).zrX)return e;var i,n,o=e.type;o&&0<=o.indexOf("touch")?(i="touchend"!==o?e.targetTouches[0]:e.changedTouches[0])&&te(t,i,e,r):(te(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<i||!(i<0)&&0<r?-1:1):e}(e),e.zrDelta=n?n/120:-(e.detail||0)/3);var a=e.button;return null==e.which&&void 0!==a&&Qt.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}var ne=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0},oe=(ae.prototype.recognize=function(t,e,r){return this._doTrack(t,e,r),this._recognize(t)},ae.prototype.clear=function(){return this._track.length=0,this},ae.prototype._doTrack=function(t,e,r){var i=t.touches;if(i){for(var n={points:[],touches:[],target:e,event:t},o=0,a=i.length;o<a;o++){var s=i[o],h=te(r,s,{});n.points.push([h.zrX,h.zrY]),n.touches.push(s)}this._track.push(n)}},ae.prototype._recognize=function(t){for(var e in he)if(he.hasOwnProperty(e)){var r=he[e](this._track,t);if(r)return r}},ae);function ae(){this._track=[]}function se(t){var e=t[1][0]-t[0][0],r=t[1][1]-t[0][1];return Math.sqrt(e*e+r*r)}var he={pinch:function(t,e){var r=t.length;if(r){var i,n=(t[r-1]||{}).points,o=(t[r-2]||{}).points||n;if(o&&1<o.length&&n&&1<n.length){var a=se(n)/se(o);isFinite(a)||(a=1),e.pinchScale=a;var s=[((i=n)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}};function le(){return[1,0,0,1,0,0]}function ue(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function ce(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 pe(t,e,r){var i=e[0]*r[0]+e[2]*r[1],n=e[1]*r[0]+e[3]*r[1],o=e[0]*r[2]+e[2]*r[3],a=e[1]*r[2]+e[3]*r[3],s=e[0]*r[4]+e[2]*r[5]+e[4],h=e[1]*r[4]+e[3]*r[5]+e[5];return t[0]=i,t[1]=n,t[2]=o,t[3]=a,t[4]=s,t[5]=h,t}function fe(t,e,r){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+r[0],t[5]=e[5]+r[1],t}function de(t,e,r,i){void 0===i&&(i=[0,0]);var n=e[0],o=e[2],a=e[4],s=e[1],h=e[3],l=e[5],u=Math.sin(r),c=Math.cos(r);return t[0]=n*c+s*u,t[1]=-n*u+s*c,t[2]=o*c+h*u,t[3]=-o*u+c*h,t[4]=c*(a-i[0])+u*(l-i[1])+i[0],t[5]=c*(l-i[1])-u*(a-i[0])+i[1],t}function ye(t,e,r){var i=r[0],n=r[1];return t[0]=e[0]*i,t[1]=e[1]*n,t[2]=e[2]*i,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*n,t}function ve(t,e){var r=e[0],i=e[2],n=e[4],o=e[1],a=e[3],s=e[5],h=r*a-o*i;return h?(h=1/h,t[0]=a*h,t[1]=-o*h,t[2]=-i*h,t[3]=r*h,t[4]=(i*s-a*n)*h,t[5]=(o*n-r*s)*h,t):null}var ge=Object.freeze({__proto__:null,create:le,identity:ue,copy:ce,mul:pe,translate:fe,rotate:de,scale:ye,invert:ve,clone:function(t){var e=le();return ce(e,t),e}}),_e=(me.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},me.prototype.clone=function(){return new me(this.x,this.y)},me.prototype.set=function(t,e){return this.x=t,this.y=e,this},me.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},me.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},me.prototype.scale=function(t){this.x*=t,this.y*=t},me.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},me.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},me.prototype.dot=function(t){return this.x*t.x+this.y*t.y},me.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},me.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},me.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},me.prototype.distance=function(t){var e=this.x-t.x,r=this.y-t.y;return Math.sqrt(e*e+r*r)},me.prototype.distanceSquare=function(t){var e=this.x-t.x,r=this.y-t.y;return e*e+r*r},me.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},me.prototype.transform=function(t){if(t){var e=this.x,r=this.y;return this.x=t[0]*e+t[2]*r+t[4],this.y=t[1]*e+t[3]*r+t[5],this}},me.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},me.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},me.set=function(t,e,r){t.x=e,t.y=r},me.copy=function(t,e){t.x=e.x,t.y=e.y},me.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},me.lenSquare=function(t){return t.x*t.x+t.y*t.y},me.dot=function(t,e){return t.x*e.x+t.y*e.y},me.add=function(t,e,r){t.x=e.x+r.x,t.y=e.y+r.y},me.sub=function(t,e,r){t.x=e.x-r.x,t.y=e.y-r.y},me.scale=function(t,e,r){t.x=e.x*r,t.y=e.y*r},me.scaleAndAdd=function(t,e,r,i){t.x=e.x+r.x*i,t.y=e.y+r.y*i},me.lerp=function(t,e,r,i){var n=1-i;t.x=n*e.x+i*r.x,t.y=n*e.y+i*r.y},me);function me(t,e){this.x=t||0,this.y=e||0}var xe=Math.min,we=Math.max,be=Math.abs,Se=["x","y"],Te=["width","height"],ke=new _e,Ce=new _e,Pe=new _e,Me=new _e,Ae=Xe(),De=Ae.minTv,ze=Ae.maxTv,Ie=[0,0],Le=(Re.set=function(t,e,r,i,n){return i<0&&(e+=i,i=-i),n<0&&(r+=n,n=-n),t.x=e,t.y=r,t.width=i,t.height=n,t},Re.prototype.union=function(t){var e=xe(t.x,this.x),r=xe(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=we(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=we(t.y+t.height,this.y+this.height)-r:this.height=t.height,this.x=e,this.y=r},Re.prototype.applyTransform=function(t){Re.applyTransform(this,this,t)},Re.prototype.calculateTransform=function(t){return Be(le(),this,t)},Re.prototype.intersect=function(t,e,r){return Re.intersect(this,t,e,r)},Re.intersect=function(t,e,r,i){r&&_e.set(r,0,0);var n=i&&i.outIntersectRect||null,o=i&&i.clamp;if(n&&(n.x=n.y=n.width=n.height=NaN),!t||!e)return!1;t instanceof Re||(t=Oe(Ne,t.x,t.y,t.width,t.height)),e instanceof Re||(e=Oe(He,e.x,e.y,e.width,e.height));var a=!!r;Ae.reset(i,a);var s=Ae.touchThreshold,h=t.x+s,l=t.x+t.width-s,u=t.y+s,c=t.y+t.height-s,p=e.x+s,f=e.x+e.width-s,d=e.y+s,y=e.y+e.height-s;if(l<h||c<u||f<p||y<d)return!1;var v=!(l<p||f<h||c<d||y<u);return(a||n)&&(Ie[0]=1/0,Ee(h,l,p,f,Ie[1]=0,a,n,o),Ee(u,c,d,y,1,a,n,o),a&&_e.copy(r,v?Ae.useDir?Ae.dirMinTv:De:ze)),v},Re.contain=function(t,e,r){return e>=t.x&&e<=t.x+t.width&&r>=t.y&&r<=t.y+t.height},Re.prototype.contain=function(t,e){return Re.contain(this,t,e)},Re.prototype.clone=function(){return new Re(this.x,this.y,this.width,this.height)},Re.prototype.copy=function(t){Fe(this,t)},Re.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},Re.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Re.prototype.isZero=function(){return 0===this.width||0===this.height},Re.create=function(t){return new Re(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},Re.copy=function(t,e){return t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t},Re.applyTransform=function(t,e,r){if(r){if(r[1]<1e-5&&-1e-5<r[1]&&r[2]<1e-5&&-1e-5<r[2]){var i=r[0],n=r[3],o=r[4],a=r[5];return t.x=e.x*i+o,t.y=e.y*n+a,t.width=e.width*i,t.height=e.height*n,t.width<0&&(t.x+=t.width,t.width=-t.width),void(t.height<0&&(t.y+=t.height,t.height=-t.height))}ke.x=Pe.x=e.x,ke.y=Me.y=e.y,Ce.x=Me.x=e.x+e.width,Ce.y=Pe.y=e.y+e.height,ke.transform(r),Me.transform(r),Ce.transform(r),Pe.transform(r),t.x=xe(ke.x,Ce.x,Pe.x,Me.x),t.y=xe(ke.y,Ce.y,Pe.y,Me.y);var s=we(ke.x,Ce.x,Pe.x,Me.x),h=we(ke.y,Ce.y,Pe.y,Me.y);t.width=s-t.x,t.height=h-t.y}else t!==e&&Fe(t,e)},Re.calculateTransform=function(t,e,r){var i=r.width/e.width,n=r.height/e.height;return fe(t=ue(t||[]),t,bt(We,-e.x,-e.y)),ye(t,t,bt(We,i,n)),fe(t,t,bt(We,r.x,r.y)),t},Re);function Re(t,e,r,i){Oe(this,t,e,r,i)}var Oe=Le.set,Fe=Le.copy,Be=Le.calculateTransform,Ne=new Le(0,0,0,0),He=new Le(0,0,0,0),We=[];function Ee(t,e,r,i,n,o,a,s){var h=be(e-r),l=be(i-t),u=xe(h,l),c=Se[n],p=Se[1-n],f=Te[n];e<r||i<t?h<l?(o&&(ze[c]=-h),s&&(a[c]=e,a[f]=0)):(o&&(ze[c]=l),s&&(a[c]=t,a[f]=0)):(a&&(a[c]=we(t,r),a[f]=xe(e,i)-a[c]),o&&(u<Ie[0]||Ae.useDir)&&(Ie[0]=xe(u,Ie[0]),(h<l||!Ae.bidirectional)&&(De[c]=h,De[p]=0,Ae.useDir&&Ae.calcDirMTV()),(l<=h||!Ae.bidirectional)&&(De[c]=-l,De[p]=0,Ae.useDir&&Ae.calcDirMTV())))}function Xe(){var a=0,s=new _e,h=new _e,l={minTv:new _e,maxTv:new _e,useDir:!1,dirMinTv:new _e,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(t,e){l.touchThreshold=0,t&&null!=t.touchThreshold&&(l.touchThreshold=we(0,t.touchThreshold)),l.negativeSize=!1,e&&(l.minTv.set(1/0,1/0),l.maxTv.set(0,0),l.useDir=!1,t&&null!=t.direction&&(l.useDir=!0,l.dirMinTv.copy(l.minTv),h.copy(l.minTv),a=t.direction,l.bidirectional=null==t.bidirectional||!!t.bidirectional,l.bidirectional||s.set(Math.cos(a),Math.sin(a))))},calcDirMTV:function(){var t=l.minTv,e=l.dirMinTv,r=t.y*t.y+t.x*t.x,i=Math.sin(a),n=Math.cos(a),o=i*t.y+n*t.x;u(o)?u(t.x)&&u(t.y)&&e.set(0,0):(h.x=r*n/o,h.y=r*i/o,u(h.x)&&u(h.y)?e.set(0,0):(l.bidirectional||0<s.dot(h))&&h.len()<e.len()&&e.copy(h))}};function u(t){return be(t)<1e-10}return l}var Ye="silent";function qe(){ne(this.event)}var je,Ve=(mt(Ue,je=Et),Ue.prototype.dispose=function(){},Ue.prototype.setCursor=function(){},Ue);function Ue(){var t=null!==je&&je.apply(this,arguments)||this;return t.handler=null,t}var Ge,Ze=function(t,e){this.x=t,this.y=e},Ke=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Qe=new Le(0,0,0,0),$e=(mt(Je,Ge=Et),Je.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(R(Ke,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},Je.prototype.mousemove=function(t){var e=t.zrX,r=t.zrY,i=er(this,e,r),n=this._hovered,o=n.target;o&&!o.__zr&&(o=(n=this.findHover(n.x,n.y)).target);var a=this._hovered=i?new Ze(e,r):this.findHover(e,r),s=a.target,h=this.proxy;h.setCursor&&h.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(n,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},Je.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},Je.prototype.resize=function(){this._hovered=new Ze(0,0)},Je.prototype.dispatch=function(t,e){var r=this[t];r&&r.call(this,e)},Je.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},Je.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},Je.prototype.dispatchToElement=function(t,e,r){var i=(t=t||{}).target;if(!i||!i.silent){for(var n,o,a="on"+e,s={type:e,event:o=r,target:(n=t).target,topTarget:n.topTarget,cancelBubble:!1,offsetX:o.zrX,offsetY:o.zrY,gestureEvent:o.gestureEvent,pinchX:o.pinchX,pinchY:o.pinchY,pinchScale:o.pinchScale,wheelDelta:o.zrDelta,zrByTouch:o.zrByTouch,which:o.which,stop:qe};i&&(i[a]&&(s.cancelBubble=!!i[a].call(i,s)),i.trigger(e,s),i=i.__hostTarget?i.__hostTarget:i.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(e,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(t){"function"==typeof t[a]&&t[a].call(t,s),t.trigger&&t.trigger(e,s)}))}},Je.prototype.findHover=function(t,e,r){var i=this.storage.getDisplayList(),n=new Ze(t,e);if(tr(i,n,t,e,r),this._pointerSize&&!n.target){for(var o=[],a=this._pointerSize,s=a/2,h=new Le(t-s,e-s,a,a),l=i.length-1;0<=l;l--){var u=i[l];u===r||u.ignore||u.ignoreCoarsePointer||u.parent&&u.parent.ignoreCoarsePointer||(Qe.copy(u.getBoundingRect()),u.transform&&Qe.applyTransform(u.transform),Qe.intersect(h)&&o.push(u))}if(o.length)for(var c=Math.PI/12,p=2*Math.PI,f=0;f<s;f+=4)for(var d=0;d<p;d+=c)if(tr(o,n,t+f*Math.cos(d),e+f*Math.sin(d),r),n.target)return n}return n},Je.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new oe);var r=this._gestureMgr;"start"===e&&r.clear();var i,n,o=r.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);"end"===e&&r.clear(),o&&(i=o.type,t.gestureEvent=i,(n=new Ze).target=o.target,this.dispatchToElement(n,i,o.event))},Je);function Je(t,e,r,i,n){var o=Ge.call(this)||this;return o._hovered=new Ze(0,0),o.storage=t,o.painter=e,o.painterRoot=i,o._pointerSize=n,r=r||new Ve,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new Ht(o),o}function tr(t,e,r,i,n){for(var o=t.length-1;0<=o;o--){var a=t[o],s=void 0;if(a!==n&&!a.ignore&&(s=function(t,e,r){if(t[t.rectHover?"rectContain":"contain"](e,r)){for(var i=t,n=void 0,o=!1;i;){if(i.ignoreClip&&(o=!0),!o){var a=i.getClipPath();if(a&&!a.contain(e,r))return!1}i.silent&&(n=!0);var s=i.__hostTarget,i=s?i.ignoreHostSilent?null:s:i.parent}return!n||Ye}return!1}(a,r,i))&&(e.topTarget||(e.topTarget=a),s!==Ye)){e.target=a;break}}}function er(t,e,r){var i=t.painter;return e<0||e>i.getWidth()||r<0||r>i.getHeight()}R(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(a){$e.prototype[a]=function(t){var e,r,i=t.zrX,n=t.zrY,o=er(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<Dt(this._downPoint,[t.zrX,t.zrY]))return;this._downPoint=null}this.dispatchToElement(e,a,t)}});var rr=32,ir=7;function nr(t,e,r,i){var n=e+1;if(n===r)return 1;if(i(t[n++],t[e])<0){for(;n<r&&i(t[n],t[n-1])<0;)n++;!function(t,e,r){r--;for(;e<r;){var i=t[e];t[e++]=t[r],t[r--]=i}}(t,e,n)}else for(;n<r&&0<=i(t[n],t[n-1]);)n++;return n-e}function or(t,e,r,i,n){for(i===e&&i++;i<r;i++){for(var o,a=t[i],s=e,h=i;s<h;)n(a,t[o=s+h>>>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<l;)t[s+l]=t[s+l-1],l--}t[s]=a}}function ar(t,e,r,i,n,o){var a=0,s=0,h=1;if(0<o(t,e[r+n])){for(s=i-n;h<s&&0<o(t,e[r+n+h]);)(h=1+((a=h)<<1))<=0&&(h=s);s<h&&(h=s),a+=n,h+=n}else{for(s=n+1;h<s&&o(t,e[r+n-h])<=0;)(h=1+((a=h)<<1))<=0&&(h=s);s<h&&(h=s);var l=a,a=n-h,h=n-l}for(a++;a<h;){var u=a+(h-a>>>1);0<o(t,e[r+u])?a=u+1:h=u}return h}function sr(t,e,r,i,n,o){var a=0,s=0,h=1;if(o(t,e[r+n])<0){for(s=n+1;h<s&&o(t,e[r+n-h])<0;)(h=1+((a=h)<<1))<=0&&(h=s);s<h&&(h=s);var l=a,a=n-h,h=n-l}else{for(s=i-n;h<s&&0<=o(t,e[r+n+h]);)(h=1+((a=h)<<1))<=0&&(h=s);s<h&&(h=s),a+=n,h+=n}for(a++;a<h;){var u=a+(h-a>>>1);o(t,e[r+u])<0?h=u:a=u+1}return h}function hr(d,y){var a,s,v=ir,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=sr(d[i],d,e,r,0,y);e+=o,0!=(r-=o)&&0!==(n=ar(d[e+r-1],d,i,n,n-1,y))&&(r<=n?function(t,e,r,i){var n=0;for(n=0;n<e;n++)g[n]=d[t+n];var o=0,a=r,s=t;if(d[s++]=d[a++],0==--i){for(n=0;n<e;n++)d[s+n]=g[o+n];return}if(1===e){for(n=0;n<i;n++)d[s+n]=d[a+n];return d[s+i]=g[o]}var h,l,u,c=v;for(;;){l=h=0,u=!1;do{if(y(d[a],g[o])<0){if(d[s++]=d[a++],l++,(h=0)==--i){u=!0;break}}else if(d[s++]=g[o++],h++,l=0,1==--e){u=!0;break}}while((h|l)<c);if(u)break;do{if(0!==(h=sr(d[a],g,o,e,0,y))){for(n=0;n<h;n++)d[s+n]=g[o+n];if(s+=h,o+=h,(e-=h)<=1){u=!0;break}}if(d[s++]=d[a++],0==--i){u=!0;break}if(0!==(l=ar(g[o],d,a,i,0,y))){for(n=0;n<l;n++)d[s+n]=d[a+n];if(s+=l,a+=l,0===(i-=l)){u=!0;break}}if(d[s++]=g[o++],1==--e){u=!0;break}c--}while(ir<=h||ir<=l);if(u)break;c<0&&(c=0),c+=2}if((v=c)<1&&(v=1),1===e){for(n=0;n<i;n++)d[s+n]=d[a+n];d[s+i]=g[o]}else{if(0===e)throw new Error;for(n=0;n<e;n++)d[s+n]=g[o+n]}}:function(t,e,r,i){var n=0;for(n=0;n<i;n++)g[n]=d[r+n];var o=t+e-1,a=i-1,s=r+i-1,h=0,l=0;if(d[s--]=d[o--],0==--e){for(h=s-(i-1),n=0;n<i;n++)d[h+n]=g[n];return}if(1===i){for(l=(s-=e)+1,h=(o-=e)+1,n=e-1;0<=n;n--)d[l+n]=d[h+n];return d[s]=g[a]}var u=v;for(;;){var c=0,p=0,f=!1;do{if(y(g[a],d[o])<0){if(d[s--]=d[o--],c++,(p=0)==--e){f=!0;break}}else if(d[s--]=g[a--],p++,c=0,1==--i){f=!0;break}}while((c|p)<u);if(f)break;do{if(0!==(c=e-sr(g[a],d,t,e,e-1,y))){for(e-=c,l=(s-=c)+1,h=(o-=c)+1,n=c-1;0<=n;n--)d[l+n]=d[h+n];if(0===e){f=!0;break}}if(d[s--]=g[a--],1==--i){f=!0;break}if(0!==(p=i-ar(d[o],g,0,i,i-1,y))){for(i-=p,l=(s-=p)+1,h=(a-=p)+1,n=0;n<p;n++)d[l+n]=g[h+n];if(i<=1){f=!0;break}}if(d[s--]=d[o--],0==--e){f=!0;break}u--}while(ir<=c||ir<=p);if(f)break;u<0&&(u=0),u+=2}(v=u)<1&&(v=1);if(1===i){for(l=(s-=e)+1,h=(o-=e)+1,n=e-1;0<=n;n--)d[l+n]=d[h+n];d[s]=g[a]}else{if(0===i)throw new Error;for(h=s-(i-1),n=0;n<i;n++)d[h+n]=g[n]}})(e,r,i,n)}return a=[],s=[],{mergeRuns:function(){for(;1<h;){var t=h-2;if(1<=t&&s[t-1]<=s[t]+s[t+1]||2<=t&&s[t-2]<=s[t]+s[t-1])s[t-1]<s[t+1]&&t--;else if(s[t]>s[t+1])break;e(t)}},forceMergeRuns:function(){for(;1<h;){var t=h-2;0<t&&s[t-1]<s[t+1]&&t--,e(t)}},pushRun:function(t,e){a[h]=t,s[h]=e,h+=1}}}function lr(t,e,r,i){r=r||0;var n=(i=i||t.length)-r;if(!(n<2)){var o=0;if(n<rr)or(t,r,i,r+(o=nr(t,r,i,e)),e);else{var a,s=hr(t,e),h=function(t){for(var e=0;rr<=t;)e|=1&t,t>>=1;return t+e}(n);do{(o=nr(t,r,i,e))<h&&(h<(a=n)&&(a=h),or(t,r,r+a,r+o,e),o=a),s.pushRun(r,o),s.mergeRuns(),n-=o,r+=o}while(0!==n);s.forceMergeRuns()}}}var ur=1,cr=4,pr=!1;function fr(){pr||(pr=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function dr(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var yr=(vr.prototype.traverse=function(t,e){for(var r=0;r<this._roots.length;r++)this._roots[r].traverse(t,e)},vr.prototype.getDisplayList=function(t,e){e=e||!1;var r=this._displayList;return!t&&r.length||this.updateDisplayList(e),r},vr.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,r=this._displayList,i=0,n=e.length;i<n;i++)this._updateAndAddDisplayable(e[i],null,t);r.length=this._displayListLen,lr(r,dr)},vr.prototype._updateAndAddDisplayable=function(t,e,r){if(!t.ignore||r){t.beforeUpdate(),t.update(),t.afterUpdate();var i=t.getClipPath(),n=e&&e.length,o=0,a=t.__clipPaths;if(!t.ignoreClip&&(n||i)){if(a=a||(t.__clipPaths=[]),n)for(var s=0;s<e.length;s++)a[o++]=e[s];for(var h=i,l=t;h;)h.parent=l,h.updateTransform(),h=(l=a[o++]=h).getClipPath()}if(a&&(a.length=o),t.childrenRef){for(var u=t.childrenRef(),c=0;c<u.length;c++){var p=u[c];t.__dirty&&(p.__dirty|=ur),this._updateAndAddDisplayable(p,a,r)}t.__dirty=0}else{var f=t;isNaN(f.z)&&(fr(),f.z=0),isNaN(f.z2)&&(fr(),f.z2=0),isNaN(f.zlevel)&&(fr(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var d=t.getDecalElement&&t.getDecalElement();d&&this._updateAndAddDisplayable(d,a,r);var y=t.getTextGuideLine();y&&this._updateAndAddDisplayable(y,a,r);var v=t.getTextContent();v&&this._updateAndAddDisplayable(v,a,r)}},vr.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},vr.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,r=t.length;e<r;e++)this.delRoot(t[e]);else{var i=A(this._roots,t);0<=i&&this._roots.splice(i,1)}},vr.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},vr.prototype.getRoots=function(){return this._roots},vr.prototype.dispose=function(){this._displayList=null,this._roots=null},vr);function vr(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=dr}var gr=c.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)},_r={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,r=.1;return 0===t?0:1===t?1:(e=!r||r<1?(r=1,.1):.4*Math.asin(1/r)/(2*Math.PI),-(r*Math.pow(2,10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)))},elasticOut:function(t){var e,r=.1;return 0===t?0:1===t?1:(e=!r||r<1?(r=1,.1):.4*Math.asin(1/r)/(2*Math.PI),r*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,r=.1;return 0===t?0:1===t?1:(e=!r||r<1?(r=1,.1):.4*Math.asin(1/r)/(2*Math.PI),(t*=2)<1?r*Math.pow(2,10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:r*Math.pow(2,-10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){return t*t*(2.70158*t-1.70158)},backOut:function(t){return--t*t*(2.70158*t+1.70158)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((1+e)*t-e)*.5:.5*((t-=2)*t*((1+e)*t+e)+2)},bounceIn:function(t){return 1-_r.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*_r.bounceIn(2*t):.5*_r.bounceOut(2*t-1)+.5}},mr=Math.pow,xr=Math.sqrt,wr=1e-8,br=1e-4,Sr=xr(3),Tr=1/3,kr=xt(),Cr=xt(),Pr=xt();function Mr(t){return-wr<t&&t<wr}function Ar(t){return wr<t||t<-wr}function Dr(t,e,r,i,n){var o=1-n;return o*o*(o*t+3*n*e)+n*n*(n*i+3*o*r)}function zr(t,e,r,i,n){var o=1-n;return 3*(((e-t)*o+2*(r-e)*n)*o+(i-r)*n*n)}function Ir(t,e,r,i,n,o){var a,s,h,l,u,c,p,f,d,y,v,g,_=i+3*(e-r)-t,m=3*(r-2*e+t),x=3*(e-t),w=t-n,b=m*m-3*_*x,S=m*x-9*_*w,T=x*x-3*m*w,k=0;return Mr(b)&&Mr(S)?Mr(m)?o[0]=0:0<=(y=-x/m)&&y<=1&&(o[k++]=y):Mr(a=S*S-4*b*T)?(v=-(s=S/b)/2,0<=(y=-m/_+s)&&y<=1&&(o[k++]=y),0<=v&&v<=1&&(o[k++]=v)):0<a?(u=b*m+1.5*_*(-S-(h=xr(a))),0<=(y=(-m-((l=(l=b*m+1.5*_*(-S+h))<0?-mr(-l,Tr):mr(l,Tr))+(u=u<0?-mr(-u,Tr):mr(u,Tr))))/(3*_))&&y<=1&&(o[k++]=y)):(c=(2*b*m-3*_*S)/(2*xr(b*b*b)),p=Math.acos(c)/3,y=(-m-2*(f=xr(b))*(d=Math.cos(p)))/(3*_),v=(-m+f*(d+Sr*Math.sin(p)))/(3*_),g=(-m+f*(d-Sr*Math.sin(p)))/(3*_),0<=y&&y<=1&&(o[k++]=y),0<=v&&v<=1&&(o[k++]=v),0<=g&&g<=1&&(o[k++]=g)),k}function Lr(t,e,r,i,n){var o,a,s,h,l=6*r-12*e+6*t,u=9*e+3*i-3*t-9*r,c=3*e-3*t,p=0;return Mr(u)?Ar(l)&&0<=(s=-c/l)&&s<=1&&(n[p++]=s):Mr(o=l*l-4*u*c)?n[0]=-l/(2*u):0<o&&(h=(-l-(a=xr(o)))/(2*u),0<=(s=(-l+a)/(2*u))&&s<=1&&(n[p++]=s),0<=h&&h<=1&&(n[p++]=h)),p}function Rr(t,e,r,i,n,o){var a=(e-t)*n+t,s=(r-e)*n+e,h=(i-r)*n+r,l=(s-a)*n+a,u=(h-s)*n+s,c=(u-l)*n+l;o[0]=t,o[1]=a,o[2]=l,o[3]=c,o[4]=c,o[5]=u,o[6]=h,o[7]=i}function Or(t,e,r,i){var n=1-i;return n*(n*t+2*i*e)+i*i*r}function Fr(t,e,r,i){return 2*((1-i)*(e-t)+i*(r-e))}function Br(t,e,r){var i=t+r-2*e;return 0==i?.5:(t-e)/i}function Nr(t,e,r,i,n){var o=(e-t)*i+t,a=(r-e)*i+e,s=(a-o)*i+o;n[0]=t,n[1]=o,n[2]=s,n[3]=s,n[4]=a,n[5]=r}var Hr=/cubic-bezier\(([0-9,\.e ]+)\)/;function Wr(t){var e=t&&Hr.exec(t);if(e){var r=e[1].split(","),i=+rt(r[0]),n=+rt(r[1]),o=+rt(r[2]),a=+rt(r[3]);if(isNaN(i+n+o+a))return;var s=[];return function(t){return t<=0?0:1<=t?1:Ir(0,i,o,1,t,s)&&Dr(0,n,a,1,s[0])}}}var Er=(Xr.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var r=this._life,i=t-this._startTime-this._pausedTime,n=i/r;n<0&&(n=0),n=Math.min(n,1);var o=this.easingFunc,a=o?o(n):n;if(this.onframe(a),1===n){if(!this.loop)return!0;var s=i%r;this._startTime=t-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=e},Xr.prototype.pause=function(){this._paused=!0},Xr.prototype.resume=function(){this._paused=!1},Xr.prototype.setEasing=function(t){this.easing=t,this.easingFunc=W(t)?t:_r[t]||Wr(t)},Xr);function Xr(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||dt,this.ondestroy=t.ondestroy||dt,this.onrestart=t.onrestart||dt,t.easing&&this.setEasing(t.easing)}var Yr=function(t){this.value=t},qr=(jr.prototype.insert=function(t){var e=new Yr(t);return this.insertEntry(e),e},jr.prototype.insertEntry=function(t){this.head?((this.tail.next=t).prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},jr.prototype.remove=function(t){var e=t.prev,r=t.next;e?e.next=r:this.head=r,r?r.prev=e:this.tail=e,t.next=t.prev=null,this._len--},jr.prototype.len=function(){return this._len},jr.prototype.clear=function(){this.head=this.tail=null,this._len=0},jr);function jr(){this._len=0}var Vr=(Ur.prototype.put=function(t,e){var r,i,n,o=this._list,a=this._map,s=null;return null==a[t]&&(r=o.len(),i=this._lastRemovedEntry,r>=this._maxSize&&0<r&&(n=o.head,o.remove(n),delete a[n.key],s=n.value,this._lastRemovedEntry=n),i?i.value=e:i=new Yr(e),i.key=t,o.insertEntry(i),a[t]=i),s},Ur.prototype.get=function(t){var e=this._map[t],r=this._list;if(null!=e)return e!==r.tail&&(r.remove(e),r.insertEntry(e)),e.value},Ur.prototype.clear=function(){this._list.clear(),this._map={}},Ur.prototype.len=function(){return this._list.len()},Ur);function Ur(t){this._list=new qr,this._maxSize=10,this._map={},this._maxSize=t}var Gr={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Zr(t){return(t=Math.round(t))<0?0:255<t?255:t}function Kr(t){return t<0?0:1<t?1:t}function Qr(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Zr(parseFloat(e)/100*255):Zr(parseInt(e,10))}function $r(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Kr(parseFloat(e)/100):Kr(parseFloat(e))}function Jr(t,e,r){return r<0?r+=1:1<r&&--r,6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}function ti(t,e,r){return t+(e-t)*r}function ei(t,e,r,i,n){return t[0]=e,t[1]=r,t[2]=i,t[3]=n,t}function ri(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var ii=new Vr(20),ni=null;function oi(t,e){ni&&ri(ni,e),ni=ii.put(t,ni||e.slice())}function ai(t,e){if(t){e=e||[];var r=ii.get(t);if(r)return ri(e,r);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in Gr)return ri(e,Gr[i]),oi(t,e),e;var n,o=i.length;if("#"===i.charAt(0))return 4===o||5===o?0<=(n=parseInt(i.slice(1,4),16))&&n<=4095?(ei(e,(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,5===o?parseInt(i.slice(4),16)/15:1),oi(t,e),e):void ei(e,0,0,0,1):7===o||9===o?0<=(n=parseInt(i.slice(1,7),16))&&n<=16777215?(ei(e,(16711680&n)>>16,(65280&n)>>8,255&n,9===o?parseInt(i.slice(7),16)/255:1),oi(t,e),e):void ei(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?ei(e,+l[0],+l[1],+l[2],1):ei(e,0,0,0,1);u=$r(l.pop());case"rgb":return 3<=l.length?(ei(e,Qr(l[0]),Qr(l[1]),Qr(l[2]),3===l.length?u:$r(l[3])),oi(t,e),e):void ei(e,0,0,0,1);case"hsla":return 4!==l.length?void ei(e,0,0,0,1):(l[3]=$r(l[3]),si(l,e),oi(t,e),e);case"hsl":return 3!==l.length?void ei(e,0,0,0,1):(si(l,e),oi(t,e),e);default:return}}ei(e,0,0,0,1)}}function si(t,e){var r=(parseFloat(t[0])%360+360)%360/360,i=$r(t[1]),n=$r(t[2]),o=n<=.5?n*(i+1):n+i-n*i,a=2*n-o;return ei(e=e||[],Zr(255*Jr(a,o,r+1/3)),Zr(255*Jr(a,o,r)),Zr(255*Jr(a,o,r-1/3)),1),4===t.length&&(e[3]=t[3]),e}function hi(t,e){var r=ai(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,255<r[i]?r[i]=255:r[i]<0&&(r[i]=0);return fi(r,4===r.length?"rgba":"rgb")}}function li(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]=Zr(ti(a[0],s[0],h)),r[1]=Zr(ti(a[1],s[1],h)),r[2]=Zr(ti(a[2],s[2],h)),r[3]=Kr(ti(a[3],s[3],h)),r}}var ui=li;function ci(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=ai(e[n]),s=ai(e[o]),h=i-n,l=fi([Zr(ti(a[0],s[0],h)),Zr(ti(a[1],s[1],h)),Zr(ti(a[2],s[2],h)),Kr(ti(a[3],s[3],h))],"rgba");return r?{color:l,leftIndex:n,rightIndex:o,value:i}:l}}var pi=ci;function fi(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 di(t,e){var r=ai(t);return r?(.299*r[0]+.587*r[1]+.114*r[2])*r[3]/255+(1-r[3])*e:0}var yi=new Vr(100);function vi(t){if(E(t)){var e=yi.get(t);return e||(e=hi(t,-.1),yi.put(t,e)),e}if(U(t)){var r=L({},t);return r.colorStops=I(t.colorStops,function(t){return{offset:t.offset,color:hi(t.color,-.1)}}),r}return t}var gi=Object.freeze({__proto__:null,parseCssInt:Qr,parseCssFloat:$r,parse:ai,lift:hi,toHex:function(t){var e=ai(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},fastLerp:li,fastMapToColor:ui,lerp:ci,mapToColor:pi,modifyHSL:function(t,e,r,i){var n,o=ai(t);if(t)return o=function(t){if(t){var e,r,i,n,o,a=t[0]/255,s=t[1]/255,h=t[2]/255,l=Math.min(a,s,h),u=Math.max(a,s,h),c=u-l,p=(u+l)/2;0==c?r=e=0:(r=p<.5?c/(u+l):c/(2-u-l),i=((u-a)/6+c/2)/c,n=((u-s)/6+c/2)/c,o=((u-h)/6+c/2)/c,a===u?e=o-n:s===u?e=1/3+i-o:h===u&&(e=2/3+n-i),e<0&&(e+=1),1<e&&--e);var f=[360*e,r,p];return null!=t[3]&&f.push(t[3]),f}}(o),null!=e&&(o[0]=(n=W(e)?e(o[0]):e,(n=Math.round(n))<0?0:360<n?360:n)),null!=r&&(o[1]=$r(W(r)?r(o[1]):r)),null!=i&&(o[2]=$r(W(i)?i(o[2]):i)),fi(si(o),"rgba")},modifyAlpha:function(t,e){var r=ai(t);if(r&&null!=e)return r[3]=Kr(e),fi(r,"rgba")},stringify:fi,lum:di,random:function(){return fi([Math.round(255*Math.random()),Math.round(255*Math.random()),Math.round(255*Math.random())],"rgb")},liftColor:vi}),_i=Math.round;function mi(t){var e,r;return t&&"transparent"!==t?"string"==typeof t&&-1<t.indexOf("rgba")&&((r=ai(t))&&(t="rgb("+r[0]+","+r[1]+","+r[2]+")",e=r[3])):t="none",{color:t,opacity:null==e?1:e}}var xi=1e-4;function wi(t){return t<xi&&-xi<t}function bi(t){return _i(1e3*t)/1e3}function Si(t){return _i(1e4*t)/1e4}var Ti={left:"start",right:"end",center:"middle",middle:"middle"};function ki(t){return t&&!!t.image}function Ci(t){return ki(t)||(e=t)&&e.svgElement;var e}function Pi(t){return"linear"===t.type}function Mi(t){return"radial"===t.type}function Ai(t){return t&&("linear"===t.type||"radial"===t.type)}function Di(t){return"url(#"+t+")"}function zi(t){var e=t.getGlobalScale(),r=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(r)/Math.log(10)),1)}function Ii(t){var e=t.x||0,r=t.y||0,i=(t.rotation||0)*yt,n=Q(t.scaleX,1),o=Q(t.scaleY,1),a=t.skewX||0,s=t.skewY||0,h=[];return(e||r)&&h.push("translate("+e+"px,"+r+"px)"),i&&h.push("rotate("+i+")"),1===n&&1===o||h.push("scale("+n+","+o+")"),(a||s)&&h.push("skew("+_i(a*yt)+"deg, "+_i(s*yt)+"deg)"),h.join(" ")}var Li="undefined"!=typeof Buffer&&"function"==typeof Buffer.from?function(t){return Buffer.from(t).toString("base64")}:"function"==typeof btoa&&"function"==typeof unescape&&"function"==typeof encodeURIComponent?function(t){return btoa(unescape(encodeURIComponent(t)))}:function(t){return null},Ri=Array.prototype.slice;function Oi(t,e,r){return(e-t)*r+t}function Fi(t,e,r,i){for(var n=e.length,o=0;o<n;o++)t[o]=Oi(e[o],r[o],i);return t}function Bi(t,e,r,i){for(var n=e.length,o=0;o<n;o++)t[o]=e[o]+r[o]*i;return t}function Ni(t,e,r,i){for(var n=e.length,o=n&&e[0].length,a=0;a<n;a++){t[a]||(t[a]=[]);for(var s=0;s<o;s++)t[a][s]=e[a][s]+r[a][s]*i}return t}function Hi(t){if(z(t)){var e=t.length;if(z(t[0])){for(var r=[],i=0;i<e;i++)r.push(Ri.call(t[i]));return r}return Ri.call(t)}return t}function Wi(t){return t[0]=Math.floor(t[0])||0,t[1]=Math.floor(t[1])||0,t[2]=Math.floor(t[2])||0,t[3]=null==t[3]?1:t[3],"rgba("+t.join(",")+")"}function Ei(t){return 4===t||5===t}function Xi(t){return 1===t||2===t}var Yi=[0,0,0,0],qi=(ji.prototype.isFinished=function(){return this._finished},ji.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},ji.prototype.needsAnimate=function(){return 1<=this.keyframes.length},ji.prototype.getAdditiveTrack=function(){return this._additiveTrack},ji.prototype.addKeyframe=function(t,e,r){this._needsSort=!0;var i,n,o,a,s=this.keyframes,h=s.length,l=!1,u=6,c=e;z(e)?(1==(u=i=z((a=e)&&a[0])?2:1)&&!X(e[0])||2==i&&!X(e[0][0]))&&(l=!0):X(e)&&!K(e)?u=0:E(e)?isNaN(+e)?(n=ai(e))&&(c=n,u=3):u=0:U(e)&&((o=L({},c)).colorStops=I(e.colorStops,function(t){return{offset:t.offset,color:ai(t.color)}}),Pi(e)?u=4:Mi(e)&&(u=5),c=o),0===h?this.valType=u:u===this.valType&&6!==u||(l=!0),this.discrete=this.discrete||l;var p={time:t,value:c,rawValue:e,percent:0};return r&&(p.easing=r,p.easingFunc=W(r)?r:_r[r]||Wr(r)),s.push(p),p},ji.prototype.prepare=function(t,e){var r=this.keyframes;this._needsSort&&r.sort(function(t,e){return t.time-e.time});for(var i=this.valType,n=r.length,o=r[n-1],a=this.discrete,s=Xi(i),h=Ei(i),l=0;l<n;l++){var u=r[l],c=u.value,p=o.value;u.percent=u.time/t,a||(s&&l!==n-1?function(t,e,r){var i=t,n=e;if(i.push&&n.push){var o=i.length,a=n.length;if(o!==a)if(a<o)i.length=a;else for(var s=o;s<a;s++)i.push(1===r?n[s]:Ri.call(n[s]));for(var h=i[0]&&i[0].length,s=0;s<i.length;s++)if(1===r)isNaN(i[s])&&(i[s]=n[s]);else for(var l=0;l<h;l++)isNaN(i[s][l])&&(i[s][l]=n[s][l])}}(c,p,i):h&&function(t,e){for(var r=t.length,i=e.length,n=i<r?e:t,o=Math.min(r,i),a=n[o-1]||{color:[0,0,0,0],offset:0},s=o;s<Math.max(r,i);s++)n.push({offset:a.offset,color:a.color.slice()})}(c.colorStops,p.colorStops))}if(!a&&5!==i&&e&&this.needsAnimate()&&e.needsAnimate()&&i===e.valType&&!e._finished){this._additiveTrack=e;for(var f=r[0].value,l=0;l<n;l++)0===i?r[l].additiveValue=r[l].value-f:3===i?r[l].additiveValue=Bi([],r[l].value,f,-1):Xi(i)&&(r[l].additiveValue=(1===i?Bi:Ni)([],r[l].value,f,-1))}},ji.prototype.step=function(t,e){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var r,i,n,o,a,s,h,l,u,c=null!=this._additiveTrack,p=c?"additiveValue":"value",f=this.valType,d=this.keyframes,y=d.length,v=this.propName,g=3===f,_=this._lastFr,m=Math.min;if(1===y)r=i=d[0];else{if(e<0)x=0;else if(e<this._lastFrP){for(var x=m(_+1,y-1);0<=x&&!(d[x].percent<=e);x--);x=m(x,y-2)}else{for(x=_;x<y&&!(d[x].percent>e);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?Yi:t[v],!Xi(f)&&!g||a||(a=this._additiveValue=[]),this.discrete?t[v]=o<1?r.rawValue:i.rawValue:Xi(f)?(1===f?Fi:function(t,e,r,i){for(var n=e.length,o=n&&e[0].length,a=0;a<n;a++){t[a]||(t[a]=[]);for(var s=0;s<o;s++)t[a][s]=Oi(e[a][s],r[a][s],i)}return t})(a,r[p],i[p],o):Ei(f)?(s=r[p],h=i[p],l=4===f,t[v]={type:l?"linear":"radial",x:Oi(s.x,h.x,o),y:Oi(s.y,h.y,o),colorStops:I(s.colorStops,function(t,e){var r=h.colorStops[e];return{offset:Oi(t.offset,r.offset,o),color:Wi(Fi([],t.color,r.color,o))}}),global:h.global},l?(t[v].x2=Oi(s.x2,h.x2,o),t[v].y2=Oi(s.y2,h.y2,o)):t[v].r=Oi(s.r,h.r,o)):g?(Fi(a,r[p],i[p],o),c||(t[v]=Wi(a))):(u=Oi(r[p],i[p],o),c?this._additiveValue=u:t[v]=u),c&&this._addToTarget(t))}},ji.prototype._addToTarget=function(t){var e=this.valType,r=this.propName,i=this._additiveValue;0===e?t[r]=t[r]+i:3===e?(ai(t[r],Yi),Bi(Yi,Yi,i,1),t[r]=Wi(Yi)):1===e?Bi(t[r],t[r],i,1):2===e&&Ni(t[r],t[r],i,1)},ji);function ji(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}var Vi=(Ui.prototype.getMaxTime=function(){return this._maxTime},Ui.prototype.getDelay=function(){return this._delay},Ui.prototype.getLoop=function(){return this._loop},Ui.prototype.getTarget=function(){return this._target},Ui.prototype.changeTarget=function(t){this._target=t},Ui.prototype.when=function(t,e,r){return this.whenWithKeys(t,e,B(e),r)},Ui.prototype.whenWithKeys=function(t,e,r,i){for(var n=this._tracks,o=0;o<r.length;o++){var a=r[o],s=n[a];if(!s){s=n[a]=new qi(a);var h,l,u=void 0,c=this._getAdditiveTrack(a);if(c?(u=(l=(h=c.keyframes)[h.length-1])&&l.value,3===c.valType&&u&&(u=Wi(u))):u=this._target[a],null==u)continue;0<t&&s.addKeyframe(0,Hi(u),i),this._trackKeys.push(a)}s.addKeyframe(t,Hi(e[a]),i)}return this._maxTime=Math.max(this._maxTime,t),this},Ui.prototype.pause=function(){this._clip.pause(),this._paused=!0},Ui.prototype.resume=function(){this._clip.resume(),this._paused=!1},Ui.prototype.isPaused=function(){return!!this._paused},Ui.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},Ui.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,r=0;r<e;r++)t[r].call(this)},Ui.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,e=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,e)for(var r=0;r<e.length;r++)e[r].call(this)},Ui.prototype._setTracksFinished=function(){for(var t=this._tracks,e=this._trackKeys,r=0;r<e.length;r++)t[e[r]].setFinished()},Ui.prototype._getAdditiveTrack=function(t){var e,r=this._additiveAnimators;if(r)for(var i=0;i<r.length;i++){var n=r[i].getTrack(t);n&&(e=n)}return e},Ui.prototype.start=function(t){if(!(0<this._started)){this._started=1;for(var e,o=this,a=[],r=this._maxTime||0,i=0;i<this._trackKeys.length;i++){var n,s=this._trackKeys[i],h=this._tracks[s],l=this._getAdditiveTrack(s),u=h.keyframes,c=u.length;h.prepare(r,l),h.needsAnimate()&&(!this._allowDiscrete&&h.discrete?((n=u[c-1])&&(o._target[h.propName]=n.rawValue),h.setFinished()):a.push(h))}return a.length||this._force?(e=new Er({life:r,loop:this._loop,delay:this._delay||0,onframe:function(t){o._started=2;var e=o._additiveAnimators;if(e){for(var r=!1,i=0;i<e.length;i++)if(e[i]._clip){r=!0;break}r||(o._additiveAnimators=null)}for(i=0;i<a.length;i++)a[i].step(o._target,t);var n=o._onframeCbs;if(n)for(i=0;i<n.length;i++)n[i](o._target,t)},ondestroy:function(){o._doneCallback()}}),this._clip=e,this.animation&&this.animation.addClip(e),t&&e.setEasing(t)):this._doneCallback(),this}},Ui.prototype.stop=function(t){var e;this._clip&&(e=this._clip,t&&e.onframe(1),this._abortedCallback())},Ui.prototype.delay=function(t){return this._delay=t,this},Ui.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},Ui.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},Ui.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},Ui.prototype.getClip=function(){return this._clip},Ui.prototype.getTrack=function(t){return this._tracks[t]},Ui.prototype.getTracks=function(){var e=this;return I(this._trackKeys,function(t){return e._tracks[t]})},Ui.prototype.stopTracks=function(t,e){if(!t.length||!this._clip)return!0;for(var r=this._tracks,i=this._trackKeys,n=0;n<t.length;n++){var o=r[t[n]];o&&!o.isFinished()&&(e?o.step(this._target,1):1===this._started&&o.step(this._target,0),o.setFinished())}for(var a=!0,n=0;n<i.length;n++)if(!r[i[n]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},Ui.prototype.saveTo=function(t,e,r){if(t){e=e||this._trackKeys;for(var i=0;i<e.length;i++){var n,o,a=e[i],s=this._tracks[a];s&&!s.isFinished()&&(o=(n=s.keyframes)[r?0:n.length-1])&&(t[a]=Hi(o.rawValue))}}},Ui.prototype.__changeFinalValue=function(t,e){e=e||B(t);for(var r=0;r<e.length;r++){var i,n,o=e[r],a=this._tracks[o];a&&1<(i=a.keyframes).length&&(n=i.pop(),a.addKeyframe(n.time,t[o]),a.prepare(this._maxTime,a.getAdditiveTrack()))}},Ui);function Ui(t,e,r,i){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,(this._loop=e)&&i?S("Can' use additive animation on looped animation."):(this._additiveAnimators=i,this._allowDiscrete=r)}function Gi(){return(new Date).getTime()}var Zi,Ki=(mt(Qi,Zi=Et),Qi.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?((this._tail.next=t).prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},Qi.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},Qi.prototype.removeClip=function(t){var e,r;t.animation&&(e=t.prev,r=t.next,e?e.next=r:this._head=r,r?r.prev=e:this._tail=e,t.next=t.prev=t.animation=null)},Qi.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},Qi.prototype.update=function(t){for(var e=Gi()-this._pausedTime,r=e-this._time,i=this._head;i;)var n=i.next,i=(i.step(e,r)&&(i.ondestroy(),this.removeClip(i)),n);this._time=e,t||(this.trigger("frame",r),this.stage.update&&this.stage.update())},Qi.prototype._startLoop=function(){var e=this;this._running=!0,gr(function t(){e._running&&(gr(t),e._paused||e.update())})},Qi.prototype.start=function(){this._running||(this._time=Gi(),this._pausedTime=0,this._startLoop())},Qi.prototype.stop=function(){this._running=!1},Qi.prototype.pause=function(){this._paused||(this._pauseStart=Gi(),this._paused=!0)},Qi.prototype.resume=function(){this._paused&&(this._pausedTime+=Gi()-this._pauseStart,this._paused=!1)},Qi.prototype.clear=function(){for(var t=this._head;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._head=this._tail=null},Qi.prototype.isFinished=function(){return null==this._head},Qi.prototype.animate=function(t,e){e=e||{},this.start();var r=new Vi(t,e.loop);return this.addAnimator(r),r},Qi);function Qi(t){var e=Zi.call(this)||this;return e._running=!1,e._time=0,e._pausedTime=0,e._pauseStart=0,e._paused=!1,t=t||{},e.stage=t.stage||{},e}var $i,Ji,tn=c.domSupported,en=(Ji={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:$i=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:I($i,function(t){var e=t.replace("mouse","pointer");return Ji.hasOwnProperty(e)?e:t})}),rn=["mousemove","mouseup"],nn=["pointermove","pointerup"],on=!1;function an(t){var e=t.pointerType;return"pen"===e||"touch"===e}function sn(t){t&&(t.zrByTouch=!0)}function hn(t,e){for(var r=e,i=!1;r&&9!==r.nodeType&&!(i=r.domBelongToZr||r!==e&&r===t.painterRoot);)r=r.parentNode;return i}var ln=function(t,e){this.stopPropagation=dt,this.stopImmediatePropagation=dt,this.preventDefault=dt,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},un={mousedown:function(t){t=ie(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=ie(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=ie(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){hn(this,(t=ie(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){on=!0,t=ie(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){on||(t=ie(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){sn(t=ie(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),un.mousemove.call(this,t),un.mousedown.call(this,t)},touchmove:function(t){sn(t=ie(this.dom,t)),this.handler.processGesture(t,"change"),un.mousemove.call(this,t)},touchend:function(t){sn(t=ie(this.dom,t)),this.handler.processGesture(t,"end"),un.mouseup.call(this,t),new Date-this.__lastTouchMoment<300&&un.click.call(this,t)},pointerdown:function(t){un.mousedown.call(this,t)},pointermove:function(t){an(t)||un.mousemove.call(this,t)},pointerup:function(t){un.mouseup.call(this,t)},pointerout:function(t){an(t)||un.mouseout.call(this,t)}};R(["click","dblclick","contextmenu"],function(e){un[e]=function(t){t=ie(this.dom,t),this.trigger(e,t)}});var cn={pointermove:function(t){an(t)||cn.mousemove.call(this,t)},pointerup:function(t){cn.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function pn(i,n){var o=n.domHandlers;c.pointerEventsSupported?R(en.pointer,function(e){dn(n,e,function(t){o[e].call(i,t)})}):(c.touchEventsSupported&&R(en.touch,function(r){dn(n,r,function(t){var e;o[r].call(i,t),(e=n).touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)})}),R(en.mouse,function(e){dn(n,e,function(t){t=re(t),n.touching||o[e].call(i,t)})}))}function fn(n,o){function t(i){dn(o,i,function(t){var e,r;t=re(t),hn(n,t.target)||(r=t,t=ie((e=n).dom,new ln(e,r),!0),o.domHandlers[i].call(n,t))},{capture:!0})}c.pointerEventsSupported?R(nn,t):c.touchEventsSupported||R(rn,t)}function dn(t,e,r,i){var n,o,a,s;t.mounted[e]=r,t.listenerOpts[e]=i,n=t.domTarget,o=e,a=r,s=i,n.addEventListener(o,a,s)}function yn(t){var e,r,i,n,o=t.mounted;for(var a in o)o.hasOwnProperty(a)&&(e=t.domTarget,i=o[r=a],n=t.listenerOpts[a],e.removeEventListener(r,i,n));t.mounted={}}var vn,gn=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e},_n=(mt(mn,vn=Et),mn.prototype.dispose=function(){yn(this._localHandlerScope),tn&&yn(this._globalHandlerScope)},mn.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},mn.prototype.__togglePointerCapture=function(t){var e;this.__mayPointerCapture=null,tn&&+this.__pointerCapturing^+t&&(this.__pointerCapturing=t,e=this._globalHandlerScope,t?fn(this,e):yn(e))},mn);function mn(t,e){var r=vn.call(this)||this;return r.__pointerCapturing=!1,r.dom=t,r.painterRoot=e,r._localHandlerScope=new gn(t,un),tn&&(r._globalHandlerScope=new gn(document,cn)),pn(r,r._localHandlerScope),r}var xn=1;c.hasGlobalWindow&&(xn=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var wn=xn,bn="#333",Sn="#ccc",Tn=ue;function kn(t){return 5e-5<t||t<-5e-5}var Cn,Pn=[],Mn=[],An=le(),Dn=Math.abs,zn=(In.prototype.getLocalTransform=function(t){return Rn(this,t)},In.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},In.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},In.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},In.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},In.prototype.needLocalTransform=function(){return kn(this.rotation)||kn(this.x)||kn(this.y)||kn(this.scaleX-1)||kn(this.scaleY-1)||kn(this.skewX)||kn(this.skewY)},In.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),r=this.transform;e||t?(r=r||le(),e?this.getLocalTransform(r):Tn(r),t&&(e?pe(r,t,r):ce(r,t)),this.transform=r,this._resolveGlobalScaleRatio(r),this.invTransform=this.invTransform||le(),ve(this.invTransform,r)):r&&(Tn(r),this.invTransform=null)},In.prototype._resolveGlobalScaleRatio=function(t){var e,r,i,n,o=this.globalScaleRatio;null!=o&&1!==o&&(this.getGlobalScale(Pn),i=((Pn[0]-(e=Pn[0]<0?-1:1))*o+e)/Pn[0]||0,n=((Pn[1]-(r=Pn[1]<0?-1:1))*o+r)/Pn[1]||0,t[0]*=i,t[1]*=i,t[2]*=n,t[3]*=n)},In.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},In.prototype.setLocalTransform=function(t){var e,r,i,n;t&&(n=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],e=Math.atan2(t[1],t[0]),r=Math.PI/2+e-Math.atan2(t[3],t[2]),i=Math.sqrt(i)*Math.cos(r),n=Math.sqrt(n),this.skewX=r,this.skewY=0,this.rotation=-e,this.x=+t[4],this.y=+t[5],this.scaleX=n,this.scaleY=i,this.originX=0,this.originY=0)},In.prototype.decomposeTransform=function(){var t,e,r,i;this.transform&&(t=this.parent,e=this.transform,t&&t.transform&&(t.invTransform=t.invTransform||le(),pe(Mn,t.invTransform,e),e=Mn),r=this.originX,i=this.originY,(r||i)&&(An[4]=r,An[5]=i,pe(Mn,e,An),Mn[4]-=r,Mn[5]-=i,e=Mn),this.setLocalTransform(e))},In.prototype.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[0]=1,t[1]=1),t},In.prototype.transformCoordToLocal=function(t,e){var r=[t,e],i=this.invTransform;return i&&Rt(r,r,i),r},In.prototype.transformCoordToGlobal=function(t,e){var r=[t,e],i=this.transform;return i&&Rt(r,r,i),r},In.prototype.getLineScale=function(){var t=this.transform;return t&&1e-10<Dn(t[0]-1)&&1e-10<Dn(t[3]-1)?Math.sqrt(Dn(t[0]*t[3]-t[2]*t[1])):1},In.prototype.copyTransform=function(t){Fn(this,t)},In.getLocalTransform=function(t,e){e=e||[];var r,i,n=t.originX||0,o=t.originY||0,a=t.scaleX,s=t.scaleY,h=t.anchorX,l=t.anchorY,u=t.rotation||0,c=t.x,p=t.y,f=t.skewX?Math.tan(t.skewX):0,d=t.skewY?Math.tan(-t.skewY):0;return n||o||h||l?(r=n+h,i=o+l,e[4]=-r*a-f*i*s,e[5]=-i*s-d*r*a):e[4]=e[5]=0,e[0]=a,e[3]=s,e[1]=d*a,e[2]=f*s,u&&de(e,e,u),e[4]+=n+c,e[5]+=o+p,e},In.initDefaultProps=((Cn=In.prototype).scaleX=Cn.scaleY=Cn.globalScaleRatio=1,void(Cn.x=Cn.y=Cn.originX=Cn.originY=Cn.skewX=Cn.skewY=Cn.rotation=Cn.anchorX=Cn.anchorY=0)),In);function In(){}var Ln,Rn=zn.getLocalTransform,On=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Fn(t,e){return k(t,e,On)}function Bn(t){Ln=Ln||new Vr(100),t=t||H;var e=Ln.get(t);return e||(e={font:t,strWidthCache:new Vr(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:d.measureText("国",t).width,asciiCharWidth:d.measureText("a",t).width},Ln.put(t,e)),e}var Nn=0,Hn=5;function Wn(t,e){return t.asciiWidthMapTried||(t.asciiWidthMap=function(t){if(!(Hn<=Nn)){t=t||H;for(var e=[],r=+new Date,i=0;i<=127;i++)e[i]=d.measureText(String.fromCharCode(i),t).width;var n=new Date-r;return 16<n?Nn=Hn:2<n&&Nn++,e}}(t.font),t.asciiWidthMapTried=!0),0<=e&&e<=127?null!=t.asciiWidthMap?t.asciiWidthMap[e]:t.asciiCharWidth:t.stWideCharWidth}function En(t,e){var r=t.strWidthCache,i=r.get(e);return null==i&&(i=d.measureText(e,t.font).width,r.put(e,i)),i}function Xn(t,e,r,i){return"right"===r?i?t+=e:t-=e:"center"===r&&(i?t+=e/2:t-=e/2),t}function Yn(t,e,r,i){return"middle"===r?i?t+=e/2:t-=e/2:"bottom"===r&&(i?t+=e:t-=e),t}function qn(t){return Bn(t).stWideCharWidth}function jn(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t}var Vn,Un="__zr_normal__",Gn=On.concat(["ignore"]),Zn=O(On,function(t,e){return t[e]=!0,t},{ignore:!1}),Kn={},Qn=new Le(0,0,0,0),$n=[],Jn=(to.prototype._init=function(t){this.attr(t)},to.prototype.drift=function(t,e,r){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;(i=i||(this.transform=[1,0,0,1,0,0]))[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},to.prototype.beforeUpdate=function(){},to.prototype.afterUpdate=function(){},to.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},to.prototype.updateInnerText=function(t){var e,r,i,n,o,a,s,h,l,u,c,p,f,d,y,v,g,_,m,x=this._textContent;!x||x.ignore&&!t||(this.textConfig||(this.textConfig={}),r=(e=this.textConfig).local,o=n=void 0,a=!1,(i=x.innerTransformable).parent=r?this:null,f=!1,i.copyTransform(x),s=null!=e.position,l=void 0,((h=e.autoOverflowArea)||s)&&(l=Qn,e.layoutRect?l.copy(e.layoutRect):l.copy(this.getBoundingRect()),r||l.applyTransform(this.transform)),s&&(this.calculateTextPosition?this.calculateTextPosition(Kn,e,l):function(t,e,r){var i=e.position||"inside",n=null!=e.distance?e.distance:5,o=r.height,a=r.width,s=o/2,h=r.x,l=r.y,u="left",c="top";if(i instanceof Array)h+=jn(i[0],r.width),l+=jn(i[1],r.height),c=u=null;else switch(i){case"left":h-=n,l+=s,u="right",c="middle";break;case"right":h+=n+a,l+=s,c="middle";break;case"top":h+=a/2,l-=n,u="center",c="bottom";break;case"bottom":h+=a/2,l+=o+n,u="center";break;case"inside":h+=a/2,l+=s,u="center",c="middle";break;case"insideLeft":h+=n,l+=s,c="middle";break;case"insideRight":h+=a-n,l+=s,u="right",c="middle";break;case"insideTop":h+=a/2,l+=n,u="center";break;case"insideBottom":h+=a/2,l+=o-n,u="center",c="bottom";break;case"insideTopLeft":h+=n,l+=n;break;case"insideTopRight":h+=a-n,l+=n,u="right";break;case"insideBottomLeft":h+=n,l+=o-n,c="bottom";break;case"insideBottomRight":h+=a-n,l+=o-n,u="right",c="bottom"}(t=t||{}).x=h,t.y=l,t.align=u,t.verticalAlign=c}(Kn,e,l),i.x=Kn.x,i.y=Kn.y,n=Kn.align,o=Kn.verticalAlign,(u=e.origin)&&null!=e.rotation&&(p=c=void 0,p="center"===u?(c=.5*l.width,.5*l.height):(c=jn(u[0],l.width),jn(u[1],l.height)),f=!0,i.originX=-i.x+c+(r?0:l.x),i.originY=-i.y+p+(r?0:l.y))),null!=e.rotation&&(i.rotation=e.rotation),(d=e.offset)&&(i.x+=d[0],i.y+=d[1],f||(i.originX=-d[0],i.originY=-d[1])),y=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),h?(v=y.overflowRect=y.overflowRect||new Le(0,0,0,0),i.getLocalTransform($n),ve($n,$n),Le.copy(v,l),v.applyTransform($n)):y.overflowRect=null,m=_=g=void 0,(null==e.inside?"string"==typeof e.position&&0<=e.position.indexOf("inside"):e.inside)&&this.canBeInsideText()?(g=e.insideFill,_=e.insideStroke,null!=g&&"auto"!==g||(g=this.getInsideTextFill()),null!=_&&"auto"!==_||(_=this.getInsideTextStroke(g),m=!0)):(g=e.outsideFill,_=e.outsideStroke,null!=g&&"auto"!==g||(g=this.getOutsideFill()),null!=_&&"auto"!==_||(_=this.getOutsideStroke(g),m=!0)),(g=g||"#000")===y.fill&&_===y.stroke&&m===y.autoStroke&&n===y.align&&o===y.verticalAlign||(a=!0,y.fill=g,y.stroke=_,y.autoStroke=m,y.align=n,y.verticalAlign=o,x.setDefaultTextStyle(y)),x.__dirty|=ur,a&&x.dirtyStyle(!0))},to.prototype.canBeInsideText=function(){return!0},to.prototype.getInsideTextFill=function(){return"#fff"},to.prototype.getInsideTextStroke=function(t){return"#000"},to.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Sn:bn},to.prototype.getOutsideStroke=function(t){for(var e=this.__zr&&this.__zr.getBackgroundColor(),r="string"==typeof e&&ai(e),i=(r=r||[255,255,255,1])[3],n=this.__zr.isDarkMode(),o=0;o<3;o++)r[o]=r[o]*i+(n?0:255)*(1-i);return r[3]=1,fi(r,"rgba")},to.prototype.traverse=function(t,e){},to.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},L(this.extra,e)):this[t]=e},to.prototype.hide=function(){this.ignore=!0,this.markRedraw()},to.prototype.show=function(){this.ignore=!1,this.markRedraw()},to.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(Y(t))for(var r=B(t),i=0;i<r.length;i++){var n=r[i];this.attrKV(n,t[n])}return this.markRedraw(),this},to.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var e=this._normalState,r=0;r<this.animators.length;r++){var i,n,o=this.animators[r],a=o.__fromStateTransition;o.getLoop()||a&&a!==Un||(n=(i=o.targetName)?e[i]:e,o.saveTo(n))}},to.prototype._innerSaveToNormal=function(t){var e=(e=this._normalState)||(this._normalState={});t.textConfig&&!e.textConfig&&(e.textConfig=this.textConfig),this._savePrimaryToNormal(t,e,Gn)},to.prototype._savePrimaryToNormal=function(t,e,r){for(var i=0;i<r.length;i++){var n=r[i];null==t[n]||n in e||(e[n]=this[n])}},to.prototype.hasState=function(){return 0<this.currentStates.length},to.prototype.getState=function(t){return this.states[t]},to.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},to.prototype.clearStates=function(t){this.useState(Un,!1,t)},to.prototype.useState=function(t,e,r,i){var n=t===Un;if(this.hasState()||!n){var o,a=this.currentStates,s=this.stateTransition;if(!(0<=A(a,t))||!e&&1!==a.length){if(this.stateProxy&&!n&&(o=this.stateProxy(t)),(o=o||this.states&&this.states[t])||n){n||this.saveCurrentToNormalState(o);var h=this._textContent,l=oo(this,h,o,i);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(t,o,this._normalState,e,so(this,r,s),s);var u=this._textGuide;return h&&h.useState(t,e,r,!!l),u&&u.useState(t,e,r,!!l),n?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=~ur),o}S("State "+t+" not exists.")}}},to.prototype.useStates=function(t,e,r){if(t.length){var i=[],n=this.currentStates,o=t.length,a=o===n.length;if(a)for(var s=0;s<o;s++)if(t[s]!==n[s]){a=!1;break}if(a)return;for(s=0;s<o;s++){var h=t[s],l=void 0;this.stateProxy&&(l=this.stateProxy(h,t)),(l=l||this.states[h])&&i.push(l)}var u=i[o-1],c=this._textContent,p=oo(this,c,u,r);p&&!this.__inHover&&(this.__inHover=p);var f=this._mergeStates(i),d=this.stateTransition;this.saveCurrentToNormalState(f),this._applyStateObj(t.join(","),f,this._normalState,!1,so(this,e,d),d);var y=this._textGuide;c&&c.useStates(t,e,!!p),y&&y.useStates(t,e,!!p),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!p&&this.__inHover&&(this.__inHover=0,this.__dirty&=~ur)}else this.clearStates()},to.prototype.isSilent=function(){for(var t=this;t;){if(t.silent)return!0;var e=t.__hostTarget,t=e?t.ignoreHostSilent?null:e:t.parent}return!1},to.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var e=this.animators[t];e.targetName&&e.changeTarget(this[e.targetName])}},to.prototype.removeState=function(t){var e,r=A(this.currentStates,t);0<=r&&((e=this.currentStates.slice()).splice(r,1),this.useStates(e))},to.prototype.replaceState=function(t,e,r){var i=this.currentStates.slice(),n=A(i,t),o=0<=A(i,e);0<=n?o?i.splice(n,1):i[n]=e:r&&!o&&i.push(e),this.useStates(i)},to.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},to.prototype._mergeStates=function(t){for(var e,r={},i=0;i<t.length;i++){var n=t[i];L(r,n),n.textConfig&&L(e=e||{},n.textConfig)}return e&&(r.textConfig=e),r},to.prototype._applyStateObj=function(t,e,r,i,n,o){if(1!==this.__inHover){var a=!(e&&i);e&&e.textConfig?(this.textConfig=L({},i?this.textConfig:r.textConfig),L(this.textConfig,e.textConfig)):a&&r.textConfig&&(this.textConfig=r.textConfig);for(var s={},h=!1,l=0;l<Gn.length;l++){var u=Gn[l],c=n&&Zn[u];e&&null!=e[u]?c?(h=!0,s[u]=e[u]):this[u]=e[u]:a&&null!=r[u]&&(c?(h=!0,s[u]=r[u]):this[u]=r[u])}if(!n)for(l=0;l<this.animators.length;l++){var p=this.animators[l],f=p.targetName;p.getLoop()||p.__changeFinalValue(f?(e||r)[f]:e||r)}h&&this._transitionState(t,s,o)}},to.prototype._attachComponent=function(t){var e;t.__zr&&!t.__hostTarget||t!==this&&((e=this.__zr)&&t.addSelfToZr(e),t.__zr=e,t.__hostTarget=this)},to.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},to.prototype.getClipPath=function(){return this._clipPath},to.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},to.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},to.prototype.getTextContent=function(){return this._textContent},to.prototype.setTextContent=function(t){var e=this._textContent;e!==t&&(e&&e!==t&&this.removeTextContent(),t.innerTransformable=new zn,this._attachComponent(t),this._textContent=t,this.markRedraw())},to.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),L(this.textConfig,t),this.markRedraw()},to.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},to.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},to.prototype.getTextGuideLine=function(){return this._textGuide},to.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},to.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},to.prototype.markRedraw=function(){this.__dirty|=ur;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},to.prototype.dirty=function(){this.markRedraw()},to.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var e=this.animators;if(e)for(var r=0;r<e.length;r++)t.animation.addAnimator(e[r]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)}},to.prototype.removeSelfFromZr=function(t){if(this.__zr){this.__zr=null;var e=this.animators;if(e)for(var r=0;r<e.length;r++)t.animation.removeAnimator(e[r]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},to.prototype.animate=function(t,e,r){var i=t?this[t]:this,n=new Vi(i,e,r);return t&&(n.targetName=t),this.addAnimator(n,t),n},to.prototype.addAnimator=function(r,t){var e=this.__zr,i=this;r.during(function(){i.updateDuringAnimation(t)}).done(function(){var t=i.animators,e=A(t,r);0<=e&&t.splice(e,1)}),this.animators.push(r),e&&e.animation.addAnimator(r),e&&e.wakeUp()},to.prototype.updateDuringAnimation=function(t){this.markRedraw()},to.prototype.stopAnimation=function(t,e){for(var r=this.animators,i=r.length,n=[],o=0;o<i;o++){var a=r[o];t&&t!==a.scope?n.push(a):a.stop(e)}return this.animators=n,this},to.prototype.animateTo=function(t,e,r){ro(this,t,e,r)},to.prototype.animateFrom=function(t,e,r){ro(this,t,e,r,!0)},to.prototype._transitionState=function(t,e,r,i){for(var n=ro(this,e,r,i),o=0;o<n.length;o++)n[o].__fromStateTransition=t},to.prototype.getBoundingRect=function(){return null},to.prototype.getPaintRect=function(){return null},to.initDefaultProps=((Vn=to.prototype).type="element",Vn.name="",Vn.ignore=Vn.silent=Vn.ignoreHostSilent=Vn.isGroup=Vn.draggable=Vn.dragging=Vn.ignoreClip=!1,Vn.__inHover=0,Vn.__dirty=ur,void(Object.defineProperty&&(eo("position","_legacyPos","x","y"),eo("scale","_legacyScale","scaleX","scaleY"),eo("origin","_legacyOrigin","originX","originY")))),to);function to(t){this.id=b(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}function eo(t,e,r,i){function n(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[i]},set:function(t){e[i]=t}})}Object.defineProperty(Vn,t,{get:function(){var t;return this[e]||(t=this[e]=[],n(this,t)),this[e]},set:function(t){this[r]=t[0],this[i]=t[1],this[e]=t,n(this,t)}})}function ro(t,e,r,i,n){var o=[];!function t(e,r,i,n,o,a,s,h){var l=B(n);var u=o.duration;var c=o.delay;var p=o.additive;var f=o.setToFinal;var d=!Y(a);var y=e.animators;var v=[];for(var g=0;g<l.length;g++){var _=l[g],m=n[_];if(null!=m&&null!=i[_]&&(d||a[_]))if(!Y(m)||z(m)||U(m))v.push(_);else{if(r){h||(i[_]=m,e.updateDuringAnimation(r));continue}t(e,_,i[_],m,o,a&&a[_],s,h)}else h||(i[_]=m,e.updateDuringAnimation(r),v.push(_))}var x=v.length;if(!p&&x)for(var w=0;w<y.length;w++){var b,S=y[w];S.targetName!==r||S.stopTracks(v)&&(b=A(y,S),y.splice(b,1))}o.force||(v=F(v,function(t){return e=n[t],r=i[t],!(e===r||z(e)&&z(r)&&function(t,e){var r=t.length;if(r!==e.length)return;for(var i=0;i<r;i++)if(t[i]!==e[i])return;return 1}(e,r));var e,r}),x=v.length);if(0<x||o.force&&!s.length){var T=void 0,k=void 0,C=void 0;if(h){k={},f&&(T={});for(var w=0;w<x;w++){var _=v[w];k[_]=i[_],f?T[_]=n[_]:i[_]=n[_]}}else if(f){C={};for(var w=0;w<x;w++){var _=v[w];C[_]=Hi(i[_]),no(i,n,_)}}var S=new Vi(i,!1,!1,p?F(y,function(t){return t.targetName===r}):null);S.targetName=r,o.scope&&(S.scope=o.scope),f&&T&&S.whenWithKeys(0,T,v),C&&S.whenWithKeys(0,C,v),S.whenWithKeys(null==u?500:u,h?k:n,v).delay(c||0),e.addAnimator(S,r),s.push(S)}}(t,"",t,e,r=r||{},i,o,n);function a(){l=!0,--h<=0&&(l?u&&u():c&&c())}function s(){--h<=0&&(l?u&&u():c&&c())}var h=o.length,l=!1,u=r.done,c=r.aborted;h||u&&u(),0<o.length&&r.during&&o[0].during(function(t,e){r.during(e)});for(var p=0;p<o.length;p++){var f=o[p];f.done(a),f.aborted(s),r.force&&f.duration(r.duration),f.start(r.easing)}return o}function io(t,e,r){for(var i=0;i<r;i++)t[i]=e[i]}function no(t,e,r){if(z(e[r]))if(z(t[r])||(t[r]=[]),j(e[r])){var i=e[r].length;t[r].length!==i&&(t[r]=new e[r].constructor(i),io(t[r],e[r],i))}else{var n=e[r],o=t[r],a=n.length;if(z(n[0]))for(var s=n[0].length,h=0;h<a;h++)o[h]?io(o[h],n[h],s):o[h]=Array.prototype.slice.call(n[h]);else io(o,n,a);o.length=n.length}else t[r]=e[r]}function oo(t,e,r,i){return!(r&&r.hoverLayer||i)||ao(t)||e&&ao(e)?0:1}function ao(t){return"text"===t.type||"tspan"===t.type}function so(t,e,r){return!e&&!t.__inHover&&r&&0<r.duration}D(Jn,Et),D(Jn,zn);var ho,lo=(mt(uo,ho=Jn),uo.prototype.childrenRef=function(){return this._children},uo.prototype.children=function(){return this._children.slice()},uo.prototype.childAt=function(t){return this._children[t]},uo.prototype.childOfName=function(t){for(var e=this._children,r=0;r<e.length;r++)if(e[r].name===t)return e[r]},uo.prototype.childCount=function(){return this._children.length},uo.prototype.add=function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},uo.prototype.addBefore=function(t,e){var r,i;return t&&t!==this&&t.parent!==this&&e&&e.parent===this&&0<=(i=(r=this._children).indexOf(e))&&(r.splice(i,0,t),this._doAdd(t)),this},uo.prototype.replace=function(t,e){var r=A(this._children,t);return 0<=r&&this.replaceAt(e,r),this},uo.prototype.replaceAt=function(t,e){var r,i=this._children,n=i[e];return t&&t!==this&&t.parent!==this&&t!==n&&(i[e]=t,n.parent=null,(r=this.__zr)&&n.removeSelfFromZr(r),this._doAdd(t)),this},uo.prototype._doAdd=function(t){t.parent&&t.parent.remove(t);var e=(t.parent=this).__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},uo.prototype.remove=function(t){var e=this.__zr,r=this._children,i=A(r,t);return i<0||(r.splice(i,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},uo.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,r=0;r<t.length;r++){var i=t[r];e&&i.removeSelfFromZr(e),i.parent=null}return t.length=0,this},uo.prototype.eachChild=function(t,e){for(var r=this._children,i=0;i<r.length;i++){var n=r[i];t.call(e,n,i)}return this},uo.prototype.traverse=function(t,e){for(var r=0;r<this._children.length;r++){var i=this._children[r],n=t.call(e,i);i.isGroup&&!n&&i.traverse(t,e)}return this},uo.prototype.addSelfToZr=function(t){ho.prototype.addSelfToZr.call(this,t);for(var e=0;e<this._children.length;e++)this._children[e].addSelfToZr(t)},uo.prototype.removeSelfFromZr=function(t){ho.prototype.removeSelfFromZr.call(this,t);for(var e=0;e<this._children.length;e++)this._children[e].removeSelfFromZr(t)},uo.prototype.getBoundingRect=function(t){for(var e=new Le(0,0,0,0),r=t||this._children,i=[],n=null,o=0;o<r.length;o++){var a,s,h=r[o];h.ignore||h.invisible||(a=h.getBoundingRect(),(s=h.getLocalTransform(i))?(Le.applyTransform(e,a,s),(n=n||e.clone()).union(e)):(n=n||a.clone()).union(a))}return n||e},uo);function uo(t){var e=ho.call(this)||this;return e.isGroup=!0,e._children=[],e.attr(t),e}lo.prototype.type="group";var co={},po={};var fo,yo=(vo.prototype.add=function(t){!this._disposed&&t&&(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},vo.prototype.remove=function(t){!this._disposed&&t&&(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},vo.prototype.configLayer=function(t,e){this._disposed||(this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh())},vo.prototype.setBackgroundColor=function(t){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=function(t){if(!t)return!1;if("string"==typeof t)return di(t,1)<.4;if(t.colorStops){for(var e=t.colorStops,r=0,i=e.length,n=0;n<i;n++)r+=di(e[n].color,1);return(r/=i)<.4}return!1}(t))},vo.prototype.getBackgroundColor=function(){return this._backgroundColor},vo.prototype.setDarkMode=function(t){this._darkMode=t},vo.prototype.isDarkMode=function(){return this._darkMode},vo.prototype.refreshImmediately=function(t){this._disposed||this._refresh({animUpdate:!t,refresh:!0,refreshHover:!1})},vo.prototype._refresh=function(t){t.animUpdate&&this.animation.update(!0),this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh({refresh:t.refresh,refreshHover:t.refreshHover}),this._needsRefresh=this._needsRefreshHover=!1},vo.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},vo.prototype.flush=function(){this._disposed||this._flush(!0)},vo.prototype._flush=function(t){var e,r=Gi(),i=this._needsRefresh,n=this._needsRefreshHover;(i||n)&&(e=!0,this._refresh({animUpdate:t,refresh:i,refreshHover:n}));var o=Gi();e?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:o-r})):0<this._sleepAfterStill&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},vo.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},vo.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},vo.prototype.refreshHover=function(){this._needsRefreshHover=!0},vo.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},vo.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},vo.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},vo.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},vo.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},vo.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},vo.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},vo.prototype.on=function(t,e,r){return this._disposed||this.handler.on(t,e,r),this},vo.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},vo.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},vo.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e<t.length;e++)t[e]instanceof lo&&t[e].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},vo.prototype.dispose=function(){var t;this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,t=this.id,delete po[t])},vo);function vo(t,e,r){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!1,this._darkMode=!1,r=r||{},this.dom=e,this.id=t;var n=new yr,o=r.renderer||"canvas";co[o]||(o=B(co)[0]),r.useDirtyRect=null!=r.useDirtyRect&&r.useDirtyRect;var a=new co[o](e,n,r,t),s=r.ssr||a.ssrOnly;this.storage=n,this.painter=a;var h,l=c.node||c.worker||s?null:new _n(a.getViewportRoot(),a.root),u=r.useCoarsePointer;(null==u||"auto"===u?c.touchEventsSupported:!!u)&&(h=Q(r.pointerSize,44)),this.handler=new $e(n,a,l,a.root,h),this.animation=new Ki({stage:{update:s?null:function(){return i._flush(!1)}}}),s||this.animation.start()}function go(t,e){co[t]=e}function _o(t){if("function"==typeof fo)return fo(t)}var mo="__zr_style_"+Math.round(10*Math.random()),xo={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},wo={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};xo[mo]=!0;var bo,So,To=["z","z2","invisible"],ko=["invisible"],Co=(mt(Po,bo=Jn),Po.prototype._init=function(t){for(var e=B(t),r=0;r<e.length;r++){var i=e[r];"style"===i?this.useStyle(t[i]):bo.prototype.attrKV.call(this,i,t[i])}this.style||this.useStyle({})},Po.prototype.beforeBrush=function(t){},Po.prototype.afterBrush=function(){},Po.prototype.innerBeforeBrush=function(){},Po.prototype.innerAfterBrush=function(){},Po.prototype.shouldBePainted=function(t,e,r,i){var n=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&function(t,e,r){return Mo.copy(t.getBoundingRect()),t.transform&&Mo.applyTransform(t.transform),Ao.width=e,Ao.height=r,!Mo.intersect(Ao)}(this,t,e)||n&&!n[0]&&!n[3])return!1;if(r&&this.__clipPaths&&this.__clipPaths.length)for(var o=0;o<this.__clipPaths.length;++o)if(this.__clipPaths[o].isZeroArea())return!1;if(i&&this.parent)for(var a=this.parent;a;){if(a.ignore)return!1;a=a.parent}return!0},Po.prototype.contain=function(t,e){return this.rectContain(t,e)},Po.prototype.traverse=function(t,e){t.call(e,this)},Po.prototype.rectContain=function(t,e){var r=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(r[0],r[1])},Po.prototype.getPaintRect=function(){var t,e,r,i,n,o,a,s=this._paintRect;return this._paintRect&&!this.__dirty||(t=this.transform,e=this.getBoundingRect(),i=(r=this.style).shadowBlur||0,n=r.shadowOffsetX||0,o=r.shadowOffsetY||0,s=this._paintRect||(this._paintRect=new Le(0,0,0,0)),t?Le.applyTransform(s,e,t):s.copy(e),(i||n||o)&&(s.width+=2*i+Math.abs(n),s.height+=2*i+Math.abs(o),s.x=Math.min(s.x,s.x+n-i),s.y=Math.min(s.y,s.y+o-i)),a=this.dirtyRectTolerance,s.isZero()||(s.x=Math.floor(s.x-a),s.y=Math.floor(s.y-a),s.width=Math.ceil(s.width+1+2*a),s.height=Math.ceil(s.height+1+2*a))),s},Po.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new Le(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},Po.prototype.getPrevPaintRect=function(){return this._prevPaintRect},Po.prototype.animateStyle=function(t){return this.animate("style",t)},Po.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():this.markRedraw()},Po.prototype.attrKV=function(t,e){"style"!==t?bo.prototype.attrKV.call(this,t,e):this.style?this.setStyle(e):this.useStyle(e)},Po.prototype.setStyle=function(t,e){return"string"==typeof t?this.style[t]=e:L(this.style,t),this.dirtyStyle(),this},Po.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},Po.prototype.dirty=function(){this.dirtyStyle()},Po.prototype.styleChanged=function(){return!!(2&this.__dirty)},Po.prototype.styleUpdated=function(){this.__dirty&=-3},Po.prototype.createStyle=function(t){return ct(xo,t)},Po.prototype.useStyle=function(t){t[mo]||(t=this.createStyle(t)),this.style=t,this.dirtyStyle()},Po.prototype._useHoverStyle=function(t){this.__hoverStyle=t},Po.prototype.isStyleObject=function(t){return t[mo]},Po.prototype._innerSaveToNormal=function(t){bo.prototype._innerSaveToNormal.call(this,t);var e=this._normalState;t.style&&!e.style&&(e.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,e,To)},Po.prototype._applyStateObj=function(t,e,r,i,n,o){bo.prototype._applyStateObj.call(this,t,e,r,i,n,o);var a,s=!(e&&i),h=1===this.__inHover;if(e&&e.style?n?i?a=e.style:(a=this._mergeStyle(this.createStyle(),r.style),this._mergeStyle(a,e.style)):(a=this._mergeStyle(this.createStyle(),i?this.style:r.style),this._mergeStyle(a,e.style)):s&&(a=r.style),a)if(n){var l=this.style;if(this.style=this.createStyle(s?{}:l),s)for(var u=B(l),c=0;c<u.length;c++)(f=u[c])in a&&(a[f]=a[f],this.style[f]=l[f]);for(var p=B(a),c=0;c<p.length;c++){var f=p[c];this.style[f]=this.style[f]}this._transitionState(t,{style:a},o,this.getAnimationStyleProps())}else h?this._useHoverStyle(a):this.useStyle(a);if(!h)for(var d=this.__inHover?ko:To,c=0;c<d.length;c++)f=d[c],e&&null!=e[f]?this[f]=e[f]:s&&null!=r[f]&&(this[f]=r[f])},Po.prototype._mergeStates=function(t){for(var e,r=bo.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var n=t[i];n.style&&(e=e||{},this._mergeStyle(e,n.style))}return e&&(r.style=e),r},Po.prototype._mergeStyle=function(t,e){return L(t,e),t},Po.prototype.getAnimationStyleProps=function(){return wo},Po.initDefaultProps=((So=Po.prototype).type="displayable",So.invisible=!1,So.z=0,So.z2=0,So.zlevel=0,So.culling=!1,So.cursor="pointer",So.rectHover=!1,So.incremental=0,So._rect=null,So.dirtyRectTolerance=0,void(So.__dirty=2|ur)),Po);function Po(t){return bo.call(this,t)||this}var Mo=new Le(0,0,0,0),Ao=new Le(0,0,0,0);var Do=Math.min,zo=Math.max,Io=Math.sin,Lo=Math.cos,Ro=2*Math.PI,Oo=xt(),Fo=xt(),Bo=xt();function No(t,e,r){if(0!==t.length){for(var i=t[0],n=i[0],o=i[0],a=i[1],s=i[1],h=1;h<t.length;h++)i=t[h],n=Do(n,i[0]),o=zo(o,i[0]),a=Do(a,i[1]),s=zo(s,i[1]);e[0]=n,e[1]=a,r[0]=o,r[1]=s}}function Ho(t,e,r,i,n,o){n[0]=Do(t,r),n[1]=Do(e,i),o[0]=zo(t,r),o[1]=zo(e,i)}var Wo=[],Eo=[];var Xo={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Yo=[],qo=[],jo=[],Vo=[],Uo=[],Go=[],Zo=Math.min,Ko=Math.max,Qo=Math.cos,$o=Math.sin,Jo=Math.abs,ta=Math.PI,ea=2*ta,ra="undefined"!=typeof Float32Array,ia=[];function na(t){return Math.round(t/ta*1e8)/1e8%2*ta}var oa,aa=(sa.prototype.increaseVersion=function(){this._version++},sa.prototype.getVersion=function(){return this._version},sa.prototype.setScale=function(t,e,r){0<(r=r||0)&&(this._ux=Jo(r/wn/t)||0,this._uy=Jo(r/wn/e)||0)},sa.prototype.setDPR=function(t){this.dpr=t},sa.prototype.setContext=function(t){this._ctx=t},sa.prototype.getContext=function(){return this._ctx},sa.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},sa.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},sa.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(Xo.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},sa.prototype.lineTo=function(t,e){var r,i=Jo(t-this._xi),n=Jo(e-this._yi),o=i>this._ux||n>this._uy;return this.addData(Xo.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},sa.prototype.bezierCurveTo=function(t,e,r,i,n,o){return this._drawPendingPt(),this.addData(Xo.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},sa.prototype.quadraticCurveTo=function(t,e,r,i){return this._drawPendingPt(),this.addData(Xo.Q,t,e,r,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,r,i),this._xi=r,this._yi=i,this},sa.prototype.arc=function(t,e,r,i,n,o){this._drawPendingPt(),ia[0]=i,ia[1]=n,function(t,e){var r=na(t[0]);r<0&&(r+=ea);var i=r-t[0],n=t[1];n+=i,!e&&ea<=n-r?n=r+ea:e&&ea<=r-n?n=r-ea:!e&&n<r?n=r+(ea-na(r-n)):e&&r<n&&(n=r-(ea-na(n-r))),t[0]=r,t[1]=n}(ia,o),i=ia[0];var a=(n=ia[1])-i;return this.addData(Xo.A,t,e,r,r,i,a,0,o?0:1),this._ctx&&this._ctx.arc(t,e,r,i,n,o),this._xi=Qo(n)*r+t,this._yi=$o(n)*r+e,this},sa.prototype.arcTo=function(t,e,r,i,n){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,r,i,n),this},sa.prototype.rect=function(t,e,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,r,i),this.addData(Xo.R,t,e,r,i),this},sa.prototype.closePath=function(){this._drawPendingPt(),this.addData(Xo.Z);var t=this._ctx,e=this._x0,r=this._y0;return t&&t.closePath(),this._xi=e,this._yi=r,this},sa.prototype.fill=function(t){t&&t.fill(),this.toStatic()},sa.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},sa.prototype.len=function(){return this._len},sa.prototype.setData=function(t){if(this._saveData){var e=t.length;this.data&&this.data.length===e||!ra||(this.data=new Float32Array(e));for(var r=0;r<e;r++)this.data[r]=t[r];this._len=e}},sa.prototype.appendPath=function(t){if(this._saveData){t instanceof Array||(t=[t]);for(var e=t.length,r=0,i=this._len,n=0;n<e;n++)r+=t[n].len();var o=this.data;if(ra&&(o instanceof Float32Array||!o)&&(this.data=new Float32Array(i+r),0<i&&o))for(var a=0;a<i;a++)this.data[a]=o[a];for(n=0;n<e;n++)for(var s=t[n].data,a=0;a<s.length;a++)this.data[i++]=s[a];this._len=i}},sa.prototype.addData=function(t,e,r,i,n,o,a,s,h){if(this._saveData){var l=this.data;this._len+arguments.length>l.length&&(this._expandData(),l=this.data);for(var u=0;u<arguments.length;u++)l[this._len++]=arguments[u]}},sa.prototype._drawPendingPt=function(){0<this._pendingPtDist&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},sa.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},sa.prototype.toStatic=function(){var t;this._saveData&&(this._drawPendingPt(),(t=this.data)instanceof Array&&(t.length=this._len,ra&&11<this._len&&(this.data=new Float32Array(t))))},sa.prototype.getBoundingRect=function(){jo[0]=jo[1]=Uo[0]=Uo[1]=Number.MAX_VALUE,Vo[0]=Vo[1]=Go[0]=Go[1]=-Number.MAX_VALUE;for(var t,e,r,i,n,o,a,s,h,l,u,c,p,f,d=this.data,y=0,v=0,g=0,_=0,m=0;m<this._len;){var x=d[m++],w=1===m;switch(w&&(g=y=d[m],_=v=d[m+1]),x){case Xo.M:y=g=d[m++],v=_=d[m++],Uo[0]=g,Uo[1]=_,Go[0]=g,Go[1]=_;break;case Xo.L:Ho(y,v,d[m],d[m+1],Uo,Go),y=d[m++],v=d[m++];break;case Xo.C:!function(t,e,r,i,n,o,a,s,h,l){var u=Lr,c=Dr,p=u(t,r,n,a,Wo);h[0]=1/0,h[1]=1/0,l[0]=-1/0,l[1]=-1/0;for(var f=0;f<p;f++){var d=c(t,r,n,a,Wo[f]);h[0]=Do(d,h[0]),l[0]=zo(d,l[0])}for(p=u(e,i,o,s,Eo),f=0;f<p;f++){var y=c(e,i,o,s,Eo[f]);h[1]=Do(y,h[1]),l[1]=zo(y,l[1])}h[0]=Do(t,h[0]),l[0]=zo(t,l[0]),h[0]=Do(a,h[0]),l[0]=zo(a,l[0]),h[1]=Do(e,h[1]),l[1]=zo(e,l[1]),h[1]=Do(s,h[1]),l[1]=zo(s,l[1])}(y,v,d[m++],d[m++],d[m++],d[m++],d[m],d[m+1],Uo,Go),y=d[m++],v=d[m++];break;case Xo.Q:t=y,e=v,r=d[m++],i=d[m++],n=d[m],o=d[m+1],a=Uo,s=Go,f=p=c=u=l=h=void 0,l=Or,u=zo(Do((h=Br)(t,r,n),1),0),c=zo(Do(h(e,i,o),1),0),p=l(t,r,n,u),f=l(e,i,o,c),a[0]=Do(t,n,p),a[1]=Do(e,o,f),s[0]=zo(t,n,p),s[1]=zo(e,o,f),y=d[m++],v=d[m++];break;case Xo.A:var b=d[m++],S=d[m++],T=d[m++],k=d[m++],C=d[m++],P=d[m++]+C;m+=1;var M=!d[m++];w&&(g=Qo(C)*T+b,_=$o(C)*k+S),function(t,e,r,i,n,o,a,s,h){var l,u=Ot,c=Ft,p=Math.abs(n-o);if(p%Ro<1e-4&&1e-4<p)return s[0]=t-r,s[1]=e-i,h[0]=t+r,h[1]=e+i;Oo[0]=Lo(n)*r+t,Oo[1]=Io(n)*i+e,Fo[0]=Lo(o)*r+t,Fo[1]=Io(o)*i+e,u(s,Oo,Fo),c(h,Oo,Fo),(n%=Ro)<0&&(n+=Ro),(o%=Ro)<0&&(o+=Ro),o<n&&!a?o+=Ro:n<o&&a&&(n+=Ro),a&&(l=o,o=n,n=l);for(var f=0;f<o;f+=Math.PI/2)n<f&&(Bo[0]=Lo(f)*r+t,Bo[1]=Io(f)*i+e,u(s,Bo,s),c(h,Bo,h))}(b,S,T,k,C,P,M,Uo,Go),y=Qo(P)*T+b,v=$o(P)*k+S;break;case Xo.R:Ho(g=y=d[m++],_=v=d[m++],g+d[m++],_+d[m++],Uo,Go);break;case Xo.Z:y=g,v=_}Ot(jo,jo,Uo),Ft(Vo,Vo,Go)}return 0===m&&(jo[0]=jo[1]=Vo[0]=Vo[1]=0),new Le(jo[0],jo[1],Vo[0]-jo[0],Vo[1]-jo[1])},sa.prototype._calculateLength=function(){var t=this.data,e=this._len,r=this._ux,i=this._uy,n=0,o=0,a=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var h=this._pathSegLen,l=0,u=0,c=0;c<e;){var p=t[c++],f=1===c;f&&(a=n=t[c],s=o=t[c+1]);var d=-1;switch(p){case Xo.M:n=a=t[c++],o=s=t[c++];break;case Xo.L:var y=t[c++],v=(m=t[c++])-o;(Jo(A=y-n)>r||Jo(v)>i||c===e-1)&&(d=Math.sqrt(A*A+v*v),n=y,o=m);break;case Xo.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=Dr(t,r,n,a,d),v=Dr(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 Xo.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=Or(t,r,n,p),d=Or(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 Xo.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=Qo(C)*T+b,s=$o(C)*k+S),d=Ko(T,k)*Zo(ea,Math.abs(P)),n=Qo(M)*T+b,o=$o(M)*k+S;break;case Xo.R:a=n=t[c++],s=o=t[c++],d=2*t[c++]+2*t[c++];break;case Xo.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},sa.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<y;){var w=p[x++],b=1===x;switch(b&&(r=n=p[x],i=o=p[x+1]),w!==Xo.L&&0<m&&(t.lineTo(u,c),m=0),w){case Xo.M:r=n=p[x++],i=o=p[x++],t.moveTo(n,o);break;case Xo.L:a=p[x++],s=p[x++];var S=Jo(a-n),T=Jo(s-o);if(f<S||d<T){if(v){if(l<g+(j=h[_++])){var k=(l-g)/j;t.lineTo(n*(1-k)+a*k,o*(1-k)+s*k);break t}g+=j}t.lineTo(a,s),n=a,o=s,m=0}else{var C=S*S+T*T;m<C&&(u=a,c=s,m=C)}break;case Xo.C:var P=p[x++],M=p[x++],A=p[x++],D=p[x++],z=p[x++],I=p[x++];if(v){if(l<g+(j=h[_++])){Rr(n,P,A,z,k=(l-g)/j,Yo),Rr(o,M,D,I,k,qo),t.bezierCurveTo(Yo[1],qo[1],Yo[2],qo[2],Yo[3],qo[3]);break t}g+=j}t.bezierCurveTo(P,M,A,D,z,I),n=z,o=I;break;case Xo.Q:if(P=p[x++],M=p[x++],A=p[x++],D=p[x++],v){if(l<g+(j=h[_++])){Nr(n,P,A,k=(l-g)/j,Yo),Nr(o,M,D,k,qo),t.quadraticCurveTo(Yo[1],qo[1],Yo[2],qo[2]);break t}g+=j}t.quadraticCurveTo(P,M,A,D),n=A,o=D;break;case Xo.A:var L=p[x++],R=p[x++],O=p[x++],F=p[x++],B=p[x++],N=p[x++],H=p[x++],W=!p[x++],E=F<O?O:F,X=.001<Jo(O-F),Y=B+N,q=!1;if(v&&(l<g+(j=h[_++])&&(Y=B+N*(l-g)/j,q=!0),g+=j),X&&t.ellipse?t.ellipse(L,R,O,F,H,B,Y,W):t.arc(L,R,E,B,Y,W),q)break t;b&&(r=Qo(B)*O+L,i=$o(B)*F+R),n=Qo(Y)*O+L,o=$o(Y)*F+R;break;case Xo.R:r=n=p[x],i=o=p[x+1],a=p[x++],s=p[x++];var j,V=p[x++],U=p[x++];if(v){if(l<g+(j=h[_++])){var G=l-g;t.moveTo(a,s),t.lineTo(a+Zo(G,V),s),0<(G-=V)&&t.lineTo(a+V,s+Zo(G,U)),0<(G-=U)&&t.lineTo(a+Ko(V-G,0),s+U),0<(G-=V)&&t.lineTo(a,s+Ko(U-G,0));break t}g+=j}t.rect(a,s,V,U);break;case Xo.Z:if(v){if(l<g+(j=h[_++])){k=(l-g)/j,t.lineTo(n*(1-k)+r*k,o*(1-k)+i*k);break t}g+=j}t.closePath(),n=r,o=i}}},sa.prototype.clone=function(){var t=new sa,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},sa.prototype.canSave=function(){return!!this._saveData},sa.CMD=Xo,sa.initDefaultProps=((oa=sa.prototype)._saveData=!0,oa._ux=0,oa._uy=0,oa._pendingPtDist=0,void(oa._version=0)),sa);function sa(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}function ha(t,e,r,i,n,o,a){if(0!==n){var s=n,h=0;if(!(e+s<a&&i+s<a||a<e-s&&a<i-s||t+s<o&&r+s<o||o<t-s&&o<r-s)){if(t===r)return Math.abs(o-t)<=s/2;var l=(h=(e-i)/(t-r))*o-a+(t*i-r*e)/(t-r);return l*l/(h*h+1)<=s/2*s/2}}}function la(t,e,r,i,n,o,a,s,h,l,u){if(0!==h){var c=h;if(!(e+c<u&&i+c<u&&o+c<u&&s+c<u||u<e-c&&u<i-c&&u<o-c&&u<s-c||t+c<l&&r+c<l&&n+c<l&&a+c<l||l<t-c&&l<r-c&&l<n-c&&l<a-c))return function(t,e,r,i,n,o,a,s,h,l,u){var c,p,f,d,y,v=.005,g=1/0;kr[0]=h,kr[1]=l;for(var _=0;_<1;_+=.05)Cr[0]=Dr(t,r,n,a,_),Cr[1]=Dr(e,i,o,s,_),(d=It(kr,Cr))<g&&(c=_,g=d);g=1/0;for(var m=0;m<32&&!(v<br);m++)p=c-v,f=c+v,Cr[0]=Dr(t,r,n,a,p),Cr[1]=Dr(e,i,o,s,p),d=It(Cr,kr),0<=p&&d<g?(c=p,g=d):(Pr[0]=Dr(t,r,n,a,f),Pr[1]=Dr(e,i,o,s,f),y=It(Pr,kr),f<=1&&y<g?(c=f,g=y):v*=.5);return u&&(u[0]=Dr(t,r,n,a,c),u[1]=Dr(e,i,o,s,c)),xr(g)}(t,e,r,i,n,o,a,s,l,u,null)<=c/2}}function ua(t,e,r,i,n,o,a,s,h){if(0!==a){var l=a;if(!(e+l<h&&i+l<h&&o+l<h||h<e-l&&h<i-l&&h<o-l||t+l<s&&r+l<s&&n+l<s||s<t-l&&s<r-l&&s<n-l))return function(t,e,r,i,n,o,a,s,h){var l,u=.005,c=1/0;kr[0]=a,kr[1]=s;for(var p=0;p<1;p+=.05){Cr[0]=Or(t,r,n,p),Cr[1]=Or(e,i,o,p),(g=It(kr,Cr))<c&&(l=p,c=g)}c=1/0;for(var f=0;f<32&&!(u<br);f++){var d=l-u,y=l+u;Cr[0]=Or(t,r,n,d),Cr[1]=Or(e,i,o,d);var v,g=It(Cr,kr);0<=d&&g<c?(l=d,c=g):(Pr[0]=Or(t,r,n,y),Pr[1]=Or(e,i,o,y),v=It(Pr,kr),y<=1&&v<c?(l=y,c=v):u*=.5)}return h&&(h[0]=Or(t,r,n,l),h[1]=Or(e,i,o,l)),xr(c)}(t,e,r,i,n,o,s,h,null)<=l/2}}var ca=2*Math.PI;function pa(t){return(t%=ca)<0&&(t+=ca),t}var fa=2*Math.PI;function da(t,e,r,i,n,o){if(e<o&&i<o||o<e&&o<i)return 0;if(i===e)return 0;var a=(o-e)/(i-e),s=i<e?1:-1;1!=a&&0!=a||(s=i<e?.5:-.5);var h=a*(r-t)+t;return h===n?1/0:n<h?s:0}var ya=aa.CMD,va=2*Math.PI,ga=1e-4;var _a=[-1,-1,-1],ma=[-1,-1];function xa(t,e,r,i,n,o,a,s,h,l){if(e<l&&i<l&&o<l&&s<l||l<e&&l<i&&l<o&&l<s)return 0;var u=Ir(e,i,o,s,l,_a);if(0===u)return 0;for(var c,p=0,f=-1,d=void 0,y=void 0,v=0;v<u;v++){var g=_a[v],_=0===g||1===g?.5:1;Dr(t,r,n,a,g)<h||(f<0&&(f=Lr(e,i,o,s,ma),ma[1]<ma[0]&&1<f&&(c=void 0,c=ma[0],ma[0]=ma[1],ma[1]=c),d=Dr(e,i,o,s,ma[0]),1<f&&(y=Dr(e,i,o,s,ma[1]))),2===f?g<ma[0]?p+=d<e?_:-_:g<ma[1]?p+=y<d?_:-_:p+=s<y?_:-_:g<ma[0]?p+=d<e?_:-_:p+=s<d?_:-_)}return p}function wa(t,e,r,i,n,o,a,s){if(e<s&&i<s&&o<s||s<e&&s<i&&s<o)return 0;var h,l,u,c,p,f,d,y,v,g,_,m=(u=_a,v=2*((l=i)-(h=e)),g=h-s,_=0,Mr(y=h-2*l+o)?Ar(v)&&0<=(f=-g/v)&&f<=1&&(u[_++]=f):Mr(c=v*v-4*y*g)?0<=(f=-v/(2*y))&&f<=1&&(u[_++]=f):0<c&&(d=(-v-(p=xr(c)))/(2*y),0<=(f=(-v+p)/(2*y))&&f<=1&&(u[_++]=f),0<=d&&d<=1&&(u[_++]=d)),_);if(0===m)return 0;var x=Br(e,i,o);if(0<=x&&x<=1){for(var w=0,b=Or(e,i,o,x),S=0;S<m;S++){var T=0===_a[S]||1===_a[S]?.5:1;Or(t,r,n,_a[S])<a||(_a[S]<x?w+=b<e?T:-T:w+=o<b?T:-T)}return w}T=0===_a[0]||1===_a[0]?.5:1;return Or(t,r,n,_a[0])<a?0:o<e?T:-T}function ba(t,e,r,i,n){for(var o,a,s=t.data,h=t.len(),l=0,u=0,c=0,p=0,f=0,d=0;d<h;){var y=s[d++],v=1===d;switch(y===ya.M&&1<d&&(r||(l+=da(u,c,p,f,i,n))),v&&(p=u=s[d],f=c=s[d+1]),y){case ya.M:u=p=s[d++],c=f=s[d++];break;case ya.L:if(r){if(ha(u,c,s[d],s[d+1],e,i,n))return!0}else l+=da(u,c,s[d],s[d+1],i,n)||0;u=s[d++],c=s[d++];break;case ya.C:if(r){if(la(u,c,s[d++],s[d++],s[d++],s[d++],s[d],s[d+1],e,i,n))return!0}else l+=xa(u,c,s[d++],s[d++],s[d++],s[d++],s[d],s[d+1],i,n)||0;u=s[d++],c=s[d++];break;case ya.Q:if(r){if(ua(u,c,s[d++],s[d++],s[d],s[d+1],e,i,n))return!0}else l+=wa(u,c,s[d++],s[d++],s[d],s[d+1],i,n)||0;u=s[d++],c=s[d++];break;case ya.A:var g=s[d++],_=s[d++],m=s[d++],x=s[d++],w=s[d++],b=s[d++];d+=1;var S=!!(1-s[d++]),T=Math.cos(w)*m+g,k=Math.sin(w)*x+_;v?(p=T,f=k):l+=da(u,c,T,k,i,n);var C=(i-g)*x/m+g;if(r){if(function(t,e,r,i,n,o,a,s,h){if(0!==a){var l=a;s-=t,h-=e;var u,c=Math.sqrt(s*s+h*h);if(!(r<c-l||c+l<r)){if(Math.abs(i-n)%fa<1e-4)return 1;(n=o?(u=i,i=pa(n),pa(u)):(i=pa(i),pa(n)))<i&&(n+=fa);var p=Math.atan2(h,s);return p<0&&(p+=fa),i<=p&&p<=n||i<=p+fa&&p+fa<=n}}}(g,_,x,w,w+b,S,e,C,n))return!0}else l+=function(t,e,r,i,n,o,a,s){if(r<(s-=e)||s<-r)return 0;var h=Math.sqrt(r*r-s*s);_a[0]=-h,_a[1]=h;var l,u=Math.abs(i-n);if(u<1e-4)return 0;if(va-1e-4<=u){n=va;var c=o?1:-1;return a>=_a[i=0]+t&&a<=_a[1]+t?c:0}n<i&&(l=i,i=n,n=l),i<0&&(i+=va,n+=va);for(var p=0,f=0;f<2;f++){var d,y=_a[f];a<y+t&&(c=o?1:-1,(d=Math.atan2(s,y))<0&&(d=va+d),(i<=d&&d<=n||i<=d+va&&d+va<=n)&&(d>Math.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 ya.R:p=u=s[d++],f=c=s[d++];if(T=p+s[d++],k=f+s[d++],r){if(ha(p,f,T,f,e,i,n)||ha(T,f,T,k,e,i,n)||ha(T,k,p,k,e,i,n)||ha(p,k,p,f,e,i,n))return!0}else l+=da(T,f,T,k,i,n),l+=da(p,k,p,f,i,n);break;case ya.Z:if(r){if(ha(u,c,p,f,e,i,n))return!0}else l+=da(u,c,p,f,i,n);u=p,c=f}}return r||(o=c,a=f,Math.abs(o-a)<ga)||(l+=da(u,c,p,f,i,n)||0),0!==l}var Sa,Ta,ka=P({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},xo),Ca={style:P({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},wo.style)},Pa=On.concat(["invisible","culling","z","z2","zlevel","parent"]),Ma=(mt(Aa,Sa=Co),Aa.prototype.update=function(){var e=this;Sa.prototype.update.call(this);var t=this.style;if(t.decal){var r=this._decalEl=this._decalEl||new Aa;r.buildPath===Aa.prototype.buildPath&&(r.buildPath=function(t){e.buildPath(t,e.shape)}),r.silent=!0;var i=r.style;for(var n in t)i[n]!==t[n]&&(i[n]=t[n]);i.fill=t.fill?t.decal:null,i.decal=null,i.shadowColor=null,t.strokeFirst&&(i.stroke=null);for(var o=0;o<Pa.length;++o)r[Pa[o]]=this[Pa[o]];r.__dirty|=ur}else this._decalEl&&(this._decalEl=null)},Aa.prototype.getDecalElement=function(){return this._decalEl},Aa.prototype._init=function(t){var e=B(t);this.shape=this.getDefaultShape();var r=this.getDefaultStyle();r&&this.useStyle(r);for(var i=0;i<e.length;i++){var n=e[i],o=t[n];"style"===n?this.style?L(this.style,o):this.useStyle(o):"shape"===n?L(this.shape,o):Sa.prototype.attrKV.call(this,n,o)}this.style||this.useStyle({})},Aa.prototype.getDefaultStyle=function(){return null},Aa.prototype.getDefaultShape=function(){return{}},Aa.prototype.canBeInsideText=function(){return this.hasFill()},Aa.prototype.getInsideTextFill=function(){var t=this.style.fill;if("none"!==t){if(E(t)){var e=di(t,0);return.5<e?bn:.2<e?"#eee":Sn}if(t)return Sn}return bn},Aa.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(E(e)){var r=this.__zr;if(!(!r||!r.isDarkMode())==di(t,0)<.4)return e}},Aa.prototype.buildPath=function(t,e,r){},Aa.prototype.pathUpdated=function(){this.__dirty&=~cr},Aa.prototype.getUpdatedPathProxy=function(t){return this.path||this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},Aa.prototype.createPathProxy=function(){this.path=new aa(!1)},Aa.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(0<t.lineWidth))},Aa.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},Aa.prototype.getBoundingRect=function(){var t,e,r=this._rect,i=this.style,n=!r;if(n&&(t=!1,this.path||(t=!0,this.createPathProxy()),e=this.path,(t||this.__dirty&cr)&&(e.beginPath(),this.buildPath(e,this.shape,!1),this.pathUpdated()),r=e.getBoundingRect()),this._rect=r,this.hasStroke()&&this.path&&0<this.path.len()){var o,a,s,h=this._rectStroke||(this._rectStroke=r.clone());return(this.__dirty||n)&&(h.copy(r),o=i.strokeNoScale?this.getLineScale():1,s=i.lineWidth,this.hasFill()||(a=this.strokeContainThreshold,s=Math.max(s,null==a?4:a)),1e-10<o&&(h.width+=s/o,h.height+=s/o,h.x-=s/o/2,h.y-=s/o/2)),h}return r},Aa.prototype.contain=function(t,e){var r=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),n=this.style;if(t=r[0],e=r[1],i.contain(t,e)){var o=this.path;if(this.hasStroke()){var a=n.lineWidth,s=n.strokeNoScale?this.getLineScale():1;if(1e-10<s&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),ba(o,a/s,!0,t,e)))return!0}if(this.hasFill())return ba(o,0,!1,t,e)}return!1},Aa.prototype.dirtyShape=function(){this.__dirty|=cr,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},Aa.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},Aa.prototype.animateShape=function(t){return this.animate("shape",t)},Aa.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},Aa.prototype.attrKV=function(t,e){"shape"===t?this.setShape(e):Sa.prototype.attrKV.call(this,t,e)},Aa.prototype.setShape=function(t,e){var r=(r=this.shape)||(this.shape={});return"string"==typeof t?r[t]=e:L(r,t),this.dirtyShape(),this},Aa.prototype.shapeChanged=function(){return!!(this.__dirty&cr)},Aa.prototype.createStyle=function(t){return ct(ka,t)},Aa.prototype._innerSaveToNormal=function(t){Sa.prototype._innerSaveToNormal.call(this,t);var e=this._normalState;t.shape&&!e.shape&&(e.shape=L({},this.shape))},Aa.prototype._applyStateObj=function(t,e,r,i,n,o){if(Sa.prototype._applyStateObj.call(this,t,e,r,i,n,o),1!==this.__inHover){var a,s=!(e&&i);if(e&&e.shape?n?i?a=e.shape:(a=L({},r.shape),L(a,e.shape)):(a=L({},i?this.shape:r.shape),L(a,e.shape)):s&&(a=r.shape),a)if(n){this.shape=L({},this.shape);for(var h={},l=B(a),u=0;u<l.length;u++){var c=l[u];"object"==typeof a[c]?this.shape[c]=a[c]:h[c]=a[c]}this._transitionState(t,{shape:h},o)}else this.shape=a,this.dirtyShape()}},Aa.prototype._mergeStates=function(t){for(var e,r=Sa.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var n=t[i];n.shape&&(e=e||{},this._mergeStyle(e,n.shape))}return e&&(r.shape=e),r},Aa.prototype.getAnimationStyleProps=function(){return Ca},Aa.prototype.isZeroArea=function(){return!1},Aa.extend=function(r){var i,t=(mt(e,i=Aa),e.prototype.getDefaultStyle=function(){return C(r.style)},e.prototype.getDefaultShape=function(){return C(r.shape)},e);function e(t){var e=i.call(this,t)||this;return r.init&&r.init.call(e,t),e}for(var n in r)"function"==typeof r[n]&&(t.prototype[n]=r[n]);return t},Aa.initDefaultProps=((Ta=Aa.prototype).type="path",Ta.strokeContainThreshold=5,Ta.segmentIgnoreThreshold=0,Ta.subPixelOptimize=!1,Ta.autoBatch=!1,void(Ta.__dirty=2|ur|cr)),Aa);function Aa(t){return Sa.call(this,t)||this}var Da=aa.CMD,za=[[],[],[]],Ia=Math.sqrt,La=Math.atan2;function Ra(t,e){if(e){for(var r,i,n,o,a=t.data,s=t.len(),h=Da.M,l=Da.C,u=Da.L,c=Da.R,p=Da.A,f=Da.Q,d=0,y=0;d<s;){switch(r=a[d++],y=d,i=0,r){case h:case u:i=1;break;case l:i=3;break;case f:i=2;break;case p:var v=e[4],g=e[5],_=Ia(e[0]*e[0]+e[1]*e[1]),m=Ia(e[2]*e[2]+e[3]*e[3]),x=La(-e[1]/m,e[0]/_);a[d]*=_,a[d++]+=v,a[d]*=m,a[d++]+=g,a[d++]*=_,a[d++]*=m,a[d++]+=x,a[d++]+=x,y=d+=2;break;case c:o[0]=a[d++],o[1]=a[d++],Rt(o,o,e),a[y++]=o[0],a[y++]=o[1],o[0]+=a[d++],o[1]+=a[d++],Rt(o,o,e),a[y++]=o[0],a[y++]=o[1]}for(n=0;n<i;n++){var w=za[n];w[0]=a[d++],w[1]=a[d++],Rt(w,w,e),a[y++]=w[0],a[y++]=w[1]}}t.increaseVersion()}}var Oa=Math.sqrt,Fa=Math.sin,Ba=Math.cos,Na=Math.PI;function Ha(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Wa(t,e){return(t[0]*e[0]+t[1]*e[1])/(Ha(t)*Ha(e))}function Ea(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Wa(t,e))}function Xa(t,e,r,i,n,o,a,s,h,l,u){var c=h*(Na/180),p=Ba(c)*(t-r)/2+Fa(c)*(e-i)/2,f=-1*Fa(c)*(t-r)/2+Ba(c)*(e-i)/2,d=p*p/(a*a)+f*f/(s*s);1<d&&(a*=Oa(d),s*=Oa(d));var y,v=(n===o?-1:1)*Oa((a*a*(s*s)-a*a*(f*f)-s*s*(p*p))/(a*a*(f*f)+s*s*(p*p)))||0,g=v*a*f/s,_=v*-s*p/a,m=(t+r)/2+Ba(c)*g-Fa(c)*_,x=(e+i)/2+Fa(c)*g+Ba(c)*_,w=Ea([1,0],[(p-g)/a,(f-_)/s]),b=[(p-g)/a,(f-_)/s],S=[(-1*p-g)/a,(-1*f-_)/s],T=Ea(b,S);Wa(b,S)<=-1&&(T=Na),1<=Wa(b,S)&&(T=0),T<0&&(y=Math.round(T/Na*1e6)/1e6,T=2*Na+y%2*Na),u.addData(l,m,x,a,s,w,T,c,o)}var Ya=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,qa=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var ja,Va=(mt(Ua,ja=Ma),Ua.prototype.applyTransform=function(t){},Ua);function Ua(){return null!==ja&&ja.apply(this,arguments)||this}function Ga(t){return null!=t.setData}function Za(t,e){var i=function(t){var e=new aa;if(!t)return e;var r,i=0,n=0,o=i,a=n,s=aa.CMD,h=t.match(Ya);if(!h)return e;for(var l=0;l<h.length;l++){for(var u=h[l],c=u.charAt(0),p=void 0,f=u.match(qa)||[],d=f.length,y=0;y<d;y++)f[y]=parseFloat(f[y]);for(var v=0;v<d;){var g=void 0,_=void 0,m=void 0,x=void 0,w=void 0,b=void 0,S=void 0,T=i,k=n,C=void 0,P=void 0;switch(c){case"l":i+=f[v++],n+=f[v++],p=s.L,e.addData(p,i,n);break;case"L":i=f[v++],n=f[v++],p=s.L,e.addData(p,i,n);break;case"m":i+=f[v++],n+=f[v++],p=s.M,e.addData(p,i,n),o=i,a=n,c="l";break;case"M":i=f[v++],n=f[v++],p=s.M,e.addData(p,i,n),o=i,a=n,c="L";break;case"h":i+=f[v++],p=s.L,e.addData(p,i,n);break;case"H":i=f[v++],p=s.L,e.addData(p,i,n);break;case"v":n+=f[v++],p=s.L,e.addData(p,i,n);break;case"V":n=f[v++],p=s.L,e.addData(p,i,n);break;case"C":p=s.C,e.addData(p,f[v++],f[v++],f[v++],f[v++],f[v++],f[v++]),i=f[v-2],n=f[v-1];break;case"c":p=s.C,e.addData(p,f[v++]+i,f[v++]+n,f[v++]+i,f[v++]+n,f[v++]+i,f[v++]+n),i+=f[v-2],n+=f[v-1];break;case"S":g=i,_=n,C=e.len(),P=e.data,r===s.C&&(g+=i-P[C-4],_+=n-P[C-3]),p=s.C,T=f[v++],k=f[v++],i=f[v++],n=f[v++],e.addData(p,g,_,T,k,i,n);break;case"s":g=i,_=n,C=e.len(),P=e.data,r===s.C&&(g+=i-P[C-4],_+=n-P[C-3]),p=s.C,T=i+f[v++],k=n+f[v++],i+=f[v++],n+=f[v++],e.addData(p,g,_,T,k,i,n);break;case"Q":T=f[v++],k=f[v++],i=f[v++],n=f[v++],p=s.Q,e.addData(p,T,k,i,n);break;case"q":T=f[v++]+i,k=f[v++]+n,i+=f[v++],n+=f[v++],p=s.Q,e.addData(p,T,k,i,n);break;case"T":g=i,_=n,C=e.len(),P=e.data,r===s.Q&&(g+=i-P[C-4],_+=n-P[C-3]),i=f[v++],n=f[v++],p=s.Q,e.addData(p,g,_,i,n);break;case"t":g=i,_=n,C=e.len(),P=e.data,r===s.Q&&(g+=i-P[C-4],_+=n-P[C-3]),i+=f[v++],n+=f[v++],p=s.Q,e.addData(p,g,_,i,n);break;case"A":m=f[v++],x=f[v++],w=f[v++],b=f[v++],S=f[v++],Xa(T=i,k=n,i=f[v++],n=f[v++],b,S,m,x,w,p=s.A,e);break;case"a":m=f[v++],x=f[v++],w=f[v++],b=f[v++],S=f[v++],Xa(T=i,k=n,i+=f[v++],n+=f[v++],b,S,m,x,w,p=s.A,e)}}"z"!==c&&"Z"!==c||(p=s.Z,e.addData(p),i=o,n=a),r=p}return e.toStatic(),e}(t),r=L({},e);return r.buildPath=function(t){var e,r=Ga(t);r&&t.canSave()?(t.appendPath(i),(e=t.getContext())&&t.rebuildPath(e,1)):(e=r?t.getContext():t)&&i.rebuildPath(e,1)},r.applyTransform=function(t){Ra(i,t),this.dirtyShape()},r}function Ka(t,e){return new Va(Za(t,e))}function Qa(t,e){e=e||{};var r=new Ma;return t.shape&&r.setShape(t.shape),r.setStyle(t.style),e.bakeTransform?Ra(r.path,t.getComputedTransform()):e.toLocal?r.setLocalTransform(t.getComputedTransform()):r.copyTransform(t),r.buildPath=t.buildPath,r.applyTransform=r.applyTransform,r.z=t.z,r.z2=t.z2,r.zlevel=t.zlevel,r}var $a=Object.freeze({__proto__:null,createFromString:Ka,extendFromString:function(t,e){var r,i=Za(t,e);function n(t){var e=r.call(this,t)||this;return e.applyTransform=i.applyTransform,e.buildPath=i.buildPath,e}return mt(n,r=Va),n},mergePath:function(t,e){for(var r=[],i=t.length,n=0;n<i;n++){var o=t[n];r.push(o.getUpdatedPathProxy(!0))}var a=new Ma(e);return a.createPathProxy(),a.buildPath=function(t){var e;Ga(t)&&(t.appendPath(r),(e=t.getContext())&&t.rebuildPath(e,1))},a},clonePath:Qa}),Ja=P({x:0,y:0},xo),ts={style:P({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},wo.style)};var es,rs=(mt(is,es=Co),is.prototype.createStyle=function(t){return ct(Ja,t)},is.prototype._getSize=function(t){var e=this.style,r=e[t];if(null!=r)return r;var i,n=(i=e.image)&&"string"!=typeof i&&i.width&&i.height?e.image:this.__image;if(!n)return 0;var o="width"===t?"height":"width",a=e[o];return null==a?n[t]:n[t]/n[o]*a},is.prototype.getWidth=function(){return this._getSize("width")},is.prototype.getHeight=function(){return this._getSize("height")},is.prototype.getAnimationStyleProps=function(){return ts},is.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new Le(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},is);function is(){return null!==es&&es.apply(this,arguments)||this}rs.prototype.type="image";var ns,os=function(){this.cx=0,this.cy=0,this.r=0},as=(mt(ss,ns=Ma),ss.prototype.getDefaultShape=function(){return new os},ss.prototype.buildPath=function(t,e){t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI)},ss);function ss(t){return ns.call(this,t)||this}as.prototype.type="circle";var hs=Math.round;function ls(t,e,r){if(!e)return t;var i=hs(2*t);return(i+hs(e))%2==0?i/2:(i+(r?1:-1))/2}var us,cs=function(){this.x=0,this.y=0,this.width=0,this.height=0},ps={},fs=(mt(ds,us=Ma),ds.prototype.getDefaultShape=function(){return new cs},ds.prototype.buildPath=function(t,e){var r,i,n,o,a,s,h,l,u,c,p,f,d,y,v,g,_;this.subPixelOptimize?(i=(r=function(t,e,r){if(e){var i=e.x,n=e.y,o=e.width,a=e.height;t.x=i,t.y=n,t.width=o,t.height=a;var s=r&&r.lineWidth;return s&&(t.x=ls(i,s,!0),t.y=ls(n,s,!0),t.width=Math.max(ls(i+o,s,!1)-t.x,0===o?0:1),t.height=Math.max(ls(n+a,s,!1)-t.y,0===a?0:1)),t}}(ps,e,this.style)).x,n=r.y,o=r.width,a=r.height,r.r=e.r,e=r):(i=e.x,n=e.y,o=e.width,a=e.height),e.r?(s=t,d=(h=e).x,y=h.y,v=h.width,g=h.height,_=h.r,v<0&&(d+=v,v=-v),g<0&&(y+=g,g=-g),"number"==typeof _?l=u=c=p=_:_ instanceof Array?1===_.length?l=u=c=p=_[0]:2===_.length?(l=c=_[0],u=p=_[1]):3===_.length?(l=_[0],u=p=_[1],c=_[2]):(l=_[0],u=_[1],c=_[2],p=_[3]):l=u=c=p=0,v<l+u&&(l*=v/(f=l+u),u*=v/f),v<c+p&&(c*=v/(f=c+p),p*=v/f),g<u+c&&(u*=g/(f=u+c),c*=g/f),g<l+p&&(l*=g/(f=l+p),p*=g/f),s.moveTo(d+l,y),s.lineTo(d+v-u,y),0!==u&&s.arc(d+v-u,y+u,u,-Math.PI/2,0),s.lineTo(d+v,y+g-c),0!==c&&s.arc(d+v-c,y+g-c,c,0,Math.PI/2),s.lineTo(d+p,y+g),0!==p&&s.arc(d+p,y+g-p,p,Math.PI/2,Math.PI),s.lineTo(d,y+l),0!==l&&s.arc(d+l,y+l,l,Math.PI,1.5*Math.PI),s.closePath()):t.rect(i,n,o,a)},ds.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},ds);function ds(t){return us.call(this,t)||this}fs.prototype.type="rect";var ys,vs=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},gs=(mt(_s,ys=Ma),_s.prototype.getDefaultShape=function(){return new vs},_s.prototype.buildPath=function(t,e){var r=e.cx,i=e.cy,n=e.rx,o=e.ry,a=.5522848*n,s=.5522848*o;t.moveTo(r-n,i),t.bezierCurveTo(r-n,i-s,r-a,i-o,r,i-o),t.bezierCurveTo(r+a,i-o,r+n,i-s,r+n,i),t.bezierCurveTo(r+n,i+s,r+a,i+o,r,i+o),t.bezierCurveTo(r-a,i+o,r-n,i+s,r-n,i),t.closePath()},_s);function _s(t){return ys.call(this,t)||this}gs.prototype.type="ellipse";var ms,xs={},ws=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},bs=(mt(Ss,ms=Ma),Ss.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},Ss.prototype.getDefaultShape=function(){return new ws},Ss.prototype.buildPath=function(t,e){var r,i,n,o,a;a=this.subPixelOptimize?(i=(r=function(t,e,r){if(e){var i=e.x1,n=e.x2,o=e.y1,a=e.y2;t.x1=i,t.x2=n,t.y1=o,t.y2=a;var s=r&&r.lineWidth;return s&&(hs(2*i)===hs(2*n)&&(t.x1=t.x2=ls(i,s,!0)),hs(2*o)===hs(2*a)&&(t.y1=t.y2=ls(o,s,!0))),t}}(xs,e,this.style)).x1,n=r.y1,o=r.x2,r.y2):(i=e.x1,n=e.y1,o=e.x2,e.y2);var s=e.percent;0!==s&&(t.moveTo(i,n),s<1&&(o=i*(1-s)+o*s,a=n*(1-s)+a*s),t.lineTo(o,a))},Ss.prototype.pointAt=function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]},Ss);function Ss(t){return ms.call(this,t)||this}function Ts(t,e,r){var i=e.smooth,n=e.points;if(n&&2<=n.length){if(i){var o=function(t,e,r,i){var n,o,a,s,h=[],l=[],u=[],c=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var p=0,f=t.length;p<f;p++)Ot(a,a,t[p]),Ft(s,s,t[p]);Ot(a,a,i[0]),Ft(s,s,i[1])}for(p=0,f=t.length;p<f;p++){var d=t[p];if(r)n=t[p?p-1:f-1],o=t[(p+1)%f];else{if(0===p||p===f-1){h.push(wt(t[p]));continue}n=t[p-1],o=t[p+1]}Tt(l,o,n),Pt(l,l,e);var y=At(d,n),v=At(d,o),g=y+v;0!==g&&(y/=g,v/=g),Pt(u,l,-y),Pt(c,l,v);var _=St([],d,u),m=St([],d,c);i&&(Ft(_,_,a),Ot(_,_,s),Ft(m,m,a),Ot(m,m,s)),h.push(_),h.push(m)}return r&&h.push(h.shift()),h}(n,i,r,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var a=n.length,s=0;s<(r?a:a-1);s++){var h=o[2*s],l=o[2*s+1],u=n[(s+1)%a];t.bezierCurveTo(h[0],h[1],l[0],l[1],u[0],u[1])}}else{t.moveTo(n[0][0],n[0][1]);for(var s=1,c=n.length;s<c;s++)t.lineTo(n[s][0],n[s][1])}r&&t.closePath()}}bs.prototype.type="line";var ks,Cs=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},Ps=(mt(Ms,ks=Ma),Ms.prototype.getDefaultShape=function(){return new Cs},Ms.prototype.buildPath=function(t,e){Ts(t,e,!0)},Ms);function Ms(t){return ks.call(this,t)||this}Ps.prototype.type="polygon";var As,Ds=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},zs=(mt(Is,As=Ma),Is.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},Is.prototype.getDefaultShape=function(){return new Ds},Is.prototype.buildPath=function(t,e){Ts(t,e,!1)},Is);function Is(t){return As.call(this,t)||this}zs.prototype.type="polyline";var Ls=(Rs.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})},Rs);function Rs(t){this.colorStops=t||[]}var Os,Fs=(mt(Bs,Os=Ls),Bs);function Bs(t,e,r,i,n,o){var a=Os.call(this,n)||this;return a.x=null==t?0:t,a.y=null==e?0:e,a.x2=null==r?1:r,a.y2=null==i?0:i,a.type="linear",a.global=o||!1,a}var Ns,Hs=(mt(Ws,Ns=Ls),Ws);function Ws(t,e,r,i,n){var o=Ns.call(this,i)||this;return o.x=null==t?.5:t,o.y=null==e?.5:e,o.r=null==r?.5:r,o.type="radial",o.global=n||!1,o}var Es=new Vr(50);function Xs(t,e,r,i,n){if(t){if("string"!=typeof t)return t;if(e&&e.__zrImageSrc===t||!r)return e;var o=Es.get(t),a={hostEl:r,cb:i,cbPayload:n};return o?qs(e=o.image)||o.pending.push(a):((e=d.loadImage(t,Ys,Ys)).__zrImageSrc=t,Es.put(t,e.__cachedImgObj={image:e,pending:[a]})),e}return e}function Ys(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var r=t.pending[e],i=r.cb;i&&i(this,r.cbPayload),r.hostEl.dirty()}t.pending.length=0}function qs(t){return t&&t.width&&t.height}var js=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Vs(t,e,r,i){var n=L({},i=i||{});r=Q(r,"..."),n.maxIterations=Q(i.maxIterations,2);var o=n.minChar=Q(i.minChar,0),a=n.fontMeasureInfo=Bn(e),s=a.asciiCharWidth;n.placeholder=Q(i.placeholder,"");for(var h=t=Math.max(0,t-1),l=0;l<o&&s<=h;l++)h-=s;var u=En(a,r);return h<u&&(r="",u=0),h=t-u,n.ellipsis=r,n.ellipsisWidth=u,n.contentWidth=h,n.containerWidth=t,n}function Us(t,e,r){var i=r.containerWidth,n=r.contentWidth,o=r.fontMeasureInfo;if(!i)return t.textLine="",void(t.isTruncated=!1);if((h=En(o,e))<=i)return t.textLine=e,void(t.isTruncated=!1);for(var a=0;;a++){if(h<=n||a>=r.maxIterations){e+=r.ellipsis;break}var s=0===a?function(t,e,r){for(var i=0,n=0,o=t.length;n<o&&i<e;n++)i+=Wn(r,t.charCodeAt(n));return n}(e,n,o):0<h?Math.floor(e.length*n/h):0,h=En(o,e=e.substr(0,s))}""===e&&(e=r.placeholder),t.textLine=e,t.isTruncated=!0}var Gs=function(){},Zs=function(t){this.tokens=[],t&&(this.tokens=t)},Ks=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1};function Qs(t,e,r,i,n){var o=new Ks,a=nh(t);if(!a)return o;var s=e.padding,h=s?s[1]+s[3]:0,l=s?s[0]+s[2]:0,u=e.width;null==u&&null!=r&&(u=r-h);var c=e.height;null==c&&null!=i&&(c=i-l);for(var p,f=e.overflow,d="break"!==f&&"breakAll"!==f||null==u?null:{width:u,accumWidth:0,breakAll:"breakAll"===f},y=js.lastIndex=0;null!=(p=js.exec(a));){var v=p.index;y<v&&$s(o,a.substring(y,v),e,d),$s(o,p[2],e,d,p[1]),y=js.lastIndex}y<a.length&&$s(o,a.substring(y,a.length),e,d);var g=[],_=0,m=0,x="truncate"===f,w="truncate"===e.lineOverflow,b={};function S(t,e,r){t.width=e,t.lineHeight=r,_+=r,m=Math.max(m,e)}t:for(var T=0;T<o.lines.length;T++){for(var k=o.lines[T],C=0,P=0,M=0;M<k.tokens.length;M++){var A=(W=k.tokens[M]).styleName&&e.rich[W.styleName]||{},D=W.textPadding=A.padding,z=D?D[1]+D[3]:0,I=W.font=A.font||e.font;W.contentHeight=qn(I);var L=Q(A.height,W.contentHeight);if(W.innerHeight=L,D&&(L+=D[0]+D[2]),W.height=L,W.lineHeight=$(A.lineHeight,e.lineHeight,L),W.align=A&&A.align||n,W.verticalAlign=A&&A.verticalAlign||"middle",w&&null!=c&&_+W.lineHeight>c){var R=o.lines.length;0<M?(k.tokens=k.tokens.slice(0,M),S(k,P,C),o.lines=o.lines.slice(0,T+1)):o.lines=o.lines.slice(0,T),o.isTruncated=o.isTruncated||o.lines.length<R;break t}var O,F,B,N=A.width,H=null==N||"auto"===N;"string"==typeof N&&"%"===N.charAt(N.length-1)?(W.percentWidth=N,g.push(W),W.contentWidth=En(Bn(I),W.text)):(!H||(F=(O=A.backgroundColor)&&O.image)&&qs(F=function(t){if("string"!=typeof t)return t;var e=Es.get(t);return e&&e.image}(F))&&(W.width=Math.max(W.width,F.width*L/F.height)),null!=(B=x&&null!=u?u-P:null)&&B<W.width?!H||B<z?(W.text="",W.width=W.contentWidth=0):(function(t,e,r,i,n,o){if(!r)return t.text="",t.isTruncated=!1;var a=(e+"").split("\n");o=Vs(r,i,n,o);for(var s=!1,h={},l=0,u=a.length;l<u;l++)Us(h,a[l],o),a[l]=h.textLine,s=s||h.isTruncated;t.text=a.join("\n"),t.isTruncated=s}(b,W.text,B-z,I,e.ellipsis,{minChar:e.truncateMinChar}),W.text=b.text,o.isTruncated=o.isTruncated||b.isTruncated,W.width=W.contentWidth=En(Bn(I),W.text)):W.contentWidth=En(Bn(I),W.text)),W.width+=z,P+=W.width,A&&(C=Math.max(C,W.lineHeight))}S(k,P,C)}o.outerWidth=o.width=Q(u,m),o.outerHeight=o.height=Q(c,_),o.contentHeight=_,o.contentWidth=m,o.outerWidth+=h,o.outerHeight+=l;for(T=0;T<g.length;T++){var W,E=(W=g[T]).percentWidth;W.width=parseInt(E,10)/100*o.width}return o}function $s(t,e,r,i,n){var o,a,s,h,l,u,c=""===e,p=n&&r.rich[n]||{},f=t.lines,d=p.font||r.font,y=!1;i&&(h=(s=p.padding)?s[1]+s[3]:0,null!=p.width&&"auto"!==p.width?(l=jn(p.width,i.width)+h,0<f.length&&l+i.accumWidth>i.width&&(o=e.split("\n"),y=!0),i.accumWidth=l):(u=th(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=Bn(d),g=0;g<o.length;g++){var _,m,x=o[g],w=new Gs;w.styleName=n,w.text=x,w.isLineHolder=!x&&!c,w.width="number"==typeof p.width?p.width:a?a[g]:En(v,x),g||y?f.push(new Zs([w])):1===(m=(_=(f[f.length-1]||(f[0]=new Zs)).tokens).length)&&_[0].isLineHolder?_[0]=w:!x&&m&&!c||_.push(w)}}var Js=O(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function th(t,e,r,i,n){for(var o,a,s=[],h=[],l="",u="",c=0,p=0,f=Bn(e),d=0;d<t.length;d++){var y,v,g=t.charAt(d);"\n"!==g?(y=Wn(f,g.charCodeAt(0)),v=!i&&(a=void 0,!(!(32<=(a=(o=g).charCodeAt(0))&&a<=591||880<=a&&a<=4351||4608<=a&&a<=5119||7680<=a&&a<=8303)||Js[o])),(s.length?r<p+y:r<n+p+y)?p?(l||u)&&(p=v?(l||(l=u,u="",p=c=0),s.push(l),h.push(p-c),u+=g,l="",c+=y):(u&&(l+=u,u="",c=0),s.push(l),h.push(p),l=g,y)):v?(s.push(u),h.push(c),u=g,c=y):(s.push(g),h.push(y)):(p+=y,v?(u+=g,c+=y):(u&&(l+=u,u="",c=0),l+=g))):(u&&(l+=u,p+=c),s.push(l),h.push(p),u=l="",p=c=0)}return u&&(l+=u),l&&(s.push(l),h.push(p)),1===s.length&&(p+=n),{accumWidth:p,lines:s,linesWidths:h}}function eh(t,e,r,i,n,o){var a,s,h;t.baseX=r,t.baseY=i,t.outerWidth=t.outerHeight=null,e&&(a=2*e.width,s=2*e.height,Le.set(rh,Xn(r,a,n),Yn(i,s,o),a,s),Le.intersect(e,rh,null,ih),h=ih.outIntersectRect,t.outerWidth=h.width,t.outerHeight=h.height,t.baseX=Xn(h.x,h.width,n,!0),t.baseY=Yn(h.y,h.height,o,!0))}var rh=new Le(0,0,0,0),ih={outIntersectRect:{},clamp:!0};function nh(t){return null!=t?t+="":t=""}function oh(t,e,r,i){var n=new Le(Xn(t.x||0,e,t.textAlign),Yn(t.y||0,r,t.textBaseline),e,r),o=null!=i?i:ah(t)?t.lineWidth:0;return 0<o&&(n.x-=o/2,n.y-=o/2,n.width+=o,n.height+=o),n}function ah(t){var e=t.stroke;return null!=e&&"none"!==e&&0<t.lineWidth}var sh,hh,lh=P({strokeFirst:!0,font:H,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},ka),uh=(mt(ch,sh=Co),ch.prototype.hasStroke=function(){return ah(this.style)},ch.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},ch.prototype.createStyle=function(t){return ct(lh,t)},ch.prototype.setBoundingRect=function(t){this._rect=t},ch.prototype.getBoundingRect=function(){var t,e,r;return this._rect||(this._rect=(t=this.style,e=nh(t.text),r=t.font,oh(t,En(Bn(r),e),qn(r),null))),this._rect},ch.initDefaultProps=void(ch.prototype.dirtyRectTolerance=10),ch);function ch(){return null!==sh&&sh.apply(this,arguments)||this}uh.prototype.type="tspan";var ph={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-anchor":"textAlign",visibility:"visibility",display:"display"},fh=B(ph),dh={"alignment-baseline":"textBaseline","stop-color":"stopColor"},yh=B(dh),vh=(gh.prototype.parse=function(t,e){e=e||{};var r=function(t){E(t)&&(t=(new DOMParser).parseFromString(t,"text/xml"));var e=t;for(9===e.nodeType&&(e=e.firstChild);"svg"!==e.nodeName.toLowerCase()||1!==e.nodeType;)e=e.nextSibling;return e}(t);this._defsUsePending=[];var i=new lo;this._root=i;var n=[],o=r.getAttribute("viewBox")||"",a=parseFloat(r.getAttribute("width")||e.width),s=parseFloat(r.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(s)&&(s=null),Sh(r,i,null,!0,!1);for(var h,l,u,c,p,f,d,y,v,g=r.firstChild;g;)this._parseNode(g,i,n,null,!1,!1),g=g.nextSibling;return function(t,e){for(var r=0;r<e.length;r++){var i=e[r];i[0].style[i[1]]=t[i[2]]}}(this._defs,this._defsUsePending),this._defsUsePending=[],!o||4<=(u=Ph(o)).length&&(h={x:parseFloat(u[0]||0),y:parseFloat(u[1]||0),width:parseFloat(u[2]),height:parseFloat(u[3])}),h&&null!=a&&null!=s&&(d=(f={x:0,y:0,width:a,height:s}).width/(p=h).width,y=f.height/p.height,l={scale:v=Math.min(d,y),x:-(p.x+p.width/2)*v+(f.x+f.width/2),y:-(p.y+p.height/2)*v+(f.y+f.height/2)},e.ignoreViewBox||(c=i,(i=new lo).add(c),c.scaleX=c.scaleY=l.scale,c.x=l.x,c.y=l.y)),e.ignoreRootClip||null==a||null==s||i.setClipPath(new fs({shape:{x:0,y:0,width:a,height:s}})),{root:i,width:a,height:s,viewBoxRect:h,viewBoxTransform:l,named:n}},gh.prototype._parseNode=function(t,e,r,i,n,o){var a,s,h,l,u,c,p,f=t.nodeName.toLowerCase(),d=i;if("defs"===f&&(n=!0),"text"===f&&(o=!0),"defs"===f||"switch"===f?a=e:(n||(s=hh[f])&&ft(hh,f)&&(a=s.call(this,t,e),(h=t.getAttribute("name"))?(l={name:h,namedFrom:null,svgNodeTagLower:f,el:a},r.push(l),"g"===f&&(d=l)):i&&r.push({name:i.name,namedFrom:i,svgNodeTagLower:f,el:a}),e.add(a)),(u=_h[f])&&ft(_h,f)&&(c=u.call(this,t),(p=t.getAttribute("id"))&&(this._defs[p]=c))),a&&a.isGroup)for(var y=t.firstChild;y;)1===y.nodeType?this._parseNode(y,a,r,d,n,o):3===y.nodeType&&o&&this._parseText(y,a),y=y.nextSibling},gh.prototype._parseText=function(t,e){var r=new uh({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});wh(e,r),Sh(t,r,this._defsUsePending,!1,!1),function(t,e){var r,i,n=e.__selfStyle;n&&(r=n.textBaseline,(i=r)&&"auto"!==r&&"baseline"!==r?"before-edge"===r||"text-before-edge"===r?i="top":"after-edge"===r||"text-after-edge"===r?i="bottom":"central"!==r&&"mathematical"!==r||(i="middle"):i="alphabetic",t.style.textBaseline=i);var o,a,s=e.__inheritedStyle;s&&(o=s.textAlign,(a=o)&&("middle"===o&&(a="center"),t.style.textAlign=a))}(r,e);var i=r.style,n=i.fontSize;n&&n<9&&(i.fontSize=9,r.scaleX*=n/9,r.scaleY*=n/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var a=r.getBoundingRect();return this._textX+=a.width,e.add(r),r},gh.internalField=void(hh={g:function(t,e){var r=new lo;return wh(e,r),Sh(t,r,this._defsUsePending,!1,!1),r},rect:function(t,e){var r=new fs;return wh(e,r),Sh(t,r,this._defsUsePending,!1,!1),r.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")}),r.silent=!0,r},circle:function(t,e){var r=new as;return wh(e,r),Sh(t,r,this._defsUsePending,!1,!1),r.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),r.silent=!0,r},line:function(t,e){var r=new bs;return wh(e,r),Sh(t,r,this._defsUsePending,!1,!1),r.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")}),r.silent=!0,r},ellipse:function(t,e){var r=new gs;return wh(e,r),Sh(t,r,this._defsUsePending,!1,!1),r.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")}),r.silent=!0,r},polygon:function(t,e){var r,i=t.getAttribute("points");i&&(r=bh(i));var n=new Ps({shape:{points:r||[]},silent:!0});return wh(e,n),Sh(t,n,this._defsUsePending,!1,!1),n},polyline:function(t,e){var r,i=t.getAttribute("points");i&&(r=bh(i));var n=new zs({shape:{points:r||[]},silent:!0});return wh(e,n),Sh(t,n,this._defsUsePending,!1,!1),n},image:function(t,e){var r=new rs;return wh(e,r),Sh(t,r,this._defsUsePending,!1,!1),r.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),r.silent=!0,r},text:function(t,e){var r=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",n=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(r)+parseFloat(n),this._textY=parseFloat(i)+parseFloat(o);var a=new lo;return wh(e,a),Sh(t,a,this._defsUsePending,!1,!0),a},tspan:function(t,e){var r=t.getAttribute("x"),i=t.getAttribute("y");null!=r&&(this._textX=parseFloat(r)),null!=i&&(this._textY=parseFloat(i));var n=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",a=new lo;return wh(e,a),Sh(t,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(n),this._textY+=parseFloat(o),a},path:function(t,e){var r=Ka(t.getAttribute("d")||"");return wh(e,r),Sh(t,r,this._defsUsePending,!1,!1),r.silent=!0,r}}),gh);function gh(){this._defs={},this._root=null}var _h={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),r=parseInt(t.getAttribute("y1")||"0",10),i=parseInt(t.getAttribute("x2")||"10",10),n=parseInt(t.getAttribute("y2")||"0",10),o=new Fs(e,r,i,n);return mh(t,o),xh(t,o),o},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),r=parseInt(t.getAttribute("cy")||"0",10),i=parseInt(t.getAttribute("r")||"0",10),n=new Hs(e,r,i);return mh(t,n),xh(t,n),n}};function mh(t,e){"userSpaceOnUse"===t.getAttribute("gradientUnits")&&(e.global=!0)}function xh(t,e){for(var r,i,n,o,a,s,h=t.firstChild;h;){1===h.nodeType&&"stop"===h.nodeName.toLocaleLowerCase()&&(i=void 0,i=(r=h.getAttribute("offset"))&&0<r.indexOf("%")?parseInt(r,10)/100:r?parseFloat(r):0,zh(h,n={},n),o=n.stopColor||h.getAttribute("stop-color")||"#000000",!(a=n.stopOpacity||h.getAttribute("stop-opacity"))||(s=ai(o))&&s[3]&&(s[3]*=$r(a),o=fi(s,"rgba")),e.colorStops.push({offset:i,color:o})),h=h.nextSibling}}function wh(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),P(e.__inheritedStyle,t.__inheritedStyle))}function bh(t){for(var e=Ph(t),r=[],i=0;i<e.length;i+=2){var n=parseFloat(e[i]),o=parseFloat(e[i+1]);r.push([n,o])}return r}function Sh(t,e,r,i,n){var o=e,a=o.__inheritedStyle=o.__inheritedStyle||{},s={};1===t.nodeType&&(function(t,e){var r=t.getAttribute("transform");if(r){r=r.replace(/,/g," ");var i=[],n=null;r.replace(Mh,function(t,e,r){return i.push(e,r),""});for(var o=i.length-1;0<o;o-=2){var a=i[o],s=i[o-1],h=Ph(a);switch(n=n||le(),s){case"translate":fe(n,n,[parseFloat(h[0]),parseFloat(h[1]||"0")]);break;case"scale":ye(n,n,[parseFloat(h[0]),parseFloat(h[1]||h[0])]);break;case"rotate":de(n,n,-parseFloat(h[0])*Ah,[parseFloat(h[1]||"0"),parseFloat(h[2]||"0")]);break;case"skewX":var l=Math.tan(parseFloat(h[0])*Ah);pe(n,[1,0,l,1,0,0],n);break;case"skewY":var u=Math.tan(parseFloat(h[0])*Ah);pe(n,[1,u,0,1,0,0],n);break;case"matrix":n[0]=parseFloat(h[0]),n[1]=parseFloat(h[1]),n[2]=parseFloat(h[2]),n[3]=parseFloat(h[3]),n[4]=parseFloat(h[4]),n[5]=parseFloat(h[5])}}e.setLocalTransform(n)}}(t,e),zh(t,a,s),i||function(t,e,r){for(var i=0;i<fh.length;i++){var n=fh[i];null!=(o=t.getAttribute(n))&&(e[ph[n]]=o)}for(i=0;i<yh.length;i++){var o,n=yh[i];null!=(o=t.getAttribute(n))&&(r[dh[n]]=o)}}(t,a,s)),o.style=o.style||{},null!=a.fill&&(o.style.fill=kh(o,"fill",a.fill,r)),null!=a.stroke&&(o.style.stroke=kh(o,"stroke",a.stroke,r)),R(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(t){null!=a[t]&&(o.style[t]=parseFloat(a[t]))}),R(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(t){null!=a[t]&&(o.style[t]=a[t])}),n&&(o.__selfStyle=s),a.lineDash&&(o.style.lineDash=I(Ph(a.lineDash),function(t){return parseFloat(t)})),"hidden"!==a.visibility&&"collapse"!==a.visibility||(o.invisible=!0),"none"===a.display&&(o.ignore=!0)}var Th=/^url\(\s*#(.*?)\)/;function kh(t,e,r,i){var n=r&&r.match(Th);if(!n)return"none"===r&&(r=null),r;var o=rt(n[1]);i.push([t,e,o])}var Ch=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Ph(t){return t.match(Ch)||[]}var Mh=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,Ah=Math.PI/180;var Dh=/([^\s:;]+)\s*:\s*([^:;]+)/g;function zh(t,e,r){var i,n=t.getAttribute("style");if(n)for(Dh.lastIndex=0;null!=(i=Dh.exec(n));){var o=i[1],a=ft(ph,o)?ph[o]:null;a&&(e[a]=i[2]);var s=ft(dh,o)?dh[o]:null;s&&(r[s]=i[2])}}var Ih=Math.PI,Lh=2*Ih,Rh=Math.sin,Oh=Math.cos,Fh=Math.acos,Bh=Math.atan2,Nh=Math.abs,Hh=Math.sqrt,Wh=Math.max,Eh=Math.min,Xh=1e-4;function Yh(t,e,r,i,n,o,a){var s=t-r,h=e-i,l=(a?o:-o)/Hh(s*s+h*h),u=l*h,c=-l*s,p=t+u,f=e+c,d=r+u,y=i+c,v=(p+d)/2,g=(f+y)/2,_=d-p,m=y-f,x=_*_+m*m,w=n-o,b=p*y-d*f,S=(m<0?-1:1)*Hh(Wh(0,w*w*x-b*b)),T=(b*m-_*S)/x,k=(-b*_-m*S)/x,C=(b*m+_*S)/x,P=(-b*_+m*S)/x,M=T-v,A=k-g,D=C-v,z=P-g;return D*D+z*z<M*M+A*A&&(T=C,k=P),{cx:T,cy:k,x0:-u,y0:-c,x1:T*(n/w-1),y1:k*(n/w-1)}}function qh(t,e){var r,i,n,o,a,s,h,l,u,c,p,f,d,y,v,g,_,m,x,w,b,S,T,k,C,P,M,A,D,z,I,L,R,O,F,B,N,H,W,E,X,Y,q,j=Wh(e.r,0),V=Wh(e.r0||0,0),U=0<j;(U||0<V)&&(U||(j=V,V=0),j<V&&(i=j,j=V,V=i),n=e.startAngle,o=e.endAngle,isNaN(n)||isNaN(o)||(a=e.cx,s=e.cy,h=!!e.clockwise,l=Nh(o-n),Xh<(u=Lh<l&&l%Lh)&&(l=u),Xh<j?Lh-Xh<l?(t.moveTo(a+j*Oh(n),s+j*Rh(n)),t.arc(a,s,j,n,o,!h),Xh<V&&(t.moveTo(a+V*Oh(o),s+V*Rh(o)),t.arc(a,s,V,o,n,h))):(F=O=R=L=I=z=v=y=W=H=N=B=d=f=p=c=void 0,g=j*Oh(n),_=j*Rh(n),m=V*Oh(o),x=V*Rh(o),(w=Xh<l)&&((b=e.cornerRadius)&&(c=(r=function(t){var e;if(G(t)){var r=t.length;if(!r)return t;e=1===r?[t[0],t[0],0,0]:2===r?[t[0],t[0],t[1],t[1]]:3===r?t.concat(t[2]):t}else e=[t,t,t,t];return e}(b))[0],p=r[1],f=r[2],d=r[3]),S=Nh(j-V)/2,B=Eh(S,f),N=Eh(S,d),H=Eh(S,c),W=Eh(S,p),z=y=Wh(B,N),I=v=Wh(H,W),(Xh<y||Xh<v)&&(L=j*Oh(o),R=j*Rh(o),O=V*Oh(n),F=V*Rh(n),l<Ih&&((T=function(t,e,r,i,n,o,a,s){var h=r-t,l=i-e,u=a-n,c=s-o,p=c*h-u*l;if(!(p*p<Xh))return[t+(p=(u*(e-o)-c*(t-n))/p)*h,e+p*l]}(g,_,O,F,L,R,m,x))&&(k=g-T[0],C=_-T[1],P=L-T[0],M=R-T[1],A=1/Rh(Fh((k*P+C*M)/(Hh(k*k+C*C)*Hh(P*P+M*M)))/2),D=Hh(T[0]*T[0]+T[1]*T[1]),z=Eh(y,(j-D)/(1+A)),I=Eh(v,(V-D)/(A-1)))))),w?Xh<z?(E=Eh(f,z),X=Eh(d,z),Y=Yh(O,F,g,_,j,E,h),q=Yh(L,R,m,x,j,X,h),t.moveTo(a+Y.cx+Y.x0,s+Y.cy+Y.y0),z<y&&E===X?t.arc(a+Y.cx,s+Y.cy,z,Bh(Y.y0,Y.x0),Bh(q.y0,q.x0),!h):(0<E&&t.arc(a+Y.cx,s+Y.cy,E,Bh(Y.y0,Y.x0),Bh(Y.y1,Y.x1),!h),t.arc(a,s,j,Bh(Y.cy+Y.y1,Y.cx+Y.x1),Bh(q.cy+q.y1,q.cx+q.x1),!h),0<X&&t.arc(a+q.cx,s+q.cy,X,Bh(q.y1,q.x1),Bh(q.y0,q.x0),!h))):(t.moveTo(a+g,s+_),t.arc(a,s,j,n,o,!h)):t.moveTo(a+g,s+_),Xh<V&&w?Xh<I?(E=Eh(c,I),Y=Yh(m,x,L,R,V,-(X=Eh(p,I)),h),q=Yh(g,_,O,F,V,-E,h),t.lineTo(a+Y.cx+Y.x0,s+Y.cy+Y.y0),I<v&&E===X?t.arc(a+Y.cx,s+Y.cy,I,Bh(Y.y0,Y.x0),Bh(q.y0,q.x0),!h):(0<X&&t.arc(a+Y.cx,s+Y.cy,X,Bh(Y.y0,Y.x0),Bh(Y.y1,Y.x1),!h),t.arc(a,s,V,Bh(Y.cy+Y.y1,Y.cx+Y.x1),Bh(q.cy+q.y1,q.cx+q.x1),h),0<E&&t.arc(a+q.cx,s+q.cy,E,Bh(q.y1,q.x1),Bh(q.y0,q.x0),!h))):(t.lineTo(a+m,s+x),t.arc(a,s,V,o,n,h)):t.lineTo(a+m,s+x)):t.moveTo(a,s),t.closePath()))}var jh,Vh=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},Uh=(mt(Gh,jh=Ma),Gh.prototype.getDefaultShape=function(){return new Vh},Gh.prototype.buildPath=function(t,e){qh(t,e)},Gh.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},Gh);function Gh(t){return jh.call(this,t)||this}Uh.prototype.type="sector";var Zh=aa.CMD;function Kh(t,e){return Math.abs(t-e)<1e-5}function Qh(t){var n,e,r,i=t.data,o=t.len(),a=[],s=0,h=0,l=0,u=0;function c(t,e){n&&2<n.length&&a.push(n),n=[t,e]}function p(t,e,r,i){Kh(t,r)&&Kh(e,i)||n.push(t,e,r,i,r,i)}for(var f,d,y,v,g,_,m,x,w,b,S,T,k,C,P,M,A,D,z,I=0;I<o;){var L=i[I++],R=1===I;switch(R&&(l=s=i[I],u=h=i[I+1],L!==Zh.L&&L!==Zh.C&&L!==Zh.Q||(n=[l,u])),L){case Zh.M:s=l=i[I++],h=u=i[I++],c(l,u);break;case Zh.L:p(s,h,X=i[I++],Y=i[I++]),s=X,h=Y;break;case Zh.C:n.push(i[I++],i[I++],i[I++],i[I++],s=i[I++],h=i[I++]);break;case Zh.Q:X=i[I++],Y=i[I++],e=i[I++],r=i[I++],n.push(s+2/3*(X-s),h+2/3*(Y-h),e+2/3*(X-e),r+2/3*(Y-r),e,r),s=e,h=r;break;case Zh.A:var O=i[I++],F=i[I++],B=i[I++],N=i[I++],H=i[I++],W=i[I++]+H;I+=1;var E=!i[I++],X=Math.cos(H)*B+O,Y=Math.sin(H)*N+F;R?c(l=X,u=Y):p(s,h,X,Y),s=Math.cos(W)*B+O,h=Math.sin(W)*N+F;for(var q=(E?-1:1)*Math.PI/2,j=H;E?W<j:j<W;j+=q){var V=E?Math.max(j+q,W):Math.min(j+q,W);f=j,d=V,y=O,v=F,g=B,_=N,z=D=A=M=P=C=k=T=S=b=w=x=m=void 0,m=Math.abs(d-f),x=4*Math.tan(m/4)/3,w=d<f?-1:1,b=Math.cos(f),S=Math.sin(f),T=Math.cos(d),k=Math.sin(d),C=b*g+y,P=S*_+v,M=T*g+y,A=k*_+v,D=g*x*w,z=_*x*w,n.push(C-D*S,P+z*b,M+D*k,A-z*T,M,A)}break;case Zh.R:l=s=i[I++],u=h=i[I++],X=l+i[I++],Y=u+i[I++],c(X,u),p(X,u,X,Y),p(X,Y,l,Y),p(l,Y,l,u),p(l,u,X,u);break;case Zh.Z:n&&p(s,h,l,u),s=l,h=u}}return n&&2<n.length&&a.push(n),a}function $h(t,e){var r=Qh(t),i=[];e=e||1;for(var n=0;n<r.length;n++){var o=r[n],a=[],s=o[0],h=o[1];a.push(s,h);for(var l=2;l<o.length;){var u=o[l++],c=o[l++],p=o[l++],f=o[l++],d=o[l++],y=o[l++];!function t(e,r,i,n,o,a,s,h,l,u){var c,p,f,d,y,v,g,_,m,x,w,b,S,T,k;Kh(e,i)&&Kh(r,n)&&Kh(o,s)&&Kh(a,h)?l.push(s,h):(p=(c=2/u)*c,f=s-e,d=h-r,f/=y=Math.sqrt(f*f+d*d),d/=y,w=(_=o-s)*_+(m=a-h)*m,(x=(v=i-e)*v+(g=n-r)*g)<p&&w<p?l.push(s,h):(S=-f*_-d*m,x-(b=f*v+d*g)*b<p&&0<=b&&w-S*S<p&&0<=S?l.push(s,h):(k=[],Rr(e,i,o,s,.5,T=[]),Rr(r,n,a,h,.5,k),t(T[0],k[0],T[1],k[1],T[2],k[2],T[3],k[3],l,u),t(T[4],k[4],T[5],k[5],T[6],k[6],T[7],k[7],l,u))))}(s,h,u,c,p,f,d,y,a,e),s=d,h=y}i.push(a)}return i}function Jh(t,e,r){var i=t[e],n=t[1-e],o=Math.abs(i/n),a=Math.ceil(Math.sqrt(o*r)),s=Math.floor(r/a);0===s&&(s=1,a=r);for(var h=[],l=0;l<a;l++)h.push(s);var u=r-a*s;if(0<u)for(l=0;l<u;l++)h[l%a]+=1;return h}function tl(t,e,r){for(var i=t.r0,n=t.r,o=t.startAngle,a=t.endAngle,s=Math.abs(a-o),h=s*n,l=n-i,u=h>Math.abs(l),c=Jh([h,l],u?0:1,e),p=(u?s:l)/c.length,f=0;f<c.length;f++)for(var d=(u?l:s)/c[f],y=0;y<c[f];y++){var v={};u?(v.startAngle=o+p*f,v.endAngle=o+p*(f+1),v.r0=i+d*y,v.r=i+d*(y+1)):(v.startAngle=o+d*y,v.endAngle=o+d*(y+1),v.r0=i+p*f,v.r=i+p*(f+1)),v.clockwise=t.clockwise,v.cx=t.cx,v.cy=t.cy,r.push(v)}}function el(t,e){var r=t[t.length-1];r&&r[0]===e[0]&&r[1]===e[1]||t.push(e)}function rl(t,e,r){for(var i=t.length,n=[],o=0;o<i;o++){var a=t[o],s=t[(o+1)%i],h=function(t,e,r,i,n,o,a,s){var h=r-t,l=i-e,u=a-n,c=s-o,p=u*l-h*c;if(Math.abs(p)<1e-6)return null;var f=((t-n)*c-u*(e-o))/p;return f<0||1<f?null:new _e(f*h+t,f*l+e)}(a[0],a[1],s[0],s[1],e.x,e.y,r.x,r.y);h&&n.push({projPt:function(t,e,r){var i=new _e;_e.sub(i,r,e),i.normalize();var n=new _e;return _e.sub(n,t,e),n.dot(i)}(h,e,r),pt:h,idx:o})}if(n.length<2)return[{points:t},{points:t}];n.sort(function(t,e){return t.projPt-e.projPt});var l,u=n[0],c=n[n.length-1];c.idx<u.idx&&(l=u,u=c,c=l);for(var p=[u.pt.x,u.pt.y],f=[c.pt.x,c.pt.y],d=[p],y=[f],o=u.idx+1;o<=c.idx;o++)el(d,t[o].slice());el(d,f),el(d,p);for(o=c.idx+1;o<=u.idx+i;o++)el(y,t[o%i].slice());return el(y,p),el(y,f),[{points:d},{points:y}]}function il(t){var e=t.points,r=[],i=[];No(e,r,i);var n=new Le(r[0],r[1],i[0]-r[0],i[1]-r[1]),o=n.width,a=n.height,s=n.x,h=n.y,l=new _e,u=new _e;return a<o?(l.x=u.x=s+o/2,l.y=h,u.y=h+a):(l.y=u.y=h+a/2,l.x=s,u.x=s+o),rl(e,l,u)}function nl(t,e,r,i){var n,o;return 1===r?i.push(e):(n=Math.floor(r/2),o=t(e),nl(t,o[0],n,i),nl(t,o[1],r-n,i)),i}function ol(t,e){var r,i=[],n=t.shape;switch(t.type){case"rect":!function(t,e,r){for(var i=t.width,n=t.height,o=n<i,a=Jh([i,n],o?0:1,e),s=o?"width":"height",h=o?"height":"width",l=o?"x":"y",u=o?"y":"x",c=t[s]/a.length,p=0;p<a.length;p++)for(var f=t[h]/a[p],d=0;d<a[p];d++){var y={};y[l]=p*c,y[u]=d*f,y[s]=c,y[h]=f,y.x+=t.x,y.y+=t.y,r.push(y)}}(n,e,i),r=fs;break;case"sector":tl(n,e,i),r=Uh;break;case"circle":tl({r0:0,r:n.r,startAngle:0,endAngle:2*Math.PI,cx:n.cx,cy:n.cy},e,i),r=Uh;break;default:var o=t.getComputedTransform(),a=o?Math.sqrt(Math.max(o[0]*o[0]+o[1]*o[1],o[2]*o[2]+o[3]*o[3])):1,s=I($h(t.getUpdatedPathProxy(),a),function(t){for(var e=[],r=0;r<t.length;)e.push([t[r++],t[r++]]);return e}),h=s.length;if(0===h)nl(il,{points:s[0]},e,i);else if(h===e)for(var l=0;l<h;l++)i.push({points:s[l]});else{var u=0,c=I(s,function(t){var e=[],r=[];No(t,e,r);var i=(r[1]-e[1])*(r[0]-e[0]);return u+=i,{poly:t,area:i}});c.sort(function(t,e){return e.area-t.area});for(var p=e,l=0;l<h;l++){var f=c[l];if(p<=0)break;var d=l===h-1?p:Math.ceil(f.area/u*e);d<0||(nl(il,{points:f.poly},d,i),p-=d)}}r=Ps}if(!r)return function(t,e){for(var r=[],i=0;i<e;i++)r.push(Qa(t));return r}(t,e);for(var y,v,g=[],l=0;l<i.length;l++){var _=new r;_.setShape(i[l]),y=t,(v=_).setStyle(y.style),v.z=y.z,v.z2=y.z2,v.zlevel=y.zlevel,g.push(_)}return g}function al(t,e){for(var r=t.length,i=t[r-2],n=t[r-1],o=[],a=0;a<e.length;)o[a++]=i,o[a++]=n;return o}function sl(t,e){for(var r,i,n,o=[],a=[],s=0;s<Math.max(t.length,e.length);s++){var h=t[s],l=e[s],u=void 0,c=void 0;h?l?(i=u=(r=function(t,e){var r=t.length,i=e.length;if(r===i)return[t,e];for(var n=[],o=[],a=r<i?t:e,s=Math.min(r,i),h=Math.abs(i-r)/6,l=(s-2)/6,u=Math.ceil(h/l)+1,c=[a[0],a[1]],p=h,f=2;f<s;){var d=a[f-2],y=a[f-1],v=a[f++],g=a[f++],_=a[f++],m=a[f++],x=a[f++],w=a[f++];if(p<=0)c.push(v,g,_,m,x,w);else{for(var b=Math.min(p,u-1)+1,S=1;S<=b;S++){var T=S/b;Rr(d,v,_,x,T,n),Rr(y,g,m,w,T,o),d=n[3],y=o[3],c.push(n[1],o[1],n[2],o[2],d,y),v=n[5],g=o[5],_=n[6],m=o[6]}p-=b-1}}return a===t?[c,e]:[t,c]}(h,l))[0],n=c=r[1]):(c=al(n||h,h),u=h):(u=al(i||l,l),c=l),o.push(u),a.push(c)}return[o,a]}function hl(t){for(var e=0,r=0,i=0,n=t.length,o=0,a=n-2;o<n;a=o,o+=2){var s=t[a],h=t[a+1],l=t[o],u=t[o+1],c=s*u-l*h;e+=c,r+=(s+l)*c,i+=(h+u)*c}return 0===e?[t[0]||0,t[1]||0]:[r/e/3,i/e/3,e]}function ll(t,e,r,i){for(var n,o=[],a=0;a<t.length;a++){var s=t[a],h=e[a],l=hl(s),u=hl(h);null==n&&(n=l[2]<0!=u[2]<0);var c=[],p=[],f=0,d=1/0,y=[],v=s.length;n&&(s=function(t){for(var e=[],r=t.length,i=0;i<r;i+=2)e[i]=t[r-i-2],e[i+1]=t[r-i-1];return e}(s));for(var g=6*function(t,e,r,i){for(var n=(t.length-2)/6,o=1/0,a=0,s=t.length,h=s-2,l=0;l<n;l++){for(var u=6*l,c=0,p=0;p<s;p+=2){var f=0===p?u:(u+p-2)%h+2,d=t[f]-r[0],y=t[1+f]-r[1],v=e[p]-i[0]-d,g=e[p+1]-i[1]-y;c+=v*v+g*g}c<o&&(o=c,a=l)}return a}(s,h,l,u),_=v-2,m=0;m<_;m+=2){var x=(g+m)%_+2;c[m+2]=s[x]-l[0],c[m+3]=s[1+x]-l[1]}if(c[0]=s[g]-l[0],c[1]=s[1+g]-l[1],0<r)for(var w=i/r,b=-i/2;b<=i/2;b+=w){for(var S=Math.sin(b),T=Math.cos(b),k=0,m=0;m<s.length;m+=2){var C=c[m],P=c[m+1],M=h[m]-u[0],A=h[m+1]-u[1],D=M*T-A*S,z=M*S+A*T,I=(y[m]=D)-C,L=(y[m+1]=z)-P;k+=I*I+L*L}if(k<d){d=k,f=b;for(var R=0;R<y.length;R++)p[R]=y[R]}}else for(var O=0;O<v;O+=2)p[O]=h[O]-u[0],p[O+1]=h[O+1]-u[1];o.push({from:c,to:p,fromCp:l,toCp:u,rotation:-f})}return o}function ul(t){return t.__isCombineMorphing}var cl="__mOriginal_";function pl(t,e,r){var i=cl+e,n=t[i]||t[e];t[i]||(t[i]=t[e]);var o=r.replace,a=r.after,s=r.before;t[e]=function(){var t,e=arguments;return s&&s.apply(this,e),t=o?o.apply(this,e):n.apply(this,e),a&&a.apply(this,e),t}}function fl(t,e){var r=cl+e;t[r]&&(t[e]=t[r],t[r]=null)}function dl(t,e){for(var r=0;r<t.length;r++)for(var i=t[r],n=0;n<i.length;){var o=i[n],a=i[n+1];i[n++]=e[0]*o+e[2]*a+e[4],i[n++]=e[1]*o+e[3]*a+e[5]}}function yl(t,C){var e=t.getUpdatedPathProxy(),r=C.getUpdatedPathProxy(),i=sl(Qh(e),Qh(r)),n=i[0],o=i[1],a=t.getComputedTransform(),s=C.getComputedTransform();a&&dl(n,a),s&&dl(o,s),pl(C,"updateTransform",{replace:function(){this.transform=null}}),C.transform=null;var P=ll(n,o,10,Math.PI),M=[];pl(C,"buildPath",{replace:function(t){for(var e=C.__morphT,r=1-e,i=[],n=0;n<P.length;n++){var o=P[n],a=o.from,s=o.to,h=o.rotation*e,l=o.fromCp,u=o.toCp,c=Math.sin(h),p=Math.cos(h);Lt(i,l,u,e);for(var f=0;f<a.length;f+=2){var d=a[f],y=a[f+1],v=d*r+(x=s[f])*e,g=y*r+(w=s[f+1])*e;M[f]=v*p-g*c+i[0],M[f+1]=v*c+g*p+i[1]}var _=M[0],m=M[1];t.moveTo(_,m);for(f=2;f<a.length;){var x=M[f++],w=M[f++],b=M[f++],S=M[f++],T=M[f++],k=M[f++];_===x&&m===w&&b===T&&S===k?t.lineTo(T,k):t.bezierCurveTo(x,w,b,S,T,k),_=T,m=k}}}})}function vl(t,e,r){if(!t||!e)return e;var i=r.done,n=r.during;return yl(t,e),e.__morphT=0,e.animateTo({__morphT:1},P({during:function(t){e.dirtyShape(),n&&n(t)},done:function(){fl(e,"buildPath"),fl(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape(),i&&i()}},r)),e}function gl(r){var o=1/0,a=1/0,s=-1/0,h=-1/0,t=I(r,function(t){var e=t.getBoundingRect(),r=t.getComputedTransform(),i=e.x+e.width/2+(r?r[4]:0),n=e.y+e.height/2+(r?r[5]:0);return o=Math.min(i,o),a=Math.min(n,a),s=Math.max(i,s),h=Math.max(n,h),[i,n]});return I(t,function(t,e){return{cp:t,z:function(t,e,r,i,n,o){t=n===r?0:Math.round(32767*(t-r)/(n-r)),e=o===i?0:Math.round(32767*(e-i)/(o-i));for(var a,s=0,h=32768;0<h;h/=2){var l=0,u=0;0<(t&h)&&(l=1),0<(e&h)&&(u=1),s+=h*h*(3*l^u),0===u&&(1===l&&(t=h-1-t,e=h-1-e),a=t,t=e,e=a)}return s}(t[0],t[1],o,a,s,h),path:r[e]}}).sort(function(t,e){return t.z-e.z}).map(function(t){return t.path})}function _l(t){return ol(t.path,t.count)}function ml(){return{fromIndividuals:[],toIndividuals:[],count:0}}var xl,wl=Object.freeze({__proto__:null,alignBezierCurves:sl,centroid:hl,isCombineMorphing:ul,isMorphing:function(t){return 0<=t.__morphT},morphPath:vl,combineMorph:function(e,i,t){var n=[];!function t(e){for(var r=0;r<e.length;r++){var i=e[r];ul(i)?t(i.childrenRef()):i instanceof Ma&&n.push(i)}}(e);var r=n.length;if(!r)return ml();var o=(t.dividePath||_l)({path:i,count:r});if(o.length!==r)return console.error("Invalid morphing: unmatched splitted path"),ml();n=gl(n),o=gl(o);for(var a=t.done,s=t.during,h=t.individualDelay,l=new zn,u=0;u<r;u++){var c=n[u],p=o[u];p.parent=i,p.copyTransform(l),h||yl(c,p)}function f(t){for(var e=0;e<o.length;e++)o[e].addSelfToZr(t)}function d(){i.__isCombineMorphing=!1,i.__morphT=-1,i.childrenRef=null,fl(i,"addSelfToZr"),fl(i,"removeSelfFromZr")}i.__isCombineMorphing=!0,i.childrenRef=function(){return o},pl(i,"addSelfToZr",{after:function(t){f(t)}}),pl(i,"removeSelfFromZr",{after:function(t){for(var e=0;e<o.length;e++)o[e].removeSelfFromZr(t)}});var y=o.length;if(h)for(var v=y,g=function(){0===--v&&(d(),a&&a())},u=0;u<y;u++){var _=h?P({delay:(t.delay||0)+h(u,y,n[u],o[u]),done:g},t):t;vl(n[u],o[u],_)}else i.__morphT=0,i.animateTo({__morphT:1},P({during:function(t){for(var e=0;e<y;e++){var r=o[e];r.__morphT=i.__morphT,r.dirtyShape()}s&&s(t)},done:function(){d();for(var t=0;t<e.length;t++)fl(e[t],"updateTransform");a&&a()}},t));return i.__zr&&f(i.__zr),{fromIndividuals:n,toIndividuals:o,count:y}},separateMorph:function(t,e,r){var i=e.length,n=[],o=r.dividePath||_l;if(ul(t)){!function t(e){for(var r=0;r<e.length;r++){var i=e[r];ul(i)?t(i.childrenRef()):i instanceof Ma&&n.push(i)}}(t.childrenRef());var a=n.length;if(a<i)for(var s=0,h=a;h<i;h++)n.push(Qa(n[s++%a]));n.length=i}else{n=o({path:t,count:i});for(var l=t.getComputedTransform(),h=0;h<n.length;h++)n[h].setLocalTransform(l);if(n.length!==i)return console.error("Invalid morphing: unmatched splitted path"),ml()}n=gl(n),e=gl(e);for(var u=r.individualDelay,h=0;h<i;h++){var c=u?P({delay:(r.delay||0)+u(h,i,n[h],e[h])},r):r;vl(n[h],e[h],c)}return{fromIndividuals:n,toIndividuals:e,count:e.length}},defaultDividePath:ol}),bl=(mt(Sl,xl=Ma),Sl.prototype._updatePathDirty=function(){for(var t=this.shape.paths,e=this.shapeChanged(),r=0;r<t.length;r++)e=e||t[r].shapeChanged();e&&this.dirtyShape()},Sl.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),r=0;r<t.length;r++)t[r].path||t[r].createPathProxy(),t[r].path.setScale(e[0],e[1],t[r].segmentIgnoreThreshold)},Sl.prototype.buildPath=function(t,e){for(var r=e.paths||[],i=0;i<r.length;i++)r[i].buildPath(t,r[i].shape,!0)},Sl.prototype.afterBrush=function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].pathUpdated()},Sl.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Ma.prototype.getBoundingRect.call(this)},Sl);function Sl(){var t=null!==xl&&xl.apply(this,arguments)||this;return t.type="compound",t}var Tl,kl=[],Cl=(mt(Pl,Tl=Co),Pl.prototype.traverse=function(t,e){t.call(e,this)},Pl.prototype.useStyle=function(){this.style={}},Pl.prototype._useHoverStyle=function(){this.__hoverStyle=null},Pl.prototype.getCursor=function(){return this._cursor},Pl.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},Pl.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},Pl.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},Pl.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},Pl.prototype.addDisplayables=function(t,e){e=e||!1;for(var r=0;r<t.length;r++)this.addDisplayable(t[r],e)},Pl.prototype.getDisplayables=function(){return this._displayables},Pl.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},Pl.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},Pl.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++)(e=this._displayables[t]).parent=this,e.update(),e.parent=null;for(var e,t=0;t<this._temporaryDisplayables.length;t++)(e=this._temporaryDisplayables[t]).parent=this,e.update(),e.parent=null},Pl.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new Le(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var r=this._displayables[e],i=r.getBoundingRect().clone();r.needLocalTransform()&&i.applyTransform(r.getLocalTransform(kl)),t.union(i)}this._rect=t}return this._rect},Pl.prototype.contain=function(t,e){var r=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(r[0],r[1]))for(var i=0;i<this._displayables.length;i++)if(this._displayables[i].contain(t,e))return!0;return!1},Pl);function Pl(){var t=null!==Tl&&Tl.apply(this,arguments)||this;return t.notClear=!0,t.incremental=1,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}var Ml,Al={fill:"#000"},Dl={},zl={style:P({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},wo.style)},Il=(mt(Ll,Ml=Co),Ll.prototype.childrenRef=function(){return this._children},Ll.prototype.update=function(){Ml.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var e=this._children[t];e.zlevel=this.zlevel,e.z=this.z,e.z2=this.z2,e.culling=this.culling,e.cursor=this.cursor,e.invisible=this.invisible}},Ll.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):Ml.prototype.updateTransform.call(this)},Ll.prototype.getLocalTransform=function(t){var e=this.innerTransformable;return e?e.getLocalTransform(t):Ml.prototype.getLocalTransform.call(this,t)},Ll.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),Ml.prototype.getComputedTransform.call(this)},Ll.prototype._updateSubTexts=function(){var t;this._childCursor=0,Wl(t=this.style),R(t.rich,Wl),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},Ll.prototype.addSelfToZr=function(t){Ml.prototype.addSelfToZr.call(this,t);for(var e=0;e<this._children.length;e++)this._children[e].__zr=t},Ll.prototype.removeSelfFromZr=function(t){Ml.prototype.removeSelfFromZr.call(this,t);for(var e=0;e<this._children.length;e++)this._children[e].__zr=null},Ll.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new Le(0,0,0,0),e=this._children,r=[],i=null,n=0;n<e.length;n++){var o=e[n],a=o.getBoundingRect(),s=o.getLocalTransform(r);s?(t.copy(a),t.applyTransform(s),(i=i||t.clone()).union(t)):(i=i||a.clone()).union(a)}this._rect=i||t}return this._rect},Ll.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||Al},Ll.prototype.setTextContent=function(t){},Ll.prototype._mergeStyle=function(t,e){if(!e)return t;var r=e.rich,i=t.rich||r&&{};return L(t,e),r&&i?(this._mergeRich(i,r),t.rich=i):i&&(t.rich=i),t},Ll.prototype._mergeRich=function(t,e){for(var r=B(e),i=0;i<r.length;i++){var n=r[i];t[n]=t[n]||{},L(t[n],e[n])}},Ll.prototype.getAnimationStyleProps=function(){return zl},Ll.prototype._getOrCreateChild=function(t){var e=this._children[this._childCursor];return e&&e instanceof t||(e=new t),(this._children[this._childCursor++]=e).__zr=this.__zr,e.parent=this,e},Ll.prototype._updatePlainTexts=function(){var t=this.style,e=t.font||H,r=t.padding,i=this._defaultStyle,n=t.x||0,o=t.y||0,a=t.align||i.align||"left",s=t.verticalAlign||i.verticalAlign||"top";eh(Dl,i.overflowRect,n,o,a,s),n=Dl.baseX,o=Dl.baseY;var h=function(t,e,r,i){var n=nh(t),o=e.overflow,a=e.padding,s=a?a[1]+a[3]:0,h=a?a[0]+a[2]:0,l=e.font,u="truncate"===o,c=qn(l),p=Q(e.lineHeight,c),f="truncate"===e.lineOverflow,d=!1,y=e.width;null==y&&null!=r&&(y=r-s);var v=e.height;null==v&&null!=i&&(v=i-h);var g,_,m=(_=null==y||"break"!==o&&"breakAll"!==o?n?n.split("\n"):[]:n?th(n,e.font,y,"breakAll"===o,0).lines:[]).length*p;if(null==v&&(v=m),v<m&&f&&(g=Math.floor(v/p),d=d||_.length>g,m=(_=_.slice(0,g)).length*p),n&&u&&null!=y)for(var x=Vs(y,l,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),w={},b=0;b<_.length;b++)Us(w,_[b],x),_[b]=w.textLine,d=d||w.isTruncated;for(var S=v,T=0,k=Bn(l),b=0;b<_.length;b++)T=Math.max(En(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}}(ql(t),t,Dl.outerWidth,Dl.outerHeight),l=jl(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,_=Yn(o,h.contentHeight,s);(l||r)&&(y=Xn(n,p,a),v=Yn(o,c,s),l&&this._renderBackground(t,t,y,v,p,c)),_+=d/2,r&&(g=Yl(n,a,r),"top"===s?_+=r[0]:"bottom"===s&&(_-=r[2]));for(var m=0,x=!1,w=!1,b=(Xl("fill"in t?t.fill:(w=!0,i.fill))),S=(El("stroke"in t?t.stroke:u||i.autoStroke&&!w?null:(m=2,x=!0,i.stroke))),T=0<t.textShadowBlur,k=0;k<f.length;k++){var C=this._getOrCreateChild(uh),P=C.createStyle();C.useStyle(P),P.text=f[k],P.x=g,P.y=_,a&&(P.textAlign=a),P.textBaseline="middle",P.opacity=t.opacity,P.strokeFirst=!0,T&&(P.shadowBlur=t.textShadowBlur||0,P.shadowColor=t.textShadowColor||"transparent",P.shadowOffsetX=t.textShadowOffsetX||0,P.shadowOffsetY=t.textShadowOffsetY||0),P.stroke=S,P.fill=b,S&&(P.lineWidth=t.lineWidth||m,P.lineDash=t.lineDash,P.lineDashOffset=t.lineDashOffset||0),P.font=e,Nl(P,t),_+=d,C.setBoundingRect(oh(P,h.contentWidth,h.calculatedLineHeight,x?0:null))}},Ll.prototype._updateRichTexts=function(){var t=this.style,e=this._defaultStyle,r=t.align||e.align,i=t.verticalAlign||e.verticalAlign,n=t.x||0,o=t.y||0;eh(Dl,e.overflowRect,n,o,r,i),n=Dl.baseX,o=Dl.baseY;var a=Qs(ql(t),t,Dl.outerWidth,Dl.outerHeight,r),s=a.width,h=a.outerWidth,l=a.outerHeight,u=t.padding;this.isTruncated=!!a.isTruncated;var c=Xn(n,h,r),p=Yn(o,l,i),f=c,d=p;u&&(f+=u[3],d+=u[0]);var y=f+s;jl(t)&&this._renderBackground(t,t,c,p,h,l);for(var v=!!t.backgroundColor,g=0;g<a.lines.length;g++){for(var _=a.lines[g],m=_.tokens,x=m.length,w=_.lineHeight,b=_.width,S=0,T=f,k=y,C=x-1,P=void 0;S<x&&(!(P=m[S]).align||"left"===P.align);)this._placeToken(P,t,w,d,T,"left",v),b-=P.width,T+=P.width,S++;for(;0<=C&&"right"===(P=m[C]).align;)this._placeToken(P,t,w,d,k,"right",v),b-=P.width,k-=P.width,C--;for(T+=(s-(T-f)-(y-k)-b)/2;S<=C;)P=m[S],this._placeToken(P,t,w,d,T+P.width/2,"center",v),T+=P.width,S++;d+=w}},Ll.prototype._placeToken=function(t,e,r,i,n,o,a){var s=e.rich[t.styleName]||{};s.text=t.text;var h=t.verticalAlign,l=i+r/2;"top"===h?l=i+t.height/2:"bottom"===h&&(l=i+r-t.height/2),!t.isLineHolder&&jl(s)&&this._renderBackground(s,e,"right"===o?n-t.width:"center"===o?n-t.width/2:n,l-t.height/2,t.width,t.height);var u=!!s.backgroundColor,c=t.textPadding;c&&(n=Yl(n,o,c),l-=t.height/2-c[0]-t.innerHeight/2);var p=this._getOrCreateChild(uh),f=p.createStyle();p.useStyle(f);var d=this._defaultStyle,y=!1,v=0,g=!1,_=Xl("fill"in s?s.fill:"fill"in e?e.fill:(y=!0,d.fill)),m=El("stroke"in s?s.stroke:"stroke"in e?e.stroke:u||a||d.autoStroke&&!y?null:(v=2,g=!0,d.stroke)),x=0<s.textShadowBlur||0<e.textShadowBlur;f.text=t.text,f.x=n,f.y=l,x&&(f.shadowBlur=s.textShadowBlur||e.textShadowBlur||0,f.shadowColor=s.textShadowColor||e.textShadowColor||"transparent",f.shadowOffsetX=s.textShadowOffsetX||e.textShadowOffsetX||0,f.shadowOffsetY=s.textShadowOffsetY||e.textShadowOffsetY||0),f.textAlign=o,f.textBaseline="middle",f.font=t.font||H,f.opacity=$(s.opacity,e.opacity,1),Nl(f,s),m&&(f.lineWidth=$(s.lineWidth,e.lineWidth,v),f.lineDash=Q(s.lineDash,e.lineDash),f.lineDashOffset=e.lineDashOffset||0,f.stroke=m),_&&(f.fill=_),p.setBoundingRect(oh(f,t.contentWidth,t.contentHeight,g?0:null))},Ll.prototype._renderBackground=function(t,e,r,i,n,o){var a,s,h,l,u,c=t.backgroundColor,p=t.borderWidth,f=t.borderColor,d=c&&c.image,y=c&&!d,v=t.borderRadius,g=this;(y||t.lineHeight||p&&f)&&((a=this._getOrCreateChild(fs)).useStyle(a.createStyle()),a.style.fill=null,(h=a.shape).x=r,h.y=i,h.width=n,h.height=o,h.r=v,a.dirtyShape()),y?((u=a.style).fill=c||null,u.fillOpacity=Q(t.fillOpacity,1)):d&&((s=this._getOrCreateChild(rs)).onload=function(){g.dirtyStyle()},(l=s.style).image=c.image,l.x=r,l.y=i,l.width=n,l.height=o),p&&f&&((u=a.style).lineWidth=p,u.stroke=f,u.strokeOpacity=Q(t.strokeOpacity,1),u.lineDash=t.borderDash,u.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(u.strokeFirst=!0,u.lineWidth*=2));var _=(a||s).style;_.shadowBlur=t.shadowBlur||0,_.shadowColor=t.shadowColor||"transparent",_.shadowOffsetX=t.shadowOffsetX||0,_.shadowOffsetY=t.shadowOffsetY||0,_.opacity=$(t.opacity,e.opacity,1)},Ll.makeFont=function(t){var e="";return Hl(t)&&(e=[t.fontStyle,t.fontWeight,Bl(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),e&&rt(e)||t.textFont||t.font},Ll);function Ll(t){var e=Ml.call(this)||this;return e.type="text",e._children=[],e._defaultStyle=Al,e.attr(t),e}var Rl={left:!0,right:1,center:1},Ol={top:1,bottom:1,middle:1},Fl=["fontStyle","fontWeight","fontSize","fontFamily"];function Bl(t){return"string"!=typeof t||-1===t.indexOf("px")&&-1===t.indexOf("rem")&&-1===t.indexOf("em")?isNaN(+t)?h+"px":t+"px":t}function Nl(t,e){for(var r=0;r<Fl.length;r++){var i=Fl[r],n=e[i];null!=n&&(t[i]=n)}}function Hl(t){return null!=t.fontSize||t.fontFamily||t.fontWeight}function Wl(t){var e,r;t&&(t.font=Il.makeFont(t),"middle"===(e=t.align)&&(e="center"),t.align=null==e||Rl[e]?e:"left","center"===(r=t.verticalAlign)&&(r="middle"),t.verticalAlign=null==r||Ol[r]?r:"top",t.padding&&(t.padding=tt(t.padding)))}function El(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Xl(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function Yl(t,e,r){return"right"===e?t-r[1]:"center"===e?t+r[3]/2-r[1]/2:t+r[3]}function ql(t){var e=t.text;return null!=e&&(e+=""),e}function jl(t){return!!(t.backgroundColor||t.lineHeight||t.borderWidth&&t.borderColor)}var Vl,Ul=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},Gl=(mt(Zl,Vl=Ma),Zl.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},Zl.prototype.getDefaultShape=function(){return new Ul},Zl.prototype.buildPath=function(t,e){var r=e.cx,i=e.cy,n=Math.max(e.r,0),o=e.startAngle,a=e.endAngle,s=e.clockwise,h=Math.cos(o),l=Math.sin(o);t.moveTo(h*n+r,l*n+i),t.arc(r,i,n,o,a,!s)},Zl);function Zl(t){return Vl.call(this,t)||this}Gl.prototype.type="arc";var Kl=[],Ql=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function $l(t,e,r){var i=t.cpx2,n=t.cpy2;return null!=i||null!=n?[(r?zr:Dr)(t.x1,t.cpx1,t.cpx2,t.x2,e),(r?zr:Dr)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(r?Fr:Or)(t.x1,t.cpx1,t.x2,e),(r?Fr:Or)(t.y1,t.cpy1,t.y2,e)]}var Jl,tu=(mt(eu,Jl=Ma),eu.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},eu.prototype.getDefaultShape=function(){return new Ql},eu.prototype.buildPath=function(t,e){var r=e.x1,i=e.y1,n=e.x2,o=e.y2,a=e.cpx1,s=e.cpy1,h=e.cpx2,l=e.cpy2,u=e.percent;0!==u&&(t.moveTo(r,i),null==h||null==l?(u<1&&(Nr(r,a,n,u,Kl),a=Kl[1],n=Kl[2],Nr(i,s,o,u,Kl),s=Kl[1],o=Kl[2]),t.quadraticCurveTo(a,s,n,o)):(u<1&&(Rr(r,a,h,n,u,Kl),a=Kl[1],h=Kl[2],n=Kl[3],Rr(i,s,l,o,u,Kl),s=Kl[1],l=Kl[2],o=Kl[3]),t.bezierCurveTo(a,s,h,l,n,o)))},eu.prototype.pointAt=function(t){return $l(this.shape,t,!1)},eu.prototype.tangentAt=function(t){var e=$l(this.shape,t,!0);return Mt(e,e)},eu);function eu(t){return Jl.call(this,t)||this}tu.prototype.type="bezier-curve";var ru,iu=function(){this.cx=0,this.cy=0,this.width=0,this.height=0},nu=(mt(ou,ru=Ma),ou.prototype.getDefaultShape=function(){return new iu},ou.prototype.buildPath=function(t,e){var r=e.cx,i=e.cy,n=e.width,o=e.height;t.moveTo(r,i+n),t.bezierCurveTo(r+n,i+n,r+3*n/2,i-n/3,r,i-o),t.bezierCurveTo(r-3*n/2,i-n/3,r-n,i+n,r,i+n),t.closePath()},ou);function ou(t){return ru.call(this,t)||this}nu.prototype.type="droplet";var au,su=function(){this.cx=0,this.cy=0,this.width=0,this.height=0},hu=(mt(lu,au=Ma),lu.prototype.getDefaultShape=function(){return new su},lu.prototype.buildPath=function(t,e){var r=e.cx,i=e.cy,n=e.width,o=e.height;t.moveTo(r,i),t.bezierCurveTo(r+n/2,i-2*o/3,r+2*n,i+o/3,r,i+o),t.bezierCurveTo(r-2*n,i+o/3,r-n/2,i-2*o/3,r,i)},lu);function lu(t){return au.call(this,t)||this}hu.prototype.type="heart";var uu,cu=Math.PI,pu=Math.sin,fu=Math.cos,du=function(){this.x=0,this.y=0,this.r=0,this.n=0},yu=(mt(vu,uu=Ma),vu.prototype.getDefaultShape=function(){return new du},vu.prototype.buildPath=function(t,e){var r=e.n;if(r&&!(r<2)){var i=e.x,n=e.y,o=e.r,a=2*cu/r,s=-cu/2;t.moveTo(i+o*fu(s),n+o*pu(s));for(var h=0,l=r-1;h<l;h++)s+=a,t.lineTo(i+o*fu(s),n+o*pu(s));t.closePath()}},vu);function vu(t){return uu.call(this,t)||this}yu.prototype.type="isogon";var gu,_u=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},mu=(mt(xu,gu=Ma),xu.prototype.getDefaultShape=function(){return new _u},xu.prototype.buildPath=function(t,e){var r=e.cx,i=e.cy,n=2*Math.PI;t.moveTo(r+e.r,i),t.arc(r,i,e.r,0,n,!1),t.moveTo(r+e.r0,i),t.arc(r,i,e.r0,0,n,!0)},xu);function xu(t){return gu.call(this,t)||this}mu.prototype.type="ring";var wu,bu=Math.sin,Su=Math.cos,Tu=Math.PI/180,ku=function(){this.cx=0,this.cy=0,this.r=[],this.k=0,this.n=1},Cu=(mt(Pu,wu=Ma),Pu.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},Pu.prototype.getDefaultShape=function(){return new ku},Pu.prototype.buildPath=function(t,e){var r,i,n,o=e.r,a=e.k,s=e.n,h=e.cx,l=e.cy;t.moveTo(h,l);for(var u=0,c=o.length;u<c;u++){n=o[u];for(var p=0;p<=360*s;p++)r=n*bu(a/s*p%360*Tu)*Su(p*Tu)+h,i=n*bu(a/s*p%360*Tu)*bu(p*Tu)+l,t.lineTo(r,i)}},Pu);function Pu(t){return wu.call(this,t)||this}Cu.prototype.type="rose";var Mu,Au=Math.PI,Du=Math.cos,zu=Math.sin,Iu=function(){this.cx=0,this.cy=0,this.n=3,this.r=0},Lu=(mt(Ru,Mu=Ma),Ru.prototype.getDefaultShape=function(){return new Iu},Ru.prototype.buildPath=function(t,e){var r=e.n;if(r&&!(r<2)){var i=e.cx,n=e.cy,o=e.r,a=e.r0;null==a&&(a=4<r?o*Du(2*Au/r)/Du(Au/r):o/3);var s=Au/r,h=-Au/2,l=i+o*Du(h),u=n+o*zu(h);h+=s,t.moveTo(l,u);for(var c,p=0,f=2*r-1;p<f;p++)c=p%2==0?a:o,t.lineTo(i+c*Du(h),n+c*zu(h)),h+=s;t.closePath()}},Ru);function Ru(t){return Mu.call(this,t)||this}Lu.prototype.type="star";var Ou,Fu=Math.cos,Bu=Math.sin,Nu=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0,this.d=0,this.location="out"},Hu=(mt(Wu,Ou=Ma),Wu.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},Wu.prototype.getDefaultShape=function(){return new Nu},Wu.prototype.buildPath=function(t,e){var r,i,n=e.r,o=e.r0,a=e.d,s=e.cx,h=e.cy,l="out"===e.location?1:-1;if(!(e.location&&n<=o)){var u,c=0,p=1,f=(n+l*o)*Fu(0)-l*a*Fu(0)+s,d=(n+l*o)*Bu(0)-a*Bu(0)+h;for(t.moveTo(f,d);o*++c%(n+l*o)!=0;);for(;u=Math.PI/180*p,r=(n+l*o)*Fu(u)-l*a*Fu((n/o+l)*u)+s,i=(n+l*o)*Bu(u)-a*Bu((n/o+l)*u)+h,t.lineTo(r,i),++p<=o*c/(n+l*o)*360;);}},Wu);function Wu(t){return Ou.call(this,t)||this}Hu.prototype.type="trochoid";function Eu(t,e){this.image=t,this.repeat=e,this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1}var Xu=Math.min,Yu=Math.max,qu=Math.abs,ju=[0,0],Vu=[0,0],Uu=Xe(),Gu=Uu.minTv,Zu=Uu.maxTv,Ku=(Qu.prototype.fromBoundingRect=function(t,e){var r=this._corners,i=this._axes,n=t.x,o=t.y,a=n+t.width,s=o+t.height;if(r[0].set(n,o),r[1].set(a,o),r[2].set(a,s),r[3].set(n,s),e)for(var h=0;h<4;h++)r[h].transform(e);for(_e.sub(i[0],r[1],r[0]),_e.sub(i[1],r[3],r[0]),i[0].normalize(),i[1].normalize(),h=0;h<2;h++)this._origin[h]=i[h].dot(r[0])},Qu.prototype.intersect=function(t,e,r){var i=!0,n=!e;return e&&_e.set(e,0,0),Uu.reset(r,!n),!this._intersectCheckOneSide(this,t,n,1)&&(i=!1,n)||!this._intersectCheckOneSide(t,this,n,-1)&&(i=!1,n)||n||Uu.negativeSize||_e.copy(e,i?Uu.useDir?Uu.dirMinTv:Gu:Zu),i},Qu.prototype._intersectCheckOneSide=function(t,e,r,i){for(var n=!0,o=0;o<2;o++){var a=t._axes[o];if(t._getProjMinMaxOnAxis(o,t._corners,ju),t._getProjMinMaxOnAxis(o,e._corners,Vu),Uu.negativeSize||ju[1]<Vu[0]||Vu[1]<ju[0]){if(n=!1,Uu.negativeSize||r)return n;var s=qu(Vu[0]-ju[1]),h=qu(ju[0]-Vu[1]);Xu(s,h)>Zu.len()&&(s<h?_e.scale(Zu,a,-s*i):_e.scale(Zu,a,h*i))}else r||(s=qu(Vu[0]-ju[1]),h=qu(ju[0]-Vu[1]),(Uu.useDir||Xu(s,h)<Gu.len())&&((s<h||!Uu.bidirectional)&&(_e.scale(Gu,a,s*i),Uu.useDir&&Uu.calcDirMTV()),(h<=s||!Uu.bidirectional)&&(_e.scale(Gu,a,-h*i),Uu.useDir&&Uu.calcDirMTV())))}return n},Qu.prototype._getProjMinMaxOnAxis=function(t,e,r){for(var i=this._axes[t],n=this._origin,o=e[0].dot(i)+n[t],a=o,s=o,h=1;h<e.length;h++)var l=e[h].dot(i)+n[t],a=Xu(l,a),s=Yu(l,s);r[0]=a+Uu.touchThreshold,r[1]=s-Uu.touchThreshold,Uu.negativeSize=r[1]<r[0]},Qu);function Qu(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var r=0;r<4;r++)this._corners[r]=new _e;for(r=0;r<2;r++)this._axes[r]=new _e;t&&this.fromBoundingRect(t,e)}var $u=(Ju.prototype.update=function(t){var e=this.dom.style;e.width=t.width+"px",e.height=t.height+"px",e.left=t.x+"px",e.top=t.y+"px"},Ju.prototype.hide=function(){this.dom.style.opacity="0"},Ju.prototype.show=function(t){var e=this;clearTimeout(this._hideTimeout),this.dom.style.opacity="1",this._hideTimeout=setTimeout(function(){e.hide()},t||1e3)},Ju);function Ju(t){var e=this.dom=document.createElement("div");for(var r in e.className="ec-debug-dirty-rect",t=L({},t),L(t,{backgroundColor:"rgba(0, 0, 255, 0.2)",border:"1px solid #00f"}),e.style.cssText="\nposition: absolute;\nopacity: 0;\ntransition: opacity 0.5s linear;\npointer-events: none;\n",t)t.hasOwnProperty(r)&&(e.style[r]=t[r])}function tc(t){return isFinite(t)}function ec(t,e,r){for(var i,n,o,a,s,h,l,u,c,p,f,d,y,v,g,_,m="radial"===e.type?(u=t,c=e,f=(p=r).width,d=p.height,y=Math.min(f,d),v=null==c.x?.5:c.x,g=null==c.y?.5:c.y,_=null==c.r?.5:c.r,c.global||(v=v*f+p.x,g=g*d+p.y,_*=y),v=tc(v)?v:.5,g=tc(g)?g:.5,_=0<=_&&tc(_)?_:.5,u.createRadialGradient(v,g,0,v,g,_)):(i=t,o=r,a=null==(n=e).x?0:n.x,s=null==n.x2?1:n.x2,h=null==n.y?0:n.y,l=null==n.y2?0:n.y2,n.global||(a=a*o.width+o.x,s=s*o.width+o.x,h=h*o.height+o.y,l=l*o.height+o.y),a=tc(a)?a:0,s=tc(s)?s:1,h=tc(h)?h:0,l=tc(l)?l:0,i.createLinearGradient(a,h,s,l)),x=e.colorStops,w=0;w<x.length;w++)m.addColorStop(x[w].offset,x[w].color);return m}function rc(t){return parseInt(t,10)}function ic(t,e,r){var i=["width","height"][e],n=["clientWidth","clientHeight"][e],o=["paddingLeft","paddingTop"][e],a=["paddingRight","paddingBottom"][e];if(null!=r[i]&&"auto"!==r[i])return parseFloat(r[i]);var s=document.defaultView.getComputedStyle(t);return(t[n]||rc(s[i])||rc(t.style[i]))-(rc(s[o])||0)-(rc(s[a])||0)||0}function nc(t){var e,r,i,n=t.style,o=n.lineDash&&0<n.lineWidth&&(e=n.lineDash,r=n.lineWidth,e&&"solid"!==e&&0<r?"dashed"===e?[4*r,2*r]:"dotted"===e?[r]:X(e)?[e]:G(e)?e:null:null),a=n.lineDashOffset;return!o||(i=n.strokeNoScale&&t.getLineScale?t.getLineScale():1)&&1!==i&&(o=I(o,function(t){return t/i}),a/=i),[o,a]}var oc=new aa(!0);function ac(t){var e=t.stroke;return!(null==e||"none"===e||!(0<t.lineWidth))}function sc(t){return"string"==typeof t&&"none"!==t}function hc(t){var e=t.fill;return null!=e&&"none"!==e}function lc(t,e){var r;null!=e.fillOpacity&&1!==e.fillOpacity?(r=t.globalAlpha,t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=r):t.fill()}function uc(t,e){var r;null!=e.strokeOpacity&&1!==e.strokeOpacity?(r=t.globalAlpha,t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=r):t.stroke()}function cc(t,e,r){var i=Xs(e.image,e.__image,r);if(qs(i)){var n,o=t.createPattern(i,e.repeat||"repeat");return"function"==typeof DOMMatrix&&o&&o.setTransform&&((n=new DOMMatrix).translateSelf(e.x||0,e.y||0),n.rotateSelf(0,0,(e.rotation||0)*yt),n.scaleSelf(e.scaleX||1,e.scaleY||1),o.setTransform(n)),o}}var pc=["shadowBlur","shadowOffsetX","shadowOffsetY"],fc=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function dc(t,e,r,i,n){var o,a=!1;if(!i&&e===(r=r||{}))return!1;!i&&e.opacity===r.opacity||(wc(t,n),a=!0,o=Math.max(Math.min(e.opacity,1),0),t.globalAlpha=isNaN(o)?xo.opacity:o),!i&&e.blend===r.blend||(a||(wc(t,n),a=!0),t.globalCompositeOperation=e.blend||xo.blend);for(var s=0;s<pc.length;s++){var h=pc[s];!i&&e[h]===r[h]||(a||(wc(t,n),a=!0),t[h]=t.dpr*(e[h]||0))}return!i&&e.shadowColor===r.shadowColor||(a||(wc(t,n),a=!0),t.shadowColor=e.shadowColor||xo.shadowColor),a}function yc(t,e,r,i,n){var o=e.style,a=i?null:r&&r.style||{};if(o!==a){var s,h=dc(t,o,a,i,n);!i&&o.fill===a.fill||(h||(wc(t,n),h=!0),sc(o.fill)&&(t.fillStyle=o.fill)),!i&&o.stroke===a.stroke||(h||(wc(t,n),h=!0),sc(o.stroke)&&(t.strokeStyle=o.stroke)),!i&&o.opacity===a.opacity||(h||(wc(t,n),h=!0),t.globalAlpha=null==o.opacity?1:o.opacity),e.hasStroke()&&(s=o.lineWidth/(o.strokeNoScale&&e.getLineScale?e.getLineScale():1),t.lineWidth!==s&&(h||(wc(t,n),h=!0),t.lineWidth=s));for(var l=0;l<fc.length;l++){var u=fc[l],c=u[0];!i&&o[c]===a[c]||(h||(wc(t,n),h=!0),t[c]=o[c]||u[1])}return h}}function vc(t,e){var r=e.transform,i=t.dpr||1;r?t.setTransform(i*r[0],i*r[1],i*r[2],i*r[3],i*r[4],i*r[5]):t.setTransform(i,0,0,i,0,0)}var gc=1,_c=2,mc=3,xc=4;function wc(t,e){e.batchFill&&(e.batchFill=!1,t.fill()),e.batchStroke&&(e.batchStroke=!1,t.stroke())}function bc(t,e,r){var i=e.transform;if(!e.shouldBePainted(r.viewWidth,r.viewHeight,!1,!1))return e.__dirty&=~ur,void(e.__isRendered=!1);var n=e.__clipPaths,o=r.prevElClipPaths,a=e.style,s=!1,h=!1;if(o&&!function(t,e){if(t!==e&&(t||e)){if(!t||!e||t.length!==e.length)return 1;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return 1}}(n,o)||(o&&(wc(t,r),t.restore(),h=s=!0,r.prevElClipPaths=null,r.allClipped=!1,r.prevEl=null),n&&n.length&&(wc(t,r),t.save(),function(t,e,r){for(var i=!1,n=0;n<t.length;n++){var o=t[n],i=i||o.isZeroArea();vc(e,o),e.beginPath(),o.buildPath(e,o.shape),e.clip()}r.allClipped=i}(n,t,r),s=!0,r.prevElClipPaths=n)),r.allClipped)return e.__dirty&=~ur,void(e.__isRendered=!1);e.beforeBrush&&e.beforeBrush(r.beforeBrushParam),e.innerBeforeBrush();var l=r.prevEl;l||(h=s=!0);var u,c,p,f,d,y,v,g,_,m,x,w,b,S,T,k,C,P,M,A,D,z,I,L,R,O,F,B,N=e instanceof Ma&&e.autoBatch&&(c=hc(u=a),p=ac(u),!(u.lineDash||!(+c^+p)||c&&"string"!=typeof u.fill||p&&"string"!=typeof u.stroke||u.strokePercent<1||u.strokeOpacity<1||u.fillOpacity<1));s||(f=i,d=l.transform,f&&d?f[0]!==d[0]||f[1]!==d[1]||f[2]!==d[2]||f[3]!==d[3]||f[4]!==d[4]||f[5]!==d[5]:f||d)?(wc(t,r),vc(t,e)):N||wc(t,r),e instanceof Ma?(r.lastDrawType!==gc&&(h=!0,r.lastDrawType=gc),yc(t,e,l,h,r),N&&(r.batchFill||r.batchStroke)||t.beginPath(),function(t,e,r,i,n){var o,a=ac(r),s=hc(r),h=r.strokePercent,l=h<1,u=!e.path;e.silent&&!l||!u||e.createPathProxy();var c,p,f,d,y,v,g,_,m,x,w,b=e.path||oc,S=e.__dirty;i||(c=r.fill,p=r.stroke,f=s&&!!c.colorStops,d=a&&!!p.colorStops,y=s&&!!c.image,v=a&&!!p.image,w=x=m=_=g=void 0,(f||d)&&(w=e.getBoundingRect()),f&&(g=S?ec(t,c,w):e.__canvasFillGradient,e.__canvasFillGradient=g),d&&(_=S?ec(t,p,w):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),y&&(m=S||!e.__canvasFillPattern?cc(t,c,e):e.__canvasFillPattern,e.__canvasFillPattern=m),v&&(x=S||!e.__canvasStrokePattern?cc(t,p,e):e.__canvasStrokePattern,e.__canvasStrokePattern=x),f?t.fillStyle=g:y&&(m?t.fillStyle=m:s=!1),d?t.strokeStyle=_:v&&(x?t.strokeStyle=x:a=!1));var T,k,C=e.getGlobalScale();b.setScale(C[0],C[1],e.segmentIgnoreThreshold),t.setLineDash&&r.lineDash&&(T=(o=nc(e))[0],k=o[1]);var P=!0;(u||S&cr)&&(b.setDPR(t.dpr),l?b.setContext(null):(b.setContext(t),P=!1),b.reset(),e.buildPath(b,e.shape,i),b.toStatic(),e.pathUpdated()),P&&b.rebuildPath(t,l?h:1),T&&(t.setLineDash(T),t.lineDashOffset=k),i?(n.batchFill=s,n.batchStroke=a):r.strokeFirst?(a&&uc(t,r),s&&lc(t,r)):(s&&lc(t,r),a&&uc(t,r)),T&&t.setLineDash([])}(t,e,a,N,r)):e instanceof uh?(r.lastDrawType!==mc&&(h=!0,r.lastDrawType=mc),yc(t,e,l,h,r),z=t,I=e,null!=(B=(L=a).text)&&(B+=""),B&&(z.font=L.font||H,z.textAlign=L.textAlign,z.textBaseline=L.textBaseline,F=O=void 0,z.setLineDash&&L.lineDash&&(O=(R=nc(I))[0],F=R[1]),O&&(z.setLineDash(O),z.lineDashOffset=F),L.strokeFirst?(ac(L)&&z.strokeText(B,L.x,L.y),hc(L)&&z.fillText(B,L.x,L.y)):(hc(L)&&z.fillText(B,L.x,L.y),ac(L)&&z.strokeText(B,L.x,L.y)),O&&z.setLineDash([]))):e instanceof rs?(r.lastDrawType!==_c&&(h=!0,r.lastDrawType=_c),M=l,A=h,D=r,dc(t,e.style,M&&M.style,A,D),y=t,g=a,(P=(v=e).__image=Xs(g.image,v.__image,v,v.onload))&&qs(P)&&(_=g.x||0,m=g.y||0,x=v.getWidth(),w=v.getHeight(),b=P.width/P.height,null==x&&null!=w?x=w*b:null==w&&null!=x?w=x/b:null==x&&null==w&&(x=P.width,w=P.height),g.sWidth&&g.sHeight?(S=g.sx||0,T=g.sy||0,y.drawImage(P,S,T,g.sWidth,g.sHeight,_,m,x,w)):g.sx&&g.sy?(k=x-(S=g.sx),C=w-(T=g.sy),y.drawImage(P,S,T,k,C,_,m,x,w)):y.drawImage(P,_,m,x,w))):e.getTemporalDisplayables&&(r.lastDrawType!==xc&&(h=!0,r.lastDrawType=xc),function(t,e,r){var i=e.getDisplayables(),n=e.getTemporalDisplayables();t.save();var o,a,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:r.viewWidth,viewHeight:r.viewHeight,inHover:r.inHover,beforeBrushParam:{}};for(o=e.getCursor(),a=i.length;o<a;o++){(u=i[o]).beforeBrush&&u.beforeBrush(r.beforeBrushParam),u.innerBeforeBrush(),bc(t,u,s),u.innerAfterBrush(),u.afterBrush&&u.afterBrush(),s.prevEl=u}Sc(t,s);for(var h=0,l=n.length;h<l;h++){var u;(u=n[h]).beforeBrush&&u.beforeBrush(r.beforeBrushParam),u.innerBeforeBrush(),bc(t,u,s),u.innerAfterBrush(),u.afterBrush&&u.afterBrush(),s.prevEl=u}Sc(t,s),e.clearTemporalDisplayables(),e.notClear=!0,t.restore()}(t,e,r)),e.innerAfterBrush(),e.afterBrush&&(N&&wc(t,r),e.afterBrush()),(r.prevEl=e).__dirty=0,e.__isRendered=!0}function Sc(t,e){wc(t,e),e.prevElClipPaths&&t.restore()}function Tc(t,e,r){var i=d.createCanvas(),n=e.getWidth(),o=e.getHeight(),a=i.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=n+"px",a.height=o+"px",i.setAttribute("data-zr-dom-id",t)),i.width=n*r,i.height=o*r,i}function kc(t){return!t.__cursors.get(0)}function Cc(t){var e=t.__cursors.get(0);return{startIdx:e?e.startIdx:0,endIdx:e?e.endIdx:0}}var Pc,Mc=(mt(Ac,Pc=Et),Ac.prototype.afterBrush=function(){this.__prevIdx=Cc(this)},Ac.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},Ac.prototype.setUnpainted=function(){this.__firstTimePaint=!0},Ac.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=Tc("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},Ac.prototype.createRepaintRects=function(t,e,r,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var c=[],p=this.maxRepaintRectCount,f=!1,d=new Le(0,0,0,0);function n(t){if(t.isFinite()&&!t.isZero())if(0===c.length)(e=new Le(0,0,0,0)).copy(t),c.push(e);else{for(var e,r=!1,i=1/0,n=0,o=0;o<c.length;++o){var a,s,h,l=c[o];if(l.intersect(t)){var u=new Le(0,0,0,0);u.copy(l),u.union(t),c[o]=u,r=!0;break}f&&(d.copy(t),d.union(l),a=t.width*t.height,s=l.width*l.height,(h=d.width*d.height-a-s)<i&&(i=h,n=o))}f&&(c[n].union(t),r=!0),r||((e=new Le(0,0,0,0)).copy(t),c.push(e)),f=f||c.length>=p}}for(var o,a=Cc(this),s=a.startIdx;s<a.endIdx;++s)(u=t[s])&&(v=u.shouldBePainted(r,i,!0,!0),(y=u.__isRendered&&(u.__dirty&ur||!v)?u.getPrevPaintRect():null)&&n(y),(o=v&&(u.__dirty&ur||!u.__isRendered)?u.getPaintRect():null)&&n(o));for(var h,l=this.__prevIdx,s=l.startIdx;s<l.endIdx;++s){var u,y,v=(u=e[s])&&u.shouldBePainted(r,i,!0,!0);!u||v&&u.__zr||!u.__isRendered||(y=u.getPrevPaintRect())&&n(y)}do{for(h=!1,s=0;s<c.length;)if(c[s].isZero())c.splice(s,1);else{for(var g=s+1;g<c.length;)c[s].intersect(c[g])?(h=!0,c[s].union(c[g]),c.splice(g,1)):g++;s++}}while(h);return this._paintRects=c},Ac.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},Ac.prototype.resize=function(t,e){var r=this.dpr,i=this.dom,n=i.style,o=this.domBack;n&&(n.width=t+"px",n.height=e+"px"),i.width=t*r,i.height=e*r,o&&(o.width=t*r,o.height=e*r,1!==r&&this.ctxBack.scale(r,r))},Ac.prototype.clear=function(t,o,e){var r=this.dom,a=this.ctx,i=r.width,n=r.height;o=o||this.clearColor;var s=this.motionBlur&&!t,h=this.lastFrameAlpha,l=this.dpr,u=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(r,0,0,i/l,n/l));var c=this.domBack;function p(t,e,r,i){var n;a.clearRect(t,e,r,i),o&&"transparent"!==o&&(n=void 0,U(o)?(n=(o.global||o.__width===r&&o.__height===i)&&o.__canvasGradient||ec(a,o,{x:0,y:0,width:r,height:i}),o.__canvasGradient=n,o.__width=r,o.__height=i):Z(o)&&(o.scaleX=o.scaleX||l,o.scaleY=o.scaleY||l,n=cc(a,o,{dirty:function(){u.setUnpainted(),u.painter.refresh()}})),a.save(),a.fillStyle=n||o,a.fillRect(t,e,r,i),a.restore()),s&&(a.save(),a.globalAlpha=h,a.drawImage(c,t,e,r,i),a.restore())}!e||s?p(0,0,i,n):e.length&&R(e,function(t){p(t.x*l,t.y*l,t.width*l,t.height*l)})},Ac);function Ac(t,e,r){var i,n=Pc.call(this)||this;n.motionBlur=!1,n.lastFrameAlpha=.7,n.dpr=1,n.virtual=!1,n.config={},n.zlevel=0,n.zlevel2=0,n.maxRepaintRectCount=5,n.__dirty=!0,n.__firstTimePaint=!0,n.__prevIdx={startIdx:0,endIdx:0},r=r||wn,"string"==typeof t?i=Tc(t,e,r):Y(t)&&(t=(i=t).id),n.id=t;var o=(n.dom=i).style;return o&&(pt(i),i.onselectstart=function(){return!1},o.padding="0",o.margin="0",o.borderWidth="0"),n.painter=e,n.dpr=r,n}var Dc=314159,zc=void 0;function Ic(t,e,r,i){var n=new Mc(t,e,e.dpr);return n.zlevel=r,n.zlevel2=i,n.__builtin__=!0,Lc(n),n}function Lc(t){t.__cursorStack=[],t.__cursors=ut()}function Rc(t,e){for(var r=t.__cursorStack,i=0;i<r.length;i++)e(t.__cursors.get(r[i]))}function Oc(t,e){var r=t.layers;return r[e]||(r[e]=new Array(3))}function Fc(t,e,r){for(var i=t.layerStack,n=0;n<i.length;n++){var o=i[n].zl,a=i[n].zl2,s=t.layers[o][a];r&&(1&r&&!s.__builtin__||2&r&&s.__builtin__||4&r&&s===t.hoverlayer)||e(s,o,a,n)}}var Bc=(Nc.prototype.getType=function(){return"canvas"},Nc.prototype.isSingleCanvas=function(){return this._singleCanvas},Nc.prototype.getViewportRoot=function(){return this._domRoot},Nc.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},Nc.prototype.refresh=function(t){var e=t&&!Y(t)?{paintAll:!!t}:t||{},r=Q(e.refresh,!0),i=Q(e.refreshHover,!1);if(i&&(this._hoverLayerDirty=2),!r)return i&&this._paintHoverList(this.storage.getDisplayList(!1)),this;var n=this.storage.getDisplayList(!0);this._updateLayerStatus(n,e.paintAll),this._redrawId=Math.random();var o=this._prevDisplayList;this._paintList(n,o,this._redrawId);var a=this._backgroundColor;return Fc(this._i,function(t,e,r,i){t.refresh&&t.refresh(0===i?a:null)},2),this._opts.useDirtyRect&&(this._prevDisplayList=n.slice()),this},Nc.prototype._paintHoverList=function(t){var e=this._i.hoverlayer,r=this._hoverLayerDirty;if(r!==(this._hoverLayerDirty=zc)&&(e||2!==r||(e=this._i.hoverlayer=this._ensureLayer(1e5)),e)){e.clear();for(var i,n={inHover:!0,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},o=0,a=t.length;o<a;o++){var s,h,l=t[o];l.__inHover&&(i||(i=e.ctx).save(),h=void 0,(s=l.__hoverStyle)&&(h=l.style,l.style=s),bc(i,l,n),s&&(l.style=h))}i&&(Sc(i,n),i.restore())}},Nc.prototype.getHoverLayer=function(){return this._ensureLayer(1e5)},Nc.prototype.paintOne=function(t,e){var r,i;bc(r=t,e,i={inHover:!1,viewWidth:0,viewHeight:0,beforeBrushParam:{}}),Sc(r,i)},Nc.prototype._paintList=function(t,e,r){var i,n;this._redrawId===r&&(i=this._doPaintList(t,e),this._needsManuallyCompositing&&this._compositeManually(),i?(Fc(this._i,function(t){t.afterBrush&&t.afterBrush()},5),this._paintHoverList(t)):(n=this,gr(function(){n._paintList(t,e,r)})))},Nc.prototype._compositeManually=function(){var e=this._ensureLayer(Dc).ctx,r=this._domRoot.width,i=this._domRoot.height;e.clearRect(0,0,r,i),Fc(this._i,function(t){t.virtual&&e.drawImage(t.dom,0,0,r,i)},1)},Nc.prototype._doPaintList=function(a,s){var h=this,l=!0;return Fc(this._i,function(r){var i,t,n,e,o=!1;Rc(r,function(t){(t.drawIdx<t.endIdx||0<=t.notClearIdx)&&(o=!0)}),(o||r.__dirty)&&(i=h._opts.useDirtyRect&&!kc(r)?r.createRepaintRects(a,s,h._width,h._height):null,t=h._i.layerStack[0],n=!0,r.__dirty&&(n=!1,r.__dirty=!1,e=r.zlevel===t.zl&&r.zlevel2===t.zl2?h._backgroundColor:null,r.clear(!1,e,i)),Rc(r,function(t){var e=h._paintPerCursor(r,t,a,i,n);l=l&&e}))},5),c.wxa&&Fc(this._i,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),l},Nc.prototype._paintPerCursor=function(t,e,r,i,n){var o=t.ctx;if(i)if(i.length)for(var a=this.dpr,s=0;s<i.length;++s){var h=i[s];o.save(),o.beginPath(),o.rect(h.x*a,h.y*a,h.width*a,h.height*a),o.clip(),this._paintPerCursorInRect(t,e,r,h,n),o.restore()}else e.drawIdx=e.endIdx;else o.save(),this._paintPerCursorInRect(t,e,r,null,n),o.restore();return e.drawIdx>=e.endIdx},Nc.prototype._paintPerCursorInRect=function(t,e,r,i,n){for(var o={inHover:!1,allClipped:!1,prevEl:null,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{contentRetained:n}},a=t.ctx,s=kc(t),h=s&&d.getTime(),l=e.drawIdx,u=e.notClearIdx,c=0<=u?Math.min(u,l):l;c<e.endIdx;c++){var p,f=r[c];if((!(c<l)||f.notClear)&&(f.__inHover&&(this._hoverLayerDirty=2),null!=i?(p=f.getPaintRect())&&p.intersect(i)&&(bc(a,f,o),f.setPrevPaintRect(p)):bc(a,f,o),s&&15<d.getTime()-h)){c++;break}}Sc(a,o),e.drawIdx=Math.max(c,l)},Nc.prototype.getLayer=function(t,e){return this._ensureLayer(t,0,e)},Nc.prototype._ensureLayer=function(t,e,r){e=e||0;var i=this._singleCanvas;i&&!this._needsManuallyCompositing&&(t=Dc,e=0);var n=Oc(this._i,t)[e];return n||(n=Ic("zr_"+t+"."+e,this,t,e),this._layerConfig[t]&&T(n,this._layerConfig[t],!0),(r||i&&t!==Dc)&&(n.virtual=!0),this._insertLayer(n,t,e,!1),n.initContext()),n},Nc.prototype.insertLayer=function(t,e){this._insertLayer(e,t,0,!1)},Nc.prototype._insertLayer=function(t,e,r,i){var n=this._i,o=n.layers,a=n.layerStack,s=this._domRoot,h=null;if((!o[e]||!o[e][r])&&function(t){if(t){if(t.__builtin__)return 1;if("function"==typeof t.resize&&"function"==typeof t.refresh)return 1}}(t)){for(var l,u=a.length,c=0;c<u&&(a[c].zl<e||a[c].zl===e&&a[c].zl2<r);)c++;0<c&&(h=Oc(n,a[c-1].zl)[a[c-1].zl2]),a.splice(c,0,{zl:e,zl2:r}),Oc(n,e)[r]=t,i||t.virtual||(h?(l=h.dom).nextSibling?s.insertBefore(t.dom,l.nextSibling):s.appendChild(t.dom):s.firstChild?s.insertBefore(t.dom,s.firstChild):s.appendChild(t.dom)),t.painter||(t.painter=this)}},Nc.prototype.eachLayer=function(r,i){return Fc(this._i,function(t,e){r.call(i,t,e)})},Nc.prototype.eachBuiltinLayer=function(r,i){return Fc(this._i,function(t,e){r.call(i,t,e)},1)},Nc.prototype.eachOtherLayer=function(r,i){return Fc(this._i,function(t,e){r.call(i,t,e)},2)},Nc.prototype.getLayers=function(){var i={};return Fc(this._i,function(t,e,r){i[t.id]=t}),i},Nc.prototype._updateLayerStatus=function(a,t){var e,s=this;if(s._singleCanvas)for(var r=1;r<a.length;r++)if((y=a[r]).zlevel!==a[r-1].zlevel||y.incremental){s._needsManuallyCompositing=!0;break}Fc(s._i,function(t){t.__dirty=!1,Rc(t,function(t){t.used=!1,t.endIdxNew=0,t.notClearIdx=-1})},5);for(var i,n,o,h,l,u=null,c=null,p=!1,f=0,d=a.length;f<d;f++){var y,v,g=(y=a[f]).zlevel,_=y.incremental,m=void 0;e!==g&&(e=g,p=!1),m=_?(p=!0,1):p?2:0,u&&g===u.zlevel&&m===u.zlevel2||(c=null,(u=s._ensureLayer(g,m)).__builtin__)?(c&&_===c.key||(n=_,l=h=o=void 0,h=(i=u).__cursors,l=+n,(c=h.get(l)||(i.__cursorStack.push(l),h.set(l,((o={key:l}).startIdx=o.drawIdx=o.endIdx=o.endIdxNew=0,o.used=!1,o.first=o.last=NaN,o.notClearIdx=-1,o)))).used||(c.used=!0,t||c.first!==y.id?(u.__dirty=!0,c.first=y.id,c.startIdx=c.drawIdx=f,c.endIdx=f+1):(v=f-c.startIdx,c.startIdx=f,c.drawIdx+=v,c.endIdx+=v))),c.endIdxNew=f+1,y.__dirty&ur&&!y.__inHover&&((!_||!y.notClear&&f<c.drawIdx)&&(u.__dirty=!0),_&&y.notClear&&c.notClearIdx<0&&(c.notClearIdx=f))):S("ZLevel "+g+" has been used by unknown layer "+u.id)}Fc(s._i,function(t){for(var e=t.__cursorStack,r=t.__cursors,i=e.length-1;0<=i;i--){var n,o=r.get(e[i]);o.used?(n=o.endIdxNew,(kc(t)?n<o.drawIdx:n!==o.endIdx||!n||a[n-1].id!==o.last)&&(t.__dirty=!0),o.endIdx=o.endIdxNew,o.last=n?a[n-1].id:NaN):(t.__dirty=!0,r.removeKey(e[i]),e.splice(i,1))}t.__dirty&&(Rc(t,function(t){t.drawIdx=t.startIdx}),s._hoverLayerDirty===zc&&(s._hoverLayerDirty=1))},5)},Nc.prototype.clear=function(){return Fc(this._i,function(t){t.clear(),Lc(t)},1),this},Nc.prototype.setBackgroundColor=function(t){this._backgroundColor=t,Fc(this._i,function(t){t.setUnpainted()})},Nc.prototype.configLayer=function(t,e){var r;e&&((r=this._layerConfig)[t]?T(r[t],e,!0):r[t]=e,Fc(this._i,function(t,e){T(t,r[e],!0)}))},Nc.prototype.delLayer=function(t){for(var e=this._i.layerStack,r=this._i.layers,i=e.length-1;0<=i;i--){var n=e[i];if(n.zl===t){var o,a=r[t][n.zl2];if(a.__builtin__)continue;e.splice(i,1),r[t][n.zl2]=void 0,a.virtual||(o=a.dom.parentNode)&&o.removeChild(a.dom)}}},Nc.prototype.resize=function(e,r){if(this._domRoot.style){var t=this._domRoot;t.style.display="none";var i=this._opts,n=this.root;null!=e&&(i.width=e),null!=r&&(i.height=r),e=ic(n,0,i),r=ic(n,1,i),t.style.display="",this._width===e&&r===this._height||(t.style.width=e+"px",t.style.height=r+"px",Fc(this._i,function(t){t.resize(e,r)}),this.refresh({paintAll:!0})),this._width=e,this._height=r}else{if(null==e||null==r)return;this._width=e,this._height=r,this._ensureLayer(Dc).resize(e,r)}return this},Nc.prototype.clearLayer=function(t){R(this._i.layers[t],function(t){t&&!t.__builtin__&&t.clear()})},Nc.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._i=null},Nc.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._i.layers[Dc][0].dom;var e=new Mc("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor);var r=e.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,n=e.dom.height;Fc(this._i,function(t){t.__builtin__?r.drawImage(t.dom,0,0,i,n):t.renderToCanvas&&(r.save(),t.renderToCanvas(r),r.restore())})}else{for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height,beforeBrushParam:{}},a=this.storage.getDisplayList(!0),s=0,h=a.length;s<h;s++){var l=a[s];bc(r,l,o)}Sc(r,o)}return e.dom},Nc.prototype.getWidth=function(){return this._width},Nc.prototype.getHeight=function(){return this._height},Nc);function Nc(t,e,r,i){this.type="canvas",this._prevDisplayList=[],this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas",this._i={layerStack:[],layers:[]};var n,o,a,s,h,l,u,c,p=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=r=L({},r||{}),this.dpr=r.devicePixelRatio||wn,this._singleCanvas=p,(this.root=t).style&&(pt(t),t.innerHTML=""),this.storage=e,this._prevDisplayList=[],p?(o=(n=t).width,a=n.height,null!=r.width&&(o=r.width),null!=r.height&&(a=r.height),this.dpr=r.devicePixelRatio||1,n.width=o*this.dpr,n.height=a*this.dpr,this._width=o,this._height=a,(s=Ic(n,this,Dc,0)).initContext(),this._insertLayer(s,Dc,0,!0),this._domRoot=t):(this._width=ic(t,0,r),this._height=ic(t,1,r),h=this._domRoot=(l=this._width,u=this._height,(c=document.createElement("div")).style.cssText=["position:relative","width:"+l+"px","height:"+u+"px","padding:0","margin:0","border-width:0"].join(";")+";",c),t.appendChild(h))}var Hc=Math.sin,Wc=Math.cos,Ec=Math.PI,Xc=2*Math.PI,Yc=180/Ec,qc=(jc.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},jc.prototype.moveTo=function(t,e){this._add("M",t,e)},jc.prototype.lineTo=function(t,e){this._add("L",t,e)},jc.prototype.bezierCurveTo=function(t,e,r,i,n,o){this._add("C",t,e,r,i,n,o)},jc.prototype.quadraticCurveTo=function(t,e,r,i){this._add("Q",t,e,r,i)},jc.prototype.arc=function(t,e,r,i,n,o){this.ellipse(t,e,r,r,0,i,n,o)},jc.prototype.ellipse=function(t,e,r,i,n,o,a,s){var h=a-o,l=!s,u=Math.abs(h),c=wi(u-Xc)||(l?Xc<=h:Xc<=-h),p=!1,p=!!c||!wi(u)&&Ec<=(0<h?h%Xc:h%Xc+Xc)==!!l,f=t+r*Wc(o),d=e+i*Hc(o);this._start&&this._add("M",f,d);var y,v,g,_,m=Math.round(n*Yc);c?(y=1/this._p,v=(l?1:-1)*(Xc-y),this._add("A",r,i,m,1,+l,t+r*Wc(o+v),e+i*Hc(o+v)),.01<y&&this._add("A",r,i,m,0,+l,f,d)):(g=t+r*Wc(a),_=e+i*Hc(a),this._add("A",r,i,m,+p,+l,g,_))},jc.prototype.rect=function(t,e,r,i){this._add("M",t,e),this._add("l",r,0),this._add("l",0,i),this._add("l",-r,0),this._add("Z")},jc.prototype.closePath=function(){0<this._d.length&&this._add("Z")},jc.prototype._add=function(t,e,r,i,n,o,a,s,h){for(var l=[],u=this._p,c=1;c<arguments.length;c++){var p=arguments[c];if(isNaN(p))return void(this._invalid=!0);l.push(Math.round(p*u)/u)}this._d.push(t+l.join(" ")),this._start="Z"===t},jc.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},jc.prototype.getStr=function(){return this._str},jc);function jc(){}var Vc="none",Uc=Math.round;var Gc=["lineCap","miterLimit","lineJoin"],Zc=I(Gc,function(t){return"stroke-"+t.toLowerCase()});function Kc(t,e,r,i){var n,o,a,s,h=null==e.opacity?1:e.opacity;if(r instanceof rs)t("opacity",h);else if(null!=(a=e.fill)&&a!==Vc?(t("fill",(n=mi(e.fill)).color),o=null!=e.fillOpacity?e.fillOpacity*n.opacity*h:n.opacity*h,(i||o<1)&&t("fill-opacity",o)):t("fill",Vc),null!=(s=e.stroke)&&s!==Vc){var l=mi(e.stroke);t("stroke",l.color);var u,c,p,f=e.strokeNoScale?r.getLineScale():1,d=f?(e.lineWidth||0)/f:0,y=null!=e.strokeOpacity?e.strokeOpacity*l.opacity*h:l.opacity*h,v=e.strokeFirst;!i&&1==d||t("stroke-width",d),(i||v)&&t("paint-order",v?"stroke":"fill"),(i||y<1)&&t("stroke-opacity",y),e.lineDash?(c=(u=nc(r))[0],p=u[1],c&&(p=Uc(p||0),t("stroke-dasharray",c.join(",")),(p||i)&&t("stroke-dashoffset",p))):i&&t("stroke-dasharray",Vc);for(var g=0;g<Gc.length;g++){var _,m=Gc[g];!i&&e[m]===ka[m]||(_=e[m]||ka[m])&&t(Zc[g],_)}}else i&&t("stroke",Vc)}var Qc="http://www.w3.org/2000/svg",$c="http://www.w3.org/1999/xlink",Jc="http://www.w3.org/2000/xmlns/",tp="http://www.w3.org/XML/1998/namespace",ep="ecmeta_";function rp(t){return document.createElementNS(Qc,t)}function ip(t,e,r,i,n){return{tag:t,attrs:r||{},children:i,text:n,key:e}}function np(t,e){var s=(e=e||{}).newline?"\n":"";return function t(e){var r,i=e.children,n=e.tag,o=e.attrs,a=e.text;return function(t,e){var r=[];if(e)for(var i in e){var n=e[i],o=i;!1!==n&&(!0!==n&&null!=n&&(o+='="'+n+'"'),r.push(o))}return"<"+t+" "+r.join(" ")+">"}(n,o)+("style"!==n?null==(r=a)?"":(r+"").replace(Zt,function(t,e){return Kt[e]}):a||"")+(i?""+s+I(i,t).join(s)+s:"")+"</"+n+">"}(t)}function op(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function ap(t,e,r,i){return ip("svg","root",{width:t,height:e,xmlns:Qc,"xmlns:xlink":$c,version:"1.1",baseProfile:"full",viewBox:!!i&&"0 0 "+t+" "+e},r)}var sp=0;function hp(){return sp++}var lp={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"},up="transform-origin";var cp={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function pp(t,e){var r=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[r]=t,r}function fp(t){return E(t)?lp[t]?"cubic-bezier("+lp[t]+")":Wr(t)?t:"":""}function dp(A,D,z,I){var t=A.animators,e=t.length,r=[];if(A instanceof bl){if(i=function(t,e,c){var p,f,r=t.shape.paths,d={};if(R(r,function(t){var e=op(c.zrId);e.animation=!0,dp(t,{},e,!0);var r=e.cssAnims,i=e.cssNodes,n=B(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=pp(d,c);return p.replace(f,i)}}(A,D,z))r.push(i);else if(!e)return}else if(!e)return;for(var i,n,o={},a=0;a<e;a++){var s=t[a],h=[s.getMaxTime()/1e3+"s"],l=fp(s.getClip().easing),u=s.getDelay();l?h.push(l):h.push("linear"),u&&h.push(u/1e3+"s"),s.getLoop()&&h.push("infinite");var c=h.join(" ");o[c]=o[c]||[c,[]],o[c][1].push(s)}function p(t){var e=t[1],r=e.length,i={},n={},o={},d="animation-timing-function";function a(t,e,r){for(var i=t.getTracks(),n=t.getMaxTime(),o=0;o<i.length;o++){var a=i[o];if(a.needsAnimate()){var s=a.keyframes,h=a.propName;if(r&&(h=r(h)),h)for(var l=0;l<s.length;l++){var u=s[l],c=Math.round(u.time/n*100)+"%",p=fp(u.easing),f=u.rawValue;(E(f)||X(f))&&(e[c]=e[c]||{},e[c][h]=u.rawValue,p&&(e[c][d]=p))}}}}for(var s,h,l,u,c,p=0;p<r;p++){(S=(b=e[p]).targetName)?"shape"===S&&a(b,n):I||a(b,i)}for(var f in i){var y={};Fn(y,A),L(y,i[f]);var v=Ii(y),g=i[f][d];o[f]=v?{transform:v}:{},s=o[f],u=l=void 0,l=(h=y).originX,u=h.originY,(l||u)&&(s[up]=l+"px "+u+"px"),g&&(o[f][d]=g)}var _=!0;for(var f in n){o[f]=o[f]||{};var m=!c,g=n[f][d];m&&(c=new aa);var x=c.len();c.reset(),o[f].d=function(t,e,r){var i=L({},t.shape);L(i,e),t.buildPath(r,i);var n=new qc;return n.reset(zi(t)),r.rebuildPath(n,1),n.generateStr(),n.getStr()}(A,n[f],c);var w=c.len();if(!m&&x!==w){_=!1;break}g&&(o[f][d]=g)}if(!_)for(var f in o)delete o[f].d;if(!I)for(var b,S,p=0;p<r;p++){"style"===(S=(b=e[p]).targetName)&&a(b,o,function(t){return cp[t]})}for(var T,k=B(o),C=!0,p=1;p<k.length;p++){var P=k[p-1],M=k[p];if(o[P][up]!==o[M][up]){C=!1;break}T=o[P][up]}if(C&&T){for(var f in o)o[f][up]&&delete o[f][up];D[up]=T}if(F(k,function(t){return 0<B(o[t]).length}).length)return pp(o,z)+" "+t[0]+" both"}for(var f in o){(i=p(o[f]))&&r.push(i)}r.length&&(n=z.zrId+"-cls-"+hp(),z.cssNodes["."+n]={animation:r.join(",")},D.class=n)}function yp(t,e,r,i){var n=JSON.stringify(t),o=r.cssStyleCache[n];o||(o=r.zrId+"-cls-"+hp(),r.cssStyleCache[n]=o,r.cssNodes["."+o+(i?":hover":"")]=t),e.class=e.class?e.class+" "+o:o}var vp=Math.round;function gp(t){return t&&E(t.src)}function _p(t){return t&&W(t.toDataURL)}function mp(i,n,o,a){Kc(function(t,e){var r="fill"===t||"stroke"===t;r&&Ai(e)?Ap(n,i,t,a):r&&Ci(e)?Dp(o,i,t,a):i[t]=e,r&&a.ssr&&"none"===e&&(i["pointer-events"]="visible")},n,o,!1),function(t,e,r){var i=t.style;if(function(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}(i)){var n=function(t){var e=t.style,r=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),r[0],r[1]].join(",")}(t),o=r.shadowCache,a=o[n];if(!a){var s=t.getGlobalScale(),h=s[0],l=s[1];if(!h||!l)return;var u=i.shadowOffsetX||0,c=i.shadowOffsetY||0,p=i.shadowBlur,f=mi(i.shadowColor),d=f.opacity,y=f.color,v=p/2/h+" "+p/2/l;a=r.zrId+"-s"+r.shadowIdx++,r.defs[a]=ip("filter",a,{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},[ip("feDropShadow","",{dx:u/h,dy:c/l,stdDeviation:v,"flood-color":y,"flood-opacity":d})]),o[n]=a}e.filter=Di(a)}}(o,i,a)}function xp(r,t){var e=_o(t);e&&(e.each(function(t,e){null!=t&&(r[(ep+e).toLowerCase()]=t+"")}),t.isSilent()&&(r[ep+"silent"]="true"))}function wp(t){return wi(t[0]-1)&&wi(t[1])&&wi(t[2])&&wi(t[3]-1)}function bp(t,e,r){var i,n,o;!e||wi((o=e)[4])&&wi(o[5])&&wp(e)||(i=r?10:1e4,t.transform=wp(e)?"translate("+vp(e[4]*i)/i+" "+vp(e[5]*i)/i+")":"matrix("+bi((n=e)[0])+","+bi(n[1])+","+bi(n[2])+","+bi(n[3])+","+Si(n[4])+","+Si(n[5])+")")}function Sp(t,e,r){for(var i=t.points,n=[],o=0;o<i.length;o++)n.push(vp(i[o][0]*r)/r),n.push(vp(i[o][1]*r)/r);e.points=n.join(" ")}function Tp(t){return!t.smooth}var kp,Cp={circle:[(kp=I(["cx","cy","r"],function(t){return"string"==typeof t?[t,t]:t}),function(t,e,r){for(var i=0;i<kp.length;i++){var n=kp[i],o=t[n[0]];null!=o&&(e[n[1]]=vp(o*r)/r)}})],polyline:[Sp,Tp],polygon:[Sp,Tp]};function Pp(t,e){var r,i,n,o,a,s,h,l,u,c,p,f,d,y,v,g,_=t.style,m=t.shape,x=Cp[t.type],w={},b=e.animation,S="path",T=t.style.strokePercent,k=e.compress&&zi(t)||4;return!x||e.willUpdate||x[1]&&!x[1](m)||b&&function(t){for(var e=t.animators,r=0;r<e.length;r++)if("shape"===e[r].targetName)return 1}(t)||T<1?(r=!t.path||t.shapeChanged(),t.path||t.createPathProxy(),i=t.path,r&&(i.beginPath(),t.buildPath(i,t.shape),t.pathUpdated()),n=i.getVersion(),a=(o=t).__svgPathBuilder,o.__svgPathVersion===n&&a&&T===o.__svgPathStrokePercent||((a=a||(o.__svgPathBuilder=new qc)).reset(k),i.rebuildPath(a,T),a.generateStr(),o.__svgPathVersion=n,o.__svgPathStrokePercent=T),w.d=a.getStr()):(S=t.type,s=Math.pow(10,k),x[0](m,w,s)),bp(w,t.transform),mp(w,_,t,e),xp(w,t),e.animation&&dp(t,w,e),e.emphasis&&(l=w,u=e,(h=t).ignore||(h.isSilent()?yp(g={"pointer-events":"none"},l,u,!0):((p=(c=h.states.emphasis&&h.states.emphasis.style?h.states.emphasis.style:{}).fill)||(f=h.style&&h.style.fill,d=h.states.select&&h.states.select.style&&h.states.select.style.fill,(y=0<=h.currentStates.indexOf("select")&&d||f)&&(p=vi(y))),(v=c.lineWidth)&&(v/=!c.strokeNoScale&&h.transform?h.transform[0]:1),g={cursor:"pointer"},p&&(g.fill=p),c.stroke&&(g.stroke=c.stroke),v&&(g["stroke-width"]=v),yp(g,l,u,!0)))),ip(S,t.id+"",w)}function Mp(t,e){return t instanceof Ma?Pp(t,e):t instanceof rs?function(t,e){var r=t.style,i=r.image;if(i&&!E(i)&&(gp(i)?i=i.src:_p(i)&&(i=i.toDataURL())),i){var n=r.x||0,o=r.y||0,a={href:i,width:r.width,height:r.height};return n&&(a.x=n),o&&(a.y=o),bp(a,t.transform),mp(a,r,t,e),xp(a,t),e.animation&&dp(t,a,e),ip("image",t.id+"",a)}}(t,e):t instanceof uh?function(t,e){var r=t.style,i=r.text;if(null!=i&&(i+=""),i&&!isNaN(r.x)&&!isNaN(r.y)){var n,o,a,s=r.font||H,h=r.x||0,l=(n=r.y||0,o=qn(s),"top"===(a=r.textBaseline)?n+=o/2:"bottom"===a&&(n-=o/2),n),u={"dominant-baseline":"central","text-anchor":Ti[r.textAlign]||r.textAlign};if(Hl(r)){var c="",p=r.fontStyle,f=Bl(r.fontSize);if(!parseFloat(f))return;var d=r.fontFamily||v,y=r.fontWeight;c+="font-size:"+f+";font-family:"+d+";",p&&"normal"!==p&&(c+="font-style:"+p+";"),y&&"normal"!==y&&(c+="font-weight:"+y+";"),u.style=c}else u.style="font: "+s;return i.match(/\s/)&&(u["xml:space"]="preserve"),h&&(u.x=h),l&&(u.y=l),bp(u,t.transform),mp(u,r,t,e),xp(u,t),e.animation&&dp(t,u,e),ip("text",t.id+"",u,void 0,i)}}(t,e):void 0}function Ap(t,e,r,i){var n,o=t[r],a={gradientUnits:o.global?"userSpaceOnUse":"objectBoundingBox"};if(Pi(o))n="linearGradient",a.x1=o.x,a.y1=o.y,a.x2=o.x2,a.y2=o.y2;else{if(!Mi(o))return;n="radialGradient",a.cx=Q(o.x,.5),a.cy=Q(o.y,.5),a.r=Q(o.r,.5)}for(var s=o.colorStops,h=[],l=0,u=s.length;l<u;++l){var c=100*Si(s[l].offset)+"%",p=mi(s[l].color),f=p.color,d=p.opacity,y={offset:c};y["stop-color"]=f,d<1&&(y["stop-opacity"]=d),h.push(ip("stop",l+"",y))}var v=np(ip(n,"",a,h)),g=i.gradientCache,_=g[v];_||(_=i.zrId+"-g"+i.gradientIdx++,g[v]=_,a.id=_,i.defs[_]=ip(n,_,a,h)),e[r]=Di(_)}function Dp(t,e,r,i){var n,o,a,s,h,l,u,c,p,f,d,y,v,g,_,m=t.style[r],x=t.getBoundingRect(),w={},b=m.repeat,S="no-repeat"===b,T="repeat-x"===b,k="repeat-y"===b;ki(m)?(o=m.imageWidth,a=m.imageHeight,s=void 0,E(h=m.image)?s=h:gp(h)?s=h.src:_p(h)&&(s=h.toDataURL()),"undefined"==typeof Image?(et(o,l="Image width/height must been given explictly in svg-ssr renderer."),et(a,l)):null!=o&&null!=a||(u=function(t,e){var r,i,n;t&&(r=t.elm,i=o||e.width,n=a||e.height,"pattern"===t.tag&&(T?(n=1,i/=x.width):k&&(i=1,n/=x.height)),t.attrs.width=i,t.attrs.height=n,r&&(r.setAttribute("width",i),r.setAttribute("height",n)))},(c=Xs(s,null,t,function(t){S||u(y,t),u(n,t)}))&&c.width&&c.height&&(o=o||c.width,a=a||c.height)),n=ip("image","img",{href:s,width:o,height:a}),w.width=o,w.height=a):m.svgElement&&(n=C(m.svgElement),w.width=m.svgWidth,w.height=m.svgHeight),n&&(S?p=f=1:T?(f=1,p=w.width/x.width):k?(p=1,f=w.height/x.height):w.patternUnits="userSpaceOnUse",null==p||isNaN(p)||(w.width=p),null==f||isNaN(f)||(w.height=f),(d=Ii(m))&&(w.patternTransform=d),v=np(y=ip("pattern","",w,[n])),(_=(g=i.patternCache)[v])||(_=i.zrId+"-p"+i.patternIdx++,g[v]=_,w.id=_,y=i.defs[_]=ip("pattern",_,w,[n])),e[r]=Di(_))}function zp(t){return document.createTextNode(t)}function Ip(t,e,r){t.insertBefore(e,r)}function Lp(t,e){t.removeChild(e)}function Rp(t,e){t.appendChild(e)}function Op(t){return t.parentNode}function Fp(t){return t.nextSibling}function Bp(t,e){t.textContent=e}var Np=58,Hp=120,Wp=ip("","");function Ep(t){return void 0===t}function Xp(t){return void 0!==t}function Yp(t,e){var r=t.key===e.key;return t.tag===e.tag&&r}function qp(t){var e,r=t.children,i=t.tag;if(Xp(i)){var n=t.elm=rp(i);if(Up(Wp,t),G(r))for(e=0;e<r.length;++e){var o=r[e];null!=o&&Rp(n,qp(o))}else Xp(t.text)&&!Y(t.text)&&Rp(n,zp(t.text))}else t.elm=zp(t.text);return t.elm}function jp(t,e,r,i,n){for(;i<=n;++i){var o=r[i];null!=o&&Ip(t,qp(o),e)}}function Vp(t,e,r,i){for(;r<=i;++r){var n=e[r];null!=n&&(Xp(n.tag)?Lp(Op(n.elm),n.elm):Lp(t,n.elm))}}function Up(t,e){var r,i=e.elm,n=t&&t.attrs||{},o=e.attrs||{};if(n!==o){for(r in o){var a=o[r];n[r]!==a&&(!0===a?i.setAttribute(r,""):!1===a?i.removeAttribute(r):"style"===r?i.style.cssText=a:r.charCodeAt(0)!==Hp?i.setAttribute(r,a):"xmlns:xlink"===r||"xmlns"===r?i.setAttributeNS(Jc,r,a):r.charCodeAt(3)===Np?i.setAttributeNS(tp,r,a):r.charCodeAt(5)===Np?i.setAttributeNS($c,r,a):i.setAttribute(r,a))}for(r in n)r in o||i.removeAttribute(r)}}function Gp(t,e,r){for(var i,n,o,a=0,s=0,h=e.length-1,l=e[0],u=e[h],c=r.length-1,p=r[0],f=r[c];a<=h&&s<=c;)null==l?l=e[++a]:null==u?u=e[--h]:null==p?p=r[++s]:null==f?f=r[--c]:Yp(l,p)?(Zp(l,p),l=e[++a],p=r[++s]):Yp(u,f)?(Zp(u,f),u=e[--h],f=r[--c]):Yp(l,f)?(Zp(l,f),Ip(t,l.elm,Fp(u.elm)),l=e[++a],f=r[--c]):p=(Yp(u,p)?(Zp(u,p),Ip(t,u.elm,l.elm),u=e[--h]):(Ep(i)&&(i=function(t,e,r){for(var i={},n=e;n<=r;++n){var o=t[n].key;void 0!==o&&(i[o]=n)}return i}(e,a,h)),Ep(n=i[p.key])||(o=e[n]).tag!==p.tag?Ip(t,qp(p),l.elm):(Zp(o,p),e[n]=void 0,Ip(t,o.elm,l.elm))),r[++s]);(a<=h||s<=c)&&(h<a?jp(t,null==r[c+1]?null:r[c+1].elm,r,s,c):Vp(t,e,a,h))}function Zp(t,e){var r=e.elm=t.elm,i=t.children,n=e.children;t!==e&&(Up(t,e),Ep(e.text)?Xp(i)&&Xp(n)?i!==n&&Gp(r,i,n):Xp(n)?(Xp(t.text)&&Bp(r,""),jp(r,null,n,0,n.length-1)):Xp(i)?Vp(r,i,0,i.length-1):Xp(t.text)&&Bp(r,""):t.text!==e.text&&(Xp(i)&&Vp(r,i,0,i.length-1),Bp(r,e.text)))}var Kp=0,Qp=($p.prototype.getType=function(){return this.type},$p.prototype.getViewportRoot=function(){return this._viewport},$p.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},$p.prototype.getSvgDom=function(){return this._svgDom},$p.prototype.refresh=function(){var t,e,r,i,n;this.root&&((t=this.renderToVNode({willUpdate:!0})).attrs.style="position:absolute;left:0;top:0;user-select:none",Yp(e=this._oldVNode,r=t)?Zp(e,r):(n=Op(i=e.elm),qp(r),null!==n&&(Ip(n,r.elm,Fp(i)),Vp(n,[e],0,0))),this._oldVNode=t)},$p.prototype.renderOneToVNode=function(t){return Mp(t,op(this._id))},$p.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),r=this._width,i=this._height,n=op(this._id);n.animation=t.animation,n.willUpdate=t.willUpdate,n.compress=t.compress,n.emphasis=t.emphasis,n.ssr=this._opts.ssr;var o=[],a=this._bgVNode=function(t,e,r,i){var n,o,a,s;return r&&"none"!==r&&(n=ip("rect","bg",{width:t,height:e,x:"0",y:"0"}),Ai(r)?Ap({fill:r},n.attrs,"fill",i):Ci(r)?Dp({style:{fill:r},dirty:dt,getBoundingRect:function(){return{width:t,height:e}}},n.attrs,"fill",i):(o=mi(r),a=o.color,s=o.opacity,n.attrs.fill=a,s<1&&(n.attrs["fill-opacity"]=s))),n}(r,i,this._backgroundColor,n);a&&o.push(a);var s=t.compress?null:this._mainVNode=ip("g","main",{},[]);this._paintList(e,n,s?s.children:o),s&&o.push(s);var h,l,u,c,p,f,d,y,v,g=I(B(n.defs),function(t){return n.defs[t]});return g.length&&o.push(ip("defs","defs",{},g)),t.animation&&(u=n.cssNodes,c=n.cssAnims,f=" {"+(p="\n"),d=p+"}",y=I(B(u),function(e){return e+f+I(B(u[e]),function(t){return t+":"+u[e][t]+";"}).join(p)+d}).join(p),v=I(B(c),function(i){return"@keyframes "+i+f+I(B(c[i]),function(r){return r+f+I(B(c[i][r]),function(t){var e=c[i][r][t];return"d"===t&&(e='path("'+e+'")'),t+":"+e+";"}).join(p)+d}).join(p)+d}).join(p),(h=y||v?["<![CDATA[",y,v,"]]>"].join(p):"")&&(l=ip("style","stl",{},[],h),o.push(l))),ap(r,i,o,t.useViewBox)},$p.prototype.renderToString=function(t){return t=t||{},np(this.renderToVNode({animation:Q(t.cssAnimation,!0),emphasis:Q(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Q(t.useViewBox,!0)}),{newline:!0})},$p.prototype.setBackgroundColor=function(t){this._backgroundColor=t},$p.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},$p.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<p;v++){var g=t[v];if(!g.invisible){for(var _=g.__clipPaths,m=_&&_.length||0,x=n&&n.length||0,w=void 0,w=Math.max(m-1,x-1);0<=w&&(!_||!n||_[w]!==n[w]);w--);for(var b=x-1;w<b;b--)i=f[--d-1];for(var S=w+1;S<m;S++){var T={};o=_[S],a=T,c=u=l=h=void 0,l=(s=e).clipPathCache,u=s.defs,(c=l[o.id])||(h={id:c=s.zrId+"-c"+s.clipPathIdx++},u[l[o.id]=c]=ip("clipPath",c,h,[Pp(o,s)])),a["clip-path"]=Di(c);var k=ip("g","clip-g-"+y++,T,[]);(i?i.children:r).push(k),i=f[d++]=k}n=_;var C=Mp(g,e);C&&(i?i.children:r).push(C)}}},$p.prototype.resize=function(t,e){var r,i,n,o=this._opts,a=this.root,s=this._viewport;null!=t&&(o.width=t),null!=e&&(o.height=e),a&&s&&(s.style.display="none",t=ic(a,0,o),e=ic(a,1,o),s.style.display=""),this._width===t&&this._height===e||(this._width=t,this._height=e,s&&((r=s.style).width=t+"px",r.height=e+"px"),Ci(this._backgroundColor)?this.refresh():((i=this._svgDom)&&(i.setAttribute("width",t),i.setAttribute("height",e)),(n=this._bgVNode&&this._bgVNode.elm)&&(n.setAttribute("width",t),n.setAttribute("height",e))))},$p.prototype.getWidth=function(){return this._width},$p.prototype.getHeight=function(){return this._height},$p.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},$p.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},$p.prototype.toDataURL=function(t){var e=this.renderToString(),r="data:image/svg+xml;";return t?(e=Li(e))&&r+"base64,"+e:r+"charset=UTF-8,"+encodeURIComponent(e)},$p);function $p(t,e,r){var i,n;this.type="svg",this.configLayer=function(){},this.storage=e,this._opts=r=L({},r),this.root=t,this._id="zr"+Kp++,this._oldVNode=ap(r.width,r.height),t&&!r.ssr&&((i=this._viewport=document.createElement("div")).style.cssText="position:relative;overflow:hidden",n=this._svgDom=this._oldVNode.elm=rp("svg"),Up(null,this._oldVNode),i.appendChild(n),t.appendChild(i)),this.resize(r.width,r.height)}go("canvas",Bc),go("svg",Qp),t.Arc=Gl,t.ArcShape=Ul,t.BezierCurve=tu,t.BezierCurveShape=Ql,t.BoundingRect=Le,t.Circle=as,t.CircleShape=os,t.CompoundPath=bl,t.Displayable=Co,t.Droplet=nu,t.DropletShape=iu,t.Element=Jn,t.Ellipse=gs,t.EllipseShape=vs,t.Group=lo,t.Heart=hu,t.HeartShape=su,t.Image=rs,t.IncrementalDisplayable=Cl,t.Isogon=yu,t.IsogonShape=du,t.Line=bs,t.LineShape=ws,t.LinearGradient=Fs,t.OrientedBoundingRect=Ku,t.Path=Ma,t.Pattern=Eu,t.Point=_e,t.Polygon=Ps,t.PolygonShape=Cs,t.Polyline=zs,t.PolylineShape=Ds,t.RadialGradient=Hs,t.Rect=fs,t.RectShape=cs,t.Ring=mu,t.RingShape=_u,t.Rose=Cu,t.RoseShape=ku,t.Sector=Uh,t.SectorShape=Vh,t.Star=Lu,t.StarShape=Iu,t.TSpan=uh,t.Text=Il,t.Trochoid=Hu,t.TrochoidShape=Nu,t.color=gi,t.dispose=function(t){t.dispose()},t.disposeAll=function(){for(var t in po)po.hasOwnProperty(t)&&po[t].dispose();po={}},t.getElementSSRData=_o,t.getInstance=function(t){return po[t]},t.init=function(t,e){var r=new yo(b(),t,e);return po[r.id]=r},t.matrix=ge,t.morph=wl,t.parseSVG=function(t,e){return(new vh).parse(t,e)},t.path=$a,t.registerPainter=go,t.registerSSRDataGetter=function(t){fo=t},t.setPlatformAPI=function(t){for(var e in d)d.hasOwnProperty(e)&&t[e]&&(d[e]=t[e])},t.showDebugDirtyRect=function(t,n){n=n||{};var e=t.painter;if(!e.getLayers)throw new Error("Debug dirty rect can only been used on canvas renderer.");if(e.isSingleCanvas())throw new Error("Debug dirty rect can only been used on zrender inited with container.");var o=document.createElement("div");o.style.cssText="\nposition:absolute;\nleft:0;\ntop:0;\nright:0;\nbottom:0;\npointer-events:none;\n",o.className="ec-debug-dirty-rect-container";var a=[],r=t.dom;r.appendChild(o),"static"===getComputedStyle(r).position&&(r.style.position="relative"),t.on("rendered",function(){if(e.getLayers){var i=0;e.eachBuiltinLayer(function(t){if(t.debugGetPaintRects)for(var e=t.debugGetPaintRects(),r=0;r<e.length;r++)e[r].width&&e[r].height&&(a[i]||(a[i]=new $u(n.style),o.appendChild(a[i].dom)),a[i].show(n.autoHideDelay),a[i].update(e[r]),i++)});for(var t=i;t<a.length;t++)a[t].hide()}})},t.util=gt,t.vector=Bt,t.version="6.1.0",Object.defineProperty(t,"__esModule",{value:!0})}); |