text: !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.zrender={})}(this,function(t){"use strict";function r(){return e++}var e=2311,_="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(t){var e={},i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),n=t.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(e.firefox=!0,e.version=i[1]);r&&(e.ie=!0,e.version=r[1]);n&&(e.edge=!0,e.version=n[1]);a&&(e.weChat=!0);return{browser:e,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!e.ie&&!e.edge,pointerEventsSupported:"onpointerdown"in window&&(e.edge||e.ie&&11<=e.version),domSupported:"undefined"!=typeof document}}(navigator.userAgent);var s={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},h={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},l=Object.prototype.toString,i=Array.prototype,o=i.forEach,u=i.filter,n=i.slice,c=i.map,f=i.reduce,a={};function d(t){if(null==t||"object"!=typeof t)return t;var e=t,i=l.call(t);if("[object Array]"===i){if(!H(t)){e=[];for(var r=0,n=t.length;r<n;r++)e[r]=d(t[r])}}else if(h[i]){if(!H(t)){var a=t.constructor;if(t.constructor.from)e=a.from(t);else{e=new a(t.length);for(r=0,n=t.length;r<n;r++)e[r]=d(t[r])}}}else if(!s[i]&&!H(t)&&!D(t))for(var o in e={},t)t.hasOwnProperty(o)&&(e[o]=d(t[o]));return e}function p(t,e,i){if(!L(e)||!L(t))return i?d(e):t;for(var r in e)if(e.hasOwnProperty(r)){var n=t[r],a=e[r];!L(a)||!L(n)||M(a)||M(n)||D(a)||D(n)||z(a)||z(n)||H(a)||H(n)?!i&&r in t||(t[r]=d(e[r])):p(n,a,i)}return t}function v(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function g(t,e,i){for(var r in e)e.hasOwnProperty(r)&&(i?null!=e[r]:null==t[r])&&(t[r]=e[r]);return t}function y(){return a.createCanvas()}var m;function x(){return m=m||y().getContext("2d")}function w(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,r=t.length;i<r;i++)if(t[i]===e)return i}return-1}function b(t,e){var i=t.prototype;function r(){}for(var n in r.prototype=e.prototype,t.prototype=new r,i)i.hasOwnProperty(n)&&(t.prototype[n]=i[n]);(t.prototype.constructor=t).superClass=e}function k(t,e,i){g(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,i)}function B(t){if(t)return"string"!=typeof t&&"number"==typeof t.length}function T(t,e,i){if(t&&e)if(t.forEach&&t.forEach===o)t.forEach(e,i);else if(t.length===+t.length)for(var r=0,n=t.length;r<n;r++)e.call(i,t[r],r,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(i,t[a],a,t)}function S(t,e,i){if(t&&e){if(t.map&&t.map===c)return t.map(e,i);for(var r=[],n=0,a=t.length;n<a;n++)r.push(e.call(i,t[n],n,t));return r}}function C(t,e){var i=n.call(arguments,2);return function(){return t.apply(e,i.concat(n.call(arguments)))}}function M(t){return"[object Array]"===l.call(t)}function A(t){return"function"==typeof t}function P(t){return"[object String]"===l.call(t)}function L(t){var e=typeof t;return"function"==e||!!t&&"object"==e}function z(t){return!!s[l.call(t)]}function D(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function I(t,e){return null!=t?t:e}function O(t,e,i){return null!=t?t:null!=e?e:i}function R(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 E(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}a.createCanvas=function(){return document.createElement("canvas")};var F="__ec_primitive__";function H(t){return t[F]}function N(t){var i=M(t);this.data={};var r=this;function e(t,e){i?r.set(t,e):r.set(e,t)}t instanceof N?t.each(e):t&&T(t,e)}N.prototype={constructor:N,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){for(var i in void 0!==e&&(t=C(t,e)),this.data)this.data.hasOwnProperty(i)&&t(this.data[i],i)},removeKey:function(t){delete this.data[t]}};var W=(Object.freeze||Object)({$override:function(t,e){"createCanvas"===t&&(m=null),a[t]=e},clone:d,merge:p,mergeAll:function(t,e){for(var i=t[0],r=1,n=t.length;r<n;r++)i=p(i,t[r],e);return i},extend:v,defaults:g,createCanvas:y,getContext:x,indexOf:w,inherits:b,mixin:k,isArrayLike:B,each:T,map:S,reduce:function(t,e,i,r){if(t&&e){if(t.reduce&&t.reduce===f)return t.reduce(e,i,r);for(var n=0,a=t.length;n<a;n++)i=e.call(r,i,t[n],n,t);return i}},filter:function(t,e,i){if(t&&e){if(t.filter&&t.filter===u)return t.filter(e,i);for(var r=[],n=0,a=t.length;n<a;n++)e.call(i,t[n],n,t)&&r.push(t[n]);return r}},find:function(t,e,i){if(t&&e)for(var r=0,n=t.length;r<n;r++)if(e.call(i,t[r],r,t))return t[r]},bind:C,curry:function(t){var e=n.call(arguments,1);return function(){return t.apply(this,e.concat(n.call(arguments)))}},isArray:M,isFunction:A,isString:P,isObject:L,isBuiltInObject:z,isTypedArray:function(t){return!!h[l.call(t)]},isDom:D,eqNaN:function(t){return t!=t},retrieve:function(t){for(var e=0,i=arguments.length;e<i;e++)if(null!=arguments[e])return arguments[e]},retrieve2:I,retrieve3:O,slice:function(){return Function.call.apply(n,arguments)},normalizeCssArray:R,assert:function(t,e){if(!t)throw new Error(e)},trim:E,setAsPrimitive:function(t){t[F]=!0},isPrimitive:H,createHashMap:function(t){return new N(t)},concatArray:function(t,e){for(var i=new t.constructor(t.length+e.length),r=0;r<t.length;r++)i[r]=t[r];var n=t.length;for(r=0;r<e.length;r++)i[r+n]=e[r];return i},noop:function(){}}),V="undefined"==typeof Float32Array?Array:Float32Array;function X(t,e){var i=new V(2);return null==t&&(t=0),null==e&&(e=0),i[0]=t,i[1]=e,i}function q(t){var e=new V(2);return e[0]=t[0],e[1]=t[1],e}function j(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t}function Y(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function U(t){return Math.sqrt(Z(t))}var G=U;function Z(t){return t[0]*t[0]+t[1]*t[1]}var Q=Z;function $(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t}function K(t,e){var i=U(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t}function J(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var tt=J;function et(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var it=et;function rt(t,e,i){var r=e[0],n=e[1];return t[0]=i[0]*r+i[2]*n+i[4],t[1]=i[1]*r+i[3]*n+i[5],t}function nt(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t}function at(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}var ot=(Object.freeze||Object)({create:X,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t},clone:q,set:function(t,e,i){return t[0]=e,t[1]=i,t},add:j,scaleAndAdd:function(t,e,i,r){return t[0]=e[0]+i[0]*r,t[1]=e[1]+i[1]*r,t},sub:Y,len:U,length:G,lenSquare:Z,lengthSquare:Q,mul:function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},div:function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:$,normalize:K,distance:J,dist:tt,distanceSquare:et,distSquare:it,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:function(t,e,i,r){return t[0]=e[0]+r*(i[0]-e[0]),t[1]=e[1]+r*(i[1]-e[1]),t},applyTransform:rt,min:nt,max:at});function st(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this),this.on("globalout",this._dragEnd,this)}function ht(t,e){return{target:t,topTarget:e&&e.topTarget}}st.prototype={constructor:st,_dragStart:function(t){var e=t.target;e&&e.draggable&&((this._draggingTarget=e).dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(ht(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,r=t.offsetY,n=i-this._x,a=r-this._y;this._x=i,this._y=r,e.drift(n,a,t),this.dispatchToElement(ht(e,t),"drag",t.event);var o=this.findHover(i,r,e).target,s=this._dropTarget;e!==(this._dropTarget=o)&&(s&&o!==s&&this.dispatchToElement(ht(s,t),"dragleave",t.event),o&&o!==s&&this.dispatchToElement(ht(o,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(ht(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(ht(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};function lt(t){this._$handlers={},this._$eventProcessor=t}var ut=Array.prototype.slice;function ct(t,e,i,r,n,a){var o=t._$handlers;if("function"==typeof i&&(n=r,r=i,i=null),!r||!e)return t;i=function(t,e){var i=t._$eventProcessor;return null!=e&&i&&i.normalizeQuery&&(e=i.normalizeQuery(e)),e}(t,i),o[e]||(o[e]=[]);for(var s=0;s<o[e].length;s++)if(o[e][s].h===r)return t;var h={h:r,one:a,query:i,ctx:n||t,callAtLast:r.zrEventfulCallAtLast},l=o[e].length-1,u=o[e][l];return u&&u.callAtLast?o[e].splice(l,0,h):o[e].push(h),t}lt.prototype={constructor:lt,one:function(t,e,i,r){return ct(this,t,e,i,r,!0)},on:function(t,e,i,r){return ct(this,t,e,i,r,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var i=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var r=[],n=0,a=i[t].length;n<a;n++)i[t][n].h!==e&&r.push(i[t][n]);i[t]=r}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var r=arguments,n=r.length;3<n&&(r=ut.call(r,1));for(var a=e.length,o=0;o<a;){var s=e[o];if(i&&i.filter&&null!=s.query&&!i.filter(t,s.query))o++;else{switch(n){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,r[1]);break;case 3:s.h.call(s.ctx,r[1],r[2]);break;default:s.h.apply(s.ctx,r)}s.one?(e.splice(o,1),a--):o++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var r=arguments,n=r.length;4<n&&(r=ut.call(r,1,r.length-1));for(var a=r[r.length-1],o=e.length,s=0;s<o;){var h=e[s];if(i&&i.filter&&null!=h.query&&!i.filter(t,h.query))s++;else{switch(n){case 1:h.h.call(a);break;case 2:h.h.call(a,r[1]);break;case 3:h.h.call(a,r[1],r[2]);break;default:h.h.apply(a,r)}h.one?(e.splice(s,1),o--):s++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this}};var ft=Math.log(2);function dt(t,e,i,r,n,a){var o=r+"-"+n,s=t.length;if(a.hasOwnProperty(o))return a[o];if(1===e){var h=Math.round(Math.log((1<<s)-1&~n)/ft);return t[i][h]}for(var l=r|1<<i,u=i+1;r&1<<u;)u++;for(var c=0,f=0,d=0;f<s;f++){var p=1<<f;p&n||(c+=(d%2?-1:1)*t[i][f]*dt(t,e-1,u,l,n|p,a),d++)}return a[o]=c}var pt="undefined"!=typeof window&&!!window.addEventListener,vt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,gt="___zrEVENTSAVED",_t=[];function yt(t,e,i,r){return i=i||{},r||!_.canvasSupported?mt(t,e,i):_.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(i.zrX=e.layerX,i.zrY=e.layerY):null!=e.offsetX?(i.zrX=e.offsetX,i.zrY=e.offsetY):mt(t,e,i),i}function mt(t,e,i){if(t.getBoundingClientRect&&_.domSupported){var r=e.clientX,n=e.clientY;if("CANVAS"===t.nodeName.toUpperCase()){var a=t.getBoundingClientRect();return i.zrX=r-a.left,void(i.zrY=n-a.top)}var o=t[gt]||(t[gt]={}),s=function(t,e){for(var i=e.transformer,r=e.srcCoords,n=!0,a=[],o=[],s=0;s<4;s++){var h=t[s].getBoundingClientRect(),l=2*s,u=h.left,c=h.top;a.push(u,c),n&=r&&u===r[l]&&c===r[1+l],o.push(t[s].offsetLeft,t[s].offsetTop)}return n?i:(e.srcCoords=a,e.transformer=function(t,e){var i=[[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]]],r={},n=dt(i,8,0,0,0,r);if(0!==n){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)null==a[s]&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*dt(i,7,0===o?1:0,1<<o,1<<s,r)/n*e[o];return function(t,e,i){var r=e*a[6]+i*a[7]+1;t[0]=(e*a[0]+i*a[1]+a[2])/r,t[1]=(e*a[3]+i*a[4]+a[5])/r}}}(a,o))}(function(t,e){var i=e.markers;if(i)return i;i=e.markers=[];for(var r=["left","right"],n=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,h=a%2,l=(a>>1)%2;s.cssText=["position:absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","width:0","height:0",r[h]+":0",n[l]+":0",r[1-h]+":auto",n[1-l]+":auto",""].join("!important;"),t.appendChild(o),i.push(o)}return i}(t,o),o);if(s)return s(_t,r,n),i.zrX=_t[0],void(i.zrY=_t[1])}i.zrX=i.zrY=0}function xt(t,e,i){if(null!=(e=e||window.event).zrX)return e;var r=e.type;if(r&&0<=r.indexOf("touch")){var n="touchend"!==r?e.targetTouches[0]:e.changedTouches[0];n&&yt(t,n,e,i)}else yt(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&vt.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function wt(){this._track=[]}var bt=pt?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function kt(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}wt.prototype={constructor:wt,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var r=t.touches;if(r){for(var n={points:[],touches:[],target:e,event:t},a=0,o=r.length;a<o;a++){var s=r[a],h=yt(i,s,{});n.points.push([h.zrX,h.zrY]),n.touches.push(s)}this._track.push(n)}},_recognize:function(t){for(var e in Tt)if(Tt.hasOwnProperty(e)){var i=Tt[e](this._track,t);if(i)return i}}};var Tt={pinch:function(t,e){var i=t.length;if(i){var r=(t[i-1]||{}).points,n=(t[i-2]||{}).points||r;if(n&&1<n.length&&r&&1<r.length){var a=kt(r)/kt(n);isFinite(a)||(a=1),e.pinchScale=a;var o=function(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}(r);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:t[0].target,event:e}}}}},St="silent";function Ct(t){bt(this.event)}function Mt(){}Mt.prototype.dispose=function(){};function At(t,e,i,r){lt.call(this),this.storage=t,this.painter=e,this.painterRoot=r,i=i||new Mt,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,st.call(this),this.setHandlerProxy(i)}var Pt=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"];function Lt(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var r,n=t;n;){if(n.clipPath&&!n.clipPath.contain(e,i))return!1;n.silent&&(r=!0),n=n.parent}return!r||St}return!1}At.prototype={constructor:At,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(T(Pt,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},mousemove:function(t){var e=t.zrX,i=t.zrY,r=this._hovered,n=r.target;n&&!n.__zr&&(n=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=this.findHover(e,i),o=a.target,s=this.proxy;s.setCursor&&s.setCursor(o?o.cursor:"default"),n&&o!==n&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),o&&o!==n&&this.dispatchToElement(a,"mouseover",t)},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t);for(var e,i=t.toElement||t.relatedTarget;(i=i&&i.parentNode)&&9!==i.nodeType&&!(e=i===this.painterRoot););e||this.trigger("globalout",{event:t})},resize:function(t){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,i){var r=(t=t||{}).target;if(!r||!r.silent){for(var n="on"+e,a=function(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:Ct}}(e,t,i);r&&(r[n]&&(a.cancelBubble=r[n].call(r,a)),r.trigger(e,a),r=r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[n]&&t[n].call(t,a),t.trigger&&t.trigger(e,a)}))}},findHover:function(t,e,i){for(var r=this.storage.getDisplayList(),n={x:t,y:e},a=r.length-1;0<=a;a--){var o;if(r[a]!==i&&!r[a].ignore&&(o=Lt(r[a],t,e))&&(n.topTarget||(n.topTarget=r[a]),o!==St)){n.target=r[a];break}}return n},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new wt);var i=this._gestureMgr;"start"===e&&i.clear();var r=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),r){var n=r.type;t.gestureEvent=n,this.dispatchToElement({target:r.target},n,r.event)}}},T(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){At.prototype[r]=function(t){var e=this.findHover(t.zrX,t.zrY),i=e.target;if("mousedown"===r)this._downEl=i,this._downPoint=[t.zrX,t.zrY],this._upEl=i;else if("mouseup"===r)this._upEl=i;else if("click"===r){if(this._downEl!==this._upEl||!this._downPoint||4<tt(this._downPoint,[t.zrX,t.zrY]))return;this._downPoint=null}this.dispatchToElement(e,r,t)}}),k(At,lt),k(At,st);var zt="undefined"==typeof Float32Array?Array:Float32Array;function Bt(){var t=new zt(6);return Dt(t),t}function Dt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function It(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function Ot(t,e,i){var r=e[0]*i[0]+e[2]*i[1],n=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],o=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],h=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=r,t[1]=n,t[2]=a,t[3]=o,t[4]=s,t[5]=h,t}function Rt(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}function Et(t,e,i){var r=e[0],n=e[2],a=e[4],o=e[1],s=e[3],h=e[5],l=Math.sin(i),u=Math.cos(i);return t[0]=r*u+o*l,t[1]=-r*l+o*u,t[2]=n*u+s*l,t[3]=-n*l+u*s,t[4]=u*a+l*h,t[5]=u*h-l*a,t}function Ft(t,e,i){var r=i[0],n=i[1];return t[0]=e[0]*r,t[1]=e[1]*n,t[2]=e[2]*r,t[3]=e[3]*n,t[4]=e[4]*r,t[5]=e[5]*n,t}function Ht(t,e){var i=e[0],r=e[2],n=e[4],a=e[1],o=e[3],s=e[5],h=i*o-a*r;return h?(h=1/h,t[0]=o*h,t[1]=-a*h,t[2]=-r*h,t[3]=i*h,t[4]=(r*s-o*n)*h,t[5]=(a*n-i*s)*h,t):null}var Nt=(Object.freeze||Object)({create:Bt,identity:Dt,copy:It,mul:Ot,translate:Rt,rotate:Et,scale:Ft,invert:Ht,clone:function(t){var e=Bt();return It(e,t),e}}),Wt=Dt;function Vt(t){return 5e-5<t||t<-5e-5}function Xt(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null}var qt=Xt.prototype;qt.transform=null,qt.needLocalTransform=function(){return Vt(this.rotation)||Vt(this.position[0])||Vt(this.position[1])||Vt(this.scale[0]-1)||Vt(this.scale[1]-1)};var jt=[];qt.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),r=this.transform;if(i||e){r=r||Bt(),i?this.getLocalTransform(r):Wt(r),e&&(i?Ot(r,t.transform,r):It(r,t.transform)),this.transform=r;var n=this.globalScaleRatio;if(null!=n&&1!==n){this.getGlobalScale(jt);var a=jt[0]<0?-1:1,o=jt[1]<0?-1:1,s=((jt[0]-a)*n+a)/jt[0]||0,h=((jt[1]-o)*n+o)/jt[1]||0;r[0]*=s,r[1]*=s,r[2]*=h,r[3]*=h}this.invTransform=this.invTransform||Bt(),Ht(this.invTransform,r)}else r&&Wt(r)},qt.getLocalTransform=function(t){return Xt.getLocalTransform(this,t)},qt.setTransform=function(t){var e=this.transform,i=t.dpr||1;e?t.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):t.setTransform(i,0,0,i,0,0)},qt.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var Yt=[],Ut=Bt();qt.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],r=this.position,n=this.scale;Vt(e-1)&&(e=Math.sqrt(e)),Vt(i-1)&&(i=Math.sqrt(i)),t[0]<0&&(e=-e),t[3]<0&&(i=-i),r[0]=t[4],r[1]=t[5],n[0]=e,n[1]=i,this.rotation=Math.atan2(-t[1]/i,t[0]/e)}},qt.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(Ot(Yt,t.invTransform,e),e=Yt);var i=this.origin;i&&(i[0]||i[1])&&(Ut[4]=i[0],Ut[5]=i[1],Ot(Yt,e,Ut),Yt[4]-=i[0],Yt[5]-=i[1],e=Yt),this.setLocalTransform(e)}},qt.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},qt.transformCoordToLocal=function(t,e){var i=[t,e],r=this.invTransform;return r&&rt(i,i,r),i},qt.transformCoordToGlobal=function(t,e){var i=[t,e],r=this.transform;return r&&rt(i,i,r),i},Xt.getLocalTransform=function(t,e){Wt(e=e||[]);var i=t.origin,r=t.scale||[1,1],n=t.rotation||0,a=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),Ft(e,e,r),n&&Et(e,e,n),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=a[0],e[5]+=a[1],e};var Gt={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1;return 0===t?0:1===t?1:(e=!i||i<1?(i=1,.1):.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(e=!i||i<1?(i=1,.1):.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(e=!i||i<1?(i=1,.1):.4*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){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-Gt.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*Gt.bounceIn(2*t):.5*Gt.bounceOut(2*t-1)+.5}};function Zt(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}Zt.prototype={constructor:Zt,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var i=(t-this._startTime-this._pausedTime)/this._life;if(!(i<0)){i=Math.min(i,1);var r=this.easing,n="string"==typeof r?Gt[r]:r,a="function"==typeof n?n(i):i;return this.fire("frame",a),1===i?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};function Qt(){this.head=null,this.tail=null,this._len=0}var $t=Qt.prototype;$t.insert=function(t){var e=new Jt(t);return this.insertEntry(e),e},$t.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++},$t.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},$t.len=function(){return this._len},$t.clear=function(){this.head=this.tail=null,this._len=0};function Kt(t){this._list=new Qt,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null}var Jt=function(t){this.value=t,this.next,this.prev},te=Kt.prototype;te.put=function(t,e){var i=this._list,r=this._map,n=null;if(null==r[t]){var a=i.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&0<a){var s=i.head;i.remove(s),delete r[s.key],n=s.value,this._lastRemovedEntry=s}o?o.value=e:o=new Jt(e),o.key=t,i.insertEntry(o),r[t]=o}return n},te.get=function(t){var e=this._map[t],i=this._list;if(null!=e)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},te.clear=function(){this._list.clear(),this._map={}};var ee={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 ie(t){return(t=Math.round(t))<0?0:255<t?255:t}function re(t){return t<0?0:1<t?1:t}function ne(t){return t.length&&"%"===t.charAt(t.length-1)?ie(parseFloat(t)/100*255):ie(parseInt(t,10))}function ae(t){return t.length&&"%"===t.charAt(t.length-1)?re(parseFloat(t)/100):re(parseFloat(t))}function oe(t,e,i){return i<0?i+=1:1<i&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function se(t,e,i){return t+(e-t)*i}function he(t,e,i,r,n){return t[0]=e,t[1]=i,t[2]=r,t[3]=n,t}function le(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var ue=new Kt(20),ce=null;function fe(t,e){ce&&le(ce,e),ce=ue.put(t,ce||e.slice())}function de(t,e){if(t){e=e||[];var i=ue.get(t);if(i)return le(e,i);var r,n=(t+="").replace(/ /g,"").toLowerCase();if(n in ee)return le(e,ee[n]),fe(t,e),e;if("#"===n.charAt(0))return 4===n.length?0<=(r=parseInt(n.substr(1),16))&&r<=4095?(he(e,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,1),fe(t,e),e):void he(e,0,0,0,1):7===n.length?0<=(r=parseInt(n.substr(1),16))&&r<=16777215?(he(e,(16711680&r)>>16,(65280&r)>>8,255&r,1),fe(t,e),e):void he(e,0,0,0,1):void 0;var a=n.indexOf("("),o=n.indexOf(")");if(-1!==a&&o+1===n.length){var s=n.substr(0,a),h=n.substr(a+1,o-(a+1)).split(","),l=1;switch(s){case"rgba":if(4!==h.length)return void he(e,0,0,0,1);l=ae(h.pop());case"rgb":return 3!==h.length?void he(e,0,0,0,1):(he(e,ne(h[0]),ne(h[1]),ne(h[2]),l),fe(t,e),e);case"hsla":return 4!==h.length?void he(e,0,0,0,1):(h[3]=ae(h[3]),pe(h,e),fe(t,e),e);case"hsl":return 3!==h.length?void he(e,0,0,0,1):(pe(h,e),fe(t,e),e);default:return}}he(e,0,0,0,1)}}function pe(t,e){var i=(parseFloat(t[0])%360+360)%360/360,r=ae(t[1]),n=ae(t[2]),a=n<=.5?n*(r+1):n+r-n*r,o=2*n-a;return he(e=e||[],ie(255*oe(o,a,i+1/3)),ie(255*oe(o,a,i)),ie(255*oe(o,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function ve(t){var e=de(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function ge(t,e,i){if(e&&e.length&&0<=t&&t<=1){i=i||[];var r=t*(e.length-1),n=Math.floor(r),a=Math.ceil(r),o=e[n],s=e[a],h=r-n;return i[0]=ie(se(o[0],s[0],h)),i[1]=ie(se(o[1],s[1],h)),i[2]=ie(se(o[2],s[2],h)),i[3]=re(se(o[3],s[3],h)),i}}var _e=ge;function ye(t,e,i){if(e&&e.length&&0<=t&&t<=1){var r=t*(e.length-1),n=Math.floor(r),a=Math.ceil(r),o=de(e[n]),s=de(e[a]),h=r-n,l=xe([ie(se(o[0],s[0],h)),ie(se(o[1],s[1],h)),ie(se(o[2],s[2],h)),re(se(o[3],s[3],h))],"rgba");return i?{color:l,leftIndex:n,rightIndex:a,value:r}:l}}var me=ye;function xe(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}}var we=(Object.freeze||Object)({parse:de,lift:function(t,e){var i=de(t);if(i){for(var r=0;r<3;r++)i[r]=e<0?i[r]*(1-e)|0:(255-i[r])*e+i[r]|0,255<i[r]?i[r]=255:t[r]<0&&(i[r]=0);return xe(i,4===i.length?"rgba":"rgb")}},toHex:ve,fastLerp:ge,fastMapToColor:_e,lerp:ye,mapToColor:me,modifyHSL:function(t,e,i,r){if(t=de(t))return t=function(t){if(t){var e,i,r=t[0]/255,n=t[1]/255,a=t[2]/255,o=Math.min(r,n,a),s=Math.max(r,n,a),h=s-o,l=(s+o)/2;if(0==h)i=e=0;else{i=l<.5?h/(s+o):h/(2-s-o);var u=((s-r)/6+h/2)/h,c=((s-n)/6+h/2)/h,f=((s-a)/6+h/2)/h;r===s?e=f-c:n===s?e=1/3+u-f:a===s&&(e=2/3+c-u),e<0&&(e+=1),1<e&&(e-=1)}var d=[360*e,i,l];return null!=t[3]&&d.push(t[3]),d}}(t),null!=e&&(t[0]=function(t){return(t=Math.round(t))<0?0:360<t?360:t}(e)),null!=i&&(t[1]=ae(i)),null!=r&&(t[2]=ae(r)),xe(pe(t),"rgba")},modifyAlpha:function(t,e){if((t=de(t))&&null!=e)return t[3]=re(e),xe(t,"rgba")},stringify:xe}),be=Array.prototype.slice;function ke(t,e){return t[e]}function Te(t,e,i){t[e]=i}function Se(t,e,i){return(e-t)*i+t}function Ce(t,e,i){return.5<i?e:t}function Me(t,e,i,r,n){var a=t.length;if(1===n)for(var o=0;o<a;o++)r[o]=Se(t[o],e[o],i);else{var s=a&&t[0].length;for(o=0;o<a;o++)for(var h=0;h<s;h++)r[o][h]=Se(t[o][h],e[o][h],i)}}function Ae(t,e,i){var r=t.length,n=e.length;if(r!==n)if(n<r)t.length=n;else for(var a=r;a<n;a++)t.push(1===i?e[a]:be.call(e[a]));var o=t[0]&&t[0].length;for(a=0;a<t.length;a++)if(1===i)isNaN(t[a])&&(t[a]=e[a]);else for(var s=0;s<o;s++)isNaN(t[a][s])&&(t[a][s]=e[a][s])}function Pe(t,e,i){if(t===e)return!0;var r=t.length;if(r!==e.length)return!1;if(1===i){for(var n=0;n<r;n++)if(t[n]!==e[n])return!1}else{var a=t[0].length;for(n=0;n<r;n++)for(var o=0;o<a;o++)if(t[n][o]!==e[n][o])return!1}return!0}function Le(t,e,i,r,n,a,o,s,h){var l=t.length;if(1===h)for(var u=0;u<l;u++)s[u]=ze(t[u],e[u],i[u],r[u],n,a,o);else{var c=t[0].length;for(u=0;u<l;u++)for(var f=0;f<c;f++)s[u][f]=ze(t[u][f],e[u][f],i[u][f],r[u][f],n,a,o)}}function ze(t,e,i,r,n,a,o){var s=.5*(i-t),h=.5*(r-e);return(2*(e-i)+s+h)*o+(-3*(e-i)-2*s-h)*a+s*n+e}function Be(t){if(B(t)){var e=t.length;if(B(t[0])){for(var i=[],r=0;r<e;r++)i.push(be.call(t[r]));return i}return be.call(t)}return t}function De(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function Ie(t,e,i,r,a,n){var o=t._getter,s=t._setter,h="spline"===e,l=r.length;if(l){var u,c=B(r[0].value),f=!1,d=!1,p=c?function(t){var e=t[t.length-1].value;return B(e&&e[0])?2:1}(r):0;r.sort(function(t,e){return t.time-e.time}),u=r[l-1].time;for(var v=[],g=[],_=r[0].value,y=!0,m=0;m<l;m++){v.push(r[m].time/u);var x=r[m].value;if(c&&Pe(x,_,p)||!c&&x===_||(y=!1),"string"==typeof(_=x)){var w=de(x);w?(x=w,f=!0):d=!0}g.push(x)}if(n||!y){var b=g[l-1];for(m=0;m<l-1;m++)c?Ae(g[m],b,p):!isNaN(g[m])||isNaN(b)||d||f||(g[m]=b);c&&Ae(o(t._target,a),b,p);var k,T,S,C,M,A=0,P=0;if(f)var L=[0,0,0,0];var z=new Zt({target:t._target,life:u,loop:t._loop,delay:t._delay,onframe:function(t,e){var i;if(e<0)i=0;else if(e<P){for(i=Math.min(A+1,l-1);0<=i&&!(v[i]<=e);i--);i=Math.min(i,l-2)}else{for(i=A;i<l&&!(v[i]>e);i++);i=Math.min(i-1,l-2)}P=e;var r=v[(A=i)+1]-v[i];if(0!=r)if(k=(e-v[i])/r,h)if(S=g[i],T=g[0===i?i:i-1],C=g[l-2<i?l-1:i+1],M=g[l-3<i?l-1:i+2],c)Le(T,S,C,M,k,k*k,k*k*k,o(t,a),p);else{if(f)n=Le(T,S,C,M,k,k*k,k*k*k,L,1),n=De(L);else{if(d)return Ce(S,C,k);n=ze(T,S,C,M,k,k*k,k*k*k)}s(t,a,n)}else if(c)Me(g[i],g[i+1],k,o(t,a),p);else{var n;if(f)Me(g[i],g[i+1],k,L,1),n=De(L);else{if(d)return Ce(g[i],g[i+1],k);n=Se(g[i],g[i+1],k)}s(t,a,n)}},ondestroy:i});return e&&"spline"!==e&&(z.easing=e),z}}}function Oe(t,e,i,r){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||ke,this._setter=r||Te,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]}Oe.prototype={when:function(t,e){var i=this._tracks;for(var r in e)if(e.hasOwnProperty(r)){if(!i[r]){i[r]=[];var n=this._getter(this._target,r);if(null==n)continue;0!==t&&i[r].push({time:0,value:Be(n)})}i[r].push({time:t,value:e[r]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].pause();this._paused=!0},resume:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,i=0;i<e;i++)t[i].call(this)},start:function(t,e){function i(){--a||n._doneCallback()}var r,n=this,a=0;for(var o in this._tracks)if(this._tracks.hasOwnProperty(o)){var s=Ie(this,t,i,this._tracks[o],o,e);s&&(this._clipList.push(s),a++,this.animation&&this.animation.addClip(s),r=s)}if(r){var h=r.onframe;r.onframe=function(t,e){h(t,e);for(var i=0;i<n._onframeList.length;i++)n._onframeList[i](t,e)}}return a||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,i=this.animation,r=0;r<e.length;r++){var n=e[r];t&&n.onframe(this._target,1),i&&i.removeClip(n)}e.length=0},delay:function(t){return this._delay=t,this},done:function(t){return t&&this._doneList.push(t),this},getClips:function(){return this._clipList}};var Re=1;"undefined"!=typeof window&&(Re=Math.max(window.devicePixelRatio||1,1));var Ee=Re,Fe=function(){};function He(){this.animators=[]}var Ne=Fe;function We(t,e,i,r,n,a,o,s){P(r)?(a=n,n=r,r=0):A(n)?(a=n,n="linear",r=0):A(r)?(a=r,r=0):i=A(i)?(a=i,500):i||500,t.stopAnimation(),function t(e,i,r,n,a,o,s){var h={};var l=0;for(var u in n)n.hasOwnProperty(u)&&(null!=r[u]?L(n[u])&&!B(n[u])?t(e,i?i+"."+u:u,r[u],n[u],a,o,s):(s?(h[u]=r[u],Ve(e,i,u,n[u])):h[u]=n[u],l++):null==n[u]||s||Ve(e,i,u,n[u]));0<l&&e.animate(i,!1).when(null==a?500:a,h).delay(o||0)}(t,"",t,e,i,r,s);var h=t.animators.slice(),l=h.length;function u(){--l||a&&a()}l||a&&a();for(var c=0;c<h.length;c++)h[c].done(u).start(n,o)}function Ve(t,e,i,r){if(e){var n={};n[e]={},n[e][i]=r,t.attr(n)}else t.attr(i,r)}He.prototype={constructor:He,animate:function(t,e){var i,r=!1,n=this,a=this.__zr;if(t){var o=t.split("."),s=n;r="shape"===o[0];for(var h=0,l=o.length;h<l;h++)s=s&&s[o[h]];s&&(i=s)}else i=n;if(i){var u=n.animators,c=new Oe(i,e);return c.during(function(t){n.dirty(r)}).done(function(){u.splice(w(u,c),1)}),u.push(c),a&&a.animation.addAnimator(c),c}Ne('Property "'+t+'" is not existed in element '+n.id)},stopAnimation:function(t){for(var e=this.animators,i=e.length,r=0;r<i;r++)e[r].stop(t);return e.length=0,this},animateTo:function(t,e,i,r,n,a){We(this,t,e,i,r,n,a)},animateFrom:function(t,e,i,r,n,a){We(this,t,e,i,r,n,a,!0)}};var Xe=function(t){Xt.call(this,t),lt.call(this,t),He.call(this,t),this.id=t.id||r()};Xe.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){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.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];(i=i||(this[t]=[]))[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(L(t))for(var i in t)t.hasOwnProperty(i)&&this.attrKV(i,t[i]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),(this.clipPath=t).__zr=e,(t.__clipTarget=this).dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.addAnimator(e[i]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.removeAnimator(e[i]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},k(Xe,He),k(Xe,Xt),k(Xe,lt);var qe,je,Ye,Ue,Ge=rt,Ze=Math.min,Qe=Math.max;function $e(t,e,i,r){i<0&&(t+=i,i=-i),r<0&&(e+=r,r=-r),this.x=t,this.y=e,this.width=i,this.height=r}$e.prototype={constructor:$e,union:function(t){var e=Ze(t.x,this.x),i=Ze(t.y,this.y);this.width=Qe(t.x+t.width,this.x+this.width)-e,this.height=Qe(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:(qe=[],je=[],Ye=[],Ue=[],function(t){if(t){qe[0]=Ye[0]=this.x,qe[1]=Ue[1]=this.y,je[0]=Ue[0]=this.x+this.width,je[1]=Ye[1]=this.y+this.height,Ge(qe,qe,t),Ge(je,je,t),Ge(Ye,Ye,t),Ge(Ue,Ue,t),this.x=Ze(qe[0],je[0],Ye[0],Ue[0]),this.y=Ze(qe[1],je[1],Ye[1],Ue[1]);var e=Qe(qe[0],je[0],Ye[0],Ue[0]),i=Qe(qe[1],je[1],Ye[1],Ue[1]);this.width=e-this.x,this.height=i-this.y}}),calculateTransform:function(t){var e=t.width/this.width,i=t.height/this.height,r=Bt();return Rt(r,r,[-this.x,-this.y]),Ft(r,r,[e,i]),Rt(r,r,[t.x,t.y]),r},intersect:function(t){if(!t)return!1;t instanceof $e||(t=$e.create(t));var e=this,i=e.x,r=e.x+e.width,n=e.y,a=e.y+e.height,o=t.x,s=t.x+t.width,h=t.y,l=t.y+t.height;return!(r<o||s<i||a<h||l<n)},contain:function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new $e(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}};function Ke(t){for(var e in t=t||{},Xe.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0}Ke.prototype={constructor:Ke,isGroup:!0,type:"group",silent:!($e.create=function(t){return new $e(t.x,t.y,t.width,t.height)}),children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i<e.length;i++)if(e[i].name===t)return e[i]},childCount:function(){return this._children.length},add:function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},addBefore:function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var i=this._children,r=i.indexOf(e);0<=r&&(i.splice(r,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t);var e=(t.parent=this).__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof Ke&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,r=this._children,n=w(r,t);return n<0||(r.splice(n,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof Ke&&t.delChildrenFromStorage(i)),e&&e.refresh()),this},removeAll:function(){var t,e,i=this._children,r=this.__storage;for(e=0;e<i.length;e++)t=i[e],r&&(r.delFromStorage(t),t instanceof Ke&&t.delChildrenFromStorage(r)),t.parent=null;return i.length=0,this},eachChild:function(t,e){for(var i=this._children,r=0;r<i.length;r++){var n=i[r];t.call(e,n,r)}return this},traverse:function(t,e){for(var i=0;i<this._children.length;i++){var r=this._children[i];t.call(e,r),"group"===r.type&&r.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.addToStorage(i),i instanceof Ke&&i.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.delFromStorage(i),i instanceof Ke&&i.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,i=new $e(0,0,0,0),r=t||this._children,n=[],a=0;a<r.length;a++){var o=r[a];if(!o.ignore&&!o.invisible){var s=o.getBoundingRect(),h=o.getLocalTransform(n);h?(i.copy(s),i.applyTransform(h),(e=e||i.clone()).union(i)):(e=e||s.clone()).union(s)}}return e||i}},b(Ke,Xe);var Je=32,ti=7;function ei(t,e,i,r){var n=e+1;if(n===i)return 1;if(r(t[n++],t[e])<0){for(;n<i&&r(t[n],t[n-1])<0;)n++;!function(t,e,i){i--;for(;e<i;){var r=t[e];t[e++]=t[i],t[i--]=r}}(t,e,n)}else for(;n<i&&0<=r(t[n],t[n-1]);)n++;return n-e}function ii(t,e,i,r,n){for(r===e&&r++;r<i;r++){for(var a,o=t[r],s=e,h=r;s<h;)n(o,t[a=s+h>>>1])<0?h=a:s=1+a;var l=r-s;switch(l){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0<l;)t[s+l]=t[s+l-1],l--}t[s]=o}}function ri(t,e,i,r,n,a){var o=0,s=0,h=1;if(0<a(t,e[i+n])){for(s=r-n;h<s&&0<a(t,e[i+n+h]);)(h=1+((o=h)<<1))<=0&&(h=s);s<h&&(h=s),o+=n,h+=n}else{for(s=n+1;h<s&&a(t,e[i+n-h])<=0;)(h=1+((o=h)<<1))<=0&&(h=s);s<h&&(h=s);var l=o;o=n-h,h=n-l}for(o++;o<h;){var u=o+(h-o>>>1);0<a(t,e[i+u])?o=u+1:h=u}return h}function ni(t,e,i,r,n,a){var o=0,s=0,h=1;if(a(t,e[i+n])<0){for(s=n+1;h<s&&a(t,e[i+n-h])<0;)(h=1+((o=h)<<1))<=0&&(h=s);s<h&&(h=s);var l=o;o=n-h,h=n-l}else{for(s=r-n;h<s&&0<=a(t,e[i+n+h]);)(h=1+((o=h)<<1))<=0&&(h=s);s<h&&(h=s),o+=n,h+=n}for(o++;o<h;){var u=o+(h-o>>>1);a(t,e[i+u])<0?h=u:o=u+1}return h}function ai(p,v){var o,s,g=ti,h=0,_=[];function e(t){var e=o[t],i=s[t],r=o[t+1],n=s[t+1];s[t]=i+n,t===h-3&&(o[t+1]=o[t+2],s[t+1]=s[t+2]),h--;var a=ni(p[r],p,e,i,0,v);e+=a,0!==(i-=a)&&0!==(n=ri(p[e+i-1],p,r,n,n-1,v))&&(i<=n?function(t,e,i,r){var n=0;for(n=0;n<e;n++)_[n]=p[t+n];var a=0,o=i,s=t;if(p[s++]=p[o++],0==--r){for(n=0;n<e;n++)p[s+n]=_[a+n];return}if(1===e){for(n=0;n<r;n++)p[s+n]=p[o+n];return p[s+r]=_[a]}var h,l,u,c=g;for(;;){l=h=0,u=!1;do{if(v(p[o],_[a])<0){if(p[s++]=p[o++],l++,(h=0)==--r){u=!0;break}}else if(p[s++]=_[a++],h++,l=0,1==--e){u=!0;break}}while((h|l)<c);if(u)break;do{if(0!==(h=ni(p[o],_,a,e,0,v))){for(n=0;n<h;n++)p[s+n]=_[a+n];if(s+=h,a+=h,(e-=h)<=1){u=!0;break}}if(p[s++]=p[o++],0==--r){u=!0;break}if(0!==(l=ri(_[a],p,o,r,0,v))){for(n=0;n<l;n++)p[s+n]=p[o+n];if(s+=l,o+=l,0===(r-=l)){u=!0;break}}if(p[s++]=_[a++],1==--e){u=!0;break}c--}while(ti<=h||ti<=l);if(u)break;c<0&&(c=0),c+=2}if((g=c)<1&&(g=1),1===e){for(n=0;n<r;n++)p[s+n]=p[o+n];p[s+r]=_[a]}else{if(0===e)throw new Error;for(n=0;n<e;n++)p[s+n]=_[a+n]}}(e,i,r,n):function(t,e,i,r){var n=0;for(n=0;n<r;n++)_[n]=p[i+n];var a=t+e-1,o=r-1,s=i+r-1,h=0,l=0;if(p[s--]=p[a--],0==--e){for(h=s-(r-1),n=0;n<r;n++)p[h+n]=_[n];return}if(1===r){for(l=(s-=e)+1,h=(a-=e)+1,n=e-1;0<=n;n--)p[l+n]=p[h+n];return p[s]=_[o]}var u=g;for(;;){var c=0,f=0,d=!1;do{if(v(_[o],p[a])<0){if(p[s--]=p[a--],c++,(f=0)==--e){d=!0;break}}else if(p[s--]=_[o--],f++,c=0,1==--r){d=!0;break}}while((c|f)<u);if(d)break;do{if(0!==(c=e-ni(_[o],p,t,e,e-1,v))){for(e-=c,l=(s-=c)+1,h=(a-=c)+1,n=c-1;0<=n;n--)p[l+n]=p[h+n];if(0===e){d=!0;break}}if(p[s--]=_[o--],1==--r){d=!0;break}if(0!==(f=r-ri(p[a],_,0,r,r-1,v))){for(r-=f,l=(s-=f)+1,h=(o-=f)+1,n=0;n<f;n++)p[l+n]=_[h+n];if(r<=1){d=!0;break}}if(p[s--]=p[a--],0==--e){d=!0;break}u--}while(ti<=c||ti<=f);if(d)break;u<0&&(u=0),u+=2}(g=u)<1&&(g=1);if(1===r){for(l=(s-=e)+1,h=(a-=e)+1,n=e-1;0<=n;n--)p[l+n]=p[h+n];p[s]=_[o]}else{if(0===r)throw new Error;for(h=s-(r-1),n=0;n<r;n++)p[h+n]=_[n]}}(e,i,r,n))}o=[],s=[],this.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)}},this.forceMergeRuns=function(){for(;1<h;){var t=h-2;0<t&&s[t-1]<s[t+1]&&t--,e(t)}},this.pushRun=function(t,e){o[h]=t,s[h]=e,h+=1}}function oi(t,e,i,r){i=i||0;var n=(r=r||t.length)-i;if(!(n<2)){var a=0;if(n<Je)ii(t,i,r,i+(a=ei(t,i,r,e)),e);else{var o=new ai(t,e),s=function(t){for(var e=0;Je<=t;)e|=1&t,t>>=1;return t+e}(n);do{if((a=ei(t,i,r,e))<s){var h=n;s<h&&(h=s),ii(t,i,i+h,i+a,e),a=h}o.pushRun(i,a),o.mergeRuns(),n-=a,i+=a}while(0!==n);o.forceMergeRuns()}}}function si(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function hi(){this._roots=[],this._displayList=[],this._displayListLen=0}hi.prototype={constructor:hi,traverse:function(t,e){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,e)},getDisplayList:function(t,e){return e=e||!1,t&&this.updateDisplayList(e),this._displayList},updateDisplayList:function(t){this._displayListLen=0;for(var e=this._roots,i=this._displayList,r=0,n=e.length;r<n;r++)this._updateAndAddDisplayable(e[r],null,t);i.length=this._displayListLen,_.canvasSupported&&oi(i,si)},_updateAndAddDisplayable:function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var r=t.clipPath;if(r){e=e?e.slice():[];for(var n=r,a=t;n;)n.parent=a,n.updateTransform(),e.push(n),n=(a=n).clipPath}if(t.isGroup){for(var o=t._children,s=0;s<o.length;s++){var h=o[s];t.__dirty&&(h.__dirty=!0),this._updateAndAddDisplayable(h,e,i)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof Ke&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(null==t){for(var e=0;e<this._roots.length;e++){var i=this._roots[e];i instanceof Ke&&i.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(t instanceof Array){e=0;for(var r=t.length;e<r;e++)this.delRoot(t[e])}else{var n=w(this._roots,t);0<=n&&(this.delFromStorage(t),this._roots.splice(n,1),t instanceof Ke&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:si};var li={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},ui=function(t,e,i){return li.hasOwnProperty(e)?i*t.dpr:i},ci={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},fi=9,di=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],pi=function(t){this.extendFrom(t,!1)};function vi(t,e,i){var r=null==e.x?0:e.x,n=null==e.x2?1:e.x2,a=null==e.y?0:e.y,o=null==e.y2?0:e.y2;return e.global||(r=r*i.width+i.x,n=n*i.width+i.x,a=a*i.height+i.y,o=o*i.height+i.y),r=isNaN(r)?0:r,n=isNaN(n)?1:n,a=isNaN(a)?0:a,o=isNaN(o)?0:o,t.createLinearGradient(r,a,n,o)}function gi(t,e,i){var r=i.width,n=i.height,a=Math.min(r,n),o=null==e.x?.5:e.x,s=null==e.y?.5:e.y,h=null==e.r?.5:e.r;return e.global||(o=o*r+i.x,s=s*n+i.y,h*=a),t.createRadialGradient(o,s,0,o,s,h)}pi.prototype={constructor:pi,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){var r=this,n=i&&i.style,a=!n||t.__attrCachedBy!==ci.STYLE_BIND;t.__attrCachedBy=ci.STYLE_BIND;for(var o=0;o<di.length;o++){var s=di[o],h=s[0];!a&&r[h]===n[h]||(t[h]=ui(t,h,r[h]||s[1]))}if(!a&&r.fill===n.fill||(t.fillStyle=r.fill),!a&&r.stroke===n.stroke||(t.strokeStyle=r.stroke),!a&&r.opacity===n.opacity||(t.globalAlpha=null==r.opacity?1:r.opacity),!a&&r.blend===n.blend||(t.globalCompositeOperation=r.blend||"source-over"),this.hasStroke()){var l=r.lineWidth;t.lineWidth=l/(this.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1)}},hasFill:function(){var t=this.fill;return null!=t&&"none"!==t},hasStroke:function(){var t=this.stroke;return null!=t&&"none"!==t&&0<this.lineWidth},extendFrom:function(t,e){if(t)for(var i in t)!t.hasOwnProperty(i)||!0!==e&&(!1===e?this.hasOwnProperty(i):null==t[i])||(this[i]=t[i])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,i){for(var r=("radial"===e.type?gi:vi)(t,e,i),n=e.colorStops,a=0;a<n.length;a++)r.addColorStop(n[a].offset,n[a].color);return r}};for(var _i=pi.prototype,yi=0;yi<di.length;yi++){var mi=di[yi];mi[0]in _i||(_i[mi[0]]=mi[1])}pi.getGradient=_i.getGradient;function xi(t,e){this.image=t,this.repeat=e,this.type="pattern"}function wi(){return!1}function bi(t,e,i){var r=y(),n=e.getWidth(),a=e.getHeight(),o=r.style;return o&&(o.position="absolute",o.left=0,o.top=0,o.width=n+"px",o.height=a+"px",r.setAttribute("data-zr-dom-id",t)),r.width=n*i,r.height=a*i,r}function ki(t,e,i){var r;i=i||Ee,"string"==typeof t?r=bi(t,e,i):L(t)&&(t=(r=t).id),this.id=t;var n=(this.dom=r).style;n&&(r.onselectstart=wi,n["-webkit-user-select"]="none",n["user-select"]="none",n["-webkit-touch-callout"]="none",n["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",n.padding=0,n.margin=0,n["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=i}ki.prototype={constructor:ki,__dirty:!0,__used:!(xi.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")}),__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var t=this.dpr;this.domBack=bi("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},resize:function(t,e){var i=this.dpr,r=this.dom,n=r.style,a=this.domBack;n&&(n.width=t+"px",n.height=e+"px"),r.width=t*i,r.height=e*i,a&&(a.width=t*i,a.height=e*i,1!==i&&this.ctxBack.scale(i,i))},clear:function(t,e){var i,r=this.dom,n=this.ctx,a=r.width,o=r.height,s=(e=e||this.clearColor,this.motionBlur&&!t),h=this.lastFrameAlpha,l=this.dpr;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(r,0,0,a/l,o/l)),n.clearRect(0,0,a,o),e&&"transparent"!==e&&(e.colorStops?(i=e.__canvasGradient||pi.getGradient(n,e,{x:0,y:0,width:a,height:o}),e.__canvasGradient=i):e.image&&(i=xi.prototype.getCanvasPattern.call(e,n)),n.save(),n.fillStyle=i||e,n.fillRect(0,0,a,o),n.restore());if(s){var u=this.domBack;n.save(),n.globalAlpha=h,n.drawImage(u,0,0,a,o),n.restore()}}};var Ti="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},Si=new Kt(50);function Ci(t){if("string"!=typeof t)return t;var e=Si.get(t);return e&&e.image}function Mi(t,e,i,r,n){if(t){if("string"!=typeof t)return t;if(e&&e.__zrImageSrc===t||!i)return e;var a=Si.get(t),o={hostEl:i,cb:r,cbPayload:n};return a?Pi(e=a.image)||a.pending.push(o):((e=new Image).onload=e.onerror=Ai,Si.put(t,e.__cachedImgObj={image:e,pending:[o]}),e.src=e.__zrImageSrc=t),e}return e}function Ai(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var i=t.pending[e],r=i.cb;r&&r(this,i.cbPayload),i.hostEl.dirty()}t.pending.length=0}function Pi(t){return t&&t.width&&t.height}var Li={},zi=0,Bi=5e3,Di=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,Ii="12px sans-serif",Oi={};function Ri(t,e){var i=t+":"+(e=e||Ii);if(Li[i])return Li[i];for(var r,n,a=(t+"").split("\n"),o=0,s=0,h=a.length;s<h;s++)o=Math.max((r=a[s],n=e,Oi.measureText(r,n)).width,o);return Bi<zi&&(zi=0,Li={}),zi++,Li[i]=o}function Ei(t,e,i,r,n,a,o,s){return o?function(t,e,i,r,n,a,o,s){var h=Ui(t,{rich:o,truncate:s,font:e,textAlign:i,textPadding:n,textLineHeight:a}),l=h.outerWidth,u=h.outerHeight,c=Fi(0,l,i),f=Hi(0,u,r);return new $e(c,f,l,u)}(t,e,i,r,n,a,o,s):function(t,e,i,r,n,a,o){var s=Yi(t,e,n,a,o),h=Ri(t,e);n&&(h+=n[1]+n[3]);var l=s.outerHeight,u=Fi(0,h,i),c=Hi(0,l,r),f=new $e(u,c,h,l);return f.lineHeight=s.lineHeight,f}(t,e,i,r,n,a,s)}function Fi(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function Hi(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function Ni(t,e,i){var r=e.textPosition,n=e.textDistance,a=i.x,o=i.y;n=n||0;var s=i.height,h=i.width,l=s/2,u="left",c="top";switch(r){case"left":a-=n,o+=l,u="right",c="middle";break;case"right":a+=n+h,o+=l,c="middle";break;case"top":a+=h/2,o-=n,u="center",c="bottom";break;case"bottom":a+=h/2,o+=s+n,u="center";break;case"inside":a+=h/2,o+=l,u="center",c="middle";break;case"insideLeft":a+=n,o+=l,c="middle";break;case"insideRight":a+=h-n,o+=l,u="right",c="middle";break;case"insideTop":a+=h/2,o+=n,u="center";break;case"insideBottom":a+=h/2,o+=s-n,u="center",c="bottom";break;case"insideTopLeft":a+=n,o+=n;break;case"insideTopRight":a+=h-n,o+=n,u="right";break;case"insideBottomLeft":a+=n,o+=s-n,c="bottom";break;case"insideBottomRight":a+=h-n,o+=s-n,u="right",c="bottom"}return(t=t||{}).x=a,t.y=o,t.textAlign=u,t.textVerticalAlign=c,t}function Wi(t,e,i,r,n){if(!e)return"";var a=(t+"").split("\n");n=Vi(e,i,r,n);for(var o=0,s=a.length;o<s;o++)a[o]=Xi(a[o],n);return a.join("\n")}function Vi(t,e,i,r){(r=v({},r)).font=e;i=I(i,"...");r.maxIterations=I(r.maxIterations,2);var n=r.minChar=I(r.minChar,0);r.cnCharWidth=Ri("国",e);var a=r.ascCharWidth=Ri("a",e);r.placeholder=I(r.placeholder,"");for(var o=t=Math.max(0,t-1),s=0;s<n&&a<=o;s++)o-=a;var h=Ri(i,e);return o<h&&(i="",h=0),o=t-h,r.ellipsis=i,r.ellipsisWidth=h,r.contentWidth=o,r.containerWidth=t,r}function Xi(t,e){var i=e.containerWidth,r=e.font,n=e.contentWidth;if(!i)return"";var a=Ri(t,r);if(a<=i)return t;for(var o=0;;o++){if(a<=n||o>=e.maxIterations){t+=e.ellipsis;break}var s=0===o?qi(t,n,e.ascCharWidth,e.cnCharWidth):0<a?Math.floor(t.length*n/a):0;a=Ri(t=t.substr(0,s),r)}return""===t&&(t=e.placeholder),t}function qi(t,e,i,r){for(var n=0,a=0,o=t.length;a<o&&n<e;a++){var s=t.charCodeAt(a);n+=0<=s&&s<=127?i:r}return a}function ji(t){return Ri("国",t)}function Yi(t,e,i,r,n){null!=t&&(t+="");var a=I(r,ji(e)),o=t?t.split("\n"):[],s=o.length*a,h=s,l=!0;if(i&&(h+=i[0]+i[2]),t&&n){l=!1;var u=n.outerHeight,c=n.outerWidth;if(null!=u&&u<h)t="",o=[];else if(null!=c)for(var f=Vi(c-(i?i[1]+i[3]:0),e,n.ellipsis,{minChar:n.minChar,placeholder:n.placeholder}),d=0,p=o.length;d<p;d++)o[d]=Xi(o[d],f)}return{lines:o,height:s,outerHeight:h,lineHeight:a,canCacheByTextString:l}}function Ui(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var r,n=Di.lastIndex=0;null!=(r=Di.exec(t));){var a=r.index;n<a&&Gi(i,t.substring(n,a)),Gi(i,r[2],r[1]),n=Di.lastIndex}n<t.length&&Gi(i,t.substring(n,t.length));var o=i.lines,s=0,h=0,l=[],u=e.textPadding,c=e.truncate,f=c&&c.outerWidth,d=c&&c.outerHeight;u&&(null!=f&&(f-=u[1]+u[3]),null!=d&&(d-=u[0]+u[2]));for(var p=0;p<o.length;p++){for(var v=o[p],g=0,_=0,y=0;y<v.tokens.length;y++){var m=(P=v.tokens[y]).styleName&&e.rich[P.styleName]||{},x=P.textPadding=m.textPadding,w=P.font=m.font||e.font,b=P.textHeight=I(m.textHeight,ji(w));if(x&&(b+=x[0]+x[2]),P.height=b,P.lineHeight=O(m.textLineHeight,e.textLineHeight,b),P.textAlign=m&&m.textAlign||e.textAlign,P.textVerticalAlign=m&&m.textVerticalAlign||"middle",null!=d&&s+P.lineHeight>d)return{lines:[],width:0,height:0};P.textWidth=Ri(P.text,w);var k=m.textWidth,T=null==k||"auto"===k;if("string"==typeof k&&"%"===k.charAt(k.length-1))P.percentWidth=k,l.push(P),k=0;else{if(T){k=P.textWidth;var S=m.textBackgroundColor,C=S&&S.image;C&&Pi(C=Ci(C))&&(k=Math.max(k,C.width*b/C.height))}var M=x?x[1]+x[3]:0;k+=M;var A=null!=f?f-_:null;null!=A&&A<k&&(!T||A<M?(P.text="",P.textWidth=k=0):(P.text=Wi(P.text,A-M,w,c.ellipsis,{minChar:c.minChar}),P.textWidth=Ri(P.text,w),k=P.textWidth+M))}_+=P.width=k,m&&(g=Math.max(g,P.lineHeight))}v.width=_,s+=v.lineHeight=g,h=Math.max(h,_)}i.outerWidth=i.width=I(e.textWidth,h),i.outerHeight=i.height=I(e.textHeight,s),u&&(i.outerWidth+=u[1]+u[3],i.outerHeight+=u[0]+u[2]);for(p=0;p<l.length;p++){var P,L=(P=l[p]).percentWidth;P.width=parseInt(L,10)/100*h}return i}function Gi(t,e,i){for(var r=""===e,n=e.split("\n"),a=t.lines,o=0;o<n.length;o++){var s=n[o],h={styleName:i,text:s,isLineHolder:!s&&!r};if(o)a.push({tokens:[h]});else{var l=(a[a.length-1]||(a[0]={tokens:[]})).tokens,u=l.length;1===u&&l[0].isLineHolder?l[0]=h:!s&&u&&!r||l.push(h)}}}function Zi(t,e){var i,r,n,a,o,s=e.x,h=e.y,l=e.width,u=e.height,c=e.r;l<0&&(s+=l,l=-l),u<0&&(h+=u,u=-u),"number"==typeof c?i=r=n=a=c:c instanceof Array?1===c.length?i=r=n=a=c[0]:2===c.length?(i=n=c[0],r=a=c[1]):3===c.length?(i=c[0],r=a=c[1],n=c[2]):(i=c[0],r=c[1],n=c[2],a=c[3]):i=r=n=a=0,l<i+r&&(i*=l/(o=i+r),r*=l/o),l<n+a&&(n*=l/(o=n+a),a*=l/o),u<r+n&&(r*=u/(o=r+n),n*=u/o),u<i+a&&(i*=u/(o=i+a),a*=u/o),t.moveTo(s+i,h),t.lineTo(s+l-r,h),0!==r&&t.arc(s+l-r,h+r,r,-Math.PI/2,0),t.lineTo(s+l,h+u-n),0!==n&&t.arc(s+l-n,h+u-n,n,0,Math.PI/2),t.lineTo(s+a,h+u),0!==a&&t.arc(s+a,h+u-a,a,Math.PI/2,Math.PI),t.lineTo(s,h+i),0!==i&&t.arc(s+i,h+i,i,Math.PI,1.5*Math.PI)}Oi.measureText=function(t,e){var i=x();return i.font=e||Ii,i.measureText(t)};var Qi=Ii,$i={left:1,right:1,center:1},Ki={top:1,bottom:1,middle:1},Ji=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],tr={},er={};function ir(t){return rr(t),T(t.rich,rr),t}function rr(t){if(t){t.font=function(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&E(e)||t.textFont||t.font}(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||$i[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||Ki[i]?i:"top",t.textPadding&&(t.textPadding=R(t.textPadding))}}function nr(t,e,i,r,n,a){r.rich?function(t,e,i,r,n,a){a!==fi&&(e.__attrCachedBy=ci.NONE);var o=t.__textCotentBlock;o&&!t.__dirtyText||(o=t.__textCotentBlock=Ui(i,r));!function(t,e,i,r,n){var a=i.width,o=i.outerWidth,s=i.outerHeight,h=r.textPadding,l=ur(er,t,r,n),u=l.baseX,c=l.baseY,f=l.textAlign,d=l.textVerticalAlign;ar(e,r,n,u,c);var p=Fi(u,o,f),v=Hi(c,s,d),g=p,_=v;h&&(g+=h[3],_+=h[0]);var y=g+a;sr(r)&&hr(t,e,r,p,v,o,s);for(var m=0;m<i.lines.length;m++){for(var x,w=i.lines[m],b=w.tokens,k=b.length,T=w.lineHeight,S=w.width,C=0,M=g,A=y,P=k-1;C<k&&(!(x=b[C]).textAlign||"left"===x.textAlign);)or(t,e,x,r,T,_,M,"left"),S-=x.width,M+=x.width,C++;for(;0<=P&&"right"===(x=b[P]).textAlign;)or(t,e,x,r,T,_,A,"right"),S-=x.width,A-=x.width,P--;for(M+=(a-(M-g)-(y-A)-S)/2;C<=P;)x=b[C],or(t,e,x,r,T,_,M+x.width/2,"center"),M+=x.width,C++;_+=T}}(t,e,o,r,n)}(t,e,i,r,n,a):function(t,e,i,r,n,a){var o,s=sr(r),h=!1,l=e.__attrCachedBy===ci.PLAIN_TEXT;a!==fi?(a&&(o=a.style,h=!s&&l&&o),e.__attrCachedBy=s?ci.NONE:ci.PLAIN_TEXT):l&&(e.__attrCachedBy=ci.NONE);var u=r.font||Qi;h&&u===(o.font||Qi)||(e.font=u);var c=t.__computedFont;t.__styleFont!==u&&(t.__styleFont=u,c=t.__computedFont=e.font);var f=r.textPadding,d=r.textLineHeight,p=t.__textCotentBlock;p&&!t.__dirtyText||(p=t.__textCotentBlock=Yi(i,c,f,d,r.truncate));var v=p.outerHeight,g=p.lines,_=p.lineHeight,y=ur(er,t,r,n),m=y.baseX,x=y.baseY,w=y.textAlign||"left",b=y.textVerticalAlign;ar(e,r,n,m,x);var k=Hi(x,v,b),T=m,S=k;if(s||f){var C=Ri(i,c);f&&(C+=f[1]+f[3]);var M=Fi(m,C,w);s&&hr(t,e,r,M,k,C,v),f&&(T=vr(m,w,f),S+=f[0])}e.textAlign=w,e.textBaseline="middle",e.globalAlpha=r.opacity||1;for(var A=0;A<Ji.length;A++){var P=Ji[A],L=P[0],z=P[1],B=r[L];h&&B===o[L]||(e[z]=ui(e,z,B||P[2]))}S+=_/2;var D=r.textStrokeWidth,I=h?o.textStrokeWidth:null,O=!h||D!==I,R=!h||O||r.textStroke!==o.textStroke,E=fr(r.textStroke,D),F=dr(r.textFill);E&&(O&&(e.lineWidth=D),R&&(e.strokeStyle=E));F&&(h&&r.textFill===o.textFill||(e.fillStyle=F));if(1===g.length)E&&e.strokeText(g[0],T,S),F&&e.fillText(g[0],T,S);else for(A=0;A<g.length;A++)E&&e.strokeText(g[A],T,S),F&&e.fillText(g[A],T,S),S+=_}(t,e,i,r,n,a)}function ar(t,e,i,r,n){if(i&&e.textRotation){var a=e.textOrigin;"center"===a?(r=i.width/2+i.x,n=i.height/2+i.y):a&&(r=a[0]+i.x,n=a[1]+i.y),t.translate(r,n),t.rotate(-e.textRotation),t.translate(-r,-n)}}function or(t,e,i,r,n,a,o,s){var h=r.rich[i.styleName]||{};h.text=i.text;var l=i.textVerticalAlign,u=a+n/2;"top"===l?u=a+i.height/2:"bottom"===l&&(u=a+n-i.height/2),!i.isLineHolder&&sr(h)&&hr(t,e,h,"right"===s?o-i.width:"center"===s?o-i.width/2:o,u-i.height/2,i.width,i.height);var c=i.textPadding;c&&(o=vr(o,s,c),u-=i.height/2-c[2]-i.textHeight/2),cr(e,"shadowBlur",O(h.textShadowBlur,r.textShadowBlur,0)),cr(e,"shadowColor",h.textShadowColor||r.textShadowColor||"transparent"),cr(e,"shadowOffsetX",O(h.textShadowOffsetX,r.textShadowOffsetX,0)),cr(e,"shadowOffsetY",O(h.textShadowOffsetY,r.textShadowOffsetY,0)),cr(e,"textAlign",s),cr(e,"textBaseline","middle"),cr(e,"font",i.font||Qi);var f=fr(h.textStroke||r.textStroke,p),d=dr(h.textFill||r.textFill),p=I(h.textStrokeWidth,r.textStrokeWidth);f&&(cr(e,"lineWidth",p),cr(e,"strokeStyle",f),e.strokeText(i.text,o,u)),d&&(cr(e,"fillStyle",d),e.fillText(i.text,o,u))}function sr(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function hr(t,e,i,r,n,a,o){var s=i.textBackgroundColor,h=i.textBorderWidth,l=i.textBorderColor,u=P(s);if(cr(e,"shadowBlur",i.textBoxShadowBlur||0),cr(e,"shadowColor",i.textBoxShadowColor||"transparent"),cr(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),cr(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),u||h&&l){e.beginPath();var c=i.textBorderRadius;c?Zi(e,{x:r,y:n,width:a,height:o,r:c}):e.rect(r,n,a,o),e.closePath()}if(u)if(cr(e,"fillStyle",s),null!=i.fillOpacity){var f=e.globalAlpha;e.globalAlpha=i.fillOpacity*i.opacity,e.fill(),e.globalAlpha=f}else e.fill();else if(L(s)){var d=s.image;(d=Mi(d,null,t,lr,s))&&Pi(d)&&e.drawImage(d,r,n,a,o)}if(h&&l)if(cr(e,"lineWidth",h),cr(e,"strokeStyle",l),null!=i.strokeOpacity){f=e.globalAlpha;e.globalAlpha=i.strokeOpacity*i.opacity,e.stroke(),e.globalAlpha=f}else e.stroke()}function lr(t,e){e.image=t}function ur(t,e,i,r){var n=i.x||0,a=i.y||0,o=i.textAlign,s=i.textVerticalAlign;if(r){var h=i.textPosition;if(h instanceof Array)n=r.x+pr(h[0],r.width),a=r.y+pr(h[1],r.height);else{var l=e&&e.calculateTextPosition?e.calculateTextPosition(tr,i,r):Ni(tr,i,r);n=l.x,a=l.y,o=o||l.textAlign,s=s||l.textVerticalAlign}var u=i.textOffset;u&&(n+=u[0],a+=u[1])}return(t=t||{}).baseX=n,t.baseY=a,t.textAlign=o,t.textVerticalAlign=s,t}function cr(t,e,i){return t[e]=ui(t,e,i),t[e]}function fr(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function dr(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function pr(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t}function vr(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function gr(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function _r(){}var yr=new $e;function mr(t){for(var e in t=t||{},Xe.call(this,t),t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new pi(t.style,this),this._rect=null,this.__clipPaths=null}function xr(t){mr.call(this,t)}mr.prototype={constructor:mr,type:"displayable",__dirty:!0,invisible:!(_r.prototype={constructor:_r,drawRectText:function(t,e){var i=this.style;e=i.textRect||e,this.__dirty&&ir(i);var r=i.text;if(null!=r&&(r+=""),gr(r,i)){t.save();var n=this.transform;i.transformText?this.setTransform(t):n&&(yr.copy(e),yr.applyTransform(n),e=yr),nr(this,t,r,i,e,fi),t.restore()}}}),z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var i=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(i[0],i[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?Xe.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new pi(t,this),this.dirty(!1),this},calculateTextPosition:null},b(mr,Xe),k(mr,_r),xr.prototype={constructor:xr,type:"image",brush:function(t,e){var i=this.style,r=i.image;i.bind(t,this,e);var n=this._image=Mi(r,this._image,this,this.onload);if(n&&Pi(n)){var a=i.x||0,o=i.y||0,s=i.width,h=i.height,l=n.width/n.height;if(null==s&&null!=h?s=h*l:null==h&&null!=s?h=s/l:null==s&&null==h&&(s=n.width,h=n.height),this.setTransform(t),i.sWidth&&i.sHeight){var u=i.sx||0,c=i.sy||0;t.drawImage(n,u,c,i.sWidth,i.sHeight,a,o,s,h)}else if(i.sx&&i.sy){var f=s-(u=i.sx),d=h-(c=i.sy);t.drawImage(n,u,c,f,d,a,o,s,h)}else t.drawImage(n,a,o,s,h);null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new $e(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},b(xr,mr);var wr=314159;function br(t){return parseInt(t,10)}var kr=new $e(0,0,0,0),Tr=new $e(0,0,0,0);function Sr(t,e,i){this.type="canvas";var r=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=v({},i||{}),this.dpr=i.devicePixelRatio||Ee,this._singleCanvas=r;var n=(this.root=t).style;n&&(n["-webkit-tap-highlight-color"]="transparent",n["-webkit-user-select"]=n["user-select"]=n["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var a=this._zlevelList=[],o=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,r){var s=t.width,h=t.height;null!=i.width&&(s=i.width),null!=i.height&&(h=i.height),this.dpr=i.devicePixelRatio||1,t.width=s*this.dpr,t.height=h*this.dpr,this._width=s,this._height=h;var l=new ki(t,this,this.dpr);l.__builtin__=!0,l.initContext(),(o[wr]=l).zlevel=wr,a.push(wr),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var u=this._domRoot=function(t,e){var i=document.createElement("div");return i.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}(this._width,this._height);t.appendChild(u)}this._hoverlayer=null,this._hoverElements=[]}Sr.prototype={constructor:Sr,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(t){var e=this.storage.getDisplayList(!0),i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var r=0;r<i.length;r++){var n=i[r],a=this._layers[n];if(!a.__builtin__&&a.refresh){var o=0===r?this._backgroundColor:null;a.refresh(o)}}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var i=new t.constructor({style:t.style,shape:t.shape,z:t.z,z2:t.z2,silent:t.silent});return(i.__from=t).__hoverMir=i,e&&i.setStyle(e),this._hoverElements.push(i),i}},removeHover:function(t){var e=t.__hoverMir,i=this._hoverElements,r=w(i,e);0<=r&&i.splice(r,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;i<e.length;i++){var r=e[i].__from;r&&(r.__hoverMir=null)}e.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,i=this._hoverlayer;if(i&&i.clear(),e){oi(t,this.storage.displayableSortFunc);var r={};(i=i||(this._hoverlayer=this.getLayer(1e5))).ctx.save();for(var n=0;n<e;){var a=t[n],o=a.__from;o&&o.__zr?(n++,o.invisible||(a.transform=o.transform,a.invTransform=o.invTransform,a.__clipPaths=o.__clipPaths,this._doPaintEl(a,i,!0,r))):(t.splice(n,1),o.__hoverMir=null,e--)}i.ctx.restore()}},getHoverLayer:function(){return this.getLayer(1e5)},_paintList:function(t,e,i){if(this._redrawId===i){e=e||!1,this._updateLayerStatus(t);var r=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!r){var n=this;Ti(function(){n._paintList(t,e,i)})}}},_compositeManually:function(){var e=this.getLayer(wr).ctx,i=this._domRoot.width,r=this._domRoot.height;e.clearRect(0,0,i,r),this.eachBuiltinLayer(function(t){t.virtual&&e.drawImage(t.dom,0,0,i,r)})},_doPaintList:function(t,e){for(var i=[],r=0;r<this._zlevelList.length;r++){var n=this._zlevelList[r];(s=this._layers[n]).__builtin__&&s!==this._hoverlayer&&(s.__dirty||e)&&i.push(s)}for(var a=!0,o=0;o<i.length;o++){var s,h=(s=i[o]).ctx,l={};h.save();var u=e?s.__startIndex:s.__drawIndex,c=!e&&s.incremental&&Date.now,f=c&&Date.now(),d=s.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(s.__startIndex===s.__endIndex)s.clear(!1,d);else if(u===s.__startIndex){var p=t[u];p.incremental&&p.notClear&&!e||s.clear(!1,d)}-1===u&&(console.error("For some unknown reason. drawIndex is -1"),u=s.__startIndex);for(var v=u;v<s.__endIndex;v++){var g=t[v];if(this._doPaintEl(g,s,e,l),g.__dirty=g.__dirtyText=!1,c)if(15<Date.now()-f)break}s.__drawIndex=v,s.__drawIndex<s.__endIndex&&(a=!1),l.prevElClipPaths&&h.restore(),h.restore()}return _.wxa&&T(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),a},_doPaintEl:function(t,e,i,r){var n=e.ctx,a=t.transform;if((e.__dirty||i)&&!t.invisible&&0!==t.style.opacity&&(!a||a[0]||a[3])&&(!t.culling||!function(t,e,i){return kr.copy(t.getBoundingRect()),t.transform&&kr.applyTransform(t.transform),Tr.width=e,Tr.height=i,!kr.intersect(Tr)}(t,this._width,this._height))){var o=t.__clipPaths,s=r.prevElClipPaths;s&&!function(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i<t.length;i++)if(t[i]!==e[i])return!0;return!1}(o,s)||(s&&(n.restore(),r.prevElClipPaths=null,r.prevEl=null),o&&(n.save(),function(t,e){for(var i=0;i<t.length;i++){var r=t[i];r.setTransform(e),e.beginPath(),r.buildPath(e,r.shape),e.clip(),r.restoreTransform(e)}}(o,n),r.prevElClipPaths=o)),t.beforeBrush&&t.beforeBrush(n),t.brush(n,r.prevEl||null),(r.prevEl=t).afterBrush&&t.afterBrush(n)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=wr);var i=this._layers[t];return i||((i=new ki("zr_"+t,this,this.dpr)).zlevel=t,i.__builtin__=!0,this._layerConfig[t]&&p(i,this._layerConfig[t],!0),e&&(i.virtual=e),this.insertLayer(t,i),i.initContext()),i},insertLayer:function(t,e){var i=this._layers,r=this._zlevelList,n=r.length,a=null,o=-1,s=this._domRoot;if(i[t])Ne("ZLevel "+t+" has been used already");else if(function(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}(e)){if(0<n&&t>r[0]){for(o=0;o<n-1&&!(r[o]<t&&r[o+1]>t);o++);a=i[r[o]]}if(r.splice(o+1,0,t),!(i[t]=e).virtual)if(a){var h=a.dom;h.nextSibling?s.insertBefore(e.dom,h.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else Ne("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,r,n=this._zlevelList;for(r=0;r<n.length;r++)i=n[r],t.call(e,this._layers[i],i)},eachBuiltinLayer:function(t,e){var i,r,n,a=this._zlevelList;for(n=0;n<a.length;n++)r=a[n],(i=this._layers[r]).__builtin__&&t.call(e,i,r)},eachOtherLayer:function(t,e){var i,r,n,a=this._zlevelList;for(n=0;n<a.length;n++)r=a[n],(i=this._layers[r]).__builtin__||t.call(e,i,r)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){function e(t){r&&(r.__endIndex!==t&&(r.__dirty=!0),r.__endIndex=t)}if(this.eachBuiltinLayer(function(t,e){t.__dirty=t.__used=!1}),this._singleCanvas)for(var i=1;i<t.length;i++){if((a=t[i]).zlevel!==t[i-1].zlevel||a.incremental){this._needsManuallyCompositing=!0;break}}var r=null,n=0;for(i=0;i<t.length;i++){var a,o,s=(a=t[i]).zlevel;a.incremental?((o=this.getLayer(s+.001,this._needsManuallyCompositing)).incremental=!0,n=1):o=this.getLayer(s+(0<n?.01:0),this._needsManuallyCompositing),o.__builtin__||Ne("ZLevel "+s+" has been used by unkown layer "+o.id),o!==r&&(o.__used=!0,o.__startIndex!==i&&(o.__dirty=!0),o.__startIndex=i,o.incremental?o.__drawIndex=-1:o.__drawIndex=i,e(i),r=o),a.__dirty&&(o.__dirty=!0,o.incremental&&o.__drawIndex<0&&(o.__drawIndex=i))}e(i),this.eachBuiltinLayer(function(t,e){!t.__used&&0<t.getElementCount()&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?p(i[t],e,!0):i[t]=e;for(var r=0;r<this._zlevelList.length;r++){var n=this._zlevelList[r];if(n===t||n===t+.01)p(this._layers[n],i[t],!0)}}},delLayer:function(t){var e=this._layers,i=this._zlevelList,r=e[t];r&&(r.dom.parentNode.removeChild(r.dom),delete e[t],i.splice(w(i,t),1))},resize:function(e,i){if(this._domRoot.style){var t=this._domRoot;t.style.display="none";var r=this._opts;if(null!=e&&(r.width=e),null!=i&&(r.height=i),e=this._getSize(0),i=this._getSize(1),t.style.display="",this._width!==e||i!==this._height){for(var n in t.style.width=e+"px",t.style.height=i+"px",this._layers)this._layers.hasOwnProperty(n)&&this._layers[n].resize(e,i);T(this._progressiveLayers,function(t){t.resize(e,i)}),this.refresh(!0)}this._width=e,this._height=i}else{if(null==e||null==i)return;this._width=e,this._height=i,this.getLayer(wr).resize(e,i)}return this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[wr].dom;var e=new ki("image",this,t.pixelRatio||this.dpr);if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,r=e.dom.height,n=e.ctx;this.eachLayer(function(t){t.__builtin__?n.drawImage(t.dom,0,0,i,r):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())})}else for(var a={},o=this.storage.getDisplayList(!0),s=0;s<o.length;s++){var h=o[s];this._doPaintEl(h,e,!0,a)}return e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],r=["clientWidth","clientHeight"][t],n=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[r]||br(s[i])||br(o.style[i]))-(br(s[n])||0)-(br(s[a])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var i=document.createElement("canvas"),r=i.getContext("2d"),n=t.getBoundingRect(),a=t.style,o=a.shadowBlur*e,s=a.shadowOffsetX*e,h=a.shadowOffsetY*e,l=a.hasStroke()?a.lineWidth:0,u=Math.max(l/2,o-s),c=Math.max(l/2,s+o),f=Math.max(l/2,o-h),d=Math.max(l/2,h+o),p=n.width+u+c,v=n.height+f+d;i.width=p*e,i.height=v*e,r.scale(e,e),r.clearRect(0,0,p,v),r.dpr=e;var g={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[u-n.x,f-n.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(r);var _=new xr({style:{x:0,y:0,image:i}});return null!=g.position&&(_.position=t.position=g.position),null!=g.rotation&&(_.rotation=t.rotation=g.rotation),null!=g.scale&&(_.scale=t.scale=g.scale),_}};function Cr(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,lt.call(this)}Cr.prototype={constructor:Cr,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),i=0;i<e.length;i++)this.addClip(e[i])},removeClip:function(t){var e=w(this._clips,t);0<=e&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;i<e.length;i++)this.removeClip(e[i]);t.animation=null},_update:function(){for(var t=(new Date).getTime()-this._pausedTime,e=t-this._time,i=this._clips,r=i.length,n=[],a=[],o=0;o<r;o++){var s=i[o],h=s.step(t,e);h&&(n.push(h),a.push(s))}for(o=0;o<r;)i[o]._needsRemove?(i[o]=i[r-1],i.pop(),r--):o++;r=n.length;for(o=0;o<r;o++)a[o].fire(n[o]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){var e=this;this._running=!0,Ti(function t(){e._running&&(Ti(t),e._paused||e._update())})},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){var i=new Oe(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(i),i}},k(Cr,lt);var Mr=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Ar=["touchstart","touchend","touchmove"],Pr={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},Lr=S(Mr,function(t){var e=t.replace("mouse","pointer");return Pr[e]?e:t});function zr(t){return"mousewheel"===t&&_.browser.firefox?"DOMMouseScroll":t}function Br(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout(function(){t._touching=!1},700)}var Dr={mousemove:function(t){t=xt(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=xt(this.dom,t)).toElement||t.relatedTarget;if(e!==this.dom)for(;e&&9!==e.nodeType;){if(e===this.dom)return;e=e.parentNode}this.trigger("mouseout",t)},touchstart:function(t){(t=xt(this.dom,t)).zrByTouch=!0,this._lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Dr.mousemove.call(this,t),Dr.mousedown.call(this,t),Br(this)},touchmove:function(t){(t=xt(this.dom,t)).zrByTouch=!0,this.handler.processGesture(t,"change"),Dr.mousemove.call(this,t),Br(this)},touchend:function(t){(t=xt(this.dom,t)).zrByTouch=!0,this.handler.processGesture(t,"end"),Dr.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&Dr.click.call(this,t),Br(this)},pointerdown:function(t){Dr.mousedown.call(this,t)},pointermove:function(t){Ir(t)||Dr.mousemove.call(this,t)},pointerup:function(t){Dr.mouseup.call(this,t)},pointerout:function(t){Ir(t)||Dr.mouseout.call(this,t)}};function Ir(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Or(i){function t(t,e){T(t,function(t){!function(t,e,i){pt?t.addEventListener(e,i):t.attachEvent("on"+e,i)}(i,zr(t),e._handlers[t])},e)}lt.call(this),this.dom=i,this._touching=!1,this._touchTimer,this._handlers={},function(e){T(Ar,function(t){e._handlers[t]=C(Dr[t],e)}),T(Lr,function(t){e._handlers[t]=C(Dr[t],e)}),T(Mr,function(t){e._handlers[t]=function(t,e){return function(){if(!e._touching)return t.apply(e,arguments)}}(Dr[t],e)})}(this),_.pointerEventsSupported?t(Lr,this):(_.touchEventsSupported&&t(Ar,this),t(Mr,this))}T(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(e){Dr[e]=function(t){t=xt(this.dom,t),this.trigger(e,t)}});var Rr=Or.prototype;Rr.dispose=function(){for(var t,e,i,r=Mr.concat(Ar),n=0;n<r.length;n++){var a=r[n];t=this.dom,e=zr(a),i=this._handlers[a],pt?t.removeEventListener(e,i):t.detachEvent("on"+e,i)}},Rr.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},k(Or,lt);var Er=!_.canvasSupported,Fr={canvas:Sr},Hr={};function Nr(t,e){Fr[t]=e}function Wr(t,e,i){i=i||{},this.dom=e,this.id=t;var r=this,n=new hi,a=i.renderer;if(Er){if(!Fr.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a&&Fr[a]||(a="canvas");var o=new Fr[a](e,n,i,t);this.storage=n,this.painter=o;var s=_.node||_.worker?null:new Or(o.getViewportRoot());this.handler=new At(n,o,s,o.root),this.animation=new Cr({stage:{update:C(this.flush,this)}}),this.animation.start(),this._needsRefresh;var h=n.delFromStorage,l=n.addToStorage;n.delFromStorage=function(t){h.call(n,t),t&&t.removeSelfFromZr(r)},n.addToStorage=function(t){l.call(n,t),t.addSelfToZr(r)}}Wr.prototype={constructor:Wr,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this._needsRefresh=!0},setBackgroundColor:function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh(),this._needsRefresh=this._needsRefreshHover=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var t;this._needsRefresh&&(t=!0,this.refreshImmediately()),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately()),t&&this.trigger("rendered")},addHover:function(t,e){if(this.painter.addHover){var i=this.painter.addHover(t,e);return this.refreshHover(),i}},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e){return this.painter.pathToImage(t,e)},setCursorStyle:function(t){this.handler.setCursorStyle(t)},findHover:function(t,e){return this.handler.findHover(t,e)},on:function(t,e,i){this.handler.on(t,e,i)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,function(t){delete Hr[t]}(this.id)}};var Vr=Math.pow,Xr=Math.sqrt,qr=1e-8,jr=1e-4,Yr=Xr(3),Ur=1/3,Gr=X(),Zr=X(),Qr=X();function $r(t){return-qr<t&&t<qr}function Kr(t){return qr<t||t<-qr}function Jr(t,e,i,r,n){var a=1-n;return a*a*(a*t+3*n*e)+n*n*(n*r+3*a*i)}function tn(t,e,i,r,n){var a=1-n;return 3*(((e-t)*a+2*(i-e)*n)*a+(r-i)*n*n)}function en(t,e,i,r,n){var a=6*i-12*e+6*t,o=9*e+3*r-3*t-9*i,s=3*e-3*t,h=0;if($r(o)){if(Kr(a))0<=(u=-s/a)&&u<=1&&(n[h++]=u)}else{var l=a*a-4*o*s;if($r(l))n[0]=-a/(2*o);else if(0<l){var u,c=Xr(l),f=(-a-c)/(2*o);0<=(u=(-a+c)/(2*o))&&u<=1&&(n[h++]=u),0<=f&&f<=1&&(n[h++]=f)}}return h}function rn(t,e,i,r,n,a){var o=(e-t)*n+t,s=(i-e)*n+e,h=(r-i)*n+i,l=(s-o)*n+o,u=(h-s)*n+s,c=(u-l)*n+l;a[0]=t,a[1]=o,a[2]=l,a[3]=c,a[4]=c,a[5]=u,a[6]=h,a[7]=r}function nn(t,e,i,r){var n=1-r;return n*(n*t+2*r*e)+r*r*i}function an(t,e,i,r){return 2*((1-r)*(e-t)+r*(i-e))}function on(t,e,i){var r=t+i-2*e;return 0==r?.5:(t-e)/r}function sn(t,e,i,r,n){var a=(e-t)*r+t,o=(i-e)*r+e,s=(o-a)*r+a;n[0]=t,n[1]=a,n[2]=s,n[3]=s,n[4]=o,n[5]=i}var hn=Math.min,ln=Math.max,un=Math.sin,cn=Math.cos,fn=2*Math.PI,dn=X(),pn=X(),vn=X();function gn(t,e,i,r,n,a){n[0]=hn(t,i),n[1]=hn(e,r),a[0]=ln(t,i),a[1]=ln(e,r)}var _n=[],yn=[];function mn(t,e,i,r,n,a,o,s,h,l){var u,c=en,f=Jr,d=c(t,i,n,o,_n);for(h[0]=1/0,h[1]=1/0,l[0]=-1/0,l[1]=-1/0,u=0;u<d;u++){var p=f(t,i,n,o,_n[u]);h[0]=hn(p,h[0]),l[0]=ln(p,l[0])}for(d=c(e,r,a,s,yn),u=0;u<d;u++){var v=f(e,r,a,s,yn[u]);h[1]=hn(v,h[1]),l[1]=ln(v,l[1])}h[0]=hn(t,h[0]),l[0]=ln(t,l[0]),h[0]=hn(o,h[0]),l[0]=ln(o,l[0]),h[1]=hn(e,h[1]),l[1]=ln(e,l[1]),h[1]=hn(s,h[1]),l[1]=ln(s,l[1])}function xn(t,e,i,r,n,a,o,s,h){var l=nt,u=at,c=Math.abs(n-a);if(c%fn<1e-4&&1e-4<c)return s[0]=t-i,s[1]=e-r,h[0]=t+i,void(h[1]=e+r);if(dn[0]=cn(n)*i+t,dn[1]=un(n)*r+e,pn[0]=cn(a)*i+t,pn[1]=un(a)*r+e,l(s,dn,pn),u(h,dn,pn),(n%=fn)<0&&(n+=fn),(a%=fn)<0&&(a+=fn),a<n&&!o?a+=fn:n<a&&o&&(n+=fn),o){var f=a;a=n,n=f}for(var d=0;d<a;d+=Math.PI/2)n<d&&(vn[0]=cn(d)*i+t,vn[1]=un(d)*r+e,l(s,vn,s),u(h,vn,h))}var wn={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},bn=[],kn=[],Tn=[],Sn=[],Cn=Math.min,Mn=Math.max,An=Math.cos,Pn=Math.sin,Ln=Math.sqrt,zn=Math.abs,Bn="undefined"!=typeof Float32Array,Dn=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};function In(t,e,i,r,n,a,o){if(0===n)return!1;var s=n,h=0;if(e+s<o&&r+s<o||o<e-s&&o<r-s||t+s<a&&i+s<a||a<t-s&&a<i-s)return!1;if(t===i)return Math.abs(a-t)<=s/2;var l=(h=(e-r)/(t-i))*a-o+(t*r-i*e)/(t-i);return l*l/(h*h+1)<=s/2*s/2}function On(t,e,i,r,n,a,o,s,h,l,u){if(0===h)return!1;var c=h;return!(e+c<u&&r+c<u&&a+c<u&&s+c<u||u<e-c&&u<r-c&&u<a-c&&u<s-c||t+c<l&&i+c<l&&n+c<l&&o+c<l||l<t-c&&l<i-c&&l<n-c&&l<o-c)&&function(t,e,i,r,n,a,o,s,h,l,u){var c,f,d,p,v,g=.005,_=1/0;Gr[0]=h,Gr[1]=l;for(var y=0;y<1;y+=.05)Zr[0]=Jr(t,i,n,o,y),Zr[1]=Jr(e,r,a,s,y),(p=it(Gr,Zr))<_&&(c=y,_=p);_=1/0;for(var m=0;m<32&&!(g<jr);m++)f=c-g,d=c+g,Zr[0]=Jr(t,i,n,o,f),Zr[1]=Jr(e,r,a,s,f),p=it(Zr,Gr),0<=f&&p<_?(c=f,_=p):(Qr[0]=Jr(t,i,n,o,d),Qr[1]=Jr(e,r,a,s,d),v=it(Qr,Gr),d<=1&&v<_?(c=d,_=v):g*=.5);return u&&(u[0]=Jr(t,i,n,o,c),u[1]=Jr(e,r,a,s,c)),Xr(_)}(t,e,i,r,n,a,o,s,l,u,null)<=c/2}function Rn(t,e,i,r,n,a,o,s,h){if(0===o)return!1;var l=o;return!(e+l<h&&r+l<h&&a+l<h||h<e-l&&h<r-l&&h<a-l||t+l<s&&i+l<s&&n+l<s||s<t-l&&s<i-l&&s<n-l)&&function(t,e,i,r,n,a,o,s,h){var l,u=.005,c=1/0;Gr[0]=o,Gr[1]=s;for(var f=0;f<1;f+=.05){Zr[0]=nn(t,i,n,f),Zr[1]=nn(e,r,a,f),(g=it(Gr,Zr))<c&&(l=f,c=g)}c=1/0;for(var d=0;d<32&&!(u<jr);d++){var p=l-u,v=l+u;Zr[0]=nn(t,i,n,p),Zr[1]=nn(e,r,a,p);var g=it(Zr,Gr);if(0<=p&&g<c)l=p,c=g;else{Qr[0]=nn(t,i,n,v),Qr[1]=nn(e,r,a,v);var _=it(Qr,Gr);v<=1&&_<c?(l=v,c=_):u*=.5}}return h&&(h[0]=nn(t,i,n,l),h[1]=nn(e,r,a,l)),Xr(c)}(t,e,i,r,n,a,s,h,null)<=l/2}Dn.prototype={constructor:Dn,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e,i){i=i||0,this._ux=zn(i/Ee/t)||0,this._uy=zn(i/Ee/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return(this._ctx=t)&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(wn.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var i=zn(t-this._xi)>this._ux||zn(e-this._yi)>this._uy||this._len<5;return this.addData(wn.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,r,n,a){return this.addData(wn.C,t,e,i,r,n,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,r,n,a):this._ctx.bezierCurveTo(t,e,i,r,n,a)),this._xi=n,this._yi=a,this},quadraticCurveTo:function(t,e,i,r){return this.addData(wn.Q,t,e,i,r),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,r):this._ctx.quadraticCurveTo(t,e,i,r)),this._xi=i,this._yi=r,this},arc:function(t,e,i,r,n,a){return this.addData(wn.A,t,e,i,i,r,n-r,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,r,n,a),this._xi=An(n)*i+t,this._yi=Pn(n)*i+e,this},arcTo:function(t,e,i,r,n){return this._ctx&&this._ctx.arcTo(t,e,i,r,n),this},rect:function(t,e,i,r){return this._ctx&&this._ctx.rect(t,e,i,r),this.addData(wn.R,t,e,i,r),this},closePath:function(){this.addData(wn.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t;for(var e=this._dashIdx=0,i=0;i<t.length;i++)e+=t[i];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;this.data&&this.data.length===e||!Bn||(this.data=new Float32Array(e));for(var i=0;i<e;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,r=this._len,n=0;n<e;n++)i+=t[n].len();Bn&&this.data instanceof Float32Array&&(this.data=new Float32Array(r+i));for(n=0;n<e;n++)for(var a=t[n].data,o=0;o<a.length;o++)this.data[r++]=a[o];this._len=r},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var i=0;i<arguments.length;i++)e[this._len++]=arguments[i];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var i,r,n=this._dashSum,a=this._dashOffset,o=this._lineDash,s=this._ctx,h=this._xi,l=this._yi,u=t-h,c=e-l,f=Ln(u*u+c*c),d=h,p=l,v=o.length;for(a<0&&(a=n+a),d-=(a%=n)*(u/=f),p-=a*(c/=f);0<u&&d<=t||u<0&&t<=d||0===u&&(0<c&&p<=e||c<0&&e<=p);)d+=u*(i=o[r=this._dashIdx]),p+=c*i,this._dashIdx=(r+1)%v,0<u&&d<h||u<0&&h<d||0<c&&p<l||c<0&&l<p||s[r%2?"moveTo":"lineTo"](0<=u?Cn(d,t):Mn(d,t),0<=c?Cn(p,e):Mn(p,e));u=d-t,c=p-e,this._dashOffset=-Ln(u*u+c*c)},_dashedBezierTo:function(t,e,i,r,n,a){var o,s,h,l,u,c=this._dashSum,f=this._dashOffset,d=this._lineDash,p=this._ctx,v=this._xi,g=this._yi,_=Jr,y=0,m=this._dashIdx,x=d.length,w=0;for(f<0&&(f=c+f),f%=c,o=0;o<1;o+=.1)s=_(v,t,i,n,o+.1)-_(v,t,i,n,o),h=_(g,e,r,a,o+.1)-_(g,e,r,a,o),y+=Ln(s*s+h*h);for(;m<x&&!(f<(w+=d[m]));m++);for(o=(w-f)/y;o<=1;)l=_(v,t,i,n,o),u=_(g,e,r,a,o),m%2?p.moveTo(l,u):p.lineTo(l,u),o+=d[m]/y,m=(m+1)%x;m%2!=0&&p.lineTo(n,a),s=n-l,h=a-u,this._dashOffset=-Ln(s*s+h*h)},_dashedQuadraticTo:function(t,e,i,r){var n=i,a=r;i=(i+2*t)/3,r=(r+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,r,n,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,Bn&&(this.data=new Float32Array(t)))},getBoundingRect:function(){bn[0]=bn[1]=Tn[0]=Tn[1]=Number.MAX_VALUE,kn[0]=kn[1]=Sn[0]=Sn[1]=-Number.MAX_VALUE;for(var t,e,i,r,n,a,o,s,h,l,u,c,f,d,p=this.data,v=0,g=0,_=0,y=0,m=0;m<p.length;){var x=p[m++];switch(1===m&&(_=v=p[m],y=g=p[m+1]),x){case wn.M:v=_=p[m++],g=y=p[m++],Tn[0]=_,Tn[1]=y,Sn[0]=_,Sn[1]=y;break;case wn.L:gn(v,g,p[m],p[m+1],Tn,Sn),v=p[m++],g=p[m++];break;case wn.C:mn(v,g,p[m++],p[m++],p[m++],p[m++],p[m],p[m+1],Tn,Sn),v=p[m++],g=p[m++];break;case wn.Q:t=v,e=g,i=p[m++],r=p[m++],n=p[m],a=p[m+1],o=Tn,s=Sn,l=h=void 0,l=nn,u=ln(hn((h=on)(t,i,n),1),0),c=ln(hn(h(e,r,a),1),0),f=l(t,i,n,u),d=l(e,r,a,c),o[0]=hn(t,n,f),o[1]=hn(e,a,d),s[0]=ln(t,n,f),s[1]=ln(e,a,d),v=p[m++],g=p[m++];break;case wn.A:var w=p[m++],b=p[m++],k=p[m++],T=p[m++],S=p[m++],C=p[m++]+S;m+=1;var M=1-p[m++];1===m&&(_=An(S)*k+w,y=Pn(S)*T+b),xn(w,b,k,T,S,C,M,Tn,Sn),v=An(C)*k+w,g=Pn(C)*T+b;break;case wn.R:gn(_=v=p[m++],y=g=p[m++],_+p[m++],y+p[m++],Tn,Sn);break;case wn.Z:v=_,g=y}nt(bn,bn,Tn),at(kn,kn,Sn)}return 0===m&&(bn[0]=bn[1]=kn[0]=kn[1]=0),new $e(bn[0],bn[1],kn[0]-bn[0],kn[1]-bn[1])},rebuildPath:function(t){for(var e,i,r,n,a,o,s=this.data,h=this._ux,l=this._uy,u=this._len,c=0;c<u;){var f=s[c++];switch(1===c&&(e=r=s[c],i=n=s[c+1]),f){case wn.M:e=r=s[c++],i=n=s[c++],t.moveTo(r,n);break;case wn.L:a=s[c++],o=s[c++],(zn(a-r)>h||zn(o-n)>l||c===u-1)&&(t.lineTo(a,o),r=a,n=o);break;case wn.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),r=s[c-2],n=s[c-1];break;case wn.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),r=s[c-2],n=s[c-1];break;case wn.A:var d=s[c++],p=s[c++],v=s[c++],g=s[c++],_=s[c++],y=s[c++],m=s[c++],x=s[c++],w=g<v?v:g,b=g<v?1:v/g,k=g<v?g/v:1,T=_+y;.001<Math.abs(v-g)?(t.translate(d,p),t.rotate(m),t.scale(b,k),t.arc(0,0,w,_,T,1-x),t.scale(1/b,1/k),t.rotate(-m),t.translate(-d,-p)):t.arc(d,p,w,_,T,1-x),1===c&&(e=An(_)*v+d,i=Pn(_)*g+p),r=An(T)*v+d,n=Pn(T)*g+p;break;case wn.R:e=r=s[c],i=n=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case wn.Z:t.closePath(),r=e,n=i}}}},Dn.CMD=wn;var En=2*Math.PI;function Fn(t){return(t%=En)<0&&(t+=En),t}var Hn=2*Math.PI;function Nn(t,e,i,r,n,a,o,s,h){if(0===o)return!1;var l=o;s-=t,h-=e;var u=Math.sqrt(s*s+h*h);if(i<u-l||u+l<i)return!1;if(Math.abs(r-n)%Hn<1e-4)return!0;if(a){var c=r;r=Fn(n),n=Fn(c)}else r=Fn(r),n=Fn(n);n<r&&(n+=Hn);var f=Math.atan2(h,s);return f<0&&(f+=Hn),r<=f&&f<=n||r<=f+Hn&&f+Hn<=n}function Wn(t,e,i,r,n,a){if(e<a&&r<a||a<e&&a<r)return 0;if(r===e)return 0;var o=r<e?1:-1,s=(a-e)/(r-e);1!=s&&0!=s||(o=r<e?.5:-.5);var h=s*(i-t)+t;return h===n?1/0:n<h?o:0}var Vn=Dn.CMD,Xn=2*Math.PI,qn=1e-4;var jn=[-1,-1,-1],Yn=[-1,-1];function Un(t,e,i,r,n,a,o,s,h,l){if(e<l&&r<l&&a<l&&s<l||l<e&&l<r&&l<a&&l<s)return 0;var u,c=function(t,e,i,r,n,a){var o=r+3*(e-i)-t,s=3*(i-2*e+t),h=3*(e-t),l=t-n,u=s*s-3*o*h,c=s*h-9*o*l,f=h*h-3*s*l,d=0;if($r(u)&&$r(c)){if($r(s))a[0]=0;else 0<=(T=-h/s)&&T<=1&&(a[d++]=T)}else{var p=c*c-4*u*f;if($r(p)){var v=c/u,g=-v/2;0<=(T=-s/o+v)&&T<=1&&(a[d++]=T),0<=g&&g<=1&&(a[d++]=g)}else if(0<p){var _=Xr(p),y=u*s+1.5*o*(-c+_),m=u*s+1.5*o*(-c-_);0<=(T=(-s-((y=y<0?-Vr(-y,Ur):Vr(y,Ur))+(m=m<0?-Vr(-m,Ur):Vr(m,Ur))))/(3*o))&&T<=1&&(a[d++]=T)}else{var x=(2*u*s-3*o*c)/(2*Xr(u*u*u)),w=Math.acos(x)/3,b=Xr(u),k=Math.cos(w),T=(-s-2*b*k)/(3*o),S=(g=(-s+b*(k+Yr*Math.sin(w)))/(3*o),(-s+b*(k-Yr*Math.sin(w)))/(3*o));0<=T&&T<=1&&(a[d++]=T),0<=g&&g<=1&&(a[d++]=g),0<=S&&S<=1&&(a[d++]=S)}}return d}(e,r,a,s,l,jn);if(0===c)return 0;for(var f,d,p=0,v=-1,g=0;g<c;g++){var _=jn[g],y=0===_||1===_?.5:1;Jr(t,i,n,o,_)<h||(v<0&&(v=en(e,r,a,s,Yn),Yn[1]<Yn[0]&&1<v&&(void 0,u=Yn[0],Yn[0]=Yn[1],Yn[1]=u),f=Jr(e,r,a,s,Yn[0]),1<v&&(d=Jr(e,r,a,s,Yn[1]))),2===v?_<Yn[0]?p+=f<e?y:-y:_<Yn[1]?p+=d<f?y:-y:p+=s<d?y:-y:_<Yn[0]?p+=f<e?y:-y:p+=s<f?y:-y)}return p}function Gn(t,e,i,r,n,a,o,s){if(e<s&&r<s&&a<s||s<e&&s<r&&s<a)return 0;var h=function(t,e,i,r,n){var a=t-2*e+i,o=2*(e-t),s=t-r,h=0;if($r(a)){if(Kr(o))0<=(u=-s/o)&&u<=1&&(n[h++]=u)}else{var l=o*o-4*a*s;if($r(l))0<=(u=-o/(2*a))&&u<=1&&(n[h++]=u);else if(0<l){var u,c=Xr(l),f=(-o-c)/(2*a);0<=(u=(-o+c)/(2*a))&&u<=1&&(n[h++]=u),0<=f&&f<=1&&(n[h++]=f)}}return h}(e,r,a,s,jn);if(0===h)return 0;var l=on(e,r,a);if(0<=l&&l<=1){for(var u=0,c=nn(e,r,a,l),f=0;f<h;f++){var d=0===jn[f]||1===jn[f]?.5:1;nn(t,i,n,jn[f])<o||(jn[f]<l?u+=c<e?d:-d:u+=a<c?d:-d)}return u}d=0===jn[0]||1===jn[0]?.5:1;return nn(t,i,n,jn[0])<o?0:a<e?d:-d}function Zn(t,e,i,r,n,a,o,s){if(i<(s-=e)||s<-i)return 0;var h=Math.sqrt(i*i-s*s);jn[0]=-h,jn[1]=h;var l=Math.abs(r-n);if(l<1e-4)return 0;if(l%Xn<1e-4){n=Xn;var u=a?1:-1;return o>=jn[r=0]+t&&o<=jn[1]+t?u:0}if(a){h=r;r=Fn(n),n=Fn(h)}else r=Fn(r),n=Fn(n);n<r&&(n+=Xn);for(var c=0,f=0;f<2;f++){var d=jn[f];if(o<d+t){var p=Math.atan2(s,d);u=a?1:-1;p<0&&(p=Xn+p),(r<=p&&p<=n||r<=p+Xn&&p+Xn<=n)&&(p>Math.PI/2&&p<1.5*Math.PI&&(u=-u),c+=u)}}return c}function Qn(t,e,i,r,n){for(var a=0,o=0,s=0,h=0,l=0,u=0;u<t.length;){var c=t[u++];switch(c===Vn.M&&1<u&&(i||(a+=Wn(o,s,h,l,r,n))),1===u&&(h=o=t[u],l=s=t[u+1]),c){case Vn.M:o=h=t[u++],s=l=t[u++];break;case Vn.L:if(i){if(In(o,s,t[u],t[u+1],e,r,n))return!0}else a+=Wn(o,s,t[u],t[u+1],r,n)||0;o=t[u++],s=t[u++];break;case Vn.C:if(i){if(On(o,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],e,r,n))return!0}else a+=Un(o,s,t[u++],t[u++],t[u++],t[u++],t[u],t[u+1],r,n)||0;o=t[u++],s=t[u++];break;case Vn.Q:if(i){if(Rn(o,s,t[u++],t[u++],t[u],t[u+1],e,r,n))return!0}else a+=Gn(o,s,t[u++],t[u++],t[u],t[u+1],r,n)||0;o=t[u++],s=t[u++];break;case Vn.A:var f=t[u++],d=t[u++],p=t[u++],v=t[u++],g=t[u++],_=t[u++];u+=1;var y=1-t[u++],m=Math.cos(g)*p+f,x=Math.sin(g)*v+d;1<u?a+=Wn(o,s,m,x,r,n):(h=m,l=x);var w=(r-f)*v/p+f;if(i){if(Nn(f,d,v,g,g+_,y,e,w,n))return!0}else a+=Zn(f,d,v,g,g+_,y,w,n);o=Math.cos(g+_)*p+f,s=Math.sin(g+_)*v+d;break;case Vn.R:h=o=t[u++],l=s=t[u++];m=h+t[u++],x=l+t[u++];if(i){if(In(h,l,m,l,e,r,n)||In(m,l,m,x,e,r,n)||In(m,x,h,x,e,r,n)||In(h,x,h,l,e,r,n))return!0}else a+=Wn(m,l,m,x,r,n),a+=Wn(h,x,h,l,r,n);break;case Vn.Z:if(i){if(In(o,s,h,l,e,r,n))return!0}else a+=Wn(o,s,h,l,r,n);o=h,s=l}}return i||function(t,e){return Math.abs(t-e)<qn}(s,l)||(a+=Wn(o,s,h,l,r,n)||0),0!==a}var $n=xi.prototype.getCanvasPattern,Kn=Math.abs,Jn=new Dn(!0);function ta(t){mr.call(this,t),this.path=null}ta.prototype={constructor:ta,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var i,r=this.style,n=this.path||Jn,a=r.hasStroke(),o=r.hasFill(),s=r.fill,h=r.stroke,l=o&&!!s.colorStops,u=a&&!!h.colorStops,c=o&&!!s.image,f=a&&!!h.image;r.bind(t,this,e),this.setTransform(t),this.__dirty&&(l&&(i=i||this.getBoundingRect(),this._fillGradient=r.getGradient(t,s,i)),u&&(i=i||this.getBoundingRect(),this._strokeGradient=r.getGradient(t,h,i)));l?t.fillStyle=this._fillGradient:c&&(t.fillStyle=$n.call(s,t)),u?t.strokeStyle=this._strokeGradient:f&&(t.strokeStyle=$n.call(h,t));var d=r.lineDash,p=r.lineDashOffset,v=!!t.setLineDash,g=this.getGlobalScale();if(n.setScale(g[0],g[1],this.segmentIgnoreThreshold),this.__dirtyPath||d&&!v&&a?(n.beginPath(t),d&&!v&&(n.setLineDash(d),n.setLineDashOffset(p)),this.buildPath(n,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),o)if(null!=r.fillOpacity){var _=t.globalAlpha;t.globalAlpha=r.fillOpacity*r.opacity,n.fill(t),t.globalAlpha=_}else n.fill(t);if(d&&v&&(t.setLineDash(d),t.lineDashOffset=p),a)if(null!=r.strokeOpacity){_=t.globalAlpha;t.globalAlpha=r.strokeOpacity*r.opacity,n.stroke(t),t.globalAlpha=_}else n.stroke(t);d&&v&&t.setLineDash([]),null!=r.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,i){},createPathProxy:function(){this.path=new Dn},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var r=this.path;r=r||(this.path=new Dn),this.__dirtyPath&&(r.beginPath(),this.buildPath(r,this.shape,!1)),t=r.getBoundingRect()}if(this._rect=t,e.hasStroke()){var n=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){n.copy(t);var a=e.lineWidth,o=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),1e-10<o&&(n.width+=a/o,n.height+=a/o,n.x-=a/o/2,n.y-=a/o/2)}return n}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),r=this.getBoundingRect(),n=this.style;if(t=i[0],e=i[1],r.contain(t,e)){var a=this.path.data;if(n.hasStroke()){var o=n.lineWidth,s=n.strokeNoScale?this.getLineScale():1;if(1e-10<s&&(n.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),function(t,e,i,r){return Qn(t,e,!0,i,r)}(a,o/s,t,e)))return!0}if(n.hasFill())return function(t,e,i){return Qn(t,0,!1,e,i)}(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):mr.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(L(t))for(var r in t)t.hasOwnProperty(r)&&(i[r]=t[r]);else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&1e-10<Kn(t[0]-1)&&1e-10<Kn(t[3]-1)?Math.sqrt(Kn(t[0]*t[3]-t[2]*t[1])):1}},ta.extend=function(n){function t(t){ta.call(this,t),n.style&&this.style.extendFrom(n.style,!1);var e=n.shape;if(e){this.shape=this.shape||{};var i=this.shape;for(var r in e)!i.hasOwnProperty(r)&&e.hasOwnProperty(r)&&(i[r]=e[r])}n.init&&n.init.call(this,t)}for(var e in b(t,ta),n)"style"!==e&&"shape"!==e&&(t.prototype[e]=n[e]);return t},b(ta,mr);function ea(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}var ia=Dn.CMD,ra=[[],[],[]],na=Math.sqrt,aa=Math.atan2,oa=function(t,e){var i,r,n,a,o,s=t.data,h=ia.M,l=ia.C,u=ia.L,c=ia.R,f=ia.A,d=ia.Q;for(a=n=0;n<s.length;){switch(i=s[n++],a=n,r=0,i){case h:case u:r=1;break;case l:r=3;break;case d:r=2;break;case f:var p=e[4],v=e[5],g=na(e[0]*e[0]+e[1]*e[1]),_=na(e[2]*e[2]+e[3]*e[3]),y=aa(-e[1]/_,e[0]/g);s[n]*=g,s[n++]+=p,s[n]*=_,s[n++]+=v,s[n++]*=g,s[n++]*=_,s[n++]+=y,s[n++]+=y,a=n+=2;break;case c:m[0]=s[n++],m[1]=s[n++],rt(m,m,e),s[a++]=m[0],s[a++]=m[1],m[0]+=s[n++],m[1]+=s[n++],rt(m,m,e),s[a++]=m[0],s[a++]=m[1]}for(o=0;o<r;o++){var m;(m=ra[o])[0]=s[n++],m[1]=s[n++],rt(m,m,e),s[a++]=m[0],s[a++]=m[1]}}},sa=Math.sqrt,ha=Math.sin,la=Math.cos,ua=Math.PI,ca=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(ea(t)*ea(e))},fa=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(ca(t,e))};function da(t,e,i,r,n,a,o,s,h,l,u){var c=h*(ua/180),f=la(c)*(t-i)/2+ha(c)*(e-r)/2,d=-1*ha(c)*(t-i)/2+la(c)*(e-r)/2,p=f*f/(o*o)+d*d/(s*s);1<p&&(o*=sa(p),s*=sa(p));var v=(n===a?-1:1)*sa((o*o*(s*s)-o*o*(d*d)-s*s*(f*f))/(o*o*(d*d)+s*s*(f*f)))||0,g=v*o*d/s,_=v*-s*f/o,y=(t+i)/2+la(c)*g-ha(c)*_,m=(e+r)/2+ha(c)*g+la(c)*_,x=fa([1,0],[(f-g)/o,(d-_)/s]),w=[(f-g)/o,(d-_)/s],b=[(-1*f-g)/o,(-1*d-_)/s],k=fa(w,b);ca(w,b)<=-1&&(k=ua),1<=ca(w,b)&&(k=0),0===a&&0<k&&(k-=2*ua),1===a&&k<0&&(k+=2*ua),u.addData(l,y,m,o,s,x,k,c,a)}var pa=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,va=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function ga(t,e){var i=function(t){if(!t)return new Dn;for(var e,i=0,r=0,n=i,a=r,o=new Dn,s=Dn.CMD,h=t.match(pa),l=0;l<h.length;l++){for(var u,c=h[l],f=c.charAt(0),d=c.match(va)||[],p=d.length,v=0;v<p;v++)d[v]=parseFloat(d[v]);for(var g=0;g<p;){var _,y,m,x,w,b,k,T=i,S=r;switch(f){case"l":i+=d[g++],r+=d[g++],u=s.L,o.addData(u,i,r);break;case"L":i=d[g++],r=d[g++],u=s.L,o.addData(u,i,r);break;case"m":i+=d[g++],r+=d[g++],u=s.M,o.addData(u,i,r),n=i,a=r,f="l";break;case"M":i=d[g++],r=d[g++],u=s.M,o.addData(u,i,r),n=i,a=r,f="L";break;case"h":i+=d[g++],u=s.L,o.addData(u,i,r);break;case"H":i=d[g++],u=s.L,o.addData(u,i,r);break;case"v":r+=d[g++],u=s.L,o.addData(u,i,r);break;case"V":r=d[g++],u=s.L,o.addData(u,i,r);break;case"C":u=s.C,o.addData(u,d[g++],d[g++],d[g++],d[g++],d[g++],d[g++]),i=d[g-2],r=d[g-1];break;case"c":u=s.C,o.addData(u,d[g++]+i,d[g++]+r,d[g++]+i,d[g++]+r,d[g++]+i,d[g++]+r),i+=d[g-2],r+=d[g-1];break;case"S":_=i,y=r;var C=o.len(),M=o.data;e===s.C&&(_+=i-M[C-4],y+=r-M[C-3]),u=s.C,T=d[g++],S=d[g++],i=d[g++],r=d[g++],o.addData(u,_,y,T,S,i,r);break;case"s":_=i,y=r;C=o.len(),M=o.data;e===s.C&&(_+=i-M[C-4],y+=r-M[C-3]),u=s.C,T=i+d[g++],S=r+d[g++],i+=d[g++],r+=d[g++],o.addData(u,_,y,T,S,i,r);break;case"Q":T=d[g++],S=d[g++],i=d[g++],r=d[g++],u=s.Q,o.addData(u,T,S,i,r);break;case"q":T=d[g++]+i,S=d[g++]+r,i+=d[g++],r+=d[g++],u=s.Q,o.addData(u,T,S,i,r);break;case"T":_=i,y=r;C=o.len(),M=o.data;e===s.Q&&(_+=i-M[C-4],y+=r-M[C-3]),i=d[g++],r=d[g++],u=s.Q,o.addData(u,_,y,i,r);break;case"t":_=i,y=r;C=o.len(),M=o.data;e===s.Q&&(_+=i-M[C-4],y+=r-M[C-3]),i+=d[g++],r+=d[g++],u=s.Q,o.addData(u,_,y,i,r);break;case"A":m=d[g++],x=d[g++],w=d[g++],b=d[g++],k=d[g++],da(T=i,S=r,i=d[g++],r=d[g++],b,k,m,x,w,u=s.A,o);break;case"a":m=d[g++],x=d[g++],w=d[g++],b=d[g++],k=d[g++],da(T=i,S=r,i+=d[g++],r+=d[g++],b,k,m,x,w,u=s.A,o)}}"z"!==f&&"Z"!==f||(u=s.Z,o.addData(u),i=n,r=a),e=u}return o.toStatic(),o}(t);return(e=e||{}).buildPath=function(t){if(t.setData){t.setData(i.data),(e=t.getContext())&&t.rebuildPath(e)}else{var e=t;i.rebuildPath(e)}},e.applyTransform=function(t){oa(i,t),this.dirty(!0)},e}function _a(t,e){return new ta(ga(t,e))}var ya=(Object.freeze||Object)({createFromString:_a,extendFromString:function(t,e){return ta.extend(ga(t,e))},mergePath:function(t,e){for(var i=[],r=t.length,n=0;n<r;n++){var a=t[n];a.path||a.createPathProxy(),a.__dirtyPath&&a.buildPath(a.path,a.shape,!0),i.push(a.path)}var o=new ta(e);return o.createPathProxy(),o.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},o}}),ma=function(t){mr.call(this,t)};ma.prototype={constructor:ma,type:"text",brush:function(t,e){var i=this.style;this.__dirty&&ir(i),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var r=i.text;null!=r&&(r+=""),gr(r,i)?(this.setTransform(t),nr(this,t,r,i,null,e),this.restoreTransform(t)):t.__attrCachedBy=ci.NONE},getBoundingRect:function(){var t=this.style;if(this.__dirty&&ir(t),!this._rect){var e=t.text;null!=e?e+="":e="";var i=Ei(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich);if(i.x+=t.x||0,i.y+=t.y||0,fr(t.textStroke,t.textStrokeWidth)){var r=t.textStrokeWidth;i.x-=r/2,i.y-=r/2,i.width+=r,i.height+=r}this._rect=i}return this._rect}},b(ma,mr);var xa=ta.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,i){i&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}}),wa=Math.round;function ba(t,e,i){var r=wa(2*t);return(r+wa(e))%2==0?r/2:(r+(i?1:-1))/2}var ka={},Ta=ta.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i,r,n,a;this.subPixelOptimize?(function(t,e,i){var r=i&&i.lineWidth;if(e&&r){var n=e.x,a=e.y,o=e.width,s=e.height;t.x=ba(n,r,!0),t.y=ba(a,r,!0),t.width=Math.max(ba(n+o,r,!1)-t.x,0===o?0:1),t.height=Math.max(ba(a+s,r,!1)-t.y,0===s?0:1)}}(ka,e,this.style),i=ka.x,r=ka.y,n=ka.width,a=ka.height,ka.r=e.r,e=ka):(i=e.x,r=e.y,n=e.width,a=e.height),e.r?Zi(t,e):t.rect(i,r,n,a),t.closePath()}}),Sa=ta.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var i=e.cx,r=e.cy,n=e.rx,a=e.ry,o=.5522848*n,s=.5522848*a;t.moveTo(i-n,r),t.bezierCurveTo(i-n,r-s,i-o,r-a,i,r-a),t.bezierCurveTo(i+o,r-a,i+n,r-s,i+n,r),t.bezierCurveTo(i+n,r+s,i+o,r+a,i,r+a),t.bezierCurveTo(i-o,r+a,i-n,r+s,i-n,r),t.closePath()}}),Ca={},Ma=ta.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i,r,n,a;a=this.subPixelOptimize?(function(t,e,i){var r=i&&i.lineWidth;if(e&&r){var n=e.x1,a=e.x2,o=e.y1,s=e.y2;wa(2*n)===wa(2*a)?t.x1=t.x2=ba(n,r,!0):(t.x1=n,t.x2=a),wa(2*o)===wa(2*s)?t.y1=t.y2=ba(o,r,!0):(t.y1=o,t.y2=s)}}(Ca,e,this.style),i=Ca.x1,r=Ca.y1,n=Ca.x2,Ca.y2):(i=e.x1,r=e.y1,n=e.x2,e.y2);var o=e.percent;0!==o&&(t.moveTo(i,r),o<1&&(n=i*(1-o)+n*o,a=r*(1-o)+a*o),t.lineTo(n,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}});function Aa(t,e,i,r,n,a,o){var s=.5*(i-t),h=.5*(r-e);return(2*(e-i)+s+h)*o+(-3*(e-i)-2*s-h)*a+s*n+e}function Pa(t,e,i){var r=e.points,n=e.smooth;if(r&&2<=r.length){if(n&&"spline"!==n){var a=function(t,e,i,r){var n,a,o,s,h=[],l=[],u=[],c=[];if(r){o=[1/0,1/0],s=[-1/0,-1/0];for(var f=0,d=t.length;f<d;f++)nt(o,o,t[f]),at(s,s,t[f]);nt(o,o,r[0]),at(s,s,r[1])}for(f=0,d=t.length;f<d;f++){var p=t[f];if(i)n=t[f?f-1:d-1],a=t[(f+1)%d];else{if(0===f||f===d-1){h.push(q(t[f]));continue}n=t[f-1],a=t[f+1]}Y(l,a,n),$(l,l,e);var v=J(p,n),g=J(p,a),_=v+g;0!==_&&(v/=_,g/=_),$(u,l,-v),$(c,l,g);var y=j([],p,u),m=j([],p,c);r&&(at(y,y,o),nt(y,y,s),at(m,m,o),nt(m,m,s)),h.push(y),h.push(m)}return i&&h.push(h.shift()),h}(r,n,i,e.smoothConstraint);t.moveTo(r[0][0],r[0][1]);for(var o=r.length,s=0;s<(i?o:o-1);s++){var h=a[2*s],l=a[2*s+1],u=r[(s+1)%o];t.bezierCurveTo(h[0],h[1],l[0],l[1],u[0],u[1])}}else{"spline"===n&&(r=function(t,e){for(var i=t.length,r=[],n=0,a=1;a<i;a++)n+=J(t[a-1],t[a]);var o=n/2;o=o<i?i:o;for(a=0;a<o;a++){var s,h,l,u=a/(o-1)*(e?i:i-1),c=Math.floor(u),f=u-c,d=t[c%i];l=e?(s=t[(c-1+i)%i],h=t[(c+1)%i],t[(c+2)%i]):(s=t[0===c?c:c-1],h=t[i-2<c?i-1:c+1],t[i-3<c?i-1:c+2]);var p=f*f,v=f*p;r.push([Aa(s[0],d[0],h[0],l[0],f,p,v),Aa(s[1],d[1],h[1],l[1],f,p,v)])}return r}(r,i)),t.moveTo(r[0][0],r[0][1]);s=1;for(var c=r.length;s<c;s++)t.lineTo(r[s][0],r[s][1])}i&&t.closePath()}}function La(t){this.colorStops=t||[]}var za=ta.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){Pa(t,e,!0)}}),Ba=ta.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){Pa(t,e,!1)}});La.prototype={constructor:La,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};function Da(t,e,i,r,n,a){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==i?1:i,this.y2=null==r?0:r,this.type="linear",this.global=a||!1,La.call(this,n)}Da.prototype={constructor:Da},b(Da,La);var Ia=/[\s,]+/;function Oa(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}Oa.prototype.parse=function(t,e){e=e||{};var i=function(t){for(P(t)&&(t=(new DOMParser).parseFromString(t,"text/xml")),9===t.nodeType&&(t=t.firstChild);"svg"!==t.nodeName.toLowerCase()||1!==t.nodeType;)t=t.nextSibling;return t}(t);if(!i)throw new Error("Illegal svg");var r=new Ke;this._root=r;var n=i.getAttribute("viewBox")||"",a=parseFloat(i.getAttribute("width")||e.width),o=parseFloat(i.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(o)&&(o=null),Wa(i,r,null,!0);for(var s,h,l=i.firstChild;l;)this._parseNode(l,r),l=l.nextSibling;if(n){var u=E(n).split(Ia);4<=u.length&&(s={x:parseFloat(u[0]||0),y:parseFloat(u[1]||0),width:parseFloat(u[2]),height:parseFloat(u[3])})}if(s&&null!=a&&null!=o&&(h=function(t,e,i){var r=e/t.width,n=i/t.height,a=Math.min(r,n),o=[a,a],s=[-(t.x+t.width/2)*a+e/2,-(t.y+t.height/2)*a+i/2];return{scale:o,position:s}}(s,a,o),!e.ignoreViewBox)){var c=r;(r=new Ke).add(c),c.scale=h.scale.slice(),c.position=h.position.slice()}return e.ignoreRootClip||null==a||null==o||r.setClipPath(new Ta({shape:{x:0,y:0,width:a,height:o}})),{root:r,width:a,height:o,viewBoxRect:s,viewBoxTransform:h}},Oa.prototype._parseNode=function(t,e){var i,r,n=t.nodeName.toLowerCase();if("defs"===n?this._isDefine=!0:"text"===n&&(this._isText=!0),this._isDefine){if(r=Ea[n]){var a=r.call(this,t),o=t.getAttribute("id");o&&(this._defs[o]=a)}}else(r=Ra[n])&&(i=r.call(this,t,e),e.add(i));for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,i),3===s.nodeType&&this._isText&&this._parseText(s,i),s=s.nextSibling;"defs"===n?this._isDefine=!1:"text"===n&&(this._isText=!1)},Oa.prototype._parseText=function(t,e){if(1===t.nodeType){var i=t.getAttribute("dx")||0,r=t.getAttribute("dy")||0;this._textX+=parseFloat(i),this._textY+=parseFloat(r)}var n=new ma({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});Fa(e,n),Wa(t,n,this._defs);var a=n.style.fontSize;a&&a<9&&(n.style.fontSize=9,n.scale=n.scale||[1,1],n.scale[0]*=a/9,n.scale[1]*=a/9);var o=n.getBoundingRect();return this._textX+=o.width,e.add(n),n};var Ra={g:function(t,e){var i=new Ke;return Fa(e,i),Wa(t,i,this._defs),i},rect:function(t,e){var i=new Ta;return Fa(e,i),Wa(t,i,this._defs),i.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),i},circle:function(t,e){var i=new xa;return Fa(e,i),Wa(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),i},line:function(t,e){var i=new Ma;return Fa(e,i),Wa(t,i,this._defs),i.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),i},ellipse:function(t,e){var i=new Sa;return Fa(e,i),Wa(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),i},polygon:function(t,e){var i=t.getAttribute("points");i=i&&Ha(i);var r=new za({shape:{points:i||[]}});return Fa(e,r),Wa(t,r,this._defs),r},polyline:function(t,e){var i=new ta;Fa(e,i),Wa(t,i,this._defs);var r=t.getAttribute("points");return r=r&&Ha(r),new Ba({shape:{points:r||[]}})},image:function(t,e){var i=new xr;return Fa(e,i),Wa(t,i,this._defs),i.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),i},text:function(t,e){var i=t.getAttribute("x")||0,r=t.getAttribute("y")||0,n=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0;this._textX=parseFloat(i)+parseFloat(n),this._textY=parseFloat(r)+parseFloat(a);var o=new Ke;return Fa(e,o),Wa(t,o,this._defs),o},tspan:function(t,e){var i=t.getAttribute("x"),r=t.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=r&&(this._textY=parseFloat(r));var n=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0,o=new Ke;return Fa(e,o),Wa(t,o,this._defs),this._textX+=n,this._textY+=a,o},path:function(t,e){var i=_a(t.getAttribute("d")||"");return Fa(e,i),Wa(t,i,this._defs),i}},Ea={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),i=parseInt(t.getAttribute("y1")||0,10),r=parseInt(t.getAttribute("x2")||10,10),n=parseInt(t.getAttribute("y2")||0,10),a=new Da(e,i,r,n);return function(t,e){var i=t.firstChild;for(;i;){if(1===i.nodeType){var r=i.getAttribute("offset");r=0<r.indexOf("%")?parseInt(r,10)/100:r?parseFloat(r):0;var n=i.getAttribute("stop-color")||"#000000";e.addColorStop(r,n)}i=i.nextSibling}}(t,a),a},radialgradient:function(t){}};function Fa(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),g(e.__inheritedStyle,t.__inheritedStyle))}function Ha(t){for(var e=E(t).split(Ia),i=[],r=0;r<e.length;r+=2){var n=parseFloat(e[r]),a=parseFloat(e[r+1]);i.push([n,a])}return i}var Na={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"};function Wa(t,e,i,r){var n=e.__inheritedStyle||{},a="text"===e.type;if(1===t.nodeType&&(function(t,e){var i=t.getAttribute("transform");if(i){i=i.replace(/,/g," ");var r=null,n=[];i.replace(qa,function(t,e,i){n.push(e,i)});for(var a=n.length-1;0<a;a-=2){var o=n[a],s=n[a-1];switch(r=r||Bt(),s){case"translate":o=E(o).split(Ia),Rt(r,r,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=E(o).split(Ia),Ft(r,r,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=E(o).split(Ia),Et(r,r,parseFloat(o[0]));break;case"skew":o=E(o).split(Ia),console.warn("Skew transform is not supported yet");break;case"matrix":o=E(o).split(Ia);r[0]=parseFloat(o[0]),r[1]=parseFloat(o[1]),r[2]=parseFloat(o[2]),r[3]=parseFloat(o[3]),r[4]=parseFloat(o[4]),r[5]=parseFloat(o[5])}}e.setLocalTransform(r)}}(t,e),v(n,function(t){var e=t.getAttribute("style"),i={};if(!e)return i;var r,n={};ja.lastIndex=0;for(;null!=(r=ja.exec(e));)n[r[1]]=r[2];for(var a in Na)Na.hasOwnProperty(a)&&null!=n[a]&&(i[Na[a]]=n[a]);return i}(t)),!r))for(var o in Na)if(Na.hasOwnProperty(o)){var s=t.getAttribute(o);null!=s&&(n[Na[o]]=s)}var h=a?"textFill":"fill",l=a?"textStroke":"stroke";e.style=e.style||new pi;var u=e.style;null!=n.fill&&u.set(h,Xa(n.fill,i)),null!=n.stroke&&u.set(l,Xa(n.stroke,i)),T(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(t){var e="lineWidth"===t&&a?"textStrokeWidth":t;null!=n[t]&&u.set(e,parseFloat(n[t]))}),n.textBaseline&&"auto"!==n.textBaseline||(n.textBaseline="alphabetic"),"alphabetic"===n.textBaseline&&(n.textBaseline="bottom"),"start"===n.textAlign&&(n.textAlign="left"),"end"===n.textAlign&&(n.textAlign="right"),T(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(t){null!=n[t]&&u.set(t,n[t])}),n.lineDash&&(e.style.lineDash=E(n.lineDash).split(Ia)),u[l]&&"none"!==u[l]&&(e[l]=!0),e.__inheritedStyle=n}var Va=/url\(\s*#(.*?)\)/;function Xa(t,e){var i=e&&t&&t.match(Va);return i?e[E(i[1])]:t}var qa=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var ja=/([^\s:;]+)\s*:\s*([^:;]+)/g;var Ya=ta.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i<e.length;i++)t=t||e[i].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(e[0],e[1],t[i].segmentIgnoreThreshold)},buildPath:function(t,e){for(var i=e.paths||[],r=0;r<i.length;r++)i[r].buildPath(t,i[r].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),ta.prototype.getBoundingRect.call(this)}});function Ua(t){mr.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}Ua.prototype.incremental=!0,Ua.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},Ua.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},Ua.prototype.addDisplayables=function(t,e){e=e||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],e)},Ua.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])},Ua.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(t=0;t<this._temporaryDisplayables.length;t++){var e;(e=this._temporaryDisplayables[t]).parent=this,e.update(),e.parent=null}},Ua.prototype.brush=function(t,e){for(var i=this._cursor;i<this._displayables.length;i++){(r=this._displayables[i]).beforeBrush&&r.beforeBrush(t),r.brush(t,i===this._cursor?null:this._displayables[i-1]),r.afterBrush&&r.afterBrush(t)}this._cursor=i;for(i=0;i<this._temporaryDisplayables.length;i++){var r;(r=this._temporaryDisplayables[i]).beforeBrush&&r.beforeBrush(t),r.brush(t,0===i?null:this._temporaryDisplayables[i-1]),r.afterBrush&&r.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var Ga=[];Ua.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new $e(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var i=this._displayables[e],r=i.getBoundingRect().clone();i.needLocalTransform()&&r.applyTransform(i.getLocalTransform(Ga)),t.union(r)}this._rect=t}return this._rect},Ua.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(i[0],i[1]))for(var r=0;r<this._displayables.length;r++){if(this._displayables[r].contain(t,e))return!0}return!1},b(Ua,mr);var Za=ta.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.cx,r=e.cy,n=Math.max(e.r,0),a=e.startAngle,o=e.endAngle,s=e.clockwise,h=Math.cos(a),l=Math.sin(a);t.moveTo(h*n+i,l*n+r),t.arc(i,r,n,a,o,!s)}}),Qa=[];function $a(t,e,i){var r=t.cpx2,n=t.cpy2;return null===r||null===n?[(i?tn:Jr)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?tn:Jr)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?an:nn)(t.x1,t.cpx1,t.x2,e),(i?an:nn)(t.y1,t.cpy1,t.y2,e)]}function Ka(t,e,i,r,n){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==i?.5:i,this.type="radial",this.global=n||!1,La.call(this,r)}var Ja,to=ta.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,r=e.y1,n=e.x2,a=e.y2,o=e.cpx1,s=e.cpy1,h=e.cpx2,l=e.cpy2,u=e.percent;0!==u&&(t.moveTo(i,r),null==h||null==l?(u<1&&(sn(i,o,n,u,Qa),o=Qa[1],n=Qa[2],sn(r,s,a,u,Qa),s=Qa[1],a=Qa[2]),t.quadraticCurveTo(o,s,n,a)):(u<1&&(rn(i,o,h,n,u,Qa),o=Qa[1],h=Qa[2],n=Qa[3],rn(r,s,l,a,u,Qa),s=Qa[1],l=Qa[2],a=Qa[3]),t.bezierCurveTo(o,s,h,l,n,a)))},pointAt:function(t){return $a(this.shape,t,!1)},tangentAt:function(t){var e=$a(this.shape,t,!0);return K(e,e)}}),eo=ta.extend({type:"droplet",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,r=e.cy,n=e.width,a=e.height;t.moveTo(i,r+n),t.bezierCurveTo(i+n,r+n,i+3*n/2,r-n/3,i,r-a),t.bezierCurveTo(i-3*n/2,r-n/3,i-n,r+n,i,r+n),t.closePath()}}),io=ta.extend({type:"heart",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,r=e.cy,n=e.width,a=e.height;t.moveTo(i,r),t.bezierCurveTo(i+n/2,r-2*a/3,i+2*n,r+a/3,i,r+a),t.bezierCurveTo(i-2*n,r+a/3,i-n/2,r-2*a/3,i,r)}}),ro=Math.PI,no=Math.sin,ao=Math.cos,oo=ta.extend({type:"isogon",shape:{x:0,y:0,r:0,n:0},buildPath:function(t,e){var i=e.n;if(i&&!(i<2)){var r=e.x,n=e.y,a=e.r,o=2*ro/i,s=-ro/2;t.moveTo(r+a*ao(s),n+a*no(s));for(var h=0,l=i-1;h<l;h++)s+=o,t.lineTo(r+a*ao(s),n+a*no(s));t.closePath()}}}),so=ta.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var i=e.cx,r=e.cy,n=2*Math.PI;t.moveTo(i+e.r,r),t.arc(i,r,e.r,0,n,!1),t.moveTo(i+e.r0,r),t.arc(i,r,e.r0,0,n,!0)}}),ho=Math.sin,lo=Math.cos,uo=Math.PI/180,co=ta.extend({type:"rose",shape:{cx:0,cy:0,r:[],k:0,n:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i,r,n,a=e.r,o=e.k,s=e.n,h=e.cx,l=e.cy;t.moveTo(h,l);for(var u=0,c=a.length;u<c;u++){n=a[u];for(var f=0;f<=360*s;f++)i=n*ho(o/s*f%360*uo)*lo(f*uo)+h,r=n*ho(o/s*f%360*uo)*ho(f*uo)+l,t.lineTo(i,r)}}}),fo=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],po=ta.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:(Ja=ta.prototype.brush,_.browser.ie&&11<=_.browser.version?function(){var t,e=this.__clipPaths,i=this.style;if(e)for(var r=0;r<e.length;r++){var n=e[r],a=n&&n.shape,o=n&&n.type;if(a&&("sector"===o&&a.startAngle===a.endAngle||"rect"===o&&(!a.width||!a.height))){for(var s=0;s<fo.length;s++)fo[s][2]=i[fo[s][0]],i[fo[s][0]]=fo[s][1];t=!0;break}}if(Ja.apply(this,arguments),t)for(s=0;s<fo.length;s++)i[fo[s][0]]=fo[s][2]}:Ja),buildPath:function(t,e){var i=e.cx,r=e.cy,n=Math.max(e.r0||0,0),a=Math.max(e.r,0),o=e.startAngle,s=e.endAngle,h=e.clockwise,l=Math.cos(o),u=Math.sin(o);t.moveTo(l*n+i,u*n+r),t.lineTo(l*a+i,u*a+r),t.arc(i,r,a,o,s,!h),t.lineTo(Math.cos(s)*n+i,Math.sin(s)*n+r),0!==n&&t.arc(i,r,n,s,o,h),t.closePath()}}),vo=Math.PI,go=Math.cos,_o=Math.sin,yo=ta.extend({type:"star",shape:{cx:0,cy:0,n:3,r0:null,r:0},buildPath:function(t,e){var i=e.n;if(i&&!(i<2)){var r=e.cx,n=e.cy,a=e.r,o=e.r0;null==o&&(o=4<i?a*go(2*vo/i)/go(vo/i):a/3);var s=vo/i,h=-vo/2,l=r+a*go(h),u=n+a*_o(h);h+=s,t.moveTo(l,u);for(var c,f=0,d=2*i-1;f<d;f++)c=f%2==0?o:a,t.lineTo(r+c*go(h),n+c*_o(h)),h+=s;t.closePath()}}}),mo=Math.cos,xo=Math.sin,wo=ta.extend({type:"trochoid",shape:{cx:0,cy:0,r:0,r0:0,d:0,location:"out"},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i,r,n,a,o=e.r,s=e.r0,h=e.d,l=e.cx,u=e.cy,c="out"===e.location?1:-1;if(!(e.location&&o<=s)){var f,d=0,p=1;for(i=(o+c*s)*mo(0)-c*h*mo(0)+l,r=(o+c*s)*xo(0)-h*xo(0)+u,t.moveTo(i,r);s*++d%(o+c*s)!=0;);for(;f=Math.PI/180*p,n=(o+c*s)*mo(f)-c*h*mo((o/s+c)*f)+l,a=(o+c*s)*xo(f)-h*xo((o/s+c)*f)+u,t.lineTo(n,a),++p<=s*d/(o+c*s)*360;);}}});Ka.prototype={constructor:Ka},b(Ka,La);function bo(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}var ko=Dn.CMD,To=Array.prototype.join,So="none",Co=Math.round,Mo=Math.sin,Ao=Math.cos,Po=Math.PI,Lo=2*Math.PI,zo=180/Po,Bo=1e-4;function Do(t){return Co(1e4*t)/1e4}function Io(t){return t<Bo&&-Bo<t}function Oo(t,e){e&&Ro(t,"transform","matrix("+To.call(e,",")+")")}function Ro(t,e,i){i&&("linear"===i.type||"radial"===i.type)||t.setAttribute(e,i)}function Eo(t,e,i,r){if(function(t,e){var i=e?t.textFill:t.fill;return null!=i&&i!==So}(e,i)){var n=i?e.textFill:e.fill;Ro(t,"fill",n="transparent"===n?So:n),Ro(t,"fill-opacity",null!=e.fillOpacity?e.fillOpacity*e.opacity:e.opacity)}else Ro(t,"fill",So);if(function(t,e){var i=e?t.textStroke:t.stroke;return null!=i&&i!==So}(e,i)){var a=i?e.textStroke:e.stroke;Ro(t,"stroke",a="transparent"===a?So:a),Ro(t,"stroke-width",(i?e.textStrokeWidth:e.lineWidth)/(!i&&e.strokeNoScale?r.getLineScale():1)),Ro(t,"paint-order",i?"stroke":"fill"),Ro(t,"stroke-opacity",null!=e.strokeOpacity?e.strokeOpacity:e.opacity),e.lineDash?(Ro(t,"stroke-dasharray",e.lineDash.join(",")),Ro(t,"stroke-dashoffset",Co(e.lineDashOffset||0))):Ro(t,"stroke-dasharray",""),e.lineCap&&Ro(t,"stroke-linecap",e.lineCap),e.lineJoin&&Ro(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&Ro(t,"stroke-miterlimit",e.miterLimit)}else Ro(t,"stroke",So)}var Fo={};Fo.brush=function(t){var e=t.style,i=t.__svgEl;i||(i=bo("path"),t.__svgEl=i),t.path||t.createPathProxy();var r=t.path;if(t.__dirtyPath){r.beginPath(),r.subPixelOptimize=!1,t.buildPath(r,t.shape),t.__dirtyPath=!1;var n=function(t){for(var e=[],i=t.data,r=t.len(),n=0;n<r;){var a="",o=0;switch(i[n++]){case ko.M:a="M",o=2;break;case ko.L:a="L",o=2;break;case ko.Q:a="Q",o=4;break;case ko.C:a="C",o=6;break;case ko.A:var s=i[n++],h=i[n++],l=i[n++],u=i[n++],c=i[n++],f=i[n++],d=i[n++],p=i[n++],v=Math.abs(f),g=Io(v-Lo)||(p?Lo<=f:Lo<=-f),_=0<f?f%Lo:f%Lo+Lo,y=!1;y=!!g||!Io(v)&&Po<=_==!!p;var m=Do(s+l*Ao(c)),x=Do(h+u*Mo(c));g&&(f=p?Lo-1e-4:1e-4-Lo,y=!0,9===n&&e.push("M",m,x));var w=Do(s+l*Ao(c+f)),b=Do(h+u*Mo(c+f));e.push("A",Do(l),Do(u),Co(d*zo),+y,+p,w,b);break;case ko.Z:a="Z";break;case ko.R:w=Do(i[n++]),b=Do(i[n++]);var k=Do(i[n++]),T=Do(i[n++]);e.push("M",w,b,"L",w+k,b,"L",w+k,b+T,"L",w,b+T,"L",w,b)}a&&e.push(a);for(var S=0;S<o;S++)e.push(Do(i[n++]))}return e.join(" ")}(r);n.indexOf("NaN")<0&&Ro(i,"d",n)}Eo(i,e,!1,t),Oo(i,t.transform),null!=e.text&&jo(t,t.getBoundingRect())};var Ho={brush:function(t){var e=t.style,i=e.image;i instanceof HTMLImageElement&&(i=i.src);if(i){var r=e.x||0,n=e.y||0,a=e.width,o=e.height,s=t.__svgEl;s||(s=bo("image"),t.__svgEl=s),i!==t.__imageSrc&&(function(t,e,i){t.setAttributeNS("http://www.w3.org/1999/xlink",e,i)}(s,"href",i),t.__imageSrc=i),Ro(s,"width",a),Ro(s,"height",o),Ro(s,"x",r),Ro(s,"y",n),Oo(s,t.transform),null!=e.text&&jo(t,t.getBoundingRect())}}},No={},Wo=new $e,Vo={},Xo=[],qo={left:"start",right:"end",center:"middle",middle:"middle"},jo=function(t,e){var i=t.style,r=t.transform,n=t instanceof ma||i.transformText;t.__dirty&&ir(i);var a=i.text;if(null!=a&&(a+=""),gr(a,i)){null==a&&(a=""),!n&&r&&(Wo.copy(e),Wo.applyTransform(r),e=Wo);var o=t.__textSvgEl;o||(o=bo("text"),t.__textSvgEl=o);var s=o.style,h=i.font||Ii,l=o.__computedFont;h!==o.__styleFont&&(s.font=o.__styleFont=h,l=o.__computedFont=s.font);var u=i.textPadding,c=i.textLineHeight,f=t.__textCotentBlock;f&&!t.__dirtyText||(f=t.__textCotentBlock=Yi(a,l,u,c,i.truncate));var d=f.outerHeight,p=f.lineHeight;ur(Vo,t,i,e);var v=Vo.baseX,g=Vo.baseY,_=Vo.textAlign||"left",y=Vo.textVerticalAlign;!function(t,e,i,r,n,a,o){Dt(Xo),e&&i&&It(Xo,i);var s=r.textRotation;if(n&&s){var h=r.textOrigin;"center"===h?(a=n.width/2+n.x,o=n.height/2+n.y):h&&(a=h[0]+n.x,o=h[1]+n.y),Xo[4]-=a,Xo[5]-=o,Et(Xo,Xo,s),Xo[4]+=a,Xo[5]+=o}Oo(t,Xo)}(o,n,r,i,e,v,g);var m=v,x=Hi(g,d,y);u&&(m=function(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}(v,_,u),x+=u[0]),x+=p/2,Eo(o,i,!0,t);var w=f.canCacheByTextString,b=t.__tspanList||(t.__tspanList=[]),k=b.length;if(w&&t.__canCacheByTextString&&t.__text===a){if(t.__dirtyText&&k)for(var T=0;T<k;++T)Yo(b[T],_,m,x+T*p)}else{t.__text=a,t.__canCacheByTextString=w;var S=f.lines,C=S.length;for(T=0;T<C;T++){var M=b[T],A=S[T];M?M.__zrText!==A&&(M.innerHTML="",M.appendChild(document.createTextNode(A))):(M=b[T]=bo("tspan"),o.appendChild(M),M.appendChild(document.createTextNode(A))),Yo(M,_,m,x+T*p)}if(C<k){for(;T<k;T++)o.removeChild(b[T]);b.length=C}}}};function Yo(t,e,i,r){Ro(t,"dominant-baseline","middle"),Ro(t,"text-anchor",qo[e]),Ro(t,"x",i),Ro(t,"y",r)}function Uo(){}function Go(t,e){for(var i=0,r=e.length,n=0,a=0;i<r;i++){var o=e[i];if(o.removed){for(s=[],h=a;h<a+o.count;h++)s.push(h);o.indices=s,a+=o.count}else{for(var s=[],h=n;h<n+o.count;h++)s.push(h);o.indices=s,n+=o.count,o.added||(a+=o.count)}}return e}No.drawRectText=jo,No.brush=function(t){null!=t.style.text&&jo(t,!1)},Uo.prototype={diff:function(h,l,t){t=t||function(t,e){return t===e},this.equals=t;var u=this;h=h.slice();var c=(l=l.slice()).length,f=h.length,d=1,e=c+f,p=[{newPos:-1,components:[]}],i=this.extractCommon(p[0],l,h,0);if(p[0].newPos+1>=c&&f<=i+1){for(var r=[],n=0;n<l.length;n++)r.push(n);return[{indices:r,count:l.length}]}function a(){for(var t=-1*d;t<=d;t+=2){var e,i=p[t-1],r=p[t+1],n=(r?r.newPos:0)-t;i&&(p[t-1]=void 0);var a=i&&i.newPos+1<c,o=r&&0<=n&&n<f;if(a||o){if(!a||o&&i.newPos<r.newPos?(e={newPos:(s=r).newPos,components:s.components.slice(0)},u.pushComponent(e.components,void 0,!0)):((e=i).newPos++,u.pushComponent(e.components,!0,void 0)),n=u.extractCommon(e,l,h,t),e.newPos+1>=c&&f<=n+1)return Go(u,e.components,l,h);p[t]=e}else p[t]=void 0}var s;d++}for(;d<=e;){var o=a();if(o)return o}},pushComponent:function(t,e,i){var r=t[t.length-1];r&&r.added===e&&r.removed===i?t[t.length-1]={count:r.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,r){for(var n=e.length,a=i.length,o=t.newPos,s=o-r,h=0;o+1<n&&s+1<a&&this.equals(e[o+1],i[s+1]);)o++,s++,h++;return h&&t.components.push({count:h}),t.newPos=o,s},tokenize:function(t){return t.slice()},join:function(t){return t.slice()}};var Zo=new Uo;function Qo(t,e,i,r,n){this._zrId=t,this._svgRoot=e,this._tagNames="string"==typeof i?[i]:i,this._markLabel=r,this._domName=n||"_dom",this.nextId=0}function $o(t,e){Qo.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")}function Ko(t,e){Qo.call(this,t,e,"clipPath","__clippath_in_use__")}function Jo(t,e){Qo.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")}function ts(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}function es(t){return parseInt(t,10)}function is(t,e){return e&&t&&e.parentNode!==t}function rs(t,e,i){if(is(t,e)&&i){var r=i.nextSibling;r?t.insertBefore(e,r):t.appendChild(e)}}function ns(t,e){if(is(t,e)){var i=t.firstChild;i?t.insertBefore(e,i):t.appendChild(e)}}function as(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function os(t){return t.__textSvgEl}function ss(t){return t.__svgEl}Qo.prototype.createElement=bo,Qo.prototype.getDefs=function(t){var e=this._svgRoot,r=this._svgRoot.getElementsByTagName("defs");return 0===r.length?t?((r=e.insertBefore(this.createElement("defs"),e.firstChild)).contains||(r.contains=function(t){var e=r.children;if(!e)return!1;for(var i=e.length-1;0<=i;--i)if(e[i]===t)return!0;return!1}),r):null:r[0]},Qo.prototype.update=function(t,e){if(t){var i=this.getDefs(!1);if(t[this._domName]&&i.contains(t[this._domName]))"function"==typeof e&&e(t);else{var r=this.add(t);r&&(t[this._domName]=r)}}},Qo.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},Qo.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},Qo.prototype.getDoms=function(){var i=this.getDefs(!1);if(!i)return[];var r=[];return T(this._tagNames,function(t){var e=i.getElementsByTagName(t);r=r.concat([].slice.call(e))}),r},Qo.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;T(t,function(t){t[e._markLabel]="0"})},Qo.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},Qo.prototype.removeUnused=function(){var e=this.getDefs(!1);if(e){var t=this.getDoms(),i=this;T(t,function(t){"1"!==t[i._markLabel]&&e.removeChild(t)})}},Qo.prototype.getSvgProxy=function(t){return t instanceof ta?Fo:t instanceof xr?Ho:t instanceof ma?No:Fo},Qo.prototype.getTextSvgElement=function(t){return t.__textSvgEl},Qo.prototype.getSvgElement=function(t){return t.__svgEl},b($o,Qo),$o.prototype.addWithoutUpdate=function(a,o){if(o&&o.style){var s=this;T(["fill","stroke"],function(t){if(o.style[t]&&("linear"===o.style[t].type||"radial"===o.style[t].type)){var e,i=o.style[t],r=s.getDefs(!0);i._dom?(e=i._dom,r.contains(i._dom)||s.addDom(e)):e=s.add(i),s.markUsed(o);var n=e.getAttribute("id");a.setAttribute(t,"url(#"+n+")")}})}},$o.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return Ne("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},$o.prototype.update=function(i){var r=this;Qo.prototype.update.call(this,i,function(){var t=i.type,e=i._dom.tagName;"linear"===t&&"linearGradient"===e||"radial"===t&&"radialGradient"===e?r.updateDom(i,i._dom):(r.removeDom(i),r.add(i))})},$o.prototype.updateDom=function(t,e){if("linear"===t.type)e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else{if("radial"!==t.type)return void Ne("Illegal gradient type.");e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r)}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var i=t.colorStops,r=0,n=i.length;r<n;++r){var a=this.createElement("stop");a.setAttribute("offset",100*i[r].offset+"%");var o=i[r].color;if(o.indexOf(!1)){var s=de(o)[3],h=ve(o);a.setAttribute("stop-color","#"+h),a.setAttribute("stop-opacity",s)}else a.setAttribute("stop-color",i[r].color);e.appendChild(a)}t._dom=e},$o.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&Qo.prototype.markUsed.call(this,e._dom),(e=t.style.stroke)&&e._dom&&Qo.prototype.markUsed.call(this,e._dom)}},b(Ko,Qo),Ko.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var i=this.getTextSvgElement(t);i&&this.updateDom(i,t.__clipPaths,!0),this.markUsed(t)},Ko.prototype.updateDom=function(t,e,i){if(e&&0<e.length){var r,n,a=this.getDefs(!0),o=e[0],s=i?"_textDom":"_dom";o[s]?(n=o[s].getAttribute("id"),r=o[s],a.contains(r)||a.appendChild(r)):(n="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(r=this.createElement("clipPath")).setAttribute("id",n),a.appendChild(r),o[s]=r);var h=this.getSvgProxy(o);if(o.transform&&o.parent.invTransform&&!i){var l=Array.prototype.slice.call(o.transform);Ot(o.transform,o.parent.invTransform,o.transform),h.brush(o),o.transform=l}else h.brush(o);var u=this.getSvgElement(o);r.innerHTML="",r.appendChild(u.cloneNode()),t.setAttribute("clip-path","url(#"+n+")"),1<e.length&&this.updateDom(r,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},Ko.prototype.markUsed=function(t){var e=this;t.__clipPaths&&T(t.__clipPaths,function(t){t._dom&&Qo.prototype.markUsed.call(e,t._dom),t._textDom&&Qo.prototype.markUsed.call(e,t._textDom)})},b(Jo,Qo),Jo.prototype.addWithoutUpdate=function(t,e){if(e&&ts(e.style)){var i;if(e._shadowDom)i=e._shadowDom,this.getDefs(!0).contains(e._shadowDom)||this.addDom(i);else i=this.add(e);this.markUsed(e);var r=i.getAttribute("id");t.style.filter="url(#"+r+")"}},Jo.prototype.add=function(t){var e=this.createElement("filter");return t._shadowDomId=t._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+t._shadowDomId),this.updateDom(t,e),this.addDom(e),e},Jo.prototype.update=function(t,e){if(ts(e.style)){var i=this;Qo.prototype.update.call(this,e,function(){i.updateDom(e,e._shadowDom)})}else this.remove(t,e)},Jo.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(t),t.style.filter="")},Jo.prototype.updateDom=function(t,e){var i=e.getElementsByTagName("feDropShadow");i=0===i.length?this.createElement("feDropShadow"):i[0];var r,n,a,o,s=t.style,h=t.scale&&t.scale[0]||1,l=t.scale&&t.scale[1]||1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)r=s.shadowOffsetX||0,n=s.shadowOffsetY||0,a=s.shadowBlur,o=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);r=s.textShadowOffsetX||0,n=s.textShadowOffsetY||0,a=s.textShadowBlur,o=s.textShadowColor}i.setAttribute("dx",r/h),i.setAttribute("dy",n/l),i.setAttribute("flood-color",o);var u=a/2/h+" "+a/2/l;i.setAttribute("stdDeviation",u),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(a/2*200)+"%"),e.setAttribute("height",Math.ceil(a/2*200)+"%"),e.appendChild(i),t._shadowDom=e},Jo.prototype.markUsed=function(t){t._shadowDom&&Qo.prototype.markUsed.call(this,t._shadowDom)};function hs(t,e,i,r){this.root=t,this.storage=e,this._opts=i=v({},i||{});var n=bo("svg");n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.setAttribute("version","1.1"),n.setAttribute("baseProfile","full"),n.style.cssText="user-select:none;position:absolute;left:0;top:0;",this.gradientManager=new $o(r,n),this.clipPathManager=new Ko(r,n),this.shadowManager=new Jo(r,n);var a=document.createElement("div");a.style.cssText="overflow:hidden;position:relative",this._svgRoot=n,this._viewport=a,t.appendChild(a),a.appendChild(n),this.resize(i.width,i.height),this._visibleList=[]}hs.prototype={constructor:hs,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},setBackgroundColor:function(t){this._viewport.style.background=t},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var e,i,r=this._svgRoot,n=this._visibleList,a=t.length,o=[];for(e=0;e<a;e++){var s=t[e],h=(i=s)instanceof ta?Fo:i instanceof xr?Ho:i instanceof ma?No:Fo,l=ss(s)||os(s);s.invisible||(s.__dirty&&(h&&h.brush(s),this.clipPathManager.update(s),s.style&&(this.gradientManager.update(s.style.fill),this.gradientManager.update(s.style.stroke),this.shadowManager.update(l,s)),s.__dirty=!1),o.push(s))}var u,c=function(t,e,i){return Zo.diff(t,e,i)}(n,o);for(e=0;e<c.length;e++){if((p=c[e]).removed)for(var f=0;f<p.count;f++){l=ss(s=n[p.indices[f]]);var d=os(s);as(r,l),as(r,d)}}for(e=0;e<c.length;e++){var p;if((p=c[e]).added)for(f=0;f<p.count;f++){l=ss(s=o[p.indices[f]]),d=os(s);u?rs(r,l,u):ns(r,l),l?rs(r,d,l):u?rs(r,d,u):ns(r,d),rs(r,d,l),u=d||l||u,this.gradientManager.addWithoutUpdate(l||d,s),this.shadowManager.addWithoutUpdate(l||d,s),this.clipPathManager.markUsed(s)}else if(!p.removed)for(f=0;f<p.count;f++){u=os(s=o[p.indices[f]])||ss(s)||u;l=ss(s),d=os(s);this.gradientManager.markUsed(s),this.gradientManager.addWithoutUpdate(l||d,s),this.shadowManager.markUsed(s),this.shadowManager.addWithoutUpdate(l||d,s),this.clipPathManager.markUsed(s)}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=o},_getDefs:function(t){var r,e=this._svgRoot;return 0!==(r=this._svgRoot.getElementsByTagName("defs")).length?r[0]:t?((r=e.insertBefore(bo("defs"),e.firstChild)).contains||(r.contains=function(t){var e=r.children;if(!e)return!1;for(var i=e.length-1;0<=i;--i)if(e[i]===t)return!0;return!1}),r):null},resize:function(t,e){var i=this._viewport;i.style.display="none";var r=this._opts;if(null!=t&&(r.width=t),null!=e&&(r.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var n=i.style;n.width=t+"px",n.height=e+"px";var a=this._svgRoot;a.setAttribute("width",t),a.setAttribute("height",e)}},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],r=["clientWidth","clientHeight"][t],n=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[r]||es(s[i])||es(o.style[i]))-(es(s[n])||0)-(es(s[a])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},pathToDataUrl:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+this._svgRoot.outerHTML}},T(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){hs.prototype[t]=function(t){return function(){Ne('In SVG mode painter not support method "'+t+'"')}}(t)}),Nr("svg",hs);var ls,us="urn:schemas-microsoft-com:vml",cs="undefined"==typeof window?null:window,fs=!1,ds=cs&&cs.document;function ps(t){return ls(t)}if(ds&&!_.canvasSupported)try{ds.namespaces.zrvml||ds.namespaces.add("zrvml",us),ls=function(t){return ds.createElement("<zrvml:"+t+' class="zrvml">')}}catch(t){ls=function(t){return ds.createElement("<"+t+' xmlns="'+us+'" class="zrvml">')}}var vs,gs=Dn.CMD,_s=Math.round,ys=Math.sqrt,ms=Math.abs,xs=Math.cos,ws=Math.sin,bs=Math.max;if(!_.canvasSupported){var ks=",",Ts="progid:DXImageTransform.Microsoft",Ss=21600,Cs=Ss/2,Ms=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=Ss+","+Ss,t.coordorigin="0,0"},As=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},Ps=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},Ls=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},zs=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},Bs=pr,Ds=function(t,e,i){var r=de(e);i=+i,isNaN(i)&&(i=1),r&&(t.color=As(r[0],r[1],r[2]),t.opacity=i*r[3])},Is=function(t,e,i,r){var n="fill"===e,a=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(n||!n&&i.lineWidth)?(t[n?"filled":"stroked"]="true",i[e]instanceof La&&Ls(t,a),a=a||ps(e),n?function(t,e,i){var r,n,a=e.fill;if(null!=a)if(a instanceof La){var o,s=0,h=[0,0],l=0,u=1,c=i.getBoundingRect(),f=c.width,d=c.height;if("linear"===a.type){o="gradient";var p=i.transform,v=[a.x*f,a.y*d],g=[a.x2*f,a.y2*d];p&&(rt(v,v,p),rt(g,g,p));var _=g[0]-v[0],y=g[1]-v[1];(s=180*Math.atan2(_,y)/Math.PI)<0&&(s+=360),s<1e-6&&(s=0)}else{o="gradientradial";v=[a.x*f,a.y*d],p=i.transform;var m=i.scale,x=f,w=d;h=[(v[0]-c.x)/x,(v[1]-c.y)/w],p&&rt(v,v,p),x/=m[0]*Ss,w/=m[1]*Ss;var b=bs(x,w);l=0/b,u=2*a.r/b-l}var k=a.colorStops.slice();k.sort(function(t,e){return t.offset-e.offset});for(var T=k.length,S=[],C=[],M=0;M<T;M++){var A=k[M],P=(r=A.color,void 0,n=de(r),[As(n[0],n[1],n[2]),n[3]]);C.push(A.offset*u+l+" "+P[0]),0!==M&&M!==T-1||S.push(P)}if(2<=T){var L=S[0][0],z=S[1][0],B=S[0][1]*e.opacity,D=S[1][1]*e.opacity;t.type=o,t.method="none",t.focus="100%",t.angle=s,t.color=L,t.color2=z,t.colors=C.join(","),t.opacity=D,t.opacity2=B}"radial"===o&&(t.focusposition=h.join(","))}else Ds(t,a,e.opacity)}(a,i,r):function(t,e){e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof La||Ds(t,e.stroke,e.opacity)}(a,i),Ps(t,a)):(t[n?"filled":"stroked"]="false",Ls(t,a))},Os=[[],[],[]];ta.prototype.brushVML=function(t){var e=this.style,i=this._vmlEl;i||(i=ps("shape"),Ms(i),this._vmlEl=i),Is(i,"fill",e,this),Is(i,"stroke",e,this);var r=this.transform,n=null!=r,a=i.getElementsByTagName("stroke")[0];if(a){var o=e.lineWidth;if(n&&!e.strokeNoScale){var s=r[0]*r[3]-r[1]*r[2];o*=ys(ms(s))}a.weight=o+"px"}var h=this.path||(this.path=new Dn);this.__dirtyPath&&(h.beginPath(),h.subPixelOptimize=!1,this.buildPath(h,this.shape),h.toStatic(),this.__dirtyPath=!1),i.path=function(t,e){var i,r,n,a,o,s,h=gs.M,l=gs.C,u=gs.L,c=gs.A,f=gs.Q,d=[],p=t.data,v=t.len();for(a=0;a<v;){switch(r="",i=0,n=p[a++]){case h:r=" m ",i=1,o=p[a++],s=p[a++],Os[0][0]=o,Os[0][1]=s;break;case u:r=" l ",i=1,o=p[a++],s=p[a++],Os[0][0]=o,Os[0][1]=s;break;case f:case l:r=" c ",i=3;var g,_,y=p[a++],m=p[a++],x=p[a++],w=p[a++];n===f?(x=((g=x)+2*y)/3,w=((_=w)+2*m)/3,y=(o+2*y)/3,m=(s+2*m)/3):(g=p[a++],_=p[a++]),Os[0][0]=y,Os[0][1]=m,Os[1][0]=x,Os[1][1]=w,o=Os[2][0]=g,s=Os[2][1]=_;break;case c:var b=0,k=0,T=1,S=1,C=0;e&&(b=e[4],k=e[5],T=ys(e[0]*e[0]+e[1]*e[1]),S=ys(e[2]*e[2]+e[3]*e[3]),C=Math.atan2(-e[1]/S,e[0]/T));var M=p[a++],A=p[a++],P=p[a++],L=p[a++],z=p[a++]+C,B=p[a++]+z+C;a++;var D=p[a++],I=M+xs(z)*P,O=A+ws(z)*L,R=(y=M+xs(B)*P,m=A+ws(B)*L,D?" wa ":" at ");Math.abs(I-y)<1e-4&&(.01<Math.abs(B-z)?D&&(I+=.0125):Math.abs(O-A)<1e-4?D&&I<M||!D&&M<I?m-=.0125:m+=.0125:D&&O<A||!D&&A<O?y+=.0125:y-=.0125),d.push(R,_s(((M-P)*T+b)*Ss-Cs),ks,_s(((A-L)*S+k)*Ss-Cs),ks,_s(((M+P)*T+b)*Ss-Cs),ks,_s(((A+L)*S+k)*Ss-Cs),ks,_s((I*T+b)*Ss-Cs),ks,_s((O*S+k)*Ss-Cs),ks,_s((y*T+b)*Ss-Cs),ks,_s((m*S+k)*Ss-Cs)),o=y,s=m;break;case gs.R:var E=Os[0],F=Os[1];E[0]=p[a++],E[1]=p[a++],F[0]=E[0]+p[a++],F[1]=E[1]+p[a++],e&&(rt(E,E,e),rt(F,F,e)),E[0]=_s(E[0]*Ss-Cs),F[0]=_s(F[0]*Ss-Cs),E[1]=_s(E[1]*Ss-Cs),F[1]=_s(F[1]*Ss-Cs),d.push(" m ",E[0],ks,E[1]," l ",F[0],ks,E[1]," l ",F[0],ks,F[1]," l ",E[0],ks,F[1]);break;case gs.Z:d.push(" x ")}if(0<i){d.push(r);for(var H=0;H<i;H++){var N=Os[H];e&&rt(N,N,e),d.push(_s(N[0]*Ss-Cs),ks,_s(N[1]*Ss-Cs),H<i-1?ks:"")}}}return d.join("")}(h,this.transform),i.style.zIndex=zs(this.zlevel,this.z,this.z2),Ps(t,i),null!=e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},ta.prototype.onRemove=function(t){Ls(t,this._vmlEl),this.removeRectText(t)},ta.prototype.onAdd=function(t){Ps(t,this._vmlEl),this.appendRectText(t)};xr.prototype.brushVML=function(t){var e,i,r=this.style,n=r.image;if(function(t){return"object"==typeof t&&t.tagName&&"IMG"===t.tagName.toUpperCase()}(n)){var a=n.src;if(a===this._imageSrc)e=this._imageWidth,i=this._imageHeight;else{var o=n.runtimeStyle,s=o.width,h=o.height;o.width="auto",o.height="auto",e=n.width,i=n.height,o.width=s,o.height=h,this._imageSrc=a,this._imageWidth=e,this._imageHeight=i}n=a}else n===this._imageSrc&&(e=this._imageWidth,i=this._imageHeight);if(n){var l=r.x||0,u=r.y||0,c=r.width,f=r.height,d=r.sWidth,p=r.sHeight,v=r.sx||0,g=r.sy||0,_=d&&p,y=this._vmlEl;y||(y=ds.createElement("div"),Ms(y),this._vmlEl=y);var m,x=y.style,w=!1,b=1,k=1;if(this.transform&&(m=this.transform,b=ys(m[0]*m[0]+m[1]*m[1]),k=ys(m[2]*m[2]+m[3]*m[3]),w=m[1]||m[2]),w){var T=[l,u],S=[l+c,u],C=[l,u+f],M=[l+c,u+f];rt(T,T,m),rt(S,S,m),rt(C,C,m),rt(M,M,m);var A=bs(T[0],S[0],C[0],M[0]),P=bs(T[1],S[1],C[1],M[1]),L=[];L.push("M11=",m[0]/b,ks,"M12=",m[2]/k,ks,"M21=",m[1]/b,ks,"M22=",m[3]/k,ks,"Dx=",_s(l*b+m[4]),ks,"Dy=",_s(u*k+m[5])),x.padding="0 "+_s(A)+"px "+_s(P)+"px 0",x.filter=Ts+".Matrix("+L.join("")+", SizingMethod=clip)"}else m&&(l=l*b+m[4],u=u*k+m[5]),x.filter="",x.left=_s(l)+"px",x.top=_s(u)+"px";var z=this._imageEl,B=this._cropEl;z||(z=ds.createElement("div"),this._imageEl=z);var D=z.style;if(_){if(e&&i)D.width=_s(b*e*c/d)+"px",D.height=_s(k*i*f/p)+"px";else{var I=new Image,O=this;I.onload=function(){I.onload=null,e=I.width,i=I.height,D.width=_s(b*e*c/d)+"px",D.height=_s(k*i*f/p)+"px",O._imageWidth=e,O._imageHeight=i,O._imageSrc=n},I.src=n}B||((B=ds.createElement("div")).style.overflow="hidden",this._cropEl=B);var R=B.style;R.width=_s((c+v*c/d)*b),R.height=_s((f+g*f/p)*k),R.filter=Ts+".Matrix(Dx="+-v*c/d*b+",Dy="+-g*f/p*k+")",B.parentNode||y.appendChild(B),z.parentNode!==B&&B.appendChild(z)}else D.width=_s(b*c)+"px",D.height=_s(k*f)+"px",y.appendChild(z),B&&B.parentNode&&(y.removeChild(B),this._cropEl=null);var E="",F=r.opacity;F<1&&(E+=".Alpha(opacity="+_s(100*F)+") "),E+=Ts+".AlphaImageLoader(src="+n+", SizingMethod=scale)",D.filter=E,y.style.zIndex=zs(this.zlevel,this.z,this.z2),Ps(t,y),null!=r.text&&this.drawRectText(t,this.getBoundingRect())}},xr.prototype.onRemove=function(t){Ls(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},xr.prototype.onAdd=function(t){Ps(t,this._vmlEl),this.appendRectText(t)};var Rs,Es="normal",Fs={},Hs=0,Ns=document.createElement("div");vs=function(t,e){var i=ds;Rs||((Rs=i.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",ds.body.appendChild(Rs));try{Rs.style.font=e}catch(t){}return Rs.innerHTML="",Rs.appendChild(i.createTextNode(t)),{width:Rs.offsetWidth}},Oi["measureText"]=vs;for(var Ws=new $e,Vs=function(t,e,i,r){var n=this.style;this.__dirty&&ir(n);var a=n.text;if(null!=a&&(a+=""),a){if(n.rich){var o=Ui(a,n);a=[];for(var s=0;s<o.lines.length;s++){for(var h=o.lines[s].tokens,l=[],u=0;u<h.length;u++)l.push(h[u].text);a.push(l.join(""))}a=a.join("\n")}var c,f,d=n.textAlign,p=n.textVerticalAlign,v=function(t){var e=Fs[t];if(!e){100<Hs&&(Hs=0,Fs={});var i,r=Ns.style;try{r.font=t,i=r.fontFamily.split(",")[0]}catch(t){}e={style:r.fontStyle||Es,variant:r.fontVariant||Es,weight:r.fontWeight||Es,size:0|parseFloat(r.fontSize||12),family:i||"Microsoft YaHei"},Fs[t]=e,Hs++}return e}(n.font),g=v.style+" "+v.variant+" "+v.weight+" "+v.size+'px "'+v.family+'"';i=i||Ei(a,g,d,p,n.textPadding,n.textLineHeight);var _=this.transform;if(_&&!r&&(Ws.copy(e),Ws.applyTransform(_),e=Ws),r)c=e.x,f=e.y;else{var y=n.textPosition;if(y instanceof Array)c=e.x+Bs(y[0],e.width),f=e.y+Bs(y[1],e.height),d=d||"left";else{var m=this.calculateTextPosition?this.calculateTextPosition({},n,e):Ni({},n,e);c=m.x,f=m.y,d=d||m.textAlign,p=p||m.textVerticalAlign}}c=Fi(c,i.width,d),f=Hi(f,i.height,p),f+=i.height/2;var x,w,b,k=ps,T=this._textVmlEl;T?w=(x=(b=T.firstChild).nextSibling).nextSibling:(T=k("line"),x=k("path"),w=k("textpath"),b=k("skew"),w.style["v-text-align"]="left",Ms(T),x.textpathok=!0,w.on=!0,T.from="0 0",T.to="1000 0.05",Ps(T,b),Ps(T,x),Ps(T,w),this._textVmlEl=T);var S=[c,f],C=T.style;_&&r?(rt(S,S,_),b.on=!0,b.matrix=_[0].toFixed(3)+ks+_[2].toFixed(3)+ks+_[1].toFixed(3)+ks+_[3].toFixed(3)+",0,0",b.offset=(_s(S[0])||0)+","+(_s(S[1])||0),b.origin="0 0",C.left="0px",C.top="0px"):(b.on=!1,C.left=_s(c)+"px",C.top=_s(f)+"px"),w.string=function(t){return String(t).replace(/&/g,"&amp;").replace(/"/g,"&quot;")}(a);try{w.style.font=g}catch(t){}Is(T,"fill",{fill:n.textFill,opacity:n.opacity},this),Is(T,"stroke",{stroke:n.textStroke,opacity:n.opacity,lineDash:n.lineDash||null},this),T.style.zIndex=zs(this.zlevel,this.z,this.z2),Ps(t,T)}},Xs=function(t){Ls(t,this._textVmlEl),this._textVmlEl=null},qs=function(t){Ps(t,this._textVmlEl)},js=[_r,mr,xr,ta,ma],Ys=0;Ys<js.length;Ys++){var Us=js[Ys].prototype;Us.drawRectText=Vs,Us.removeRectText=Xs,Us.appendRectText=qs}ma.prototype.brushVML=function(t){var e=this.style;null!=e.text?this.drawRectText(t,{x:e.x||0,y:e.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(t)},ma.prototype.onRemove=function(t){this.removeRectText(t)},ma.prototype.onAdd=function(t){this.appendRectText(t)}}function Gs(t){return parseInt(t,10)}function Zs(t,e){!function(){if(!fs&&ds){fs=!0;var t=ds.styleSheets;t.length<31?ds.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}(),this.root=t,this.storage=e;var i=document.createElement("div"),r=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",r.style.cssText="position:absolute;left:0;top:0;",t.appendChild(i),this._vmlRoot=r,this._vmlViewport=i,this.resize();var n=e.delFromStorage,a=e.addToStorage;e.delFromStorage=function(t){n.call(e,t),t&&t.onRemove&&t.onRemove(r)},e.addToStorage=function(t){t.onAdd&&t.onAdd(r),a.call(e,t)},this._firstPaint=!0}Zs.prototype={constructor:Zs,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0,!0);this._paintList(t)},_paintList:function(t){for(var e=this._vmlRoot,i=0;i<t.length;i++){var r=t[i];r.invisible||r.ignore?(r.__alreadyNotVisible||r.onRemove(e),r.__alreadyNotVisible=!0):(r.__alreadyNotVisible&&r.onAdd(e),r.__alreadyNotVisible=!1,r.__dirty&&(r.beforeBrush&&r.beforeBrush(),(r.brushVML||r.brush).call(r,e),r.afterBrush&&r.afterBrush())),r.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(e),this._firstPaint=!1)},resize:function(t,e){t=null==t?this._getWidth():t,e=null==e?this._getHeight():e;if(this._width!==t||this._height!==e){this._width=t,this._height=e;var i=this._vmlViewport.style;i.width=t+"px",i.height=e+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var t=this.root,e=t.currentStyle;return(t.clientWidth||Gs(e.width))-Gs(e.paddingLeft)-Gs(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=t.currentStyle;return(t.clientHeight||Gs(e.height))-Gs(e.paddingTop)-Gs(e.paddingBottom)|0}},T(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){Zs.prototype[t]=function(t){return function(){Ne('In IE8.0 VML mode painter not support method "'+t+'"')}}(t)}),Nr("vml",Zs),t.version="4.1.2",t.init=function(t,e){var i=new Wr(r(),t,e);return Hr[i.id]=i},t.dispose=function(t){if(t)t.dispose();else{for(var e in Hr)Hr.hasOwnProperty(e)&&Hr[e].dispose();Hr={}}return this},t.getInstance=function(t){return Hr[t]},t.registerPainter=Nr,t.matrix=Nt,t.vector=ot,t.color=we,t.path=ya,t.util=W,t.parseSVG=function(t,e){return(new Oa).parse(t,e)},t.Group=Ke,t.Path=ta,t.Image=xr,t.CompoundPath=Ya,t.Text=ma,t.IncrementalDisplayable=Ua,t.Arc=Za,t.BezierCurve=to,t.Circle=xa,t.Droplet=eo,t.Ellipse=Sa,t.Heart=io,t.Isogon=oo,t.Line=Ma,t.Polygon=za,t.Polyline=Ba,t.Rect=Ta,t.Ring=so,t.Rose=co,t.Sector=po,t.Star=yo,t.Trochoid=wo,t.LinearGradient=Da,t.RadialGradient=Ka,t.Pattern=xi,t.BoundingRect=$e});
  