scripts.5ad936d419c636eb40a3.js 934 KB

1
  1. !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.echarts={})}(this,(function(e){"use strict";var t,n=2311,i=function(){return n++},a="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(e){var t={},n=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge\/([\d.]+)/),r=/micromessenger/i.test(e);return n&&(t.firefox=!0,t.version=n[1]),i&&(t.ie=!0,t.version=i[1]),a&&(t.edge=!0,t.version=a[1]),r&&(t.weChat=!0),{browser:t,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!t.ie&&!t.edge,pointerEventsSupported:"onpointerdown"in window&&(t.edge||t.ie&&11<=t.version),domSupported:"undefined"!=typeof document}}(navigator.userAgent),r={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},o={"[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},s=Object.prototype.toString,l=Array.prototype,u=l.forEach,c=l.filter,h=l.slice,d=l.map,p=l.reduce,f={};function g(e,n){"createCanvas"===e&&(t=null),f[e]=n}function m(e){if(null==e||"object"!=typeof e)return e;var t=e,n=s.call(e);if("[object Array]"===n){if(!K(e)){t=[];for(var i=0,a=e.length;i<a;i++)t[i]=m(e[i])}}else if(o[n]){if(!K(e)){var l=e.constructor;if(e.constructor.from)t=l.from(e);else for(t=new l(e.length),i=0,a=e.length;i<a;i++)t[i]=m(e[i])}}else if(!r[n]&&!K(e)&&!G(e))for(var u in t={},e)e.hasOwnProperty(u)&&(t[u]=m(e[u]));return t}function v(e,t,n){if(!R(t)||!R(e))return n?m(t):e;for(var i in t)if(t.hasOwnProperty(i)){var a=e[i],r=t[i];!R(r)||!R(a)||z(r)||z(a)||G(r)||G(a)||B(r)||B(a)||K(r)||K(a)?!n&&i in e||(e[i]=m(t[i])):v(a,r,n)}return e}function y(e,t){for(var n=e[0],i=1,a=e.length;i<a;i++)n=v(n,e[i],t);return n}function x(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function _(e,t,n){for(var i in t)t.hasOwnProperty(i)&&(n?null!=t[i]:null==e[i])&&(e[i]=t[i]);return e}function b(){return f.createCanvas()}function w(){return t=t||b().getContext("2d")}function S(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,i=e.length;n<i;n++)if(e[n]===t)return n}return-1}function M(e,t){var n=e.prototype;function i(){}for(var a in i.prototype=t.prototype,e.prototype=new i,n)n.hasOwnProperty(a)&&(e.prototype[a]=n[a]);(e.prototype.constructor=e).superClass=t}function T(e,t,n){_(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,n)}function C(e){if(e)return"string"!=typeof e&&"number"==typeof e.length}function I(e,t,n){if(e&&t)if(e.forEach&&e.forEach===u)e.forEach(t,n);else if(e.length===+e.length)for(var i=0,a=e.length;i<a;i++)t.call(n,e[i],i,e);else for(var r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function A(e,t,n){if(e&&t){if(e.map&&e.map===d)return e.map(t,n);for(var i=[],a=0,r=e.length;a<r;a++)i.push(t.call(n,e[a],a,e));return i}}function D(e,t,n,i){if(e&&t){if(e.reduce&&e.reduce===p)return e.reduce(t,n,i);for(var a=0,r=e.length;a<r;a++)n=t.call(i,n,e[a],a,e);return n}}function k(e,t,n){if(e&&t){if(e.filter&&e.filter===c)return e.filter(t,n);for(var i=[],a=0,r=e.length;a<r;a++)t.call(n,e[a],a,e)&&i.push(e[a]);return i}}function L(e,t,n){if(e&&t)for(var i=0,a=e.length;i<a;i++)if(t.call(n,e[i],i,e))return e[i]}function E(e,t){var n=h.call(arguments,2);return function(){return e.apply(t,n.concat(h.call(arguments)))}}function P(e){var t=h.call(arguments,1);return function(){return e.apply(this,t.concat(h.call(arguments)))}}function z(e){return"[object Array]"===s.call(e)}function O(e){return"function"==typeof e}function N(e){return"[object String]"===s.call(e)}function R(e){var t=typeof e;return"function"==t||!!e&&"object"==t}function B(e){return!!r[s.call(e)]}function V(e){return!!o[s.call(e)]}function G(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}function W(e){return e!=e}function H(e){for(var t=0,n=arguments.length;t<n;t++)if(null!=arguments[t])return arguments[t]}function F(e,t){return null!=e?e:t}function $(e,t,n){return null!=e?e:null!=t?t:n}function X(){return Function.call.apply(h,arguments)}function Y(e){if("number"==typeof e)return[e,e,e,e];var t=e.length;return 2===t?[e[0],e[1],e[0],e[1]]:3===t?[e[0],e[1],e[2],e[1]]:e}function U(e,t){if(!e)throw new Error(t)}function j(e){return null==e?null:"function"==typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}f.createCanvas=function(){return document.createElement("canvas")};var Z="__ec_primitive__";function q(e){e[Z]=!0}function K(e){return e[Z]}function J(e){var t=z(e);this.data={};var n=this;function i(e,i){t?n.set(e,i):n.set(i,e)}e instanceof J?e.each(i):e&&I(e,i)}function Q(e){return new J(e)}function ee(e,t){for(var n=new e.constructor(e.length+t.length),i=0;i<e.length;i++)n[i]=e[i];var a=e.length;for(i=0;i<t.length;i++)n[i+a]=t[i];return n}function te(){}J.prototype={constructor:J,get:function(e){return this.data.hasOwnProperty(e)?this.data[e]:null},set:function(e,t){return this.data[e]=t},each:function(e,t){for(var n in void 0!==t&&(e=E(e,t)),this.data)this.data.hasOwnProperty(n)&&e(this.data[n],n)},removeKey:function(e){delete this.data[e]}};var ne=(Object.freeze||Object)({$override:g,clone:m,merge:v,mergeAll:y,extend:x,defaults:_,createCanvas:b,getContext:w,indexOf:S,inherits:M,mixin:T,isArrayLike:C,each:I,map:A,reduce:D,filter:k,find:L,bind:E,curry:P,isArray:z,isFunction:O,isString:N,isObject:R,isBuiltInObject:B,isTypedArray:V,isDom:G,eqNaN:W,retrieve:H,retrieve2:F,retrieve3:$,slice:X,normalizeCssArray:Y,assert:U,trim:j,setAsPrimitive:q,isPrimitive:K,createHashMap:Q,concatArray:ee,noop:te}),ie="undefined"==typeof Float32Array?Array:Float32Array;function ae(e,t){var n=new ie(2);return null==e&&(e=0),null==t&&(t=0),n[0]=e,n[1]=t,n}function re(e,t){return e[0]=t[0],e[1]=t[1],e}function oe(e){var t=new ie(2);return t[0]=e[0],t[1]=e[1],t}function se(e,t,n){return e[0]=t,e[1]=n,e}function le(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function ue(e,t,n,i){return e[0]=t[0]+n[0]*i,e[1]=t[1]+n[1]*i,e}function ce(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e}function he(e){return Math.sqrt(pe(e))}var de=he;function pe(e){return e[0]*e[0]+e[1]*e[1]}var fe=pe;function ge(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e}function me(e,t){var n=he(t);return 0===n?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e}function ve(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}var ye=ve;function xe(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])}var _e=xe;function be(e,t,n,i){return e[0]=t[0]+i*(n[0]-t[0]),e[1]=t[1]+i*(n[1]-t[1]),e}function we(e,t,n){var i=t[0],a=t[1];return e[0]=n[0]*i+n[2]*a+n[4],e[1]=n[1]*i+n[3]*a+n[5],e}function Se(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function Me(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var Te=(Object.freeze||Object)({create:ae,copy:re,clone:oe,set:se,add:le,scaleAndAdd:ue,sub:ce,len:he,length:de,lenSquare:pe,lengthSquare:fe,mul:function(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e},div:function(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e},dot:function(e,t){return e[0]*t[0]+e[1]*t[1]},scale:ge,normalize:me,distance:ve,dist:ye,distanceSquare:xe,distSquare:_e,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e},lerp:be,applyTransform:we,min:Se,max:Me});function Ce(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function Ie(e,t){return{target:e,topTarget:t&&t.topTarget}}Ce.prototype={constructor:Ce,_dragStart:function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent;t&&((this._draggingTarget=t).dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.dispatchToElement(Ie(t,e),"dragstart",e.event))},_drag:function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,i=e.offsetY,a=n-this._x,r=i-this._y;this._x=n,this._y=i,t.drift(a,r,e),this.dispatchToElement(Ie(t,e),"drag",e.event);var o=this.findHover(n,i,t).target,s=this._dropTarget;t!==(this._dropTarget=o)&&(s&&o!==s&&this.dispatchToElement(Ie(s,e),"dragleave",e.event),o&&o!==s&&this.dispatchToElement(Ie(o,e),"dragenter",e.event))}},_dragEnd:function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.dispatchToElement(Ie(t,e),"dragend",e.event),this._dropTarget&&this.dispatchToElement(Ie(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null}};var Ae=Array.prototype.slice,De=function(e){this._$handlers={},this._$eventProcessor=e};function ke(e,t,n,i,a,r){var o=e._$handlers;if("function"==typeof n&&(a=i,i=n,n=null),!i||!t)return e;n=function(e,t){var n=e._$eventProcessor;return null!=t&&n&&n.normalizeQuery&&(t=n.normalizeQuery(t)),t}(e,n),o[t]||(o[t]=[]);for(var s=0;s<o[t].length;s++)if(o[t][s].h===i)return e;var l={h:i,one:r,query:n,ctx:a||e,callAtLast:i.zrEventfulCallAtLast},u=o[t].length-1,c=o[t][u];return c&&c.callAtLast?o[t].splice(u,0,l):o[t].push(l),e}De.prototype={constructor:De,one:function(e,t,n,i){return ke(this,e,t,n,i,!0)},on:function(e,t,n,i){return ke(this,e,t,n,i,!1)},isSilent:function(e){var t=this._$handlers;return!t[e]||!t[e].length},off:function(e,t){var n=this._$handlers;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var i=[],a=0,r=n[e].length;a<r;a++)n[e][a].h!==t&&i.push(n[e][a]);n[e]=i}n[e]&&0===n[e].length&&delete n[e]}else delete n[e];return this},trigger:function(e){var t=this._$handlers[e],n=this._$eventProcessor;if(t){var i=arguments,a=i.length;3<a&&(i=Ae.call(i,1));for(var r=t.length,o=0;o<r;){var s=t[o];if(n&&n.filter&&null!=s.query&&!n.filter(e,s.query))o++;else{switch(a){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,i[1]);break;case 3:s.h.call(s.ctx,i[1],i[2]);break;default:s.h.apply(s.ctx,i)}s.one?(t.splice(o,1),r--):o++}}}return n&&n.afterTrigger&&n.afterTrigger(e),this},triggerWithContext:function(e){var t=this._$handlers[e],n=this._$eventProcessor;if(t){var i=arguments,a=i.length;4<a&&(i=Ae.call(i,1,i.length-1));for(var r=i[i.length-1],o=t.length,s=0;s<o;){var l=t[s];if(n&&n.filter&&null!=l.query&&!n.filter(e,l.query))s++;else{switch(a){case 1:l.h.call(r);break;case 2:l.h.call(r,i[1]);break;case 3:l.h.call(r,i[1],i[2]);break;default:l.h.apply(r,i)}l.one?(t.splice(s,1),o--):s++}}}return n&&n.afterTrigger&&n.afterTrigger(e),this}};var Le=Math.log(2);function Ee(e,t,n,i,a,r){var o=i+"-"+a,s=e.length;if(r.hasOwnProperty(o))return r[o];if(1===t){var l=Math.round(Math.log((1<<s)-1&~a)/Le);return e[n][l]}for(var u=i|1<<n,c=n+1;i&1<<c;)c++;for(var h=0,d=0,p=0;d<s;d++){var f=1<<d;f&a||(h+=(p%2?-1:1)*e[n][d]*Ee(e,t-1,c,u,a|f,r),p++)}return r[o]=h}function Pe(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],i={},a=Ee(n,8,0,0,0,i);if(0!==a){for(var r=[],o=0;o<8;o++)for(var s=0;s<8;s++)null==r[s]&&(r[s]=0),r[s]+=((o+s)%2?-1:1)*Ee(n,7,0===o?1:0,1<<o,1<<s,i)/a*t[o];return function(e,t,n){var i=t*r[6]+n*r[7]+1;e[0]=(t*r[0]+n*r[1]+r[2])/i,e[1]=(t*r[3]+n*r[4]+r[5])/i}}}var ze="___zrEVENTSAVED",Oe=[];function Ne(e,t,n,i,r){if(t.getBoundingClientRect&&a.domSupported&&!Re(t)){var o=t[ze]||(t[ze]={}),s=function(e,t,n){for(var i=n?"invTrans":"trans",a=t[i],r=t.srcCoords,o=!0,s=[],l=[],u=0;u<4;u++){var c=e[u].getBoundingClientRect(),h=2*u,d=c.left,p=c.top;s.push(d,p),o=o&&r&&d===r[h]&&p===r[1+h],l.push(e[u].offsetLeft,e[u].offsetTop)}return o&&a?a:(t.srcCoords=s,t[i]=n?Pe(l,s):Pe(s,l))}(function(e,t){var n=t.markers;if(n)return n;n=t.markers=[];for(var i=["left","right"],a=["top","bottom"],r=0;r<4;r++){var o=document.createElement("div"),s=r%2,l=(r>>1)%2;o.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",a[l]+":0",i[1-s]+":auto",a[1-l]+":auto",""].join("!important;"),e.appendChild(o),n.push(o)}return n}(t,o),o,r);if(s)return s(e,n,i),!0}return!1}function Re(e){return"CANVAS"===e.nodeName.toUpperCase()}var Be="undefined"!=typeof window&&!!window.addEventListener,Ve=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ge=[];function We(e,t,n,i){return n=n||{},i||!a.canvasSupported?He(e,t,n):a.browser.firefox&&null!=t.layerX&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):null!=t.offsetX?(n.zrX=t.offsetX,n.zrY=t.offsetY):He(e,t,n),n}function He(e,t,n){if(a.domSupported&&e.getBoundingClientRect){var i=t.clientX,r=t.clientY;if(Re(e)){var o=e.getBoundingClientRect();return n.zrX=i-o.left,void(n.zrY=r-o.top)}if(Ne(Ge,e,i,r))return n.zrX=Ge[0],void(n.zrY=Ge[1])}n.zrX=n.zrY=0}function Fe(e){return e||window.event}function $e(e,t,n){if(null!=(t=Fe(t)).zrX)return t;var i=t.type;if(i&&0<=i.indexOf("touch")){var a="touchend"!==i?t.targetTouches[0]:t.changedTouches[0];a&&We(e,a,t,n)}else We(e,t,t,n),t.zrDelta=t.wheelDelta?t.wheelDelta/120:-(t.detail||0)/3;var r=t.button;return null==t.which&&void 0!==r&&Ve.test(t.type)&&(t.which=1&r?1:2&r?3:4&r?2:0),t}function Xe(e,t,n,i){Be?e.addEventListener(t,n,i):e.attachEvent("on"+t,n)}var Ye=Be?function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0}:function(e){e.returnValue=!1,e.cancelBubble=!0};function Ue(e){return 2===e.which||3===e.which}function je(){this._track=[]}function Ze(e){var t=e[1][0]-e[0][0],n=e[1][1]-e[0][1];return Math.sqrt(t*t+n*n)}je.prototype={constructor:je,recognize:function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},clear:function(){return this._track.length=0,this},_doTrack:function(e,t,n){var i=e.touches;if(i){for(var a={points:[],touches:[],target:t,event:e},r=0,o=i.length;r<o;r++){var s=i[r],l=We(n,s,{});a.points.push([l.zrX,l.zrY]),a.touches.push(s)}this._track.push(a)}},_recognize:function(e){for(var t in qe)if(qe.hasOwnProperty(t)){var n=qe[t](this._track,e);if(n)return n}}};var qe={pinch:function(e,t){var n=e.length;if(n){var i=(e[n-1]||{}).points,a=(e[n-2]||{}).points||i;if(a&&1<a.length&&i&&1<i.length){var r=Ze(i)/Ze(a);isFinite(r)||(r=1),t.pinchScale=r;var o=function(e){return[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]}(i);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:e[0].target,event:t}}}}};function Ke(){Ye(this.event)}function Je(){}function Qe(e,t,n,i){De.call(this),this.storage=e,this.painter=t,this.painterRoot=i,n=n||new Je,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,Ce.call(this),this.setHandlerProxy(n)}Je.prototype.dispose=function(){};var et=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"];function tt(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var i,a=e;a;){if(a.clipPath&&!a.clipPath.contain(t,n))return!1;a.silent&&(i=!0),a=a.parent}return!i||"silent"}return!1}function nt(e,t,n){var i=e.painter;return t<0||t>i.getWidth()||n<0||n>i.getHeight()}Qe.prototype={constructor:Qe,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(I(et,(function(t){e.on&&e.on(t,this[t],this)}),this),e.handler=this),this.proxy=e},mousemove:function(e){var t=e.zrX,n=e.zrY,i=nt(this,t,n),a=this._hovered,r=a.target;r&&!r.__zr&&(r=(a=this.findHover(a.x,a.y)).target);var o=this._hovered=i?{x:t,y:n}:this.findHover(t,n),s=o.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),r&&s!==r&&this.dispatchToElement(a,"mouseout",e),this.dispatchToElement(o,"mousemove",e),s&&s!==r&&this.dispatchToElement(o,"mouseover",e)},mouseout:function(e){var t=e.zrEventControl,n=e.zrIsToLocalDOM;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&(n||this.trigger("globalout",{type:"globalout",event:e}))},resize:function(e){this._hovered={}},dispatch:function(e,t){var n=this[e];n&&n.call(this,t)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},dispatchToElement:function(e,t,n){var i=(e=e||{}).target;if(!i||!i.silent){for(var a="on"+t,r=function(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:Ke}}(t,e,n);i&&(i[a]&&(r.cancelBubble=i[a].call(i,r)),i.trigger(t,r),i=i.parent,!r.cancelBubble););r.cancelBubble||(this.trigger(t,r),this.painter&&this.painter.eachOtherLayer((function(e){"function"==typeof e[a]&&e[a].call(e,r),e.trigger&&e.trigger(t,r)})))}},findHover:function(e,t,n){for(var i=this.storage.getDisplayList(),a={x:e,y:t},r=i.length-1;0<=r;r--){var o;if(i[r]!==n&&!i[r].ignore&&(o=tt(i[r],e,t))&&(a.topTarget||(a.topTarget=i[r]),"silent"!==o)){a.target=i[r];break}}return a},processGesture:function(e,t){this._gestureMgr||(this._gestureMgr=new je);var n=this._gestureMgr;"start"===t&&n.clear();var i=n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if("end"===t&&n.clear(),i){var a=i.type;e.gestureEvent=a,this.dispatchToElement({target:i.target},a,i.event)}}},I(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(e){Qe.prototype[e]=function(t){var n,i,a=t.zrX,r=t.zrY,o=nt(this,a,r);if("mouseup"===e&&o||(i=(n=this.findHover(a,r)).target),"mousedown"===e)this._downEl=i,this._downPoint=[t.zrX,t.zrY],this._upEl=i;else if("mouseup"===e)this._upEl=i;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||4<ye(this._downPoint,[t.zrX,t.zrY]))return;this._downPoint=null}this.dispatchToElement(n,e,t)}})),T(Qe,De),T(Qe,Ce);var it="undefined"==typeof Float32Array?Array:Float32Array;function at(){var e=new it(6);return rt(e),e}function rt(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function ot(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function st(e,t,n){var i=t[0]*n[0]+t[2]*n[1],a=t[1]*n[0]+t[3]*n[1],r=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],l=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=i,e[1]=a,e[2]=r,e[3]=o,e[4]=s,e[5]=l,e}function lt(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function ut(e,t,n){var i=t[0],a=t[2],r=t[4],o=t[1],s=t[3],l=t[5],u=Math.sin(n),c=Math.cos(n);return e[0]=i*c+o*u,e[1]=-i*u+o*c,e[2]=a*c+s*u,e[3]=-a*u+c*s,e[4]=c*r+u*l,e[5]=c*l-u*r,e}function ct(e,t,n){var i=n[0],a=n[1];return e[0]=t[0]*i,e[1]=t[1]*a,e[2]=t[2]*i,e[3]=t[3]*a,e[4]=t[4]*i,e[5]=t[5]*a,e}function ht(e,t){var n=t[0],i=t[2],a=t[4],r=t[1],o=t[3],s=t[5],l=n*o-r*i;return l?(l=1/l,e[0]=o*l,e[1]=-r*l,e[2]=-i*l,e[3]=n*l,e[4]=(i*s-o*a)*l,e[5]=(r*a-n*s)*l,e):null}function dt(e){var t=at();return ot(t,e),t}var pt=(Object.freeze||Object)({create:at,identity:rt,copy:ot,mul:st,translate:lt,rotate:ut,scale:ct,invert:ht,clone:dt}),ft=rt;function gt(e){return 5e-5<e||e<-5e-5}var mt=function(e){(e=e||{}).position||(this.position=[0,0]),null==e.rotation&&(this.rotation=0),e.scale||(this.scale=[1,1]),this.origin=this.origin||null},vt=mt.prototype;vt.transform=null,vt.needLocalTransform=function(){return gt(this.rotation)||gt(this.position[0])||gt(this.position[1])||gt(this.scale[0]-1)||gt(this.scale[1]-1)};var yt=[];vt.updateTransform=function(){var e=this.parent,t=e&&e.transform,n=this.needLocalTransform(),i=this.transform;if(n||t){i=i||at(),n?this.getLocalTransform(i):ft(i),t&&(n?st(i,e.transform,i):ot(i,e.transform)),this.transform=i;var a=this.globalScaleRatio;if(null!=a&&1!==a){this.getGlobalScale(yt);var r=yt[0]<0?-1:1,o=yt[1]<0?-1:1,s=((yt[0]-r)*a+r)/yt[0]||0,l=((yt[1]-o)*a+o)/yt[1]||0;i[0]*=s,i[1]*=s,i[2]*=l,i[3]*=l}this.invTransform=this.invTransform||at(),ht(this.invTransform,i)}else i&&ft(i)},vt.getLocalTransform=function(e){return mt.getLocalTransform(this,e)},vt.setTransform=function(e){var t=this.transform,n=e.dpr||1;t?e.setTransform(n*t[0],n*t[1],n*t[2],n*t[3],n*t[4],n*t[5]):e.setTransform(n,0,0,n,0,0)},vt.restoreTransform=function(e){var t=e.dpr||1;e.setTransform(t,0,0,t,0,0)};var xt=[],_t=at();vt.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],i=this.position,a=this.scale;gt(t-1)&&(t=Math.sqrt(t)),gt(n-1)&&(n=Math.sqrt(n)),e[0]<0&&(t=-t),e[3]<0&&(n=-n),i[0]=e[4],i[1]=e[5],a[0]=t,a[1]=n,this.rotation=Math.atan2(-e[1]/n,e[0]/t)}},vt.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(st(xt,e.invTransform,t),t=xt);var n=this.origin;n&&(n[0]||n[1])&&(_t[4]=n[0],_t[5]=n[1],st(xt,t,_t),xt[4]-=n[0],xt[5]-=n[1],t=xt),this.setLocalTransform(t)}},vt.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1])):(e[0]=1,e[1]=1),e},vt.transformCoordToLocal=function(e,t){var n=[e,t],i=this.invTransform;return i&&we(n,n,i),n},vt.transformCoordToGlobal=function(e,t){var n=[e,t],i=this.transform;return i&&we(n,n,i),n},mt.getLocalTransform=function(e,t){ft(t=t||[]);var n=e.origin,i=e.scale||[1,1],a=e.rotation||0,r=e.position||[0,0];return n&&(t[4]-=n[0],t[5]-=n[1]),ct(t,t,i),a&&ut(t,t,a),n&&(t[4]+=n[0],t[5]+=n[1]),t[4]+=r[0],t[5]+=r[1],t};var bt={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return.5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return 0===e?0:Math.pow(1024,e-1)},exponentialOut:function(e){return 1===e?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1;return 0===e?0:1===e?1:(t=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4))},elasticOut:function(e){var t,n=.1;return 0===e?0:1===e?1:(t=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},elasticInOut:function(e){var t,n=.1;return 0===e?0:1===e?1:(t=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4)*-.5:n*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/.4)*.5+1)},backIn:function(e){return e*e*(2.70158*e-1.70158)},backOut:function(e){return--e*e*(2.70158*e+1.70158)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((1+t)*e-t)*.5:.5*((e-=2)*e*((1+t)*e+t)+2)},bounceIn:function(e){return 1-bt.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?.5*bt.bounceIn(2*e):.5*bt.bounceOut(2*e-1)+.5}};function wt(e){this._target=e.target,this._life=e.life||1e3,this._delay=e.delay||0,this._initialized=!1,this.loop=null!=e.loop&&e.loop,this.gap=e.gap||0,this.easing=e.easing||"Linear",this.onframe=e.onframe,this.ondestroy=e.ondestroy,this.onrestart=e.onrestart,this._pausedTime=0,this._paused=!1}function St(){this.head=null,this.tail=null,this._len=0}wt.prototype={constructor:wt,step:function(e,t){if(this._initialized||(this._startTime=e+this._delay,this._initialized=!0),this._paused)this._pausedTime+=t;else{var n=(e-this._startTime-this._pausedTime)/this._life;if(!(n<0)){n=Math.min(n,1);var i=this.easing,a="string"==typeof i?bt[i]:i,r="function"==typeof a?a(n):n;return this.fire("frame",r),1===n?this.loop?(this.restart(e),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(e){var t=(e-this._startTime-this._pausedTime)%this._life;this._startTime=e-t+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(e,t){this[e="on"+e]&&this[e](this._target,t)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var Mt=St.prototype;function Tt(e){this._list=new St,this._map={},this._maxSize=e||10,this._lastRemovedEntry=null}Mt.insert=function(e){var t=new Ct(e);return this.insertEntry(t),t},Mt.insertEntry=function(e){this.head?((this.tail.next=e).prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},Mt.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},Mt.len=function(){return this._len},Mt.clear=function(){this.head=this.tail=null,this._len=0};var Ct=function(e){this.value=e,this.next,this.prev},It=Tt.prototype;It.put=function(e,t){var n=this._list,i=this._map,a=null;if(null==i[e]){var r=n.len(),o=this._lastRemovedEntry;if(r>=this._maxSize&&0<r){var s=n.head;n.remove(s),delete i[s.key],a=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new Ct(t),o.key=e,n.insertEntry(o),i[e]=o}return a},It.get=function(e){var t=this._map[e],n=this._list;if(null!=t)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},It.clear=function(){this._list.clear(),this._map={}};var At={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 Dt(e){return(e=Math.round(e))<0?0:255<e?255:e}function kt(e){return e<0?0:1<e?1:e}function Lt(e){return e.length&&"%"===e.charAt(e.length-1)?Dt(parseFloat(e)/100*255):Dt(parseInt(e,10))}function Et(e){return e.length&&"%"===e.charAt(e.length-1)?kt(parseFloat(e)/100):kt(parseFloat(e))}function Pt(e,t,n){return n<0?n+=1:1<n&&(n-=1),6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function zt(e,t,n){return e+(t-e)*n}function Ot(e,t,n,i,a){return e[0]=t,e[1]=n,e[2]=i,e[3]=a,e}function Nt(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Rt=new Tt(20),Bt=null;function Vt(e,t){Bt&&Nt(Bt,t),Bt=Rt.put(e,Bt||t.slice())}function Gt(e,t){if(e){t=t||[];var n=Rt.get(e);if(n)return Nt(t,n);var i,a=(e+="").replace(/ /g,"").toLowerCase();if(a in At)return Nt(t,At[a]),Vt(e,t),t;if("#"===a.charAt(0))return 4===a.length?0<=(i=parseInt(a.substr(1),16))&&i<=4095?(Ot(t,(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,1),Vt(e,t),t):void Ot(t,0,0,0,1):7===a.length?0<=(i=parseInt(a.substr(1),16))&&i<=16777215?(Ot(t,(16711680&i)>>16,(65280&i)>>8,255&i,1),Vt(e,t),t):void Ot(t,0,0,0,1):void 0;var r=a.indexOf("("),o=a.indexOf(")");if(-1!==r&&o+1===a.length){var s=a.substr(0,r),l=a.substr(r+1,o-(r+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void Ot(t,0,0,0,1);u=Et(l.pop());case"rgb":return 3!==l.length?void Ot(t,0,0,0,1):(Ot(t,Lt(l[0]),Lt(l[1]),Lt(l[2]),u),Vt(e,t),t);case"hsla":return 4!==l.length?void Ot(t,0,0,0,1):(l[3]=Et(l[3]),Wt(l,t),Vt(e,t),t);case"hsl":return 3!==l.length?void Ot(t,0,0,0,1):(Wt(l,t),Vt(e,t),t);default:return}}Ot(t,0,0,0,1)}}function Wt(e,t){var n=(parseFloat(e[0])%360+360)%360/360,i=Et(e[1]),a=Et(e[2]),r=a<=.5?a*(i+1):a+i-a*i,o=2*a-r;return Ot(t=t||[],Dt(255*Pt(o,r,n+1/3)),Dt(255*Pt(o,r,n)),Dt(255*Pt(o,r,n-1/3)),1),4===e.length&&(t[3]=e[3]),t}function Ht(e,t){var n=Gt(e);if(n){for(var i=0;i<3;i++)n[i]=t<0?n[i]*(1-t)|0:(255-n[i])*t+n[i]|0,255<n[i]?n[i]=255:e[i]<0&&(n[i]=0);return qt(n,4===n.length?"rgba":"rgb")}}function Ft(e){var t=Gt(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function $t(e,t,n){if(t&&t.length&&0<=e&&e<=1){n=n||[];var i=e*(t.length-1),a=Math.floor(i),r=Math.ceil(i),o=t[a],s=t[r],l=i-a;return n[0]=Dt(zt(o[0],s[0],l)),n[1]=Dt(zt(o[1],s[1],l)),n[2]=Dt(zt(o[2],s[2],l)),n[3]=kt(zt(o[3],s[3],l)),n}}var Xt=$t;function Yt(e,t,n){if(t&&t.length&&0<=e&&e<=1){var i=e*(t.length-1),a=Math.floor(i),r=Math.ceil(i),o=Gt(t[a]),s=Gt(t[r]),l=i-a,u=qt([Dt(zt(o[0],s[0],l)),Dt(zt(o[1],s[1],l)),Dt(zt(o[2],s[2],l)),kt(zt(o[3],s[3],l))],"rgba");return n?{color:u,leftIndex:a,rightIndex:r,value:i}:u}}var Ut=Yt;function jt(e,t,n,i){if(e=Gt(e))return e=function(e){if(e){var t,n,i=e[0]/255,a=e[1]/255,r=e[2]/255,o=Math.min(i,a,r),s=Math.max(i,a,r),l=s-o,u=(s+o)/2;if(0==l)n=t=0;else{n=u<.5?l/(s+o):l/(2-s-o);var c=((s-i)/6+l/2)/l,h=((s-a)/6+l/2)/l,d=((s-r)/6+l/2)/l;i===s?t=d-h:a===s?t=1/3+c-d:r===s&&(t=2/3+h-c),t<0&&(t+=1),1<t&&(t-=1)}var p=[360*t,n,u];return null!=e[3]&&p.push(e[3]),p}}(e),null!=t&&(e[0]=function(e){return(e=Math.round(e))<0?0:360<e?360:e}(t)),null!=n&&(e[1]=Et(n)),null!=i&&(e[2]=Et(i)),qt(Wt(e),"rgba")}function Zt(e,t){if((e=Gt(e))&&null!=t)return e[3]=kt(t),qt(e,"rgba")}function qt(e,t){if(e&&e.length){var n=e[0]+","+e[1]+","+e[2];return"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(n+=","+e[3]),t+"("+n+")"}}var Kt=(Object.freeze||Object)({parse:Gt,lift:Ht,toHex:Ft,fastLerp:$t,fastMapToColor:Xt,lerp:Yt,mapToColor:Ut,modifyHSL:jt,modifyAlpha:Zt,stringify:qt}),Jt=Array.prototype.slice;function Qt(e,t){return e[t]}function en(e,t,n){e[t]=n}function tn(e,t,n){return(t-e)*n+e}function nn(e,t,n){return.5<n?t:e}function an(e,t,n,i,a){var r=e.length;if(1===a)for(var o=0;o<r;o++)i[o]=tn(e[o],t[o],n);else{var s=r&&e[0].length;for(o=0;o<r;o++)for(var l=0;l<s;l++)i[o][l]=tn(e[o][l],t[o][l],n)}}function rn(e,t,n){var i=e.length,a=t.length;if(i!==a)if(a<i)e.length=a;else for(var r=i;r<a;r++)e.push(1===n?t[r]:Jt.call(t[r]));var o=e[0]&&e[0].length;for(r=0;r<e.length;r++)if(1===n)isNaN(e[r])&&(e[r]=t[r]);else for(var s=0;s<o;s++)isNaN(e[r][s])&&(e[r][s]=t[r][s])}function on(e,t,n){if(e===t)return!0;var i=e.length;if(i!==t.length)return!1;if(1===n){for(var a=0;a<i;a++)if(e[a]!==t[a])return!1}else{var r=e[0].length;for(a=0;a<i;a++)for(var o=0;o<r;o++)if(e[a][o]!==t[a][o])return!1}return!0}function sn(e,t,n,i,a,r,o,s,l){var u=e.length;if(1===l)for(var c=0;c<u;c++)s[c]=ln(e[c],t[c],n[c],i[c],a,r,o);else{var h=e[0].length;for(c=0;c<u;c++)for(var d=0;d<h;d++)s[c][d]=ln(e[c][d],t[c][d],n[c][d],i[c][d],a,r,o)}}function ln(e,t,n,i,a,r,o){var s=.5*(n-e),l=.5*(i-t);return(2*(t-n)+s+l)*o+(-3*(t-n)-2*s-l)*r+s*a+t}function un(e){if(C(e)){var t=e.length;if(C(e[0])){for(var n=[],i=0;i<t;i++)n.push(Jt.call(e[i]));return n}return Jt.call(e)}return e}function cn(e){return e[0]=Math.floor(e[0]),e[1]=Math.floor(e[1]),e[2]=Math.floor(e[2]),"rgba("+e.join(",")+")"}function hn(e,t,n,i,a,r){var o=e._getter,s=e._setter,l="spline"===t,u=i.length;if(u){var c,h=C(i[0].value),d=!1,p=!1,f=h?function(e){var t=e[e.length-1].value;return C(t&&t[0])?2:1}(i):0;i.sort((function(e,t){return e.time-t.time})),c=i[u-1].time;for(var g=[],m=[],v=i[0].value,y=!0,x=0;x<u;x++){g.push(i[x].time/c);var _=i[x].value;if(h&&on(_,v,f)||!h&&_===v||(y=!1),"string"==typeof(v=_)){var b=Gt(_);b?(_=b,d=!0):p=!0}m.push(_)}if(r||!y){var w=m[u-1];for(x=0;x<u-1;x++)h?rn(m[x],w,f):!isNaN(m[x])||isNaN(w)||p||d||(m[x]=w);h&&rn(o(e._target,a),w,f);var S,M,T,I,A,D=0,k=0;if(d)var L=[0,0,0,0];var E=new wt({target:e._target,life:c,loop:e._loop,delay:e._delay,onframe:function(e,t){var n;if(t<0)n=0;else if(t<k){for(n=Math.min(D+1,u-1);0<=n&&!(g[n]<=t);n--);n=Math.min(n,u-2)}else{for(n=D;n<u&&!(g[n]>t);n++);n=Math.min(n-1,u-2)}k=t;var i=g[(D=n)+1]-g[n];if(0!=i)if(S=(t-g[n])/i,l)if(T=m[n],M=m[0===n?n:n-1],I=m[u-2<n?u-1:n+1],A=m[u-3<n?u-1:n+2],h)sn(M,T,I,A,S,S*S,S*S*S,o(e,a),f);else{if(d)r=sn(M,T,I,A,S,S*S,S*S*S,L,1),r=cn(L);else{if(p)return nn(T,I,S);r=ln(M,T,I,A,S,S*S,S*S*S)}s(e,a,r)}else if(h)an(m[n],m[n+1],S,o(e,a),f);else{var r;if(d)an(m[n],m[n+1],S,L,1),r=cn(L);else{if(p)return nn(m[n],m[n+1],S);r=tn(m[n],m[n+1],S)}s(e,a,r)}},ondestroy:n});return t&&"spline"!==t&&(E.easing=t),E}}}function dn(e,t,n,i){this._tracks={},this._target=e,this._loop=t||!1,this._getter=n||Qt,this._setter=i||en,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]}dn.prototype={when:function(e,t){var n=this._tracks;for(var i in t)if(t.hasOwnProperty(i)){if(!n[i]){n[i]=[];var a=this._getter(this._target,i);if(null==a)continue;0!==e&&n[i].push({time:0,value:un(a)})}n[i].push({time:e,value:t[i]})}return this},during:function(e){return this._onframeList.push(e),this},pause:function(){for(var e=0;e<this._clipList.length;e++)this._clipList[e].pause();this._paused=!0},resume:function(){for(var e=0;e<this._clipList.length;e++)this._clipList[e].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var e=this._doneList,t=e.length,n=0;n<t;n++)e[n].call(this)},start:function(e,t){function n(){--r||a._doneCallback()}var i,a=this,r=0;for(var o in this._tracks)if(this._tracks.hasOwnProperty(o)){var s=hn(this,e,n,this._tracks[o],o,t);s&&(this._clipList.push(s),r++,this.animation&&this.animation.addClip(s),i=s)}if(i){var l=i.onframe;i.onframe=function(e,t){l(e,t);for(var n=0;n<a._onframeList.length;n++)a._onframeList[n](e,t)}}return r||this._doneCallback(),this},stop:function(e){for(var t=this._clipList,n=this.animation,i=0;i<t.length;i++){var a=t[i];e&&a.onframe(this._target,1),n&&n.removeClip(a)}t.length=0},delay:function(e){return this._delay=e,this},done:function(e){return e&&this._doneList.push(e),this},getClips:function(){return this._clipList}};var pn=1;"undefined"!=typeof window&&(pn=Math.max(window.devicePixelRatio||1,1));var fn=pn;function gn(){this.animators=[]}var mn=function(){};function vn(e,t,n,i,a,r,o,s){N(i)?(r=a,a=i,i=0):O(a)?(r=a,a="linear",i=0):O(i)?(r=i,i=0):n=O(n)?(r=n,500):n||500,e.stopAnimation(),function e(t,n,i,a,r,o,s){var l={},u=0;for(var c in a)a.hasOwnProperty(c)&&(null!=i[c]?R(a[c])&&!C(a[c])?e(t,n?n+"."+c:c,i[c],a[c],r,o,s):(s?(l[c]=i[c],yn(t,n,c,a[c])):l[c]=a[c],u++):null==a[c]||s||yn(t,n,c,a[c]));0<u&&t.animate(n,!1).when(null==r?500:r,l).delay(o||0)}(e,"",e,t,n,i,s);var l=e.animators.slice(),u=l.length;function c(){--u||r&&r()}u||r&&r();for(var h=0;h<l.length;h++)l[h].done(c).start(a,o)}function yn(e,t,n,i){if(t){var a={};a[t]={},a[t][n]=i,e.attr(a)}else e.attr(n,i)}gn.prototype={constructor:gn,animate:function(e,t){var n,i=!1,a=this,r=this.__zr;if(e){var o=e.split("."),s=a;i="shape"===o[0];for(var l=0,u=o.length;l<u;l++)s=s&&s[o[l]];s&&(n=s)}else n=a;if(n){var c=a.animators,h=new dn(n,t);return h.during((function(e){a.dirty(i)})).done((function(){c.splice(S(c,h),1)})),c.push(h),r&&r.animation.addAnimator(h),h}mn('Property "'+e+'" is not existed in element '+a.id)},stopAnimation:function(e){for(var t=this.animators,n=t.length,i=0;i<n;i++)t[i].stop(e);return t.length=0,this},animateTo:function(e,t,n,i,a,r){vn(this,e,t,n,i,a,r)},animateFrom:function(e,t,n,i,a,r){vn(this,e,t,n,i,a,r,!0)}};var xn=function(e){mt.call(this,e),De.call(this,e),gn.call(this,e),this.id=e.id||i()};xn.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(e,t){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0}var n=this.transform;(n=n||(this.transform=[1,0,0,1,0,0]))[4]+=e,n[5]+=t,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(e,t){},attrKV:function(e,t){if("position"===e||"scale"===e||"origin"===e){if(t){var n=this[e];(n=n||(this[e]=[]))[0]=t[0],n[1]=t[1]}}else this[e]=t},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(e,t){if("string"==typeof e)this.attrKV(e,t);else if(R(e))for(var n in e)e.hasOwnProperty(n)&&this.attrKV(n,e[n]);return this.dirty(!1),this},setClipPath:function(e){var t=this.__zr;t&&e.addSelfToZr(t),this.clipPath&&this.clipPath!==e&&this.removeClipPath(),(this.clipPath=e).__zr=t,(e.__clipTarget=this).dirty(!1)},removeClipPath:function(){var e=this.clipPath;e&&(e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this.clipPath&&this.clipPath.addSelfToZr(e)},removeSelfFromZr:function(e){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this.clipPath&&this.clipPath.removeSelfFromZr(e)}},T(xn,gn),T(xn,mt),T(xn,De);var _n,bn,wn,Sn,Mn=we,Tn=Math.min,Cn=Math.max;function In(e,t,n,i){n<0&&(e+=n,n=-n),i<0&&(t+=i,i=-i),this.x=e,this.y=t,this.width=n,this.height=i}In.prototype={constructor:In,union:function(e){var t=Tn(e.x,this.x),n=Tn(e.y,this.y);this.width=Cn(e.x+e.width,this.x+this.width)-t,this.height=Cn(e.y+e.height,this.y+this.height)-n,this.x=t,this.y=n},applyTransform:(_n=[],bn=[],wn=[],Sn=[],function(e){if(e){_n[0]=wn[0]=this.x,_n[1]=Sn[1]=this.y,bn[0]=Sn[0]=this.x+this.width,bn[1]=wn[1]=this.y+this.height,Mn(_n,_n,e),Mn(bn,bn,e),Mn(wn,wn,e),Mn(Sn,Sn,e),this.x=Tn(_n[0],bn[0],wn[0],Sn[0]),this.y=Tn(_n[1],bn[1],wn[1],Sn[1]);var t=Cn(_n[0],bn[0],wn[0],Sn[0]),n=Cn(_n[1],bn[1],wn[1],Sn[1]);this.width=t-this.x,this.height=n-this.y}}),calculateTransform:function(e){var t=e.width/this.width,n=e.height/this.height,i=at();return lt(i,i,[-this.x,-this.y]),ct(i,i,[t,n]),lt(i,i,[e.x,e.y]),i},intersect:function(e){if(!e)return!1;e instanceof In||(e=In.create(e));var t=this,n=t.x,i=t.x+t.width,a=t.y,r=t.y+t.height,o=e.x,s=e.x+e.width,l=e.y,u=e.y+e.height;return!(i<o||s<n||r<l||u<a)},contain:function(e,t){var n=this;return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},clone:function(){return new In(this.x,this.y,this.width,this.height)},copy:function(e){this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},In.create=function(e){return new In(e.x,e.y,e.width,e.height)};var An=function(e){for(var t in e=e||{},xn.call(this,e),e)e.hasOwnProperty(t)&&(this[t]=e[t]);this._children=[],this.__storage=null,this.__dirty=!0};An.prototype={constructor:An,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(e){return this._children[e]},childOfName:function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},childCount:function(){return this._children.length},add:function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},addBefore:function(e,t){if(e&&e!==this&&e.parent!==this&&t&&t.parent===this){var n=this._children,i=n.indexOf(t);0<=i&&(n.splice(i,0,e),this._doAdd(e))}return this},_doAdd:function(e){e.parent&&e.parent.remove(e);var t=(e.parent=this).__storage,n=this.__zr;t&&t!==e.__storage&&(t.addToStorage(e),e instanceof An&&e.addChildrenToStorage(t)),n&&n.refresh()},remove:function(e){var t=this.__zr,n=this.__storage,i=this._children,a=S(i,e);return a<0||(i.splice(a,1),e.parent=null,n&&(n.delFromStorage(e),e instanceof An&&e.delChildrenFromStorage(n)),t&&t.refresh()),this},removeAll:function(){var e,t,n=this._children,i=this.__storage;for(t=0;t<n.length;t++)e=n[t],i&&(i.delFromStorage(e),e instanceof An&&e.delChildrenFromStorage(i)),e.parent=null;return n.length=0,this},eachChild:function(e,t){for(var n=this._children,i=0;i<n.length;i++){var a=n[i];e.call(t,a,i)}return this},traverse:function(e,t){for(var n=0;n<this._children.length;n++){var i=this._children[n];e.call(t,i),"group"===i.type&&i.traverse(e,t)}return this},addChildrenToStorage:function(e){for(var t=0;t<this._children.length;t++){var n=this._children[t];e.addToStorage(n),n instanceof An&&n.addChildrenToStorage(e)}},delChildrenFromStorage:function(e){for(var t=0;t<this._children.length;t++){var n=this._children[t];e.delFromStorage(n),n instanceof An&&n.delChildrenFromStorage(e)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(e){for(var t=null,n=new In(0,0,0,0),i=e||this._children,a=[],r=0;r<i.length;r++){var o=i[r];if(!o.ignore&&!o.invisible){var s=o.getBoundingRect(),l=o.getLocalTransform(a);l?(n.copy(s),n.applyTransform(l),(t=t||n.clone()).union(n)):(t=t||s.clone()).union(s)}}return t||n}},M(An,xn);function Dn(e,t,n,i){var a=t+1;if(a===n)return 1;if(i(e[a++],e[t])<0){for(;a<n&&i(e[a],e[a-1])<0;)a++;!function(e,t,n){for(n--;t<n;){var i=e[t];e[t++]=e[n],e[n--]=i}}(e,t,a)}else for(;a<n&&0<=i(e[a],e[a-1]);)a++;return a-t}function kn(e,t,n,i,a){for(i===t&&i++;i<n;i++){for(var r,o=e[i],s=t,l=i;s<l;)a(o,e[r=s+l>>>1])<0?l=r:s=1+r;var u=i-s;switch(u){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;0<u;)e[s+u]=e[s+u-1],u--}e[s]=o}}function Ln(e,t,n,i,a,r){var o=0,s=0,l=1;if(0<r(e,t[n+a])){for(s=i-a;l<s&&0<r(e,t[n+a+l]);)(l=1+((o=l)<<1))<=0&&(l=s);s<l&&(l=s),o+=a,l+=a}else{for(s=a+1;l<s&&r(e,t[n+a-l])<=0;)(l=1+((o=l)<<1))<=0&&(l=s);s<l&&(l=s);var u=o;o=a-l,l=a-u}for(o++;o<l;){var c=o+(l-o>>>1);0<r(e,t[n+c])?o=c+1:l=c}return l}function En(e,t,n,i,a,r){var o=0,s=0,l=1;if(r(e,t[n+a])<0){for(s=a+1;l<s&&r(e,t[n+a-l])<0;)(l=1+((o=l)<<1))<=0&&(l=s);s<l&&(l=s);var u=o;o=a-l,l=a-u}else{for(s=i-a;l<s&&0<=r(e,t[n+a+l]);)(l=1+((o=l)<<1))<=0&&(l=s);s<l&&(l=s),o+=a,l+=a}for(o++;o<l;){var c=o+(l-o>>>1);r(e,t[n+c])<0?l=c:o=c+1}return l}function Pn(e,t){var n,i,a=7,r=0,o=[];function s(s){var l=n[s],u=i[s],c=n[s+1],h=i[s+1];i[s]=u+h,s===r-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),r--;var d=En(e[c],e,l,u,0,t);l+=d,0!=(u-=d)&&0!==(h=Ln(e[l+u-1],e,c,h,h-1,t))&&(u<=h?function(n,i,r,s){var l=0;for(l=0;l<i;l++)o[l]=e[n+l];var u=0,c=r,h=n;if(e[h++]=e[c++],0!=--s){if(1===i){for(l=0;l<s;l++)e[h+l]=e[c+l];return e[h+s]=o[u]}for(var d,p,f,g=a;;){p=d=0,f=!1;do{if(t(e[c],o[u])<0){if(e[h++]=e[c++],p++,(d=0)==--s){f=!0;break}}else if(e[h++]=o[u++],d++,p=0,1==--i){f=!0;break}}while((d|p)<g);if(f)break;do{if(0!==(d=En(e[c],o,u,i,0,t))){for(l=0;l<d;l++)e[h+l]=o[u+l];if(h+=d,u+=d,(i-=d)<=1){f=!0;break}}if(e[h++]=e[c++],0==--s){f=!0;break}if(0!==(p=Ln(o[u],e,c,s,0,t))){for(l=0;l<p;l++)e[h+l]=e[c+l];if(h+=p,c+=p,0==(s-=p)){f=!0;break}}if(e[h++]=o[u++],1==--i){f=!0;break}g--}while(7<=d||7<=p);if(f)break;g<0&&(g=0),g+=2}if((a=g)<1&&(a=1),1===i){for(l=0;l<s;l++)e[h+l]=e[c+l];e[h+s]=o[u]}else{if(0===i)throw new Error;for(l=0;l<i;l++)e[h+l]=o[u+l]}}else for(l=0;l<i;l++)e[h+l]=o[u+l]}(l,u,c,h):function(n,i,r,s){var l=0;for(l=0;l<s;l++)o[l]=e[r+l];var u=n+i-1,c=s-1,h=r+s-1,d=0,p=0;if(e[h--]=e[u--],0!=--i){if(1===s){for(p=1+(h-=i),d=1+(u-=i),l=i-1;0<=l;l--)e[p+l]=e[d+l];return e[h]=o[c]}for(var f=a;;){var g=0,m=0,v=!1;do{if(t(o[c],e[u])<0){if(e[h--]=e[u--],g++,(m=0)==--i){v=!0;break}}else if(e[h--]=o[c--],m++,g=0,1==--s){v=!0;break}}while((g|m)<f);if(v)break;do{if(0!=(g=i-En(o[c],e,n,i,i-1,t))){for(i-=g,p=1+(h-=g),d=1+(u-=g),l=g-1;0<=l;l--)e[p+l]=e[d+l];if(0===i){v=!0;break}}if(e[h--]=o[c--],1==--s){v=!0;break}if(0!=(m=s-Ln(e[u],o,0,s,s-1,t))){for(s-=m,p=1+(h-=m),d=1+(c-=m),l=0;l<m;l++)e[p+l]=o[d+l];if(s<=1){v=!0;break}}if(e[h--]=e[u--],0==--i){v=!0;break}f--}while(7<=g||7<=m);if(v)break;f<0&&(f=0),f+=2}if((a=f)<1&&(a=1),1===s){for(p=1+(h-=i),d=1+(u-=i),l=i-1;0<=l;l--)e[p+l]=e[d+l];e[h]=o[c]}else{if(0===s)throw new Error;for(d=h-(s-1),l=0;l<s;l++)e[d+l]=o[l]}}else for(d=h-(s-1),l=0;l<s;l++)e[d+l]=o[l]}(l,u,c,h))}n=[],i=[],this.mergeRuns=function(){for(;1<r;){var e=r-2;if(1<=e&&i[e-1]<=i[e]+i[e+1]||2<=e&&i[e-2]<=i[e]+i[e-1])i[e-1]<i[e+1]&&e--;else if(i[e]>i[e+1])break;s(e)}},this.forceMergeRuns=function(){for(;1<r;){var e=r-2;0<e&&i[e-1]<i[e+1]&&e--,s(e)}},this.pushRun=function(e,t){n[r]=e,i[r]=t,r+=1}}function zn(e,t,n,i){n=n||0;var a=(i=i||e.length)-n;if(!(a<2)){var r=0;if(a<32)kn(e,n,i,n+(r=Dn(e,n,i,t)),t);else{var o=new Pn(e,t),s=function(e){for(var t=0;32<=e;)t|=1&e,e>>=1;return e+t}(a);do{if((r=Dn(e,n,i,t))<s){var l=a;s<l&&(l=s),kn(e,n,n+l,n+r,t),r=l}o.pushRun(n,r),o.mergeRuns(),a-=r,n+=r}while(0!==a);o.forceMergeRuns()}}}function On(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}function Nn(){this._roots=[],this._displayList=[],this._displayListLen=0}Nn.prototype={constructor:Nn,traverse:function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},getDisplayList:function(e,t){return t=t||!1,e&&this.updateDisplayList(t),this._displayList},updateDisplayList:function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,i=0,r=t.length;i<r;i++)this._updateAndAddDisplayable(t[i],null,e);n.length=this._displayListLen,a.canvasSupported&&zn(n,On)},_updateAndAddDisplayable:function(e,t,n){if(!e.ignore||n){e.beforeUpdate(),e.__dirty&&e.update(),e.afterUpdate();var i=e.clipPath;if(i){t=t?t.slice():[];for(var a=i,r=e;a;)a.parent=r,a.updateTransform(),t.push(a),a=(r=a).clipPath}if(e.isGroup){for(var o=e._children,s=0;s<o.length;s++){var l=o[s];e.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,t,n)}e.__dirty=!1}else e.__clipPaths=t,this._displayList[this._displayListLen++]=e}},addRoot:function(e){e.__storage!==this&&(e instanceof An&&e.addChildrenToStorage(this),this.addToStorage(e),this._roots.push(e))},delRoot:function(e){if(null==e){for(var t=0;t<this._roots.length;t++){var n=this._roots[t];n instanceof An&&n.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(e instanceof Array){t=0;for(var i=e.length;t<i;t++)this.delRoot(e[t])}else{var a=S(this._roots,e);0<=a&&(this.delFromStorage(e),this._roots.splice(a,1),e instanceof An&&e.delChildrenFromStorage(this))}},addToStorage:function(e){return e&&(e.__storage=this,e.dirty(!1)),this},delFromStorage:function(e){return e&&(e.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:On};var Rn={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},Bn=function(e,t,n){return Rn.hasOwnProperty(t)?n*e.dpr:n},Vn=0,Gn=1,Wn=2,Hn=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Fn=function(e){this.extendFrom(e,!1)};function $n(e,t,n){var i=null==t.x?0:t.x,a=null==t.x2?1:t.x2,r=null==t.y?0:t.y,o=null==t.y2?0:t.y2;return t.global||(i=i*n.width+n.x,a=a*n.width+n.x,r=r*n.height+n.y,o=o*n.height+n.y),i=isNaN(i)?0:i,a=isNaN(a)?1:a,r=isNaN(r)?0:r,o=isNaN(o)?0:o,e.createLinearGradient(i,r,a,o)}function Xn(e,t,n){var i=n.width,a=n.height,r=Math.min(i,a),o=null==t.x?.5:t.x,s=null==t.y?.5:t.y,l=null==t.r?.5:t.r;return t.global||(o=o*i+n.x,s=s*a+n.y,l*=r),e.createRadialGradient(o,s,0,o,s,l)}Fn.prototype={constructor:Fn,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(e,t,n){var i=this,a=n&&n.style,r=!a||e.__attrCachedBy!==Gn;e.__attrCachedBy=Gn;for(var o=0;o<Hn.length;o++){var s=Hn[o],l=s[0];!r&&i[l]===a[l]||(e[l]=Bn(e,l,i[l]||s[1]))}if(!r&&i.fill===a.fill||(e.fillStyle=i.fill),!r&&i.stroke===a.stroke||(e.strokeStyle=i.stroke),!r&&i.opacity===a.opacity||(e.globalAlpha=null==i.opacity?1:i.opacity),!r&&i.blend===a.blend||(e.globalCompositeOperation=i.blend||"source-over"),this.hasStroke()){var u=i.lineWidth;e.lineWidth=u/(this.strokeNoScale&&t&&t.getLineScale?t.getLineScale():1)}},hasFill:function(){var e=this.fill;return null!=e&&"none"!==e},hasStroke:function(){var e=this.stroke;return null!=e&&"none"!==e&&0<this.lineWidth},extendFrom:function(e,t){if(e)for(var n in e)!e.hasOwnProperty(n)||!0!==t&&(!1===t?this.hasOwnProperty(n):null==e[n])||(this[n]=e[n])},set:function(e,t){"string"==typeof e?this[e]=t:this.extendFrom(e,!0)},clone:function(){var e=new this.constructor;return e.extendFrom(this,!0),e},getGradient:function(e,t,n){for(var i=("radial"===t.type?Xn:$n)(e,t,n),a=t.colorStops,r=0;r<a.length;r++)i.addColorStop(a[r].offset,a[r].color);return i}};for(var Yn=Fn.prototype,Un=0;Un<Hn.length;Un++){var jn=Hn[Un];jn[0]in Yn||(Yn[jn[0]]=jn[1])}function Zn(e,t){this.image=e,this.repeat=t,this.type="pattern"}function qn(){return!1}function Kn(e,t,n){var i=b(),a=t.getWidth(),r=t.getHeight(),o=i.style;return o&&(o.position="absolute",o.left=0,o.top=0,o.width=a+"px",o.height=r+"px",i.setAttribute("data-zr-dom-id",e)),i.width=a*n,i.height=r*n,i}function Jn(e,t,n){var i;n=n||fn,"string"==typeof e?i=Kn(e,t,n):R(e)&&(e=(i=e).id),this.id=e;var a=(this.dom=i).style;a&&(i.onselectstart=qn,a["-webkit-user-select"]="none",a["user-select"]="none",a["-webkit-touch-callout"]="none",a["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",a.padding=0,a.margin=0,a["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=t,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=n}Fn.getGradient=Yn.getGradient,Jn.prototype={constructor:Jn,__dirty:!0,__used:!(Zn.prototype.getCanvasPattern=function(e){return e.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 e=this.dpr;this.domBack=Kn("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},resize:function(e,t){var n=this.dpr,i=this.dom,a=i.style,r=this.domBack;a&&(a.width=e+"px",a.height=t+"px"),i.width=e*n,i.height=t*n,r&&(r.width=e*n,r.height=t*n,1!==n&&this.ctxBack.scale(n,n))},clear:function(e,t){var n,i=this.dom,a=this.ctx,r=i.width,o=i.height,s=(t=t||this.clearColor,this.motionBlur&&!e),l=this.lastFrameAlpha,u=this.dpr;if(s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,r/u,o/u)),a.clearRect(0,0,r,o),t&&"transparent"!==t&&(t.colorStops?(n=t.__canvasGradient||Fn.getGradient(a,t,{x:0,y:0,width:r,height:o}),t.__canvasGradient=n):t.image&&(n=Zn.prototype.getCanvasPattern.call(t,a)),a.save(),a.fillStyle=n||t,a.fillRect(0,0,r,o),a.restore()),s){var c=this.domBack;a.save(),a.globalAlpha=l,a.drawImage(c,0,0,r,o),a.restore()}}};var Qn="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){setTimeout(e,16)},ei=new Tt(50);function ti(e){if("string"!=typeof e)return e;var t=ei.get(e);return t&&t.image}function ni(e,t,n,i,a){if(e){if("string"!=typeof e)return e;if(t&&t.__zrImageSrc===e||!n)return t;var r=ei.get(e),o={hostEl:n,cb:i,cbPayload:a};return r?ai(t=r.image)||r.pending.push(o):((t=new Image).onload=t.onerror=ii,ei.put(e,t.__cachedImgObj={image:t,pending:[o]}),t.src=t.__zrImageSrc=e),t}return t}function ii(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],i=n.cb;i&&i(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function ai(e){return e&&e.width&&e.height}var ri={},oi=0,si=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,li="12px sans-serif",ui={};function ci(e,t){var n=e+":"+(t=t||li);if(ri[n])return ri[n];for(var i,a,r=(e+"").split("\n"),o=0,s=0,l=r.length;s<l;s++)o=Math.max((i=r[s],a=t,ui.measureText(i,a)).width,o);return 5e3<oi&&(oi=0,ri={}),oi++,ri[n]=o}function hi(e,t,n,i,a,r,o,s){return o?function(e,t,n,i,a,r,o,s){var l=bi(e,{rich:o,truncate:s,font:t,textAlign:n,textPadding:a,textLineHeight:r}),u=l.outerWidth,c=l.outerHeight;return new In(di(0,u,n),pi(0,c,i),u,c)}(e,t,n,i,a,r,o,s):function(e,t,n,i,a,r,o){var s=_i(e,t,a,r,o),l=ci(e,t);a&&(l+=a[1]+a[3]);var u=s.outerHeight,c=new In(di(0,l,n),pi(0,u,i),l,u);return c.lineHeight=s.lineHeight,c}(e,t,n,i,a,r,s)}function di(e,t,n){return"right"===n?e-=t:"center"===n&&(e-=t/2),e}function pi(e,t,n){return"middle"===n?e-=t/2:"bottom"===n&&(e-=t),e}function fi(e,t,n){var i=t.textPosition,a=t.textDistance,r=n.x,o=n.y;a=a||0;var s=n.height,l=n.width,u=s/2,c="left",h="top";switch(i){case"left":r-=a,o+=u,c="right",h="middle";break;case"right":r+=a+l,o+=u,h="middle";break;case"top":r+=l/2,o-=a,c="center",h="bottom";break;case"bottom":r+=l/2,o+=s+a,c="center";break;case"inside":r+=l/2,o+=u,c="center",h="middle";break;case"insideLeft":r+=a,o+=u,h="middle";break;case"insideRight":r+=l-a,o+=u,c="right",h="middle";break;case"insideTop":r+=l/2,o+=a,c="center";break;case"insideBottom":r+=l/2,o+=s-a,c="center",h="bottom";break;case"insideTopLeft":r+=a,o+=a;break;case"insideTopRight":r+=l-a,o+=a,c="right";break;case"insideBottomLeft":r+=a,o+=s-a,h="bottom";break;case"insideBottomRight":r+=l-a,o+=s-a,c="right",h="bottom"}return(e=e||{}).x=r,e.y=o,e.textAlign=c,e.textVerticalAlign=h,e}function gi(e,t,n,i,a){if(!t)return"";var r=(e+"").split("\n");a=mi(t,n,i,a);for(var o=0,s=r.length;o<s;o++)r[o]=vi(r[o],a);return r.join("\n")}function mi(e,t,n,i){(i=x({},i)).font=t,n=F(n,"..."),i.maxIterations=F(i.maxIterations,2);var a=i.minChar=F(i.minChar,0);i.cnCharWidth=ci("\u56fd",t);var r=i.ascCharWidth=ci("a",t);i.placeholder=F(i.placeholder,"");for(var o=e=Math.max(0,e-1),s=0;s<a&&r<=o;s++)o-=r;var l=ci(n,t);return o<l&&(n="",l=0),o=e-l,i.ellipsis=n,i.ellipsisWidth=l,i.contentWidth=o,i.containerWidth=e,i}function vi(e,t){var n=t.containerWidth,i=t.font,a=t.contentWidth;if(!n)return"";var r=ci(e,i);if(r<=n)return e;for(var o=0;;o++){if(r<=a||o>=t.maxIterations){e+=t.ellipsis;break}var s=0===o?yi(e,a,t.ascCharWidth,t.cnCharWidth):0<r?Math.floor(e.length*a/r):0;r=ci(e=e.substr(0,s),i)}return""===e&&(e=t.placeholder),e}function yi(e,t,n,i){for(var a=0,r=0,o=e.length;r<o&&a<t;r++){var s=e.charCodeAt(r);a+=0<=s&&s<=127?n:i}return r}function xi(e){return ci("\u56fd",e)}function _i(e,t,n,i,a){null!=e&&(e+="");var r=F(i,xi(t)),o=e?e.split("\n"):[],s=o.length*r,l=s,u=!0;if(n&&(l+=n[0]+n[2]),e&&a){u=!1;var c=a.outerHeight,h=a.outerWidth;if(null!=c&&c<l)e="",o=[];else if(null!=h)for(var d=mi(h-(n?n[1]+n[3]:0),t,a.ellipsis,{minChar:a.minChar,placeholder:a.placeholder}),p=0,f=o.length;p<f;p++)o[p]=vi(o[p],d)}return{lines:o,height:s,outerHeight:l,lineHeight:r,canCacheByTextString:u}}function bi(e,t){var n={lines:[],width:0,height:0};if(null!=e&&(e+=""),!e)return n;for(var i,a=si.lastIndex=0;null!=(i=si.exec(e));){var r=i.index;a<r&&wi(n,e.substring(a,r)),wi(n,i[2],i[1]),a=si.lastIndex}a<e.length&&wi(n,e.substring(a,e.length));var o=n.lines,s=0,l=0,u=[],c=t.textPadding,h=t.truncate,d=h&&h.outerWidth,p=h&&h.outerHeight;c&&(null!=d&&(d-=c[1]+c[3]),null!=p&&(p-=c[0]+c[2]));for(var f=0;f<o.length;f++){for(var g=o[f],m=0,v=0,y=0;y<g.tokens.length;y++){var x=(D=g.tokens[y]).styleName&&t.rich[D.styleName]||{},_=D.textPadding=x.textPadding,b=D.font=x.font||t.font,w=D.textHeight=F(x.textHeight,xi(b));if(_&&(w+=_[0]+_[2]),D.height=w,D.lineHeight=$(x.textLineHeight,t.textLineHeight,w),D.textAlign=x&&x.textAlign||t.textAlign,D.textVerticalAlign=x&&x.textVerticalAlign||"middle",null!=p&&s+D.lineHeight>p)return{lines:[],width:0,height:0};D.textWidth=ci(D.text,b);var S=x.textWidth,M=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))D.percentWidth=S,u.push(D),S=0;else{if(M){S=D.textWidth;var T=x.textBackgroundColor,C=T&&T.image;C&&ai(C=ti(C))&&(S=Math.max(S,C.width*w/C.height))}var I=_?_[1]+_[3]:0;S+=I;var A=null!=d?d-v:null;null!=A&&A<S&&(!M||A<I?(D.text="",D.textWidth=S=0):(D.text=gi(D.text,A-I,b,h.ellipsis,{minChar:h.minChar}),D.textWidth=ci(D.text,b),S=D.textWidth+I))}v+=D.width=S,x&&(m=Math.max(m,D.lineHeight))}g.width=v,s+=g.lineHeight=m,l=Math.max(l,v)}for(n.outerWidth=n.width=F(t.textWidth,l),n.outerHeight=n.height=F(t.textHeight,s),c&&(n.outerWidth+=c[1]+c[3],n.outerHeight+=c[0]+c[2]),f=0;f<u.length;f++){var D,k=(D=u[f]).percentWidth;D.width=parseInt(k,10)/100*l}return n}function wi(e,t,n){for(var i=""===t,a=t.split("\n"),r=e.lines,o=0;o<a.length;o++){var s=a[o],l={styleName:n,text:s,isLineHolder:!s&&!i};if(o)r.push({tokens:[l]});else{var u=(r[r.length-1]||(r[0]={tokens:[]})).tokens,c=u.length;1===c&&u[0].isLineHolder?u[0]=l:!s&&c&&!i||u.push(l)}}}function Si(e){var t=(e.fontSize||e.fontFamily)&&[e.fontStyle,e.fontWeight,(e.fontSize||12)+"px",e.fontFamily||"sans-serif"].join(" ");return t&&j(t)||e.textFont||e.font}function Mi(e,t){var n,i,a,r,o,s=t.x,l=t.y,u=t.width,c=t.height,h=t.r;u<0&&(s+=u,u=-u),c<0&&(l+=c,c=-c),"number"==typeof h?n=i=a=r=h:h instanceof Array?1===h.length?n=i=a=r=h[0]:2===h.length?(n=a=h[0],i=r=h[1]):3===h.length?(n=h[0],i=r=h[1],a=h[2]):(n=h[0],i=h[1],a=h[2],r=h[3]):n=i=a=r=0,u<n+i&&(n*=u/(o=n+i),i*=u/o),u<a+r&&(a*=u/(o=a+r),r*=u/o),c<i+a&&(i*=c/(o=i+a),a*=c/o),c<n+r&&(n*=c/(o=n+r),r*=c/o),e.moveTo(s+n,l),e.lineTo(s+u-i,l),0!==i&&e.arc(s+u-i,l+i,i,-Math.PI/2,0),e.lineTo(s+u,l+c-a),0!==a&&e.arc(s+u-a,l+c-a,a,0,Math.PI/2),e.lineTo(s+r,l+c),0!==r&&e.arc(s+r,l+c-r,r,Math.PI/2,Math.PI),e.lineTo(s,l+n),0!==n&&e.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}ui.measureText=function(e,t){var n=w();return n.font=t||li,n.measureText(e)};var Ti=li,Ci={left:1,right:1,center:1},Ii={top:1,bottom:1,middle:1},Ai=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],Di={},ki={};function Li(e){return Ei(e),I(e.rich,Ei),e}function Ei(e){if(e){e.font=Si(e);var t=e.textAlign;"middle"===t&&(t="center"),e.textAlign=null==t||Ci[t]?t:"left";var n=e.textVerticalAlign||e.textBaseline;"center"===n&&(n="middle"),e.textVerticalAlign=null==n||Ii[n]?n:"top",e.textPadding&&(e.textPadding=Y(e.textPadding))}}function Pi(e,t,n,i,a,r){i.rich?function(e,t,n,i,a,r){9!==r&&(t.__attrCachedBy=Vn);var o=e.__textCotentBlock;o&&!e.__dirtyText||(o=e.__textCotentBlock=bi(n,i)),function(e,t,n,i,a){var r=n.width,o=n.outerWidth,s=n.outerHeight,l=i.textPadding,u=Vi(ki,e,i,a),c=u.baseX,h=u.baseY,d=u.textAlign,p=u.textVerticalAlign;zi(t,i,a,c,h);var f=di(c,o,d),g=pi(h,s,p),m=f,v=g;l&&(m+=l[3],v+=l[0]);var y=m+r;Ni(i)&&Ri(e,t,i,f,g,o,s);for(var x=0;x<n.lines.length;x++){for(var _,b=n.lines[x],w=b.tokens,S=w.length,M=b.lineHeight,T=b.width,C=0,I=m,A=y,D=S-1;C<S&&(!(_=w[C]).textAlign||"left"===_.textAlign);)Oi(e,t,_,i,M,v,I,"left"),T-=_.width,I+=_.width,C++;for(;0<=D&&"right"===(_=w[D]).textAlign;)Oi(e,t,_,i,M,v,A,"right"),T-=_.width,A-=_.width,D--;for(I+=(r-(I-m)-(y-A)-T)/2;C<=D;)Oi(e,t,_=w[C],i,M,v,I+_.width/2,"center"),I+=_.width,C++;v+=M}}(e,t,o,i,a)}(e,t,n,i,a,r):function(e,t,n,i,a,r){var o,s=Ni(i),l=!1,u=t.__attrCachedBy===Wn;9!==r?(r&&(o=r.style,l=!s&&u&&o),t.__attrCachedBy=s?Vn:Wn):u&&(t.__attrCachedBy=Vn);var c=i.font||Ti;l&&c===(o.font||Ti)||(t.font=c);var h=e.__computedFont;e.__styleFont!==c&&(e.__styleFont=c,h=e.__computedFont=t.font);var d=i.textPadding,p=i.textLineHeight,f=e.__textCotentBlock;f&&!e.__dirtyText||(f=e.__textCotentBlock=_i(n,h,d,p,i.truncate));var g=f.outerHeight,m=f.lines,v=f.lineHeight,y=Vi(ki,e,i,a),x=y.baseX,_=y.baseY,b=y.textAlign||"left",w=y.textVerticalAlign;zi(t,i,a,x,_);var S=pi(_,g,w),M=x,T=S;if(s||d){var C=ci(n,h);d&&(C+=d[1]+d[3]);var I=di(x,C,b);s&&Ri(e,t,i,I,S,C,g),d&&(M=$i(x,b,d),T+=d[0])}t.textAlign=b,t.textBaseline="middle",t.globalAlpha=i.opacity||1;for(var A=0;A<Ai.length;A++){var D=Ai[A],k=D[0],L=D[1],E=i[k];l&&E===o[k]||(t[L]=Bn(t,L,E||D[2]))}T+=v/2;var P=i.textStrokeWidth,z=l?o.textStrokeWidth:null,O=!l||P!==z,N=!l||O||i.textStroke!==o.textStroke,R=Wi(i.textStroke,P),B=Hi(i.textFill);if(R&&(O&&(t.lineWidth=P),N&&(t.strokeStyle=R)),B&&(l&&i.textFill===o.textFill||(t.fillStyle=B)),1===m.length)R&&t.strokeText(m[0],M,T),B&&t.fillText(m[0],M,T);else for(A=0;A<m.length;A++)R&&t.strokeText(m[A],M,T),B&&t.fillText(m[A],M,T),T+=v}(e,t,n,i,a,r)}function zi(e,t,n,i,a){if(n&&t.textRotation){var r=t.textOrigin;"center"===r?(i=n.width/2+n.x,a=n.height/2+n.y):r&&(i=r[0]+n.x,a=r[1]+n.y),e.translate(i,a),e.rotate(-t.textRotation),e.translate(-i,-a)}}function Oi(e,t,n,i,a,r,o,s){var l=i.rich[n.styleName]||{};l.text=n.text;var u=n.textVerticalAlign,c=r+a/2;"top"===u?c=r+n.height/2:"bottom"===u&&(c=r+a-n.height/2),!n.isLineHolder&&Ni(l)&&Ri(e,t,l,"right"===s?o-n.width:"center"===s?o-n.width/2:o,c-n.height/2,n.width,n.height);var h=n.textPadding;h&&(o=$i(o,s,h),c-=n.height/2-h[2]-n.textHeight/2),Gi(t,"shadowBlur",$(l.textShadowBlur,i.textShadowBlur,0)),Gi(t,"shadowColor",l.textShadowColor||i.textShadowColor||"transparent"),Gi(t,"shadowOffsetX",$(l.textShadowOffsetX,i.textShadowOffsetX,0)),Gi(t,"shadowOffsetY",$(l.textShadowOffsetY,i.textShadowOffsetY,0)),Gi(t,"textAlign",s),Gi(t,"textBaseline","middle"),Gi(t,"font",n.font||Ti);var d=Wi(l.textStroke||i.textStroke,f),p=Hi(l.textFill||i.textFill),f=F(l.textStrokeWidth,i.textStrokeWidth);d&&(Gi(t,"lineWidth",f),Gi(t,"strokeStyle",d),t.strokeText(n.text,o,c)),p&&(Gi(t,"fillStyle",p),t.fillText(n.text,o,c))}function Ni(e){return!!(e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor)}function Ri(e,t,n,i,a,r,o){var s=n.textBackgroundColor,l=n.textBorderWidth,u=n.textBorderColor,c=N(s);if(Gi(t,"shadowBlur",n.textBoxShadowBlur||0),Gi(t,"shadowColor",n.textBoxShadowColor||"transparent"),Gi(t,"shadowOffsetX",n.textBoxShadowOffsetX||0),Gi(t,"shadowOffsetY",n.textBoxShadowOffsetY||0),c||l&&u){t.beginPath();var h=n.textBorderRadius;h?Mi(t,{x:i,y:a,width:r,height:o,r:h}):t.rect(i,a,r,o),t.closePath()}if(c)if(Gi(t,"fillStyle",s),null!=n.fillOpacity){var d=t.globalAlpha;t.globalAlpha=n.fillOpacity*n.opacity,t.fill(),t.globalAlpha=d}else t.fill();else if(R(s)){var p=s.image;(p=ni(p,null,e,Bi,s))&&ai(p)&&t.drawImage(p,i,a,r,o)}l&&u&&(Gi(t,"lineWidth",l),Gi(t,"strokeStyle",u),null!=n.strokeOpacity?(d=t.globalAlpha,t.globalAlpha=n.strokeOpacity*n.opacity,t.stroke(),t.globalAlpha=d):t.stroke())}function Bi(e,t){t.image=e}function Vi(e,t,n,i){var a=n.x||0,r=n.y||0,o=n.textAlign,s=n.textVerticalAlign;if(i){var l=n.textPosition;if(l instanceof Array)a=i.x+Fi(l[0],i.width),r=i.y+Fi(l[1],i.height);else{var u=t&&t.calculateTextPosition?t.calculateTextPosition(Di,n,i):fi(Di,n,i);a=u.x,r=u.y,o=o||u.textAlign,s=s||u.textVerticalAlign}var c=n.textOffset;c&&(a+=c[0],r+=c[1])}return(e=e||{}).baseX=a,e.baseY=r,e.textAlign=o,e.textVerticalAlign=s,e}function Gi(e,t,n){return e[t]=Bn(e,t,n),e[t]}function Wi(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function Hi(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function Fi(e,t){return"string"==typeof e?0<=e.lastIndexOf("%")?parseFloat(e)/100*t:parseFloat(e):e}function $i(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}function Xi(e,t){return null!=e&&(e||t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor||t.textPadding)}function Yi(){}var Ui=new In;function ji(e){for(var t in e=e||{},xn.call(this,e),e)e.hasOwnProperty(t)&&"style"!==t&&(this[t]=e[t]);this.style=new Fn(e.style,this),this._rect=null,this.__clipPaths=null}function Zi(e){ji.call(this,e)}ji.prototype={constructor:ji,type:"displayable",__dirty:!0,invisible:!(Yi.prototype={constructor:Yi,drawRectText:function(e,t){var n=this.style;t=n.textRect||t,this.__dirty&&Li(n);var i=n.text;if(null!=i&&(i+=""),Xi(i,n)){e.save();var a=this.transform;n.transformText?this.setTransform(e):a&&(Ui.copy(t),Ui.applyTransform(a),t=Ui),Pi(this,e,i,n,t,9),e.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(e){},afterBrush:function(e){},brush:function(e,t){},getBoundingRect:function(){},contain:function(e,t){return this.rectContain(e,t)},traverse:function(e,t){e.call(t,this)},rectContain:function(e,t){var n=this.transformCoordToLocal(e,t);return this.getBoundingRect().contain(n[0],n[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(e){return this.animate("style",e)},attrKV:function(e,t){"style"!==e?xn.prototype.attrKV.call(this,e,t):this.style.set(t)},setStyle:function(e,t){return this.style.set(e,t),this.dirty(!1),this},useStyle:function(e){return this.style=new Fn(e,this),this.dirty(!1),this},calculateTextPosition:null},M(ji,xn),T(ji,Yi),Zi.prototype={constructor:Zi,type:"image",brush:function(e,t){var n=this.style,i=n.image;n.bind(e,this,t);var a=this._image=ni(i,this._image,this,this.onload);if(a&&ai(a)){var r=n.x||0,o=n.y||0,s=n.width,l=n.height,u=a.width/a.height;if(null==s&&null!=l?s=l*u:null==l&&null!=s?l=s/u:null==s&&null==l&&(s=a.width,l=a.height),this.setTransform(e),n.sWidth&&n.sHeight){var c=n.sx||0,h=n.sy||0;e.drawImage(a,c,h,n.sWidth,n.sHeight,r,o,s,l)}else if(n.sx&&n.sy){var d=s-(c=n.sx),p=l-(h=n.sy);e.drawImage(a,c,h,d,p,r,o,s,l)}else e.drawImage(a,r,o,s,l);null!=n.text&&(this.restoreTransform(e),this.drawRectText(e,this.getBoundingRect()))}},getBoundingRect:function(){var e=this.style;return this._rect||(this._rect=new In(e.x||0,e.y||0,e.width||0,e.height||0)),this._rect}},M(Zi,ji);var qi=314159;function Ki(e){return parseInt(e,10)}var Ji=new In(0,0,0,0),Qi=new In(0,0,0,0);function ea(e,t,n){this.type="canvas";var i=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=n=x({},n||{}),this.dpr=n.devicePixelRatio||fn,this._singleCanvas=i;var a=(this.root=e).style;a&&(a["-webkit-tap-highlight-color"]="transparent",a["-webkit-user-select"]=a["user-select"]=a["-webkit-touch-callout"]="none",e.innerHTML=""),this.storage=t;var r=this._zlevelList=[],o=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,i){var s=e.width,l=e.height;null!=n.width&&(s=n.width),null!=n.height&&(l=n.height),this.dpr=n.devicePixelRatio||1,e.width=s*this.dpr,e.height=l*this.dpr,this._width=s,this._height=l;var u=new Jn(e,this,this.dpr);u.__builtin__=!0,u.initContext(),(o[qi]=u).zlevel=qi,r.push(qi),this._domRoot=e}else{this._width=this._getSize(0),this._height=this._getSize(1);var c=this._domRoot=function(e,t){var n=document.createElement("div");return n.style.cssText=["position:relative","width:"+e+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",n}(this._width,this._height);e.appendChild(c)}this._hoverlayer=null,this._hoverElements=[]}function ta(e){e=e||{},this.stage=e.stage||{},this.onframe=e.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,De.call(this)}ea.prototype={constructor:ea,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(e){var t=this.storage.getDisplayList(!0),n=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,e,this._redrawId);for(var i=0;i<n.length;i++){var a=n[i],r=this._layers[a];if(!r.__builtin__&&r.refresh){var o=0===i?this._backgroundColor:null;r.refresh(o)}}return this.refreshHover(),this},addHover:function(e,t){if(!e.__hoverMir){var n=new e.constructor({style:e.style,shape:e.shape,z:e.z,z2:e.z2,silent:e.silent});return(n.__from=e).__hoverMir=n,t&&n.setStyle(t),this._hoverElements.push(n),n}},removeHover:function(e){var t=e.__hoverMir,n=this._hoverElements,i=S(n,t);0<=i&&n.splice(i,1),e.__hoverMir=null},clearHover:function(e){for(var t=this._hoverElements,n=0;n<t.length;n++){var i=t[n].__from;i&&(i.__hoverMir=null)}t.length=0},refreshHover:function(){var e=this._hoverElements,t=e.length,n=this._hoverlayer;if(n&&n.clear(),t){zn(e,this.storage.displayableSortFunc);var i={};(n=n||(this._hoverlayer=this.getLayer(1e5))).ctx.save();for(var a=0;a<t;){var r=e[a],o=r.__from;o&&o.__zr?(a++,o.invisible||(r.transform=o.transform,r.invTransform=o.invTransform,r.__clipPaths=o.__clipPaths,this._doPaintEl(r,n,!0,i))):(e.splice(a,1),o.__hoverMir=null,t--)}n.ctx.restore()}},getHoverLayer:function(){return this.getLayer(1e5)},_paintList:function(e,t,n){if(this._redrawId===n){t=t||!1,this._updateLayerStatus(e);var i=this._doPaintList(e,t);if(this._needsManuallyCompositing&&this._compositeManually(),!i){var a=this;Qn((function(){a._paintList(e,t,n)}))}}},_compositeManually:function(){var e=this.getLayer(qi).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer((function(i){i.virtual&&e.drawImage(i.dom,0,0,t,n)}))},_doPaintList:function(e,t){for(var n=[],i=0;i<this._zlevelList.length;i++){var r=this._zlevelList[i];(l=this._layers[r]).__builtin__&&l!==this._hoverlayer&&(l.__dirty||t)&&n.push(l)}for(var o=!0,s=0;s<n.length;s++){var l,u=(l=n[s]).ctx,c={};u.save();var h=t?l.__startIndex:l.__drawIndex,d=!t&&l.incremental&&Date.now,p=d&&Date.now(),f=l.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(l.__startIndex===l.__endIndex)l.clear(!1,f);else if(h===l.__startIndex){var g=e[h];g.incremental&&g.notClear&&!t||l.clear(!1,f)}-1===h&&(console.error("For some unknown reason. drawIndex is -1"),h=l.__startIndex);for(var m=h;m<l.__endIndex;m++){var v=e[m];if(this._doPaintEl(v,l,t,c),v.__dirty=v.__dirtyText=!1,d&&15<Date.now()-p)break}l.__drawIndex=m,l.__drawIndex<l.__endIndex&&(o=!1),c.prevElClipPaths&&u.restore(),u.restore()}return a.wxa&&I(this._layers,(function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()})),o},_doPaintEl:function(e,t,n,i){var a=t.ctx,r=e.transform;if((t.__dirty||n)&&!e.invisible&&0!==e.style.opacity&&(!r||r[0]||r[3])&&(!e.culling||!function(e,t,n){return Ji.copy(e.getBoundingRect()),e.transform&&Ji.applyTransform(e.transform),Qi.width=t,Qi.height=n,!Ji.intersect(Qi)}(e,this._width,this._height))){var o=e.__clipPaths,s=i.prevElClipPaths;s&&!function(e,t){if(e===t)return!1;if(!e||!t||e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}(o,s)||(s&&(a.restore(),i.prevElClipPaths=null,i.prevEl=null),o&&(a.save(),function(e,t){for(var n=0;n<e.length;n++){var i=e[n];i.setTransform(t),t.beginPath(),i.buildPath(t,i.shape),t.clip(),i.restoreTransform(t)}}(o,a),i.prevElClipPaths=o)),e.beforeBrush&&e.beforeBrush(a),e.brush(a,i.prevEl||null),(i.prevEl=e).afterBrush&&e.afterBrush(a)}},getLayer:function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=qi);var n=this._layers[e];return n||((n=new Jn("zr_"+e,this,this.dpr)).zlevel=e,n.__builtin__=!0,this._layerConfig[e]?v(n,this._layerConfig[e],!0):this._layerConfig[e-.01]&&v(n,this._layerConfig[e-.01],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},insertLayer:function(e,t){var n=this._layers,i=this._zlevelList,a=i.length,r=null,o=-1,s=this._domRoot;if(n[e])mn("ZLevel "+e+" has been used already");else if(function(e){return!!e&&(!!e.__builtin__||"function"==typeof e.resize&&"function"==typeof e.refresh)}(t)){if(0<a&&e>i[0]){for(o=0;o<a-1&&!(i[o]<e&&i[o+1]>e);o++);r=n[i[o]]}if(i.splice(o+1,0,e),!(n[e]=t).virtual)if(r){var l=r.dom;l.nextSibling?s.insertBefore(t.dom,l.nextSibling):s.appendChild(t.dom)}else s.firstChild?s.insertBefore(t.dom,s.firstChild):s.appendChild(t.dom)}else mn("Layer of zlevel "+e+" is not valid")},eachLayer:function(e,t){var n,i,a=this._zlevelList;for(i=0;i<a.length;i++)n=a[i],e.call(t,this._layers[n],n)},eachBuiltinLayer:function(e,t){var n,i,a,r=this._zlevelList;for(a=0;a<r.length;a++)i=r[a],(n=this._layers[i]).__builtin__&&e.call(t,n,i)},eachOtherLayer:function(e,t){var n,i,a,r=this._zlevelList;for(a=0;a<r.length;a++)i=r[a],(n=this._layers[i]).__builtin__||e.call(t,n,i)},getLayers:function(){return this._layers},_updateLayerStatus:function(e){function t(e){a&&(a.__endIndex!==e&&(a.__dirty=!0),a.__endIndex=e)}if(this.eachBuiltinLayer((function(e,t){e.__dirty=e.__used=!1})),this._singleCanvas)for(var n=1;n<e.length;n++)if((o=e[n]).zlevel!==e[n-1].zlevel||o.incremental){this._needsManuallyCompositing=!0;break}var i,a=null,r=0;for(n=0;n<e.length;n++){var o,s,l=(o=e[n]).zlevel;i!==l&&(i=l,r=0),o.incremental?((s=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,r=1):s=this.getLayer(l+(0<r?.01:0),this._needsManuallyCompositing),s.__builtin__||mn("ZLevel "+l+" has been used by unkown layer "+s.id),s!==a&&(s.__used=!0,s.__startIndex!==n&&(s.__dirty=!0),s.__startIndex=n,s.incremental?s.__drawIndex=-1:s.__drawIndex=n,t(n),a=s),o.__dirty&&(s.__dirty=!0,s.incremental&&s.__drawIndex<0&&(s.__drawIndex=n))}t(n),this.eachBuiltinLayer((function(e,t){!e.__used&&0<e.getElementCount()&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)}))},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(e){e.clear()},setBackgroundColor:function(e){this._backgroundColor=e},configLayer:function(e,t){if(t){var n=this._layerConfig;n[e]?v(n[e],t,!0):n[e]=t;for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];a!==e&&a!==e+.01||v(this._layers[a],n[e],!0)}}},delLayer:function(e){var t=this._layers,n=this._zlevelList,i=t[e];i&&(i.dom.parentNode.removeChild(i.dom),delete t[e],n.splice(S(n,e),1))},resize:function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts;if(null!=e&&(i.width=e),null!=t&&(i.height=t),e=this._getSize(0),t=this._getSize(1),n.style.display="",this._width!==e||t!==this._height){for(var a in n.style.width=e+"px",n.style.height=t+"px",this._layers)this._layers.hasOwnProperty(a)&&this._layers[a].resize(e,t);I(this._progressiveLayers,(function(n){n.resize(e,t)})),this.refresh(!0)}this._width=e,this._height=t}else{if(null==e||null==t)return;this._width=e,this._height=t,this.getLayer(qi).resize(e,t)}return this},clearLayer:function(e){var t=this._layers[e];t&&t.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[qi].dom;var t=new Jn("image",this,e.pixelRatio||this.dpr);if(t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor),e.pixelRatio<=this.dpr){this.refresh();var n=t.dom.width,i=t.dom.height,a=t.ctx;this.eachLayer((function(e){e.__builtin__?a.drawImage(e.dom,0,0,n,i):e.renderToCanvas&&(t.ctx.save(),e.renderToCanvas(t.ctx),t.ctx.restore())}))}else for(var r={},o=this.storage.getDisplayList(!0),s=0;s<o.length;s++){var l=o[s];this._doPaintEl(l,t,!0,r)}return t.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(e){var t=this._opts,n=["width","height"][e],i=["clientWidth","clientHeight"][e],a=["paddingLeft","paddingTop"][e],r=["paddingRight","paddingBottom"][e];if(null!=t[n]&&"auto"!==t[n])return parseFloat(t[n]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[i]||Ki(s[n])||Ki(o.style[n]))-(Ki(s[a])||0)-(Ki(s[r])||0)|0},pathToImage:function(e,t){t=t||this.dpr;var n=document.createElement("canvas"),i=n.getContext("2d"),a=e.getBoundingRect(),r=e.style,o=r.shadowBlur*t,s=r.shadowOffsetX*t,l=r.shadowOffsetY*t,u=r.hasStroke()?r.lineWidth:0,c=Math.max(u/2,o-s),h=Math.max(u/2,s+o),d=Math.max(u/2,o-l),p=Math.max(u/2,l+o),f=a.width+c+h,g=a.height+d+p;n.width=f*t,n.height=g*t,i.scale(t,t),i.clearRect(0,0,f,g),i.dpr=t;var m={position:e.position,rotation:e.rotation,scale:e.scale};e.position=[c-a.x,d-a.y],e.rotation=0,e.scale=[1,1],e.updateTransform(),e&&e.brush(i);var v=new Zi({style:{x:0,y:0,image:n}});return null!=m.position&&(v.position=e.position=m.position),null!=m.rotation&&(v.rotation=e.rotation=m.rotation),null!=m.scale&&(v.scale=e.scale=m.scale),v}},ta.prototype={constructor:ta,addClip:function(e){this._clips.push(e)},addAnimator:function(e){e.animation=this;for(var t=e.getClips(),n=0;n<t.length;n++)this.addClip(t[n])},removeClip:function(e){var t=S(this._clips,e);0<=t&&this._clips.splice(t,1)},removeAnimator:function(e){for(var t=e.getClips(),n=0;n<t.length;n++)this.removeClip(t[n]);e.animation=null},_update:function(){for(var e=(new Date).getTime()-this._pausedTime,t=e-this._time,n=this._clips,i=n.length,a=[],r=[],o=0;o<i;o++){var s=n[o],l=s.step(e,t);l&&(a.push(l),r.push(s))}for(o=0;o<i;)n[o]._needsRemove?(n[o]=n[i-1],n.pop(),i--):o++;for(i=a.length,o=0;o<i;o++)r[o].fire(a[o]);this._time=e,this.onframe(t),this.trigger("frame",t),this.stage.update&&this.stage.update()},_startLoop:function(){var e=this;this._running=!0,Qn((function t(){e._running&&(Qn(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(e,t){var n=new dn(e,(t=t||{}).loop,t.getter,t.setter);return this.addAnimator(n),n}},T(ta,De);var na,ia,aa=a.domSupported,ra=(ia={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:na=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:A(na,(function(e){var t=e.replace("mouse","pointer");return ia.hasOwnProperty(t)?t:e}))}),oa=["mousemove","mouseup"],sa=["pointermove","pointerup"];function la(e){return"mousewheel"===e&&a.browser.firefox?"DOMMouseScroll":e}function ua(e){var t=e.pointerType;return"pen"===t||"touch"===t}function ca(e){e&&(e.zrByTouch=!0)}function ha(e,t){for(var n=t,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return i}function da(e,t){this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}var pa=da.prototype;pa.stopPropagation=pa.stopImmediatePropagation=pa.preventDefault=te;var fa={mousedown:function(e){e=$e(this.dom,e),this._mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=$e(this.dom,e);var t=this._mayPointerCapture;!t||e.zrX===t[0]&&e.zrY===t[1]||ya(this,!0),this.trigger("mousemove",e)},mouseup:function(e){e=$e(this.dom,e),ya(this,!1),this.trigger("mouseup",e)},mouseout:function(e){e=$e(this.dom,e),this._pointerCapturing&&(e.zrEventControl="no_globalout");var t=e.toElement||e.relatedTarget;e.zrIsToLocalDOM=ha(this,t),this.trigger("mouseout",e)},touchstart:function(e){ca(e=$e(this.dom,e)),this._lastTouchMoment=new Date,this.handler.processGesture(e,"start"),fa.mousemove.call(this,e),fa.mousedown.call(this,e)},touchmove:function(e){ca(e=$e(this.dom,e)),this.handler.processGesture(e,"change"),fa.mousemove.call(this,e)},touchend:function(e){ca(e=$e(this.dom,e)),this.handler.processGesture(e,"end"),fa.mouseup.call(this,e),+new Date-this._lastTouchMoment<300&&fa.click.call(this,e)},pointerdown:function(e){fa.mousedown.call(this,e)},pointermove:function(e){ua(e)||fa.mousemove.call(this,e)},pointerup:function(e){fa.mouseup.call(this,e)},pointerout:function(e){ua(e)||fa.mouseout.call(this,e)}};I(["click","mousewheel","dblclick","contextmenu"],(function(e){fa[e]=function(t){t=$e(this.dom,t),this.trigger(e,t)}}));var ga={pointermove:function(e){ua(e)||ga.mousemove.call(this,e)},pointerup:function(e){ga.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this._pointerCapturing;ya(this,!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}};function ma(e,t,n,i){e.mounted[t]=n,e.listenerOpts[t]=i,Xe(e.domTarget,la(t),n,i)}function va(e){var t,n,i,a,r=e.mounted;for(var o in r)r.hasOwnProperty(o)&&(t=e.domTarget,n=la(o),i=r[o],a=e.listenerOpts[o],Be?t.removeEventListener(n,i,a):t.detachEvent("on"+n,i));e.mounted={}}function ya(e,t){if(e._mayPointerCapture=null,aa&&e._pointerCapturing^t){e._pointerCapturing=t;var n=e._globalHandlerScope;t?function(e,t){function n(n){ma(t,n,(function(i){i=Fe(i),ha(e,i.target)||(i=function(e,t){return $e(e.dom,new da(e,t),!0)}(e,i),t.domHandlers[n].call(e,i))}),{capture:!0})}a.pointerEventsSupported?I(sa,n):a.touchEventsSupported||I(oa,n)}(e,n):va(n)}}function xa(e,t){this.domTarget=e,this.domHandlers=t,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function _a(e,t){De.call(this),this.dom=e,this.painterRoot=t,this._localHandlerScope=new xa(e,fa),aa&&(this._globalHandlerScope=new xa(document,ga)),this._pointerCapturing=!1,this._mayPointerCapture=null,function(e,t){var n=t.domHandlers;a.pointerEventsSupported?I(ra.pointer,(function(i){ma(t,i,(function(t){n[i].call(e,t)}))})):(a.touchEventsSupported&&I(ra.touch,(function(i){ma(t,i,(function(a){n[i].call(e,a),function(e){e.touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout((function(){e.touching=!1,e.touchTimer=null}),700)}(t)}))})),I(ra.mouse,(function(i){ma(t,i,(function(a){a=Fe(a),t.touching||n[i].call(e,a)}))})))}(this,this._localHandlerScope)}var ba=_a.prototype;ba.dispose=function(){va(this._localHandlerScope),aa&&va(this._globalHandlerScope)},ba.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},T(_a,De);var wa=!a.canvasSupported,Sa={canvas:ea},Ma={};function Ta(e,t){var n=new Ia(i(),e,t);return Ma[n.id]=n}function Ca(e,t){Sa[e]=t}var Ia=function(e,t,n){n=n||{},this.dom=t,this.id=e;var i=this,r=new Nn,o=n.renderer;if(wa){if(!Sa.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");o="vml"}else o&&Sa[o]||(o="canvas");var s=new Sa[o](t,r,n,e);this.storage=r,this.painter=s;var l=a.node||a.worker?null:new _a(s.getViewportRoot(),s.root);this.handler=new Qe(r,s,l,s.root),this.animation=new ta({stage:{update:E(this.flush,this)}}),this.animation.start(),this._needsRefresh;var u=r.delFromStorage,c=r.addToStorage;r.delFromStorage=function(e){u.call(r,e),e&&e.removeSelfFromZr(i)},r.addToStorage=function(e){c.call(r,e),e.addSelfToZr(i)}};Ia.prototype={constructor:Ia,getId:function(){return this.id},add:function(e){this.storage.addRoot(e),this._needsRefresh=!0},remove:function(e){this.storage.delRoot(e),this._needsRefresh=!0},configLayer:function(e,t){this.painter.configLayer&&this.painter.configLayer(e,t),this._needsRefresh=!0},setBackgroundColor:function(e){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),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 e;this._needsRefresh&&(e=!0,this.refreshImmediately()),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately()),e&&this.trigger("rendered")},addHover:function(e,t){if(this.painter.addHover){var n=this.painter.addHover(e,t);return this.refreshHover(),n}},removeHover:function(e){this.painter.removeHover&&(this.painter.removeHover(e),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(e){e=e||{},this.painter.resize(e.width,e.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(e,t){return this.painter.pathToImage(e,t)},setCursorStyle:function(e){this.handler.setCursorStyle(e)},findHover:function(e,t){return this.handler.findHover(e,t)},on:function(e,t,n){this.handler.on(e,t,n)},off:function(e,t){this.handler.off(e,t)},trigger:function(e,t){this.handler.trigger(e,t)},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(e){delete Ma[e]}(this.id)}};var Aa=(Object.freeze||Object)({version:"4.3.2",init:Ta,dispose:function(e){if(e)e.dispose();else{for(var t in Ma)Ma.hasOwnProperty(t)&&Ma[t].dispose();Ma={}}return this},getInstance:function(e){return Ma[e]},registerPainter:Ca}),Da=I,ka=R,La=z,Ea="series\0";function Pa(e){return e instanceof Array?e:null==e?[]:[e]}function za(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var i=0,a=n.length;i<a;i++){var r=n[i];!e.emphasis[t].hasOwnProperty(r)&&e[t].hasOwnProperty(r)&&(e.emphasis[t][r]=e[t][r])}}}var Oa=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function Na(e){return!ka(e)||La(e)||e instanceof Date?e:e.value}function Ra(e,t){t=(t||[]).slice();var n=A(e||[],(function(e,t){return{exist:e}}));return Da(t,(function(e,i){if(ka(e)){for(var a=0;a<n.length;a++)if(!n[a].option&&null!=e.id&&n[a].exist.id===e.id+"")return n[a].option=e,void(t[i]=null);for(a=0;a<n.length;a++){var r=n[a].exist;if(!(n[a].option||null!=r.id&&null!=e.id||null==e.name||Ga(e)||Ga(r)||r.name!==e.name+""))return n[a].option=e,void(t[i]=null)}}})),Da(t,(function(e,t){if(ka(e)){for(var i=0;i<n.length;i++){var a=n[i].exist;if(!n[i].option&&!Ga(a)&&null==e.id){n[i].option=e;break}}i>=n.length&&n.push({option:e})}})),n}function Ba(e){var t=Q();Da(e,(function(e,n){var i=e.exist;i&&t.set(i.id,e)})),Da(e,(function(e,n){var i=e.option;U(!i||null==i.id||!t.get(i.id)||t.get(i.id)===e,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&t.set(i.id,e),e.keyInfo||(e.keyInfo={})})),Da(e,(function(e,n){var i=e.exist,a=e.option,r=e.keyInfo;if(ka(a)){if(r.name=null!=a.name?a.name+"":i?i.name:Ea+n,i)r.id=i.id;else if(null!=a.id)r.id=a.id+"";else for(var o=0;r.id="\0"+r.name+"\0"+o++,t.get(r.id););t.set(r.id,e)}}))}function Va(e){var t=e.name;return!(!t||!t.indexOf(Ea))}function Ga(e){return ka(e)&&e.id&&0===(e.id+"").indexOf("\0_ec_\0")}function Wa(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?z(t.dataIndex)?A(t.dataIndex,(function(t){return e.indexOfRawIndex(t)})):e.indexOfRawIndex(t.dataIndex):null!=t.name?z(t.name)?A(t.name,(function(t){return e.indexOfName(t)})):e.indexOfName(t.name):void 0}function Ha(){var e="__\0ec_inner_"+Fa+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}}var Fa=0;function $a(e,t,n){if(N(t)){var i={};i[t+"Index"]=0,t=i}var a=n&&n.defaultMainType;!a||Xa(t,a+"Index")||Xa(t,a+"Id")||Xa(t,a+"Name")||(t[a+"Index"]=0);var r={};return Da(t,(function(i,a){if(i=t[a],"dataIndex"!==a&&"dataIndexInside"!==a){var o=a.match(/^(\w+)(Index|Id|Name)$/)||[],s=o[1],l=(o[2]||"").toLowerCase();if(!(!s||!l||null==i||"index"===l&&"none"===i||n&&n.includeMainTypes&&S(n.includeMainTypes,s)<0)){var u={mainType:s};"index"===l&&"all"===i||(u[l]=i);var c=e.queryComponents(u);r[s+"Models"]=c,r[s+"Model"]=c[0]}}else r[a]=i})),r}function Xa(e,t){return e&&e.hasOwnProperty(t)}function Ya(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function Ua(e){return"auto"===e?a.domSupported?"html":"richText":e||"html"}function ja(e,t){var n=Q(),i=[];return I(e,(function(e){var a=t(e);(n.get(a)||(i.push(a),n.set(a,[]))).push(e)})),{keys:i,buckets:n}}var Za="___EC__COMPONENT__CONTAINER___";function qa(e){var t={main:"",sub:""};return e&&(e=e.split("."),t.main=e[0]||"",t.sub=e[1]||""),t}function Ka(e){(e.$constructor=e).extend=function(e){function t(){e.$constructor?e.$constructor.apply(this,arguments):n.apply(this,arguments)}var n=this;return x(t.prototype,e),t.extend=this.extend,t.superCall=er,t.superApply=tr,M(t,this),t.superClass=n,t}}var Ja=0;function Qa(e){var t=["__\0is_clz",Ja++,Math.random().toFixed(3)].join("_");e.prototype[t]=!0,e.isInstance=function(e){return!(!e||!e[t])}}function er(e,t){var n=X(arguments,2);return this.superClass.prototype[t].apply(e,n)}function tr(e,t,n){return this.superClass.prototype[t].apply(e,n)}function nr(e,t){t=t||{};var n={};if(e.registerClass=function(e,t){return t&&(function(e){U(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),'componentType "'+e+'" illegal')}(t),(t=qa(t)).sub?t.sub!==Za&&((function(e){var t=n[e.main];return t&&t[Za]||((t=n[e.main]={})[Za]=!0),t}(t))[t.sub]=e):n[t.main]=e),e},e.getClass=function(e,t,i){var a=n[e];if(a&&a[Za]&&(a=t?a[t]:null),i&&!a)throw new Error(t?"Component "+e+"."+(t||"")+" not exists. Load it first.":e+".type should be specified.");return a},e.getClassesByMainType=function(e){e=qa(e);var t=[],i=n[e.main];return i&&i[Za]?I(i,(function(e,n){n!==Za&&t.push(e)})):t.push(i),t},e.hasClass=function(e){return e=qa(e),!!n[e.main]},e.getAllClassMainTypes=function(){var e=[];return I(n,(function(t,n){e.push(n)})),e},e.hasSubTypes=function(e){e=qa(e);var t=n[e.main];return t&&t[Za]},e.parseClassType=qa,t.registerWhenExtend){var i=e.extend;i&&(e.extend=function(t){var n=i.call(this,t);return e.registerClass(n,t.type)})}return e}function ir(e){for(var t=0;t<e.length;t++)e[t][1]||(e[t][1]=e[t][0]);return function(t,n,i){for(var a={},r=0;r<e.length;r++){var o=e[r][1];if(!(n&&0<=S(n,o)||i&&S(i,o)<0)){var s=t.getShallow(o);null!=s&&(a[e[r][0]]=s)}}return a}}var ar=ir([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),rr={getLineStyle:function(e){var t=ar(this,e);return t.lineDash=this.getLineDash(t.lineWidth),t},getLineDash:function(e){null==e&&(e=1);var t=this.get("type"),n=Math.max(e,2),i=4*e;return"solid"!==t&&null!=t&&("dashed"===t?[i,i]:[n,n])}},or=ir([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),sr={getAreaStyle:function(e,t){return or(this,e,t)}},lr=Math.pow,ur=Math.sqrt,cr=ur(3),hr=ae(),dr=ae(),pr=ae();function fr(e){return-1e-8<e&&e<1e-8}function gr(e){return 1e-8<e||e<-1e-8}function mr(e,t,n,i,a){var r=1-a;return r*r*(r*e+3*a*t)+a*a*(a*i+3*r*n)}function vr(e,t,n,i,a){var r=1-a;return 3*(((t-e)*r+2*(n-t)*a)*r+(i-n)*a*a)}function yr(e,t,n,i,a){var r=6*n-12*t+6*e,o=9*t+3*i-3*e-9*n,s=3*t-3*e,l=0;if(fr(o))gr(r)&&0<=(c=-s/r)&&c<=1&&(a[l++]=c);else{var u=r*r-4*o*s;if(fr(u))a[0]=-r/(2*o);else if(0<u){var c,h=ur(u),d=(-r-h)/(2*o);0<=(c=(-r+h)/(2*o))&&c<=1&&(a[l++]=c),0<=d&&d<=1&&(a[l++]=d)}}return l}function xr(e,t,n,i,a,r){var o=(t-e)*a+e,s=(n-t)*a+t,l=(i-n)*a+n,u=(s-o)*a+o,c=(l-s)*a+s,h=(c-u)*a+u;r[0]=e,r[1]=o,r[2]=u,r[3]=h,r[4]=h,r[5]=c,r[6]=l,r[7]=i}function _r(e,t,n,i){var a=1-i;return a*(a*e+2*i*t)+i*i*n}function br(e,t,n,i){return 2*((1-i)*(t-e)+i*(n-t))}function wr(e,t,n){var i=e+n-2*t;return 0==i?.5:(e-t)/i}function Sr(e,t,n,i,a){var r=(t-e)*i+e,o=(n-t)*i+t,s=(o-r)*i+r;a[0]=e,a[1]=r,a[2]=s,a[3]=s,a[4]=o,a[5]=n}var Mr=Math.min,Tr=Math.max,Cr=Math.sin,Ir=Math.cos,Ar=2*Math.PI,Dr=ae(),kr=ae(),Lr=ae();function Er(e,t,n){if(0!==e.length){var i,a=e[0],r=a[0],o=a[0],s=a[1],l=a[1];for(i=1;i<e.length;i++)a=e[i],r=Mr(r,a[0]),o=Tr(o,a[0]),s=Mr(s,a[1]),l=Tr(l,a[1]);t[0]=r,t[1]=s,n[0]=o,n[1]=l}}function Pr(e,t,n,i,a,r){a[0]=Mr(e,n),a[1]=Mr(t,i),r[0]=Tr(e,n),r[1]=Tr(t,i)}var zr=[],Or=[];function Nr(e,t,n,i,a,r,o,s,l,u){var c,h=yr,d=mr,p=h(e,n,a,o,zr);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,c=0;c<p;c++){var f=d(e,n,a,o,zr[c]);l[0]=Mr(f,l[0]),u[0]=Tr(f,u[0])}for(p=h(t,i,r,s,Or),c=0;c<p;c++){var g=d(t,i,r,s,Or[c]);l[1]=Mr(g,l[1]),u[1]=Tr(g,u[1])}l[0]=Mr(e,l[0]),u[0]=Tr(e,u[0]),l[0]=Mr(o,l[0]),u[0]=Tr(o,u[0]),l[1]=Mr(t,l[1]),u[1]=Tr(t,u[1]),l[1]=Mr(s,l[1]),u[1]=Tr(s,u[1])}function Rr(e,t,n,i,a,r,o,s,l){var u=Se,c=Me,h=Math.abs(a-r);if(h%Ar<1e-4&&1e-4<h)return s[0]=e-n,s[1]=t-i,l[0]=e+n,void(l[1]=t+i);if(Dr[0]=Ir(a)*n+e,Dr[1]=Cr(a)*i+t,kr[0]=Ir(r)*n+e,kr[1]=Cr(r)*i+t,u(s,Dr,kr),c(l,Dr,kr),(a%=Ar)<0&&(a+=Ar),(r%=Ar)<0&&(r+=Ar),r<a&&!o?r+=Ar:a<r&&o&&(a+=Ar),o){var d=r;r=a,a=d}for(var p=0;p<r;p+=Math.PI/2)a<p&&(Lr[0]=Ir(p)*n+e,Lr[1]=Cr(p)*i+t,u(s,Lr,s),c(l,Lr,l))}var Br={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Vr=[],Gr=[],Wr=[],Hr=[],Fr=Math.min,$r=Math.max,Xr=Math.cos,Yr=Math.sin,Ur=Math.sqrt,jr=Math.abs,Zr="undefined"!=typeof Float32Array,qr=function(e){this._saveData=!e,this._saveData&&(this.data=[]),this._ctx=null};function Kr(e,t,n,i,a,r,o){if(0===a)return!1;var s,l=a;if(t+l<o&&i+l<o||o<t-l&&o<i-l||e+l<r&&n+l<r||r<e-l&&r<n-l)return!1;if(e===n)return Math.abs(r-e)<=l/2;var u=(s=(t-i)/(e-n))*r-o+(e*i-n*t)/(e-n);return u*u/(s*s+1)<=l/2*l/2}function Jr(e,t,n,i,a,r,o,s,l,u,c){if(0===l)return!1;var h=l;return!(t+h<c&&i+h<c&&r+h<c&&s+h<c||c<t-h&&c<i-h&&c<r-h&&c<s-h||e+h<u&&n+h<u&&a+h<u&&o+h<u||u<e-h&&u<n-h&&u<a-h&&u<o-h)&&function(e,t,n,i,a,r,o,s,l,u,c){var h,d,p,f,g,m=.005,v=1/0;hr[0]=l,hr[1]=u;for(var y=0;y<1;y+=.05)dr[0]=mr(e,n,a,o,y),dr[1]=mr(t,i,r,s,y),(f=_e(hr,dr))<v&&(h=y,v=f);v=1/0;for(var x=0;x<32&&!(m<1e-4);x++)d=h-m,p=h+m,dr[0]=mr(e,n,a,o,d),dr[1]=mr(t,i,r,s,d),f=_e(dr,hr),0<=d&&f<v?(h=d,v=f):(pr[0]=mr(e,n,a,o,p),pr[1]=mr(t,i,r,s,p),g=_e(pr,hr),p<=1&&g<v?(h=p,v=g):m*=.5);return ur(v)}(e,t,n,i,a,r,o,s,u,c)<=h/2}function Qr(e,t,n,i,a,r,o,s,l){if(0===o)return!1;var u=o;return!(t+u<l&&i+u<l&&r+u<l||l<t-u&&l<i-u&&l<r-u||e+u<s&&n+u<s&&a+u<s||s<e-u&&s<n-u&&s<a-u)&&function(e,t,n,i,a,r,o,s,l){var u,c=.005,h=1/0;hr[0]=o,hr[1]=s;for(var d=0;d<1;d+=.05)dr[0]=_r(e,n,a,d),dr[1]=_r(t,i,r,d),(m=_e(hr,dr))<h&&(u=d,h=m);h=1/0;for(var p=0;p<32&&!(c<1e-4);p++){var f=u-c,g=u+c;dr[0]=_r(e,n,a,f),dr[1]=_r(t,i,r,f);var m=_e(dr,hr);if(0<=f&&m<h)u=f,h=m;else{pr[0]=_r(e,n,a,g),pr[1]=_r(t,i,r,g);var v=_e(pr,hr);g<=1&&v<h?(u=g,h=v):c*=.5}}return ur(h)}(e,t,n,i,a,r,s,l)<=u/2}qr.prototype={constructor:qr,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(e,t,n){n=n||0,this._ux=jr(n/fn/e)||0,this._uy=jr(n/fn/t)||0},getContext:function(){return this._ctx},beginPath:function(e){return(this._ctx=e)&&e.beginPath(),e&&(this.dpr=e.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(e,t){return this.addData(Br.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},lineTo:function(e,t){var n=jr(e-this._xi)>this._ux||jr(t-this._yi)>this._uy||this._len<5;return this.addData(Br.L,e,t),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(e,t):this._ctx.lineTo(e,t)),n&&(this._xi=e,this._yi=t),this},bezierCurveTo:function(e,t,n,i,a,r){return this.addData(Br.C,e,t,n,i,a,r),this._ctx&&(this._needsDash()?this._dashedBezierTo(e,t,n,i,a,r):this._ctx.bezierCurveTo(e,t,n,i,a,r)),this._xi=a,this._yi=r,this},quadraticCurveTo:function(e,t,n,i){return this.addData(Br.Q,e,t,n,i),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(e,t,n,i):this._ctx.quadraticCurveTo(e,t,n,i)),this._xi=n,this._yi=i,this},arc:function(e,t,n,i,a,r){return this.addData(Br.A,e,t,n,n,i,a-i,0,r?0:1),this._ctx&&this._ctx.arc(e,t,n,i,a,r),this._xi=Xr(a)*n+e,this._yi=Yr(a)*n+t,this},arcTo:function(e,t,n,i,a){return this._ctx&&this._ctx.arcTo(e,t,n,i,a),this},rect:function(e,t,n,i){return this._ctx&&this._ctx.rect(e,t,n,i),this.addData(Br.R,e,t,n,i),this},closePath:function(){this.addData(Br.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&(this._needsDash()&&this._dashedLineTo(t,n),e.closePath()),this._xi=t,this._yi=n,this},fill:function(e){e&&e.fill(),this.toStatic()},stroke:function(e){e&&e.stroke(),this.toStatic()},setLineDash:function(e){if(e instanceof Array){this._lineDash=e;for(var t=this._dashIdx=0,n=0;n<e.length;n++)t+=e[n];this._dashSum=t}return this},setLineDashOffset:function(e){return this._dashOffset=e,this},len:function(){return this._len},setData:function(e){var t=e.length;this.data&&this.data.length===t||!Zr||(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t},appendPath:function(e){e instanceof Array||(e=[e]);for(var t=e.length,n=0,i=this._len,a=0;a<t;a++)n+=e[a].len();for(Zr&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n)),a=0;a<t;a++)for(var r=e[a].data,o=0;o<r.length;o++)this.data[i++]=r[o];this._len=i},addData:function(e){if(this._saveData){var t=this.data;this._len+arguments.length>t.length&&(this._expandData(),t=this.data);for(var n=0;n<arguments.length;n++)t[this._len++]=arguments[n];this._prevCmd=e}},_expandData:function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(e,t){var n,i,a=this._dashSum,r=this._dashOffset,o=this._lineDash,s=this._ctx,l=this._xi,u=this._yi,c=e-l,h=t-u,d=Ur(c*c+h*h),p=l,f=u,g=o.length;for(r<0&&(r=a+r),p-=(r%=a)*(c/=d),f-=r*(h/=d);0<c&&p<=e||c<0&&e<=p||0===c&&(0<h&&f<=t||h<0&&t<=f);)p+=c*(n=o[i=this._dashIdx]),f+=h*n,this._dashIdx=(i+1)%g,0<c&&p<l||c<0&&l<p||0<h&&f<u||h<0&&u<f||s[i%2?"moveTo":"lineTo"](0<=c?Fr(p,e):$r(p,e),0<=h?Fr(f,t):$r(f,t));c=p-e,h=f-t,this._dashOffset=-Ur(c*c+h*h)},_dashedBezierTo:function(e,t,n,i,a,r){var o,s,l,u,c,h=this._dashSum,d=this._dashOffset,p=this._lineDash,f=this._ctx,g=this._xi,m=this._yi,v=mr,y=0,x=this._dashIdx,_=p.length,b=0;for(d<0&&(d=h+d),d%=h,o=0;o<1;o+=.1)s=v(g,e,n,a,o+.1)-v(g,e,n,a,o),l=v(m,t,i,r,o+.1)-v(m,t,i,r,o),y+=Ur(s*s+l*l);for(;x<_&&!(d<(b+=p[x]));x++);for(o=(b-d)/y;o<=1;)u=v(g,e,n,a,o),c=v(m,t,i,r,o),x%2?f.moveTo(u,c):f.lineTo(u,c),o+=p[x]/y,x=(x+1)%_;x%2!=0&&f.lineTo(a,r),s=a-u,l=r-c,this._dashOffset=-Ur(s*s+l*l)},_dashedQuadraticTo:function(e,t,n,i){var a=n,r=i;n=(n+2*e)/3,i=(i+2*t)/3,e=(this._xi+2*e)/3,t=(this._yi+2*t)/3,this._dashedBezierTo(e,t,n,i,a,r)},toStatic:function(){var e=this.data;e instanceof Array&&(e.length=this._len,Zr&&(this.data=new Float32Array(e)))},getBoundingRect:function(){Vr[0]=Vr[1]=Wr[0]=Wr[1]=Number.MAX_VALUE,Gr[0]=Gr[1]=Hr[0]=Hr[1]=-Number.MAX_VALUE;for(var e,t,n,i,a,r,o,s,l,u,c,h,d,p,f=this.data,g=0,m=0,v=0,y=0,x=0;x<f.length;){var _=f[x++];switch(1===x&&(v=g=f[x],y=m=f[x+1]),_){case Br.M:g=v=f[x++],m=y=f[x++],Wr[0]=v,Wr[1]=y,Hr[0]=v,Hr[1]=y;break;case Br.L:Pr(g,m,f[x],f[x+1],Wr,Hr),g=f[x++],m=f[x++];break;case Br.C:Nr(g,m,f[x++],f[x++],f[x++],f[x++],f[x],f[x+1],Wr,Hr),g=f[x++],m=f[x++];break;case Br.Q:e=g,t=m,n=f[x++],i=f[x++],a=f[x],r=f[x+1],o=Wr,s=Hr,u=l=void 0,u=_r,c=Tr(Mr((l=wr)(e,n,a),1),0),h=Tr(Mr(l(t,i,r),1),0),d=u(e,n,a,c),p=u(t,i,r,h),o[0]=Mr(e,a,d),o[1]=Mr(t,r,p),s[0]=Tr(e,a,d),s[1]=Tr(t,r,p),g=f[x++],m=f[x++];break;case Br.A:var b=f[x++],w=f[x++],S=f[x++],M=f[x++],T=f[x++],C=f[x++]+T;x+=1;var I=1-f[x++];1===x&&(v=Xr(T)*S+b,y=Yr(T)*M+w),Rr(b,w,S,M,T,C,I,Wr,Hr),g=Xr(C)*S+b,m=Yr(C)*M+w;break;case Br.R:Pr(v=g=f[x++],y=m=f[x++],v+f[x++],y+f[x++],Wr,Hr);break;case Br.Z:g=v,m=y}Se(Vr,Vr,Wr),Me(Gr,Gr,Hr)}return 0===x&&(Vr[0]=Vr[1]=Gr[0]=Gr[1]=0),new In(Vr[0],Vr[1],Gr[0]-Vr[0],Gr[1]-Vr[1])},rebuildPath:function(e){for(var t,n,i,a,r,o,s=this.data,l=this._ux,u=this._uy,c=this._len,h=0;h<c;){var d=s[h++];switch(1===h&&(t=i=s[h],n=a=s[h+1]),d){case Br.M:t=i=s[h++],n=a=s[h++],e.moveTo(i,a);break;case Br.L:r=s[h++],o=s[h++],(jr(r-i)>l||jr(o-a)>u||h===c-1)&&(e.lineTo(r,o),i=r,a=o);break;case Br.C:e.bezierCurveTo(s[h++],s[h++],s[h++],s[h++],s[h++],s[h++]),i=s[h-2],a=s[h-1];break;case Br.Q:e.quadraticCurveTo(s[h++],s[h++],s[h++],s[h++]),i=s[h-2],a=s[h-1];break;case Br.A:var p=s[h++],f=s[h++],g=s[h++],m=s[h++],v=s[h++],y=s[h++],x=s[h++],_=s[h++],b=m<g?g:m,w=m<g?1:g/m,S=m<g?m/g:1,M=v+y;.001<Math.abs(g-m)?(e.translate(p,f),e.rotate(x),e.scale(w,S),e.arc(0,0,b,v,M,1-_),e.scale(1/w,1/S),e.rotate(-x),e.translate(-p,-f)):e.arc(p,f,b,v,M,1-_),1===h&&(t=Xr(v)*g+p,n=Yr(v)*m+f),i=Xr(M)*g+p,a=Yr(M)*m+f;break;case Br.R:t=i=s[h],n=a=s[h+1],e.rect(s[h++],s[h++],s[h++],s[h++]);break;case Br.Z:e.closePath(),i=t,a=n}}}},qr.CMD=Br;var eo=2*Math.PI;function to(e){return(e%=eo)<0&&(e+=eo),e}var no=2*Math.PI;function io(e,t,n,i,a,r,o,s,l){if(0===o)return!1;var u=o;s-=e,l-=t;var c=Math.sqrt(s*s+l*l);if(n<c-u||c+u<n)return!1;if(Math.abs(i-a)%no<1e-4)return!0;if(r){var h=i;i=to(a),a=to(h)}else i=to(i),a=to(a);a<i&&(a+=no);var d=Math.atan2(l,s);return d<0&&(d+=no),i<=d&&d<=a||i<=d+no&&d+no<=a}function ao(e,t,n,i,a,r){if(t<r&&i<r||r<t&&r<i)return 0;if(i===t)return 0;var o=i<t?1:-1,s=(r-t)/(i-t);1!=s&&0!=s||(o=i<t?.5:-.5);var l=s*(n-e)+e;return l===a?1/0:a<l?o:0}var ro=qr.CMD,oo=2*Math.PI,so=[-1,-1,-1],lo=[-1,-1];function uo(e,t,n,i,a,r,o,s,l,u){if(t<u&&i<u&&r<u&&s<u||u<t&&u<i&&u<r&&u<s)return 0;var c,h=function(e,t,n,i,a,r){var o=i+3*(t-n)-e,s=3*(n-2*t+e),l=3*(t-e),u=e-a,c=s*s-3*o*l,h=s*l-9*o*u,d=l*l-3*s*u,p=0;if(fr(c)&&fr(h))fr(s)?r[0]=0:0<=(M=-l/s)&&M<=1&&(r[p++]=M);else{var f=h*h-4*c*d;if(fr(f)){var g=h/c,m=-g/2;0<=(M=-s/o+g)&&M<=1&&(r[p++]=M),0<=m&&m<=1&&(r[p++]=m)}else if(0<f){var v=ur(f),y=c*s+1.5*o*(-h+v),x=c*s+1.5*o*(-h-v);0<=(M=(-s-((y=y<0?-lr(-y,1/3):lr(y,1/3))+(x=x<0?-lr(-x,1/3):lr(x,1/3))))/(3*o))&&M<=1&&(r[p++]=M)}else{var _=(2*c*s-3*o*h)/(2*ur(c*c*c)),b=Math.acos(_)/3,w=ur(c),S=Math.cos(b),M=(-s-2*w*S)/(3*o),T=(m=(-s+w*(S+cr*Math.sin(b)))/(3*o),(-s+w*(S-cr*Math.sin(b)))/(3*o));0<=M&&M<=1&&(r[p++]=M),0<=m&&m<=1&&(r[p++]=m),0<=T&&T<=1&&(r[p++]=T)}}return p}(t,i,r,s,u,so);if(0===h)return 0;for(var d,p,f=0,g=-1,m=0;m<h;m++){var v=so[m],y=0===v||1===v?.5:1;mr(e,n,a,o,v)<l||(g<0&&(g=yr(t,i,r,s,lo),lo[1]<lo[0]&&1<g&&(c=lo[0],lo[0]=lo[1],lo[1]=c),d=mr(t,i,r,s,lo[0]),1<g&&(p=mr(t,i,r,s,lo[1]))),2===g?v<lo[0]?f+=d<t?y:-y:v<lo[1]?f+=p<d?y:-y:f+=s<p?y:-y:v<lo[0]?f+=d<t?y:-y:f+=s<d?y:-y)}return f}function co(e,t,n,i,a,r,o,s){if(t<s&&i<s&&r<s||s<t&&s<i&&s<r)return 0;var l=function(e,t,n,i,a){var r=e-2*t+n,o=2*(t-e),s=e-i,l=0;if(fr(r))gr(o)&&0<=(c=-s/o)&&c<=1&&(a[l++]=c);else{var u=o*o-4*r*s;if(fr(u))0<=(c=-o/(2*r))&&c<=1&&(a[l++]=c);else if(0<u){var c,h=ur(u),d=(-o-h)/(2*r);0<=(c=(-o+h)/(2*r))&&c<=1&&(a[l++]=c),0<=d&&d<=1&&(a[l++]=d)}}return l}(t,i,r,s,so);if(0===l)return 0;var u=wr(t,i,r);if(0<=u&&u<=1){for(var c=0,h=_r(t,i,r,u),d=0;d<l;d++){var p=0===so[d]||1===so[d]?.5:1;_r(e,n,a,so[d])<o||(so[d]<u?c+=h<t?p:-p:c+=r<h?p:-p)}return c}return p=0===so[0]||1===so[0]?.5:1,_r(e,n,a,so[0])<o?0:r<t?p:-p}function ho(e,t,n,i,a,r,o,s){if(n<(s-=t)||s<-n)return 0;var l=Math.sqrt(n*n-s*s);so[0]=-l,so[1]=l;var u=Math.abs(i-a);if(u<1e-4)return 0;if(u%oo<1e-4){a=oo;var c=r?1:-1;return o>=so[i=0]+e&&o<=so[1]+e?c:0}r?(l=i,i=to(a),a=to(l)):(i=to(i),a=to(a)),a<i&&(a+=oo);for(var h=0,d=0;d<2;d++){var p=so[d];if(o<p+e){var f=Math.atan2(s,p);c=r?1:-1,f<0&&(f=oo+f),(i<=f&&f<=a||i<=f+oo&&f+oo<=a)&&(f>Math.PI/2&&f<1.5*Math.PI&&(c=-c),h+=c)}}return h}function po(e,t,n,i,a){for(var r=0,o=0,s=0,l=0,u=0,c=0;c<e.length;){var h=e[c++];switch(h===ro.M&&1<c&&(n||(r+=ao(o,s,l,u,i,a))),1===c&&(l=o=e[c],u=s=e[c+1]),h){case ro.M:o=l=e[c++],s=u=e[c++];break;case ro.L:if(n){if(Kr(o,s,e[c],e[c+1],t,i,a))return!0}else r+=ao(o,s,e[c],e[c+1],i,a)||0;o=e[c++],s=e[c++];break;case ro.C:if(n){if(Jr(o,s,e[c++],e[c++],e[c++],e[c++],e[c],e[c+1],t,i,a))return!0}else r+=uo(o,s,e[c++],e[c++],e[c++],e[c++],e[c],e[c+1],i,a)||0;o=e[c++],s=e[c++];break;case ro.Q:if(n){if(Qr(o,s,e[c++],e[c++],e[c],e[c+1],t,i,a))return!0}else r+=co(o,s,e[c++],e[c++],e[c],e[c+1],i,a)||0;o=e[c++],s=e[c++];break;case ro.A:var d=e[c++],p=e[c++],f=e[c++],g=e[c++],m=e[c++],v=e[c++];c+=1;var y=1-e[c++],x=Math.cos(m)*f+d,_=Math.sin(m)*g+p;1<c?r+=ao(o,s,x,_,i,a):(l=x,u=_);var b=(i-d)*g/f+d;if(n){if(io(d,p,g,m,m+v,y,t,b,a))return!0}else r+=ho(d,p,g,m,m+v,y,b,a);o=Math.cos(m+v)*f+d,s=Math.sin(m+v)*g+p;break;case ro.R:if(l=o=e[c++],u=s=e[c++],x=l+e[c++],_=u+e[c++],n){if(Kr(l,u,x,u,t,i,a)||Kr(x,u,x,_,t,i,a)||Kr(x,_,l,_,t,i,a)||Kr(l,_,l,u,t,i,a))return!0}else r+=ao(x,u,x,_,i,a),r+=ao(l,_,l,u,i,a);break;case ro.Z:if(n){if(Kr(o,s,l,u,t,i,a))return!0}else r+=ao(o,s,l,u,i,a);o=l,s=u}}return n||function(e,t){return Math.abs(e-t)<1e-4}(s,u)||(r+=ao(o,s,l,u,i,a)||0),0!==r}var fo=Zn.prototype.getCanvasPattern,go=Math.abs,mo=new qr(!0);function vo(e){ji.call(this,e),this.path=null}function yo(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}vo.prototype={constructor:vo,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(e,t){var n,i=this.style,a=this.path||mo,r=i.hasStroke(),o=i.hasFill(),s=i.fill,l=i.stroke,u=o&&!!s.colorStops,c=r&&!!l.colorStops,h=o&&!!s.image,d=r&&!!l.image;i.bind(e,this,t),this.setTransform(e),this.__dirty&&(u&&(n=n||this.getBoundingRect(),this._fillGradient=i.getGradient(e,s,n)),c&&(n=n||this.getBoundingRect(),this._strokeGradient=i.getGradient(e,l,n))),u?e.fillStyle=this._fillGradient:h&&(e.fillStyle=fo.call(s,e)),c?e.strokeStyle=this._strokeGradient:d&&(e.strokeStyle=fo.call(l,e));var p=i.lineDash,f=i.lineDashOffset,g=!!e.setLineDash,m=this.getGlobalScale();if(a.setScale(m[0],m[1],this.segmentIgnoreThreshold),this.__dirtyPath||p&&!g&&r?(a.beginPath(e),p&&!g&&(a.setLineDash(p),a.setLineDashOffset(f)),this.buildPath(a,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(e.beginPath(),this.path.rebuildPath(e)),o)if(null!=i.fillOpacity){var v=e.globalAlpha;e.globalAlpha=i.fillOpacity*i.opacity,a.fill(e),e.globalAlpha=v}else a.fill(e);p&&g&&(e.setLineDash(p),e.lineDashOffset=f),r&&(null!=i.strokeOpacity?(v=e.globalAlpha,e.globalAlpha=i.strokeOpacity*i.opacity,a.stroke(e),e.globalAlpha=v):a.stroke(e)),p&&g&&e.setLineDash([]),null!=i.text&&(this.restoreTransform(e),this.drawRectText(e,this.getBoundingRect()))},buildPath:function(e,t,n){},createPathProxy:function(){this.path=new qr},getBoundingRect:function(){var e=this._rect,t=this.style,n=!e;if(n){var i=this.path;i=i||(this.path=new qr),this.__dirtyPath&&(i.beginPath(),this.buildPath(i,this.shape,!1)),e=i.getBoundingRect()}if(this._rect=e,t.hasStroke()){var a=this._rectWithStroke||(this._rectWithStroke=e.clone());if(this.__dirty||n){a.copy(e);var r=t.lineWidth,o=t.strokeNoScale?this.getLineScale():1;t.hasFill()||(r=Math.max(r,this.strokeContainThreshold||4)),1e-10<o&&(a.width+=r/o,a.height+=r/o,a.x-=r/o/2,a.y-=r/o/2)}return a}return e},contain:function(e,t){var n=this.transformCoordToLocal(e,t),i=this.getBoundingRect(),a=this.style;if(e=n[0],t=n[1],i.contain(e,t)){var r=this.path.data;if(a.hasStroke()){var o=a.lineWidth,s=a.strokeNoScale?this.getLineScale():1;if(1e-10<s&&(a.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),function(e,t,n,i){return po(e,t,!0,n,i)}(r,o/s,e,t)))return!0}if(a.hasFill())return function(e,t,n){return po(e,0,!1,t,n)}(r,e,t)}return!1},dirty:function(e){null==e&&(e=!0),e&&(this.__dirtyPath=e,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(e){return this.animate("shape",e)},attrKV:function(e,t){"shape"===e?(this.setShape(t),this.__dirtyPath=!0,this._rect=null):ji.prototype.attrKV.call(this,e,t)},setShape:function(e,t){var n=this.shape;if(n){if(R(e))for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);else n[e]=t;this.dirty(!0)}return this},getLineScale:function(){var e=this.transform;return e&&1e-10<go(e[0]-1)&&1e-10<go(e[3]-1)?Math.sqrt(go(e[0]*e[3]-e[2]*e[1])):1}},vo.extend=function(e){function t(t){vo.call(this,t),e.style&&this.style.extendFrom(e.style,!1);var n=e.shape;if(n){this.shape=this.shape||{};var i=this.shape;for(var a in n)!i.hasOwnProperty(a)&&n.hasOwnProperty(a)&&(i[a]=n[a])}e.init&&e.init.call(this,t)}for(var n in M(t,vo),e)"style"!==n&&"shape"!==n&&(t.prototype[n]=e[n]);return t},M(vo,ji);var xo=qr.CMD,_o=[[],[],[]],bo=Math.sqrt,wo=Math.atan2,So=Math.sqrt,Mo=Math.sin,To=Math.cos,Co=Math.PI,Io=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(yo(e)*yo(t))},Ao=function(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(Io(e,t))};function Do(e,t,n,i,a,r,o,s,l,u,c){var h=l*(Co/180),d=To(h)*(e-n)/2+Mo(h)*(t-i)/2,p=-1*Mo(h)*(e-n)/2+To(h)*(t-i)/2,f=d*d/(o*o)+p*p/(s*s);1<f&&(o*=So(f),s*=So(f));var g=(a===r?-1:1)*So((o*o*(s*s)-o*o*(p*p)-s*s*(d*d))/(o*o*(p*p)+s*s*(d*d)))||0,m=g*o*p/s,v=g*-s*d/o,y=(e+n)/2+To(h)*m-Mo(h)*v,x=(t+i)/2+Mo(h)*m+To(h)*v,_=Ao([1,0],[(d-m)/o,(p-v)/s]),b=[(d-m)/o,(p-v)/s],w=[(-1*d-m)/o,(-1*p-v)/s],S=Ao(b,w);Io(b,w)<=-1&&(S=Co),1<=Io(b,w)&&(S=0),0===r&&0<S&&(S-=2*Co),1===r&&S<0&&(S+=2*Co),c.addData(u,y,x,o,s,_,S,h,r)}var ko=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Lo=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Eo(e,t){var n=function(e){if(!e)return new qr;for(var t,n=0,i=0,a=n,r=i,o=new qr,s=qr.CMD,l=e.match(ko),u=0;u<l.length;u++){for(var c,h=l[u],d=h.charAt(0),p=h.match(Lo)||[],f=p.length,g=0;g<f;g++)p[g]=parseFloat(p[g]);for(var m=0;m<f;){var v,y,x,_,b,w,S,M=n,T=i;switch(d){case"l":n+=p[m++],i+=p[m++],c=s.L,o.addData(c,n,i);break;case"L":n=p[m++],i=p[m++],c=s.L,o.addData(c,n,i);break;case"m":n+=p[m++],i+=p[m++],c=s.M,o.addData(c,n,i),a=n,r=i,d="l";break;case"M":n=p[m++],i=p[m++],c=s.M,o.addData(c,n,i),a=n,r=i,d="L";break;case"h":n+=p[m++],c=s.L,o.addData(c,n,i);break;case"H":n=p[m++],c=s.L,o.addData(c,n,i);break;case"v":i+=p[m++],c=s.L,o.addData(c,n,i);break;case"V":i=p[m++],c=s.L,o.addData(c,n,i);break;case"C":c=s.C,o.addData(c,p[m++],p[m++],p[m++],p[m++],p[m++],p[m++]),n=p[m-2],i=p[m-1];break;case"c":c=s.C,o.addData(c,p[m++]+n,p[m++]+i,p[m++]+n,p[m++]+i,p[m++]+n,p[m++]+i),n+=p[m-2],i+=p[m-1];break;case"S":v=n,y=i;var C=o.len(),I=o.data;t===s.C&&(v+=n-I[C-4],y+=i-I[C-3]),c=s.C,M=p[m++],T=p[m++],n=p[m++],i=p[m++],o.addData(c,v,y,M,T,n,i);break;case"s":v=n,y=i,C=o.len(),I=o.data,t===s.C&&(v+=n-I[C-4],y+=i-I[C-3]),c=s.C,M=n+p[m++],T=i+p[m++],n+=p[m++],i+=p[m++],o.addData(c,v,y,M,T,n,i);break;case"Q":M=p[m++],T=p[m++],n=p[m++],i=p[m++],c=s.Q,o.addData(c,M,T,n,i);break;case"q":M=p[m++]+n,T=p[m++]+i,n+=p[m++],i+=p[m++],c=s.Q,o.addData(c,M,T,n,i);break;case"T":v=n,y=i,C=o.len(),I=o.data,t===s.Q&&(v+=n-I[C-4],y+=i-I[C-3]),n=p[m++],i=p[m++],c=s.Q,o.addData(c,v,y,n,i);break;case"t":v=n,y=i,C=o.len(),I=o.data,t===s.Q&&(v+=n-I[C-4],y+=i-I[C-3]),n+=p[m++],i+=p[m++],c=s.Q,o.addData(c,v,y,n,i);break;case"A":x=p[m++],_=p[m++],b=p[m++],w=p[m++],S=p[m++],Do(M=n,T=i,n=p[m++],i=p[m++],w,S,x,_,b,c=s.A,o);break;case"a":x=p[m++],_=p[m++],b=p[m++],w=p[m++],S=p[m++],Do(M=n,T=i,n+=p[m++],i+=p[m++],w,S,x,_,b,c=s.A,o)}}"z"!==d&&"Z"!==d||(c=s.Z,o.addData(c),n=a,i=r),t=c}return o.toStatic(),o}(e);return(t=t||{}).buildPath=function(e){if(e.setData)e.setData(n.data),(t=e.getContext())&&e.rebuildPath(t);else{var t=e;n.rebuildPath(t)}},t.applyTransform=function(e){(function(e,t){var n,i,a,r,o,s=e.data,l=xo.M,u=xo.C,c=xo.L,h=xo.R,d=xo.A,p=xo.Q;for(r=a=0;a<s.length;){switch(n=s[a++],r=a,i=0,n){case l:case c:i=1;break;case u:i=3;break;case p:i=2;break;case d:var f=t[4],g=t[5],m=bo(t[0]*t[0]+t[1]*t[1]),v=bo(t[2]*t[2]+t[3]*t[3]),y=wo(-t[1]/v,t[0]/m);s[a]*=m,s[a++]+=f,s[a]*=v,s[a++]+=g,s[a++]*=m,s[a++]*=v,s[a++]+=y,s[a++]+=y,r=a+=2;break;case h:x[0]=s[a++],x[1]=s[a++],we(x,x,t),s[r++]=x[0],s[r++]=x[1],x[0]+=s[a++],x[1]+=s[a++],we(x,x,t),s[r++]=x[0],s[r++]=x[1]}for(o=0;o<i;o++){var x;(x=_o[o])[0]=s[a++],x[1]=s[a++],we(x,x,t),s[r++]=x[0],s[r++]=x[1]}}})(n,e),this.dirty(!0)},t}function Po(e,t){return new vo(Eo(e,t))}var zo=function(e){ji.call(this,e)};function Oo(e){return a.browser.ie&&11<=a.browser.version?function(){var t,n=this.__clipPaths,i=this.style;if(n)for(var a=0;a<n.length;a++){var r=n[a],o=r&&r.shape,s=r&&r.type;if(o&&("sector"===s&&o.startAngle===o.endAngle||"rect"===s&&(!o.width||!o.height))){for(var l=0;l<Ro.length;l++)Ro[l][2]=i[Ro[l][0]],i[Ro[l][0]]=Ro[l][1];t=!0;break}}if(e.apply(this,arguments),t)for(l=0;l<Ro.length;l++)i[Ro[l][0]]=Ro[l][2]}:e}zo.prototype={constructor:zo,type:"text",brush:function(e,t){var n=this.style;this.__dirty&&Li(n),n.fill=n.stroke=n.shadowBlur=n.shadowColor=n.shadowOffsetX=n.shadowOffsetY=null;var i=n.text;null!=i&&(i+=""),Xi(i,n)?(this.setTransform(e),Pi(this,e,i,n,null,t),this.restoreTransform(e)):e.__attrCachedBy=Vn},getBoundingRect:function(){var e=this.style;if(this.__dirty&&Li(e),!this._rect){var t=e.text;null!=t?t+="":t="";var n=hi(e.text+"",e.font,e.textAlign,e.textVerticalAlign,e.textPadding,e.textLineHeight,e.rich);if(n.x+=e.x||0,n.y+=e.y||0,Wi(e.textStroke,e.textStrokeWidth)){var i=e.textStrokeWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect}},M(zo,ji);var No=vo.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(e,t,n){n&&e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,2*Math.PI,!0)}}),Ro=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],Bo=vo.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:Oo(vo.prototype.brush),buildPath:function(e,t){var n=t.cx,i=t.cy,a=Math.max(t.r0||0,0),r=Math.max(t.r,0),o=t.startAngle,s=t.endAngle,l=t.clockwise,u=Math.cos(o),c=Math.sin(o);e.moveTo(u*a+n,c*a+i),e.lineTo(u*r+n,c*r+i),e.arc(n,i,r,o,s,!l),e.lineTo(Math.cos(s)*a+n,Math.sin(s)*a+i),0!==a&&e.arc(n,i,a,s,o,l),e.closePath()}}),Vo=vo.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(e,t){var n=t.cx,i=t.cy,a=2*Math.PI;e.moveTo(n+t.r,i),e.arc(n,i,t.r,0,a,!1),e.moveTo(n+t.r0,i),e.arc(n,i,t.r0,0,a,!0)}});function Go(e,t,n,i,a,r,o){var s=.5*(n-e),l=.5*(i-t);return(2*(t-n)+s+l)*o+(-3*(t-n)-2*s-l)*r+s*a+t}function Wo(e,t,n){var i=t.points,a=t.smooth;if(i&&2<=i.length){if(a&&"spline"!==a){var r=function(e,t,n,i){var a,r,o,s,l=[],u=[],c=[],h=[];if(i){o=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,p=e.length;d<p;d++)Se(o,o,e[d]),Me(s,s,e[d]);Se(o,o,i[0]),Me(s,s,i[1])}for(d=0,p=e.length;d<p;d++){var f=e[d];if(n)a=e[d?d-1:p-1],r=e[(d+1)%p];else{if(0===d||d===p-1){l.push(oe(e[d]));continue}a=e[d-1],r=e[d+1]}ce(u,r,a),ge(u,u,t);var g=ve(f,a),m=ve(f,r),v=g+m;0!==v&&(g/=v,m/=v),ge(c,u,-g),ge(h,u,m);var y=le([],f,c),x=le([],f,h);i&&(Me(y,y,o),Se(y,y,s),Me(x,x,o),Se(x,x,s)),l.push(y),l.push(x)}return n&&l.push(l.shift()),l}(i,a,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var l=r[2*s],u=r[2*s+1],c=i[(s+1)%o];e.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{"spline"===a&&(i=function(e,t){for(var n=e.length,i=[],a=0,r=1;r<n;r++)a+=ve(e[r-1],e[r]);var o=a/2;for(o=o<n?n:o,r=0;r<o;r++){var s,l,u,c=r/(o-1)*(t?n:n-1),h=Math.floor(c),d=c-h,p=e[h%n];u=t?(s=e[(h-1+n)%n],l=e[(h+1)%n],e[(h+2)%n]):(s=e[0===h?h:h-1],l=e[n-2<h?n-1:h+1],e[n-3<h?n-1:h+2]);var f=d*d,g=d*f;i.push([Go(s[0],p[0],l[0],u[0],d,f,g),Go(s[1],p[1],l[1],u[1],d,f,g)])}return i}(i,n)),e.moveTo(i[0][0],i[0][1]),s=1;for(var h=i.length;s<h;s++)e.lineTo(i[s][0],i[s][1])}n&&e.closePath()}}var Ho=vo.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(e,t){Wo(e,t,!0)}}),Fo=vo.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(e,t){Wo(e,t,!1)}}),$o=Math.round;function Xo(e,t,n){if(t){var i=t.x1,a=t.x2,r=t.y1,o=t.y2;e.x1=i,e.x2=a,e.y1=r,e.y2=o;var s=n&&n.lineWidth;s&&($o(2*i)===$o(2*a)&&(e.x1=e.x2=Uo(i,s,!0)),$o(2*r)===$o(2*o)&&(e.y1=e.y2=Uo(r,s,!0)))}}function Yo(e,t,n){if(t){var i=t.x,a=t.y,r=t.width,o=t.height;e.x=i,e.y=a,e.width=r,e.height=o;var s=n&&n.lineWidth;s&&(e.x=Uo(i,s,!0),e.y=Uo(a,s,!0),e.width=Math.max(Uo(i+r,s,!1)-e.x,0===r?0:1),e.height=Math.max(Uo(a+o,s,!1)-e.y,0===o?0:1))}}function Uo(e,t,n){if(!t)return e;var i=$o(2*e);return(i+$o(t))%2==0?i/2:(i+(n?1:-1))/2}var jo={},Zo=vo.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(e,t){var n,i,a,r;this.subPixelOptimize?(Yo(jo,t,this.style),n=jo.x,i=jo.y,a=jo.width,r=jo.height,jo.r=t.r,t=jo):(n=t.x,i=t.y,a=t.width,r=t.height),t.r?Mi(e,t):e.rect(n,i,a,r),e.closePath()}}),qo={},Ko=vo.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(e,t){var n,i,a,r;r=this.subPixelOptimize?(Xo(qo,t,this.style),n=qo.x1,i=qo.y1,a=qo.x2,qo.y2):(n=t.x1,i=t.y1,a=t.x2,t.y2);var o=t.percent;0!==o&&(e.moveTo(n,i),o<1&&(a=n*(1-o)+a*o,r=i*(1-o)+r*o),e.lineTo(a,r))},pointAt:function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]}}),Jo=[];function Qo(e,t,n){var i=e.cpx2,a=e.cpy2;return null===i||null===a?[(n?vr:mr)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?vr:mr)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?br:_r)(e.x1,e.cpx1,e.x2,t),(n?br:_r)(e.y1,e.cpy1,e.y2,t)]}function es(e){this.colorStops=e||[]}var ts=vo.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(e,t){var n=t.x1,i=t.y1,a=t.x2,r=t.y2,o=t.cpx1,s=t.cpy1,l=t.cpx2,u=t.cpy2,c=t.percent;0!==c&&(e.moveTo(n,i),null==l||null==u?(c<1&&(Sr(n,o,a,c,Jo),o=Jo[1],a=Jo[2],Sr(i,s,r,c,Jo),s=Jo[1],r=Jo[2]),e.quadraticCurveTo(o,s,a,r)):(c<1&&(xr(n,o,l,a,c,Jo),o=Jo[1],l=Jo[2],a=Jo[3],xr(i,s,u,r,c,Jo),s=Jo[1],u=Jo[2],r=Jo[3]),e.bezierCurveTo(o,s,l,u,a,r)))},pointAt:function(e){return Qo(this.shape,e,!1)},tangentAt:function(e){var t=Qo(this.shape,e,!0);return me(t,t)}}),ns=vo.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(e,t){var n=t.cx,i=t.cy,a=Math.max(t.r,0),r=t.startAngle,o=t.endAngle,s=t.clockwise,l=Math.cos(r),u=Math.sin(r);e.moveTo(l*a+n,u*a+i),e.arc(n,i,a,r,o,!s)}}),is=vo.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var e=this.__dirtyPath,t=this.shape.paths,n=0;n<t.length;n++)e=e||t[n].__dirtyPath;this.__dirtyPath=e,this.__dirty=this.__dirty||e},beforeBrush:function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},buildPath:function(e,t){for(var n=t.paths||[],i=0;i<n.length;i++)n[i].buildPath(e,n[i].shape,!0)},afterBrush:function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),vo.prototype.getBoundingRect.call(this)}});function as(e,t,n,i,a,r){this.x=null==e?0:e,this.y=null==t?0:t,this.x2=null==n?1:n,this.y2=null==i?0:i,this.type="linear",this.global=r||!1,es.call(this,a)}function rs(e,t,n,i,a){this.x=null==e?.5:e,this.y=null==t?.5:t,this.r=null==n?.5:n,this.type="radial",this.global=a||!1,es.call(this,i)}function os(e){ji.call(this,e),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}es.prototype={constructor:es,addColorStop:function(e,t){this.colorStops.push({offset:e,color:t})}},as.prototype={constructor:as},M(as,es),rs.prototype={constructor:rs},M(rs,es),os.prototype.incremental=!0,os.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},os.prototype.addDisplayable=function(e,t){t?this._temporaryDisplayables.push(e):this._displayables.push(e),this.dirty()},os.prototype.addDisplayables=function(e,t){t=t||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},os.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},os.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++)(t=this._displayables[e]).parent=this,t.update(),t.parent=null;for(e=0;e<this._temporaryDisplayables.length;e++){var t;(t=this._temporaryDisplayables[e]).parent=this,t.update(),t.parent=null}},os.prototype.brush=function(e,t){for(var n=this._cursor;n<this._displayables.length;n++)(i=this._displayables[n]).beforeBrush&&i.beforeBrush(e),i.brush(e,n===this._cursor?null:this._displayables[n-1]),i.afterBrush&&i.afterBrush(e);for(this._cursor=n,n=0;n<this._temporaryDisplayables.length;n++){var i;(i=this._temporaryDisplayables[n]).beforeBrush&&i.beforeBrush(e),i.brush(e,0===n?null:this._temporaryDisplayables[n-1]),i.afterBrush&&i.afterBrush(e)}this._temporaryDisplayables=[],this.notClear=!0};var ss=[];os.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new In(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],i=n.getBoundingRect().clone();n.needLocalTransform()&&i.applyTransform(n.getLocalTransform(ss)),e.union(i)}this._rect=e}return this._rect},os.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1]))for(var i=0;i<this._displayables.length;i++)if(this._displayables[i].contain(e,t))return!0;return!1},M(os,ji);var ls=Math.max,us=Math.min,cs={},hs={color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},ds="emphasis",ps=1,fs={},gs={};function ms(e){return vo.extend(e)}function vs(e,t){gs[e]=t}function ys(e){if(gs.hasOwnProperty(e))return gs[e]}function xs(e,t,n,i){var a=Po(e,t);return n&&("center"===i&&(n=bs(n,a.getBoundingRect())),Ss(a,n)),a}function _s(e,t,n){var i=new Zi({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if("center"===n){var a={width:e.width,height:e.height};i.setStyle(bs(t,a))}}});return i}function bs(e,t){var n,i=t.width/t.height,a=e.height*i;return n=a<=e.width?e.height:(a=e.width)/i,{x:e.x+e.width/2-a/2,y:e.y+e.height/2-n/2,width:a,height:n}}var ws=function(e,t){for(var n=[],i=e.length,a=0;a<i;a++){var r=e[a];r.path||r.createPathProxy(),r.__dirtyPath&&r.buildPath(r.path,r.shape,!0),n.push(r.path)}var o=new vo(t);return o.createPathProxy(),o.buildPath=function(e){e.appendPath(n);var t=e.getContext();t&&e.rebuildPath(t)},o};function Ss(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}var Ms=Uo;function Ts(e){return null!=e&&"none"!==e}var Cs=Q(),Is=0;function As(e){var t=e.__hoverStl;if(t&&!e.__highlighted){var n=e.__zr,i=e.useHoverLayer&&n&&"canvas"===n.painter.type;if(e.__highlighted=i?"layer":"plain",!(e.isGroup||!n&&e.useHoverLayer)){var a=e,r=e.style;i&&(r=(a=n.addHover(e)).style),Zs(r),i||function(e){if(e.__hoverStlDirty){e.__hoverStlDirty=!1;var t=e.__hoverStl;if(t){var n=e.__cachedNormalStl={};e.__cachedNormalZ2=e.z2;var i=e.style;for(var a in t)null!=t[a]&&(n[a]=i[a]);n.fill=i.fill,n.stroke=i.stroke}else e.__cachedNormalStl=e.__cachedNormalZ2=null}}(a),r.extendFrom(t),Ds(r,t,"fill"),Ds(r,t,"stroke"),js(r),i||(e.dirty(!1),e.z2+=1)}}}function Ds(e,t,n){!Ts(t[n])&&Ts(e[n])&&(e[n]=function(e){if("string"!=typeof e)return e;var t=Cs.get(e);return t||(t=Ht(e,-.1),Is<1e4&&(Cs.set(e,t),Is++)),t}(e[n]))}function ks(e){var t=e.__highlighted;if(t&&(e.__highlighted=!1,!e.isGroup))if("layer"===t)e.__zr&&e.__zr.removeHover(e);else{var n=e.style,i=e.__cachedNormalStl;i&&(Zs(n),e.setStyle(i),js(n));var a=e.__cachedNormalZ2;null!=a&&e.z2-a==1&&(e.z2=a)}}function Ls(e,t,n){var i,a="normal",r="normal";e.__highlighted&&(a=ds,i=!0),t(e,n),e.__highlighted&&(r=ds,i=!0),e.isGroup&&e.traverse((function(e){e.isGroup||t(e,n)})),i&&e.__highDownOnUpdate&&e.__highDownOnUpdate(a,r)}function Es(e,t){t=e.__hoverStl=!1!==t&&(e.hoverStyle||t||{}),e.__hoverStlDirty=!0,e.__highlighted&&(e.__cachedNormalStl=null,ks(e),As(e))}function Ps(e){Rs(this,e)||this.__highByOuter||Ls(this,As)}function zs(e){Rs(this,e)||this.__highByOuter||Ls(this,ks)}function Os(e){this.__highByOuter|=1<<(e||0),Ls(this,As)}function Ns(e){(this.__highByOuter&=~(1<<(e||0)))||Ls(this,ks)}function Rs(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Bs(e,t){Vs(e,!0),Ls(e,Es,t)}function Vs(e,t){var n=!1===t;if(e.__highDownSilentOnTouch=e.highDownSilentOnTouch,e.__highDownOnUpdate=e.highDownOnUpdate,!n||e.__highDownDispatcher){var i=n?"off":"on";e[i]("mouseover",Ps)[i]("mouseout",zs),e[i]("emphasis",Os)[i]("normal",Ns),e.__highByOuter=e.__highByOuter||0,e.__highDownDispatcher=!n}}function Gs(e){return!(!e||!e.__highDownDispatcher)}function Ws(e){var t=fs[e];return null==t&&ps<=32&&(t=fs[e]=ps++),t}function Hs(e,t,n,i,a,r,o){var s,l=(a=a||cs).labelFetcher,u=a.labelDataIndex,c=a.labelDimIndex,h=a.labelProp,d=n.getShallow("show"),p=i.getShallow("show");(d||p)&&(l&&(s=l.getFormattedLabel(u,"normal",null,c,h)),null==s&&(s=O(a.defaultText)?a.defaultText(u,a):a.defaultText));var f=d?s:null,g=p?F(l?l.getFormattedLabel(u,"emphasis",null,c,h):null,s):null;null==f&&null==g||($s(e,n,r,a),$s(t,i,o,a,!0)),e.text=f,t.text=g}function Fs(e,t,n){var i=e.style;t&&(Zs(i),e.setStyle(t),js(i)),i=e.__hoverStl,n&&i&&(Zs(i),x(i,n),js(i))}function $s(e,t,n,i,a){return Xs(e,t,i,a),n&&x(e,n),e}function Xs(e,t,n,i){if((n=n||cs).isRectText){var a;n.getTextPosition?a=n.getTextPosition(t,i):"outside"===(a=t.getShallow("position")||(i?null:"inside"))&&(a="top"),e.textPosition=a,e.textOffset=t.getShallow("offset");var r=t.getShallow("rotate");null!=r&&(r*=Math.PI/180),e.textRotation=r,e.textDistance=F(t.getShallow("distance"),i?null:5)}var o,s=t.ecModel,l=s&&s.option.textStyle,u=function(e){for(var t;e&&e!==e.ecModel;){var n=(e.option||cs).rich;if(n)for(var i in t=t||{},n)n.hasOwnProperty(i)&&(t[i]=1);e=e.parentModel}return t}(t);if(u)for(var c in o={},u)if(u.hasOwnProperty(c)){var h=t.getModel(["rich",c]);Ys(o[c]={},h,l,n,i)}return e.rich=o,Ys(e,t,l,n,i,!0),n.forceRich&&!n.textStyle&&(n.textStyle={}),e}function Ys(e,t,n,i,a,r){n=!a&&n||cs,e.textFill=Us(t.getShallow("color"),i)||n.color,e.textStroke=Us(t.getShallow("textBorderColor"),i)||n.textBorderColor,e.textStrokeWidth=F(t.getShallow("textBorderWidth"),n.textBorderWidth),a||(r&&(e.insideRollbackOpt=i,js(e)),null==e.textFill&&(e.textFill=i.autoColor)),e.fontStyle=t.getShallow("fontStyle")||n.fontStyle,e.fontWeight=t.getShallow("fontWeight")||n.fontWeight,e.fontSize=t.getShallow("fontSize")||n.fontSize,e.fontFamily=t.getShallow("fontFamily")||n.fontFamily,e.textAlign=t.getShallow("align"),e.textVerticalAlign=t.getShallow("verticalAlign")||t.getShallow("baseline"),e.textLineHeight=t.getShallow("lineHeight"),e.textWidth=t.getShallow("width"),e.textHeight=t.getShallow("height"),e.textTag=t.getShallow("tag"),r&&i.disableBox||(e.textBackgroundColor=Us(t.getShallow("backgroundColor"),i),e.textPadding=t.getShallow("padding"),e.textBorderColor=Us(t.getShallow("borderColor"),i),e.textBorderWidth=t.getShallow("borderWidth"),e.textBorderRadius=t.getShallow("borderRadius"),e.textBoxShadowColor=t.getShallow("shadowColor"),e.textBoxShadowBlur=t.getShallow("shadowBlur"),e.textBoxShadowOffsetX=t.getShallow("shadowOffsetX"),e.textBoxShadowOffsetY=t.getShallow("shadowOffsetY")),e.textShadowColor=t.getShallow("textShadowColor")||n.textShadowColor,e.textShadowBlur=t.getShallow("textShadowBlur")||n.textShadowBlur,e.textShadowOffsetX=t.getShallow("textShadowOffsetX")||n.textShadowOffsetX,e.textShadowOffsetY=t.getShallow("textShadowOffsetY")||n.textShadowOffsetY}function Us(e,t){return"auto"!==e?e:t&&t.autoColor?t.autoColor:null}function js(e){var t,n=e.textPosition,i=e.insideRollbackOpt;if(i&&null==e.textFill){var a=i.autoColor,r=i.isRectText,o=i.useInsideStyle,s=!1!==o&&(!0===o||r&&n&&"string"==typeof n&&0<=n.indexOf("inside")),l=!s&&null!=a;(s||l)&&(t={textFill:e.textFill,textStroke:e.textStroke,textStrokeWidth:e.textStrokeWidth}),s&&(e.textFill="#fff",null==e.textStroke&&(e.textStroke=a,null==e.textStrokeWidth&&(e.textStrokeWidth=2))),l&&(e.textFill=a)}e.insideRollback=t}function Zs(e){var t=e.insideRollback;t&&(e.textFill=t.textFill,e.textStroke=t.textStroke,e.textStrokeWidth=t.textStrokeWidth,e.insideRollback=null)}function qs(e,t){var n=t&&t.getModel("textStyle");return j([e.fontStyle||n&&n.getShallow("fontStyle")||"",e.fontWeight||n&&n.getShallow("fontWeight")||"",(e.fontSize||n&&n.getShallow("fontSize")||12)+"px",e.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))}function Ks(e,t,n,i,a,r){if("function"==typeof a&&(r=a,a=null),i&&i.isAnimationEnabled()){var o=e?"Update":"",s=i.getShallow("animationDuration"+o),l=i.getShallow("animationEasing"+o),u=i.getShallow("animationDelay"+o);"function"==typeof u&&(u=u(a,i.getAnimationDelayParams?i.getAnimationDelayParams(t,a):null)),"function"==typeof s&&(s=s(a)),0<s?t.animateTo(n,s,u||0,l,r,!!r):(t.stopAnimation(),t.attr(n),r&&r())}else t.stopAnimation(),t.attr(n),r&&r()}function Js(e,t,n,i,a){Ks(!0,e,t,n,i,a)}function Qs(e,t,n,i,a){Ks(!1,e,t,n,i,a)}function el(e,t){for(var n=rt([]);e&&e!==t;)st(n,e.getLocalTransform(),n),e=e.parent;return n}function tl(e,t,n){return t&&!C(t)&&(t=mt.getLocalTransform(t)),n&&(t=ht([],t)),we([],e,t)}function nl(e,t,n){var i=0===t[4]||0===t[5]||0===t[0]?1:Math.abs(2*t[4]/t[0]),a=0===t[4]||0===t[5]||0===t[2]?1:Math.abs(2*t[4]/t[2]),r=["left"===e?-i:"right"===e?i:0,"top"===e?-a:"bottom"===e?a:0];return r=tl(r,t,n),Math.abs(r[0])>Math.abs(r[1])?0<r[0]?"right":"left":0<r[1]?"bottom":"top"}function il(e,t,n,i){if(e&&t){var a,r=(a={},e.traverse((function(e){!e.isGroup&&e.anid&&(a[e.anid]=e)})),a);t.traverse((function(e){if(!e.isGroup&&e.anid){var t=r[e.anid];if(t){var i=o(e);e.attr(o(t)),Js(e,i,n,e.dataIndex)}}}))}function o(e){var t={position:oe(e.position),rotation:e.rotation};return e.shape&&(t.shape=x({},e.shape)),t}}function al(e,t){return A(e,(function(e){var n=e[0];n=ls(n,t.x),n=us(n,t.x+t.width);var i=e[1];return i=ls(i,t.y),[n,i=us(i,t.y+t.height)]}))}function rl(e,t,n){var i=(t=x({rectHover:!0},t)).style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(i.image=e.slice(8),_(i,n),new Zi(t)):xs(e.replace("path://",""),t,n,"center")}function ol(e,t,n,i,a){for(var r=0,o=a[a.length-1];r<a.length;r++){var s=a[r];if(sl(e,t,n,i,s[0],s[1],o[0],o[1]))return!0;o=s}}function sl(e,t,n,i,a,r,o,s){var l=n-e,u=i-t,c=o-a,h=s-r,d=ll(c,h,l,u);if(function(e){return e<=1e-6&&-1e-6<=e}(d))return!1;var p=e-a,f=t-r,g=ll(p,f,l,u)/d;if(g<0||1<g)return!1;var m=ll(p,f,c,h)/d;return!(m<0||1<m)}function ll(e,t,n,i){return e*i-n*t}vs("circle",No),vs("sector",Bo),vs("ring",Vo),vs("polygon",Ho),vs("polyline",Fo),vs("rect",Zo),vs("line",Ko),vs("bezierCurve",ts),vs("arc",ns);var ul=(Object.freeze||Object)({Z2_EMPHASIS_LIFT:1,CACHED_LABEL_STYLE_PROPERTIES:hs,extendShape:ms,extendPath:function(e,t){return function(e,t){return vo.extend(Eo(e,t))}(e,t)},registerShape:vs,getShapeClass:ys,makePath:xs,makeImage:_s,mergePath:ws,resizePath:Ss,subPixelOptimizeLine:function(e){return Xo(e.shape,e.shape,e.style),e},subPixelOptimizeRect:function(e){return Yo(e.shape,e.shape,e.style),e},subPixelOptimize:Ms,setElementHoverStyle:Es,setHoverStyle:Bs,setAsHighDownDispatcher:Vs,isHighDownDispatcher:Gs,getHighlightDigit:Ws,setLabelStyle:Hs,modifyLabelStyle:Fs,setTextStyle:$s,setText:function(e,t,n){var i,a={isRectText:!0};!1===n?i=!0:a.autoColor=n,Xs(e,t,a,i)},getFont:qs,updateProps:Js,initProps:Qs,getTransform:el,applyTransform:tl,transformDirection:nl,groupTransition:il,clipPointsByRect:al,clipRectByRect:function(e,t){var n=ls(e.x,t.x),i=us(e.x+e.width,t.x+t.width),a=ls(e.y,t.y),r=us(e.y+e.height,t.y+t.height);if(n<=i&&a<=r)return{x:n,y:a,width:i-n,height:r-a}},createIcon:rl,linePolygonIntersect:ol,lineLineIntersect:sl,Group:An,Image:Zi,Text:zo,Circle:No,Sector:Bo,Ring:Vo,Polygon:Ho,Polyline:Fo,Rect:Zo,Line:Ko,BezierCurve:ts,Arc:ns,IncrementalDisplayable:os,CompoundPath:is,LinearGradient:as,RadialGradient:rs,BoundingRect:In}),cl=["textStyle","color"],hl={getTextColor:function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(cl):null)},getFont:function(){return qs({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(e){return hi(e,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},dl=ir([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),pl={getItemStyle:function(e,t){var n=dl(this,e,t),i=this.getBorderLineDash();return i&&(n.lineDash=i),n},getBorderLineDash:function(){var e=this.get("borderType");return"solid"===e||null==e?null:"dashed"===e?[5,5]:[1,1]}},fl=T,gl=Ha();function ml(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}function vl(e,t,n){for(var i=0;i<t.length&&(!t[i]||null!=(e=e&&"object"==typeof e?e[t[i]]:null));i++);return null==e&&n&&(e=n.get(t)),e}function yl(e,t){var n=gl(e).getParent;return n?n.call(e,t):e.parentModel}ml.prototype={constructor:ml,init:null,mergeOption:function(e){v(this.option,e,!0)},get:function(e,t){return null==e?this.option:vl(this.option,this.parsePath(e),!t&&yl(this,e))},getShallow:function(e,t){var n=this.option,i=null==n?n:n[e],a=!t&&yl(this,e);return null==i&&a&&(i=a.getShallow(e)),i},getModel:function(e,t){var n;return new ml(null==e?this.option:vl(this.option,e=this.parsePath(e)),t=t||(n=yl(this,e))&&n.getModel(e),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new this.constructor(m(this.option))},setReadOnly:function(e){},parsePath:function(e){return"string"==typeof e&&(e=e.split(".")),e},customizeGetParent:function(e){gl(this).getParent=e},isAnimationEnabled:function(){if(!a.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},Ka(ml),Qa(ml),fl(ml,rr),fl(ml,sr),fl(ml,hl),fl(ml,pl);var xl=0;function _l(e){return[e||"",xl++,Math.random().toFixed(5)].join("_")}function bl(e,t,n,i){var a=t[1]-t[0],r=n[1]-n[0];if(0==a)return 0==r?n[0]:(n[0]+n[1])/2;if(i)if(0<a){if(e<=t[0])return n[0];if(e>=t[1])return n[1]}else{if(e>=t[0])return n[0];if(e<=t[1])return n[1]}else{if(e===t[0])return n[0];if(e===t[1])return n[1]}return(e-t[0])/a*r+n[0]}function wl(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return"string"==typeof e?function(e){return e.replace(/^\s+|\s+$/g,"")}(e).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e}function Sl(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),n?e:+e}function Ml(e){return e.sort((function(e,t){return e-t})),e}function Tl(e){if(e=+e,isNaN(e))return 0;for(var t=1,n=0;Math.round(e*t)/t!==e;)t*=10,n++;return n}function Cl(e){var t=e.toString(),n=t.indexOf("e");if(0<n){var i=+t.slice(n+1);return i<0?-i:0}var a=t.indexOf(".");return a<0?0:t.length-1-a}function Il(e,t){var n=Math.log,i=Math.LN10,a=Math.floor(n(e[1]-e[0])/i),r=Math.round(n(Math.abs(t[1]-t[0]))/i),o=Math.min(Math.max(-a+r,0),20);return isFinite(o)?o:20}function Al(e,t,n){if(!e[t])return 0;var i=D(e,(function(e,t){return e+(isNaN(t)?0:t)}),0);if(0===i)return 0;for(var a=Math.pow(10,n),r=A(e,(function(e){return(isNaN(e)?0:e)/i*a*100})),o=100*a,s=A(r,(function(e){return Math.floor(e)})),l=D(s,(function(e,t){return e+t}),0),u=A(r,(function(e,t){return e-s[t]}));l<o;){for(var c=Number.NEGATIVE_INFINITY,h=null,d=0,p=u.length;d<p;++d)u[d]>c&&(c=u[d],h=d);++s[h],u[h]=0,++l}return s[t]/a}var Dl=9007199254740991;function kl(e){var t=2*Math.PI;return(e%t+t)%t}function Ll(e){return-1e-4<e&&e<1e-4}var El=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Pl(e){if(e instanceof Date)return e;if("string"!=typeof e)return null==e?new Date(NaN):new Date(Math.round(e));var t=El.exec(e);if(!t)return new Date(NaN);if(t[8]){var n=+t[4]||0;return"Z"!==t[8].toUpperCase()&&(n-=t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,+t[7]||0))}return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,+t[7]||0)}function zl(e){return Math.pow(10,Ol(e))}function Ol(e){if(0===e)return 0;var t=Math.floor(Math.log(e)/Math.LN10);return 10<=e/Math.pow(10,t)&&t++,t}function Nl(e,t){var n=Ol(e),i=Math.pow(10,n),a=e/i;return e=(t?a<1.5?1:a<2.5?2:a<4?3:a<7?5:10:a<1?1:a<2?2:a<3?3:a<5?5:10)*i,-20<=n?+e.toFixed(n<0?-n:0):e}function Rl(e){e.sort((function(e,t){return function e(t,n,i){return t.interval[i]<n.interval[i]||t.interval[i]===n.interval[i]&&(t.close[i]-n.close[i]==(i?-1:1)||!i&&e(t,n,1))}(e,t,0)?-1:1}));for(var t=-1/0,n=1,i=0;i<e.length;){for(var a=e[i].interval,r=e[i].close,o=0;o<2;o++)a[o]<=t&&(a[o]=t,r[o]=o?1:1-n),t=a[o],n=r[o];a[0]===a[1]&&r[0]*r[1]!=1?e.splice(i,1):i++}return e}function Bl(e){return 0<=e-parseFloat(e)}var Vl=(Object.freeze||Object)({linearMap:bl,parsePercent:wl,round:Sl,asc:Ml,getPrecision:Tl,getPrecisionSafe:Cl,getPixelPrecision:Il,getPercentWithPrecision:Al,MAX_SAFE_INTEGER:Dl,remRadian:kl,isRadianAroundZero:Ll,parseDate:Pl,quantity:zl,quantityExponent:Ol,nice:Nl,quantile:function(e,t){var n=(e.length-1)*t+1,i=Math.floor(n),a=+e[i-1],r=n-i;return r?a+r*(e[i]-a):a},reformIntervals:Rl,isNumeric:Bl});function Gl(e){return isNaN(e)?"-":(e=(e+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(1<e.length?"."+e[1]:"")}function Wl(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()})),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var Hl=Y,Fl=/([&<>"'])/g,$l={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Xl(e){return null==e?"":(e+"").replace(Fl,(function(e,t){return $l[t]}))}function Yl(e,t){return"{"+e+(null==t?"":t)+"}"}var Ul=["a","b","c","d","e","f","g"];function jl(e,t,n){z(t)||(t=[t]);var i=t.length;if(!i)return"";for(var a=t[0].$vars||[],r=0;r<a.length;r++){var o=Ul[r];e=e.replace(Yl(o),Yl(o,0))}for(var s=0;s<i;s++)for(var l=0;l<a.length;l++){var u=t[s][a[l]];e=e.replace(Yl(Ul[l],s),n?Xl(u):u)}return e}function Zl(e,t,n){return I(t,(function(t,i){e=e.replace("{"+i+"}",n?Xl(t):t)})),e}function ql(e,t){var n=(e=N(e)?{color:e,extraCssText:t}:e||{}).color,i=e.type,a=(t=e.extraCssText,e.renderMode||"html"),r=e.markerId||"X";return n?"html"===a?"subItem"===i?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Xl(n)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+Xl(n)+";"+(t||"")+'"></span>':{renderMode:a,content:"{marker"+r+"|} ",style:{color:n}}:""}function Kl(e,t){return"0000".substr(0,t-(e+="").length)+e}function Jl(e,t,n){"week"!==e&&"month"!==e&&"quarter"!==e&&"half-year"!==e&&"year"!==e||(e="MM-dd\nyyyy");var i=Pl(t),a=n?"UTC":"",r=i["get"+a+"FullYear"](),o=i["get"+a+"Month"]()+1,s=i["get"+a+"Date"](),l=i["get"+a+"Hours"](),u=i["get"+a+"Minutes"](),c=i["get"+a+"Seconds"](),h=i["get"+a+"Milliseconds"]();return e.replace("MM",Kl(o,2)).replace("M",o).replace("yyyy",r).replace("yy",r%100).replace("dd",Kl(s,2)).replace("d",s).replace("hh",Kl(l,2)).replace("h",l).replace("mm",Kl(u,2)).replace("m",u).replace("ss",Kl(c,2)).replace("s",c).replace("SSS",Kl(h,3))}function Ql(e){return e?e.charAt(0).toUpperCase()+e.substr(1):e}var eu=gi;function tu(e,t){if("_blank"===t||"blank"===t){var n=window.open();n.opener=null,n.location=e}else window.open(e,t)}var nu=(Object.freeze||Object)({addCommas:Gl,toCamelCase:Wl,normalizeCssArray:Hl,encodeHTML:Xl,formatTpl:jl,formatTplSimple:Zl,getTooltipMarker:ql,formatTime:Jl,capitalFirst:Ql,truncateText:eu,getTextBoundingRect:function(e){return hi(e.text,e.font,e.textAlign,e.textVerticalAlign,e.textPadding,e.textLineHeight,e.rich,e.truncate)},getTextRect:function(e,t,n,i,a,r,o,s){return hi(e,t,n,i,a,s,r,o)},windowOpen:tu}),iu=I,au=["left","right","top","bottom","width","height"],ru=[["width","left","right"],["height","top","bottom"]];function ou(e,t,n,i,a){var r=0,o=0;null==i&&(i=1/0),null==a&&(a=1/0);var s=0;t.eachChild((function(l,u){var c,h,d=l.position,p=l.getBoundingRect(),f=t.childAt(u+1),g=f&&f.getBoundingRect();if("horizontal"===e){var m=p.width+(g?-g.x+p.x:0);s=i<(c=r+m)||l.newline?(r=0,c=m,o+=s+n,p.height):Math.max(s,p.height)}else{var v=p.height+(g?-g.y+p.y:0);s=a<(h=o+v)||l.newline?(r+=s+n,o=0,h=v,p.width):Math.max(s,p.width)}l.newline||(d[0]=r,d[1]=o,"horizontal"===e?r=c+n:o=h+n)}))}var su=ou;function lu(e,t,n){n=Hl(n||0);var i=t.width,a=t.height,r=wl(e.left,i),o=wl(e.top,a),s=wl(e.right,i),l=wl(e.bottom,a),u=wl(e.width,i),c=wl(e.height,a),h=n[2]+n[0],d=n[1]+n[3],p=e.aspect;switch(isNaN(u)&&(u=i-s-d-r),isNaN(c)&&(c=a-l-h-o),null!=p&&(isNaN(u)&&isNaN(c)&&(i/a<p?u=.8*i:c=.8*a),isNaN(u)&&(u=p*c),isNaN(c)&&(c=u/p)),isNaN(r)&&(r=i-s-u-d),isNaN(o)&&(o=a-l-c-h),e.left||e.right){case"center":r=i/2-u/2-n[3];break;case"right":r=i-u-d}switch(e.top||e.bottom){case"middle":case"center":o=a/2-c/2-n[0];break;case"bottom":o=a-c-h}r=r||0,o=o||0,isNaN(u)&&(u=i-d-r-(s||0)),isNaN(c)&&(c=a-h-o-(l||0));var f=new In(r+n[3],o+n[0],u,c);return f.margin=n,f}function uu(e,t,n,i,a){var r=!a||!a.hv||a.hv[0],o=!a||!a.hv||a.hv[1],s=a&&a.boundingMode||"all";if(r||o){var l;if("raw"===s)l="group"===e.type?new In(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(l=e.getBoundingRect(),e.needLocalTransform()){var u=e.getLocalTransform();(l=l.clone()).applyTransform(u)}t=lu(_({width:l.width,height:l.height},t),n,i);var c=e.position,h=r?t.x-l.x:0,d=o?t.y-l.y:0;e.attr("position","raw"===s?[h,d]:[c[0]+h,c[1]+d])}}function cu(e,t,n){R(n)||(n={});var i=n.ignoreSize;z(i)||(i=[i,i]);var a=o(ru[0],0),r=o(ru[1],1);function o(n,a){var r={},o=0,u={},c=0;if(iu(n,(function(t){u[t]=e[t]})),iu(n,(function(e){s(t,e)&&(r[e]=u[e]=t[e]),l(r,e)&&o++,l(u,e)&&c++})),i[a])return l(t,n[1])?u[n[2]]=null:l(t,n[2])&&(u[n[1]]=null),u;if(2!==c&&o){if(2<=o)return r;for(var h=0;h<n.length;h++){var d=n[h];if(!s(r,d)&&s(e,d)){r[d]=e[d];break}}return r}return u}function s(e,t){return e.hasOwnProperty(t)}function l(e,t){return null!=e[t]&&"auto"!==e[t]}function u(e,t,n){iu(e,(function(e){t[e]=n[e]}))}u(ru[0],e,a),u(ru[1],e,r)}function hu(e){return du({},e)}function du(e,t){return t&&e&&iu(au,(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e}P(ou,"vertical"),P(ou,"horizontal");var pu,fu,gu,mu=Ha(),vu=ml.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(e,t,n,i){ml.call(this,e,t,n,i),this.uid=_l("ec_cpt_model")},init:function(e,t,n,i){this.mergeDefaultAndTheme(e,n)},mergeDefaultAndTheme:function(e,t){var n=this.layoutMode,i=n?hu(e):{};v(e,t.getTheme().get(this.mainType)),v(e,this.getDefaultOption()),n&&cu(e,i,n)},mergeOption:function(e,t){v(this.option,e,!0);var n=this.layoutMode;n&&cu(this.option,e,n)},optionUpdated:function(e,t){},getDefaultOption:function(){var e=mu(this);if(!e.defaultOption){for(var t=[],n=this.constructor;n;){var i=n.prototype.defaultOption;i&&t.push(i),n=n.superClass}for(var a={},r=t.length-1;0<=r;r--)a=v(a,t[r],!0);e.defaultOption=a}return e.defaultOption},getReferringComponents:function(e){return this.ecModel.queryComponents({mainType:e,index:this.get(e+"Index",!0),id:this.get(e+"Id",!0)})}});function yu(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}nr(vu,{registerWhenExtend:!0}),fu={},(pu=vu).registerSubTypeDefaulter=function(e,t){e=qa(e),fu[e.main]=t},pu.determineSubType=function(e,t){var n=t.type;if(!n){var i=qa(e).main;pu.hasSubTypes(e)&&fu[i]&&(n=fu[i](t))}return n},gu=function(e){var t=[];return I(vu.getClassesByMainType(e),(function(e){t=t.concat(e.prototype.dependencies||[])})),t=A(t,(function(e){return qa(e).main})),"dataset"!==e&&S(t,"dataset")<=0&&t.unshift("dataset"),t},vu.topologicalTravel=function(e,t,n,i){if(e.length){var a=function(e){var t={},n=[];return I(e,(function(i){var a=yu(t,i),r=function(e,t){var n=[];return I(e,(function(e){0<=S(t,e)&&n.push(e)})),n}(a.originalDeps=gu(i),e);a.entryCount=r.length,0===a.entryCount&&n.push(i),I(r,(function(e){S(a.predecessor,e)<0&&a.predecessor.push(e);var n=yu(t,e);S(n.successor,e)<0&&n.successor.push(i)}))})),{graph:t,noEntryList:n}}(t),r=a.graph,o=a.noEntryList,s={};for(I(e,(function(e){s[e]=!0}));o.length;){var l=o.pop(),u=r[l],c=!!s[l];c&&(n.call(i,l,u.originalDeps.slice()),delete s[l]),I(u.successor,c?d:h)}I(s,(function(){throw new Error("Circle dependency may exists")}))}function h(e){r[e].entryCount--,0===r[e].entryCount&&o.push(e)}function d(e){s[e]=!0,h(e)}},T(vu,{getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}});var xu="";"undefined"!=typeof navigator&&(xu=navigator.platform||"");var _u={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:xu.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},bu=Ha(),wu={clearColorPalette:function(){bu(this).colorIdx=0,bu(this).colorNameMap={}},getColorFromPalette:function(e,t,n){var i=bu(t=t||this),a=i.colorIdx||0,r=i.colorNameMap=i.colorNameMap||{};if(r.hasOwnProperty(e))return r[e];var o=Pa(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=n&&s?function(e,t){for(var n=e.length,i=0;i<n;i++)if(e[i].length>t)return e[i];return e[n-1]}(s,n):o;if((l=l||o)&&l.length){var u=l[a];return e&&(r[e]=u),i.colorIdx=(a+1)%l.length,u}}},Su="original",Mu="arrayRows",Tu="objectRows",Cu="keyedColumns",Iu="unknown",Au="typedArray";function Du(e){this.fromDataset=e.fromDataset,this.data=e.data||(e.sourceFormat===Cu?{}:[]),this.sourceFormat=e.sourceFormat||Iu,this.seriesLayoutBy=e.seriesLayoutBy||"column",this.dimensionsDefine=e.dimensionsDefine,this.encodeDefine=e.encodeDefine&&Q(e.encodeDefine),this.startIndex=e.startIndex||0,this.dimensionsDetectCount=e.dimensionsDetectCount}Du.seriesDataToSource=function(e){return new Du({data:e,sourceFormat:V(e)?Au:Su,fromDataset:!1})},Qa(Du);var ku=1,Lu=2,Eu=3,Pu=Ha();function zu(e){var t=e.option,n=t.data,i=V(n)?Au:Su,a=!1,r=t.seriesLayoutBy,o=t.sourceHeader,s=t.dimensions,l=Vu(e);if(l){var u=l.option;n=u.source,i=Pu(l).sourceFormat,a=!0,r=r||u.seriesLayoutBy,null==o&&(o=u.sourceHeader),s=s||u.dimensions}var c=function(e,t,n,i,a){if(!e)return{dimensionsDefine:Ou(a)};var r,o;if(t===Mu)"auto"===i||null==i?Nu((function(e){null!=e&&"-"!==e&&(N(e)?null==o&&(o=1):o=0)}),n,e,10):o=i?1:0,a||1!==o||(a=[],Nu((function(e,t){a[t]=null!=e?e:""}),n,e)),r=a?a.length:"row"===n?e.length:e[0]?e[0].length:null;else if(t===Tu)a=a||function(e){for(var t,n=0;n<e.length&&!(t=e[n++]););if(t){var i=[];return I(t,(function(e,t){i.push(t)})),i}}(e);else if(t===Cu)a||(a=[],I(e,(function(e,t){a.push(t)})));else if(t===Su){var s=Na(e[0]);r=z(s)&&s.length||1}return{startIndex:o,dimensionsDefine:Ou(a),dimensionsDetectCount:r}}(n,i,r,o,s);Pu(e).source=new Du({data:n,fromDataset:a,seriesLayoutBy:r,sourceFormat:i,dimensionsDefine:c.dimensionsDefine,startIndex:c.startIndex,dimensionsDetectCount:c.dimensionsDetectCount,encodeDefine:t.encode})}function Ou(e){if(e){var t=Q();return A(e,(function(e,n){if(null==(e=x({},R(e)?e:{name:e})).name)return e;e.name+="",null==e.displayName&&(e.displayName=e.name);var i=t.get(e.name);return i?e.name+="-"+i.count++:t.set(e.name,{count:1}),e}))}}function Nu(e,t,n,i){if(null==i&&(i=1/0),"row"===t)for(var a=0;a<n.length&&a<i;a++)e(n[a]?n[a][0]:null,a);else{var r=n[0]||[];for(a=0;a<r.length&&a<i;a++)e(r[a],a)}}function Ru(e,t,n){var i={},a=Vu(t);if(!a||!e)return i;var r,o,s=[],l=[],u=t.ecModel,c=Pu(u).datasetMap,h=a.uid+"_"+n.seriesLayoutBy;I(e=e.slice(),(function(t,n){R(t)||(e[n]={name:t}),"ordinal"===t.type&&null==r&&(o=f(e[r=n])),i[t.name]=[]}));var d=c.get(h)||c.set(h,{categoryWayDim:o,valueWayDim:0});function p(e,t,n){for(var i=0;i<n;i++)e.push(t+i)}function f(e){var t=e.dimsDef;return t?t.length:1}return I(e,(function(e,t){var n=e.name,a=f(e);if(null==r){var o=d.valueWayDim;p(i[n],o,a),p(l,o,a),d.valueWayDim+=a}else r===t?(p(i[n],0,a),p(s,0,a)):(o=d.categoryWayDim,p(i[n],o,a),p(l,o,a),d.categoryWayDim+=a)})),s.length&&(i.itemName=s),l.length&&(i.seriesName=l),i}function Bu(e,t,n){var i={};if(!Vu(e))return i;var a,r=t.sourceFormat,o=t.dimensionsDefine;r!==Tu&&r!==Cu||I(o,(function(e,t){"name"===(R(e)?e.name:e)&&(a=t)}));var s=function(){for(var e={},i={},s=[],l=0,u=Math.min(5,n);l<u;l++){var c=Gu(t.data,r,t.seriesLayoutBy,o,t.startIndex,l);s.push(c);var h=c===Eu;if(h&&null==e.v&&l!==a&&(e.v=l),null!=e.n&&e.n!==e.v&&(h||s[e.n]!==Eu)||(e.n=l),d(e)&&s[e.n]!==Eu)return e;h||(c===Lu&&null==i.v&&l!==a&&(i.v=l),null!=i.n&&i.n!==i.v||(i.n=l))}function d(e){return null!=e.v&&null!=e.n}return d(e)?e:d(i)?i:null}();if(s){i.value=s.v;var l=null!=a?a:s.n;i.itemName=[l],i.seriesName=[l]}return i}function Vu(e){var t=e.option;if(!t.data)return e.ecModel.getComponent("dataset",t.datasetIndex||0)}function Gu(e,t,n,i,a,r){var o,s,l;if(V(e))return Eu;if(i){var u=i[r];R(u)?(s=u.name,l=u.type):N(u)&&(s=u)}if(null!=l)return"ordinal"===l?ku:Eu;if(t===Mu)if("row"===n){for(var c=e[r],h=0;h<(c||[]).length&&h<5;h++)if(null!=(o=g(c[a+h])))return o}else for(h=0;h<e.length&&h<5;h++){var d=e[a+h];if(d&&null!=(o=g(d[r])))return o}else if(t===Tu){if(!s)return Eu;for(h=0;h<e.length&&h<5;h++)if((p=e[h])&&null!=(o=g(p[s])))return o}else if(t===Cu){if(!s)return Eu;if(!(c=e[s])||V(c))return Eu;for(h=0;h<c.length&&h<5;h++)if(null!=(o=g(c[h])))return o}else if(t===Su)for(h=0;h<e.length&&h<5;h++){var p,f=Na(p=e[h]);if(!z(f))return Eu;if(null!=(o=g(f[r])))return o}function g(e){var t=N(e);return null!=e&&isFinite(e)&&""!==e?t?Lu:Eu:t&&"-"!==e?ku:void 0}return Eu}var Wu="\0_ec_inner",Hu=ml.extend({init:function(e,t,n,i){n=n||{},this.option=null,this._theme=new ml(n),this._optionManager=i},setOption:function(e,t){U(!(Wu in e),"please use chart.getOption()"),this._optionManager.setOption(e,t),this.resetOption(null)},resetOption:function(e){var t=!1,n=this._optionManager;if(!e||"recreate"===e){var i=n.mountOption("recreate"===e);this.option&&"recreate"!==e?(this.restoreData(),this.mergeOption(i)):(function(e){e=e,this.option={},this.option[Wu]=1,this._componentsMap=Q({series:[]}),this._seriesIndices,this._seriesIndicesMap,function(e,t){var n=e.color&&!e.colorLayer;I(t,(function(t,i){"colorLayer"===i&&n||vu.hasClass(i)||("object"==typeof t?e[i]=e[i]?v(e[i],t,!1):m(t):null==e[i]&&(e[i]=t))}))}(e,this._theme.option),v(e,_u,!1),this.mergeOption(e)}).call(this,i),t=!0}if("timeline"!==e&&"media"!==e||this.restoreData(),!e||"recreate"===e||"timeline"===e){var a=n.getTimelineOption(this);a&&(this.mergeOption(a),t=!0)}if(!e||"recreate"===e||"media"===e){var r=n.getMediaOption(this,this._api);r.length&&I(r,(function(e){this.mergeOption(e,t=!0)}),this)}return t},mergeOption:function(e){var t=this.option,n=this._componentsMap,i=[];!function(e){Pu(e).datasetMap=Q()}(this),I(e,(function(e,n){null!=e&&(vu.hasClass(n)?n&&i.push(n):t[n]=null==t[n]?m(e):v(t[n],e,!0))})),vu.topologicalTravel(i,vu.getAllClassMainTypes(),(function(i,a){var r=Pa(e[i]),o=Ra(n.get(i),r);Ba(o),I(o,(function(e,t){var n=e.option;R(n)&&(e.keyInfo.mainType=i,e.keyInfo.subType=function(e,t,n){return t.type?t.type:n?n.subType:vu.determineSubType(e,t)}(i,n,e.exist))}));var s=function(e,t){z(t)||(t=t?[t]:[]);var n={};return I(t,(function(t){n[t]=(e.get(t)||[]).slice()})),n}(n,a);t[i]=[],n.set(i,[]),I(o,(function(e,a){var r=e.exist,o=e.option;if(U(R(o)||r,"Empty component definition"),o){var l=vu.getClass(i,e.keyInfo.subType,!0);if(r&&r.constructor===l)r.name=e.keyInfo.name,r.mergeOption(o,this),r.optionUpdated(o,!1);else{var u=x({dependentModels:s,componentIndex:a},e.keyInfo);x(r=new l(o,this,this,u),u),r.init(o,this,this,u),r.optionUpdated(null,!0)}}else r.mergeOption({},this),r.optionUpdated({},!1);n.get(i)[a]=r,t[i][a]=r.option}),this),"series"===i&&Fu(this,n.get("series"))}),this),this._seriesIndicesMap=Q(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var e=m(this.option);return I(e,(function(t,n){if(vu.hasClass(n)){for(var i=(t=Pa(t)).length-1;0<=i;i--)Ga(t[i])&&t.splice(i,1);e[n]=t}})),delete e[Wu],e},getTheme:function(){return this._theme},getComponent:function(e,t){var n=this._componentsMap.get(e);if(n)return n[t||0]},queryComponents:function(e){var t=e.mainType;if(!t)return[];var n,i=e.index,a=e.id,r=e.name,o=this._componentsMap.get(t);if(!o||!o.length)return[];if(null!=i)z(i)||(i=[i]),n=k(A(i,(function(e){return o[e]})),(function(e){return!!e}));else if(null!=a){var s=z(a);n=k(o,(function(e){return s&&0<=S(a,e.id)||!s&&e.id===a}))}else if(null!=r){var l=z(r);n=k(o,(function(e){return l&&0<=S(r,e.name)||!l&&e.name===r}))}else n=o.slice();return $u(n,e)},findComponents:function(e){var t,n,i,a,r,o=e.query,s=e.mainType,l=(n=s+"Index",i=s+"Id",a=s+"Name",!(t=o)||null==t[n]&&null==t[i]&&null==t[a]?null:{mainType:s,index:t[n],id:t[i],name:t[a]});return r=$u(l?this.queryComponents(l):this._componentsMap.get(s),e),e.filter?k(r,e.filter):r},eachComponent:function(e,t,n){var i=this._componentsMap;"function"==typeof e?(n=t,t=e,i.each((function(e,i){I(e,(function(e,a){t.call(n,i,e,a)}))}))):N(e)?I(i.get(e),t,n):R(e)&&I(this.findComponents(e),t,n)},getSeriesByName:function(e){return k(this._componentsMap.get("series"),(function(t){return t.name===e}))},getSeriesByIndex:function(e){return this._componentsMap.get("series")[e]},getSeriesByType:function(e){return k(this._componentsMap.get("series"),(function(t){return t.subType===e}))},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(e,t){I(this._seriesIndices,(function(n){var i=this._componentsMap.get("series")[n];e.call(t,i,n)}),this)},eachRawSeries:function(e,t){I(this._componentsMap.get("series"),e,t)},eachSeriesByType:function(e,t,n){I(this._seriesIndices,(function(i){var a=this._componentsMap.get("series")[i];a.subType===e&&t.call(n,a,i)}),this)},eachRawSeriesByType:function(e,t,n){return I(this.getSeriesByType(e),t,n)},isSeriesFiltered:function(e){return null==this._seriesIndicesMap.get(e.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(e,t){Fu(this,k(this._componentsMap.get("series"),e,t))},restoreData:function(e){var t=this._componentsMap;Fu(this,t.get("series"));var n=[];t.each((function(e,t){n.push(t)})),vu.topologicalTravel(n,vu.getAllClassMainTypes(),(function(n,i){I(t.get(n),(function(t){"series"===n&&function(e,t){if(t){var n=t.seiresIndex,i=t.seriesId,a=t.seriesName;return null!=n&&e.componentIndex!==n||null!=i&&e.id!==i||null!=a&&e.name!==a}}(t,e)||t.restoreData()}))}))}});function Fu(e,t){e._seriesIndicesMap=Q(e._seriesIndices=A(t,(function(e){return e.componentIndex}))||[])}function $u(e,t){return t.hasOwnProperty("subType")?k(e,(function(e){return e.subType===t.subType})):e}T(Hu,wu);var Xu=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];function Yu(e){I(Xu,(function(t){this[t]=E(e[t],e)}),this)}var Uu={};function ju(){this._coordinateSystems=[]}ju.prototype={constructor:ju,create:function(e,t){var n=[];I(Uu,(function(i,a){var r=i.create(e,t);n=n.concat(r||[])})),this._coordinateSystems=n},update:function(e,t){I(this._coordinateSystems,(function(n){n.update&&n.update(e,t)}))},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},ju.register=function(e,t){Uu[e]=t},ju.get=function(e){return Uu[e]};var Zu=I,qu=m,Ku=A,Ju=v,Qu=/^(min|max)?(.+)$/;function ec(e){this._api=e,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function tc(e,t,n){var i={width:t,height:n,aspectratio:t/n},a=!0;return I(e,(function(e,t){var n=t.match(Qu);if(n&&n[1]&&n[2]){var r=n[1],o=n[2].toLowerCase();!function(e,t,n){return"min"===n?t<=e:"max"===n?e<=t:e===t}(i[o],e,r)&&(a=!1)}})),a}ec.prototype={constructor:ec,setOption:function(e,t){e&&I(Pa(e.series),(function(e){e&&e.data&&V(e.data)&&q(e.data)})),e=qu(e);var n=this._optionBackup,i=(function(e,t,n){var i,a,r=[],o=[],s=e.timeline;if(e.baseOption&&(a=e.baseOption),(s||e.options)&&(a=a||{},r=(e.options||[]).slice()),e.media){a=a||{};var l=e.media;Zu(l,(function(e){e&&e.option&&(e.query?o.push(e):i=i||e)}))}return(a=a||e).timeline||(a.timeline=s),Zu([a].concat(r).concat(A(o,(function(e){return e.option}))),(function(e){Zu(t,(function(t){t(e,n)}))})),{baseOption:a,timelineOptions:r,mediaDefault:i,mediaList:o}}).call(this,e,t,!n);this._newBaseOption=i.baseOption,n?(function(e,t){Zu(t=t||{},(function(t,n){if(null!=t){var i=e[n];if(vu.hasClass(n)){t=Pa(t);var a=Ra(i=Pa(i),t);e[n]=Ku(a,(function(e){return e.option&&e.exist?Ju(e.exist,e.option,!0):e.exist||e.option}))}else e[n]=Ju(i,t,!0)}}))}(n.baseOption,i.baseOption),i.timelineOptions.length&&(n.timelineOptions=i.timelineOptions),i.mediaList.length&&(n.mediaList=i.mediaList),i.mediaDefault&&(n.mediaDefault=i.mediaDefault)):this._optionBackup=i},mountOption:function(e){var t=this._optionBackup;return this._timelineOptions=Ku(t.timelineOptions,qu),this._mediaList=Ku(t.mediaList,qu),this._mediaDefault=qu(t.mediaDefault),this._currentMediaIndices=[],qu(e?t.baseOption:this._newBaseOption)},getTimelineOption:function(e){var t,n=this._timelineOptions;if(n.length){var i=e.getComponent("timeline");i&&(t=qu(n[i.getCurrentIndex()],!0))}return t},getMediaOption:function(e){var t=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,a=this._mediaDefault,r=[],o=[];if(!i.length&&!a)return o;for(var s=0,l=i.length;s<l;s++)tc(i[s].query,t,n)&&r.push(s);return!r.length&&a&&(r=[-1]),r.length&&!function(e,t){return e.join(",")===t.join(",")}(r,this._currentMediaIndices)&&(o=Ku(r,(function(e){return qu(-1===e?a.option:i[e].option)}))),this._currentMediaIndices=r,o}};var nc=I,ic=R,ac=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function rc(e){var t=e&&e.itemStyle;if(t)for(var n=0,i=ac.length;n<i;n++){var a=ac[n],r=t.normal,o=t.emphasis;r&&r[a]&&(e[a]=e[a]||{},e[a].normal?v(e[a].normal,r[a]):e[a].normal=r[a],r[a]=null),o&&o[a]&&(e[a]=e[a]||{},e[a].emphasis?v(e[a].emphasis,o[a]):e[a].emphasis=o[a],o[a]=null)}}function oc(e,t,n){if(e&&e[t]&&(e[t].normal||e[t].emphasis)){var i=e[t].normal,a=e[t].emphasis;i&&(n?(e[t].normal=e[t].emphasis=null,_(e[t],i)):e[t]=i),a&&(e.emphasis=e.emphasis||{},e.emphasis[t]=a)}}function sc(e){oc(e,"itemStyle"),oc(e,"lineStyle"),oc(e,"areaStyle"),oc(e,"label"),oc(e,"labelLine"),oc(e,"upperLabel"),oc(e,"edgeLabel")}function lc(e,t){var n=ic(e)&&e[t],i=ic(n)&&n.textStyle;if(i)for(var a=0,r=Oa.length;a<r;a++)t=Oa[a],i.hasOwnProperty(t)&&(n[t]=i[t])}function uc(e){e&&(sc(e),lc(e,"label"),e.emphasis&&lc(e.emphasis,"label"))}function cc(e){return z(e)?e:e?[e]:[]}function hc(e){return(z(e)?e[0]:e)||{}}function dc(e){I(pc,(function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])}))}var pc=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],fc=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],gc=function(e,t){(function(e,t){nc(cc(e.series),(function(e){ic(e)&&function(e){if(ic(e)){rc(e),sc(e),lc(e,"label"),lc(e,"upperLabel"),lc(e,"edgeLabel"),e.emphasis&&(lc(e.emphasis,"label"),lc(e.emphasis,"upperLabel"),lc(e.emphasis,"edgeLabel")),(n=e.markPoint)&&(rc(n),uc(n)),(i=e.markLine)&&(rc(i),uc(i));var t=e.markArea;t&&uc(t);var n,i,a=e.data;if("graph"===e.type){a=a||e.nodes;var r=e.links||e.edges;if(r&&!V(r))for(var o=0;o<r.length;o++)uc(r[o]);I(e.categories,(function(e){sc(e)}))}if(a&&!V(a))for(o=0;o<a.length;o++)uc(a[o]);if((n=e.markPoint)&&n.data){var s=n.data;for(o=0;o<s.length;o++)uc(s[o])}if((i=e.markLine)&&i.data){var l=i.data;for(o=0;o<l.length;o++)z(l[o])?(uc(l[o][0]),uc(l[o][1])):uc(l[o])}"gauge"===e.type?(lc(e,"axisLabel"),lc(e,"title"),lc(e,"detail")):"treemap"===e.type?(oc(e.breadcrumb,"itemStyle"),I(e.levels,(function(e){sc(e)}))):"tree"===e.type&&sc(e.leaves)}}(e)}));var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),nc(n,(function(t){nc(cc(e[t]),(function(e){e&&(lc(e,"axisLabel"),lc(e.axisPointer,"label"))}))})),nc(cc(e.parallel),(function(e){var t=e&&e.parallelAxisDefault;lc(t,"axisLabel"),lc(t&&t.axisPointer,"label")})),nc(cc(e.calendar),(function(e){oc(e,"itemStyle"),lc(e,"dayLabel"),lc(e,"monthLabel"),lc(e,"yearLabel")})),nc(cc(e.radar),(function(e){lc(e,"name")})),nc(cc(e.geo),(function(e){ic(e)&&(uc(e),nc(cc(e.regions),(function(e){uc(e)})))})),nc(cc(e.timeline),(function(e){uc(e),oc(e,"label"),oc(e,"itemStyle"),oc(e,"controlStyle",!0);var t=e.data;z(t)&&I(t,(function(e){R(e)&&(oc(e,"label"),oc(e,"itemStyle"))}))})),nc(cc(e.toolbox),(function(e){oc(e,"iconStyle"),nc(e.feature,(function(e){oc(e,"iconStyle")}))})),lc(hc(e.axisPointer),"label"),lc(hc(e.tooltip).axisPointer,"label")})(e,t),e.series=Pa(e.series),I(e.series,(function(e){if(R(e)){var t=e.type;if("line"===t)null!=e.clipOverflow&&(e.clip=e.clipOverflow);else if("pie"===t||"gauge"===t)null!=e.clockWise&&(e.clockwise=e.clockWise);else if("gauge"===t){var n=function(e,t){t=t.split(",");for(var n=e,i=0;i<t.length&&null!=(n=n&&n[t[i]]);i++);return n}(e,"pointer.color");null!=n&&function(e,t,n,i){t=t.split(",");for(var a,r=e,o=0;o<t.length-1;o++)null==r[a=t[o]]&&(r[a]={}),r=r[a];null!=r[t[o]]||(r[t[o]]=n)}(e,"itemStyle.color",n)}dc(e)}})),e.dataRange&&(e.visualMap=e.dataRange),I(fc,(function(t){var n=e[t];n&&(z(n)||(n=[n]),I(n,(function(e){dc(e)})))}))};function mc(e){I(e,(function(t,n){var i=[],a=[NaN,NaN],r=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=o.map(r,(function(r,l,u){var c,h,d=o.get(t.stackedDimension,u);if(isNaN(d))return a;s?h=o.getRawIndex(u):c=o.get(t.stackedByDimension,u);for(var p=NaN,f=n-1;0<=f;f--){var g=e[f];if(s||(h=g.data.rawIndexOf(g.stackedByDimension,c)),0<=h){var m=g.data.getByRawIndex(g.stackResultDimension,h);if(0<=d&&0<m||d<=0&&m<0){d+=m,p=m;break}}}return i[0]=d,i[1]=p,i}));o.hostModel.setData(l),t.data=l}))}function vc(e,t){Du.isInstance(e)||(e=Du.seriesDataToSource(e)),this._source=e;var n=this._data=e.data,i=e.sourceFormat;i===Au&&(this._offset=0,this._dimSize=t,this._data=n),x(this,xc[i===Mu?i+"_"+e.seriesLayoutBy:i])}var yc=vc.prototype;yc.pure=!1;var xc={arrayRows_column:{pure:yc.persistent=!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(e){return this._data[e+this._source.startIndex]},appendData:wc},arrayRows_row:{pure:!0,count:function(){var e=this._data[0];return e?Math.max(0,e.length-this._source.startIndex):0},getItem:function(e){e+=this._source.startIndex;for(var t=[],n=this._data,i=0;i<n.length;i++){var a=n[i];t.push(a?a[e]:null)}return t},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:_c,getItem:bc,appendData:wc},keyedColumns:{pure:!0,count:function(){var e=this._source.dimensionsDefine[0].name,t=this._data[e];return t?t.length:0},getItem:function(e){for(var t=[],n=this._source.dimensionsDefine,i=0;i<n.length;i++){var a=this._data[n[i].name];t.push(a?a[e]:null)}return t},appendData:function(e){var t=this._data;I(e,(function(e,n){for(var i=t[n]||(t[n]=[]),a=0;a<(e||[]).length;a++)i.push(e[a])}))}},original:{count:_c,getItem:bc,appendData:wc},typedArray:{persistent:!(yc.getSource=function(){return this._source}),pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(e,t){e-=this._offset,t=t||[];for(var n=this._dimSize*e,i=0;i<this._dimSize;i++)t[i]=this._data[n+i];return t},appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}}};function _c(){return this._data.length}function bc(e){return this._data[e]}function wc(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}var Sc={arrayRows:Mc,objectRows:function(e,t,n,i){return null!=n?e[i]:e},keyedColumns:Mc,original:function(e,t,n,i){var a=Na(e);return null!=n&&a instanceof Array?a[n]:a},typedArray:Mc};function Mc(e,t,n,i){return null!=n?e[n]:e}var Tc={arrayRows:Cc,objectRows:function(e,t,n,i){return Ic(e[t],this._dimensionInfos[t])},keyedColumns:Cc,original:function(e,t,n,i){var a=e&&(null==e.value?e:e.value);return!this._rawData.pure&&function(e){return ka(e)&&!(e instanceof Array)}(e)&&(this.hasItemOption=!0),Ic(a instanceof Array?a[i]:a,this._dimensionInfos[t])},typedArray:function(e,t,n,i){return e[i]}};function Cc(e,t,n,i){return Ic(e[i],this._dimensionInfos[t])}function Ic(e,t){var n=t&&t.type;if("ordinal"!==n)return"time"===n&&"number"!=typeof e&&null!=e&&"-"!==e&&(e=+Pl(e)),null==e||""===e?NaN:+e;var i=t&&t.ordinalMeta;return i?i.parseAndCollect(e):e}function Ac(e,t,n){if(e){var i=e.getRawDataItem(t);if(null!=i){var a,r,o=e.getProvider().getSource().sourceFormat,s=e.getDimensionInfo(n);return s&&(a=s.name,r=s.index),Sc[o](i,t,r,a)}}}function Dc(e,t,n){if(e){var i=e.getProvider().getSource().sourceFormat;if(i===Su||i===Tu){var a=e.getRawDataItem(t);return i!==Su||R(a)||(a=null),a?a[n]:void 0}}}var kc=/\{@(.+?)\}/g,Lc={getDataParams:function(e,t){var n=this.getData(t),i=this.getRawValue(e,t),a=n.getRawIndex(e),r=n.getName(e),o=n.getRawDataItem(e),s=n.getItemVisual(e,"color"),l=n.getItemVisual(e,"borderColor"),u=this.ecModel.getComponent("tooltip"),c=Ua(u&&u.get("renderMode")),h=this.mainType,d="series"===h,p=n.userOutput;return{componentType:h,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:r,dataIndex:a,data:o,dataType:t,value:i,color:s,borderColor:l,dimensionNames:p?p.dimensionNames:null,encode:p?p.encode:null,marker:ql({color:s,renderMode:c}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(e,t,n,i,a){t=t||"normal";var r=this.getData(n),o=r.getItemModel(e),s=this.getDataParams(e,n);null!=i&&s.value instanceof Array&&(s.value=s.value[i]);var l=o.get("normal"===t?[a||"label","formatter"]:[t,a||"label","formatter"]);return"function"==typeof l?(s.status=t,s.dimensionIndex=i,l(s)):"string"==typeof l?jl(l,s).replace(kc,(function(t,n){var i=n.length;return"["===n.charAt(0)&&"]"===n.charAt(i-1)&&(n=+n.slice(1,i-1)),Ac(r,e,n)})):void 0},getRawValue:function(e,t){return Ac(this.getData(t),e)},formatTooltip:function(){}};function Ec(e){return new Pc(e)}function Pc(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0,this.context}var zc=Pc.prototype;zc.perform=function(e){var t,n=this._upstream,i=e&&e.skip;if(this._dirty&&n){var a=this.context;a.data=a.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!i&&(t=this._plan(this.context));var r,o=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;function c(e){return 1<=e||(e=1),e}o===l&&s===u||(t="reset"),!this._dirty&&"reset"!==t||(this._dirty=!1,r=function(e,t){var n,i;e._dueIndex=e._outputDueEnd=e._dueEnd=0,e._settedOutputEnd=null,!t&&e._reset&&((n=e._reset(e.context))&&n.progress&&(i=n.forceFirstProgress,n=n.progress),z(n)&&!n.length&&(n=null)),e._progress=n,e._modBy=e._modDataCount=null;var a=e._downstream;return a&&a.dirty(),i}(this,i)),this._modBy=l,this._modDataCount=u;var h=e&&e.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,p=Math.min(null!=h?this._dueIndex+h:1/0,this._dueEnd);if(!i&&(r||d<p)){var f=this._progress;if(z(f))for(var g=0;g<f.length;g++)$c(this,f[g],d,p,l,u);else $c(this,f,d,p,l,u)}this._dueIndex=p;var m=null!=this._settedOutputEnd?this._settedOutputEnd:p;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var Oc,Nc,Rc,Bc,Vc,Gc,Wc=Gc={reset:function(e,t,n,i){Nc=e,Oc=t,Rc=n,Bc=i,Vc=Math.ceil(Bc/Rc),Gc.next=1<Rc&&0<Bc?Fc:Hc}};function Hc(){return Nc<Oc?Nc++:null}function Fc(){var e=Nc%Vc*Rc+Math.ceil(Nc/Vc),t=Oc<=Nc?null:e<Bc?e:Nc;return Nc++,t}function $c(e,t,n,i,a,r){Wc.reset(n,i,a,r),e._callingProgress=t,e._callingProgress({start:n,end:i,count:i-n,next:Wc.next},e.context)}zc.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},zc.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},zc.pipe=function(e){this._downstream===e&&!this._dirty||((this._downstream=e)._upstream=this,e.dirty())},zc.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},zc.getUpstream=function(){return this._upstream},zc.getDownstream=function(){return this._downstream},zc.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e};var Xc=Ha(),Yc=vu.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendVisualProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(e,t,n,i){this.seriesIndex=this.componentIndex,this.dataTask=Ec({count:jc,reset:Zc}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),zu(this);var a=this.getInitialData(e,n);Kc(a,this),this.dataTask.context.data=a,Xc(this).dataBeforeProcessed=a,Uc(this)},mergeDefaultAndTheme:function(e,t){var n=this.layoutMode,i=n?hu(e):{},a=this.subType;vu.hasClass(a)&&(a+="Series"),v(e,t.getTheme().get(this.subType)),v(e,this.getDefaultOption()),za(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&cu(e,i,n)},mergeOption:function(e,t){e=v(this.option,e,!0),this.fillDataTextStyle(e.data);var n=this.layoutMode;n&&cu(this.option,e,n),zu(this);var i=this.getInitialData(e,t);Kc(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,Xc(this).dataBeforeProcessed=i,Uc(this)},fillDataTextStyle:function(e){if(e&&!V(e))for(var t=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&za(e[n],"label",t)},getInitialData:function(){},appendData:function(e){this.getRawData().appendData(e.data)},getData:function(e){var t=Qc(this);if(t){var n=t.context.data;return null==e?n:n.getLinkedData(e)}return Xc(this).data},setData:function(e){var t=Qc(this);if(t){var n=t.context;n.data!==e&&t.modifyOutputEnd&&t.setOutputEnd(e.count()),n.outputData=e,t!==this.dataTask&&(n.data=e)}Xc(this).data=e},getSource:function(){return function(e){return Pu(e).source}(this)},getRawData:function(){return Xc(this).dataBeforeProcessed},getBaseAxis:function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},formatTooltip:function(e,t,n,i){var a=this,r="html"===(i=i||"html")?"<br/>":"\n",o="richText"===i,s={},l=0;var u=this.getData(),c=u.mapDimension("defaultedTooltip",!0),h=c.length,d=this.getRawValue(e),p=z(d),f=u.getItemVisual(e,"color");R(f)&&f.colorStops&&(f=(f.colorStops[0]||{}).color),f=f||"transparent";var g=(1<h||p&&!h?function(n){var r=D(n,(function(e,t,n){var i=u.getDimensionInfo(n);return e|(i&&!1!==i.tooltip&&null!=i.displayName)}),0),h=[];function d(e,n){var c=u.getDimensionInfo(n);if(c&&!1!==c.otherDims.tooltip){var d=c.type,p="sub"+a.seriesIndex+"at"+l,g=ql({color:f,type:"subItem",renderMode:i,markerId:p}),m="string"==typeof g?g:g.content,v=(r?m+Xl(c.displayName||"-")+": ":"")+Xl("ordinal"===d?e+"":"time"===d?t?"":Jl("yyyy/MM/dd hh:mm:ss",e):Gl(e));v&&h.push(v),o&&(s[p]=f,++l)}}c.length?I(c,(function(t){d(Ac(u,e,t),t)})):I(n,d);var p=r?o?"\n":"<br/>":"",g=p+h.join(p||", ");return{renderMode:i,content:g,style:s}}(d):function(e){return{renderMode:i,content:Xl(Gl(e)),style:s}}(h?Ac(u,e,c[0]):p?d[0]:d)).content,m=a.seriesIndex+"at"+l,v=ql({color:f,type:"item",renderMode:i,markerId:m});s[m]=f,++l;var y=u.getName(e),x=this.name;Va(this)||(x=""),x=x?Xl(x)+(t?": ":r):"";var _="string"==typeof v?v:v.content;return{html:t?_+x+g:x+_+(y?Xl(y)+": "+g:g),markers:s}},isAnimationEnabled:function(){if(a.node)return!1;var e=this.getShallow("animation");return e&&this.getData().count()>this.getShallow("animationThreshold")&&(e=!1),e},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(e,t,n){var i=this.ecModel,a=wu.getColorFromPalette.call(this,e,t,n);return a||i.getColorFromPalette(e,t,n)},coordDimToDataDim:function(e){return this.getRawData().mapDimension(e,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function Uc(e){var t=e.name;Va(e)||(e.name=function(e){var t=e.getRawData(),n=t.mapDimension("seriesName",!0),i=[];return I(n,(function(e){var n=t.getDimensionInfo(e);n.displayName&&i.push(n.displayName)})),i.join(" ")}(e)||t)}function jc(e){return e.model.getRawData().count()}function Zc(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),qc}function qc(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function Kc(e,t){I(e.CHANGABLE_METHODS,(function(n){e.wrapMethod(n,P(Jc,t))}))}function Jc(e){var t=Qc(e);t&&t.setOutputEnd(this.count())}function Qc(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var i=n.currentTask;if(i){var a=i.agentStubMap;a&&(i=a.get(e.uid))}return i}}T(Yc,Lc),T(Yc,wu);var eh=function(){this.group=new An,this.uid=_l("viewComponent")};eh.prototype={constructor:eh,init:function(e,t){},render:function(e,t,n,i){},dispose:function(){},filterForExposedEvent:null};var th=eh.prototype;function nh(){var e=Ha();return function(t){var n=e(t),i=t.pipelineContext,a=n.large,r=n.progressiveRender,o=n.large=i&&i.large,s=n.progressiveRender=i&&i.progressiveRender;return!!(a^o||r^s)&&"reset"}}th.updateView=th.updateLayout=th.updateVisual=function(e,t,n,i){},Ka(eh),nr(eh,{registerWhenExtend:!0});var ih=Ha(),ah=nh();function rh(){this.group=new An,this.uid=_l("viewChart"),this.renderTask=Ec({plan:uh,reset:ch}),this.renderTask.context={view:this}}var oh=rh.prototype={type:"chart",init:function(e,t){},render:function(e,t,n,i){},highlight:function(e,t,n,i){lh(e.getData(),i,"emphasis")},downplay:function(e,t,n,i){lh(e.getData(),i,"normal")},remove:function(e,t){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};function sh(e,t,n){if(e&&(e.trigger(t,n),e.isGroup&&!Gs(e)))for(var i=0,a=e.childCount();i<a;i++)sh(e.childAt(i),t,n)}function lh(e,t,n){var i=Wa(e,t),a=t&&null!=t.highlightKey?Ws(t.highlightKey):null;null!=i?I(Pa(i),(function(t){sh(e.getItemGraphicEl(t),n,a)})):e.eachItemGraphicEl((function(e){sh(e,n,a)}))}function uh(e){return ah(e.model)}function ch(e){var t=e.model,n=e.ecModel,i=e.api,a=e.payload,r=t.pipelineContext.progressiveRender,o=e.view,s=a&&ih(a).updateMethod,l=r?"incrementalPrepareRender":s&&o[s]?s:"render";return"render"!==l&&o[l](t,n,i,a),hh[l]}oh.updateView=oh.updateLayout=oh.updateVisual=function(e,t,n,i){this.render(e,t,n,i)},Ka(rh),nr(rh,{registerWhenExtend:!0}),rh.markUpdateMethod=function(e,t){ih(e).updateMethod=t};var hh={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},dh="\0__throttleOriginMethod",ph="\0__throttleRate",fh="\0__throttleType";function gh(e,t,n){var i,a,r,o,s,l=0,u=0,c=null;function h(){u=(new Date).getTime(),c=null,e.apply(r,o||[])}function d(){i=(new Date).getTime(),r=this,o=arguments;var e=s||t,d=s||n;s=null,a=i-(d?l:u)-e,clearTimeout(c),d?c=setTimeout(h,e):0<=a?h():c=setTimeout(h,-a),l=i}return t=t||0,d.clear=function(){c&&(clearTimeout(c),c=null)},d.debounceNextCall=function(e){s=e},d}function mh(e,t,n,i){var a=e[t];if(a){var r=a[dh]||a,o=a[fh];if(a[ph]!==n||o!==i){if(null==n||!i)return e[t]=r;(a=e[t]=gh(r,n,"debounce"===i))[dh]=r,a[fh]=i,a[ph]=n}return a}}function vh(e,t){var n=e[t];n&&n[dh]&&(e[t]=n[dh])}var yh={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),i=(e.visualColorAccessPath||"itemStyle.color").split("."),a=e.get(i),r=!O(a)||a instanceof es?null:a;a&&!r||(a=e.getColorFromPalette(e.name,null,t.getSeriesCount())),n.setVisual("color",a);var o=(e.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),s=e.get(o);if(n.setVisual("borderColor",s),!t.isSeriesFiltered(e))return r&&n.each((function(t){n.setItemVisual(t,"color",r(e.getDataParams(t)))})),{dataEach:n.hasItemOption?function(e,t){var n=e.getItemModel(t),a=n.get(i,!0),r=n.get(o,!0);null!=a&&e.setItemVisual(t,"color",a),null!=r&&e.setItemVisual(t,"borderColor",r)}:null}}},xh={legend:{selector:{all:"\u5168\u9009",inverse:"\u53cd\u9009"}},toolbox:{brush:{title:{rect:"\u77e9\u5f62\u9009\u62e9",polygon:"\u5708\u9009",lineX:"\u6a2a\u5411\u9009\u62e9",lineY:"\u7eb5\u5411\u9009\u62e9",keep:"\u4fdd\u6301\u9009\u62e9",clear:"\u6e05\u9664\u9009\u62e9"}},dataView:{title:"\u6570\u636e\u89c6\u56fe",lang:["\u6570\u636e\u89c6\u56fe","\u5173\u95ed","\u5237\u65b0"]},dataZoom:{title:{zoom:"\u533a\u57df\u7f29\u653e",back:"\u533a\u57df\u7f29\u653e\u8fd8\u539f"}},magicType:{title:{line:"\u5207\u6362\u4e3a\u6298\u7ebf\u56fe",bar:"\u5207\u6362\u4e3a\u67f1\u72b6\u56fe",stack:"\u5207\u6362\u4e3a\u5806\u53e0",tiled:"\u5207\u6362\u4e3a\u5e73\u94fa"}},restore:{title:"\u8fd8\u539f"},saveAsImage:{title:"\u4fdd\u5b58\u4e3a\u56fe\u7247",lang:["\u53f3\u952e\u53e6\u5b58\u4e3a\u56fe\u7247"]}},series:{typeNames:{pie:"\u997c\u56fe",bar:"\u67f1\u72b6\u56fe",line:"\u6298\u7ebf\u56fe",scatter:"\u6563\u70b9\u56fe",effectScatter:"\u6d9f\u6f2a\u6563\u70b9\u56fe",radar:"\u96f7\u8fbe\u56fe",tree:"\u6811\u56fe",treemap:"\u77e9\u5f62\u6811\u56fe",boxplot:"\u7bb1\u578b\u56fe",candlestick:"K\u7ebf\u56fe",k:"K\u7ebf\u56fe",heatmap:"\u70ed\u529b\u56fe",map:"\u5730\u56fe",parallel:"\u5e73\u884c\u5750\u6807\u56fe",lines:"\u7ebf\u56fe",graph:"\u5173\u7cfb\u56fe",sankey:"\u6851\u57fa\u56fe",funnel:"\u6f0f\u6597\u56fe",gauge:"\u4eea\u8868\u76d8\u56fe",pictorialBar:"\u8c61\u5f62\u67f1\u56fe",themeRiver:"\u4e3b\u9898\u6cb3\u6d41\u56fe",sunburst:"\u65ed\u65e5\u56fe"}},aria:{general:{withTitle:"\u8fd9\u662f\u4e00\u4e2a\u5173\u4e8e\u201c{title}\u201d\u7684\u56fe\u8868\u3002",withoutTitle:"\u8fd9\u662f\u4e00\u4e2a\u56fe\u8868\uff0c"},series:{single:{prefix:"",withName:"\u56fe\u8868\u7c7b\u578b\u662f{seriesType}\uff0c\u8868\u793a{seriesName}\u3002",withoutName:"\u56fe\u8868\u7c7b\u578b\u662f{seriesType}\u3002"},multiple:{prefix:"\u5b83\u7531{seriesCount}\u4e2a\u56fe\u8868\u7cfb\u5217\u7ec4\u6210\u3002",withName:"\u7b2c{seriesId}\u4e2a\u7cfb\u5217\u662f\u4e00\u4e2a\u8868\u793a{seriesName}\u7684{seriesType}\uff0c",withoutName:"\u7b2c{seriesId}\u4e2a\u7cfb\u5217\u662f\u4e00\u4e2a{seriesType}\uff0c",separator:{middle:"\uff1b",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636e\u662f\u2014\u2014",partialData:"\u5176\u4e2d\uff0c\u524d{displayCnt}\u9879\u662f\u2014\u2014",withName:"{name}\u7684\u6570\u636e\u662f{value}",withoutName:"{value}",separator:{middle:"\uff0c",end:""}}}},_h=Math.PI;function bh(e,t,n,i){this.ecInstance=e,this.api=t,this.unfinished,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i),this._stageTaskMap=Q()}var wh=bh.prototype;function Sh(e,t,n,i,a){var r;function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}a=a||{},I(t,(function(t,s){if(!a.visualType||a.visualType===t.visualType){var l=e._stageTaskMap.get(t.uid),u=l.seriesTaskMap,c=l.overallTask;if(c){var h,d=c.agentStubMap;d.each((function(e){o(a,e)&&(e.dirty(),h=!0)})),h&&c.dirty(),Mh(c,i);var p=e.getPerformArgs(c,a.block);d.each((function(e){e.perform(p)})),r|=c.perform(p)}else u&&u.each((function(s,l){o(a,s)&&s.dirty();var u=e.getPerformArgs(s,a.block);u.skip=!t.performRawSeries&&n.isSeriesFiltered(s.context.model),Mh(s,i),r|=s.perform(u)}))}})),e.unfinished|=r}wh.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each((function(e){var t=e.overallTask;t&&t.dirty()}))},wh.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,a=!t&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,r=i&&i.modDataCount;return{step:a,modBy:null!=r?Math.ceil(r/a):null,modDataCount:r}}},wh.getPipeline=function(e){return this._pipelineMap.get(e)},wh.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),i=e.getData().count(),a=n.progressiveEnabled&&t.incrementalPrepareRender&&i>=n.threshold,r=e.get("large")&&i>=e.get("largeThreshold"),o="mod"===e.get("progressiveChunkMode")?i:null;e.pipelineContext=n.context={progressiveRender:a,modDataCount:o,large:r}},wh.restorePipelines=function(e){var t=this,n=t._pipelineMap=Q();e.eachSeries((function(e){var i=e.getProgressive(),a=e.uid;n.set(a,{id:a,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:i&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),zh(t,e,e.dataTask)}))},wh.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.ecInstance.getModel(),n=this.api;I(this._allHandlers,(function(i){var a=e.get(i.uid)||e.set(i.uid,[]);i.reset&&function(e,t,n,i,a){var r=n.seriesTaskMap||(n.seriesTaskMap=Q()),o=t.seriesType,s=t.getTargetSeries;function l(n){var o=n.uid,s=r.get(o)||r.set(o,Ec({plan:Dh,reset:kh,count:Ph}));s.context={model:n,ecModel:i,api:a,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:e},zh(e,n,s)}t.createOnAllSeries?i.eachRawSeries(l):o?i.eachRawSeriesByType(o,l):s&&s(i,a).each(l);var u=e._pipelineMap;r.each((function(e,t){u.get(t)||(e.dispose(),r.removeKey(t))}))}(this,i,a,t,n),i.overallReset&&function(e,t,n,i,a){var r=n.overallTask=n.overallTask||Ec({reset:Th});r.context={ecModel:i,api:a,overallReset:t.overallReset,scheduler:e};var o=r.agentStubMap=r.agentStubMap||Q(),s=t.seriesType,l=t.getTargetSeries,u=!0,c=t.modifyOutputEnd;function h(t){var n=t.uid,i=o.get(n);i||(i=o.set(n,Ec({reset:Ch,onDirty:Ah})),r.dirty()),i.context={model:t,overallProgress:u,modifyOutputEnd:c},i.agent=r,i.__block=u,zh(e,t,i)}s?i.eachRawSeriesByType(s,h):l?l(i,a).each(h):(u=!1,I(i.getSeries(),h));var d=e._pipelineMap;o.each((function(e,t){d.get(t)||(e.dispose(),r.dirty(),o.removeKey(t))}))}(this,i,a,t,n)}),this)},wh.prepareView=function(e,t,n,i){var a=e.renderTask,r=a.context;r.model=t,r.ecModel=n,r.api=i,a.__block=!e.incrementalPrepareRender,zh(this,t,a)},wh.performDataProcessorTasks=function(e,t){Sh(this,this._dataProcessorHandlers,e,t,{block:!0})},wh.performVisualTasks=function(e,t,n){Sh(this,this._visualHandlers,e,t,n)},wh.performSeriesTasks=function(e){var t;e.eachSeries((function(e){t|=e.dataTask.perform()})),this.unfinished|=t},wh.plan=function(){this._pipelineMap.each((function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)}))};var Mh=wh.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)};function Th(e){e.overallReset(e.ecModel,e.api,e.payload)}function Ch(e,t){return e.overallProgress&&Ih}function Ih(){this.agent.dirty(),this.getDownstream().dirty()}function Ah(){this.agent&&this.agent.dirty()}function Dh(e){return e.plan&&e.plan(e.model,e.ecModel,e.api,e.payload)}function kh(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=Pa(e.reset(e.model,e.ecModel,e.api,e.payload));return 1<t.length?A(t,(function(e,t){return Eh(t)})):Lh}var Lh=Eh(0);function Eh(e){return function(t,n){var i=n.data,a=n.resetDefines[e];if(a&&a.dataEach)for(var r=t.start;r<t.end;r++)a.dataEach(i,r);else a&&a.progress&&a.progress(t,i)}}function Ph(e){return e.data.count()}function zh(e,t,n){var i=t.uid,a=e._pipelineMap.get(i);a.head||(a.head=n),a.tail&&a.tail.pipe(n),(a.tail=n).__idxInPipeline=a.count++,n.__pipeline=a}bh.wrapStageHandler=function(e,t){return O(e)&&(e={overallReset:e,seriesType:function(e){Oh=null;try{e(Nh,Rh)}catch(e){}return Oh}(e)}),e.uid=_l("stageHandler"),t&&(e.visualType=t),e};var Oh,Nh={},Rh={};function Bh(e,t){for(var n in t.prototype)e[n]=te}function Vh(){return{axisLine:{lineStyle:{color:Hh}},axisTick:{lineStyle:{color:Hh}},axisLabel:{textStyle:{color:Hh}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:Hh}}}}Bh(Nh,Hu),Bh(Rh,Yu),Nh.eachSeriesByType=Nh.eachRawSeriesByType=function(e){Oh=e},Nh.eachComponent=function(e){"series"===e.mainType&&e.subType&&(Oh=e.subType)};var Gh=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],Wh={color:Gh,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Gh]},Hh="#eee",Fh=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],$h={color:Fh,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:Hh},crossStyle:{color:Hh},label:{color:"#000"}}},legend:{textStyle:{color:Hh}},textStyle:{color:Hh},title:{textStyle:{color:Hh}},toolbox:{iconStyle:{normal:{borderColor:Hh}}},dataZoom:{textStyle:{color:Hh}},visualMap:{textStyle:{color:Hh}},timeline:{lineStyle:{color:Hh},itemStyle:{normal:{color:Fh[1]}},label:{normal:{textStyle:{color:Hh}}},controlStyle:{normal:{color:Hh,borderColor:Hh}}},timeAxis:Vh(),logAxis:Vh(),valueAxis:Vh(),categoryAxis:Vh(),line:{symbol:"circle"},graph:{color:Fh},gauge:{title:{textStyle:{color:Hh}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};$h.categoryAxis.splitLine.show=!1,vu.extend({type:"dataset",defaultOption:{seriesLayoutBy:"column",sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){!function(e){var t=e.option.source,n=Iu;if(V(t))n=Au;else if(z(t)){0===t.length&&(n=Mu);for(var i=0,a=t.length;i<a;i++){var r=t[i];if(null!=r){if(z(r)){n=Mu;break}if(R(r)){n=Tu;break}}}}else if(R(t)){for(var o in t)if(t.hasOwnProperty(o)&&C(t[o])){n=Cu;break}}else if(null!=t)throw new Error("Invalid data");Pu(e).sourceFormat=n}(this)}}),eh.extend({type:"dataset"});var Xh=vo.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(e,t){var n=t.cx,i=t.cy,a=t.rx,r=t.ry,o=.5522848*a,s=.5522848*r;e.moveTo(n-a,i),e.bezierCurveTo(n-a,i-s,n-o,i-r,n,i-r),e.bezierCurveTo(n+o,i-r,n+a,i-s,n+a,i),e.bezierCurveTo(n+a,i+s,n+o,i+r,n,i+r),e.bezierCurveTo(n-o,i+r,n-a,i+s,n-a,i),e.closePath()}}),Yh=/[\s,]+/;function Uh(e){for(N(e)&&(e=(new DOMParser).parseFromString(e,"text/xml")),9===e.nodeType&&(e=e.firstChild);"svg"!==e.nodeName.toLowerCase()||1!==e.nodeType;)e=e.nextSibling;return e}function jh(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}jh.prototype.parse=function(e,t){t=t||{};var n=Uh(e);if(!n)throw new Error("Illegal svg");var i=new An;this._root=i;var a=n.getAttribute("viewBox")||"",r=parseFloat(n.getAttribute("width")||t.width),o=parseFloat(n.getAttribute("height")||t.height);isNaN(r)&&(r=null),isNaN(o)&&(o=null),ed(n,i,null,!0);for(var s,l,u=n.firstChild;u;)this._parseNode(u,i),u=u.nextSibling;if(a){var c=j(a).split(Yh);4<=c.length&&(s={x:parseFloat(c[0]||0),y:parseFloat(c[1]||0),width:parseFloat(c[2]),height:parseFloat(c[3])})}if(s&&null!=r&&null!=o&&(l=rd(s,r,o),!t.ignoreViewBox)){var h=i;(i=new An).add(h),h.scale=l.scale.slice(),h.position=l.position.slice()}return t.ignoreRootClip||null==r||null==o||i.setClipPath(new Zo({shape:{x:0,y:0,width:r,height:o}})),{root:i,width:r,height:o,viewBoxRect:s,viewBoxTransform:l}},jh.prototype._parseNode=function(e,t){var n,i,a=e.nodeName.toLowerCase();if("defs"===a?this._isDefine=!0:"text"===a&&(this._isText=!0),this._isDefine){if(i=qh[a]){var r=i.call(this,e),o=e.getAttribute("id");o&&(this._defs[o]=r)}}else(i=Zh[a])&&(n=i.call(this,e,t),t.add(n));for(var s=e.firstChild;s;)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===a?this._isDefine=!1:"text"===a&&(this._isText=!1)},jh.prototype._parseText=function(e,t){if(1===e.nodeType){var n=e.getAttribute("dx")||0,i=e.getAttribute("dy")||0;this._textX+=parseFloat(n),this._textY+=parseFloat(i)}var a=new zo({style:{text:e.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});Kh(t,a),ed(e,a,this._defs);var r=a.style.fontSize;r&&r<9&&(a.style.fontSize=9,a.scale=a.scale||[1,1],a.scale[0]*=r/9,a.scale[1]*=r/9);var o=a.getBoundingRect();return this._textX+=o.width,t.add(a),a};var Zh={g:function(e,t){var n=new An;return Kh(t,n),ed(e,n,this._defs),n},rect:function(e,t){var n=new Zo;return Kh(t,n),ed(e,n,this._defs),n.setShape({x:parseFloat(e.getAttribute("x")||0),y:parseFloat(e.getAttribute("y")||0),width:parseFloat(e.getAttribute("width")||0),height:parseFloat(e.getAttribute("height")||0)}),n},circle:function(e,t){var n=new No;return Kh(t,n),ed(e,n,this._defs),n.setShape({cx:parseFloat(e.getAttribute("cx")||0),cy:parseFloat(e.getAttribute("cy")||0),r:parseFloat(e.getAttribute("r")||0)}),n},line:function(e,t){var n=new Ko;return Kh(t,n),ed(e,n,this._defs),n.setShape({x1:parseFloat(e.getAttribute("x1")||0),y1:parseFloat(e.getAttribute("y1")||0),x2:parseFloat(e.getAttribute("x2")||0),y2:parseFloat(e.getAttribute("y2")||0)}),n},ellipse:function(e,t){var n=new Xh;return Kh(t,n),ed(e,n,this._defs),n.setShape({cx:parseFloat(e.getAttribute("cx")||0),cy:parseFloat(e.getAttribute("cy")||0),rx:parseFloat(e.getAttribute("rx")||0),ry:parseFloat(e.getAttribute("ry")||0)}),n},polygon:function(e,t){var n=e.getAttribute("points");n=n&&Jh(n);var i=new Ho({shape:{points:n||[]}});return Kh(t,i),ed(e,i,this._defs),i},polyline:function(e,t){var n=new vo;Kh(t,n),ed(e,n,this._defs);var i=e.getAttribute("points");return i=i&&Jh(i),new Fo({shape:{points:i||[]}})},image:function(e,t){var n=new Zi;return Kh(t,n),ed(e,n,this._defs),n.setStyle({image:e.getAttribute("xlink:href"),x:e.getAttribute("x"),y:e.getAttribute("y"),width:e.getAttribute("width"),height:e.getAttribute("height")}),n},text:function(e,t){var n=e.getAttribute("x")||0,i=e.getAttribute("y")||0,a=e.getAttribute("dx")||0,r=e.getAttribute("dy")||0;this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(r);var o=new An;return Kh(t,o),ed(e,o,this._defs),o},tspan:function(e,t){var n=e.getAttribute("x"),i=e.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var a=e.getAttribute("dx")||0,r=e.getAttribute("dy")||0,o=new An;return Kh(t,o),ed(e,o,this._defs),this._textX+=a,this._textY+=r,o},path:function(e,t){var n=Po(e.getAttribute("d")||"");return Kh(t,n),ed(e,n,this._defs),n}},qh={lineargradient:function(e){var t=new as(parseInt(e.getAttribute("x1")||0,10),parseInt(e.getAttribute("y1")||0,10),parseInt(e.getAttribute("x2")||10,10),parseInt(e.getAttribute("y2")||0,10));return function(e,t){for(var n=e.firstChild;n;){if(1===n.nodeType){var i=n.getAttribute("offset");i=0<i.indexOf("%")?parseInt(i,10)/100:i?parseFloat(i):0;var a=n.getAttribute("stop-color")||"#000000";t.addColorStop(i,a)}n=n.nextSibling}}(e,t),t},radialgradient:function(e){}};function Kh(e,t){e&&e.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),_(t.__inheritedStyle,e.__inheritedStyle))}function Jh(e){for(var t=j(e).split(Yh),n=[],i=0;i<t.length;i+=2){var a=parseFloat(t[i]),r=parseFloat(t[i+1]);n.push([a,r])}return n}var Qh={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 ed(e,t,n,i){var a=t.__inheritedStyle||{},r="text"===t.type;if(1===e.nodeType&&(function(e,t){var n=e.getAttribute("transform");if(n){n=n.replace(/,/g," ");var i=null,a=[];n.replace(id,(function(e,t,n){a.push(t,n)}));for(var r=a.length-1;0<r;r-=2){var o=a[r],s=a[r-1];switch(i=i||at(),s){case"translate":o=j(o).split(Yh),lt(i,i,[parseFloat(o[0]),parseFloat(o[1]||0)]);break;case"scale":o=j(o).split(Yh),ct(i,i,[parseFloat(o[0]),parseFloat(o[1]||o[0])]);break;case"rotate":o=j(o).split(Yh),ut(i,i,parseFloat(o[0]));break;case"skew":o=j(o).split(Yh),console.warn("Skew transform is not supported yet");break;case"matrix":o=j(o).split(Yh),i[0]=parseFloat(o[0]),i[1]=parseFloat(o[1]),i[2]=parseFloat(o[2]),i[3]=parseFloat(o[3]),i[4]=parseFloat(o[4]),i[5]=parseFloat(o[5])}}t.setLocalTransform(i)}}(e,t),x(a,function(e){var t=e.getAttribute("style"),n={};if(!t)return n;var i,a={};for(ad.lastIndex=0;null!=(i=ad.exec(t));)a[i[1]]=i[2];for(var r in Qh)Qh.hasOwnProperty(r)&&null!=a[r]&&(n[Qh[r]]=a[r]);return n}(e)),!i))for(var o in Qh)if(Qh.hasOwnProperty(o)){var s=e.getAttribute(o);null!=s&&(a[Qh[o]]=s)}var l=r?"textFill":"fill",u=r?"textStroke":"stroke";t.style=t.style||new Fn;var c=t.style;null!=a.fill&&c.set(l,nd(a.fill,n)),null!=a.stroke&&c.set(u,nd(a.stroke,n)),I(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],(function(e){var t="lineWidth"===e&&r?"textStrokeWidth":e;null!=a[e]&&c.set(t,parseFloat(a[e]))})),a.textBaseline&&"auto"!==a.textBaseline||(a.textBaseline="alphabetic"),"alphabetic"===a.textBaseline&&(a.textBaseline="bottom"),"start"===a.textAlign&&(a.textAlign="left"),"end"===a.textAlign&&(a.textAlign="right"),I(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],(function(e){null!=a[e]&&c.set(e,a[e])})),a.lineDash&&(t.style.lineDash=j(a.lineDash).split(Yh)),c[u]&&"none"!==c[u]&&(t[u]=!0),t.__inheritedStyle=a}var td=/url\(\s*#(.*?)\)/;function nd(e,t){var n=t&&e&&e.match(td);return n?t[j(n[1])]:e}var id=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g,ad=/([^\s:;]+)\s*:\s*([^:;]+)/g;function rd(e,t,n){var i=t/e.width,a=n/e.height,r=Math.min(i,a);return{scale:[r,r],position:[-(e.x+e.width/2)*r+t/2,-(e.y+e.height/2)*r+n/2]}}var od=Q(),sd=function(e,t,n){var i;return I(i=z(t)?t:t.svg?[{type:"svg",source:t.svg,specialAreas:t.specialAreas}]:(t.geoJson&&!t.features&&(n=t.specialAreas,t=t.geoJson),[{type:"geoJSON",source:t,specialAreas:n}]),(function(e){var t=e.type;"geoJson"===t&&(t=e.type="geoJSON"),(0,ud[t])(e)})),od.set(e,i)},ld=function(e){return od.get(e)},ud={geoJSON:function(e){var t=e.source;e.geoJSON=N(t)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(t):new Function("return ("+t+");")():t},svg:function(e){e.svgXML=Uh(e.source)}},cd=U,hd=I,dd=O,pd=R,fd=vu.parseClassType,gd={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:3500,COMPONENT:4e3,BRUSH:5e3}},md="__flagInMainProcess",vd="__optionUpdated",yd=/^[a-zA-Z0-9_]+$/;function xd(e,t){return function(n,i,a){!t&&this._disposed||(n=n&&n.toLowerCase(),De.prototype[e].call(this,n,i,a))}}function _d(){De.call(this)}function bd(e,t,n){n=n||{},"string"==typeof t&&(t=Xd[t]),this.id,this.group,this._dom=e;var i=this._zr=Ta(e,{renderer:n.renderer||"canvas",devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height});this._throttledZrFlush=gh(E(i.flush,i),17),(t=m(t))&&gc(t,!0),this._theme=t,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new ju;var a=this._api=function(e){var t=e._coordSysMgr;return x(new Yu(e),{getCoordinateSystems:E(t.getCoordinateSystems,t),getComponentByElement:function(t){for(;t;){var n=t.__ecComponentInfo;if(null!=n)return e._model.getComponent(n.mainType,n.index);t=t.parent}}})}(this);function r(e,t){return e.__prio-t.__prio}zn($d,r),zn(Wd,r),this._scheduler=new bh(this,a,Wd,$d),De.call(this,this._ecEventProcessor=new Bd),this._messageCenter=new _d,this._initEvents(),this.resize=E(this.resize,this),this._pendingActions=[],i.animation.on("frame",this._onframe,this),function(e,t){e.on("rendered",(function(){t.trigger("rendered"),!e.animation.isFinished()||t[vd]||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")}))}(i,this),q(this)}_d.prototype.on=xd("on",!0),_d.prototype.off=xd("off",!0),_d.prototype.one=xd("one",!0),T(_d,De);var wd=bd.prototype;function Sd(e,t,n){if(!this._disposed){var i,a=this._model,r=this._coordSysMgr.getCoordinateSystems();t=$a(a,t);for(var o=0;o<r.length;o++){var s=r[o];if(s[e]&&null!=(i=s[e](a,t,n)))return i}}}wd._onframe=function(){if(!this._disposed){var e=this._scheduler;if(this[vd]){var t=this[vd].silent;this[md]=!0,Td(this),Md.update.call(this),this[md]=!1,this[vd]=!1,Dd.call(this,t),kd.call(this,t)}else if(e.unfinished){var n=1,i=this._model,a=this._api;e.unfinished=!1;do{var r=+new Date;e.performSeriesTasks(i),e.performDataProcessorTasks(i),Id(this,i),e.performVisualTasks(i),zd(this,this._model,a,"remain"),n-=+new Date-r}while(0<n&&e.unfinished);e.unfinished||this._zr.flush()}}},wd.getDom=function(){return this._dom},wd.getZr=function(){return this._zr},wd.setOption=function(e,t,n){if(!this._disposed){var i;if(pd(t)&&(n=t.lazyUpdate,i=t.silent,t=t.notMerge),this[md]=!0,!this._model||t){var a=new ec(this._api),r=this._theme,o=this._model=new Hu;o.scheduler=this._scheduler,o.init(null,null,r,a)}this._model.setOption(e,Hd),n?(this[vd]={silent:i},this[md]=!1):(Td(this),Md.update.call(this),this._zr.flush(),this[vd]=!1,this[md]=!1,Dd.call(this,i),kd.call(this,i))}},wd.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},wd.getModel=function(){return this._model},wd.getOption=function(){return this._model&&this._model.getOption()},wd.getWidth=function(){return this._zr.getWidth()},wd.getHeight=function(){return this._zr.getHeight()},wd.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},wd.getRenderedCanvas=function(e){if(a.canvasSupported)return(e=e||{}).pixelRatio=e.pixelRatio||1,e.backgroundColor=e.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(e)},wd.getSvgDataURL=function(){if(a.svgSupported){var e=this._zr;return I(e.storage.getDisplayList(),(function(e){e.stopAnimation(!0)})),e.painter.toDataURL()}},wd.getDataURL=function(e){if(!this._disposed){var t=(e=e||{}).excludeComponents,n=this._model,i=[],a=this;hd(t,(function(e){n.eachComponent({mainType:e},(function(e){var t=a._componentsMap[e.__viewId];t.group.ignore||(i.push(t),t.group.ignore=!0)}))}));var r="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return hd(i,(function(e){e.group.ignore=!1})),r}},wd.getConnectedDataURL=function(e){if(!this._disposed&&a.canvasSupported){var t="svg"===e.type,n=this.group,i=Math.min,r=Math.max;if(jd[n]){var o=1/0,s=1/0,l=-1/0,u=-1/0,c=[],h=e&&e.pixelRatio||1;I(Ud,(function(a,h){if(a.group===n){var d=t?a.getZr().painter.getSvgDom().innerHTML:a.getRenderedCanvas(m(e)),p=a.getDom().getBoundingClientRect();o=i(p.left,o),s=i(p.top,s),l=r(p.right,l),u=r(p.bottom,u),c.push({dom:d,left:p.left,top:p.top})}}));var d=(l*=h)-(o*=h),p=(u*=h)-(s*=h),f=b(),g=Ta(f,{renderer:t?"svg":"canvas"});if(g.resize({width:d,height:p}),t){var v="";return hd(c,(function(e){var t=e.left-o,n=e.top-s;v+='<g transform="translate('+t+","+n+')">'+e.dom+"</g>"})),g.painter.getSvgRoot().innerHTML=v,e.connectedBackgroundColor&&g.painter.setBackgroundColor(e.connectedBackgroundColor),g.refreshImmediately(),g.painter.toDataURL()}return e.connectedBackgroundColor&&g.add(new Zo({shape:{x:0,y:0,width:d,height:p},style:{fill:e.connectedBackgroundColor}})),hd(c,(function(e){var t=new Zi({style:{x:e.left*h-o,y:e.top*h-s,image:e.dom}});g.add(t)})),g.refreshImmediately(),f.toDataURL("image/"+(e&&e.type||"png"))}return this.getDataURL(e)}},wd.convertToPixel=P(Sd,"convertToPixel"),wd.convertFromPixel=P(Sd,"convertFromPixel"),wd.containPixel=function(e,t){var n;if(!this._disposed)return I(e=$a(this._model,e),(function(e,i){0<=i.indexOf("Models")&&I(e,(function(e){var a=e.coordinateSystem;if(a&&a.containPoint)n|=!!a.containPoint(t);else if("seriesModels"===i){var r=this._chartsMap[e.__viewId];r&&r.containPoint&&(n|=r.containPoint(t,e))}}),this)}),this),!!n},wd.getVisual=function(e,t){var n=(e=$a(this._model,e,{defaultMainType:"series"})).seriesModel.getData(),i=e.hasOwnProperty("dataIndexInside")?e.dataIndexInside:e.hasOwnProperty("dataIndex")?n.indexOfRawIndex(e.dataIndex):null;return null!=i?n.getItemVisual(i,t):n.getVisual(t)},wd.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},wd.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]};var Md={prepareAndUpdate:function(e){Td(this),Md.update.call(this,e)},update:function(e){var t=this._model,n=this._api,i=this._zr,r=this._coordSysMgr,o=this._scheduler;if(t){o.restoreData(t,e),o.performSeriesTasks(t),r.create(t,n),o.performDataProcessorTasks(t,e),Id(this,t),r.update(t,n),Ed(t),o.performVisualTasks(t,e),Pd(this,t,n,e);var s=t.get("backgroundColor")||"transparent";if(a.canvasSupported)i.setBackgroundColor(s);else{var l=Gt(s);s=qt(l,"rgb"),0===l[3]&&(s="transparent")}Od(t,n)}},updateTransform:function(e){var t=this._model,n=this,i=this._api;if(t){var a=[];t.eachComponent((function(r,o){var s=n.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(o,t,i,e);l&&l.update&&a.push(s)}else a.push(s)}));var r=Q();t.eachSeries((function(a){var o=n._chartsMap[a.__viewId];if(o.updateTransform){var s=o.updateTransform(a,t,i,e);s&&s.update&&r.set(a.uid,1)}else r.set(a.uid,1)})),Ed(t),this._scheduler.performVisualTasks(t,e,{setDirty:!0,dirtyMap:r}),zd(n,t,i,e,r),Od(t,this._api)}},updateView:function(e){var t=this._model;t&&(rh.markUpdateMethod(e,"updateView"),Ed(t),this._scheduler.performVisualTasks(t,e,{setDirty:!0}),Pd(this,this._model,this._api,e),Od(t,this._api))},updateVisual:function(e){Md.update.call(this,e)},updateLayout:function(e){Md.update.call(this,e)}};function Td(e){var t=e._model,n=e._scheduler;n.restorePipelines(t),n.prepareStageTasks(),Ld(e,"component",t,n),Ld(e,"chart",t,n),n.plan()}function Cd(e,t,n,i,a){var r=e._model;if(i){var o={};o[i+"Id"]=n[i+"Id"],o[i+"Index"]=n[i+"Index"],o[i+"Name"]=n[i+"Name"];var s={mainType:i,query:o};a&&(s.subType=a);var l=n.excludeSeriesId;null!=l&&(l=Q(Pa(l))),r&&r.eachComponent(s,(function(t){l&&null!=l.get(t.id)||u(e["series"===i?"_chartsMap":"_componentsMap"][t.__viewId])}),e)}else hd(e._componentsViews.concat(e._chartsViews),u);function u(i){i&&i.__alive&&i[t]&&i[t](i.__model,r,e._api,n)}}function Id(e,t){var n=e._chartsMap,i=e._scheduler;t.eachSeries((function(e){i.updateStreamModes(e,n[e.__viewId])}))}function Ad(e,t){var n=e.type,i=e.escapeConnect,a=Vd[n],r=a.actionInfo,o=(r.update||"update").split(":"),s=o.pop();o=null!=o[0]&&fd(o[0]),this[md]=!0;var l=[e],u=!1;e.batch&&(u=!0,l=A(e.batch,(function(t){return(t=_(x({},t),e)).batch=null,t})));var c,h=[],d="highlight"===n||"downplay"===n;hd(l,(function(e){(c=(c=a.action(e,this._model,this._api))||x({},e)).type=r.event||c.type,h.push(c),d?Cd(this,s,e,"series"):o&&Cd(this,s,e,o.main,o.sub)}),this),"none"===s||d||o||(this[vd]?(Td(this),Md.update.call(this,e),this[vd]=!1):Md[s].call(this,e)),c=u?{type:r.event||n,escapeConnect:i,batch:h}:h[0],this[md]=!1,t||this._messageCenter.trigger(c.type,c)}function Dd(e){for(var t=this._pendingActions;t.length;){var n=t.shift();Ad.call(this,n,e)}}function kd(e){e||this.trigger("updated")}function Ld(e,t,n,i){for(var a="component"===t,r=a?e._componentsViews:e._chartsViews,o=a?e._componentsMap:e._chartsMap,s=e._zr,l=e._api,u=0;u<r.length;u++)r[u].__alive=!1;function c(e){var t="_ec_"+e.id+"_"+e.type,u=o[t];if(!u){var c=fd(e.type);(u=new(a?eh.getClass(c.main,c.sub):rh.getClass(c.sub))).init(n,l),o[t]=u,r.push(u),s.add(u.group)}e.__viewId=u.__id=t,u.__alive=!0,u.__model=e,u.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},a||i.prepareView(u,e,n,l)}for(a?n.eachComponent((function(e,t){"series"!==e&&c(t)})):n.eachSeries(c),u=0;u<r.length;){var h=r[u];h.__alive?u++:(a||h.renderTask.dispose(),s.remove(h.group),h.dispose(n,l),r.splice(u,1),delete o[h.__id],h.__id=h.group.__ecComponentInfo=null)}}function Ed(e){e.clearColorPalette(),e.eachSeries((function(e){e.clearColorPalette()}))}function Pd(e,t,n,i){!function(e,t,n,i,a){hd(e._componentsViews,(function(e){var a=e.__model;e.render(a,t,n,i),Rd(a,e)}))}(e,t,n,i),hd(e._chartsViews,(function(e){e.__alive=!1})),zd(e,t,n,i),hd(e._chartsViews,(function(e){e.__alive||e.remove(t,n)}))}function zd(e,t,n,i,r){var o,s=e._scheduler;t.eachSeries((function(t){var n=e._chartsMap[t.__viewId];n.__alive=!0;var a=n.renderTask;s.updatePayload(a,i),r&&r.get(t.uid)&&a.dirty(),o|=a.perform(s.getPerformArgs(a)),n.group.silent=!!t.get("silent"),Rd(t,n),function(e,t){var n=e.get("blendMode")||null;t.group.traverse((function(e){e.isGroup||e.style.blend!==n&&e.setStyle("blend",n),e.eachPendingDisplayable&&e.eachPendingDisplayable((function(e){e.setStyle("blend",n)}))}))}(t,n)})),s.unfinished|=o,function(e,t){var n=e._zr.storage,i=0;n.traverse((function(e){i++})),i>t.get("hoverLayerThreshold")&&!a.node&&t.eachSeries((function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.group.traverse((function(e){e.useHoverLayer=!0}))}}))}(e,t),function(e,t){var n=t.getModel("aria");if(n.get("show"))if(n.get("description"))e.setAttribute("aria-label",n.get("description"));else{var i=0;t.eachSeries((function(e,t){++i}),this);var a,r=n.get("data.maxCount")||10,o=n.get("series.maxCount")||10,s=Math.min(i,o);if(!(i<1)){var l=function(){var e=t.getModel("title").option;return e&&e.length&&(e=e[0]),e&&e.text}();a=l?c(h("general.withTitle"),{title:l}):h("general.withoutTitle");var u=[];a+=c(h(1<i?"series.multiple.prefix":"series.single.prefix"),{seriesCount:i}),t.eachSeries((function(e,t){if(t<s){var n,a=e.get("name"),o="series."+(1<i?"multiple":"single")+".";n=c(n=h(a?o+"withName":o+"withoutName"),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:function(e){return xh.series.typeNames[e]||"\u81ea\u5b9a\u4e49\u56fe"}(e.subType)});var l=e.getData();(window.data=l).count()>r?n+=c(h("data.partialData"),{displayCnt:r}):n+=h("data.allData");for(var d=[],p=0;p<l.count();p++)if(p<r){var f=l.getName(p),g=Ac(l,p);d.push(c(h(f?"data.withName":"data.withoutName"),{name:f,value:g}))}n+=d.join(h("data.separator.middle"))+h("data.separator.end"),u.push(n)}})),a+=u.join(h("series.multiple.separator.middle"))+h("series.multiple.separator.end"),e.setAttribute("aria-label",a)}}function c(e,t){if("string"!=typeof e)return e;var n=e;return I(t,(function(e,t){n=n.replace(new RegExp("\\{\\s*"+t+"\\s*\\}","g"),e)})),n}function h(e){var t=n.get(e);if(null!=t)return t;for(var i=e.split("."),a=xh.aria,r=0;r<i.length;++r)a=a[i[r]];return a}}(e._zr.dom,t)}function Od(e,t){hd(Fd,(function(n){n(e,t)}))}wd.resize=function(e){if(!this._disposed){this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption("media"),i=e&&e.silent;this[md]=!0,n&&Td(this),Md.update.call(this),this[md]=!1,Dd.call(this,i),kd.call(this,i)}}},wd.showLoading=function(e,t){if(!this._disposed&&(pd(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),Yd[e])){var n=Yd[e](this._api,t),i=this._zr;this._loadingFX=n,i.add(n)}},wd.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},wd.makeActionFromEvent=function(e){var t=x({},e);return t.type=Gd[e.type],t},wd.dispatchAction=function(e,t){this._disposed||(pd(t)||(t={silent:!!t}),Vd[e.type]&&this._model&&(this[md]?this._pendingActions.push(e):(Ad.call(this,e,t.silent),t.flush?this._zr.flush(!0):!1!==t.flush&&a.browser.weChat&&this._throttledZrFlush(),Dd.call(this,t.silent),kd.call(this,t.silent))))},wd.appendData=function(e){if(!this._disposed){var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0}},wd.on=xd("on",!1),wd.off=xd("off",!1),wd.one=xd("one",!1);var Nd=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Rd(e,t){var n=e.get("z"),i=e.get("zlevel");t.group.traverse((function(e){"group"!==e.type&&(null!=n&&(e.z=n),null!=i&&(e.zlevel=i))}))}function Bd(){this.eventInfo}wd._initEvents=function(){hd(Nd,(function(e){function t(t){var n,i=this.getModel(),a=t.target;if("globalout"===e)n={};else if(a&&null!=a.dataIndex){var r=a.dataModel||i.getSeriesByIndex(a.seriesIndex);n=r&&r.getDataParams(a.dataIndex,a.dataType,a)||{}}else a&&a.eventData&&(n=x({},a.eventData));if(n){var o=n.componentType,s=n.componentIndex;"markLine"!==o&&"markPoint"!==o&&"markArea"!==o||(o="series",s=n.seriesIndex);var l=o&&null!=s&&i.getComponent(o,s),u=l&&this["series"===l.mainType?"_chartsMap":"_componentsMap"][l.__viewId];n.event=t,n.type=e,this._ecEventProcessor.eventInfo={targetEl:a,packedEvent:n,model:l,view:u},this.trigger(e,n)}}t.zrEventfulCallAtLast=!0,this._zr.on(e,t,this)}),this),hd(Gd,(function(e,t){this._messageCenter.on(t,(function(e){this.trigger(t,e)}),this)}),this)},wd.isDisposed=function(){return this._disposed},wd.clear=function(){this._disposed||this.setOption({series:[]},!0)},wd.dispose=function(){if(!this._disposed){this._disposed=!0,Ya(this.getDom(),Kd,"");var e=this._api,t=this._model;hd(this._componentsViews,(function(n){n.dispose(t,e)})),hd(this._chartsViews,(function(n){n.dispose(t,e)})),this._zr.dispose(),delete Ud[this.id]}},T(bd,De),Bd.prototype={constructor:Bd,normalizeQuery:function(e){var t={},n={},i={};if(N(e)){var a=fd(e);t.mainType=a.main||null,t.subType=a.sub||null}else{var r=["Index","Name","Id"],o={name:1,dataIndex:1,dataType:1};I(e,(function(e,a){for(var s=!1,l=0;l<r.length;l++){var u=r[l],c=a.lastIndexOf(u);if(0<c&&c===a.length-u.length){var h=a.slice(0,c);"data"!==h&&(t.mainType=h,t[u.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(a)&&(n[a]=e,s=!0),s||(i[a]=e)}))}return{cptQuery:t,dataQuery:n,otherQuery:i}},filter:function(e,t,n){var i=this.eventInfo;if(!i)return!0;var a=i.targetEl,r=i.packedEvent,o=i.model,s=i.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,r,"name")&&c(u,r,"dataIndex")&&c(u,r,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,a,r));function c(e,t,n,i){return null==e[n]||t[i||n]===e[n]}},afterTrigger:function(){this.eventInfo=null}};var Vd={},Gd={},Wd=[],Hd=[],Fd=[],$d=[],Xd={},Yd={},Ud={},jd={},Zd=new Date-0,qd=new Date-0,Kd="_echarts_instance_";function Jd(e){jd[e]=!1}var Qd=Jd;function ep(e){return Ud[function(e,t){return e.getAttribute?e.getAttribute(t):e[t]}(e,Kd)]}function tp(e,t){Xd[e]=t}function np(e){Hd.push(e)}function ip(e,t){lp(Wd,e,t,1e3)}function ap(e,t,n){"function"==typeof t&&(n=t,t="");var i=pd(e)?e.type:[e,e={event:t}][0];e.event=(e.event||i).toLowerCase(),t=e.event,cd(yd.test(i)&&yd.test(t)),Vd[i]||(Vd[i]={action:n,actionInfo:e}),Gd[t]=i}function rp(e,t){ju.register(e,t)}function op(e,t){lp($d,e,t,1e3,"layout")}function sp(e,t){lp($d,e,t,3e3,"visual")}function lp(e,t,n,i,a){(dd(t)||pd(t))&&(n=t,t=i);var r=bh.wrapStageHandler(n,a);return r.__prio=t,r.__raw=n,e.push(r),r}function up(e,t){Yd[e]=t}function cp(e){return vu.extend(e)}function hp(e){return eh.extend(e)}function dp(e){return Yc.extend(e)}function pp(e){return rh.extend(e)}function fp(e){return e}function gp(e,t,n,i,a){this._old=e,this._new=t,this._oldKeyGetter=n||fp,this._newKeyGetter=i||fp,this.context=a}function mp(e,t,n,i,a){for(var r=0;r<e.length;r++){var o="_ec_"+a[i](e[r],r),s=t[o];null==s?(n.push(o),t[o]=r):(s.length||(t[o]=s=[s]),s.push(r))}}sp(2e3,yh),np(gc),ip(900,(function(e){var t=Q();e.eachSeries((function(e){var n=e.get("stack");if(n){var i=t.get(n)||t.set(n,[]),a=e.getData(),r={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:e};if(!r.stackedDimension||!r.isStackedByIndex&&!r.stackedByDimension)return;i.length&&a.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(r)}})),t.each(mc)})),up("default",(function(e,t){_(t=t||{},{text:"loading",textColor:"#000",fontSize:"12px",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#c23531",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new An,i=new Zo({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(i);var a=t.fontSize+" sans-serif",r=new Zo({style:{fill:"none",text:t.text,font:a,textPosition:"right",textDistance:10,textFill:t.textColor},zlevel:t.zlevel,z:10001});if(n.add(r),t.showSpinner){var o=new ns({shape:{startAngle:-_h/2,endAngle:-_h/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001});o.animateShape(!0).when(1e3,{endAngle:3*_h/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:3*_h/2}).delay(300).start("circularInOut"),n.add(o)}return n.resize=function(){var n=ci(t.text,a),s=t.showSpinner?t.spinnerRadius:0,l=(e.getWidth()-2*s-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner?0:n/2),u=e.getHeight()/2;t.showSpinner&&o.setShape({cx:l,cy:u}),r.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),i.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n})),ap({type:"highlight",event:"highlight",update:"highlight"},te),ap({type:"downplay",event:"downplay",update:"downplay"},te),tp("light",Wh),tp("dark",$h),gp.prototype={constructor:gp,add:function(e){return this._add=e,this},update:function(e){return this._update=e,this},remove:function(e){return this._remove=e,this},execute:function(){var e=this._old,t=this._new,n={},i=[],a=[];for(mp(e,{},i,"_oldKeyGetter",this),mp(t,n,a,"_newKeyGetter",this),r=0;r<e.length;r++)null!=(s=n[o=i[r]])?((u=s.length)?(1===u&&(n[o]=null),s=s.shift()):n[o]=null,this._update&&this._update(s,r)):this._remove&&this._remove(r);for(var r=0;r<a.length;r++){var o=a[r];if(n.hasOwnProperty(o)){var s;if(null==(s=n[o]))continue;if(s.length)for(var l=0,u=s.length;l<u;l++)this._add&&this._add(s[l]);else this._add&&this._add(s)}}}};var vp=Q(["tooltip","label","itemName","itemId","seriesName"]);function yp(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}function xp(e){return"category"===e?"ordinal":"time"===e?"time":"float"}function _p(e){null!=e&&x(this,e),this.otherDims={}}var bp=R,wp="undefined",Sp={float:typeof Float64Array==wp?Array:Float64Array,int:typeof Int32Array==wp?Array:Int32Array,ordinal:Array,number:Array,time:Array},Mp=typeof Uint32Array==wp?Array:Uint32Array,Tp=typeof Int32Array==wp?Array:Int32Array,Cp=typeof Uint16Array==wp?Array:Uint16Array;function Ip(e){return 65535<e._rawCount?Mp:Cp}var Ap=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],Dp=["_extent","_approximateExtent","_rawExtent"];function kp(e,t){I(Ap.concat(t.__wrappedMethods||[]),(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e.__wrappedMethods=t.__wrappedMethods,I(Dp,(function(n){e[n]=m(t[n])})),e._calculationInfo=x(t._calculationInfo)}var Lp=function(e,t){e=e||["x","y"];for(var n={},i=[],a={},r=0;r<e.length;r++){var o=e[r];N(o)?o=new _p({name:o}):o instanceof _p||(o=new _p(o));var s=o.name;o.type=o.type||"float",o.coordDim||(o.coordDim=s,o.coordDimIndex=0),o.otherDims=o.otherDims||{},i.push(s),(n[s]=o).index=r,o.createInvertedIndices&&(a[s]=[])}this.dimensions=i,this._dimensionInfos=n,this.hostModel=t,this.dataType,this._indices=null,this._count=0,this._rawCount=0,this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this._visual={},this._layout={},this._itemVisuals=[],this.hasItemVisual={},this._itemLayouts=[],this._graphicEls=[],this._chunkSize=1e5,this._chunkCount=0,this._rawData,this._rawExtent={},this._extent={},this._approximateExtent={},this._dimensionsSummary=function(e){var t={},n=t.encode={},i=Q(),a=[],r=[],o=t.userOutput={dimensionNames:e.dimensions.slice(),encode:{}};I(e.dimensions,(function(t){var s=e.getDimensionInfo(t),l=s.coordDim;if(l){var u=s.coordDimIndex;yp(n,l)[u]=t,s.isExtraCoord||(i.set(l,1),function(e){return!("ordinal"===e||"time"===e)}(s.type)&&(a[0]=t),yp(o.encode,l)[u]=s.index),s.defaultTooltip&&r.push(t)}vp.each((function(e,t){var i=yp(n,t),a=s.otherDims[t];null!=a&&!1!==a&&(i[a]=s.name)}))}));var s=[],l={};i.each((function(e,t){var i=n[t];l[t]=i[0],s=s.concat(i)})),t.dataDimsOnCoord=s,t.encodeFirstDimNotExtra=l;var u=n.label;u&&u.length&&(a=u.slice());var c=n.tooltip;return c&&c.length?r=c.slice():r.length||(r=a.slice()),n.defaultedLabel=a,n.defaultedTooltip=r,t}(this),this._invertedIndicesMap=a,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},Ep=Lp.prototype;function Pp(e,t,n,i,a){var r=Sp[t.type],o=i-1,s=t.name,l=e[s][o];if(l&&l.length<n){for(var u=new r(Math.min(a-o*n,n)),c=0;c<l.length;c++)u[c]=l[c];e[s][o]=u}for(var h=i*n;h<a;h+=n)e[s].push(new r(Math.min(a-h,n)))}function zp(e){var t=e._invertedIndicesMap;I(t,(function(n,i){var a=e._dimensionInfos[i].ordinalMeta;if(a){n=t[i]=new Tp(a.categories.length);for(var r=0;r<n.length;r++)n[r]=-1;for(r=0;r<e._count;r++)n[e.get(i,r)]=r}}))}function Op(e,t,n){var i;if(null!=t){var a=e._chunkSize,r=Math.floor(n/a),o=n%a,s=e.dimensions[t],l=e._storage[s][r];if(l){i=l[o];var u=e._dimensionInfos[s].ordinalMeta;u&&u.categories.length&&(i=u.categories[i])}}return i}function Np(e){return e}function Rp(e){return e<this._count&&0<=e?this._indices[e]:-1}function Bp(e,t){var n=e._idList[t];return null==n&&(n=Op(e,e._idDimIdx,t)),null==n&&(n="e\0\0"+t),n}function Vp(e){return z(e)||(e=[e]),e}function Gp(e,t){var n=e.dimensions,i=new Lp(A(n,e.getDimensionInfo,e),e.hostModel);kp(i,e);for(var a=i._storage={},r=e._storage,o=0;o<n.length;o++){var s=n[o];r[s]&&(0<=S(t,s)?(a[s]=Wp(r[s]),i._rawExtent[s]=[1/0,-1/0],i._extent[s]=null):a[s]=r[s])}return i}function Wp(e){for(var t,n,i=new Array(e.length),a=0;a<e.length;a++)i[a]=(n=void 0,(n=(t=e[a]).constructor)===Array?t.slice():new n(t));return i}function Hp(e){e.seriesIndex=this.seriesIndex,e.dataIndex=this.dataIndex,e.dataType=this.dataType}function Fp(e,t,n){Du.isInstance(t)||(t=Du.seriesDataToSource(t)),n=n||{},e=(e||[]).slice();for(var i=(n.dimsDef||[]).slice(),a=Q(),r=Q(),o=[],s=function(e,t,n,i){var a=Math.max(e.dimensionsDetectCount||1,t.length,n.length,i||0);return I(t,(function(e){var t=e.dimsDef;t&&(a=Math.max(a,t.length))})),a}(t,e,i,n.dimCount),l=0;l<s;l++){var u=i[l]=x({},R(i[l])?i[l]:{name:i[l]}),c=u.name,h=o[l]=new _p;null!=c&&null==a.get(c)&&(h.name=h.displayName=c,a.set(c,l)),null!=u.type&&(h.type=u.type),null!=u.displayName&&(h.displayName=u.displayName)}var d=n.encodeDef;!d&&n.encodeDefaulter&&(d=n.encodeDefaulter(t,s)),(d=Q(d)).each((function(e,t){if(1===(e=Pa(e).slice()).length&&!N(e[0])&&e[0]<0)d.set(t,!1);else{var n=d.set(t,[]);I(e,(function(e,i){N(e)&&(e=a.get(e)),null!=e&&e<s&&(n[i]=e,f(o[e],t,i))}))}}));var p=0;function f(e,t,n){null!=vp.get(t)?e.otherDims[t]=n:(e.coordDim=t,e.coordDimIndex=n,r.set(t,!0))}I(e,(function(e,t){var n,i,a;if(N(e))n=e,e={};else{n=e.name;var r=e.ordinalMeta;e.ordinalMeta=null,(e=m(e)).ordinalMeta=r,i=e.dimsDef,a=e.otherDims,e.name=e.coordDim=e.coordDimIndex=e.dimsDef=e.otherDims=null}if(!1!==(s=d.get(n))){var s;if(!(s=Pa(s)).length)for(var l=0;l<(i&&i.length||1);l++){for(;p<o.length&&null!=o[p].coordDim;)p++;p<o.length&&s.push(p++)}I(s,(function(t,r){var s=o[t];if(f(_(s,e),n,r),null==s.name&&i){var l=i[r];R(l)||(l={name:l}),s.name=s.displayName=l.name,s.defaultTooltip=l.defaultTooltip}a&&_(s.otherDims,a)}))}}));var g=n.generateCoord,v=n.generateCoordCount,y=null!=v;v=g?v||1:0;for(var b,w,S=g||"value",M=0;M<s;M++)null==(h=o[M]=o[M]||new _p).coordDim&&(h.coordDim=$p(S,r,y),h.coordDimIndex=0,(!g||v<=0)&&(h.isExtraCoord=!0),v--),null==h.name&&(h.name=$p(h.coordDim,a)),null==h.type&&(b=t,w=M,h.name,Gu(b.data,b.sourceFormat,b.seriesLayoutBy,b.dimensionsDefine,b.startIndex,w)===ku||h.isExtraCoord&&(null!=h.otherDims.itemName||null!=h.otherDims.seriesName))&&(h.type="ordinal");return o}function $p(e,t,n){if(n||null!=t.get(e)){for(var i=0;null!=t.get(e+i);)i++;e+=i}return t.set(e,!0),e}Ep.type="list",Ep.hasItemOption=!0,Ep.getDimension=function(e){return"number"!=typeof e&&(isNaN(e)||this._dimensionInfos.hasOwnProperty(e))||(e=this.dimensions[e]),e},Ep.getDimensionInfo=function(e){return this._dimensionInfos[this.getDimension(e)]},Ep.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},Ep.mapDimension=function(e,t){var n=this._dimensionsSummary;if(null==t)return n.encodeFirstDimNotExtra[e];var i=n.encode[e];return!0===t?(i||[]).slice():i&&i[t]},Ep.initData=function(e,t,n){(Du.isInstance(e)||C(e))&&(e=new vc(e,this.dimensions.length)),this._rawData=e,this._storage={},this._indices=null,this._nameList=t||[],this._idList=[],this._nameRepeatCount={},n||(this.hasItemOption=!1),this.defaultDimValueGetter=Tc[this._rawData.getSource().sourceFormat],this._dimValueGetter=n=n||this.defaultDimValueGetter,this._dimValueGetterArrayRows=Tc.arrayRows,this._rawExtent={},this._initDataFromProvider(0,e.count()),e.pure&&(this.hasItemOption=!1)},Ep.getProvider=function(){return this._rawData},Ep.appendData=function(e){var t=this._rawData,n=this.count();t.appendData(e);var i=t.count();t.persistent||(i+=n),this._initDataFromProvider(n,i)},Ep.appendValues=function(e,t){for(var n=this._chunkSize,i=this._storage,a=this.dimensions,r=a.length,o=this._rawExtent,s=this.count(),l=s+Math.max(e.length,t?t.length:0),u=this._chunkCount,c=0;c<r;c++)o[v=a[c]]||(o[v]=[1/0,-1/0]),i[v]||(i[v]=[]),Pp(i,this._dimensionInfos[v],n,u,l),this._chunkCount=i[v].length;for(var h=new Array(r),d=s;d<l;d++){for(var p=d-s,f=Math.floor(d/n),g=d%n,m=0;m<r;m++){var v=a[m],y=this._dimValueGetterArrayRows(e[p]||h,v,p,m);i[v][f][g]=y;var x=o[v];y<x[0]&&(x[0]=y),y>x[1]&&(x[1]=y)}t&&(this._nameList[d]=t[p])}this._rawCount=this._count=l,this._extent={},zp(this)},Ep._initDataFromProvider=function(e,t){if(!(t<=e)){for(var n,i=this._chunkSize,a=this._rawData,r=this._storage,o=this.dimensions,s=o.length,l=this._dimensionInfos,u=this._nameList,c=this._idList,h=this._rawExtent,d=this._nameRepeatCount={},p=this._chunkCount,f=0;f<s;f++){h[b=o[f]]||(h[b]=[1/0,-1/0]);var g=l[b];0===g.otherDims.itemName&&(n=this._nameDimIdx=f),0===g.otherDims.itemId&&(this._idDimIdx=f),r[b]||(r[b]=[]),Pp(r,g,i,p,t),this._chunkCount=r[b].length}for(var m=new Array(s),v=e;v<t;v++){m=a.getItem(v,m);for(var y=Math.floor(v/i),x=v%i,_=0;_<s;_++){var b,w=r[b=o[_]][y],S=this._dimValueGetter(m,b,v,_);w[x]=S;var M=h[b];S<M[0]&&(M[0]=S),S>M[1]&&(M[1]=S)}if(!a.pure){var T=u[v];if(m&&null==T)if(null!=m.name)u[v]=T=m.name;else if(null!=n){var C=o[n],I=r[C][y];if(I){T=I[x];var A=l[C].ordinalMeta;A&&A.categories.length&&(T=A.categories[T])}}var D=null==m?null:m.id;null==D&&null!=T&&(d[T]=d[T]||0,0<d[D=T]&&(D+="__ec__"+d[T]),d[T]++),null!=D&&(c[v]=D)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=t,this._extent={},zp(this)}},Ep.count=function(){return this._count},Ep.getIndices=function(){var e=this._indices;if(e){var t=e.constructor,n=this._count;if(t===Array){a=new t(n);for(var i=0;i<n;i++)a[i]=e[i]}else a=new t(e.buffer,0,n)}else{var a=new(t=Ip(this))(this.count());for(i=0;i<a.length;i++)a[i]=i}return a},Ep.get=function(e,t){if(!(0<=t&&t<this._count))return NaN;var n=this._storage;if(!n[e])return NaN;t=this.getRawIndex(t);var i=Math.floor(t/this._chunkSize),a=t%this._chunkSize;return n[e][i][a]},Ep.getByRawIndex=function(e,t){if(!(0<=t&&t<this._rawCount))return NaN;var n=this._storage[e];if(!n)return NaN;var i=Math.floor(t/this._chunkSize),a=t%this._chunkSize;return n[i][a]},Ep._getFast=function(e,t){var n=Math.floor(t/this._chunkSize),i=t%this._chunkSize;return this._storage[e][n][i]},Ep.getValues=function(e,t){var n=[];z(e)||(t=e,e=this.dimensions);for(var i=0,a=e.length;i<a;i++)n.push(this.get(e[i],t));return n},Ep.hasValue=function(e){for(var t=this._dimensionsSummary.dataDimsOnCoord,n=0,i=t.length;n<i;n++)if(isNaN(this.get(t[n],e)))return!1;return!0},Ep.getDataExtent=function(e){e=this.getDimension(e);var t=[1/0,-1/0];if(!this._storage[e])return t;var n,i=this.count();if(!this._indices)return this._rawExtent[e].slice();if(n=this._extent[e])return n.slice();for(var a=(n=t)[0],r=n[1],o=0;o<i;o++){var s=this._getFast(e,this.getRawIndex(o));s<a&&(a=s),r<s&&(r=s)}return n=[a,r],this._extent[e]=n},Ep.getApproximateExtent=function(e){return e=this.getDimension(e),this._approximateExtent[e]||this.getDataExtent(e)},Ep.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},Ep.getCalculationInfo=function(e){return this._calculationInfo[e]},Ep.setCalculationInfo=function(e,t){bp(e)?x(this._calculationInfo,e):this._calculationInfo[e]=t},Ep.getSum=function(e){var t=0;if(this._storage[e])for(var n=0,i=this.count();n<i;n++){var a=this.get(e,n);isNaN(a)||(t+=a)}return t},Ep.getMedian=function(e){var t=[];this.each(e,(function(e,n){isNaN(e)||t.push(e)}));var n=[].concat(t).sort((function(e,t){return e-t})),i=this.count();return 0===i?0:i%2==1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},Ep.rawIndexOf=function(e,t){var n=(e&&this._invertedIndicesMap[e])[t];return null==n||isNaN(n)?-1:n},Ep.indexOfName=function(e){for(var t=0,n=this.count();t<n;t++)if(this.getName(t)===e)return t;return-1},Ep.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(null!=n&&n<this._count&&n===e)return e;for(var i=0,a=this._count-1;i<=a;){var r=(i+a)/2|0;if(t[r]<e)i=1+r;else{if(!(t[r]>e))return r;a=r-1}}return-1},Ep.indicesOfNearest=function(e,t,n){var i=[];if(!this._storage[e])return i;null==n&&(n=1/0);for(var a=1/0,r=-1,o=0,s=0,l=this.count();s<l;s++){var u=t-this.get(e,s),c=Math.abs(u);c<=n&&((c<a||c===a&&0<=u&&r<0)&&(a=c,r=u,o=0),u===r&&(i[o++]=s))}return i.length=o,i},Ep.getRawIndex=Np,Ep.getRawDataItem=function(e){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(e));for(var t=[],n=0;n<this.dimensions.length;n++){var i=this.dimensions[n];t.push(this.get(i,e))}return t},Ep.getName=function(e){var t=this.getRawIndex(e);return this._nameList[t]||Op(this,this._nameDimIdx,t)||""},Ep.getId=function(e){return Bp(this,this.getRawIndex(e))},Ep.each=function(e,t,n,i){if(this._count){"function"==typeof e&&(i=n,n=t,t=e,e=[]),n=n||i||this;for(var a=(e=A(Vp(e),this.getDimension,this)).length,r=0;r<this.count();r++)switch(a){case 0:t.call(n,r);break;case 1:t.call(n,this.get(e[0],r),r);break;case 2:t.call(n,this.get(e[0],r),this.get(e[1],r),r);break;default:for(var o=0,s=[];o<a;o++)s[o]=this.get(e[o],r);s[o]=r,t.apply(n,s)}}},Ep.filterSelf=function(e,t,n,i){if(this._count){"function"==typeof e&&(i=n,n=t,t=e,e=[]),n=n||i||this,e=A(Vp(e),this.getDimension,this);for(var a=this.count(),r=new(Ip(this))(a),o=[],s=e.length,l=0,u=e[0],c=0;c<a;c++){var h,d=this.getRawIndex(c);if(0===s)h=t.call(n,c);else if(1===s){var p=this._getFast(u,d);h=t.call(n,p,c)}else{for(var f=0;f<s;f++)o[f]=this._getFast(u,d);o[f]=c,h=t.apply(n,o)}h&&(r[l++]=d)}return l<a&&(this._indices=r),this._count=l,this._extent={},this.getRawIndex=this._indices?Rp:Np,this}},Ep.selectRange=function(e){if(this._count){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);var i=t.length;if(i){var a=this.count(),r=new(Ip(this))(a),o=0,s=t[0],l=e[s][0],u=e[s][1],c=!1;if(!this._indices){var h=0;if(1===i){for(var d=this._storage[t[0]],p=0;p<this._chunkCount;p++)for(var f=d[p],g=Math.min(this._count-p*this._chunkSize,this._chunkSize),m=0;m<g;m++)(l<=(b=f[m])&&b<=u||isNaN(b))&&(r[o++]=h),h++;c=!0}else if(2===i){d=this._storage[s];var v=this._storage[t[1]],y=e[t[1]][0],x=e[t[1]][1];for(p=0;p<this._chunkCount;p++){f=d[p];var _=v[p];for(g=Math.min(this._count-p*this._chunkSize,this._chunkSize),m=0;m<g;m++){var b=f[m],w=_[m];(l<=b&&b<=u||isNaN(b))&&(y<=w&&w<=x||isNaN(w))&&(r[o++]=h),h++}}c=!0}}if(!c)if(1===i)for(m=0;m<a;m++){var S=this.getRawIndex(m);(l<=(b=this._getFast(s,S))&&b<=u||isNaN(b))&&(r[o++]=S)}else for(m=0;m<a;m++){var M=!0;for(S=this.getRawIndex(m),p=0;p<i;p++){var T=t[p];((b=this._getFast(n,S))<e[T][0]||b>e[T][1])&&(M=!1)}M&&(r[o++]=this.getRawIndex(m))}return o<a&&(this._indices=r),this._count=o,this._extent={},this.getRawIndex=this._indices?Rp:Np,this}}},Ep.mapArray=function(e,t,n,i){"function"==typeof e&&(i=n,n=t,t=e,e=[]),n=n||i||this;var a=[];return this.each(e,(function(){a.push(t&&t.apply(this,arguments))}),n),a},Ep.map=function(e,t,n,i){n=n||i||this;var a=Gp(this,e=A(Vp(e),this.getDimension,this));a._indices=this._indices,a.getRawIndex=a._indices?Rp:Np;for(var r=a._storage,o=[],s=this._chunkSize,l=e.length,u=this.count(),c=[],h=a._rawExtent,d=0;d<u;d++){for(var p=0;p<l;p++)c[p]=this.get(e[p],d);c[l]=d;var f=t&&t.apply(n,c);if(null!=f){"object"!=typeof f&&(o[0]=f,f=o);for(var g=this.getRawIndex(d),m=Math.floor(g/s),v=g%s,y=0;y<f.length;y++){var x=e[y],_=f[y],b=h[x],w=r[x];w&&(w[m][v]=_),_<b[0]&&(b[0]=_),_>b[1]&&(b[1]=_)}}}return a},Ep.downSample=function(e,t,n,i){for(var a=Gp(this,[e]),r=a._storage,o=[],s=Math.floor(1/t),l=r[e],u=this.count(),c=this._chunkSize,h=a._rawExtent[e],d=new(Ip(this))(u),p=0,f=0;f<u;f+=s){u-f<s&&(s=u-f,o.length=s);for(var g=0;g<s;g++){var m=this.getRawIndex(f+g),v=Math.floor(m/c),y=m%c;o[g]=l[v][y]}var x=n(o),_=this.getRawIndex(Math.min(f+i(o,x)||0,u-1)),b=_%c;(l[Math.floor(_/c)][b]=x)<h[0]&&(h[0]=x),x>h[1]&&(h[1]=x),d[p++]=_}return a._count=p,a._indices=d,a.getRawIndex=Rp,a},Ep.getItemModel=function(e){var t=this.hostModel;return new ml(this.getRawDataItem(e),t,t&&t.ecModel)},Ep.diff=function(e){var t=this;return new gp(e?e.getIndices():[],this.getIndices(),(function(t){return Bp(e,t)}),(function(e){return Bp(t,e)}))},Ep.getVisual=function(e){var t=this._visual;return t&&t[e]},Ep.setVisual=function(e,t){if(bp(e))for(var n in e)e.hasOwnProperty(n)&&this.setVisual(n,e[n]);else this._visual=this._visual||{},this._visual[e]=t},Ep.setLayout=function(e,t){if(bp(e))for(var n in e)e.hasOwnProperty(n)&&this.setLayout(n,e[n]);else this._layout[e]=t},Ep.getLayout=function(e){return this._layout[e]},Ep.getItemLayout=function(e){return this._itemLayouts[e]},Ep.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?x(this._itemLayouts[e]||{},t):t},Ep.clearItemLayouts=function(){this._itemLayouts.length=0},Ep.getItemVisual=function(e,t,n){var i=this._itemVisuals[e],a=i&&i[t];return null!=a||n?a:this.getVisual(t)},Ep.setItemVisual=function(e,t,n){var i=this._itemVisuals[e]||{},a=this.hasItemVisual;if(this._itemVisuals[e]=i,bp(t))for(var r in t)t.hasOwnProperty(r)&&(i[r]=t[r],a[r]=!0);else i[t]=n,a[t]=!0},Ep.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}},Ep.setItemGraphicEl=function(e,t){var n=this.hostModel;t&&(t.dataIndex=e,t.dataType=this.dataType,t.seriesIndex=n&&n.seriesIndex,"group"===t.type&&t.traverse(Hp,t)),this._graphicEls[e]=t},Ep.getItemGraphicEl=function(e){return this._graphicEls[e]},Ep.eachItemGraphicEl=function(e,t){I(this._graphicEls,(function(n,i){n&&e&&e.call(t,n,i)}))},Ep.cloneShallow=function(e){if(!e){var t=A(this.dimensions,this.getDimensionInfo,this);e=new Lp(t,this.hostModel)}if(e._storage=this._storage,kp(e,this),this._indices){var n=this._indices.constructor;e._indices=new n(this._indices)}else e._indices=null;return e.getRawIndex=e._indices?Rp:Np,e},Ep.wrapMethod=function(e,t){var n=this[e];"function"==typeof n&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(X(arguments)))})},Ep.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],Ep.CHANGABLE_METHODS=["filterSelf","selectRange"];var Xp=function(e,t){return Fp((t=t||{}).coordDimensions||[],e,{dimsDef:t.dimensionsDefine||e.dimensionsDefine,encodeDef:t.encodeDefine||e.encodeDefine,dimCount:t.dimensionsCount,encodeDefaulter:t.encodeDefaulter,generateCoord:t.generateCoord,generateCoordCount:t.generateCoordCount})};function Yp(e){this.coordSysName=e,this.coordSysDims=[],this.axisMap=Q(),this.categoryAxisMap=Q(),this.firstCategoryDimIndex=null}var Up={cartesian2d:function(e,t,n,i){var a=e.getReferringComponents("xAxis")[0],r=e.getReferringComponents("yAxis")[0];t.coordSysDims=["x","y"],n.set("x",a),n.set("y",r),jp(a)&&(i.set("x",a),t.firstCategoryDimIndex=0),jp(r)&&(i.set("y",r),t.firstCategoryDimIndex,t.firstCategoryDimIndex=1)},singleAxis:function(e,t,n,i){var a=e.getReferringComponents("singleAxis")[0];t.coordSysDims=["single"],n.set("single",a),jp(a)&&(i.set("single",a),t.firstCategoryDimIndex=0)},polar:function(e,t,n,i){var a=e.getReferringComponents("polar")[0],r=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",r),n.set("angle",o),jp(r)&&(i.set("radius",r),t.firstCategoryDimIndex=0),jp(o)&&(i.set("angle",o),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,i){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,i){var a=e.ecModel,r=a.getComponent("parallel",e.get("parallelIndex")),o=t.coordSysDims=r.dimensions.slice();I(r.parallelAxisIndex,(function(e,r){var s=a.getComponent("parallelAxis",e),l=o[r];n.set(l,s),jp(s)&&null==t.firstCategoryDimIndex&&(i.set(l,s),t.firstCategoryDimIndex=r)}))}};function jp(e){return"category"===e.get("type")}function Zp(e,t,n){var i,a,r,o,s=(n=n||{}).byIndex,l=n.stackedCoordDimension,u=!(!e||!e.get("stack"));if(I(t,(function(e,n){N(e)&&(t[n]=e={name:e}),u&&!e.isExtraCoord&&(s||i||!e.ordinalMeta||(i=e),a||"ordinal"===e.type||"time"===e.type||l&&l!==e.coordDim||(a=e))})),!a||s||i||(s=!0),a){r="__\0ecstackresult",o="__\0ecstackedover",i&&(i.createInvertedIndices=!0);var c=a.coordDim,h=a.type,d=0;I(t,(function(e){e.coordDim===c&&d++})),t.push({name:r,coordDim:c,coordDimIndex:d,type:h,isExtraCoord:!0,isCalculationCoord:!0}),d++,t.push({name:o,coordDim:o,coordDimIndex:d,type:h,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:a&&a.name,stackedByDimension:i&&i.name,isStackedByIndex:s,stackedOverDimension:o,stackResultDimension:r}}function qp(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function Kp(e,t){return qp(e,t)?e.getCalculationInfo("stackResultDimension"):t}function Jp(e,t,n){n=n||{},Du.isInstance(e)||(e=Du.seriesDataToSource(e));var i,a=t.get("coordinateSystem"),r=ju.get(a),o=function(e){var t=e.get("coordinateSystem"),n=new Yp(t),i=Up[t];if(i)return i(e,n,n.axisMap,n.categoryAxisMap),n}(t);o&&(i=A(o.coordSysDims,(function(e){var t={name:e},n=o.axisMap.get(e);if(n){var i=n.get("type");t.type=xp(i)}return t}))),i=i||r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"];var s,l,u=Xp(e,{coordDimensions:i,generateCoord:n.generateCoord,encodeDefaulter:n.useEncodeDefaulter?P(Ru,i,t):null});o&&I(u,(function(e,t){var n=e.coordDim,i=o.categoryAxisMap.get(n);i&&(null==s&&(s=t),e.ordinalMeta=i.getOrdinalMeta()),null!=e.otherDims.itemName&&(l=!0)})),l||null==s||(u[s].otherDims.itemName=0);var c=Zp(t,u),h=new Lp(u,t);h.setCalculationInfo(c);var d=null!=s&&function(e){if(e.sourceFormat===Su){var t=function(e){for(var t=0;t<e.length&&null==e[t];)t++;return e[t]}(e.data||[]);return null!=t&&!z(Na(t))}}(e)?function(e,t,n,i){return i===s?n:this.defaultDimValueGetter(e,t,n,i)}:null;return h.hasItemOption=!1,h.initData(e,null,d),h}function Qp(e){this._setting=e||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function ef(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this._map}Qp.prototype.parse=function(e){return e},Qp.prototype.getSetting=function(e){return this._setting[e]},Qp.prototype.contain=function(e){var t=this._extent;return e>=t[0]&&e<=t[1]},Qp.prototype.normalize=function(e){var t=this._extent;return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])},Qp.prototype.scale=function(e){var t=this._extent;return e*(t[1]-t[0])+t[0]},Qp.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},Qp.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},Qp.prototype.getExtent=function(){return this._extent.slice()},Qp.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},Qp.prototype.isBlank=function(){return this._isBlank},Qp.prototype.setBlank=function(e){this._isBlank=e},Qp.prototype.getLabel=null,Ka(Qp),nr(Qp,{registerWhenExtend:!0}),ef.createByAxisModel=function(e){var t=e.option,n=t.data,i=n&&A(n,af);return new ef({categories:i,needCollect:!i,deduplication:!1!==t.dedplication})};var tf=ef.prototype;function nf(e){return e._map||(e._map=Q(e.categories))}function af(e){return R(e)&&null!=e.value?e.value:e+""}tf.getOrdinal=function(e){return nf(this).get(e)},tf.parseAndCollect=function(e){var t,n=this._needCollect;if("string"!=typeof e&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var i=nf(this);return null==(t=i.get(e))&&(n?(t=this.categories.length,this.categories[t]=e,i.set(e,t)):t=NaN),t};var rf=Qp.prototype,of=Qp.extend({type:"ordinal",init:function(e,t){e&&!z(e)||(e=new ef({categories:e})),this._ordinalMeta=e,this._extent=t||[0,e.categories.length-1]},parse:function(e){return"string"==typeof e?this._ordinalMeta.getOrdinal(e):Math.round(e)},contain:function(e){return e=this.parse(e),rf.contain.call(this,e)&&null!=this._ordinalMeta.categories[e]},normalize:function(e){return rf.normalize.call(this,this.parse(e))},scale:function(e){return Math.round(rf.scale.call(this,e))},getTicks:function(){for(var e=[],t=this._extent,n=t[0];n<=t[1];)e.push(n),n++;return e},getLabel:function(e){if(!this.isBlank())return this._ordinalMeta.categories[e]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(e,t){this.unionExtent(e.getApproximateExtent(t))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:te,niceExtent:te});of.create=function(){return new of};var sf=Sl;function lf(e){return Cl(e)+2}function uf(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function cf(e,t){isFinite(e[0])||(e[0]=t[0]),isFinite(e[1])||(e[1]=t[1]),uf(e,0,t),uf(e,1,t),e[0]>e[1]&&(e[0]=e[1])}var hf=Sl,df=Qp.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(e,t){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(t)||(n[1]=parseFloat(t))},unionExtent:function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1]),df.prototype.setExtent.call(this,t[0],t[1])},getInterval:function(){return this._interval},setInterval:function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=lf(e)},getTicks:function(e){var t=this._interval,n=this._extent,i=this._niceExtent,a=this._intervalPrecision,r=[];if(!t)return r;n[0]<i[0]&&(e?r.push(hf(i[0]-t,a)):r.push(n[0]));for(var o=i[0];o<=i[1]&&(r.push(o),(o=hf(o+t,a))!==r[r.length-1]);)if(1e4<r.length)return[];var s=r.length?r[r.length-1]:i[1];return n[1]>s&&(e?r.push(hf(s+t,a)):r.push(n[1])),r},getMinorTicks:function(e){for(var t=this.getTicks(!0),n=[],i=this.getExtent(),a=1;a<t.length;a++){for(var r=t[a],o=t[a-1],s=0,l=[],u=(r-o)/e;s<e-1;){var c=Sl(o+(s+1)*u);c>i[0]&&c<i[1]&&l.push(c),s++}n.push(l)}return n},getLabel:function(e,t){if(null==e)return"";var n=t&&t.precision;return null==n?n=Cl(e)||0:"auto"===n&&(n=this._intervalPrecision),Gl(e=hf(e,n,!0))},niceTicks:function(e,t,n){e=e||5;var i=this._extent,a=i[1]-i[0];if(isFinite(a)){a<0&&(a=-a,i.reverse());var r=function(e,t,n,i){var a={},r=e[1]-e[0],o=a.interval=Nl(r/t,!0);null!=n&&o<n&&(o=a.interval=n),null!=i&&i<o&&(o=a.interval=i);var s=a.intervalPrecision=lf(o);return cf(a.niceTickExtent=[sf(Math.ceil(e[0]/o)*o,s),sf(Math.floor(e[1]/o)*o,s)],e),a}(i,e,t,n);this._intervalPrecision=r.intervalPrecision,this._interval=r.interval,this._niceExtent=r.niceTickExtent}},niceExtent:function(e){var t=this._extent;if(t[0]===t[1])if(0!==t[0]){var n=t[0];e.fixMax||(t[1]+=n/2),t[0]-=n/2}else t[1]=1;var i=t[1]-t[0];isFinite(i)||(t[0]=0,t[1]=1),this.niceTicks(e.splitNumber,e.minInterval,e.maxInterval);var a=this._interval;e.fixMin||(t[0]=hf(Math.floor(t[0]/a)*a)),e.fixMax||(t[1]=hf(Math.ceil(t[1]/a)*a))}});df.create=function(){return new df};var pf="__ec_stack_",ff="undefined"!=typeof Float32Array?Float32Array:Array;function gf(e){return e.get("stack")||pf+e.seriesIndex}function mf(e){return e.dim+e.index}function vf(e,t){var n=[];return t.eachSeriesByType(e,(function(e){Sf(e)&&!Mf(e)&&n.push(e)})),n}function yf(e){var t=function(e){var t={};I(e,(function(e){var n=e.coordinateSystem.getBaseAxis();if("time"===n.type||"value"===n.type)for(var i=e.getData(),a=n.dim+"_"+n.index,r=i.mapDimension(n.dim),o=0,s=i.count();o<s;++o){var l=i.get(r,o);t[a]?t[a].push(l):t[a]=[l]}}));var n=[];for(var i in t)if(t.hasOwnProperty(i)){var a=t[i];if(a){a.sort((function(e,t){return e-t}));for(var r=null,o=1;o<a.length;++o){var s=a[o]-a[o-1];0<s&&(r=null===r?s:Math.min(r,s))}n[i]=r}}return n}(e),n=[];return I(e,(function(e){var i,a=e.coordinateSystem.getBaseAxis(),r=a.getExtent();if("category"===a.type)i=a.getBandWidth();else if("value"===a.type||"time"===a.type){var o=a.dim+"_"+a.index,s=t[o],l=Math.abs(r[1]-r[0]),u=a.scale.getExtent(),c=Math.abs(u[1]-u[0]);i=s?l/c*s:l}else{var h=e.getData();i=Math.abs(r[1]-r[0])/h.count()}var d=wl(e.get("barWidth"),i),p=wl(e.get("barMaxWidth"),i),f=wl(e.get("barMinWidth")||1,i),g=e.get("barGap"),m=e.get("barCategoryGap");n.push({bandWidth:i,barWidth:d,barMaxWidth:p,barMinWidth:f,barGap:g,barCategoryGap:m,axisKey:mf(a),stackId:gf(e)})})),xf(n)}function xf(e){var t={};I(e,(function(e,n){var i=e.axisKey,a=e.bandWidth,r=t[i]||{bandWidth:a,remainedWidth:a,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},o=r.stacks;t[i]=r;var s=e.stackId;o[s]||r.autoWidthCount++,o[s]=o[s]||{width:0,maxWidth:0};var l=e.barWidth;l&&!o[s].width&&(o[s].width=l,l=Math.min(r.remainedWidth,l),r.remainedWidth-=l);var u=e.barMaxWidth;u&&(o[s].maxWidth=u);var c=e.barMinWidth;c&&(o[s].minWidth=c);var h=e.barGap;null!=h&&(r.gap=h);var d=e.barCategoryGap;null!=d&&(r.categoryGap=d)}));var n={};return I(t,(function(e,t){n[t]={};var i=e.stacks,a=e.bandWidth,r=wl(e.categoryGap,a),o=wl(e.gap,1),s=e.remainedWidth,l=e.autoWidthCount,u=(s-r)/(l+(l-1)*o);u=Math.max(u,0),I(i,(function(e){var t=e.maxWidth,n=e.minWidth;if(e.width)i=e.width,t&&(i=Math.min(i,t)),n&&(i=Math.max(i,n)),e.width=i,s-=i+o*i,l--;else{var i=u;t&&t<i&&(i=Math.min(t,s)),n&&i<n&&(i=n),i!==u&&(e.width=i,s-=i+o*i,l--)}})),u=(s-r)/(l+(l-1)*o),u=Math.max(u,0);var c,h=0;I(i,(function(e,t){e.width||(e.width=u),h+=(c=e).width*(1+o)})),c&&(h-=c.width*o);var d=-h/2;I(i,(function(e,i){n[t][i]=n[t][i]||{bandWidth:a,offset:d,width:e.width},d+=e.width*(1+o)}))})),n}function _f(e,t,n){if(e&&t){var i=e[mf(t)];return null!=i&&null!=n&&(i=i[gf(n)]),i}}function bf(e,t){var n=vf(e,t),i=yf(n),a={};I(n,(function(e){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),o=gf(e),s=i[mf(r)][o],l=s.offset,u=s.width,c=n.getOtherAxis(r),h=e.get("barMinHeight")||0;a[o]=a[o]||[],t.setLayout({bandWidth:s.bandWidth,offset:l,size:u});for(var d=t.mapDimension(c.dim),p=t.mapDimension(r.dim),f=qp(t,d),g=c.isHorizontal(),m=Tf(r,c),v=0,y=t.count();v<y;v++){var x,_,b,w,S,M=t.get(d,v),T=t.get(p,v),C=0<=M?"p":"n",I=m;f&&(a[o][T]||(a[o][T]={p:m,n:m}),I=a[o][T][C]),g?(x=I,_=(S=n.dataToPoint([M,T]))[1]+l,b=S[0]-m,w=u,Math.abs(b)<h&&(b=(b<0?-1:1)*h),isNaN(b)||f&&(a[o][T][C]+=b)):(x=(S=n.dataToPoint([T,M]))[0]+l,_=I,b=u,w=S[1]-m,Math.abs(w)<h&&(w=(w<=0?-1:1)*h),isNaN(w)||f&&(a[o][T][C]+=w)),t.setItemLayout(v,{x:x,y:_,width:b,height:w})}}),this)}var wf={seriesType:"bar",plan:nh(),reset:function(e){if(Sf(e)&&Mf(e)){var t=e.getData(),n=e.coordinateSystem,i=n.grid.getRect(),a=n.getBaseAxis(),r=n.getOtherAxis(a),o=t.mapDimension(r.dim),s=t.mapDimension(a.dim),l=r.isHorizontal(),u=l?0:1,c=_f(yf([e]),a,e).width;return.5<c||(c=.5),{progress:function(e,t){for(var h,d=e.count,p=new ff(2*d),f=new ff(2*d),g=new ff(d),m=[],v=[],y=0,x=0;null!=(h=e.next());)v[u]=t.get(o,h),v[1-u]=t.get(s,h),m=n.dataToPoint(v,null,m),f[y]=l?i.x+i.width:m[0],p[y++]=m[0],f[y]=l?m[1]:i.y+i.height,p[y++]=m[1],g[x++]=h;t.setLayout({largePoints:p,largeDataIndices:g,largeBackgroundPoints:f,barWidth:c,valueAxisStart:Tf(a,r),backgroundStart:l?i.x:i.y,valueAxisHorizontal:l})}}}}};function Sf(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function Mf(e){return e.pipelineContext&&e.pipelineContext.large}function Tf(e,t){return t.toGlobalCoord(t.dataToCoord("log"===t.type?1:0))}var Cf=df.prototype,If=Math.ceil,Af=Math.floor,Df=864e5,kf=df.extend({type:"time",getLabel:function(e){var t=this._stepLvl,n=new Date(e);return Jl(t[0],n,this.getSetting("useUTC"))},niceExtent:function(e){var t=this._extent;if(t[0]===t[1]&&(t[0]-=Df,t[1]+=Df),t[1]===-1/0&&t[0]===1/0){var n=new Date;t[1]=+new Date(n.getFullYear(),n.getMonth(),n.getDate()),t[0]=t[1]-Df}this.niceTicks(e.splitNumber,e.minInterval,e.maxInterval);var i=this._interval;e.fixMin||(t[0]=Sl(Af(t[0]/i)*i)),e.fixMax||(t[1]=Sl(If(t[1]/i)*i))},niceTicks:function(e,t,n){e=e||10;var i=this._extent,a=i[1]-i[0],r=a/e;null!=t&&r<t&&(r=t),null!=n&&n<r&&(r=n);var o=Lf.length,s=function(e,t,n,i){for(;n<i;){var a=n+i>>>1;e[a][1]<t?n=1+a:i=a}return n}(Lf,r,0,o),l=Lf[Math.min(s,o-1)],u=l[1];"year"===l[0]&&(u*=Nl(a/u/e,!0));var c=this.getSetting("useUTC")?0:60*new Date(+i[0]||+i[1]).getTimezoneOffset()*1e3,h=[Math.round(If((i[0]-c)/u)*u+c),Math.round(Af((i[1]-c)/u)*u+c)];cf(h,i),this._stepLvl=l,this._interval=u,this._niceExtent=h},parse:function(e){return+Pl(e)}});I(["contain","normalize"],(function(e){kf.prototype[e]=function(t){return Cf[e].call(this,this.parse(t))}}));var Lf=[["hh:mm:ss",1e3],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",6e4],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",36e5],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",216e5],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",Df],["MM-dd\nyyyy",2*Df],["MM-dd\nyyyy",3*Df],["MM-dd\nyyyy",4*Df],["MM-dd\nyyyy",5*Df],["MM-dd\nyyyy",6*Df],["week",7*Df],["MM-dd\nyyyy",864e6],["week",14*Df],["week",21*Df],["month",31*Df],["week",42*Df],["month",62*Df],["week",70*Df],["quarter",95*Df],["month",31*Df*4],["month",13392e6],["half-year",16416e6],["month",31*Df*8],["month",26784e6],["year",380*Df]];kf.create=function(e){return new kf({useUTC:e.ecModel.get("useUTC")})};var Ef=Qp.prototype,Pf=df.prototype,zf=Cl,Of=Sl,Nf=Math.floor,Rf=Math.ceil,Bf=Math.pow,Vf=Math.log,Gf=Qp.extend({type:"log",base:10,$constructor:function(){Qp.apply(this,arguments),this._originalScale=new df},getTicks:function(e){var t=this._originalScale,n=this._extent,i=t.getExtent();return A(Pf.getTicks.call(this,e),(function(e){var a=Sl(Bf(this.base,e));return a=e===n[0]&&t.__fixMin?Wf(a,i[0]):a,e===n[1]&&t.__fixMax?Wf(a,i[1]):a}),this)},getMinorTicks:Pf.getMinorTicks,getLabel:Pf.getLabel,scale:function(e){return e=Ef.scale.call(this,e),Bf(this.base,e)},setExtent:function(e,t){var n=this.base;e=Vf(e)/Vf(n),t=Vf(t)/Vf(n),Pf.setExtent.call(this,e,t)},getExtent:function(){var e=this.base,t=Ef.getExtent.call(this);t[0]=Bf(e,t[0]),t[1]=Bf(e,t[1]);var n=this._originalScale,i=n.getExtent();return n.__fixMin&&(t[0]=Wf(t[0],i[0])),n.__fixMax&&(t[1]=Wf(t[1],i[1])),t},unionExtent:function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=Vf(e[0])/Vf(t),e[1]=Vf(e[1])/Vf(t),Ef.unionExtent.call(this,e)},unionExtentFromData:function(e,t){this.unionExtent(e.getApproximateExtent(t))},niceTicks:function(e){e=e||10;var t=this._extent,n=t[1]-t[0];if(!(n==1/0||n<=0)){var i=zl(n);for(e/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&0<Math.abs(i);)i*=10;var a=[Sl(Rf(t[0]/i)*i),Sl(Nf(t[1]/i)*i)];this._interval=i,this._niceExtent=a}},niceExtent:function(e){Pf.niceExtent.call(this,e);var t=this._originalScale;t.__fixMin=e.fixMin,t.__fixMax=e.fixMax}});function Wf(e,t){return Of(e,zf(t))}function Hf(e,t){var n,i,a,r=e.type,o=t.getMin(),s=t.getMax(),l=e.getExtent();"ordinal"===r?n=t.getCategories().length:(z(i=t.get("boundaryGap"))||(i=[i||0,i||0]),"boolean"==typeof i[0]&&(i=[0,0]),i[0]=wl(i[0],1),i[1]=wl(i[1],1),a=l[1]-l[0]||Math.abs(l[0])),"dataMin"===o?o=l[0]:"function"==typeof o&&(o=o({min:l[0],max:l[1]})),"dataMax"===s?s=l[1]:"function"==typeof s&&(s=s({min:l[0],max:l[1]}));var u=null!=o,c=null!=s;null==o&&(o="ordinal"===r?n?0:NaN:l[0]-i[0]*a),null==s&&(s="ordinal"===r?n?n-1:NaN:l[1]+i[1]*a),null!=o&&isFinite(o)||(o=NaN),null!=s&&isFinite(s)||(s=NaN),e.setBlank(W(o)||W(s)||"ordinal"===r&&!e.getOrdinalMeta().categories.length),t.getNeedCrossZero()&&(0<o&&0<s&&!u&&(o=0),o<0&&s<0&&!c&&(s=0));var h=t.ecModel;if(h&&"time"===r){var d,p=vf("bar",h);if(I(p,(function(e){d|=e.getBaseAxis()===t.axis})),d){var f=yf(p),g=function(e,t,n,i){var a=n.axis.getExtent(),r=a[1]-a[0],o=_f(i,n.axis);if(void 0===o)return{min:e,max:t};var s=1/0;I(o,(function(e){s=Math.min(e.offset,s)}));var l=-1/0;I(o,(function(e){l=Math.max(e.offset+e.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,h=c/(1-(s+l)/r)-c;return{min:e-=s/u*h,max:t+=l/u*h}}(o,s,t,f);o=g.min,s=g.max}}return{extent:[o,s],fixMin:u,fixMax:c}}function Ff(e,t){var n=Hf(e,t),i=n.extent,a=t.get("splitNumber");"log"===e.type&&(e.base=t.get("logBase"));var r=e.type;e.setExtent(i[0],i[1]),e.niceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:"interval"===r||"time"===r?t.get("minInterval"):null,maxInterval:"interval"===r||"time"===r?t.get("maxInterval"):null});var o=t.get("interval");null!=o&&e.setInterval&&e.setInterval(o)}function $f(e,t){if(t=t||e.get("type"))switch(t){case"category":return new of(e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),[1/0,-1/0]);case"value":return new df;default:return(Qp.getClass(t)||df).create(e)}}function Xf(e){var t,n=e.getLabelModel().get("formatter"),i="category"===e.type?e.scale.getExtent()[0]:null;return"string"==typeof n?(t=n,n=function(n){return n=e.scale.getLabel(n),t.replace("{value}",null!=n?n:"")}):"function"==typeof n?function(t,a){return null!=i&&(a=t-i),n(Yf(e,t),a)}:function(t){return e.scale.getLabel(t)}}function Yf(e,t){return"category"===e.type?e.scale.getLabel(t):t}function Uf(e){var t=e.get("interval");return null==t?"auto":t}function jf(e){return"category"===e.type&&0===Uf(e.getLabelModel())}I(["contain","normalize"],(function(e){Gf.prototype[e]=function(t){return t=Vf(t)/Vf(this.base),Ef[e].call(this,t)}})),Gf.create=function(){return new Gf};var Zf={getMin:function(e){var t=this.option,n=e||null==t.rangeStart?t.min:t.rangeStart;return this.axis&&null!=n&&"dataMin"!==n&&"function"!=typeof n&&!W(n)&&(n=this.axis.scale.parse(n)),n},getMax:function(e){var t=this.option,n=e||null==t.rangeEnd?t.max:t.rangeEnd;return this.axis&&null!=n&&"dataMax"!==n&&"function"!=typeof n&&!W(n)&&(n=this.axis.scale.parse(n)),n},getNeedCrossZero:function(){var e=this.option;return null==e.rangeStart&&null==e.rangeEnd&&!e.scale},getCoordSysModel:te,setRange:function(e,t){this.option.rangeStart=e,this.option.rangeEnd=t},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},qf=ms({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,i=t.cy,a=t.width/2,r=t.height/2;e.moveTo(n,i-r),e.lineTo(n+a,i+r),e.lineTo(n-a,i+r),e.closePath()}}),Kf=ms({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,i=t.cy,a=t.width/2,r=t.height/2;e.moveTo(n,i-r),e.lineTo(n+a,i),e.lineTo(n,i+r),e.lineTo(n-a,i),e.closePath()}}),Jf=ms({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,i=t.y,a=t.width/5*3,r=Math.max(a,t.height),o=a/2,s=o*o/(r-o),l=i-r+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,h=Math.sin(u),d=Math.cos(u),p=.6*o,f=.7*o;e.moveTo(n-c,l+s),e.arc(n,l,o,Math.PI-u,2*Math.PI+u),e.bezierCurveTo(n+c-h*p,l+s+d*p,n,i-f,n,i),e.bezierCurveTo(n,i-f,n-c+h*p,l+s+d*p,n-c,l+s),e.closePath()}}),Qf=ms({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,i=t.width,a=t.x,r=t.y,o=i/3*2;e.moveTo(a,r),e.lineTo(a+o,r+n),e.lineTo(a,r+n/4*3),e.lineTo(a-o,r+n),e.lineTo(a,r),e.closePath()}}),eg={line:function(e,t,n,i,a){a.x1=e,a.y1=t+i/2,a.x2=e+n,a.y2=t+i/2},rect:function(e,t,n,i,a){a.x=e,a.y=t,a.width=n,a.height=i},roundRect:function(e,t,n,i,a){a.x=e,a.y=t,a.width=n,a.height=i,a.r=Math.min(n,i)/4},square:function(e,t,n,i,a){var r=Math.min(n,i);a.x=e,a.y=t,a.width=r,a.height=r},circle:function(e,t,n,i,a){a.cx=e+n/2,a.cy=t+i/2,a.r=Math.min(n,i)/2},diamond:function(e,t,n,i,a){a.cx=e+n/2,a.cy=t+i/2,a.width=n,a.height=i},pin:function(e,t,n,i,a){a.x=e+n/2,a.y=t+i/2,a.width=n,a.height=i},arrow:function(e,t,n,i,a){a.x=e+n/2,a.y=t+i/2,a.width=n,a.height=i},triangle:function(e,t,n,i,a){a.cx=e+n/2,a.cy=t+i/2,a.width=n,a.height=i}},tg={};I({line:Ko,rect:Zo,roundRect:Zo,square:Zo,circle:No,diamond:Kf,pin:Jf,arrow:Qf,triangle:qf},(function(e,t){tg[t]=new e}));var ng=ms({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var i=fi(e,t,n),a=this.shape;return a&&"pin"===a.symbolType&&"inside"===t.textPosition&&(i.y=n.y+.4*n.height),i},buildPath:function(e,t,n){var i=t.symbolType;if("none"!==i){var a=tg[i];a=a||tg[i="rect"],eg[i](t.x,t.y,t.width,t.height,a.shape),a.buildPath(e,a.shape,n)}}});function ig(e,t){if("image"!==this.type){var n=this.style,i=this.shape;i&&"line"===i.symbolType?n.stroke=e:this.__isEmptyBrush?(n.stroke=e,n.fill=t||"#fff"):(n.fill&&(n.fill=e),n.stroke&&(n.stroke=e)),this.dirty(!1)}}function ag(e,t,n,i,a,r,o){var s,l=0===e.indexOf("empty");return l&&(e=e.substr(5,1).toLowerCase()+e.substr(6)),(s=0===e.indexOf("image://")?_s(e.slice(8),new In(t,n,i,a),o?"center":"cover"):0===e.indexOf("path://")?xs(e.slice(7),{},new In(t,n,i,a),o?"center":"cover"):new ng({shape:{symbolType:e,x:t,y:n,width:i,height:a}})).__isEmptyBrush=l,s.setColor=ig,s.setColor(r),s}var rg={isDimensionStacked:qp,enableDataStack:Zp,getStackedDimension:Kp},og=(Object.freeze||Object)({createList:function(e){return Jp(e.getSource(),e)},getLayoutRect:lu,dataStack:rg,createScale:function(e,t){var n=t;ml.isInstance(t)||T(n=new ml(t),Zf);var i=$f(n);return i.setExtent(e[0],e[1]),Ff(i,n),i},mixinAxisModelCommonMethods:function(e){T(e,Zf)},completeDimensions:Fp,createDimensions:Xp,createSymbol:ag});function sg(e,t){return Math.abs(e-t)<1e-8}function lg(e,t,n){var i=0,a=e[0];if(!a)return!1;for(var r=1;r<e.length;r++){var o=e[r];i+=ao(a[0],a[1],o[0],o[1],t,n),a=o}var s=e[0];return sg(a[0],s[0])&&sg(a[1],s[1])||(i+=ao(a[0],a[1],s[0],s[1],t,n)),0!==i}function ug(e,t,n){if(this.name=e,this.geometries=t,n)n=[n[0],n[1]];else{var i=this.getBoundingRect();n=[i.x+i.width/2,i.y+i.height/2]}this.center=n}function cg(e,t,n){for(var i=[],a=t[0],r=t[1],o=0;o<e.length;o+=2){var s=e.charCodeAt(o)-64,l=e.charCodeAt(o+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),a=s+=a,r=l+=r,i.push([s/n,l/n])}return i}function hg(e,t){return function(e){if(e.UTF8Encoding){var t=e.UTF8Scale;null==t&&(t=1024);for(var n=e.features,i=0;i<n.length;i++)for(var a=n[i].geometry,r=a.coordinates,o=a.encodeOffsets,s=0;s<r.length;s++){var l=r[s];if("Polygon"===a.type)r[s]=cg(l,o[s],t);else if("MultiPolygon"===a.type)for(var u=0;u<l.length;u++){var c=l[u];l[u]=cg(c,o[s][u],t)}}e.UTF8Encoding=!1}}(e),A(k(e.features,(function(e){return e.geometry&&e.properties&&0<e.geometry.coordinates.length})),(function(e){var n=e.properties,i=e.geometry,a=i.coordinates,r=[];"Polygon"===i.type&&r.push({type:"polygon",exterior:a[0],interiors:a.slice(1)}),"MultiPolygon"===i.type&&I(a,(function(e){e[0]&&r.push({type:"polygon",exterior:e[0],interiors:e.slice(1)})}));var o=new ug(n[t||"name"],r,n.cp);return o.properties=n,o}))}ug.prototype={constructor:ug,properties:null,getBoundingRect:function(){var e=this._rect;if(e)return e;for(var t=Number.MAX_VALUE,n=[t,t],i=[-t,-t],a=[],r=[],o=this.geometries,s=0;s<o.length;s++)"polygon"===o[s].type&&(Er(o[s].exterior,a,r),Se(n,n,a),Me(i,i,r));return 0===s&&(n[0]=n[1]=i[0]=i[1]=0),this._rect=new In(n[0],n[1],i[0]-n[0],i[1]-n[1])},contain:function(e){var t=this.getBoundingRect(),n=this.geometries;if(!t.contain(e[0],e[1]))return!1;e:for(var i=0,a=n.length;i<a;i++)if("polygon"===n[i].type){var r=n[i].exterior,o=n[i].interiors;if(lg(r,e[0],e[1])){for(var s=0;s<(o?o.length:0);s++)if(lg(o[s]))continue e;return!0}}return!1},transformTo:function(e,t,n,i){var a=this.getBoundingRect(),r=a.width/a.height;n?i=i||n/r:n=r*i;for(var o=new In(e,t,n,i),s=a.calculateTransform(o),l=this.geometries,u=0;u<l.length;u++)if("polygon"===l[u].type){for(var c=l[u].exterior,h=l[u].interiors,d=0;d<c.length;d++)we(c[d],c[d],s);for(var p=0;p<(h?h.length:0);p++)for(d=0;d<h[p].length;d++)we(h[p][d],h[p][d],s)}(a=this._rect).copy(o),this.center=[a.x+a.width/2,a.y+a.height/2]},cloneShallow:function(e){null==e&&(e=this.name);var t=new ug(e,this.geometries,this.center);return t._rect=this._rect,t.transformTo=null,t}};var dg=Ha();function pg(e,t){var n,i=fg(e,"labels"),a=Uf(t);return gg(i,a)||mg(i,a,{labels:O(a)?yg(e,a):vg(e,n="auto"===a?function(e){var t=dg(e).autoInterval;return null!=t?t:dg(e).autoInterval=e.calculateCategoryInterval()}(e):a),labelCategoryInterval:n})}function fg(e,t){return dg(e)[t]||(dg(e)[t]=[])}function gg(e,t){for(var n=0;n<e.length;n++)if(e[n].key===t)return e[n].value}function mg(e,t,n){return e.push({key:t,value:n}),n}function vg(e,t,n){var i=Xf(e),a=e.scale,r=a.getExtent(),o=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=r[0],c=a.count();0!==u&&1<l&&2<c/l&&(u=Math.round(Math.ceil(u/l)*l));var h=jf(e),d=o.get("showMinLabel")||h,p=o.get("showMaxLabel")||h;d&&u!==r[0]&&g(r[0]);for(var f=u;f<=r[1];f+=l)g(f);function g(e){s.push(n?e:{formattedLabel:i(e),rawLabel:a.getLabel(e),tickValue:e})}return p&&f-l!==r[1]&&g(r[1]),s}function yg(e,t,n){var i=e.scale,a=Xf(e),r=[];return I(i.getTicks(),(function(e){var o=i.getLabel(e);t(e,o)&&r.push(n?e:{formattedLabel:a(e),rawLabel:o,tickValue:e})})),r}var xg=[0,1],_g=function(e,t,n){this.dim=e,this.scale=t,this._extent=n||[0,0],this.inverse=!1,this.onBand=!1};function bg(e,t){var n=(e[1]-e[0])/t/2;e[0]+=n,e[1]-=n}_g.prototype={constructor:_g,contain:function(e){var t=this._extent,n=Math.min(t[0],t[1]),i=Math.max(t[0],t[1]);return n<=e&&e<=i},containData:function(e){return this.scale.contain(e)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(e){return Il(e||this.scale.getExtent(),this._extent)},setExtent:function(e,t){var n=this._extent;n[0]=e,n[1]=t},dataToCoord:function(e,t){var n=this._extent,i=this.scale;return e=i.normalize(e),this.onBand&&"ordinal"===i.type&&bg(n=n.slice(),i.count()),bl(e,xg,n,t)},coordToData:function(e,t){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&bg(n=n.slice(),i.count());var a=bl(e,n,xg,t);return this.scale.scale(a)},pointToData:function(e,t){},getTicksCoords:function(e){var t=(e=e||{}).tickModel||this.getTickModel(),n=A(function(e,t){return"category"===e.type?function(e,t){var n,i,a=fg(e,"ticks"),r=Uf(t),o=gg(a,r);if(o)return o;if(t.get("show")&&!e.scale.isBlank()||(n=[]),O(r))n=yg(e,r,!0);else if("auto"===r){var s=pg(e,e.getLabelModel());i=s.labelCategoryInterval,n=A(s.labels,(function(e){return e.tickValue}))}else n=vg(e,i=r,!0);return mg(a,r,{ticks:n,tickCategoryInterval:i})}(e,t):{ticks:e.scale.getTicks()}}(this,t).ticks,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this);return function(e,t,n,i){var a=t.length;if(e.onBand&&!n&&a){var r,o,s=e.getExtent();if(1===a)t[0].coord=s[0],r=t[1]={coord:s[0]};else{var l=t[a-1].tickValue-t[0].tickValue,u=(t[a-1].coord-t[0].coord)/l;I(t,(function(e){e.coord-=u/2})),o=1+e.scale.getExtent()[1]-t[a-1].tickValue,r={coord:t[a-1].coord+u*o},t.push(r)}var c=s[0]>s[1];h(t[0].coord,s[0])&&(i?t[0].coord=s[0]:t.shift()),i&&h(s[0],t[0].coord)&&t.unshift({coord:s[0]}),h(s[1],r.coord)&&(i?r.coord=s[1]:t.pop()),i&&h(r.coord,s[1])&&t.push({coord:s[1]})}function h(e,t){return e=Sl(e),t=Sl(t),c?t<e:e<t}}(this,n,t.get("alignWithLabel"),e.clamp),n},getMinorTicksCoords:function(){if("ordinal"===this.scale.type)return[];var e=this.model.getModel("minorTick").get("splitNumber");return 0<e&&e<100||(e=5),A(this.scale.getMinorTicks(e),(function(e){return A(e,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this)}),this)},getViewLabels:function(){return function(e){return"category"===e.type?function(e){var t=e.getLabelModel(),n=pg(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(e):function(e){var t=e.scale.getTicks(),n=Xf(e);return{labels:A(t,(function(t,i){return{formattedLabel:n(t,i),rawLabel:e.scale.getLabel(t),tickValue:t}}))}}(e)}(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return function(e){var t=function(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}(e),n=Xf(e),i=(t.axisRotate-t.labelRotate)/180*Math.PI,a=e.scale,r=a.getExtent(),o=a.count();if(r[1]-r[0]<1)return 0;var s=1;40<o&&(s=Math.max(1,Math.floor(o/40)));for(var l=r[0],u=e.dataToCoord(l+1)-e.dataToCoord(l),c=Math.abs(u*Math.cos(i)),h=Math.abs(u*Math.sin(i)),d=0,p=0;l<=r[1];l+=s){var f,g,m=hi(n(l),t.font,"center","top");f=1.3*m.width,g=1.3*m.height,d=Math.max(d,f,7),p=Math.max(p,g,7)}var v=d/c,y=p/h;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(v,y))),_=dg(e.model),b=e.getExtent(),w=_.lastAutoInterval,S=_.lastTickCount;return null!=w&&null!=S&&Math.abs(w-x)<=1&&Math.abs(S-o)<=1&&x<w&&_.axisExtend0===b[0]&&_.axisExtend1===b[1]?x=w:(_.lastTickCount=o,_.lastAutoInterval=x,_.axisExtend0=b[0],_.axisExtend1=b[1]),x}(this)}};var wg=hg,Sg={};I(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],(function(e){Sg[e]=ne[e]}));var Mg={};function Tg(e,t){var n=e.mapDimension("defaultedLabel",!0),i=n.length;if(1===i)return Ac(e,t,n[0]);if(i){for(var a=[],r=0;r<n.length;r++){var o=Ac(e,t,n[r]);a.push(o)}return a.join(" ")}}function Cg(e,t,n){An.call(this),this.updateData(e,t,n)}I(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","registerShape","getShapeClass","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],(function(e){Mg[e]=ul[e]})),Yc.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(e,t){return Jp(this.getSource(),this,{useEncodeDefaulter:!0})},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clip:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}});var Ig=Cg.prototype,Ag=Cg.getSymbolSize=function(e,t){var n=e.getItemVisual(t,"symbolSize");return n instanceof Array?n.slice():[+n,+n]};function Dg(e){return[e[0]/2,e[1]/2]}function kg(e,t){this.parent.drift(e,t)}Ig._createSymbol=function(e,t,n,i,a){this.removeAll();var r=ag(e,-1,-1,2,2,t.getItemVisual(n,"color"),a);r.attr({z2:100,culling:!0,scale:Dg(i)}),r.drift=kg,this._symbolType=e,this.add(r)},Ig.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(e)},Ig.getSymbolPath=function(){return this.childAt(0)},Ig.getScale=function(){return this.childAt(0).scale},Ig.highlight=function(){this.childAt(0).trigger("emphasis")},Ig.downplay=function(){this.childAt(0).trigger("normal")},Ig.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},Ig.setDraggable=function(e){var t=this.childAt(0);t.draggable=e,t.cursor=e?"move":t.cursor},Ig.updateData=function(e,t,n){this.silent=!1;var i=e.getItemVisual(t,"symbol")||"circle",a=e.hostModel,r=Ag(e,t),o=i!==this._symbolType;if(o){var s=e.getItemVisual(t,"symbolKeepAspect");this._createSymbol(i,e,t,r,s)}else(l=this.childAt(0)).silent=!1,Js(l,{scale:Dg(r)},a,t);if(this._updateCommon(e,t,r,n),o){var l=this.childAt(0),u=n&&n.fadeIn,c={scale:l.scale.slice()};u&&(c.style={opacity:l.style.opacity}),l.scale=[0,0],u&&(l.style.opacity=0),Qs(l,c,a,t)}this._seriesModel=a};var Lg=["itemStyle"],Eg=["emphasis","itemStyle"],Pg=["label"],zg=["emphasis","label"];function Og(e,t){if(!this.incremental&&!this.useHoverLayer)if("emphasis"===t){var n=this.__symbolOriginalScale,i=n[1]/n[0],a={scale:[Math.max(1.1*n[0],n[0]+3),Math.max(1.1*n[1],n[1]+3*i)]};this.animateTo(a,400,"elasticOut")}else"normal"===t&&this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}function Ng(e){this.group=new An,this._symbolCtor=e||Cg}Ig._updateCommon=function(e,t,n,i){var a=this.childAt(0),r=e.hostModel,o=e.getItemVisual(t,"color");"image"!==a.type?a.useStyle({strokeNoScale:!0}):a.setStyle({opacity:1,shadowBlur:null,shadowOffsetX:null,shadowOffsetY:null,shadowColor:null});var s=i&&i.itemStyle,l=i&&i.hoverItemStyle,u=i&&i.symbolOffset,c=i&&i.labelModel,h=i&&i.hoverLabelModel,d=i&&i.hoverAnimation,p=i&&i.cursorStyle;if(!i||e.hasItemOption){var f=i&&i.itemModel?i.itemModel:e.getItemModel(t);s=f.getModel(Lg).getItemStyle(["color"]),l=f.getModel(Eg).getItemStyle(),u=f.getShallow("symbolOffset"),c=f.getModel(Pg),h=f.getModel(zg),d=f.getShallow("hoverAnimation"),p=f.getShallow("cursor")}else l=x({},l);var g=a.style,m=e.getItemVisual(t,"symbolRotate");a.attr("rotation",(m||0)*Math.PI/180||0),u&&a.attr("position",[wl(u[0],n[0]),wl(u[1],n[1])]),p&&a.attr("cursor",p),a.setColor(o,i&&i.symbolInnerColor),a.setStyle(s);var v=e.getItemVisual(t,"opacity");null!=v&&(g.opacity=v);var y=e.getItemVisual(t,"liftZ"),_=a.__z2Origin;null!=y?null==_&&(a.__z2Origin=a.z2,a.z2+=y):null!=_&&(a.z2=_,a.__z2Origin=null);var b=i&&i.useNameLabel;Hs(g,l,c,h,{labelFetcher:r,labelDataIndex:t,defaultText:function(t,n){return b?e.getName(t):Tg(e,t)},isRectText:!0,autoColor:o}),a.__symbolOriginalScale=Dg(n),a.hoverStyle=l,a.highDownOnUpdate=d&&r.isAnimationEnabled()?Og:null,Bs(a)},Ig.fadeOut=function(e,t){var n=this.childAt(0);this.silent=n.silent=!0,t&&t.keepLabel||(n.style.text=null),Js(n,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,e)},M(Cg,An);var Rg=Ng.prototype;function Bg(e,t,n,i){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(i.isIgnore&&i.isIgnore(n))&&!(i.clipShape&&!i.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(n,"symbol")}function Vg(e){return null==e||R(e)||(e={isIgnore:e}),e||{}}function Gg(e){var t=e.hostModel;return{itemStyle:t.getModel("itemStyle").getItemStyle(["color"]),hoverItemStyle:t.getModel("emphasis.itemStyle").getItemStyle(),symbolRotate:t.get("symbolRotate"),symbolOffset:t.get("symbolOffset"),hoverAnimation:t.get("hoverAnimation"),labelModel:t.getModel("label"),hoverLabelModel:t.getModel("emphasis.label"),cursorStyle:t.get("cursor")}}function Wg(e,t,n){var i,a=e.getBaseAxis(),r=e.getOtherAxis(a),o=function(e,t){var n=0,i=e.scale.getExtent();return"start"===t?n=i[0]:"end"===t?n=i[1]:0<i[0]?n=i[0]:i[1]<0&&(n=i[1]),n}(r,n),s=a.dim,l=r.dim,u=t.mapDimension(l),c=t.mapDimension(s),h="x"===l||"radius"===l?1:0,d=A(e.dimensions,(function(e){return t.mapDimension(e)})),p=t.getCalculationInfo("stackResultDimension");return(i|=qp(t,d[0]))&&(d[0]=p),(i|=qp(t,d[1]))&&(d[1]=p),{dataDimsForPoint:d,valueStart:o,valueAxisDim:l,baseAxisDim:s,stacked:!!i,valueDim:u,baseDim:c,baseDataOffset:h,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function Hg(e,t,n,i){var a=NaN;e.stacked&&(a=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(a)&&(a=e.valueStart);var r=e.baseDataOffset,o=[];return o[r]=n.get(e.baseDim,i),o[1-r]=a,t.dataToPoint(o)}Rg.updateData=function(e,t){t=Vg(t);var n=this.group,i=e.hostModel,a=this._data,r=this._symbolCtor,o=Gg(e);a||n.removeAll(),e.diff(a).add((function(i){var a=e.getItemLayout(i);if(Bg(e,a,i,t)){var s=new r(e,i,o);s.attr("position",a),e.setItemGraphicEl(i,s),n.add(s)}})).update((function(s,l){var u=a.getItemGraphicEl(l),c=e.getItemLayout(s);Bg(e,c,s,t)?(u?(u.updateData(e,s,o),Js(u,{position:c},i)):(u=new r(e,s)).attr("position",c),n.add(u),e.setItemGraphicEl(s,u)):n.remove(u)})).remove((function(e){var t=a.getItemGraphicEl(e);t&&t.fadeOut((function(){n.remove(t)}))})).execute(),this._data=e},Rg.isPersistent=function(){return!0},Rg.updateLayout=function(){var e=this._data;e&&e.eachItemGraphicEl((function(t,n){var i=e.getItemLayout(n);t.attr("position",i)}))},Rg.incrementalPrepareUpdate=function(e){this._seriesScope=Gg(e),this._data=null,this.group.removeAll()},Rg.incrementalUpdate=function(e,t,n){function i(e){e.isGroup||(e.incremental=e.useHoverLayer=!0)}n=Vg(n);for(var a=e.start;a<e.end;a++){var r=t.getItemLayout(a);if(Bg(t,r,a,n)){var o=new this._symbolCtor(t,a,this._seriesScope);o.traverse(i),o.attr("position",r),this.group.add(o),t.setItemGraphicEl(a,o)}}},Rg.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl((function(e){e.fadeOut((function(){t.remove(e)}))})):t.removeAll()};var Fg=Se,$g=Me,Xg=ue,Yg=re,Ug=[],jg=[],Zg=[];function qg(e){return isNaN(e[0])||isNaN(e[1])}function Kg(e,t,n,i,a,r,o,s,l,u){return"none"!==u&&u?(function(e,t,n,i,a,r,o,s,l,u,c){for(var h=0,d=n,p=0;p<i;p++){var f=t[d];if(a<=d||d<0)break;if(qg(f)){if(c){d+=r;continue}break}if(d===n)e[0<r?"moveTo":"lineTo"](f[0],f[1]);else if(0<l){var g=t[h],m="y"===u?1:0,v=(f[m]-g[m])*l;Yg(jg,g),jg[m]=g[m]+v,Yg(Zg,f),Zg[m]=f[m]-v,e.bezierCurveTo(jg[0],jg[1],Zg[0],Zg[1],f[0],f[1])}else e.lineTo(f[0],f[1]);h=d,d+=r}return p}).apply(this,arguments):(function(e,t,n,i,a,r,o,s,l,u,c){for(var h=0,d=n,p=0;p<i;p++){var f=t[d];if(a<=d||d<0)break;if(qg(f)){if(c){d+=r;continue}break}if(d===n)e[0<r?"moveTo":"lineTo"](f[0],f[1]),Yg(jg,f);else if(0<l){var g=d+r,m=t[g];if(c)for(;m&&qg(t[g]);)m=t[g+=r];var v=.5,y=t[h];if(!(m=t[g])||qg(m))Yg(Zg,f);else{var x,_;if(qg(m)&&!c&&(m=f),ce(Ug,m,y),"x"===u||"y"===u){var b="x"===u?0:1;x=Math.abs(f[b]-y[b]),_=Math.abs(f[b]-m[b])}else x=ye(f,y),_=ye(f,m);Xg(Zg,f,Ug,-l*(1-(v=_/(_+x))))}Fg(jg,jg,s),$g(jg,jg,o),Fg(Zg,Zg,s),$g(Zg,Zg,o),e.bezierCurveTo(jg[0],jg[1],Zg[0],Zg[1],f[0],f[1]),Xg(jg,f,Ug,l*v)}else e.lineTo(f[0],f[1]);h=d,d+=r}return p}).apply(this,arguments)}function Jg(e,t){var n=[1/0,1/0],i=[-1/0,-1/0];if(t)for(var a=0;a<e.length;a++){var r=e[a];r[0]<n[0]&&(n[0]=r[0]),r[1]<n[1]&&(n[1]=r[1]),r[0]>i[0]&&(i[0]=r[0]),r[1]>i[1]&&(i[1]=r[1])}return{min:t?n:i,max:t?i:n}}var Qg=vo.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:Oo(vo.prototype.brush),buildPath:function(e,t){var n=t.points,i=0,a=n.length,r=Jg(n,t.smoothConstraint);if(t.connectNulls){for(;0<a&&qg(n[a-1]);a--);for(;i<a&&qg(n[i]);i++);}for(;i<a;)i+=Kg(e,n,i,a,a,1,r.min,r.max,t.smooth,t.smoothMonotone,t.connectNulls)+1}}),em=vo.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:Oo(vo.prototype.brush),buildPath:function(e,t){var n=t.points,i=t.stackedOnPoints,a=0,r=n.length,o=t.smoothMonotone,s=Jg(n,t.smoothConstraint),l=Jg(i,t.smoothConstraint);if(t.connectNulls){for(;0<r&&qg(n[r-1]);r--);for(;a<r&&qg(n[a]);a++);}for(;a<r;){var u=Kg(e,n,a,r,r,1,s.min,s.max,t.smooth,o,t.connectNulls);Kg(e,i,a+u-1,u,r,-1,l.min,l.max,t.stackedOnSmooth,o,t.connectNulls),a+=u+1,e.closePath()}}});function tm(e,t,n){var i=e.getArea(),a=e.getBaseAxis().isHorizontal(),r=i.x,o=i.y,s=i.width,l=i.height,u=n.get("lineStyle.width")||2;r-=u/2,o-=u/2,s+=u,l+=u,r=Math.floor(r),s=Math.round(s);var c=new Zo({shape:{x:r,y:o,width:s,height:l}});return t&&(c.shape[a?"width":"height"]=0,Qs(c,{shape:{width:s,height:l}},n)),c}function nm(e,t,n){var i=e.getArea(),a=new Bo({shape:{cx:Sl(e.cx,1),cy:Sl(e.cy,1),r0:Sl(i.r0,1),r:Sl(i.r,1),startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});return t&&(a.shape.endAngle=i.startAngle,Qs(a,{shape:{endAngle:i.endAngle}},n)),a}function im(e,t,n){return e?"polar"===e.type?nm(e,t,n):"cartesian2d"===e.type?tm(e,t,n):null:null}function am(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++){var i=e[n],a=t[n];if(i[0]!==a[0]||i[1]!==a[1])return}return!0}}function rm(e,t){var n=[],i=[],a=[],r=[];return Er(e,n,i),Er(t,a,r),Math.max(Math.abs(n[0]-a[0]),Math.abs(n[1]-a[1]),Math.abs(i[0]-r[0]),Math.abs(i[1]-r[1]))}function om(e){return"number"==typeof e?e:e?.5:0}function sm(e,t,n){for(var i=t.getBaseAxis(),a="x"===i.dim||"radius"===i.dim?0:1,r=[],o=0;o<e.length-1;o++){var s=e[o+1],l=e[o];r.push(l);var u=[];switch(n){case"end":u[a]=s[a],u[1-a]=l[1-a],r.push(u);break;case"middle":var c=(l[a]+s[a])/2,h=[];u[a]=h[a]=c,u[1-a]=l[1-a],h[1-a]=s[1-a],r.push(u),r.push(h);break;default:u[a]=l[a],u[1-a]=s[1-a],r.push(u)}}return e[o]&&r.push(e[o]),r}function lm(e,t,n){if("cartesian2d"!==e.type)return nm(e,t,n);var i=e.getBaseAxis().isHorizontal(),a=tm(e,t,n);if(!n.get("clip",!0)){var r=a.shape,o=Math.max(r.width,r.height);i?(r.y-=o,r.height+=2*o):(r.x-=o,r.width+=2*o)}return a}function um(e,t,n){return{seriesType:e,performRawSeries:!0,reset:function(e,i,a){var r=e.getData(),o=e.get("symbol"),s=e.get("symbolSize"),l=e.get("symbolKeepAspect"),u=e.get("symbolRotate"),c=O(o),h=O(s),d=O(u),p=c||h||d,f=!c&&o?o:t,g=h?null:s;if(r.setVisual({legendSymbol:n||f,symbol:f,symbolSize:g,symbolKeepAspect:l,symbolRotate:u}),!i.isSeriesFiltered(e))return{dataEach:r.hasItemOption||p?function(t,n){if(p){var i=e.getRawValue(n),a=e.getDataParams(n);c&&t.setItemVisual(n,"symbol",o(i,a)),h&&t.setItemVisual(n,"symbolSize",s(i,a)),d&&t.setItemVisual(n,"symbolRotate",u(i,a))}if(t.hasItemOption){var r=t.getItemModel(n),l=r.getShallow("symbol",!0),f=r.getShallow("symbolSize",!0),g=r.getShallow("symbolRotate",!0),m=r.getShallow("symbolKeepAspect",!0);null!=l&&t.setItemVisual(n,"symbol",l),null!=f&&t.setItemVisual(n,"symbolSize",f),null!=g&&t.setItemVisual(n,"symbolRotate",g),null!=m&&t.setItemVisual(n,"symbolKeepAspect",m)}}:null}}}}function cm(e){return{seriesType:e,plan:nh(),reset:function(e){var t=e.getData(),n=e.coordinateSystem,i=e.pipelineContext.large;if(n){var a=A(n.dimensions,(function(e){return t.mapDimension(e)})).slice(0,2),r=a.length,o=t.getCalculationInfo("stackResultDimension");return qp(t,a[0])&&(a[0]=o),qp(t,a[1])&&(a[1]=o),r&&{progress:function(e,t){for(var o=e.end-e.start,s=i&&new Float32Array(o*r),l=e.start,u=0,c=[],h=[];l<e.end;l++){var d;if(1===r){var p=t.get(a[0],l);d=!isNaN(p)&&n.dataToPoint(p,null,h)}else{p=c[0]=t.get(a[0],l);var f=c[1]=t.get(a[1],l);d=!isNaN(p)&&!isNaN(f)&&n.dataToPoint(c,null,h)}i?(s[u++]=d?d[0]:NaN,s[u++]=d?d[1]:NaN):t.setItemLayout(l,d&&d.slice()||[NaN,NaN])}i&&t.setLayout("symbolPoints",s)}}}}}}function hm(e,t){return Math.round(e.length/2)}rh.extend({type:"line",init:function(){var e=new An,t=new Ng;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e},render:function(e,t,n){var i=e.coordinateSystem,a=this.group,r=e.getData(),o=e.getModel("lineStyle"),s=e.getModel("areaStyle"),l=r.mapArray(r.getItemLayout),u="polar"===i.type,c=this._coordSys,h=this._symbolDraw,d=this._polyline,p=this._polygon,f=this._lineGroup,g=e.get("animation"),m=!s.isEmpty(),v=s.get("origin"),y=function(e,t,n){if(!n.valueDim)return[];for(var i=[],a=0,r=t.count();a<r;a++)i.push(Hg(n,e,t,a));return i}(i,r,Wg(i,r,v)),x=e.get("showSymbol"),b=x&&!u&&function(e,t,n){var i=e.get("showAllSymbol"),a="auto"===i;if(!i||a){var r=n.getAxesByScale("ordinal")[0];if(r&&(!a||!function(e,t){var n=e.getExtent(),i=Math.abs(n[1]-n[0])/e.scale.count();isNaN(i)&&(i=0);for(var a=t.count(),r=Math.max(1,Math.round(a/5)),o=0;o<a;o+=r)if(1.5*Cg.getSymbolSize(t,o)[e.isHorizontal()?1:0]>i)return!1;return!0}(r,t))){var o=t.mapDimension(r.dim),s={};return I(r.getViewLabels(),(function(e){s[e.tickValue]=1})),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}(e,r,i),w=this._data;w&&w.eachItemGraphicEl((function(e,t){e.__temp&&(a.remove(e),w.setItemGraphicEl(t,null))})),x||h.remove(),a.add(f);var S,M=!u&&e.get("step");i&&i.getArea&&e.get("clip",!0)&&(null!=(S=i.getArea()).width?(S.x-=.1,S.y-=.1,S.width+=.2,S.height+=.2):S.r0&&(S.r0-=.5,S.r1+=.5)),this._clipShapeForSymbol=S,d&&c.type===i.type&&M===this._step?(m&&!p?p=this._newPolygon(l,y,i,g):p&&!m&&(f.remove(p),p=this._polygon=null),f.setClipPath(lm(i,!1,e)),x&&h.updateData(r,{isIgnore:b,clipShape:S}),r.eachItemGraphicEl((function(e){e.stopAnimation(!0)})),am(this._stackedOnPoints,y)&&am(this._points,l)||(g?this._updateAnimation(r,y,i,n,M,v):(M&&(l=sm(l,i,M),y=sm(y,i,M)),d.setShape({points:l}),p&&p.setShape({points:l,stackedOnPoints:y})))):(x&&h.updateData(r,{isIgnore:b,clipShape:S}),M&&(l=sm(l,i,M),y=sm(y,i,M)),d=this._newPolyline(l,i,g),m&&(p=this._newPolygon(l,y,i,g)),f.setClipPath(lm(i,!0,e)));var T=function(e,t){var n=e.getVisual("visualMeta");if(n&&n.length&&e.count()&&"cartesian2d"===t.type){for(var i,a,r=n.length-1;0<=r;r--){var o=n[r].dimension,s=e.dimensions[o],l=e.getDimensionInfo(s);if("x"===(i=l&&l.coordDim)||"y"===i){a=n[r];break}}if(a){var u=t.getAxis(i),c=A(a.stops,(function(e){return{coord:u.toGlobalCoord(u.dataToCoord(e.value)),color:e.color}})),h=c.length,d=a.outerColors.slice();h&&c[0].coord>c[h-1].coord&&(c.reverse(),d.reverse());var p=c[0].coord-10,f=c[h-1].coord+10,g=f-p;if(g<.001)return"transparent";I(c,(function(e){e.offset=(e.coord-p)/g})),c.push({offset:h?c[h-1].offset:.5,color:d[1]||"transparent"}),c.unshift({offset:h?c[0].offset:.5,color:d[0]||"transparent"});var m=new as(0,0,0,0,c,!0);return m[i]=p,m[i+"2"]=f,m}}}(r,i)||r.getVisual("color");d.useStyle(_(o.getLineStyle(),{fill:"none",stroke:T,lineJoin:"bevel"}));var C=e.get("smooth");if(C=om(e.get("smooth")),d.setShape({smooth:C,smoothMonotone:e.get("smoothMonotone"),connectNulls:e.get("connectNulls")}),p){var D=r.getCalculationInfo("stackedOnSeries"),k=0;p.useStyle(_(s.getAreaStyle(),{fill:T,opacity:.7,lineJoin:"bevel"})),D&&(k=om(D.get("smooth"))),p.setShape({smooth:C,stackedOnSmooth:k,smoothMonotone:e.get("smoothMonotone"),connectNulls:e.get("connectNulls")})}this._data=r,this._coordSys=i,this._stackedOnPoints=y,this._points=l,this._step=M,this._valueOrigin=v},dispose:function(){},highlight:function(e,t,n,i){var a=e.getData(),r=Wa(a,i);if(!(r instanceof Array)&&null!=r&&0<=r){var o=a.getItemGraphicEl(r);if(!o){var s=a.getItemLayout(r);if(!s)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;(o=new Cg(a,r)).position=s,o.setZ(e.get("zlevel"),e.get("z")),o.ignore=isNaN(s[0])||isNaN(s[1]),o.__temp=!0,a.setItemGraphicEl(r,o),o.stopSymbolAnimation(!0),this.group.add(o)}o.highlight()}else rh.prototype.highlight.call(this,e,t,n,i)},downplay:function(e,t,n,i){var a=e.getData(),r=Wa(a,i);if(null!=r&&0<=r){var o=a.getItemGraphicEl(r);o&&(o.__temp?(a.setItemGraphicEl(r,null),this.group.remove(o)):o.downplay())}else rh.prototype.downplay.call(this,e,t,n,i)},_newPolyline:function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new Qg({shape:{points:e},silent:!0,z2:10}),this._lineGroup.add(t),this._polyline=t},_newPolygon:function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new em({shape:{points:e,stackedOnPoints:t},silent:!0}),this._lineGroup.add(n),this._polygon=n},_updateAnimation:function(e,t,n,i,a,r){var o=this._polyline,s=this._polygon,l=e.hostModel,u=function(e,t,n,i,a,r,o,s){for(var l=function(e,t){var n=[];return t.diff(e).add((function(e){n.push({cmd:"+",idx:e})})).update((function(e,t){n.push({cmd:"=",idx:t,idx1:e})})).remove((function(e){n.push({cmd:"-",idx:e})})).execute(),n}(e,t),u=[],c=[],h=[],d=[],p=[],f=[],g=[],m=Wg(a,t,o),v=Wg(r,e,s),y=0;y<l.length;y++){var x=l[y],_=!0;switch(x.cmd){case"=":var b=e.getItemLayout(x.idx),w=t.getItemLayout(x.idx1);(isNaN(b[0])||isNaN(b[1]))&&(b=w.slice()),u.push(b),c.push(w),h.push(n[x.idx]),d.push(i[x.idx1]),g.push(t.getRawIndex(x.idx1));break;case"+":var S=x.idx;u.push(a.dataToPoint([t.get(m.dataDimsForPoint[0],S),t.get(m.dataDimsForPoint[1],S)])),c.push(t.getItemLayout(S).slice()),h.push(Hg(m,a,t,S)),d.push(i[S]),g.push(t.getRawIndex(S));break;case"-":S=x.idx;var M=e.getRawIndex(S);M!==S?(u.push(e.getItemLayout(S)),c.push(r.dataToPoint([e.get(v.dataDimsForPoint[0],S),e.get(v.dataDimsForPoint[1],S)])),h.push(n[S]),d.push(Hg(v,r,e,S)),g.push(M)):_=!1}_&&(p.push(x),f.push(f.length))}f.sort((function(e,t){return g[e]-g[t]}));var T=[],C=[],I=[],A=[],D=[];for(y=0;y<f.length;y++)S=f[y],T[y]=u[S],C[y]=c[S],I[y]=h[S],A[y]=d[S],D[y]=p[S];return{current:T,next:C,stackedOnCurrent:I,stackedOnNext:A,status:D}}(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,r),c=u.current,h=u.stackedOnCurrent,d=u.next,p=u.stackedOnNext;if(a&&(c=sm(u.current,n,a),h=sm(u.stackedOnCurrent,n,a),d=sm(u.next,n,a),p=sm(u.stackedOnNext,n,a)),3e3<rm(c,d)||s&&3e3<rm(h,p))return o.setShape({points:d}),void(s&&s.setShape({points:d,stackedOnPoints:p}));o.shape.__points=u.current,o.shape.points=c,Js(o,{shape:{points:d}},l),s&&(s.setShape({points:c,stackedOnPoints:h}),Js(s,{shape:{points:d,stackedOnPoints:p}},l));for(var f=[],g=u.status,m=0;m<g.length;m++)if("="===g[m].cmd){var v=e.getItemGraphicEl(g[m].idx1);v&&f.push({el:v,ptIdx:m})}o.animators&&o.animators.length&&o.animators[0].during((function(){for(var e=0;e<f.length;e++)f[e].el.attr("position",o.shape.__points[f[e].ptIdx])}))},remove:function(e){var t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl((function(e,i){e.__temp&&(t.remove(e),n.setItemGraphicEl(i,null))})),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});var dm={average:function(e){for(var t=0,n=0,i=0;i<e.length;i++)isNaN(e[i])||(t+=e[i],n++);return 0===n?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}};function pm(e){return this._axes[e]}function fm(e){this._axes={},this._dimList=[],this.name=e||""}function gm(e){fm.call(this,e)}function mm(e,t,n,i,a){_g.call(this,e,t,n),this.type=i||"value",this.position=a||"bottom"}fm.prototype={constructor:fm,type:"cartesian",getAxis:function(e){return this._axes[e]},getAxes:function(){return A(this._dimList,pm,this)},getAxesByScale:function(e){return e=e.toLowerCase(),k(this.getAxes(),(function(t){return t.scale.type===e}))},addAxis:function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},dataToCoord:function(e){return this._dataCoordConvert(e,"dataToCoord")},coordToData:function(e){return this._dataCoordConvert(e,"coordToData")},_dataCoordConvert:function(e,t){for(var n=this._dimList,i=e instanceof Array?[]:{},a=0;a<n.length;a++){var r=n[a],o=this._axes[r];i[r]=o[t](e[r])}return i}},gm.prototype={constructor:gm,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(e){var t=this.getAxis("x"),n=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},containData:function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},dataToPoint:function(e,t,n){var i=this.getAxis("x"),a=this.getAxis("y");return(n=n||[])[0]=i.toGlobalCoord(i.dataToCoord(e[0])),n[1]=a.toGlobalCoord(a.dataToCoord(e[1])),n},clampData:function(e,t){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,a=n.getExtent(),r=i.getExtent(),o=n.parse(e[0]),s=i.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(a[0],a[1]),o),Math.max(a[0],a[1])),t[1]=Math.min(Math.max(Math.min(r[0],r[1]),s),Math.max(r[0],r[1])),t},pointToData:function(e,t){var n=this.getAxis("x"),i=this.getAxis("y");return(t=t||[])[0]=n.coordToData(n.toLocalCoord(e[0])),t[1]=i.coordToData(i.toLocalCoord(e[1])),t},getOtherAxis:function(e){return this.getAxis("x"===e.dim?"y":"x")},getArea:function(){var e=this.getAxis("x").getGlobalExtent(),t=this.getAxis("y").getGlobalExtent(),n=Math.min(e[0],e[1]),i=Math.min(t[0],t[1]);return new In(n,i,Math.max(e[0],e[1])-n,Math.max(t[0],t[1])-i)}},M(gm,fm),mm.prototype={constructor:mm,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var e=this.position;return"top"===e||"bottom"===e},getGlobalExtent:function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(e,t){return this.coordToData(this.toLocalCoord(e["x"===this.dim?0:1]),t)},toLocalCoord:null,toGlobalCoord:null},M(mm,_g);var vm={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},ym={};function xm(e,t,n,i){I(_m,(function(a){t.extend({type:e+"Axis."+a,mergeDefaultAndTheme:function(t,i){var r=this.layoutMode,o=r?hu(t):{};v(t,i.getTheme().get(a+"Axis")),v(t,this.getDefaultOption()),t.type=n(e,t),r&&cu(t,o,r)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=ef.createByAxisModel(this))},getCategories:function(e){var t=this.option;if("category"===t.type)return e?t.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:y([{},ym[a+"Axis"],i],!0)})})),vu.registerSubTypeDefaulter(e+"Axis",P(n,e))}ym.categoryAxis=v({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},vm),ym.valueAxis=v({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},vm),ym.timeAxis=_({scale:!0,min:"dataMin",max:"dataMax"},ym.valueAxis),ym.logAxis=_({scale:!0,logBase:10},ym.valueAxis);var _m=["value","category","time","log"],bm=vu.extend({type:"cartesian2dAxis",axis:null,init:function(){bm.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){bm.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){bm.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function wm(e,t){return t.type||(t.data?"category":"value")}v(bm.prototype,Zf);var Sm={offset:0};function Mm(e,t){return e.getCoordSysModel()===t}function Tm(e,t,n){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(e,t,n),this.model=e}xm("x",bm,wm,Sm),xm("y",bm,wm,Sm),vu.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var Cm=Tm.prototype;function Im(e,t,n,i){n.getAxesOnZeroOf=function(){return a?[a]:[]};var a,r=e[t],o=n.model,s=o.get("axisLine.onZero"),l=o.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)Am(r[l])&&(a=r[l]);else for(var u in r)if(r.hasOwnProperty(u)&&Am(r[u])&&!i[c(r[u])]){a=r[u];break}a&&(i[c(a)]=!0)}function c(e){return e.dim+"_"+e.index}}function Am(e){return e&&"category"!==e.type&&"time"!==e.type&&function(e){var t=e.scale.getExtent(),n=t[0],i=t[1];return!(0<n&&0<i||n<0&&i<0)}(e)}Cm.type="grid",Cm.axisPointerEnabled=!0,Cm.getRect=function(){return this._rect},Cm.update=function(e,t){var n=this._axesMap;this._updateScale(e,this.model),I(n.x,(function(e){Ff(e.scale,e.model)})),I(n.y,(function(e){Ff(e.scale,e.model)}));var i={};I(n.x,(function(e){Im(n,"y",e,i)})),I(n.y,(function(e){Im(n,"x",e,i)})),this.resize(this.model,t)},Cm.resize=function(e,t,n){var i=lu(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()});this._rect=i;var a=this._axesList;function r(){I(a,(function(e){var t=e.isHorizontal(),n=t?[0,i.width]:[0,i.height],a=e.inverse?1:0;e.setExtent(n[a],n[1-a]),function(e,t){var n=e.getExtent(),i=n[0]+n[1];e.toGlobalCoord="x"===e.dim?function(e){return e+t}:function(e){return i-e+t},e.toLocalCoord="x"===e.dim?function(e){return e-t}:function(e){return i-e+t}}(e,t?i.x:i.y)}))}r(),!n&&e.get("containLabel")&&(I(a,(function(e){if(!e.model.get("axisLabel.inside")){var t=function(e){var t=e.model,n=e.scale;if(t.get("axisLabel.show")&&!n.isBlank()){var i,a,r="category"===e.type,o=n.getExtent();a=r?n.count():(i=n.getTicks()).length;var s,l,u,c,h,d,p,f,g=e.getLabelModel(),m=Xf(e),v=1;40<a&&(v=Math.ceil(a/40));for(var y=0;y<a;y+=v){var x=m(i?i[y]:o[0]+y),_=(l=g.getTextRect(x),u=(g.get("rotate")||0)*Math.PI/180,h=(c=l.plain()).width,d=c.height,p=h*Math.abs(Math.cos(u))+Math.abs(d*Math.sin(u)),f=h*Math.abs(Math.sin(u))+Math.abs(d*Math.cos(u)),new In(c.x,c.y,p,f));s?s.union(_):s=_}return s}}(e);if(t){var n=e.isHorizontal()?"height":"width",a=e.model.get("axisLabel.margin");i[n]-=t[n]+a,"top"===e.position?i.y+=t.height+a:"left"===e.position&&(i.x+=t.width+a)}}})),r())},Cm.getAxis=function(e,t){var n=this._axesMap[e];if(null!=n){if(null==t)for(var i in n)if(n.hasOwnProperty(i))return n[i];return n[t]}},Cm.getAxes=function(){return this._axesList.slice()},Cm.getCartesian=function(e,t){if(null!=e&&null!=t){var n="x"+e+"y"+t;return this._coordsMap[n]}R(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,a=this._coordsList;i<a.length;i++)if(a[i].getAxis("x").index===e||a[i].getAxis("y").index===t)return a[i]},Cm.getCartesians=function(){return this._coordsList.slice()},Cm.convertToPixel=function(e,t,n){var i=this._findConvertTarget(e,t);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},Cm.convertFromPixel=function(e,t,n){var i=this._findConvertTarget(e,t);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},Cm._findConvertTarget=function(e,t){var n,i,a=t.seriesModel,r=t.xAxisModel||a&&a.getReferringComponents("xAxis")[0],o=t.yAxisModel||a&&a.getReferringComponents("yAxis")[0],s=t.gridModel,l=this._coordsList;return a?S(l,n=a.coordinateSystem)<0&&(n=null):r&&o?n=this.getCartesian(r.componentIndex,o.componentIndex):r?i=this.getAxis("x",r.componentIndex):o?i=this.getAxis("y",o.componentIndex):s&&s.coordinateSystem===this&&(n=this._coordsList[0]),{cartesian:n,axis:i}},Cm.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},Cm._initCartesian=function(e,t,n){var i={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},r={x:0,y:0};if(t.eachComponent("xAxis",o("x"),this),t.eachComponent("yAxis",o("y"),this),!r.x||!r.y)return this._axesMap={},void(this._axesList=[]);function o(t){return function(n,o){if(Mm(n,e)){var s=n.get("position");"x"===t?"top"!==s&&"bottom"!==s&&(s=i.bottom?"top":"bottom"):"left"!==s&&"right"!==s&&(s=i.left?"right":"left"),i[s]=!0;var l=new mm(t,$f(n),[0,0],n.get("type"),s),u="category"===l.type;l.onBand=u&&n.get("boundaryGap"),l.inverse=n.get("inverse"),(n.axis=l).model=n,l.grid=this,l.index=o,this._axesList.push(l),a[t][o]=l,r[t]++}}}I((this._axesMap=a).x,(function(t,n){I(a.y,(function(i,a){var r="x"+n+"y"+a,o=new gm(r);o.grid=this,o.model=e,this._coordsMap[r]=o,this._coordsList.push(o),o.addAxis(t),o.addAxis(i)}),this)}),this)},Cm._updateScale=function(e,t){function n(e,t){I(e.mapDimension(t.dim,!0),(function(n){t.scale.unionExtentFromData(e,Kp(e,n))}))}I(this._axesList,(function(e){e.scale.setExtent(1/0,-1/0)})),e.eachSeries((function(e){if(Lm(e)){var i=km(e),a=i[0],r=i[1];if(!Mm(a,t)||!Mm(r,t))return;var o=this.getCartesian(a.componentIndex,r.componentIndex),s=e.getData(),l=o.getAxis("x"),u=o.getAxis("y");"list"===s.type&&(n(s,l),n(s,u))}}),this)},Cm.getTooltipAxes=function(e){var t=[],n=[];return I(this.getCartesians(),(function(i){var a=null!=e&&"auto"!==e?i.getAxis(e):i.getBaseAxis(),r=i.getOtherAxis(a);S(t,a)<0&&t.push(a),S(n,r)<0&&n.push(r)})),{baseAxes:t,otherAxes:n}};var Dm=["xAxis","yAxis"];function km(e){return A(Dm,(function(t){return e.getReferringComponents(t)[0]}))}function Lm(e){return"cartesian2d"===e.get("coordinateSystem")}function Em(e,t){this.opt=t,this.axisModel=e,_(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new An;var n=new An({position:t.position.slice(),rotation:t.rotation});n.updateTransform(),this._transform=n.transform,this._dumbGroup=n}Tm.create=function(e,t){var n=[];return e.eachComponent("grid",(function(i,a){var r=new Tm(i,e,t);r.name="grid_"+a,r.resize(i,t,!0),i.coordinateSystem=r,n.push(r)})),e.eachSeries((function(e){if(Lm(e)){var t=km(e),n=t[0],i=t[1],a=n.getCoordSysModel().coordinateSystem;e.coordinateSystem=a.getCartesian(n.componentIndex,i.componentIndex)}})),n},Tm.dimensions=Tm.prototype.dimensions=gm.prototype.dimensions,ju.register("cartesian2d",Tm);var Pm=Math.PI;Em.prototype={constructor:Em,hasBuilder:function(e){return!!zm[e]},add:function(e){zm[e].call(this)},getGroup:function(){return this.group}};var zm={axisLine:function(){var e=this.opt,t=this.axisModel;if(t.get("axisLine.show")){var n=this.axisModel.axis.getExtent(),i=this._transform,a=[n[0],0],r=[n[1],0];i&&(we(a,a,i),we(r,r,i));var o=x({lineCap:"round"},t.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new Ko({anid:"line",subPixelOptimize:!0,shape:{x1:a[0],y1:a[1],x2:r[0],y2:r[1]},style:o,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1}));var s=t.get("axisLine.symbol"),l=t.get("axisLine.symbolSize"),u=t.get("axisLine.symbolOffset")||0;if("number"==typeof u&&(u=[u,u]),null!=s){"string"==typeof s&&(s=[s,s]),"string"!=typeof l&&"number"!=typeof l||(l=[l,l]);var c=l[0],h=l[1];I([{rotate:e.rotation+Math.PI/2,offset:u[0],r:0},{rotate:e.rotation-Math.PI/2,offset:u[1],r:Math.sqrt((a[0]-r[0])*(a[0]-r[0])+(a[1]-r[1])*(a[1]-r[1]))}],(function(t,n){if("none"!==s[n]&&null!=s[n]){var i=ag(s[n],-c/2,-h/2,c,h,o.stroke,!0),r=t.r+t.offset,l=[a[0]+r*Math.cos(e.rotation),a[1]-r*Math.sin(e.rotation)];i.attr({rotation:t.rotate,position:l,silent:!0,z2:11}),this.group.add(i)}}),this)}}},axisTickLabel:function(){var e=this.axisModel,t=this.opt,n=function(e,t,n){var i=t.axis,a=t.getModel("axisTick");if(a.get("show")&&!i.scale.isBlank()){for(var r=a.getModel("lineStyle"),o=n.tickDirection*a.get("length"),s=Wm(i.getTicksCoords(),e._transform,o,_(r.getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")}),"ticks"),l=0;l<s.length;l++)e.group.add(s[l]);return s}}(this,e,t);!function(e,t,n){if(!jf(e.axis)){var i=e.get("axisLabel.showMinLabel"),a=e.get("axisLabel.showMaxLabel");n=n||[];var r=(t=t||[])[0],o=t[1],s=t[t.length-1],l=t[t.length-2],u=n[0],c=n[1],h=n[n.length-1],d=n[n.length-2];!1===i?(Bm(r),Bm(u)):Vm(r,o)&&(i?(Bm(o),Bm(c)):(Bm(r),Bm(u))),!1===a?(Bm(s),Bm(h)):Vm(l,s)&&(a?(Bm(l),Bm(d)):(Bm(s),Bm(h)))}}(e,function(e,t,n){var i=t.axis;if(H(n.axisLabelShow,t.get("axisLabel.show"))&&!i.scale.isBlank()){var a=t.getModel("axisLabel"),r=a.get("margin"),o=i.getViewLabels(),s=(H(n.labelRotate,a.get("rotate"))||0)*Pm/180,l=Nm(n.rotation,s,n.labelDirection),u=t.getCategories&&t.getCategories(!0),c=[],h=Rm(t),d=t.get("triggerEvent");return I(o,(function(o,s){var p=o.tickValue,f=o.formattedLabel,g=o.rawLabel,m=a;u&&u[p]&&u[p].textStyle&&(m=new ml(u[p].textStyle,a,t.ecModel));var v=m.getTextColor()||t.get("axisLine.lineStyle.color"),y=[i.dataToCoord(p),n.labelOffset+n.labelDirection*r],x=new zo({anid:"label_"+p,position:y,rotation:l.rotation,silent:h,z2:10});$s(x.style,m,{text:f,textAlign:m.getShallow("align",!0)||l.textAlign,textVerticalAlign:m.getShallow("verticalAlign",!0)||m.getShallow("baseline",!0)||l.textVerticalAlign,textFill:"function"==typeof v?v("category"===i.type?g:"value"===i.type?p+"":p,s):v}),d&&(x.eventData=Om(t),x.eventData.targetType="axisLabel",x.eventData.value=g),e._dumbGroup.add(x),x.updateTransform(),c.push(x),e.group.add(x),x.decomposeTransform()})),c}}(this,e,t),n),function(e,t,n){var i=t.axis,a=t.getModel("minorTick");if(a.get("show")&&!i.scale.isBlank()){var r=i.getMinorTicksCoords();if(r.length)for(var o=a.getModel("lineStyle"),s=n.tickDirection*a.get("length"),l=_(o.getLineStyle(),_(t.getModel("axisTick").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})),u=0;u<r.length;u++)for(var c=Wm(r[u],e._transform,s,l,"minorticks_"+u),h=0;h<c.length;h++)e.group.add(c[h])}}(this,e,t)},axisName:function(){var e=this.opt,t=this.axisModel,n=H(e.axisName,t.get("name"));if(n){var i,a,r=t.get("nameLocation"),o=e.nameDirection,s=t.getModel("nameTextStyle"),l=t.get("nameGap")||0,u=this.axisModel.axis.getExtent(),c=u[0]>u[1]?-1:1,h=["start"===r?u[0]-c*l:"end"===r?u[1]+c*l:(u[0]+u[1])/2,Gm(r)?e.labelOffset+o*l:0],d=t.get("nameRotate");null!=d&&(d=d*Pm/180),Gm(r)?i=Nm(e.rotation,null!=d?d:e.rotation,o):(i=function(e,t,n,i){var a,r=kl(n-e.rotation),o=i[0]>i[1],s="start"===t&&!o||"start"!==t&&o;return{rotation:r,textAlign:Ll(r-Pm/2)?(a=s?"bottom":"top","center"):Ll(r-1.5*Pm)?(a=s?"top":"bottom","center"):(a="middle",r<1.5*Pm&&Pm/2<r?s?"left":"right":s?"right":"left"),textVerticalAlign:a}}(e,r,d||0,u),null!=(a=e.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(i.rotation)),isFinite(a)||(a=null)));var p=s.getFont(),f=t.get("nameTruncate",!0)||{},g=f.ellipsis,m=H(e.nameTruncateMaxWidth,f.maxWidth,a),v=null!=g&&null!=m?eu(n,m,p,g,{minChar:2,placeholder:f.placeholder}):n,y=t.get("tooltip",!0),_=t.mainType,b={componentType:_,name:n,$vars:["name"]};b[_+"Index"]=t.componentIndex;var w=new zo({anid:"name",__fullText:n,__truncatedText:v,position:h,rotation:i.rotation,silent:Rm(t),z2:1,tooltip:y&&y.show?x({content:n,formatter:function(){return n},formatterParams:b},y):null});$s(w.style,s,{text:v,textFont:p,textFill:s.getTextColor()||t.get("axisLine.lineStyle.color"),textAlign:s.get("align")||i.textAlign,textVerticalAlign:s.get("verticalAlign")||i.textVerticalAlign}),t.get("triggerEvent")&&(w.eventData=Om(t),w.eventData.targetType="axisName",w.eventData.name=n),this._dumbGroup.add(w),w.updateTransform(),this.group.add(w),w.decomposeTransform()}}},Om=Em.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},Nm=Em.innerTextLayout=function(e,t,n){var i,a=kl(t-e);return{rotation:a,textAlign:Ll(a)?(i=0<n?"top":"bottom","center"):Ll(a-Pm)?(i=0<n?"bottom":"top","center"):(i="middle",0<a&&a<Pm?0<n?"right":"left":0<n?"left":"right"),textVerticalAlign:i}},Rm=Em.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)};function Bm(e){e&&(e.ignore=!0)}function Vm(e,t){var n=e&&e.getBoundingRect().clone(),i=t&&t.getBoundingRect().clone();if(n&&i){var a=rt([]);return ut(a,a,-e.rotation),n.applyTransform(st([],a,e.getLocalTransform())),i.applyTransform(st([],a,t.getLocalTransform())),n.intersect(i)}}function Gm(e){return"middle"===e||"center"===e}function Wm(e,t,n,i,a){for(var r=[],o=[],s=[],l=0;l<e.length;l++){var u=e[l].coord;o[0]=u,s[o[1]=0]=u,s[1]=n,t&&(we(o,o,t),we(s,s,t));var c=new Ko({anid:a+"_"+e[l].tickValue,subPixelOptimize:!0,shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:i,z2:2,silent:!0});r.push(c)}return r}var Hm=I,Fm=P;function $m(e,t){return"all"===e||z(e)&&0<=S(e,t)||e===t}function Xm(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[Um(e)]}function Ym(e){return!!e.get("handle.show")}function Um(e){return e.type+"||"+e.id}var jm=hp({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(e,t,n,i){this.axisPointerClass&&function(e){var t=Xm(e);if(t){var n=t.axisPointerModel,i=t.axis.scale,a=n.option,r=n.get("status"),o=n.get("value");null!=o&&(o=i.parse(o));var s=Ym(n);null==r&&(a.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==o||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),a.value=o,s&&(a.status=t.axis.scale.isBlank()?"hide":"show")}}(e),jm.superApply(this,"render",arguments),Zm(this,e,t,n,i,!0)},updateAxisPointer:function(e,t,n,i,a){Zm(this,e,t,n,i,!1)},remove:function(e,t){var n=this._axisPointer;n&&n.remove(t),jm.superApply(this,"remove",arguments)},dispose:function(e,t){qm(this,t),jm.superApply(this,"dispose",arguments)}});function Zm(e,t,n,i,a,r){var o=jm.getAxisPointerClass(e.axisPointerClass);if(o){var s=function(e){var t=Xm(e);return t&&t.axisPointerModel}(t);s?(e._axisPointer||(e._axisPointer=new o)).render(t,s,i,r):qm(e,i)}}function qm(e,t,n){var i=e._axisPointer;i&&i.dispose(t,n),e._axisPointer=null}var Km=[];function Jm(e,t,n){n=n||{};var i=e.coordinateSystem,a=t.axis,r={},o=a.getAxesOnZeroOf()[0],s=a.position,l=o?"onZero":s,u=a.dim,c=i.getRect(),h=[c.x,c.x+c.width,c.y,c.y+c.height],d={left:0,right:1,top:0,bottom:1,onZero:2},p=t.get("offset")||0,f="x"===u?[h[2]-p,h[3]+p]:[h[0]-p,h[1]+p];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));f[d.onZero]=Math.max(Math.min(g,f[1]),f[0])}r.position=["y"===u?f[d[l]]:h[0],"x"===u?f[d[l]]:h[3]],r.rotation=Math.PI/2*("x"===u?0:1),r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],r.labelOffset=o?f[d[s]]-f[d.onZero]:0,t.get("axisTick.inside")&&(r.tickDirection=-r.tickDirection),H(n.labelInside,t.get("axisLabel.inside"))&&(r.labelDirection=-r.labelDirection);var m=t.get("axisLabel.rotate");return r.labelRotate="top"===l?-m:m,r.z2=1,r}function Qm(e,t,n,i){var a=n.axis;if(!a.scale.isBlank()){var r=n.getModel("splitArea"),o=r.getModel("areaStyle"),s=o.get("color"),l=i.coordinateSystem.getRect(),u=a.getTicksCoords({tickModel:r,clamp:!0});if(u.length){var c=s.length,h=e.__splitAreaColors,d=Q(),p=0;if(h)for(var f=0;f<u.length;f++){var g=h.get(u[f].tickValue);if(null!=g){p=(g+(c-1)*f)%c;break}}var m=a.toGlobalCoord(u[0].coord),v=o.getAreaStyle();for(s=z(s)?s:[s],f=1;f<u.length;f++){var y,x,b,w,S=a.toGlobalCoord(u[f].coord);m=a.isHorizontal()?(y=m,x=l.y,b=S-y,w=l.height,y+b):(y=l.x,x=m,b=l.width,x+(w=S-x));var M=u[f-1].tickValue;null!=M&&d.set(M,p),t.add(new Zo({anid:null!=M?"area_"+M:null,shape:{x:y,y:x,width:b,height:w},style:_({fill:s[p]},v),silent:!0})),p=(p+1)%c}e.__splitAreaColors=d}}}function ev(e){e.__splitAreaColors=null}jm.registerAxisPointerClass=function(e,t){Km[e]=t},jm.getAxisPointerClass=function(e){return e&&Km[e]};var tv=["axisLine","axisTickLabel","axisName"],nv=["splitArea","splitLine","minorSplitLine"],iv=jm.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(e,t,n,i){this.group.removeAll();var a=this._axisGroup;if(this._axisGroup=new An,this.group.add(this._axisGroup),e.get("show")){var r=e.getCoordSysModel(),o=Jm(r,e),s=new Em(e,o);I(tv,s.add,s),this._axisGroup.add(s.getGroup()),I(nv,(function(t){e.get(t+".show")&&this["_"+t](e,r)}),this),il(a,this._axisGroup,e),iv.superCall(this,"render",e,t,n,i)}},remove:function(){ev(this)},_splitLine:function(e,t){var n=e.axis;if(!n.scale.isBlank()){var i=e.getModel("splitLine"),a=i.getModel("lineStyle"),r=a.get("color");r=z(r)?r:[r];for(var o=t.coordinateSystem.getRect(),s=n.isHorizontal(),l=0,u=n.getTicksCoords({tickModel:i}),c=[],h=[],d=a.getLineStyle(),p=0;p<u.length;p++){var f=n.toGlobalCoord(u[p].coord);s?(c[0]=f,c[1]=o.y,h[0]=f,h[1]=o.y+o.height):(c[0]=o.x,c[1]=f,h[0]=o.x+o.width,h[1]=f);var g=l++%r.length,m=u[p].tickValue;this._axisGroup.add(new Ko({anid:null!=m?"line_"+u[p].tickValue:null,subPixelOptimize:!0,shape:{x1:c[0],y1:c[1],x2:h[0],y2:h[1]},style:_({stroke:r[g]},d),silent:!0}))}}},_minorSplitLine:function(e,t){var n=e.axis,i=e.getModel("minorSplitLine").getModel("lineStyle"),a=t.coordinateSystem.getRect(),r=n.isHorizontal(),o=n.getMinorTicksCoords();if(o.length)for(var s=[],l=[],u=i.getLineStyle(),c=0;c<o.length;c++)for(var h=0;h<o[c].length;h++){var d=n.toGlobalCoord(o[c][h].coord);r?(s[0]=d,s[1]=a.y,l[0]=d,l[1]=a.y+a.height):(s[0]=a.x,s[1]=d,l[0]=a.x+a.width,l[1]=d),this._axisGroup.add(new Ko({anid:"minor_line_"+o[c][h].tickValue,subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,silent:!0}))}},_splitArea:function(e,t){Qm(this,this._axisGroup,e,t)}});iv.extend({type:"xAxis"}),iv.extend({type:"yAxis"}),hp({type:"grid",render:function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new Zo({shape:e.coordinateSystem.getRect(),style:_({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))}}),np((function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})),sp(um("line","circle","line")),op(cm("line")),ip(gd.PROCESSOR.STATISTIC,{seriesType:"line",modifyOutputEnd:!0,reset:function(e,t,n){var i=e.getData(),a=e.get("sampling"),r=e.coordinateSystem;if("cartesian2d"===r.type&&a){var o,s=r.getBaseAxis(),l=r.getOtherAxis(s),u=s.getExtent(),c=Math.abs(u[1]-u[0]),h=Math.round(i.count()/c);1<h&&("string"==typeof a?o=dm[a]:"function"==typeof a&&(o=a),o&&e.setData(i.downSample(i.mapDimension(l.dim),1/h,o,hm)))}}});var av=Yc.extend({type:"series.__base_bar__",getInitialData:function(e,t){return Jp(this.getSource(),this,{useEncodeDefaulter:!0})},getMarkerPosition:function(e){var t=this.coordinateSystem;if(t){var n=t.dataToPoint(t.clampData(e)),i=this.getData(),a=i.getLayout("offset"),r=i.getLayout("size");return n[t.getBaseAxis().isHorizontal()?0:1]+=a+r/2,n}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}});function rv(e,t,n,i,a,r){Hs(e,t,n.getModel("label"),n.getModel("emphasis.label"),{labelFetcher:a,labelDataIndex:r,defaultText:Tg(a.getData(),r),isRectText:!0,autoColor:i}),ov(e),ov(t)}function ov(e,t){"outside"===e.textPosition&&(e.textPosition=t)}av.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return e<t&&(e=t),e},defaultOption:{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1}}});var sv=ir([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),lv={getBarItemStyle:function(e){var t=sv(this,e);if(this.getBorderLineDash){var n=this.getBorderLineDash();n&&(t.lineDash=n)}return t}},uv=ms({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(e,t){var n=t.cx,i=t.cy,a=Math.max(t.r0||0,0),r=Math.max(t.r,0),o=.5*(r-a),s=a+o,l=t.startAngle,u=t.endAngle,c=t.clockwise,h=Math.cos(l),d=Math.sin(l),p=Math.cos(u),f=Math.sin(u);(c?u-l<2*Math.PI:l-u<2*Math.PI)&&(e.moveTo(h*a+n,d*a+i),e.arc(h*s+n,d*s+i,o,-Math.PI+l,l,!c)),e.arc(n,i,r,l,u,!c),e.moveTo(p*r+n,f*r+i),e.arc(p*s+n,f*s+i,o,u-2*Math.PI,u-Math.PI,!c),0!==a&&(e.arc(n,i,a,u,l,c),e.moveTo(h*a+n,f*a+i)),e.closePath()}}),cv=["itemStyle","barBorderWidth"],hv=[0,0];x(ml.prototype,lv),pp({type:"bar",render:function(e,t,n){this._updateDrawMode(e);var i=e.get("coordinateSystem");return"cartesian2d"!==i&&"polar"!==i||(this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n)),this.group},incrementalPrepareRender:function(e,t,n){this._clear(),this._updateDrawMode(e)},incrementalRender:function(e,t,n,i){this._incrementalRenderLarge(e,t)},_updateDrawMode:function(e){var t=e.pipelineContext.large;(null==this._isLargeDraw||t^this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},_renderNormal:function(e,t,n){var i,a=this.group,r=e.getData(),o=this._data,s=e.coordinateSystem,l=s.getBaseAxis();"cartesian2d"===s.type?i=l.isHorizontal():"polar"===s.type&&(i="angle"===l.dim);var u=e.isAnimationEnabled()?e:null,c=e.get("clip",!0),h=function(e,t){var n=e.getArea&&e.getArea();if("cartesian2d"===e.type){var i=e.getBaseAxis();if("category"!==i.type||!i.onBand){var a=t.getLayout("bandWidth");i.isHorizontal()?(n.x-=a,n.width+=2*a):(n.y-=a,n.height+=2*a)}}return n}(s,r);function d(e){var t=yv[s.type](r,e),n=function(e,t,n){return new("polar"===e.type?Bo:Zo)({shape:Mv(t,n,e),silent:!0,z2:0})}(s,i,t);return n.useStyle(g.getBarItemStyle()),"cartesian2d"===s.type&&n.setShape("r",m),v[e]=n}a.removeClipPath();var p=e.get("roundCap",!0),f=e.get("showBackground",!0),g=e.getModel("backgroundStyle"),m=g.get("barBorderRadius")||0,v=[],y=this._backgroundEls||[];r.diff(o).add((function(t){var n=r.getItemModel(t),o=yv[s.type](r,t,n);if(f&&d(t),r.hasValue(t)){if(c&&fv[s.type](h,o))return void a.remove(l);var l=gv[s.type](t,o,i,u,!1,p);r.setItemGraphicEl(t,l),a.add(l),_v(l,r,t,n,o,e,i,"polar"===s.type)}})).update((function(t,n){var l=r.getItemModel(t),x=yv[s.type](r,t,l);if(f){var _;0===y.length?_=d(n):((_=y[n]).useStyle(g.getBarItemStyle()),"cartesian2d"===s.type&&_.setShape("r",m),v[t]=_);var b=yv[s.type](r,t);Js(_,{shape:Mv(i,b,s)},u,t)}var w=o.getItemGraphicEl(n);if(r.hasValue(t)){if(c&&fv[s.type](h,x))return void a.remove(w);w?Js(w,{shape:x},u,t):w=gv[s.type](t,x,i,u,!0,p),r.setItemGraphicEl(t,w),a.add(w),_v(w,r,t,l,x,e,i,"polar"===s.type)}else a.remove(w)})).remove((function(e){var t=o.getItemGraphicEl(e);"cartesian2d"===s.type?t&&mv(e,u,t):t&&vv(e,u,t)})).execute();var x=this._backgroundGroup||(this._backgroundGroup=new An);x.removeAll();for(var _=0;_<v.length;++_)x.add(v[_]);a.add(x),this._backgroundEls=v,this._data=r},_renderLarge:function(e,t,n){this._clear(),wv(e,this.group);var i=e.get("clip",!0)?im(e.coordinateSystem,!1,e):null;i?this.group.setClipPath(i):this.group.removeClipPath()},_incrementalRenderLarge:function(e,t){this._removeBackground(),wv(t,this.group,!0)},dispose:te,remove:function(e){this._clear(e)},_clear:function(e){var t=this.group,n=this._data;e&&e.get("animation")&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(t){"sector"===t.type?vv(t.dataIndex,e,t):mv(t.dataIndex,e,t)}))):t.removeAll(),this._data=null},_removeBackground:function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null}});var dv=Math.max,pv=Math.min,fv={cartesian2d:function(e,t){var n=t.width<0?-1:1,i=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height);var a=dv(t.x,e.x),r=pv(t.x+t.width,e.x+e.width),o=dv(t.y,e.y),s=pv(t.y+t.height,e.y+e.height);t.x=a,t.y=o,t.width=r-a,t.height=s-o;var l=t.width<0||t.height<0;return n<0&&(t.x+=t.width,t.width=-t.width),i<0&&(t.y+=t.height,t.height=-t.height),l},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var i=t.r;t.r=t.r0,t.r0=i}i=pv(t.r,e.r);var a=dv(t.r0,e.r0),r=(t.r=i)-(t.r0=a)<0;return n<0&&(i=t.r,t.r=t.r0,t.r0=i),r}},gv={cartesian2d:function(e,t,n,i,a){var r=new Zo({shape:x({},t),z2:1});if(r.name="item",i){var o=n?"height":"width",s={};r.shape[o]=0,s[o]=t[o],ul[a?"updateProps":"initProps"](r,{shape:s},i,e)}return r},polar:function(e,t,n,i,a,r){var o=t.startAngle<t.endAngle,s=new(!n&&r?uv:Bo)({shape:_({clockwise:o},t),z2:1});if(s.name="item",i){var l=n?"r":"endAngle",u={};s.shape[l]=n?0:t.startAngle,u[l]=t[l],ul[a?"updateProps":"initProps"](s,{shape:u},i,e)}return s}};function mv(e,t,n){n.style.text=null,Js(n,{shape:{width:0}},t,e,(function(){n.parent&&n.parent.remove(n)}))}function vv(e,t,n){n.style.text=null,Js(n,{shape:{r:n.shape.r0}},t,e,(function(){n.parent&&n.parent.remove(n)}))}var yv={cartesian2d:function(e,t,n){var i=e.getItemLayout(t),a=n?function(e,t){var n=e.get(cv)||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,i,a)}(n,i):0,r=0<i.width?1:-1,o=0<i.height?1:-1;return{x:i.x+r*a/2,y:i.y+o*a/2,width:i.width-r*a,height:i.height-o*a}},polar:function(e,t,n){var i=e.getItemLayout(t);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle}}};function xv(e){return null!=e.startAngle&&null!=e.endAngle&&e.startAngle===e.endAngle}function _v(e,t,n,i,a,r,o,s){var l=t.getItemVisual(n,"color"),u=t.getItemVisual(n,"opacity"),c=t.getVisual("borderColor"),h=i.getModel("itemStyle"),d=i.getModel("emphasis.itemStyle").getBarItemStyle();s||e.setShape("r",h.get("barBorderRadius")||0),e.useStyle(_({stroke:xv(a)?"none":c,fill:xv(a)?"none":l,opacity:u},h.getBarItemStyle()));var p=i.getShallow("cursor");p&&e.attr("cursor",p),o?a.height:a.width,s||rv(e.style,d,i,l,r,n),xv(a)&&(d.fill=d.stroke="none"),Bs(e,d)}var bv=vo.extend({type:"largeBar",shape:{points:[]},buildPath:function(e,t){for(var n=t.points,i=this.__startPoint,a=this.__baseDimIdx,r=0;r<n.length;r+=2)i[a]=n[r+a],e.moveTo(i[0],i[1]),e.lineTo(n[r],n[r+1])}});function wv(e,t,n){var i=e.getData(),a=[],r=i.getLayout("valueAxisHorizontal")?1:0;a[1-r]=i.getLayout("valueAxisStart");var o=i.getLayout("largeDataIndices"),s=i.getLayout("barWidth"),l=e.getModel("backgroundStyle");if(e.get("showBackground",!0)){var u=i.getLayout("largeBackgroundPoints"),c=[];c[1-r]=i.getLayout("backgroundStart");var h=new bv({shape:{points:u},incremental:!!n,__startPoint:c,__baseDimIdx:r,__largeDataIndices:o,__barWidth:s,silent:!0,z2:0});!function(e,t,n){var i=t.get("borderColor")||t.get("color"),a=t.getItemStyle(["color","borderColor"]);e.useStyle(a),e.style.fill=null,e.style.stroke=i,e.style.lineWidth=n.getLayout("barWidth")}(h,l,i),t.add(h)}var d=new bv({shape:{points:i.getLayout("largePoints")},incremental:!!n,__startPoint:a,__baseDimIdx:r,__largeDataIndices:o,__barWidth:s});t.add(d),function(e,t,n){var i=n.getVisual("borderColor")||n.getVisual("color"),a=t.getModel("itemStyle").getItemStyle(["color","borderColor"]);e.useStyle(a),e.style.fill=null,e.style.stroke=i,e.style.lineWidth=n.getLayout("barWidth")}(d,e,i),d.seriesIndex=e.seriesIndex,e.get("silent")||(d.on("mousedown",Sv),d.on("mousemove",Sv))}var Sv=gh((function(e){var t=function(e,t,n){var i=e.__baseDimIdx,a=1-i,r=e.shape.points,o=e.__largeDataIndices,s=Math.abs(e.__barWidth/2),l=e.__startPoint[a];hv[0]=t,hv[1]=n;for(var u=hv[i],c=hv[1-i],h=u-s,d=u+s,p=0,f=r.length/2;p<f;p++){var g=2*p,m=r[g+i],v=r[g+a];if(h<=m&&m<=d&&(l<=v?l<=c&&c<=v:v<=c&&c<=l))return o[p]}return-1}(this,e.offsetX,e.offsetY);this.dataIndex=0<=t?t:null}),30,!1);function Mv(e,t,n){var i,a="polar"===n.type;return i=a?n.getArea():n.grid.getRect(),a?{cx:i.cx,cy:i.cy,r0:e?i.r0:t.r0,r:e?i.r:t.r,startAngle:e?t.startAngle:0,endAngle:e?t.endAngle:2*Math.PI}:{x:e?t.x:i.x,y:e?i.y:t.y,width:e?t.width:i.width,height:e?i.height:t.height}}function Tv(e,t,n){t=z(t)&&{coordDimensions:t}||x({},t);var i=e.getSource(),a=Xp(i,t),r=new Lp(a,e);return r.initData(i,n),r}op(gd.VISUAL.LAYOUT,P(bf,"bar")),op(gd.VISUAL.PROGRESSIVE_LAYOUT,wf),sp({seriesType:"bar",reset:function(e){e.getData().setVisual("legendSymbol","roundRect")}});var Cv={updateSelectedMap:function(e){this._targetList=z(e)?e.slice():[],this._selectTargetMap=D(e||[],(function(e,t){return e.set(t.name,t),e}),Q())},select:function(e,t){var n=null!=t?this._targetList[t]:this._selectTargetMap.get(e);"single"===this.get("selectedMode")&&this._selectTargetMap.each((function(e){e.selected=!1})),n&&(n.selected=!0)},unSelect:function(e,t){var n=null!=t?this._targetList[t]:this._selectTargetMap.get(e);n&&(n.selected=!1)},toggleSelected:function(e,t){var n=null!=t?this._targetList[t]:this._selectTargetMap.get(e);if(null!=n)return this[n.selected?"unSelect":"select"](e,t),n.selected},isSelected:function(e,t){var n=null!=t?this._targetList[t]:this._selectTargetMap.get(e);return n&&n.selected}};function Iv(e,t){this.getAllNames=function(){var e=t();return e.mapArray(e.getName)},this.containName=function(e){return 0<=t().indexOfName(e)},this.indexOfName=function(t){return e().indexOfName(t)},this.getItemVisual=function(t,n){return e().getItemVisual(t,n)}}var Av=dp({type:"series.pie",init:function(e){Av.superApply(this,"init",arguments),this.legendVisualProvider=new Iv(E(this.getData,this),E(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(e)},mergeOption:function(e){Av.superCall(this,"mergeOption",e),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(e,t){return Tv(this,{coordDimensions:["value"],encodeDefaulter:P(Bu,this)})},_createSelectableList:function(){for(var e=this.getRawData(),t=e.mapDimension("value"),n=[],i=0,a=e.count();i<a;i++)n.push({name:e.getName(i),value:e.get(t,i),selected:Dc(e,i,"selected")});return n},getDataParams:function(e){var t=this.getData(),n=Av.superCall(this,"getDataParams",e),i=[];return t.each(t.mapDimension("value"),(function(e){i.push(e)})),n.percent=Al(i,e,t.hostModel.get("percentPrecision")),n.$vars.push("percent"),n},_defaultLabelLine:function(e){za(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:!1,show:!0,position:"outer",alignTo:"none",margin:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationTypeUpdate:"transition",animationEasing:"cubicOut"}});function Dv(e,t,n,i){var a=t.getData(),r=this.dataIndex,o=a.getName(r),s=t.get("selectedOffset");i.dispatchAction({type:"pieToggleSelect",from:e,name:o,seriesId:t.id}),a.each((function(e){kv(a.getItemGraphicEl(e),a.getItemLayout(e),t.isSelected(a.getName(e)),s,n)}))}function kv(e,t,n,i,a){var r=(t.startAngle+t.endAngle)/2,o=n?i:0,s=[Math.cos(r)*o,Math.sin(r)*o];a?e.animate().when(200,{position:s}).start("bounceOut"):e.attr("position",s)}function Lv(e,t){An.call(this);var n=new Bo({z2:2}),i=new Fo,a=new zo;this.add(n),this.add(i),this.add(a),this.updateData(e,t,!0)}T(Av,Cv);var Ev=Lv.prototype;function Pv(e,t){I(t,(function(t){t.update="updateView",ap(t,(function(n,i){var a={};return i.eachComponent({mainType:"series",subType:e,query:n},(function(e){e[t.method]&&e[t.method](n.name,n.dataIndex);var i=e.getData();i.each((function(t){var n=i.getName(t);a[n]=e.isSelected(n)||!1}))})),{name:n.name,selected:a,seriesId:n.seriesId}}))}))}function zv(e){return{getTargetSeries:function(t){var n={},i=Q();return t.eachSeriesByType(e,(function(e){e.__paletteScope=n,i.set(e.uid,e)})),i},reset:function(e,t){var n=e.getRawData(),i={},a=e.getData();a.each((function(e){var t=a.getRawIndex(e);i[t]=e})),n.each((function(t){var r,o=i[t],s=null!=o&&a.getItemVisual(o,"color",!0),l=null!=o&&a.getItemVisual(o,"borderColor",!0);if(s&&l||(r=n.getItemModel(t)),!s){var u=r.get("itemStyle.color")||e.getColorFromPalette(n.getName(t)||t+"",e.__paletteScope,n.count());null!=o&&a.setItemVisual(o,"color",u)}if(!l){var c=r.get("itemStyle.borderColor");null!=o&&a.setItemVisual(o,"borderColor",c)}}))}}}Ev.updateData=function(e,t,n){var i=this.childAt(0),a=this.childAt(1),r=this.childAt(2),o=e.hostModel,s=e.getItemModel(t),l=e.getItemLayout(t),u=x({},l);u.label=null;var c=o.getShallow("animationTypeUpdate");n?(i.setShape(u),"scale"===o.getShallow("animationType")?(i.shape.r=l.r0,Qs(i,{shape:{r:l.r}},o,t)):(i.shape.endAngle=l.startAngle,Js(i,{shape:{endAngle:l.endAngle}},o,t))):"expansion"===c?i.setShape(u):Js(i,{shape:u},o,t);var h=e.getItemVisual(t,"color");i.useStyle(_({lineJoin:"bevel",fill:h},s.getModel("itemStyle").getItemStyle())),i.hoverStyle=s.getModel("emphasis.itemStyle").getItemStyle();var d=s.getShallow("cursor");d&&i.attr("cursor",d),kv(this,e.getItemLayout(t),o.isSelected(e.getName(t)),o.get("selectedOffset"),o.get("animation"));var p=!n&&"transition"===c;this._updateLabel(e,t,p),this.highDownOnUpdate=o.get("silent")?null:function(e,t){var n=o.isAnimationEnabled()&&s.get("hoverAnimation");"emphasis"===t?(a.ignore=a.hoverIgnore,r.ignore=r.hoverIgnore,n&&(i.stopAnimation(!0),i.animateTo({shape:{r:l.r+o.get("hoverOffset")}},300,"elasticOut"))):(a.ignore=a.normalIgnore,r.ignore=r.normalIgnore,n&&(i.stopAnimation(!0),i.animateTo({shape:{r:l.r}},300,"elasticOut")))},Bs(this)},Ev._updateLabel=function(e,t,n){var i=this.childAt(1),a=this.childAt(2),r=e.hostModel,o=e.getItemModel(t),s=e.getItemLayout(t).label,l=e.getItemVisual(t,"color");if(!s||isNaN(s.x)||isNaN(s.y))a.ignore=a.normalIgnore=a.hoverIgnore=i.ignore=i.normalIgnore=i.hoverIgnore=!0;else{var u={points:s.linePoints||[[s.x,s.y],[s.x,s.y],[s.x,s.y]]},c={x:s.x,y:s.y};n?(Js(i,{shape:u},r,t),Js(a,{style:c},r,t)):(i.attr({shape:u}),a.attr({style:c})),a.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var h=o.getModel("label"),d=o.getModel("emphasis.label"),p=o.getModel("labelLine"),f=o.getModel("emphasis.labelLine");l=e.getItemVisual(t,"color"),Hs(a.style,a.hoverStyle={},h,d,{labelFetcher:e.hostModel,labelDataIndex:t,defaultText:s.text,autoColor:l,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign,opacity:e.getItemVisual(t,"opacity")}),a.ignore=a.normalIgnore=!h.get("show"),a.hoverIgnore=!d.get("show"),i.ignore=i.normalIgnore=!p.get("show"),i.hoverIgnore=!f.get("show"),i.setStyle({stroke:l,opacity:e.getItemVisual(t,"opacity")}),i.setStyle(p.getModel("lineStyle").getLineStyle()),i.hoverStyle=f.getModel("lineStyle").getLineStyle();var g=p.get("smooth");g&&!0===g&&(g=.4),i.setShape({smooth:g})}},M(Lv,An),rh.extend({type:"pie",init:function(){var e=new An;this._sectorGroup=e},render:function(e,t,n,i){if(!i||i.from!==this.uid){var a=e.getData(),r=this._data,o=this.group,s=t.get("animation"),l=!r,u=e.get("animationType"),c=e.get("animationTypeUpdate"),h=P(Dv,this.uid,e,s,n),d=e.get("selectedMode");if(a.diff(r).add((function(e){var t=new Lv(a,e);l&&"scale"!==u&&t.eachChild((function(e){e.stopAnimation(!0)})),d&&t.on("click",h),a.setItemGraphicEl(e,t),o.add(t)})).update((function(e,t){var n=r.getItemGraphicEl(t);l||"transition"===c||n.eachChild((function(e){e.stopAnimation(!0)})),n.updateData(a,e),n.off("click"),d&&n.on("click",h),o.add(n),a.setItemGraphicEl(e,n)})).remove((function(e){var t=r.getItemGraphicEl(e);o.remove(t)})).execute(),s&&0<a.count()&&(l?"scale"!==u:"transition"!==c)){for(var p=a.getItemLayout(0),f=1;isNaN(p.startAngle)&&f<a.count();++f)p=a.getItemLayout(f);var g=Math.max(n.getWidth(),n.getHeight())/2,m=E(o.removeClipPath,o);o.setClipPath(this._createClipPath(p.cx,p.cy,g,p.startAngle,p.clockwise,m,e,l))}else o.removeClipPath();this._data=a}},dispose:function(){},_createClipPath:function(e,t,n,i,a,r,o,s){var l=new Bo({shape:{cx:e,cy:t,r0:0,r:n,startAngle:i,endAngle:i,clockwise:a}});return(s?Qs:Js)(l,{shape:{endAngle:i+(a?1:-1)*Math.PI*2}},o,r),l},containPoint:function(e,t){var n=t.getData().getItemLayout(0);if(n){var i=e[0]-n.cx,a=e[1]-n.cy,r=Math.sqrt(i*i+a*a);return r<=n.r&&r>=n.r0}}});var Ov=Math.PI/180;function Nv(e,t,n,i,a,r,o,s,l,u){function c(t,n,i){for(var a=t;a<n&&!(e[a].y+i>l+o);a++)if(e[a].y+=i,t<a&&a+1<n&&e[a+1].y>e[a].y+e[a].height)return void h(a,i/2);h(n-1,i/2)}function h(t,n){for(var i=t;0<=i&&!(e[i].y-n<l)&&(e[i].y-=n,!(0<i&&e[i].y>e[i-1].y+e[i-1].height));i--);}function d(e,t,n,i,a,r){for(var o=t?Number.MAX_VALUE:0,s=0,l=e.length;s<l;s++)if("none"===e[s].labelAlignTo){var u=Math.abs(e[s].y-i),c=e[s].len,h=e[s].len2,d=u<a+c?Math.sqrt((a+c+h)*(a+c+h)-u*u):Math.abs(e[s].x-n);t&&o<=d&&(d=o-10),!t&&d<=o&&(d=o+10),e[s].x=n+d*r,o=d}}e.sort((function(e,t){return e.y-t.y}));for(var p,f=0,g=e.length,m=[],v=[],y=0;y<g;y++){if("outer"===e[y].position&&"labelLine"===e[y].labelAlignTo){var x=e[y].x-u;e[y].linePoints[1][0]+=x,e[y].x=u}(p=e[y].y-f)<0&&c(y,g,-p),f=e[y].y+e[y].height}for(o-f<0&&h(g-1,f-o),y=0;y<g;y++)e[y].y>=n?v.push(e[y]):m.push(e[y]);d(m,!1,t,n,i,a),d(v,!0,t,n,i,a)}function Rv(e){return"center"===e.position}var Bv=2*Math.PI,Vv=Math.PI/180;function Gv(e){return{seriesType:e,reset:function(e,t){var n=t.findComponents({mainType:"legend"});if(n&&n.length){var i=e.getData();i.filterSelf((function(e){for(var t=i.getName(e),a=0;a<n.length;a++)if(!n[a].isSelected(t))return!1;return!0}))}}}}Pv("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),sp(zv("pie")),op(P((function(e,t,n,i){t.eachSeriesByType(e,(function(e){var t=e.getData(),i=t.mapDimension("value"),a=function(e,t){return lu(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,n),r=e.get("center"),o=e.get("radius");z(o)||(o=[0,o]),z(r)||(r=[r,r]);var s=wl(a.width,n.getWidth()),l=wl(a.height,n.getHeight()),u=Math.min(s,l),c=wl(r[0],s)+a.x,h=wl(r[1],l)+a.y,d=wl(o[0],u/2),p=wl(o[1],u/2),f=-e.get("startAngle")*Vv,g=e.get("minAngle")*Vv,m=0;t.each(i,(function(e){isNaN(e)||m++}));var v=t.getSum(i),y=Math.PI/(v||m)*2,x=e.get("clockwise"),_=e.get("roseType"),b=e.get("stillShowZeroSum"),w=t.getDataExtent(i);w[0]=0;var S=Bv,M=0,T=f,C=x?1:-1;if(t.each(i,(function(e,n){var i;if(isNaN(e))t.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:x,cx:c,cy:h,r0:d,r:_?NaN:p,viewRect:a});else{(i="area"!==_?0===v&&b?y:e*y:Bv/m)<g?S-=i=g:M+=e;var r=T+C*i;t.setItemLayout(n,{angle:i,startAngle:T,endAngle:r,clockwise:x,cx:c,cy:h,r0:d,r:_?bl(e,w,[d,p]):p,viewRect:a}),T=r}})),S<Bv&&m)if(S<=.001){var I=Bv/m;t.each(i,(function(e,n){if(!isNaN(e)){var i=t.getItemLayout(n);i.angle=I,i.startAngle=f+C*n*I,i.endAngle=f+C*(n+1)*I}}))}else y=S/M,T=f,t.each(i,(function(e,n){if(!isNaN(e)){var i=t.getItemLayout(n),a=i.angle===g?g:e*y;i.startAngle=T,i.endAngle=T+C*a,T+=C*a}}));!function(e,t,n,i,a,r){var o,s,l=e.getData(),u=[],c=!1,h=(e.get("minShowLabelAngle")||0)*Ov;l.each((function(i){var r=l.getItemLayout(i),d=l.getItemModel(i),p=d.getModel("label"),f=p.get("position")||d.get("emphasis.label.position"),g=p.get("distanceToLabelLine"),m=p.get("alignTo"),v=wl(p.get("margin"),n),y=p.get("bleedMargin"),x=p.getFont(),_=d.getModel("labelLine"),b=_.get("length");b=wl(b,n);var w=_.get("length2");if(w=wl(w,n),!(r.angle<h)){var S,M,T,C,I=(r.startAngle+r.endAngle)/2,A=Math.cos(I),D=Math.sin(I);o=r.cx,s=r.cy;var k,L=e.getFormattedLabel(i,"normal")||l.getName(i),E=hi(L,x,C,"top"),P="inside"===f||"inner"===f;if("center"===f)S=r.cx,M=r.cy,C="center";else{var z=(P?(r.r+r.r0)/2*A:r.r*A)+o,O=(P?(r.r+r.r0)/2*D:r.r*D)+s;if(S=z+3*A,M=O+3*D,!P){var N=z+A*(b+t-r.r),R=O+D*(b+t-r.r),B=N+(A<0?-1:1)*w;S="edge"===m?A<0?a+v:a+n-v:B+(A<0?-g:g),T=[[z,O],[N,R],[B,M=R]]}C=P?"center":"edge"===m?0<A?"right":"left":0<A?"left":"right"}var V=p.get("rotate");k="number"==typeof V?V*(Math.PI/180):V?A<0?-I+Math.PI:-I:0,c=!!k,r.label={x:S,y:M,position:f,height:E.height,len:b,len2:w,linePoints:T,textAlign:C,verticalAlign:"middle",rotation:k,inside:P,labelDistance:g,labelAlignTo:m,labelMargin:v,bleedMargin:y,textRect:E,text:L,font:x},P||u.push(r.label)}})),!c&&e.get("avoidLabelOverlap")&&function(e,t,n,i,a,r,o,s){for(var l=[],u=[],c=Number.MAX_VALUE,h=-Number.MAX_VALUE,d=0;d<e.length;d++)Rv(e[d])||(e[d].x<t?(c=Math.min(c,e[d].x),l.push(e[d])):(h=Math.max(h,e[d].x),u.push(e[d])));for(Nv(u,t,n,i,1,0,r,0,s,h),Nv(l,t,n,i,-1,0,r,0,s,c),d=0;d<e.length;d++){var p=e[d];if(!Rv(p)){var f=p.linePoints;if(f){var g,m="edge"===p.labelAlignTo,v=p.textRect.width;(g=m?p.x<t?f[2][0]-p.labelDistance-o-p.labelMargin:o+a-p.labelMargin-f[2][0]-p.labelDistance:p.x<t?p.x-o-p.bleedMargin:o+a-p.x-p.bleedMargin)<p.textRect.width&&(p.text=gi(p.text,g,p.font),"edge"===p.labelAlignTo&&(v=ci(p.text,p.font)));var y=f[1][0]-f[2][0];m?p.x<t?f[2][0]=o+p.labelMargin+v+p.labelDistance:f[2][0]=o+a-p.labelMargin-v-p.labelDistance:(p.x<t?f[2][0]=p.x+p.labelDistance:f[2][0]=p.x-p.labelDistance,f[1][0]=f[2][0]+y),f[1][1]=f[2][1]=p.y}}}}(u,o,s,t,n,i,a,r)}(e,p,a.width,a.height,a.x,a.y)}))}),"pie")),ip(Gv("pie")),Yc.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(e,t){return Jp(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",getProgressive:function(){var e=this.option.progressive;return null==e?this.option.large?5e3:this.get("progressive"):e},getProgressiveThreshold:function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?1e4:this.get("progressiveThreshold"):e},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},clip:!0}});var Wv=ms({shape:{points:null},symbolProxy:null,softClipShape:null,buildPath:function(e,t){var n=t.points,i=t.size,a=this.symbolProxy,r=a.shape;if(!((e.getContext?e.getContext():e)&&i[0]<4))for(var o=0;o<n.length;){var s=n[o++],l=n[o++];isNaN(s)||isNaN(l)||this.softClipShape&&!this.softClipShape.contain(s,l)||(r.x=s-i[0]/2,r.y=l-i[1]/2,r.width=i[0],r.height=i[1],a.buildPath(e,r,!0))}},afterBrush:function(e){var t=this.shape,n=t.points,i=t.size;if(i[0]<4){this.setTransform(e);for(var a=0;a<n.length;){var r=n[a++],o=n[a++];isNaN(r)||isNaN(o)||this.softClipShape&&!this.softClipShape.contain(r,o)||e.fillRect(r-i[0]/2,o-i[1]/2,i[0],i[1])}this.restoreTransform(e)}},findDataIndex:function(e,t){for(var n=this.shape,i=n.points,a=n.size,r=Math.max(a[0],4),o=Math.max(a[1],4),s=i.length/2-1;0<=s;s--){var l=2*s,u=i[l]-r/2,c=i[1+l]-o/2;if(u<=e&&c<=t&&e<=u+r&&t<=c+o)return s}return-1}});function Hv(){this.group=new An}var Fv=Hv.prototype;function $v(e,t,n){_g.call(this,e,t,n),this.type="value",this.angle=0,this.name="",this.model}function Xv(e,t,n){this._model=e,this.dimensions=[],this._indicatorAxes=A(e.getIndicatorModels(),(function(e,t){var n="indicator_"+t,i=new $v(n,"log"===e.get("axisType")?new Gf:new df);return i.name=e.get("name"),(i.model=e).axis=i,this.dimensions.push(n),i}),this),this.resize(e,n),this.cx,this.cy,this.r,this.r0,this.startAngle}Fv.isPersistent=function(){return!this._incremental},Fv.updateData=function(e,t){this.group.removeAll();var n=new Wv({rectHover:!0,cursor:"default"});n.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(n,e,!1,t),this.group.add(n),this._incremental=null},Fv.updateLayout=function(e){if(!this._incremental){var t=e.getLayout("symbolPoints");this.group.eachChild((function(e){if(null!=e.startIndex){var n=2*(e.endIndex-e.startIndex),i=4*e.startIndex*2;t=new Float32Array(t.buffer,i,n)}e.setShape("points",t)}))}},Fv.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clearIncremental(),2e6<e.count()?(this._incremental||(this._incremental=new os({silent:!0})),this.group.add(this._incremental)):this._incremental=null},Fv.incrementalUpdate=function(e,t,n){var i;this._incremental?(i=new Wv,this._incremental.addDisplayable(i,!0)):((i=new Wv({rectHover:!0,cursor:"default",startIndex:e.start,endIndex:e.end})).incremental=!0,this.group.add(i)),i.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(i,t,!!this._incremental,n)},Fv._setCommon=function(e,t,n,i){var a=t.hostModel;i=i||{};var r=t.getVisual("symbolSize");e.setShape("size",r instanceof Array?r:[r,r]),e.softClipShape=i.clipShape||null,e.symbolProxy=ag(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<4;e.useStyle(a.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=t.getVisual("color");s&&e.setColor(s),n||(e.seriesIndex=a.seriesIndex,e.on("mousemove",(function(t){e.dataIndex=null;var n=e.findDataIndex(t.offsetX,t.offsetY);0<=n&&(e.dataIndex=n+(e.startIndex||0))})))},Fv.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},Fv._clearIncremental=function(){var e=this._incremental;e&&e.clearDisplaybles()},pp({type:"scatter",render:function(e,t,n){var i=e.getData();this._updateSymbolDraw(i,e).updateData(i,{clipShape:this._getClipShape(e)}),this._finished=!0},incrementalPrepareRender:function(e,t,n){var i=e.getData();this._updateSymbolDraw(i,e).incrementalPrepareUpdate(i),this._finished=!1},incrementalRender:function(e,t,n){this._symbolDraw.incrementalUpdate(e,t.getData(),{clipShape:this._getClipShape(t)}),this._finished=e.end===t.getData().count()},updateTransform:function(e,t,n){var i=e.getData();if(this.group.dirty(),!this._finished||1e4<i.count()||!this._symbolDraw.isPersistent())return{update:!0};var a=cm().reset(e);a.progress&&a.progress({start:0,end:i.count()},i),this._symbolDraw.updateLayout(i)},_getClipShape:function(e){var t=e.coordinateSystem,n=t&&t.getArea&&t.getArea();return e.get("clip",!0)?n:null},_updateSymbolDraw:function(e,t){var n=this._symbolDraw,i=t.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new Hv:new Ng,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),sp(um("scatter","circle")),op(cm("scatter")),M($v,_g),Xv.prototype.getIndicatorAxes=function(){return this._indicatorAxes},Xv.prototype.dataToPoint=function(e,t){var n=this._indicatorAxes[t];return this.coordToPoint(n.dataToCoord(e),t)},Xv.prototype.coordToPoint=function(e,t){var n=this._indicatorAxes[t].angle;return[this.cx+e*Math.cos(n),this.cy-e*Math.sin(n)]},Xv.prototype.pointToData=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,i=Math.sqrt(t*t+n*n);t/=i,n/=i;for(var a,r=Math.atan2(-n,t),o=1/0,s=-1,l=0;l<this._indicatorAxes.length;l++){var u=this._indicatorAxes[l],c=Math.abs(r-u.angle);c<o&&(a=u,s=l,o=c)}return[s,+(a&&a.coordToData(i))]},Xv.prototype.resize=function(e,t){var n=e.get("center"),i=t.getWidth(),a=t.getHeight(),r=Math.min(i,a)/2;this.cx=wl(n[0],i),this.cy=wl(n[1],a),this.startAngle=e.get("startAngle")*Math.PI/180;var o=e.get("radius");"string"!=typeof o&&"number"!=typeof o||(o=[0,o]),this.r0=wl(o[0],r),this.r=wl(o[1],r),I(this._indicatorAxes,(function(e,t){e.setExtent(this.r0,this.r);var n=this.startAngle+t*Math.PI*2/this._indicatorAxes.length;n=Math.atan2(Math.sin(n),Math.cos(n)),e.angle=n}),this)},Xv.prototype.update=function(e,t){var n=this._indicatorAxes,i=this._model;I(n,(function(e){e.scale.setExtent(1/0,-1/0)})),e.eachSeriesByType("radar",(function(t,a){if("radar"===t.get("coordinateSystem")&&e.getComponent("radar",t.get("radarIndex"))===i){var r=t.getData();I(n,(function(e){e.scale.unionExtentFromData(r,r.mapDimension(e.dim))}))}}),this);var a=i.get("splitNumber");function r(e){var t=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),n=e/t;return 2===n?n=5:n*=2,n*t}I(n,(function(e,t){var n=Hf(e.scale,e.model).extent;Ff(e.scale,e.model);var i=e.model,o=e.scale,s=i.getMin(),l=i.getMax(),u=o.getInterval();if(null!=s&&null!=l)o.setExtent(+s,+l),o.setInterval((l-s)/a);else if(null!=s)for(;h=s+u*a,o.setExtent(+s,h),o.setInterval(u),u=r(u),h<n[1]&&isFinite(h)&&isFinite(n[1]););else if(null!=l)for(;d=l-u*a,o.setExtent(d,+l),o.setInterval(u),u=r(u),d>n[0]&&isFinite(d)&&isFinite(n[0]););else{var c=o.getTicks().length-1;a<c&&(u=r(u));var h,d=Sl((h=Math.ceil(n[1]/u)*u)-u*a);o.setExtent(d,h),o.setInterval(u)}}))},Xv.dimensions=[],Xv.create=function(e,t){var n=[];return e.eachComponent("radar",(function(i){var a=new Xv(i,e,t);n.push(a),i.coordinateSystem=a})),e.eachSeriesByType("radar",(function(e){"radar"===e.get("coordinateSystem")&&(e.coordinateSystem=n[e.get("radarIndex")||0])})),n},ju.register("radar",Xv);var Yv=ym.valueAxis;function Uv(e,t){return _({show:t},e)}cp({type:"radar",optionUpdated:function(){var e=this.get("boundaryGap"),t=this.get("splitNumber"),n=this.get("scale"),i=this.get("axisLine"),a=this.get("axisTick"),r=this.get("axisType"),o=this.get("axisLabel"),s=this.get("name"),l=this.get("name.show"),u=this.get("name.formatter"),c=this.get("nameGap"),h=this.get("triggerEvent"),d=A(this.get("indicator")||[],(function(d){null!=d.max&&0<d.max&&!d.min?d.min=0:null!=d.min&&d.min<0&&!d.max&&(d.max=0);var p=s;if(null!=d.color&&(p=_({color:d.color},s)),d=v(m(d),{boundaryGap:e,splitNumber:t,scale:n,axisLine:i,axisTick:a,axisType:r,axisLabel:o,name:d.text,nameLocation:"end",nameGap:c,nameTextStyle:p,triggerEvent:h},!1),l||(d.name=""),"string"==typeof u){var f=d.name;d.name=u.replace("{value}",null!=f?f:"")}else"function"==typeof u&&(d.name=u(d.name,d));var g=x(new ml(d,null,this.ecModel),Zf);return g.mainType="radar",g.componentIndex=this.componentIndex,g}),this);this.getIndicatorModels=function(){return d}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:v({lineStyle:{color:"#bbb"}},Yv.axisLine),axisLabel:Uv(Yv.axisLabel,!1),axisTick:Uv(Yv.axisTick,!1),axisType:"interval",splitLine:Uv(Yv.splitLine,!0),splitArea:Uv(Yv.splitArea,!0),indicator:[]}});var jv=["axisLine","axisTickLabel","axisName"];hp({type:"radar",render:function(e,t,n){this.group.removeAll(),this._buildAxes(e),this._buildSplitLineAndArea(e)},_buildAxes:function(e){var t=e.coordinateSystem;I(A(t.getIndicatorAxes(),(function(e){return new Em(e.model,{position:[t.cx,t.cy],rotation:e.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})})),(function(e){I(jv,e.add,e),this.group.add(e.getGroup())}),this)},_buildSplitLineAndArea:function(e){var t=e.coordinateSystem,n=t.getIndicatorAxes();if(n.length){var i=e.get("shape"),a=e.getModel("splitLine"),r=e.getModel("splitArea"),o=a.getModel("lineStyle"),s=r.getModel("areaStyle"),l=a.get("show"),u=r.get("show"),c=o.get("color"),h=s.get("color");c=z(c)?c:[c],h=z(h)?h:[h];var d=[],p=[];if("circle"===i)for(var f=n[0].getTicksCoords(),g=t.cx,m=t.cy,v=0;v<f.length;v++)l&&d[C(d,c,v)].push(new No({shape:{cx:g,cy:m,r:f[v].coord}})),u&&v<f.length-1&&p[C(p,h,v)].push(new Vo({shape:{cx:g,cy:m,r0:f[v].coord,r:f[v+1].coord}}));else{var y,x=A(n,(function(e,n){var i=e.getTicksCoords();return y=null==y?i.length-1:Math.min(i.length-1,y),A(i,(function(e){return t.coordToPoint(e.coord,n)}))})),b=[];for(v=0;v<=y;v++){for(var w=[],S=0;S<n.length;S++)w.push(x[S][v]);w[0]&&w.push(w[0].slice()),l&&d[C(d,c,v)].push(new Fo({shape:{points:w}})),u&&b&&p[C(p,h,v-1)].push(new Ho({shape:{points:w.concat(b)}})),b=w.slice().reverse()}}var M=o.getLineStyle(),T=s.getAreaStyle();I(p,(function(e,t){this.group.add(ws(e,{style:_({stroke:"none",fill:h[t%h.length]},T),silent:!0}))}),this),I(d,(function(e,t){this.group.add(ws(e,{style:_({fill:"none",stroke:c[t%c.length]},M),silent:!0}))}),this)}function C(e,t,n){var i=n%t.length;return e[i]=e[i]||[],i}}});var Zv=Yc.extend({type:"series.radar",dependencies:["radar"],init:function(e){Zv.superApply(this,"init",arguments),this.legendVisualProvider=new Iv(E(this.getData,this),E(this.getRawData,this))},getInitialData:function(e,t){return Tv(this,{generateCoord:"indicator_",generateCoordCount:1/0})},formatTooltip:function(e,t,n,i){var a=this.getData(),r=this.coordinateSystem.getIndicatorAxes(),o=this.getData().getName(e),s="html"===i?"<br/>":"\n";return Xl(""===o?this.name:o)+s+A(r,(function(t,n){var i=a.get(a.mapDimension(t.dim),e);return Xl(t.name+" : "+i)})).join(s)},getTooltipPosition:function(e){if(null!=e)for(var t=this.getData(),n=this.coordinateSystem,i=t.getValues(A(n.dimensions,(function(e){return t.mapDimension(e)})),e,!0),a=0,r=i.length;a<r;a++)if(!isNaN(i[a])){var o=n.getIndicatorAxes();return n.coordToPoint(o[a].dataToCoord(i[a]),a)}},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});function qv(e){return!isNaN(e[0])&&!isNaN(e[1])}function Kv(e){return[e.cx,e.cy]}pp({type:"radar",render:function(e,t,n){var i=e.coordinateSystem,a=this.group,r=e.getData(),o=this._data;function s(e,t){var n=e.getItemVisual(t,"symbol")||"circle",i=e.getItemVisual(t,"color");if("none"!==n){var a=function(e){return z(e)||(e=[+e,+e]),e}(e.getItemVisual(t,"symbolSize")),r=ag(n,-1,-1,2,2,i),o=e.getItemVisual(t,"symbolRotate")||0;return r.attr({style:{strokeNoScale:!0},z2:100,scale:[a[0]/2,a[1]/2],rotation:o*Math.PI/180||0}),r}}function l(t,n,i,a,r,o){i.removeAll();for(var l=0;l<n.length-1;l++){var u=s(a,r);u&&(t[u.__dimIdx=l]?(u.attr("position",t[l]),ul[o?"initProps":"updateProps"](u,{position:n[l]},e,r)):u.attr("position",n[l]),i.add(u))}}function u(e){return A(e,(function(e){return[i.cx,i.cy]}))}r.diff(o).add((function(t){var n=r.getItemLayout(t);if(n){var i=new Ho,a=new Fo,o={shape:{points:n}};i.shape.points=u(n),a.shape.points=u(n),Qs(i,o,e,t),Qs(a,o,e,t);var s=new An,c=new An;s.add(a),s.add(i),s.add(c),l(a.shape.points,n,c,r,t,!0),r.setItemGraphicEl(t,s)}})).update((function(t,n){var i=o.getItemGraphicEl(n),a=i.childAt(0),s=i.childAt(1),u=i.childAt(2),c={shape:{points:r.getItemLayout(t)}};c.shape.points&&(l(a.shape.points,c.shape.points,u,r,t,!1),Js(a,c,e),Js(s,c,e),r.setItemGraphicEl(t,i))})).remove((function(e){a.remove(o.getItemGraphicEl(e))})).execute(),r.eachItemGraphicEl((function(e,t){var n=r.getItemModel(t),i=e.childAt(0),o=e.childAt(1),s=e.childAt(2),l=r.getItemVisual(t,"color");a.add(e),i.useStyle(_(n.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:l})),i.hoverStyle=n.getModel("emphasis.lineStyle").getLineStyle();var u=n.getModel("areaStyle"),c=n.getModel("emphasis.areaStyle"),h=u.isEmpty()&&u.parentModel.isEmpty(),d=c.isEmpty()&&c.parentModel.isEmpty();d=d&&h,o.ignore=h,o.useStyle(_(u.getAreaStyle(),{fill:l,opacity:.7})),o.hoverStyle=c.getAreaStyle();var p=n.getModel("itemStyle").getItemStyle(["color"]),f=n.getModel("emphasis.itemStyle").getItemStyle(),g=n.getModel("label"),v=n.getModel("emphasis.label");s.eachChild((function(e){e.setStyle(p),e.hoverStyle=m(f);var n=r.get(r.dimensions[e.__dimIdx],t);null!=n&&!isNaN(n)||(n=""),Hs(e.style,e.hoverStyle,g,v,{labelFetcher:r.hostModel,labelDataIndex:t,labelDimIndex:e.__dimIdx,defaultText:n,autoColor:l,isRectText:!0})})),e.highDownOnUpdate=function(e,t){o.attr("ignore","emphasis"===t?d:h)},Bs(e)})),this._data=r},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}}),sp(zv("radar")),sp(um("radar","circle")),op((function(e){e.eachSeriesByType("radar",(function(e){var t=e.getData(),n=[],i=e.coordinateSystem;if(i){var a=i.getIndicatorAxes();I(a,(function(e,r){t.each(t.mapDimension(a[r].dim),(function(e,t){n[t]=n[t]||[];var a=i.dataToPoint(e,r);n[t][r]=qv(a)?a:Kv(i)}))})),t.each((function(e){var a=L(n[e],(function(e){return qv(e)}))||Kv(i);n[e].push(a.slice()),t.setItemLayout(e,n[e])}))}}))})),ip(Gv("radar")),np((function(e){var t=e.polar;if(t){z(t)||(t=[t]);var n=[];I(t,(function(t,i){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),e.radar=e.radar||[],z(e.radar)||(e.radar=[e.radar]),e.radar.push(t)):n.push(t)})),e.polar=n}I(e.series,(function(e){e&&"radar"===e.type&&e.polarIndex&&(e.radarIndex=e.polarIndex)}))}));for(var Jv=[126,25],Qv=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],ey=0;ey<Qv.length;ey++)for(var ty=0;ty<Qv[ey].length;ty++)Qv[ey][ty][0]/=10.5,Qv[ey][ty][1]/=-14,Qv[ey][ty][0]+=Jv[0],Qv[ey][ty][1]+=Jv[1];var ny={"\u5357\u6d77\u8bf8\u5c9b":[32,80],"\u5e7f\u4e1c":[0,-10],"\u9999\u6e2f":[10,5],"\u6fb3\u95e8":[-10,10],"\u5929\u6d25":[5,5]},iy={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]},ay=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]],ry=Ha(),oy={load:function(e,t,n){var i=ry(t).parsed;if(i)return i;var a,r=t.specialAreas||{},o=t.geoJSON;try{a=o?hg(o,n):[]}catch(t){throw new Error("Invalid geoJson format\n"+t.message)}return function(e,t){"china"===e&&t.push(new ug("\u5357\u6d77\u8bf8\u5c9b",A(Qv,(function(e){return{type:"polygon",exterior:e}})),Jv))}(e,a),I(a,(function(t){var n=t.name;!function(e,t){if("china"===e){var n=ny[t.name];if(n){var i=t.center;i[0]+=n[0]/10.5,i[1]+=-n[1]/14}}}(e,t),function(e,t){if("world"===e){var n=iy[t.name];if(n){var i=t.center;i[0]=n[0],i[1]=n[1]}}}(e,t),function(e,t){"china"===e&&"\u53f0\u6e7e"===t.name&&t.geometries.push({type:"polygon",exterior:ay[0]})}(e,t);var i=r[n];i&&t.transformTo(i.left,i.top,i.width,i.height)})),ry(t).parsed={regions:a,boundingRect:function(e){for(var t,n=0;n<e.length;n++){var i=e[n].getBoundingRect();(t=t||i.clone()).union(i)}return t}(a)}}},sy=Ha();function ly(e,t){var n,i,a=e.svgXML;try{U(null!=(i=(n=a&&function(e,t){return(new jh).parse(e,{ignoreViewBox:!0,ignoreRootClip:!0})}(a)||{}).root))}catch(e){throw new Error("Invalid svg format\n"+e.message)}var r=n.width,o=n.height,s=n.viewBoxRect;if(t||(t=null==r||null==o?i.getBoundingRect():new In(0,0,0,0),null!=r&&(t.width=r),null!=o&&(t.height=o)),s){var l=rd(s,t.width,t.height),u=i;(i=new An).add(u),u.scale=l.scale,u.position=l.position}return i.setClipPath(new Zo({shape:t.plain()})),{root:i,boundingRect:t}}var uy={geoJSON:oy,svg:{load:function(e,t){var n=sy(t).originRoot;if(n)return{root:n,boundingRect:sy(t).boundingRect};var i=ly(t);return sy(t).originRoot=i.root,sy(t).boundingRect=i.boundingRect,i},makeGraphic:function(e,t,n){var i=sy(t),a=i.rootMap||(i.rootMap=Q()),r=a.get(n);if(r)return r;var o=i.originRoot,s=i.boundingRect;return r=i.originRootHostKey?ly(t,s).root:(i.originRootHostKey=n,o),a.set(n,r)},removeGraphic:function(e,t,n){var i=sy(t),a=i.rootMap;a&&a.removeKey(n),n===i.originRootHostKey&&(i.originRootHostKey=null)}}},cy={load:function(e,t,n){var i,a=[],r=Q(),o=Q();return I(dy(e),(function(s){var l=uy[s.type].load(e,s,n);I(l.regions,(function(e){var n=e.name;t&&t.hasOwnProperty(n)&&(e=e.cloneShallow(n=t[n])),a.push(e),r.set(n,e),o.set(n,e.center)}));var u=l.boundingRect;u&&(i?i.union(u):i=u.clone())})),{regions:a,regionsMap:r,nameCoordMap:o,boundingRect:i||new In(0,0,0,0)}},makeGraphic:hy("makeGraphic"),removeGraphic:hy("removeGraphic")};function hy(e){return function(t,n){var i=dy(t),a=[];return I(i,(function(i){var r=uy[i.type][e];r&&a.push(r(t,i,n))})),a}}function dy(e){return ld(e)||[]}T(Yc.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],getInitialData:function(e){for(var t=Tv(this,{coordDimensions:["value"],encodeDefaulter:P(Bu,this)}),n=t.mapDimension("value"),i=Q(),a=[],r=[],o=0,s=t.count();o<s;o++){var l=t.getName(o);i.set(l,!0),a.push({name:l,value:t.get(n,o),selected:Dc(t,o,"selected")})}return I(cy.load(this.getMapType(),this.option.nameMap,this.option.nameProperty).regions,(function(e){var t=e.name;i.get(t)||(a.push({name:t}),r.push(t))})),this.updateSelectedMap(a),t.appendValues([],r),t},getHostGeoModel:function(){var e=this.option.geoIndex;return null!=e?this.dependentModels.geo[e]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},getRawValue:function(e){var t=this.getData();return t.get(t.mapDimension("value"),e)},getRegionModel:function(e){var t=this.getData();return t.getItemModel(t.indexOfName(e))},formatTooltip:function(e,t,n,i){for(var a=this.getData(),r=Gl(this.getRawValue(e)),o=a.getName(e),s=this.seriesGroup,l=[],u=0;u<s.length;u++){var c=s[u].originalData.indexOfName(o),h=a.mapDimension("value");isNaN(s[u].originalData.get(h,c))||l.push(Xl(s[u].name))}var d="html"===i?"<br/>":"\n";return l.join(", ")+d+Xl(o+" : "+r)},getTooltipPosition:function(e){if(null!=e){var t=this.getData().getName(e),n=this.coordinateSystem,i=n.getRegion(t);return i&&n.dataToPoint(i.center)}},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},nameProperty:"name"}}),Cv);var py="\0_ec_interaction_mutex";function fy(e,t){return!!gy(e)[t]}function gy(e){return e[py]||(e[py]={})}function my(e){this.pointerChecker,this._zr=e,this._opt={};var t=E,n=t(vy,this),i=t(yy,this),a=t(xy,this),r=t(_y,this),o=t(by,this);De.call(this),this.setPointerChecker=function(e){this.pointerChecker=e},this.enable=function(t,s){this.disable(),this._opt=_(m(s)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(e.on("mousedown",n),e.on("mousemove",i),e.on("mouseup",a)),!0!==t&&"scale"!==t&&"zoom"!==t||(e.on("mousewheel",r),e.on("pinch",o))},this.disable=function(){e.off("mousedown",n),e.off("mousemove",i),e.off("mouseup",a),e.off("mousewheel",r),e.off("pinch",o)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function vy(e){if(!(Ue(e)||e.target&&e.target.draggable)){var t=e.offsetX,n=e.offsetY;this.pointerChecker&&this.pointerChecker(e,t,n)&&(this._x=t,this._y=n,this._dragging=!0)}}function yy(e){if(this._dragging&&My("moveOnMouseMove",e,this._opt)&&"pinch"!==e.gestureEvent&&!fy(this._zr,"globalPan")){var t=e.offsetX,n=e.offsetY,i=this._x,a=this._y,r=t-i,o=n-a;this._x=t,this._y=n,this._opt.preventDefaultMouseMove&&Ye(e.event),Sy(this,"pan","moveOnMouseMove",e,{dx:r,dy:o,oldX:i,oldY:a,newX:t,newY:n})}}function xy(e){Ue(e)||(this._dragging=!1)}function _y(e){var t=My("zoomOnMouseWheel",e,this._opt),n=My("moveOnMouseWheel",e,this._opt),i=e.wheelDelta,a=Math.abs(i),r=e.offsetX,o=e.offsetY;if(0!==i&&(t||n)){if(t){var s=3<a?1.4:1<a?1.2:1.1;wy(this,"zoom","zoomOnMouseWheel",e,{scale:0<i?s:1/s,originX:r,originY:o})}if(n){var l=Math.abs(i);wy(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:(0<i?1:-1)*(3<l?.4:1<l?.15:.05),originX:r,originY:o})}}}function by(e){fy(this._zr,"globalPan")||wy(this,"zoom",null,e,{scale:1<e.pinchScale?1.1:1/1.1,originX:e.pinchX,originY:e.pinchY})}function wy(e,t,n,i,a){e.pointerChecker&&e.pointerChecker(i,a.originX,a.originY)&&(Ye(i.event),Sy(e,t,n,i,a))}function Sy(e,t,n,i,a){a.isAvailableBehavior=E(My,null,n,i),e.trigger(t,a)}function My(e,t,n){var i=n[e];return!e||i&&(!N(i)||t.event[i+"Key"])}function Ty(e,t,n){var i=e.target,a=i.position;a[0]+=t,a[1]+=n,i.dirty()}function Cy(e,t,n,i){var a=e.target,r=e.zoomLimit,o=a.position,s=a.scale,l=e.zoom=e.zoom||1;if(l*=t,r){var u=r.min||0,c=r.max||1/0;l=Math.max(Math.min(c,l),u)}var h=l/e.zoom;e.zoom=l,o[0]-=(n-o[0])*(h-1),o[1]-=(i-o[1])*(h-1),s[0]*=h,s[1]*=h,a.dirty()}ap({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},(function(){})),T(my,De);var Iy={axisPointer:1,tooltip:1,brush:1};function Ay(e,t,n){var i=t.getComponentByElement(e.topTarget),a=i&&i.coordinateSystem;return i&&i!==n&&!Iy[i.mainType]&&a&&a.model!==n}function Dy(e){var t=e.getItemStyle(),n=e.get("areaColor");return null!=n&&(t.fill=n),t}function ky(e,t){t.eachChild((function(t){I(t.__regions,(function(n){t.trigger(e.isSelected(n.name)?"emphasis":"normal")}))}))}function Ly(e,t){var n=new An;this.uid=_l("ec_map_draw"),this._controller=new my(e.getZr()),this._controllerHost={target:t?n:null},this.group=n,this._updateGroup=t,this._mouseDownFlag,this._mapName,this._initialized,n.add(this._regionsGroup=new An),n.add(this._backgroundGroup=new An)}Ly.prototype={constructor:Ly,draw:function(e,t,n,i,a){var r="geo"===e.mainType,o=e.getData&&e.getData();r&&t.eachComponent({mainType:"series",subType:"map"},(function(t){o||t.getHostGeoModel()!==e||(o=t.getData())}));var s=e.coordinateSystem;this._updateBackground(s);var l,u=this._regionsGroup,c=this.group,h=s.getTransformInfo(),d=!u.childAt(0)||a;if(d)c.transform=h.roamTransform,c.decomposeTransform(),c.dirty();else{var p=new mt;p.transform=h.roamTransform,p.decomposeTransform();var f={scale:p.scale,position:p.position};l=p.scale,Js(c,f,e)}var g=h.rawScale,m=h.rawPosition;u.removeAll();var v=["itemStyle"],y=["emphasis","itemStyle"],x=["label"],_=["emphasis","label"],b=Q();I(s.regions,(function(t){var n=b.get(t.name)||b.set(t.name,new An),i=new is({segmentIgnoreThreshold:1,shape:{paths:[]}});n.add(i);var a,s=(z=e.getRegionModel(t.name)||e).getModel(v),h=z.getModel(y),p=Dy(s),f=Dy(h),w=z.getModel(x),S=z.getModel(_);if(o){a=o.indexOfName(t.name);var M=o.getItemVisual(a,"color",!0);M&&(p.fill=M)}function T(e){return[e[0]*g[0]+m[0],e[1]*g[1]+m[1]]}I(t.geometries,(function(e){if("polygon"===e.type){for(var t=[],n=0;n<e.exterior.length;++n)t.push(T(e.exterior[n]));for(i.shape.paths.push(new Ho({segmentIgnoreThreshold:1,shape:{points:t}})),n=0;n<(e.interiors?e.interiors.length:0);++n){for(var a=e.interiors[n],r=(t=[],0);r<a.length;++r)t.push(T(a[r]));i.shape.paths.push(new Ho({segmentIgnoreThreshold:1,shape:{points:t}}))}}})),i.setStyle(p),i.style.strokeNoScale=!0,i.culling=!0;var C=w.get("show"),A=S.get("show"),D=o&&isNaN(o.get(o.mapDimension("value"),a)),k=o&&o.getItemLayout(a);if(r||D&&(C||A)||k&&k.showLabel){var L,E=r?t.name:a;(!o||0<=a)&&(L=e);var P=new zo({position:T(t.center.slice()),scale:[1/c.scale[0],1/c.scale[1]],z2:10,silent:!0});Hs(P.style,P.hoverStyle={},w,S,{labelFetcher:L,labelDataIndex:E,defaultText:t.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),d||Js(P,{scale:[1/l[0],1/l[1]]},e),n.add(P)}if(o)o.setItemGraphicEl(a,n);else{var z=e.getRegionModel(t.name);i.eventData={componentType:"geo",componentIndex:e.componentIndex,geoIndex:e.componentIndex,name:t.name,region:z&&z.option||{}}}(n.__regions||(n.__regions=[])).push(t),n.highDownSilentOnTouch=!!e.get("selectedMode"),Bs(n,f),u.add(n)})),this._updateController(e,t,n),function(e,t,n,i,a){n.off("click"),n.off("mousedown"),t.get("selectedMode")&&(n.on("mousedown",(function(){e._mouseDownFlag=!0})),n.on("click",(function(r){if(e._mouseDownFlag){e._mouseDownFlag=!1;for(var o=r.target;!o.__regions;)o=o.parent;if(o){var s={type:("geo"===t.mainType?"geo":"map")+"ToggleSelect",batch:A(o.__regions,(function(e){return{name:e.name,from:a.uid}}))};s[t.mainType+"Id"]=t.id,i.dispatchAction(s),ky(t,n)}}})))}(this,e,u,n,i),ky(e,u)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&cy.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(e){var t=e.map;this._mapName!==t&&I(cy.makeGraphic(t,this.uid),(function(e){this._backgroundGroup.add(e)}),this),this._mapName=t},_updateController:function(e,t,n){var i=e.coordinateSystem,a=this._controller,r=this._controllerHost;r.zoomLimit=e.get("scaleLimit"),r.zoom=i.getZoom(),a.enable(e.get("roam")||!1);var o=e.mainType;function s(){var t={type:"geoRoam",componentType:o};return t[o+"Id"]=e.id,t}a.off("pan").on("pan",(function(e){this._mouseDownFlag=!1,Ty(r,e.dx,e.dy),n.dispatchAction(x(s(),{dx:e.dx,dy:e.dy}))}),this),a.off("zoom").on("zoom",(function(e){if(this._mouseDownFlag=!1,Cy(r,e.scale,e.originX,e.originY),n.dispatchAction(x(s(),{zoom:e.scale,originX:e.originX,originY:e.originY})),this._updateGroup){var t=this.group.scale;this._regionsGroup.traverse((function(e){"text"===e.type&&e.attr("scale",[1/t[0],1/t[1]])}))}}),this),a.setPointerChecker((function(t,a,r){return i.getViewRectAfterRoam().contain(a,r)&&!Ay(t,n,e)}))}};var Ey="__seriesMapHighDown",Py="__seriesMapCallKey";function zy(e){var t=this[Ey];t&&t.recordVersion===this[Py]&&Oy(t,e)}function Oy(e,t){var n=e.circle,i=e.labelModel,a=e.hoverLabelModel,r=e.emphasisText,o=e.normalText;t?(n.style.extendFrom($s({},a,{text:a.get("show")?r:null},{isRectText:!0,useInsideStyle:!1},!0)),n.__mapOriginalZ2=n.z2,n.z2+=1):($s(n.style,i,{text:i.get("show")?o:null,textPosition:i.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),n.dirty(!1),null!=n.__mapOriginalZ2&&(n.z2=n.__mapOriginalZ2,n.__mapOriginalZ2=null))}function Ny(e,t,n){var i=e.getZoom(),a=e.getCenter(),r=t.zoom,o=e.dataToPoint(a);if(null!=t.dx&&null!=t.dy&&(o[0]-=t.dx,o[1]-=t.dy,a=e.pointToData(o),e.setCenter(a)),null!=r){if(n){var s=n.min||0,l=n.max||1/0;r=Math.max(Math.min(i*r,l),s)/i}e.scale[0]*=r,e.scale[1]*=r;var u=e.position,c=(t.originX-u[0])*(r-1),h=(t.originY-u[1])*(r-1);u[0]-=c,u[1]-=h,e.updateTransform(),a=e.pointToData(o),e.setCenter(a),e.setZoom(r*i)}return{center:e.getCenter(),zoom:e.getZoom()}}pp({type:"map",render:function(e,t,n,i){if(!i||"mapToggleSelect"!==i.type||i.from!==this.uid){var a=this.group;if(a.removeAll(),!e.getHostGeoModel()){if(i&&"geoRoam"===i.type&&"series"===i.componentType&&i.seriesId===e.id)(r=this._mapDraw)&&a.add(r.group);else if(e.needsDrawMap){var r=this._mapDraw||new Ly(n,!0);a.add(r.group),r.draw(e,t,n,this,i),this._mapDraw=r}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;e.get("showLegendSymbol")&&t.getComponent("legend")&&this._renderSymbols(e,t,n)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(e,t,n){var i=e.originalData,a=this.group;i.each(i.mapDimension("value"),(function(t,n){if(!isNaN(t)){var r=i.getItemLayout(n);if(r&&r.point){var o=r.point,s=r.offset,l=new No({style:{fill:e.getData().getVisual("color")},shape:{cx:o[0]+9*s,cy:o[1],r:3},silent:!0,z2:8+(s?0:2)});if(!s){var u=e.mainSeries.getData(),c=i.getName(n),h=u.indexOfName(c),d=i.getItemModel(n),p=d.getModel("label"),f=d.getModel("emphasis.label"),g=u.getItemGraphicEl(h),m=F(e.getFormattedLabel(h,"normal"),c),v=F(e.getFormattedLabel(h,"emphasis"),m),y=g[Ey],_=Math.random();if(!y){y=g[Ey]={};var b=P(zy,!0),w=P(zy,!1);g.on("mouseover",b).on("mouseout",w).on("emphasis",b).on("normal",w)}x(y,{recordVersion:g[Py]=_,circle:l,labelModel:p,hoverLabelModel:f,emphasisText:v,normalText:m}),Oy(y,!1)}a.add(l)}}}))}}),ap({type:"geoRoam",event:"geoRoam",update:"updateTransform"},(function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},(function(t){var i=t.coordinateSystem;if("geo"===i.type){var a=Ny(i,e,t.get("scaleLimit"));t.setCenter&&t.setCenter(a.center),t.setZoom&&t.setZoom(a.zoom),"series"===n&&I(t.seriesGroup,(function(e){e.setCenter(a.center),e.setZoom(a.zoom)}))}}))}));var Ry=we;function By(){mt.call(this)}function Vy(e){this.name=e,this.zoomLimit,mt.call(this),this._roamTransformable=new By,this._rawTransformable=new By,this._center,this._zoom}function Gy(e,t,n,i){var a=n.seriesModel,r=a?a.coordinateSystem:null;return r===this?r[e](i):null}function Wy(e,t,n,i){Vy.call(this,e),this.map=t;var a=cy.load(t,n);this._nameCoordMap=a.nameCoordMap,this._regionsMap=a.regionsMap,this._invertLongitute=null==i||i,this.regions=a.regions,this._rect=a.boundingRect}function Hy(e,t,n,i){var a=n.geoModel,r=n.seriesModel,o=a?a.coordinateSystem:r?r.coordinateSystem||(r.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return o===this?o[e](i):null}function Fy(e,t){var n=e.get("boundingCoords");if(null!=n){var i=n[0],a=n[1];isNaN(i[0])||isNaN(i[1])||isNaN(a[0])||isNaN(a[1])||this.setBoundingRect(i[0],i[1],a[0]-i[0],a[1]-i[1])}var r,o=this.getBoundingRect(),s=e.get("layoutCenter"),l=e.get("layoutSize"),u=t.getWidth(),c=t.getHeight(),h=o.width/o.height*this.aspectScale,d=!1;if(s&&l&&(s=[wl(s[0],u),wl(s[1],c)],l=wl(l,Math.min(u,c)),isNaN(s[0])||isNaN(s[1])||isNaN(l)||(d=!0)),d){var p={};1<h?(p.width=l,p.height=l/h):(p.height=l,p.width=l*h),p.y=s[1]-p.height/2,p.x=s[0]-p.width/2}else(r=e.getBoxLayoutParams()).aspect=h,p=lu(r,{width:u,height:c});this.setViewRect(p.x,p.y,p.width,p.height),this.setCenter(e.get("center")),this.setZoom(e.get("zoom"))}function $y(e,t){I(t.get("geoCoord"),(function(t,n){e.addGeoCoord(n,t)}))}T(By,mt),Vy.prototype={constructor:Vy,type:"view",dimensions:["x","y"],setBoundingRect:function(e,t,n,i){return this._rect=new In(e,t,n,i),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(e,t,n,i){this.transformTo(e,t,n,i),this._viewRect=new In(e,t,n,i)},transformTo:function(e,t,n,i){var a=this.getBoundingRect(),r=this._rawTransformable;r.transform=a.calculateTransform(new In(e,t,n,i)),r.decomposeTransform(),this._updateTransform()},setCenter:function(e){e&&(this._center=e,this._updateCenterAndZoom())},setZoom:function(e){e=e||1;var t=this.zoomLimit;t&&(null!=t.max&&(e=Math.min(t.max,e)),null!=t.min&&(e=Math.max(t.min,e))),this._zoom=e,this._updateCenterAndZoom()},getDefaultCenter:function(){var e=this.getBoundingRect();return[e.x+e.width/2,e.y+e.height/2]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var e=this._rawTransformable.getLocalTransform(),t=this._roamTransformable,n=this.getDefaultCenter(),i=this.getCenter(),a=this.getZoom();i=we([],i,e),n=we([],n,e),t.origin=i,t.position=[n[0]-i[0],n[1]-i[1]],t.scale=[a,a],this._updateTransform()},_updateTransform:function(){var e=this._roamTransformable,t=this._rawTransformable;(t.parent=e).updateTransform(),t.updateTransform(),ot(this.transform||(this.transform=[]),t.transform||at()),this._rawTransform=t.getLocalTransform(),this.invTransform=this.invTransform||[],ht(this.invTransform,this.transform),this.decomposeTransform()},getTransformInfo:function(){var e=this._roamTransformable.transform,t=this._rawTransformable;return{roamTransform:e?X(e):at(),rawScale:X(t.scale),rawPosition:X(t.position)}},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var e=this.getBoundingRect().clone();return e.applyTransform(this.transform),e},dataToPoint:function(e,t,n){var i=t?this._rawTransform:this.transform;return n=n||[],i?Ry(n,e,i):re(n,e)},pointToData:function(e){var t=this.invTransform;return t?Ry([],e,t):[e[0],e[1]]},convertToPixel:P(Gy,"dataToPoint"),convertFromPixel:P(Gy,"pointToData"),containPoint:function(e){return this.getViewRectAfterRoam().contain(e[0],e[1])}},T(Vy,mt),Wy.prototype={constructor:Wy,type:"geo",dimensions:["lng","lat"],containCoord:function(e){for(var t=this.regions,n=0;n<t.length;n++)if(t[n].contain(e))return!0;return!1},transformTo:function(e,t,n,i){var a=this.getBoundingRect(),r=this._invertLongitute;a=a.clone(),r&&(a.y=-a.y-a.height);var o=this._rawTransformable;if(o.transform=a.calculateTransform(new In(e,t,n,i)),o.decomposeTransform(),r){var s=o.scale;s[1]=-s[1]}o.updateTransform(),this._updateTransform()},getRegion:function(e){return this._regionsMap.get(e)},getRegionByCoord:function(e){for(var t=this.regions,n=0;n<t.length;n++)if(t[n].contain(e))return t[n]},addGeoCoord:function(e,t){this._nameCoordMap.set(e,t)},getGeoCoord:function(e){return this._nameCoordMap.get(e)},getBoundingRect:function(){return this._rect},dataToPoint:function(e,t,n){if("string"==typeof e&&(e=this.getGeoCoord(e)),e)return Vy.prototype.dataToPoint.call(this,e,t,n)},convertToPixel:P(Hy,"dataToPoint"),convertFromPixel:P(Hy,"pointToData")},T(Wy,Vy);var Xy={dimensions:Wy.prototype.dimensions,create:function(e,t){var n=[];e.eachComponent("geo",(function(e,i){var a=e.get("map"),r=e.get("aspectScale"),o=!0,s=ld(a);s&&s[0]&&"svg"===s[0].type?(null==r&&(r=1),o=!1):null==r&&(r=.75);var l=new Wy(a+i,a,e.get("nameMap"),o);l.aspectScale=r,l.zoomLimit=e.get("scaleLimit"),n.push(l),$y(l,e),(e.coordinateSystem=l).model=e,l.resize=Fy,l.resize(e,t)})),e.eachSeries((function(e){if("geo"===e.get("coordinateSystem")){var t=e.get("geoIndex")||0;e.coordinateSystem=n[t]}}));var i={};return e.eachSeriesByType("map",(function(e){if(!e.getHostGeoModel()){var t=e.getMapType();i[t]=i[t]||[],i[t].push(e)}})),I(i,(function(e,i){var a=new Wy(i,i,y(A(e,(function(e){return e.get("nameMap")}))));a.zoomLimit=H.apply(null,A(e,(function(e){return e.get("scaleLimit")}))),n.push(a),a.resize=Fy,a.aspectScale=e[0].get("aspectScale"),a.resize(e[0],t),I(e,(function(e){$y(e.coordinateSystem=a,e)}))})),n},getFilledRegions:function(e,t,n){for(var i=(e||[]).slice(),a=Q(),r=0;r<i.length;r++)a.set(i[r].name,i[r]);return I(cy.load(t,n).regions,(function(e){var t=e.name;a.get(t)||i.push({name:t})})),i}};rp("geo",Xy),op((function(e){var t={};e.eachSeriesByType("map",(function(n){var i=n.getMapType();if(!n.getHostGeoModel()&&!t[i]){var a={};I(n.seriesGroup,(function(t){var n=t.coordinateSystem,i=t.originalData;t.get("showLegendSymbol")&&e.getComponent("legend")&&i.each(i.mapDimension("value"),(function(e,t){var r=i.getName(t),o=n.getRegion(r);if(o&&!isNaN(e)){var s=a[r]||0,l=n.dataToPoint(o.center);a[r]=s+1,i.setItemLayout(t,{point:l,offset:s})}}))}));var r=n.getData();r.each((function(e){var t=r.getName(e),n=r.getItemLayout(e)||{};n.showLabel=!a[t],r.setItemLayout(e,n)})),t[i]=!0}}))})),sp((function(e){e.eachSeriesByType("map",(function(e){var t=e.get("color"),n=e.getModel("itemStyle"),i=n.get("areaColor"),a=n.get("color")||t[e.seriesIndex%t.length];e.getData().setVisual({areaColor:i,color:a})}))})),ip(gd.PROCESSOR.STATISTIC,(function(e){var t={};e.eachSeriesByType("map",(function(e){var n=e.getHostGeoModel(),i=n?"o"+n.id:"i"+e.getMapType();(t[i]=t[i]||[]).push(e)})),I(t,(function(e,t){for(var n=function(e,t){var n={};return I(e,(function(e){e.each(e.mapDimension("value"),(function(t,i){var a="ec-"+e.getName(i);n[a]=n[a]||[],isNaN(t)||n[a].push(t)}))})),e[0].map(e[0].mapDimension("value"),(function(i,a){for(var r="ec-"+e[0].getName(a),o=0,s=1/0,l=-1/0,u=n[r].length,c=0;c<u;c++)s=Math.min(s,n[r][c]),l=Math.max(l,n[r][c]),o+=n[r][c];return 0===u?NaN:"min"===t?s:"max"===t?l:"average"===t?o/u:o}))}(A(e,(function(e){return e.getData()})),e[0].get("mapValueCalculation")),i=0;i<e.length;i++)e[i].originalData=e[i].getData();for(i=0;i<e.length;i++)(e[i].seriesGroup=e)[i].needsDrawMap=0===i&&!e[i].getHostGeoModel(),e[i].setData(n.cloneShallow()),e[i].mainSeries=e[0]}))})),np((function(e){var t=[];I(e.series,(function(e){e&&"map"===e.type&&(t.push(e),e.map=e.map||e.mapType,_(e,e.mapLocation))}))})),Pv("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}]);var Yy=I,Uy="\0__link_datas",jy="\0__link_mainData";function Zy(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:"data"}),e.datas=e.mainData=null,ex(t,n,e),Yy(n,(function(n){Yy(t.TRANSFERABLE_METHODS,(function(t){n.wrapMethod(t,P(qy,e))}))})),t.wrapMethod("cloneShallow",P(Jy,e)),Yy(t.CHANGABLE_METHODS,(function(n){t.wrapMethod(n,P(Ky,e))})),U(n[t.dataType]===t)}function qy(e,t){if(function(e){return e[jy]===e}(this)){var n=x({},this[Uy]);ex(n[this.dataType]=t,n,e)}else tx(t,this.dataType,this[jy],e);return t}function Ky(e,t){return e.struct&&e.struct.update(this),t}function Jy(e,t){return Yy(t[Uy],(function(n,i){n!==t&&tx(n.cloneShallow(),i,t,e)})),t}function Qy(e){var t=this[jy];return null==e||null==t?t:t[Uy][e]}function ex(e,t,n){e[Uy]={},Yy(t,(function(t,i){tx(t,i,e,n)}))}function tx(e,t,n,i){(n[Uy][t]=e)[jy]=n,e.dataType=t,i.struct&&(e[i.structAttr]=i.struct,i.struct[i.datasAttr[t]]=e),e.getLinkedData=Qy}function nx(e,t){this.name=e||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=t}function ix(e){this.root,this.data,this._nodes=[],this.hostModel=e}function ax(e,t){var n=e.isExpand?e.children:[],i=e.parentNode.children,a=e.hierNode.i?i[e.hierNode.i-1]:null;if(n.length){!function(e){for(var t=e.children,n=t.length,i=0,a=0;0<=--n;){var r=t[n];r.hierNode.prelim+=i,r.hierNode.modifier+=i,a+=r.hierNode.change,i+=r.hierNode.shift+a}}(e);var r=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;a?(e.hierNode.prelim=a.hierNode.prelim+t(e,a),e.hierNode.modifier=e.hierNode.prelim-r):e.hierNode.prelim=r}else a&&(e.hierNode.prelim=a.hierNode.prelim+t(e,a));e.parentNode.hierNode.defaultAncestor=function(e,t,n,i){if(t){for(var a=e,r=e,o=r.parentNode.children[0],s=t,l=a.hierNode.modifier,u=r.hierNode.modifier,c=o.hierNode.modifier,h=s.hierNode.modifier;s=lx(s),r=ux(r),s&&r;){a=lx(a),o=ux(o),a.hierNode.ancestor=e;var d=s.hierNode.prelim+h-r.hierNode.prelim-u+i(s,r);0<d&&(cx((f=e,g=n,(p=s).hierNode.ancestor.parentNode===f.parentNode?p.hierNode.ancestor:g),e,d),u+=d,l+=d),h+=s.hierNode.modifier,u+=r.hierNode.modifier,l+=a.hierNode.modifier,c+=o.hierNode.modifier}s&&!lx(a)&&(a.hierNode.thread=s,a.hierNode.modifier+=h-l),r&&!ux(o)&&(o.hierNode.thread=r,o.hierNode.modifier+=u-c,n=e)}var p,f,g;return n}(e,a,e.parentNode.hierNode.defaultAncestor||i[0],t)}function rx(e){var t=e.hierNode.prelim+e.parentNode.hierNode.modifier;e.setLayout({x:t},!0),e.hierNode.modifier+=e.parentNode.hierNode.modifier}function ox(e){return arguments.length?e:hx}function sx(e,t){var n={};return e-=Math.PI/2,n.x=t*Math.cos(e),n.y=t*Math.sin(e),n}function lx(e){var t=e.children;return t.length&&e.isExpand?t[t.length-1]:e.hierNode.thread}function ux(e){var t=e.children;return t.length&&e.isExpand?t[0]:e.hierNode.thread}function cx(e,t,n){var i=n/(t.hierNode.i-e.hierNode.i);t.hierNode.change-=i,t.hierNode.shift+=n,t.hierNode.modifier+=n,t.hierNode.prelim+=n,e.hierNode.change+=i}function hx(e,t){return e.parentNode===t.parentNode?1:2}nx.prototype={constructor:nx,isRemoved:function(){return this.dataIndex<0},eachNode:function(e,t,n){"function"==typeof e&&(n=t,t=e,e=null),N(e=e||{})&&(e={order:e});var i,a=e.order||"preorder",r=this[e.attr||"children"];"preorder"===a&&(i=t.call(n,this));for(var o=0;!i&&o<r.length;o++)r[o].eachNode(e,t,n);"postorder"===a&&t.call(n,this)},updateDepthAndHeight:function(e){var t=0;this.depth=e;for(var n=0;n<this.children.length;n++){var i=this.children[n];i.updateDepthAndHeight(e+1),i.height>t&&(t=i.height)}this.height=t+1},getNodeById:function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,i=n.length;t<i;t++){var a=n[t].getNodeById(e);if(a)return a}},contains:function(e){if(e===this)return!0;for(var t=0,n=this.children,i=n.length;t<i;t++){var a=n[t].contains(e);if(a)return a}},getAncestors:function(e){for(var t=[],n=e?this:this.parentNode;n;)t.push(n),n=n.parentNode;return t.reverse(),t},getValue:function(e){var t=this.hostTree.data;return t.get(t.getDimension(e||"value"),this.dataIndex)},setLayout:function(e,t){0<=this.dataIndex&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(e){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(e)},setVisual:function(e,t){0<=this.dataIndex&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},getVisual:function(e,t){return this.hostTree.data.getItemVisual(this.dataIndex,e,t)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},isDescendantOf:function(e){return e!==this&&e.isAncestorOf(this)}},ix.prototype={constructor:ix,type:"tree",eachNode:function(e,t,n){this.root.eachNode(e,t,n)},getNodeByDataIndex:function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},getNodeByName:function(e){return this.root.getNodeByName(e)},update:function(){for(var e=this.data,t=this._nodes,n=0,i=t.length;n<i;n++)t[n].dataIndex=-1;for(n=0,i=e.count();n<i;n++)t[e.getRawIndex(n)].dataIndex=n},clearLayouts:function(){this.data.clearItemLayouts()}},ix.createTree=function(e,t,n){var i=new ix(t),a=[],r=1;!function e(t,n){var o=t.value;r=Math.max(r,z(o)?o.length:1),a.push(t);var s=new nx(t.name,i);n?function(e,t){var n=t.children;e.parentNode!==t&&(n.push(e),e.parentNode=t)}(s,n):i.root=s,i._nodes.push(s);var l=t.children;if(l)for(var u=0;u<l.length;u++)e(l[u],s)}(e),i.root.updateDepthAndHeight(0);var o=Xp(a,{coordDimensions:["value"],dimensionsCount:r}),s=new Lp(o,t);return s.initData(a),n&&n(s),Zy({mainData:s,struct:i,structAttr:"tree"}),i.update(),i},Yc.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(e){var t={name:e.name,children:e.data},n=new ml(e.leaves||{},this,this.ecModel),i=ix.createTree(t,this,(function(e){e.wrapMethod("getItemModel",(function(e,t){var a=i.getNodeByDataIndex(t);return a.children.length&&a.isExpand||(e.parentModel=n),e}))})),a=0;i.eachNode("preorder",(function(e){e.depth>a&&(a=e.depth)}));var r=e.expandAndCollapse&&0<=e.initialTreeDepth?e.initialTreeDepth:a;return i.root.eachNode("preorder",(function(e){var t=e.hostTree.data.getRawDataItem(e.dataIndex);e.isExpand=t&&null!=t.collapsed?!t.collapsed:e.depth<=r})),i.data},getOrient:function(){var e=this.get("orient");return"horizontal"===e?e="LR":"vertical"===e&&(e="TB"),e},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e},formatTooltip:function(e){for(var t=this.getData().tree,n=t.root.children[0],i=t.getNodeByDataIndex(e),a=i.getValue(),r=i.name;i&&i!==n;)r=i.parentNode.name+"."+r,i=i.parentNode;return Xl(r+(isNaN(a)||null==a?"":" : "+a))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});var dx=ms({shape:{parentPoint:[],childPoints:[],orient:"",forkPosition:""},style:{stroke:"#000",fill:null},buildPath:function(e,t){var n=t.childPoints,i=n.length,a=t.parentPoint,r=n[0],o=n[i-1];if(1===i)return e.moveTo(a[0],a[1]),void e.lineTo(r[0],r[1]);var s=t.orient,l="TB"===s||"BT"===s?0:1,u=1-l,c=wl(t.forkPosition,1),h=[];h[l]=a[l],h[u]=a[u]+(o[u]-a[u])*c,e.moveTo(a[0],a[1]),e.lineTo(h[0],h[1]),e.moveTo(r[0],r[1]),h[l]=r[l],e.lineTo(h[0],h[1]),h[l]=o[l],e.lineTo(h[0],h[1]),e.lineTo(o[0],o[1]);for(var d=1;d<i-1;d++){var p=n[d];e.moveTo(p[0],p[1]),h[l]=p[l],e.lineTo(h[0],h[1])}}});function px(e,t){var n=e.getItemLayout(t);return n&&!isNaN(n.x)&&!isNaN(n.y)&&"none"!==e.getItemVisual(t,"symbol")}function fx(e,t,n){return n.itemModel=t,n.itemStyle=t.getModel("itemStyle").getItemStyle(),n.hoverItemStyle=t.getModel("emphasis.itemStyle").getItemStyle(),n.lineStyle=t.getModel("lineStyle").getLineStyle(),n.labelModel=t.getModel("label"),n.hoverLabelModel=t.getModel("emphasis.label"),!1===e.isExpand&&0!==e.children.length?n.symbolInnerColor=n.itemStyle.fill:n.symbolInnerColor="#fff",n}function gx(e,t,n,i,a,r){var o=!n,s=e.tree.getNodeByDataIndex(t),l=s.getModel(),u=(r=fx(s,l,r),e.tree.root),c=s.parentNode===u?s:s.parentNode||s,h=e.getItemGraphicEl(c.dataIndex),d=c.getLayout(),p=h?{x:h.position[0],y:h.position[1],rawX:h.__radialOldRawX,rawY:h.__radialOldRawY}:d,f=s.getLayout();o?(n=new Cg(e,t,r)).attr("position",[p.x,p.y]):n.updateData(e,t,r),n.__radialOldRawX=n.__radialRawX,n.__radialOldRawY=n.__radialRawY,n.__radialRawX=f.rawX,n.__radialRawY=f.rawY,i.add(n),e.setItemGraphicEl(t,n),Js(n,{position:[f.x,f.y]},a);var g=n.getSymbolPath();if("radial"===r.layout){var m,v,y=u.children[0],x=y.getLayout(),b=y.children.length;if(f.x===x.x&&!0===s.isExpand){var w={};w.x=(y.children[0].getLayout().x+y.children[b-1].getLayout().x)/2,w.y=(y.children[0].getLayout().y+y.children[b-1].getLayout().y)/2,(m=Math.atan2(w.y-x.y,w.x-x.x))<0&&(m=2*Math.PI+m),(v=w.x<x.x)&&(m-=Math.PI)}else(m=Math.atan2(f.y-x.y,f.x-x.x))<0&&(m=2*Math.PI+m),0===s.children.length||0!==s.children.length&&!1===s.isExpand?(v=f.x<x.x)&&(m-=Math.PI):(v=f.x>x.x)||(m-=Math.PI);var S=v?"left":"right",M=r.labelModel.get("rotate"),T=M*(Math.PI/180);g.setStyle({textPosition:r.labelModel.get("position")||S,textRotation:null==M?-m:T,textOrigin:"center",verticalAlign:"middle"})}!function(e,t,n,i,a,r,o,s,l){var u=l.edgeShape,c=i.__edge;if("curve"===u)t.parentNode&&t.parentNode!==n&&Js(c=c||(i.__edge=new ts({shape:vx(l,a,a),style:_({opacity:0,strokeNoScale:!0},l.lineStyle)})),{shape:vx(l,r,o),style:_({opacity:1},l.lineStyle)},e);else if("polyline"===u&&"orthogonal"===l.layout&&t!==n&&t.children&&0!==t.children.length&&!0===t.isExpand){for(var h=t.children,d=[],p=0;p<h.length;p++){var f=h[p].getLayout();d.push([f.x,f.y])}Js(c=c||(i.__edge=new dx({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:l.orient,forkPosition:l.edgeForkPosition},style:_({opacity:0,strokeNoScale:!0},l.lineStyle)})),{shape:{parentPoint:[o.x,o.y],childPoints:d},style:_({opacity:1},l.lineStyle)},e)}s.add(c)}(a,s,u,n,p,d,f,i,r)}function mx(e,t,n,i,a,r){for(var o,s=e.tree.getNodeByDataIndex(t),l=e.tree.root,u=s.getModel(),c=(r=fx(s,u,r),s.parentNode===l?s:s.parentNode||s),h=r.edgeShape;null==(o=c.getLayout());)c=c.parentNode===l?c:c.parentNode||c;Js(n,{position:[o.x+1,o.y+1]},a,(function(){i.remove(n),e.setItemGraphicEl(t,null)})),n.fadeOut(null,{keepLabel:!0});var d=e.getItemGraphicEl(c.dataIndex).__edge,p=n.__edge||(!1===c.isExpand||1===c.children.length?d:void 0);h=r.edgeShape,p&&("curve"===h?Js(p,{shape:vx(r,o,o),style:{opacity:0}},a,(function(){i.remove(p)})):"polyline"===h&&"orthogonal"===r.layout&&Js(p,{shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]]},style:{opacity:0}},a,(function(){i.remove(p)})))}function vx(e,t,n){var i,a,r,o,s,l,u,c,h=e.orient;if("radial"!==e.layout)return s=t.x,u=t.y,l=n.x,c=n.y,"LR"!==h&&"RL"!==h||(i=s+(l-s)*e.curvature,a=u,r=l+(s-l)*e.curvature,o=c),"TB"!==h&&"BT"!==h||(i=s,a=u+(c-u)*e.curvature,r=l,o=c+(u-c)*e.curvature),{x1:s,y1:u,x2:l,y2:c,cpx1:i,cpy1:a,cpx2:r,cpy2:o};s=t.rawX,u=t.rawY,l=n.rawX,c=n.rawY;var d=sx(s,u),p=sx(s,u+(c-u)*e.curvature),f=sx(l,c+(u-c)*e.curvature),g=sx(l,c);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:p.x,cpy1:p.y,cpx2:f.x,cpy2:f.y}}function yx(e,t){for(var n,i=[e];n=i.pop();)if(t(n),n.isExpand){var a=n.children;if(a.length)for(var r=a.length-1;0<=r;r--)i.push(a[r])}}function xx(e,t,n){if(e&&0<=S(t,e.type)){var i=n.getData().tree.root,a=e.targetNode;if("string"==typeof a&&(a=i.getNodeById(a)),a&&i.contains(a))return{node:a};var r=e.targetNodeId;if(null!=r&&(a=i.getNodeById(r)))return{node:a}}}function _x(e){for(var t=[];e;)(e=e.parentNode)&&t.push(e);return t.reverse()}function bx(e,t){return 0<=S(_x(e),t)}function Sx(e,t){for(var n=[];e;){var i=e.dataIndex;n.push({name:e.name,dataIndex:i,value:t.getRawValue(i)}),e=e.parentNode}return n.reverse(),n}pp({type:"tree",init:function(e,t){this._oldTree,this._mainGroup=new An,this._controller=new my(t.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(e,t,n,i){var a=e.getData(),r=e.layoutInfo,o=this._mainGroup,s=e.get("layout");"radial"===s?o.attr("position",[r.x+r.width/2,r.y+r.height/2]):o.attr("position",[r.x,r.y]),this._updateViewCoordSys(e,r,s),this._updateController(e,t,n);var l=this._data,u={expandAndCollapse:e.get("expandAndCollapse"),layout:s,edgeShape:e.get("edgeShape"),edgeForkPosition:e.get("edgeForkPosition"),orient:e.getOrient(),curvature:e.get("lineStyle.curveness"),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};a.diff(l).add((function(t){px(a,t)&&gx(a,t,null,o,e,u)})).update((function(t,n){var i=l.getItemGraphicEl(n);px(a,t)?gx(a,t,i,o,e,u):i&&mx(l,n,i,o,e,u)})).remove((function(t){var n=l.getItemGraphicEl(t);n&&mx(l,t,n,o,e,u)})).execute(),this._nodeScaleRatio=e.get("nodeScaleRatio"),this._updateNodeAndLinkScale(e),!0===u.expandAndCollapse&&a.eachItemGraphicEl((function(t,i){t.off("click").on("click",(function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:e.id,dataIndex:i})}))})),this._data=a},_updateViewCoordSys:function(e){var t=e.getData(),n=[];t.each((function(e){var i=t.getItemLayout(e);!i||isNaN(i.x)||isNaN(i.y)||n.push([+i.x,+i.y])}));var i=[],a=[];Er(n,i,a);var r=this._min,o=this._max;a[0]-i[0]==0&&(i[0]=r?r[0]:i[0]-1,a[0]=o?o[0]:a[0]+1),a[1]-i[1]==0&&(i[1]=r?r[1]:i[1]-1,a[1]=o?o[1]:a[1]+1);var s=e.coordinateSystem=new Vy;s.zoomLimit=e.get("scaleLimit"),s.setBoundingRect(i[0],i[1],a[0]-i[0],a[1]-i[1]),s.setCenter(e.get("center")),s.setZoom(e.get("zoom")),this.group.attr({position:s.position,scale:s.scale}),this._viewCoordSys=s,this._min=i,this._max=a},_updateController:function(e,t,n){var i=this._controller,a=this._controllerHost,r=this.group;i.setPointerChecker((function(t,i,a){var o=r.getBoundingRect();return o.applyTransform(r.transform),o.contain(i,a)&&!Ay(t,n,e)})),i.enable(e.get("roam")),a.zoomLimit=e.get("scaleLimit"),a.zoom=e.coordinateSystem.getZoom(),i.off("pan").off("zoom").on("pan",(function(t){Ty(a,t.dx,t.dy),n.dispatchAction({seriesId:e.id,type:"treeRoam",dx:t.dx,dy:t.dy})}),this).on("zoom",(function(t){Cy(a,t.scale,t.originX,t.originY),n.dispatchAction({seriesId:e.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(e)}),this)},_updateNodeAndLinkScale:function(e){var t=e.getData(),n=this._getNodeGlobalScale(e),i=[n,n];t.eachItemGraphicEl((function(e,t){e.attr("scale",i)}))},_getNodeGlobalScale:function(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var n=this._nodeScaleRatio,i=t.scale,a=i&&i[0]||1;return((t.getZoom()-1)*n+1)/a},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}}),ap({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},(function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},(function(t){var n=e.dataIndex,i=t.getData().tree.getNodeByDataIndex(n);i.isExpand=!i.isExpand}))})),ap({type:"treeRoam",event:"treeRoam",update:"none"},(function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},(function(t){var n=Ny(t.coordinateSystem,e);t.setCenter&&t.setCenter(n.center),t.setZoom&&t.setZoom(n.zoom)}))})),sp(um("tree","circle")),op((function(e,t){e.eachSeriesByType("tree",(function(e){!function(e,t){var n=function(e,t){return lu(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t);e.layoutInfo=n;var i=e.get("layout"),a=0,r=0,o=null;o="radial"===i?(a=2*Math.PI,r=Math.min(n.height,n.width)/2,ox((function(e,t){return(e.parentNode===t.parentNode?1:2)/e.depth}))):(a=n.width,r=n.height,ox());var s=e.getData().tree.root,l=s.children[0];if(l){!function(e){e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t,n,i=[e];t=i.pop();)if(n=t.children,t.isExpand&&n.length)for(var a=n.length-1;0<=a;a--){var r=n[a];r.hierNode={defaultAncestor:null,ancestor:r,prelim:0,modifier:0,change:0,shift:0,i:a,thread:null},i.push(r)}}(s),function(e,t,n){for(var i,a=[e],r=[];i=a.pop();)if(r.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s<o.length;s++)a.push(o[s])}for(;i=r.pop();)t(i,n)}(l,ax,o),s.hierNode.modifier=-l.hierNode.prelim,yx(l,rx);var u=l,c=l,h=l;yx(l,(function(e){var t=e.getLayout().x;t<u.getLayout().x&&(u=e),t>c.getLayout().x&&(c=e),e.depth>h.depth&&(h=e)}));var d=u===c?1:o(u,c)/2,p=d-u.getLayout().x,f=0,g=0,m=0,v=0;if("radial"===i)f=a/(c.getLayout().x+d+p),g=r/(h.depth-1||1),yx(l,(function(e){m=(e.getLayout().x+p)*f,v=(e.depth-1)*g;var t=sx(m,v);e.setLayout({x:t.x,y:t.y,rawX:m,rawY:v},!0)}));else{var y=e.getOrient();"RL"===y||"LR"===y?(g=r/(c.getLayout().x+d+p),f=a/(h.depth-1||1),yx(l,(function(e){v=(e.getLayout().x+p)*g,m="LR"===y?(e.depth-1)*f:a-(e.depth-1)*f,e.setLayout({x:m,y:v},!0)}))):"TB"!==y&&"BT"!==y||(f=a/(c.getLayout().x+d+p),g=r/(h.depth-1||1),yx(l,(function(e){m=(e.getLayout().x+p)*f,v="TB"===y?(e.depth-1)*g:r-(e.depth-1)*g,e.setLayout({x:m,y:v},!0)})))}}}(e,t)}))})),Yc.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25b6",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(e,t){var n={name:e.name,children:e.data};!function e(t){var n=0;I(t.children,(function(t){e(t);var i=t.value;z(i)&&(i=i[0]),n+=i}));var i=t.value;z(i)&&(i=i[0]),null!=i&&!isNaN(i)||(i=n),i<0&&(i=0),z(t.value)?t.value[0]=i:t.value=i}(n);var i=e.levels||[],a=new ml({itemStyle:this.designatedVisualItemStyle={}},this,t),r=A((i=e.levels=function(e,t){var n,i=t.get("color");if(i)return I(e=e||[],(function(e){var t=new ml(e),i=t.get("color");(t.get("itemStyle.color")||i&&"none"!==i)&&(n=!0)})),n||((e[0]||(e[0]={})).color=i.slice()),e}(i,t))||[],(function(e){return new ml(e,a,t)}),this),o=ix.createTree(n,this,(function(e){e.wrapMethod("getItemModel",(function(e,t){var n=o.getNodeByDataIndex(t),i=r[n.depth];return e.parentModel=i||a,e}))}));return o.data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(e){var t=this.getData(),n=this.getRawValue(e),i=z(n)?Gl(n[0]):Gl(n);return Xl(t.getName(e)+": "+i)},getDataParams:function(e){var t=Yc.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return t.treePathInfo=Sx(n,this),t},setLayoutInfo:function(e){this.layoutInfo=this.layoutInfo||{},x(this.layoutInfo,e)},mapIdToIndex:function(e){var t=this._idIndexMap;t||(t=this._idIndexMap=Q(),this._idIndexMapCount=0);var n=t.get(e);return null==n&&t.set(e,n=this._idIndexMapCount++),n},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)}});function Mx(e){this.group=new An,e.add(this.group)}function Tx(e,t,n,i,a,r){var o=[[a?e:e-5,t],[e+n,t],[e+n,t+i],[a?e:e-5,t+i]];return r||o.splice(2,0,[e+n+5,t+i/2]),a||o.push([e,t+i/2]),o}function Cx(e){var t=Ox(e);return t.stroke=t.fill=t.lineWidth=null,t}Mx.prototype={constructor:Mx,render:function(e,t,n,i){var a=e.getModel("breadcrumb"),r=this.group;if(r.removeAll(),a.get("show")&&n){var o=a.getModel("itemStyle"),s=o.getModel("textStyle"),l={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,l,s),this._renderContent(e,l,o,s,i),uu(r,l.pos,l.box)}},_prepare:function(e,t,n){for(var i=e;i;i=i.parentNode){var a=i.getModel().get("name"),r=n.getTextRect(a),o=Math.max(r.width+16,t.emptyItemWidth);t.totalWidth+=o+8,t.renderList.push({node:i,text:a,width:o})}},_renderContent:function(e,t,n,i,a){for(var r,o,s=0,l=t.emptyItemWidth,u=e.get("breadcrumb.height"),c=function(e,t,n){var i=t.width,a=t.height,r=wl(e.x,i),o=wl(e.y,a),s=wl(e.x2,i),l=wl(e.y2,a);return(isNaN(r)||isNaN(parseFloat(e.x)))&&(r=0),(isNaN(s)||isNaN(parseFloat(e.x2)))&&(s=i),(isNaN(o)||isNaN(parseFloat(e.y)))&&(o=0),(isNaN(l)||isNaN(parseFloat(e.y2)))&&(l=a),n=Hl(n||0),{width:Math.max(s-r-n[1]-n[3],0),height:Math.max(l-o-n[0]-n[2],0)}}(t.pos,t.box),h=t.totalWidth,d=t.renderList,p=d.length-1;0<=p;p--){var f=d[p],g=f.node,m=f.width,v=f.text;h>c.width&&(h-=m-l,m=l,v=null);var y=new Ho({shape:{points:Tx(s,0,m,u,p===d.length-1,0===p)},style:_(n.getItemStyle(),{lineJoin:"bevel",text:v,textFill:i.getTextColor(),textFont:i.getFont()}),z:10,onclick:P(a,g)});this.group.add(y),r=e,o=g,y.eventData={componentType:"series",componentSubType:"treemap",componentIndex:r.componentIndex,seriesIndex:r.componentIndex,seriesName:r.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:o&&o.dataIndex,name:o&&o.name},treePathInfo:o&&Sx(o,r)},s+=m+8}},remove:function(){this.group.removeAll()}};var Ix=E,Ax=An,Dx=Zo,kx=I,Lx=["label"],Ex=["emphasis","label"],Px=["upperLabel"],zx=["emphasis","upperLabel"],Ox=ir([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);function Nx(e,t,n,i,a,r,o,s,l,u){if(o){var c=o.getLayout(),h=e.getData();if(h.setItemGraphicEl(o.dataIndex,null),c&&c.isInView){var d=c.width,p=c.height,f=c.borderWidth,g=c.invisible,v=o.getRawIndex(),y=s&&s.getRawIndex(),_=o.viewChildren,b=c.upperHeight,w=_&&_.length,S=o.getModel("itemStyle"),M=o.getModel("emphasis.itemStyle"),T=E("nodeGroup",Ax);if(T){if(l.add(T),T.attr("position",[c.x||0,c.y||0]),T.__tmNodeWidth=d,T.__tmNodeHeight=p,c.isAboveViewRoot)return T;var C=o.getModel(),I=E("background",Dx,u,1);if(I&&function(t,n,i){if(n.dataIndex=o.dataIndex,n.seriesIndex=e.seriesIndex,n.setShape({x:0,y:0,width:d,height:p}),g)D(n);else{n.invisible=!1;var a=o.getVisual("borderColor",!0),r=M.get("borderColor"),s=Cx(S);s.fill=a;var l=Ox(M);if(l.fill=r,i){var u=d-2*f;k(s,l,a,u,b,{x:f,y:0,width:u,height:b})}else s.text=l.text=null;n.setStyle(s),Es(n,l)}t.add(n)}(T,I,w&&c.upperLabelHeight),w)Gs(T)&&Vs(T,!1),I&&(Vs(I,!0),h.setItemGraphicEl(o.dataIndex,I));else{var A=E("content",Dx,u,2);A&&function(t,n){n.dataIndex=o.dataIndex,n.seriesIndex=e.seriesIndex;var i=Math.max(d-2*f,0),a=Math.max(p-2*f,0);if(n.culling=!0,n.setShape({x:f,y:f,width:i,height:a}),g)D(n);else{n.invisible=!1;var r=o.getVisual("color",!0),s=Cx(S);s.fill=r;var l=Ox(M);k(s,l,r,i,a),n.setStyle(s),Es(n,l)}t.add(n)}(T,A),I&&Gs(I)&&Vs(I,!1),Vs(T,!0),h.setItemGraphicEl(o.dataIndex,T)}return T}}}function D(e){e.invisible||r.push(e)}function k(t,n,i,a,r,s){var l=C.get("name"),u=C.getModel(s?Px:Lx),h=C.getModel(s?zx:Ex),d=u.getShallow("show");Hs(t,n,u,h,{defaultText:d?l:null,autoColor:i,isRectText:!0,labelFetcher:e,labelDataIndex:o.dataIndex,labelProp:s?"upperLabel":"label"}),L(t,s,c),L(n,s,c),s&&(t.textRect=m(s)),t.truncate=d&&u.get("ellipsis")?{outerWidth:a,outerHeight:r,minChar:2}:null}function L(t,n,i){var a=t.text;if(!n&&i.isLeafRoot&&null!=a){var r=e.get("drillDownIcon",!0);t.text=r?r+" "+a:a}}function E(e,r,s,l){var u=null!=y&&n[e][y],c=a[e];return u?(n[e][y]=null,function(e,t,n){(e[v]={}).old="nodeGroup"===n?t.position.slice():x({},t.shape)}(c,u,e)):g||((u=new r({z:function(e,t){var n=10*e+t;return(n-1)/n}(s,l)})).__tmDepth=s,function(e,t,n){var r=e[v]={},s=o.parentNode;if(s&&(!i||"drillDown"===i.direction)){var l=0,u=0,c=a.background[s.getRawIndex()];!i&&c&&c.old&&(l=c.old.width,u=c.old.height),r.old="nodeGroup"===n?[0,u]:{x:l,y:u,width:0,height:0}}r.fadein="nodeGroup"!==n}(c,0,u.__tmStorageName=e)),t[e][v]=u}}pp({type:"treemap",init:function(e,t){this._containerGroup,this._storage={nodeGroup:[],background:[],content:[]},this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(e,t,n,i){if(!(S(t.findComponents({mainType:"series",subType:"treemap",query:i}),e)<0)){this.seriesModel=e,this.api=n,this.ecModel=t;var a=xx(i,["treemapZoomToNode","treemapRootToNode"],e),r=i&&i.type,o=e.layoutInfo,s=!this._oldTree,l=this._storage,u="treemapRootToNode"===r&&a&&l?{rootNodeGroup:l.nodeGroup[a.node.getRawIndex()],direction:i.direction}:null,c=this._giveContainerGroup(o),h=this._doRender(c,e,u);s||r&&"treemapZoomToNode"!==r&&"treemapRootToNode"!==r?h.renderFinally():this._doAnimation(c,h,e,u),this._resetController(n),this._renderBreadcrumb(e,n,a)}},_giveContainerGroup:function(e){var t=this._containerGroup;return t||(t=this._containerGroup=new Ax,this._initEvents(t),this.group.add(t)),t.attr("position",[e.x,e.y]),t},_doRender:function(e,t,n){var i=t.getData().tree,a=this._oldTree,r={nodeGroup:[],background:[],content:[]},o={nodeGroup:[],background:[],content:[]},s=this._storage,l=[],u=P(Nx,t,o,s,n,r,l);!function e(t,n,i,a,r){function o(e){return e.getId()}function s(o,s){var l=null!=o?t[o]:null,c=null!=s?n[s]:null,h=u(l,c,i,r);h&&e(l&&l.viewChildren||[],c&&c.viewChildren||[],h,a,r+1)}a?kx(n=t,(function(e,t){e.isRemoved()||s(t,t)})):new gp(n,t,o,o).add(s).update(s).remove(P(s,null)).execute()}(i.root?[i.root]:[],a&&a.root?[a.root]:[],e,i===a||!a,0);var c,h,d=(h={nodeGroup:[],background:[],content:[]},(c=s)&&kx(c,(function(e,t){var n=h[t];kx(e,(function(e){e&&(n.push(e),e.__tmWillDelete=1)}))})),h);return this._oldTree=i,this._storage=o,{lastsForAnimation:r,willDeleteEls:d,renderFinally:function(){kx(d,(function(e){kx(e,(function(e){e.parent&&e.parent.remove(e)}))})),kx(l,(function(e){e.invisible=!0,e.dirty()}))}}},_doAnimation:function(e,t,n,i){if(n.get("animation")){var a=n.get("animationDurationUpdate"),r=n.get("animationEasing"),o=function(){var e,t=[],n={};return{add:function(e,i,a,r,o){return N(r)&&(o=r,r=0),!n[e.id]&&(n[e.id]=1,t.push({el:e,target:i,time:a,delay:r,easing:o}),!0)},done:function(t){return e=t,this},start:function(){for(var i=t.length,a=0,r=t.length;a<r;a++){var o=t[a];o.el.animateTo(o.target,o.time,o.delay,o.easing,s)}return this;function s(){--i||(t.length=0,n={},e&&e())}}}}();kx(t.willDeleteEls,(function(e,t){kx(e,(function(e,n){if(!e.invisible){var s,l=e.parent;if(i&&"drillDown"===i.direction)s=l===i.rootNodeGroup?{shape:{x:0,y:0,width:l.__tmNodeWidth,height:l.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var u=0,c=0;l.__tmWillDelete||(u=l.__tmNodeWidth/2,c=l.__tmNodeHeight/2),s="nodeGroup"===t?{position:[u,c],style:{opacity:0}}:{shape:{x:u,y:c,width:0,height:0},style:{opacity:0}}}s&&o.add(e,s,a,r)}}))})),kx(this._storage,(function(e,n){kx(e,(function(e,i){var s=t.lastsForAnimation[n][i],l={};s&&("nodeGroup"===n?s.old&&(l.position=e.position.slice(),e.attr("position",s.old)):(s.old&&(l.shape=x({},e.shape),e.setShape(s.old)),s.fadein?(e.setStyle("opacity",0),l.style={opacity:1}):1!==e.style.opacity&&(l.style={opacity:1})),o.add(e,l,a,r))}))}),this),this._state="animating",o.done(Ix((function(){this._state="ready",t.renderFinally()}),this)).start()}},_resetController:function(e){var t=this._controller;t||((t=this._controller=new my(e.getZr())).enable(this.seriesModel.get("roam")),t.on("pan",Ix(this._onPan,this)),t.on("zoom",Ix(this._onZoom,this)));var n=new In(0,0,e.getWidth(),e.getHeight());t.setPointerChecker((function(e,t,i){return n.contain(t,i)}))},_clearController:function(){var e=this._controller;e&&(e.dispose(),e=null)},_onPan:function(e){if("animating"!==this._state&&(3<Math.abs(e.dx)||3<Math.abs(e.dy))){var t=this.seriesModel.getData().tree.root;if(!t)return;var n=t.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},_onZoom:function(e){var t=e.originX,n=e.originY;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var a=i.getLayout();if(!a)return;var r=new In(a.x,a.y,a.width,a.height),o=this.seriesModel.layoutInfo;t-=o.x,n-=o.y;var s=at();lt(s,s,[-t,-n]),ct(s,s,[e.scale,e.scale]),lt(s,s,[t,n]),r.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:r.x,y:r.y,width:r.width,height:r.height}})}},_initEvents:function(e){e.on("click",(function(e){if("ready"===this._state){var t=this.seriesModel.get("nodeClick",!0);if(t){var n=this.findTarget(e.offsetX,e.offsetY);if(n){var i=n.node;if(i.getLayout().isLeafRoot)this._rootToNode(n);else if("zoomToNode"===t)this._zoomToNode(n);else if("link"===t){var a=i.hostTree.data.getItemModel(i.dataIndex),r=a.get("link",!0),o=a.get("target",!0)||"blank";r&&tu(r,o)}}}}}),this)},_renderBreadcrumb:function(e,t,n){n=n||(n=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2))||{node:e.getData().tree.root},(this._breadcrumb||(this._breadcrumb=new Mx(this.group))).render(e,t,n.node,Ix((function(t){"animating"!==this._state&&(bx(e.getViewRoot(),t)?this._rootToNode({node:t}):this._zoomToNode({node:t}))}),this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},_rootToNode:function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},findTarget:function(e,t){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(i){var a=this._storage.background[i.getRawIndex()];if(a){var r=a.transformCoordToLocal(e,t),o=a.shape;if(!(o.x<=r[0]&&r[0]<=o.x+o.width&&o.y<=r[1]&&r[1]<=o.y+o.height))return!1;n={node:i,offsetX:r[0],offsetY:r[1]}}}),this),n}});for(var Rx=function(){},Bx=["treemapZoomToNode","treemapRender","treemapMove"],Vx=0;Vx<Bx.length;Vx++)ap({type:Bx[Vx],update:"updateView"},Rx);ap({type:"treemapRootToNode",update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"treemap",query:e},(function(t,n){var i=xx(e,["treemapZoomToNode","treemapRootToNode"],t);if(i){var a=t.getViewRoot();a&&(e.direction=bx(a,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node)}}))}));var Gx=I,Wx=R,Hx=function(e){var t=e.mappingMethod,n=e.type,i=this.option=m(e);this.type=n,this.mappingMethod=t,this._normalizeData=Qx[t];var a=Fx[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._doMap=a._doMap[t],"piecewise"===t?($x(i),function(e){var t=e.pieceList;e.hasSpecialVisual=!1,I(t,(function(t,n){t.originIndex=n,null!=t.visual&&(e.hasSpecialVisual=!0)}))}(i)):"category"===t?i.categories?function(e){var t=e.categories,n=e.visual,i=e.categoryMap={};if(Gx(t,(function(e,t){i[e]=t})),!z(n)){var a=[];R(n)?Gx(n,(function(e,t){var n=i[t];a[null!=n?n:-1]=e})):a[-1]=n,n=Jx(e,a)}for(var r=t.length-1;0<=r;r--)null==n[r]&&(delete i[t[r]],t.pop())}(i):$x(i,!0):(U("linear"!==t||i.dataExtent),$x(i))};Hx.prototype={constructor:Hx,mapValueToVisual:function(e){var t=this._normalizeData(e);return this._doMap(t,e)},getNormalizer:function(){return E(this._normalizeData,this)}};var Fx=Hx.visualHandlers={color:{applyVisual:Ux("color"),getColorMapper:function(){var e=this.option;return E("category"===e.mappingMethod?function(e,t){return t||(e=this._normalizeData(e)),jx.call(this,e)}:function(t,n,i){var a=!!i;return n||(t=this._normalizeData(t)),i=$t(t,e.parsedVisual,i),a?i:qt(i,"rgba")},this)},_doMap:{linear:function(e){return qt($t(e,this.option.parsedVisual),"rgba")},category:jx,piecewise:function(e,t){var n=Kx.call(this,t);return null==n&&(n=qt($t(e,this.option.parsedVisual),"rgba")),n},fixed:Zx}},colorHue:Xx((function(e,t){return jt(e,t)})),colorSaturation:Xx((function(e,t){return jt(e,null,t)})),colorLightness:Xx((function(e,t){return jt(e,null,null,t)})),colorAlpha:Xx((function(e,t){return Zt(e,t)})),opacity:{applyVisual:Ux("opacity"),_doMap:qx([0,1])},liftZ:{applyVisual:Ux("liftZ"),_doMap:{linear:Zx,category:Zx,piecewise:Zx,fixed:Zx}},symbol:{applyVisual:function(e,t,n){var i=this.mapValueToVisual(e);if(N(i))n("symbol",i);else if(Wx(i))for(var a in i)i.hasOwnProperty(a)&&n(a,i[a])},_doMap:{linear:Yx,category:jx,piecewise:function(e,t){var n=Kx.call(this,t);return null==n&&(n=Yx.call(this,e)),n},fixed:Zx}},symbolSize:{applyVisual:Ux("symbolSize"),_doMap:qx([0,1])}};function $x(e,t){var n=e.visual,i=[];R(n)?Gx(n,(function(e){i.push(e)})):null!=n&&i.push(n),t||1!==i.length||{color:1,symbol:1}.hasOwnProperty(e.type)||(i[1]=i[0]),Jx(e,i)}function Xx(e){return{applyVisual:function(t,n,i){t=this.mapValueToVisual(t),i("color",e(n("color"),t))},_doMap:qx([0,1])}}function Yx(e){var t=this.option.visual;return t[Math.round(bl(e,[0,1],[0,t.length-1],!0))]||{}}function Ux(e){return function(t,n,i){i(e,this.mapValueToVisual(t))}}function jx(e){var t=this.option.visual;return t[this.option.loop&&-1!==e?e%t.length:e]}function Zx(){return this.option.visual[0]}function qx(e){return{linear:function(t){return bl(t,e,this.option.visual,!0)},category:jx,piecewise:function(t,n){var i=Kx.call(this,n);return null==i&&(i=bl(t,e,this.option.visual,!0)),i},fixed:Zx}}function Kx(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var i=n[Hx.findPieceIndex(e,n)];if(i&&i.visual)return i.visual[this.type]}}function Jx(e,t){return e.visual=t,"color"===e.type&&(e.parsedVisual=A(t,(function(e){return Gt(e)}))),t}var Qx={linear:function(e){return bl(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=Hx.findPieceIndex(e,t,!0);if(null!=n)return bl(n,[0,t.length-1],[0,1],!0)},category:function(e){var t=this.option.categories?this.option.categoryMap[e]:e;return null==t?-1:t},fixed:te};function e_(e,t,n){return e?t<=n:t<n}Hx.listVisualTypes=function(){var e=[];return I(Fx,(function(t,n){e.push(n)})),e},Hx.addVisualHandler=function(e,t){Fx[e]=t},Hx.isValidType=function(e){return Fx.hasOwnProperty(e)},Hx.eachVisual=function(e,t,n){R(e)?I(e,t,n):t.call(n,e)},Hx.mapVisual=function(e,t,n){var i,a=z(e)?[]:R(e)?{}:(i=!0,null);return Hx.eachVisual(e,(function(e,r){var o=t.call(n,e,r);i?a=o:a[r]=o})),a},Hx.retrieveVisuals=function(e){var t,n={};return e&&Gx(Fx,(function(i,a){e.hasOwnProperty(a)&&(n[a]=e[a],t=!0)})),t?n:null},Hx.prepareVisualTypes=function(e){if(Wx(e)){var t=[];Gx(e,(function(e,n){t.push(n)})),e=t}else{if(!z(e))return[];e=e.slice()}return e.sort((function(e,t){return"color"===t&&"color"!==e&&0===e.indexOf("color")?1:-1})),e},Hx.dependsOn=function(e,t){return"color"===t?!(!e||0!==e.indexOf(t)):e===t},Hx.findPieceIndex=function(e,t,n){for(var i,a=1/0,r=0,o=t.length;r<o;r++){var s=t[r].value;if(null!=s){if(s===e||"string"==typeof s&&s===e+"")return r;n&&h(s,r)}}for(r=0,o=t.length;r<o;r++){var l=t[r],u=l.interval,c=l.close;if(u){if(u[0]===-1/0){if(e_(c[1],e,u[1]))return r}else if(u[1]===1/0){if(e_(c[0],u[0],e))return r}else if(e_(c[0],u[0],e)&&e_(c[1],e,u[1]))return r;n&&h(u[0],r),n&&h(u[1],r)}}if(n)return e===1/0?t.length-1:e===-1/0?0:i;function h(t,n){var r=Math.abs(t-e);r<a&&(a=r,i=n)}};var t_=z,n_={seriesType:"treemap",reset:function(e,t,n,i){var a=e.getData().tree.root;a.isRemoved()||function e(t,n,i,a){var r=t.getModel(),o=t.getLayout();if(o&&!o.invisible&&o.isInView){var s,l,u=t.getModel("itemStyle"),c=function(e,t,n){var i=x({},t),a=n.designatedVisualItemStyle;return I(["color","colorAlpha","colorSaturation"],(function(n){a[n]=t[n];var r=e.get(n);(a[n]=null)!=r&&(i[n]=r)})),i}(u,n,a),h=u.get("borderColor"),d=u.get("borderColorSaturation");null!=d&&(h=null!=(l=s=i_(c))?jt(l,null,null,d):null),t.setVisual("borderColor",h);var p=t.viewChildren;if(p&&p.length){var f=function(e,t,n,i,a,r){if(r&&r.length){var o=r_(t,"color")||null!=a.color&&"none"!==a.color&&(r_(t,"colorAlpha")||r_(t,"colorSaturation"));if(o){var s=t.get("visualMin"),l=t.get("visualMax"),u=n.dataExtent.slice();null!=s&&s<u[0]&&(u[0]=s),null!=l&&l>u[1]&&(u[1]=l);var c=t.get("colorMappingBy"),h={type:o.name,dataExtent:u,visual:o.range};"color"!==h.type||"index"!==c&&"id"!==c?h.mappingMethod="linear":(h.mappingMethod="category",h.loop=!0);var d=new Hx(h);return d.__drColorMappingBy=c,d}}}(0,r,o,0,c,p);I(p,(function(t,n){if(t.depth>=i.length||t===i[t.depth]){var o=function(e,t,n,i,a,r){var o=x({},t);if(a){var s=a.type,l="color"===s&&a.__drColorMappingBy,u="index"===l?i:"id"===l?r.mapIdToIndex(n.getId()):n.getValue(e.get("visualDimension"));o[s]=a.mapValueToVisual(u)}return o}(r,c,t,n,f,a);e(t,o,i,a)}}))}else s=i_(c),t.setVisual("color",s)}}(a,{},e.getViewRoot().getAncestors(),e)}};function i_(e){var t=a_(e,"color");if(t){var n=a_(e,"colorAlpha"),i=a_(e,"colorSaturation");return i&&(t=jt(t,null,null,i)),n&&(t=Zt(t,n)),t}}function a_(e,t){var n=e[t];if(null!=n&&"none"!==n)return n}function r_(e,t){var n=e.get(t);return t_(n)&&n.length?{name:t,range:n}:null}var o_=Math.max,s_=Math.min,l_=H,u_=I,c_=["itemStyle","borderWidth"],h_=["itemStyle","gapWidth"],d_=["upperLabel","show"],p_=["upperLabel","height"],f_={seriesType:"treemap",reset:function(e,t,n,i){var a=n.getWidth(),r=n.getHeight(),o=e.option,s=lu(e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=o.size||[],u=wl(l_(s.width,l[0]),a),c=wl(l_(s.height,l[1]),r),h=i&&i.type,d=xx(i,["treemapZoomToNode","treemapRootToNode"],e),p="treemapRender"===h||"treemapMove"===h?i.rootRect:null,f=e.getViewRoot(),g=_x(f);if("treemapMove"!==h){var m="treemapZoomToNode"===h?function(e,t,n,i,a){var r,o=(t||{}).node,s=[i,a];if(!o||o===n)return s;for(var l=i*a,u=l*e.option.zoomToNodeRatio;r=o.parentNode;){for(var c=0,h=r.children,d=0,p=h.length;d<p;d++)c+=h[d].getValue();var f=o.getValue();if(0===f)return s;u*=c/f;var g=r.getModel(),m=g.get(c_);u+=4*m*m+(3*m+Math.max(m,y_(g)))*Math.pow(u,.5),Dl<u&&(u=Dl),o=r}u<l&&(u=l);var v=Math.pow(u/l,.5);return[i*v,a*v]}(e,d,f,u,c):p?[p.width,p.height]:[u,c],v=o.sort;v&&"asc"!==v&&"desc"!==v&&(v="desc");var y={squareRatio:o.squareRatio,sort:v,leafDepth:o.leafDepth};f.hostTree.clearLayouts();var _={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};f.setLayout(_),function e(t,n,i,a){var r,o;if(!t.isRemoved()){var s=t.getLayout();r=s.width,o=s.height;var l=(f=t.getModel()).get(c_),u=f.get(h_)/2,c=y_(f),h=Math.max(l,c),d=l-u,p=h-u,f=t.getModel();t.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:c},!0);var g=(r=o_(r-2*d,0))*(o=o_(o-d-p,0)),m=g_(t,f,g,n,i,a);if(m.length){var v={x:d,y:p,width:r,height:o},y=s_(r,o),x=1/0,_=[];_.area=0;for(var b=0,w=m.length;b<w;){var S=m[b];_.push(S),_.area+=S.getLayout().area;var M=m_(_,y,n.squareRatio);x=M<=x?(b++,M):(_.area-=_.pop().getLayout().area,v_(_,y,v,u,!1),y=s_(v.width,v.height),_.length=_.area=0,1/0)}if(_.length&&v_(_,y,v,u,!0),!i){var T=f.get("childrenVisibleMin");null!=T&&g<T&&(i=!0)}for(b=0,w=m.length;b<w;b++)e(m[b],n,i,a+1)}}}(f,y,!1,0),_=f.getLayout(),u_(g,(function(e,t){var n=(g[t+1]||f).getValue();e.setLayout(x({dataExtent:[n,n],borderWidth:0,upperHeight:0},_))}))}var b=e.getData().tree.root;b.setLayout(function(e,t,n){if(t)return{x:t.x,y:t.y};var i={x:0,y:0};if(!n)return i;var a=n.node,r=a.getLayout();if(!r)return i;for(var o=[r.width/2,r.height/2],s=a;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:e.width/2-o[0],y:e.height/2-o[1]}}(s,p,d),!0),e.setLayoutInfo(s),function e(t,n,i,a,r){var o=t.getLayout(),s=i[r],l=s&&s===t;if(!(s&&!l||r===i.length&&t!==a)){t.setLayout({isInView:!0,invisible:!l&&!n.intersect(o),isAboveViewRoot:l},!0);var u=new In(n.x-o.x,n.y-o.y,n.width,n.height);u_(t.viewChildren||[],(function(t){e(t,u,i,a,r+1)}))}}(b,new In(-s.x,-s.y,a,r),g,f,0)}};function g_(e,t,n,i,a,r){var o=e.children||[],s=i.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=i.leafDepth&&i.leafDepth<=r;if(a&&!l)return e.viewChildren=[];!function(e,t){t&&e.sort((function(e,n){var i="asc"===t?e.getValue()-n.getValue():n.getValue()-e.getValue();return 0==i?"asc"===t?e.dataIndex-n.dataIndex:n.dataIndex-e.dataIndex:i}))}(o=k(o,(function(e){return!e.isRemoved()})),s);var u=function(e,t,n){for(var i=0,a=0,r=t.length;a<r;a++)i+=t[a].getValue();var o=e.get("visualDimension");if(t&&t.length)if("value"===o&&n)s=[t[t.length-1].getValue(),t[0].getValue()],"asc"===n&&s.reverse();else{var s=[1/0,-1/0];u_(t,(function(e){var t=e.getValue(o);t<s[0]&&(s[0]=t),t>s[1]&&(s[1]=t)}))}else s=[NaN,NaN];return{sum:i,dataExtent:s}}(t,o,s);if(0===u.sum)return e.viewChildren=[];if(u.sum=function(e,t,n,i,a){if(!i)return n;for(var r=e.get("visibleMin"),o=a.length,s=o,l=o-1;0<=l;l--){var u=a["asc"===i?o-l-1:l].getValue();u/n*t<r&&(s=l,n-=u)}return"asc"===i?a.splice(0,o-s):a.splice(s,o-s),n}(t,n,u.sum,s,o),0===u.sum)return e.viewChildren=[];for(var c=0,h=o.length;c<h;c++){var d=o[c].getValue()/u.sum*n;o[c].setLayout({area:d})}return l&&(o.length&&e.setLayout({isLeafRoot:!0},!0),o.length=0),e.viewChildren=o,e.setLayout({dataExtent:u.dataExtent},!0),o}function m_(e,t,n){for(var i,a=0,r=1/0,o=0,s=e.length;o<s;o++)(i=e[o].getLayout().area)&&(i<r&&(r=i),a<i&&(a=i));var l=e.area*e.area,u=t*t*n;return l?o_(u*a/l,l/(u*r)):1/0}function v_(e,t,n,i,a){var r=t===n.width?0:1,o=1-r,s=["x","y"],l=["width","height"],u=n[s[r]],c=t?e.area/t:0;(a||c>n[l[o]])&&(c=n[l[o]]);for(var h=0,d=e.length;h<d;h++){var p=e[h],f={},g=c?p.getLayout().area/c:0,m=f[l[o]]=o_(c-2*i,0),v=n[s[r]]+n[l[r]]-u,y=h===d-1||v<g?v:g,x=f[l[r]]=o_(y-2*i,0);f[s[o]]=n[s[o]]+s_(i,m/2),f[s[r]]=u+s_(i,x/2),u+=y,p.setLayout(f,!0)}n[s[o]]+=c,n[l[o]]-=c}function y_(e){return e.get(d_)?e.get(p_):0}function x_(e){return"_EC_"+e}function __(e){this._directed=e||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData}sp(n_),op(f_);var b_=__.prototype;function w_(e,t){this.id=null==e?"":e,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==t?-1:t}function S_(e,t,n){this.node1=e,this.node2=t,this.dataIndex=null==n?-1:n}function M_(e,t){return{getValue:function(n){var i=this[e][t];return i.get(i.getDimension(n||"value"),this.dataIndex)},setVisual:function(n,i){0<=this.dataIndex&&this[e][t].setItemVisual(this.dataIndex,n,i)},getVisual:function(n,i){return this[e][t].getItemVisual(this.dataIndex,n,i)},setLayout:function(n,i){0<=this.dataIndex&&this[e][t].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}function T_(e,t,n,i,a){for(var r=new __(i),o=0;o<e.length;o++)r.addNode(H(e[o].id,e[o].name,o),o);var s=[],l=[],u=0;for(o=0;o<t.length;o++){var c=t[o],h=c.source,d=c.target;r.addEdge(h,d,u)&&(l.push(c),s.push(H(c.id,h+" > "+d)),u++)}var p,f=n.get("coordinateSystem");if("cartesian2d"===f||"polar"===f)p=Jp(e,n);else{var g=ju.get(f),m=g&&"view"!==g.type&&g.dimensions||[];S(m,"value")<0&&m.concat(["value"]);var v=Xp(e,{coordDimensions:m});(p=new Lp(v,n)).initData(e)}var y=new Lp(["value"],n);return y.initData(l,s),a&&a(p,y),Zy({mainData:p,struct:r,structAttr:"graph",datas:{node:p,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),r.update(),r}b_.type="graph",b_.isDirected=function(){return this._directed},b_.addNode=function(e,t){e=null==e?""+t:""+e;var n=this._nodesMap;if(!n[x_(e)]){var i=new w_(e,t);return(i.hostGraph=this).nodes.push(i),n[x_(e)]=i}},b_.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},b_.getNodeById=function(e){return this._nodesMap[x_(e)]},b_.addEdge=function(e,t,n){var i=this._nodesMap,a=this._edgesMap;if("number"==typeof e&&(e=this.nodes[e]),"number"==typeof t&&(t=this.nodes[t]),w_.isInstance(e)||(e=i[x_(e)]),w_.isInstance(t)||(t=i[x_(t)]),e&&t){var r=e.id+"-"+t.id,o=new S_(e,t,n);return(o.hostGraph=this)._directed&&(e.outEdges.push(o),t.inEdges.push(o)),e.edges.push(o),e!==t&&t.edges.push(o),this.edges.push(o),a[r]=o}},b_.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},b_.getEdge=function(e,t){w_.isInstance(e)&&(e=e.id),w_.isInstance(t)&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+"-"+t]:n[e+"-"+t]||n[t+"-"+e]},b_.eachNode=function(e,t){for(var n=this.nodes,i=n.length,a=0;a<i;a++)0<=n[a].dataIndex&&e.call(t,n[a],a)},b_.eachEdge=function(e,t){for(var n=this.edges,i=n.length,a=0;a<i;a++)0<=n[a].dataIndex&&0<=n[a].node1.dataIndex&&0<=n[a].node2.dataIndex&&e.call(t,n[a],a)},b_.breadthFirstTraverse=function(e,t,n,i){if(w_.isInstance(t)||(t=this._nodesMap[x_(t)]),t){for(var a="out"===n?"outEdges":"in"===n?"inEdges":"edges",r=0;r<this.nodes.length;r++)this.nodes[r].__visited=!1;if(!e.call(i,t,null))for(var o=[t];o.length;){var s=o.shift(),l=s[a];for(r=0;r<l.length;r++){var u=l[r],c=u.node1===s?u.node2:u.node1;if(!c.__visited){if(e.call(i,c,s))return;o.push(c),c.__visited=!0}}}}},b_.update=function(){for(var e=this.data,t=this.edgeData,n=this.nodes,i=this.edges,a=0,r=n.length;a<r;a++)n[a].dataIndex=-1;for(a=0,r=e.count();a<r;a++)n[e.getRawIndex(a)].dataIndex=a;for(t.filterSelf((function(e){var n=i[t.getRawIndex(e)];return 0<=n.node1.dataIndex&&0<=n.node2.dataIndex})),a=0,r=i.length;a<r;a++)i[a].dataIndex=-1;for(a=0,r=t.count();a<r;a++)i[t.getRawIndex(a)].dataIndex=a},b_.clone=function(){for(var e=new __(this._directed),t=this.nodes,n=this.edges,i=0;i<t.length;i++)e.addNode(t[i].id,t[i].dataIndex);for(i=0;i<n.length;i++){var a=n[i];e.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return e},w_.prototype={constructor:w_,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(e){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(e)}},S_.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)},T(w_,M_("hostGraph","data")),T(S_,M_("hostGraph","edgeData")),__.Node=w_,__.Edge=S_,Qa(w_),Qa(S_);var C_=function(e){return e.get("autoCurveness")||null},I_=function(e,t){var n=C_(e),i=20,a=[];if("number"==typeof n)i=n;else if(z(n))return void(e.__curvenessList=n);i<t&&(i=t);var r=i%2?i+2:i+3;a=[];for(var o=0;o<r;o++)a.push((o%2?o+1:o)/10*(o%2?-1:1));e.__curvenessList=a},A_=function(e,t,n){var i=[e.id,e.dataIndex].join("."),a=[t.id,t.dataIndex].join(".");return[n.uid,i,a].join("--\x3e")},D_=function(e){var t=e.split("--\x3e");return[t[0],t[2],t[1]].join("--\x3e")},k_=function(e,t){var n=t.__edgeMap;return n[e]?n[e].length:0};function L_(e,t,n,i){var a=C_(t),r=z(a);if(!a)return null;var o=function(e,t){var n=A_(e.node1,e.node2,t);return t.__edgeMap[n]}(e,t);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===n){s=l;break}var u=function(e,t){return k_(A_(e.node1,e.node2,t),t)+k_(A_(e.node2,e.node1,t),t)}(e,t);I_(t,u),e.lineStyle=e.lineStyle||{};var c=A_(e.node1,e.node2,t),h=t.__curvenessList,d=r||u%2?0:1;if(o.isForward)return h[d+s];var p=D_(c),f=k_(p,t),g=h[s+f+d];return i?r?a&&0===a[0]?(f+d)%2?g:-g:((f%2?0:1)+d)%2?g:-g:(f+d)%2?g:-g:h[s+f+d]}var E_=dp({type:"series.graph",init:function(e){E_.superApply(this,"init",arguments);var t=this;function n(){return t._categoriesData}this.legendVisualProvider=new Iv(n,n),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},mergeOption:function(e){E_.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(e){E_.superApply(this,"mergeDefaultAndTheme",arguments),za(e,["edgeLabel"],["show"])},getInitialData:function(e,t){var n=e.edges||e.links||[],i=e.data||e.nodes||[],a=this;if(i&&n){!function(e){C_(e)&&(e.__curvenessList=[],e.__edgeMap={},I_(e))}(this);var r=T_(i,n,this,!0,(function(e,n){e.wrapMethod("getItemModel",(function(e){var t=a._categoriesModels[e.getShallow("category")];return t&&(t.parentModel=e.parentModel,e.parentModel=t),e}));var i=a.getModel("edgeLabel"),r=new ml({label:i.option},i.parentModel,t),o=a.getModel("emphasis.edgeLabel"),s=new ml({emphasis:{label:o.option}},o.parentModel,t);function l(e){return(e=this.parsePath(e))&&"label"===e[0]?r:e&&"emphasis"===e[0]&&"label"===e[1]?s:this.parentModel}n.wrapMethod("getItemModel",(function(e){return e.customizeGetParent(l),e}))}));return I(r.edges,(function(e){!function(e,t,n,i){if(C_(n)){var a=A_(e,t,n),r=n.__edgeMap,o=r[D_(a)];r[a]&&!o?r[a].isForward=!0:o&&r[a]&&(o.isForward=!0,r[a].isForward=!1),r[a]=r[a]||[],r[a].push(i)}}(e.node1,e.node2,this,e.dataIndex)}),this),r.data}},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(e,t,n){if("edge"!==n)return E_.superApply(this,"formatTooltip",arguments);var i=this.getData(),a=this.getDataParams(e,n),r=i.graph.getEdgeByIndex(e),o=i.getName(r.node1.dataIndex),s=i.getName(r.node2.dataIndex),l=[];return null!=o&&l.push(o),null!=s&&l.push(s),l=Xl(l.join(" > ")),a.value&&(l+=" : "+Xl(a.value)),l},_updateCategoriesData:function(){var e=A(this.option.categories||[],(function(e){return null!=e.value?e:x({value:0},e)})),t=new Lp(["value"],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray((function(e){return t.getItemModel(e,!0)}))},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e},isAnimationEnabled:function(){return E_.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{label:{show:!0}}}}),P_=Ko.prototype,z_=ts.prototype;function O_(e){return isNaN(+e.cpx1)||isNaN(+e.cpy1)}var N_=ms({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(e,t){this[O_(t)?"_buildPathLine":"_buildPathCurve"](e,t)},_buildPathLine:P_.buildPath,_buildPathCurve:z_.buildPath,pointAt:function(e){return this[O_(this.shape)?"_pointAtLine":"_pointAtCurve"](e)},_pointAtLine:P_.pointAt,_pointAtCurve:z_.pointAt,tangentAt:function(e){var t=this.shape,n=O_(t)?[t.x2-t.x1,t.y2-t.y1]:this._tangentAtCurve(e);return me(n,n)},_tangentAtCurve:z_.tangentAt}),R_=["fromSymbol","toSymbol"];function B_(e){return"_"+e+"Type"}function V_(e,t,n){var i=t.getItemVisual(n,e);if(i&&"none"!==i){var a=t.getItemVisual(n,"color"),r=t.getItemVisual(n,e+"Size"),o=t.getItemVisual(n,e+"Rotate");z(r)||(r=[r,r]);var s=ag(i,-r[0]/2,-r[1]/2,r[0],r[1],a);return s.__specifiedRotation=null==o||isNaN(o)?void 0:+o*Math.PI/180||0,s.name=e,s}}function G_(e,t){e.x1=t[0][0],e.y1=t[0][1],e.x2=t[1][0],e.y2=t[1][1],e.percent=1;var n=t[2];n?(e.cpx1=n[0],e.cpy1=n[1]):(e.cpx1=NaN,e.cpy1=NaN)}function W_(e,t,n){An.call(this),this._createLine(e,t,n)}var H_=W_.prototype;function F_(e){this._ctor=e||W_,this.group=new An}H_.beforeUpdate=function(){var e=this.childOfName("fromSymbol"),t=this.childOfName("toSymbol"),n=this.childOfName("label");if(e||t||!n.ignore){for(var i=1,a=this.parent;a;)a.scale&&(i/=a.scale[0]),a=a.parent;var r=this.childOfName("line");if(this.__dirty||r.__dirty){var o,s=r.shape.percent,l=r.pointAt(0),u=r.pointAt(s),c=ce([],u,l);if(me(c,c),e){if(e.attr("position",l),null==(o=e.__specifiedRotation)){var h=r.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(h[1],h[0]))}else e.attr("rotation",o);e.attr("scale",[i*s,i*s])}if(t)t.attr("position",u),null==(o=t.__specifiedRotation)?(h=r.tangentAt(1),t.attr("rotation",-Math.PI/2-Math.atan2(h[1],h[0]))):t.attr("rotation",o),t.attr("scale",[i*s,i*s]);if(!n.ignore){var d,p,f,g;n.attr("position",u);var m=n.__labelDistance,v=m[0]*i,y=m[1]*i,x=s/2,_=[(h=r.tangentAt(x))[1],-h[0]],b=r.pointAt(x);0<_[1]&&(_[0]=-_[0],_[1]=-_[1]);var w,S=h[0]<0?-1:1;if("start"!==n.__position&&"end"!==n.__position){var M=-Math.atan2(h[1],h[0]);u[0]<l[0]&&(M=Math.PI+M),n.attr("rotation",M)}switch(n.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":w=-y,f="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":w=y,f="top";break;default:w=0,f="middle"}switch(n.__position){case"end":d=[c[0]*v+u[0],c[1]*y+u[1]],p=.8<c[0]?"left":c[0]<-.8?"right":"center",f=.8<c[1]?"top":c[1]<-.8?"bottom":"middle";break;case"start":d=[-c[0]*v+l[0],-c[1]*y+l[1]],p=.8<c[0]?"right":c[0]<-.8?"left":"center",f=.8<c[1]?"bottom":c[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":d=[v*S+l[0],l[1]+w],p=h[0]<0?"right":"left",g=[-v*S,-w];break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":d=[b[0],b[1]+w],p="center",g=[0,-w];break;case"insideEndTop":case"insideEnd":case"insideEndBottom":d=[-v*S+u[0],u[1]+w],p=0<=h[0]?"right":"left",g=[v*S,-w]}n.attr({style:{textVerticalAlign:n.__verticalAlign||f,textAlign:n.__textAlign||p},position:d,scale:[i,i],origin:g})}}}},H_._createLine=function(e,t,n){var i=e.hostModel,a=function(e){var t=new N_({name:"line",subPixelOptimize:!0});return G_(t.shape,e),t}(e.getItemLayout(t));a.shape.percent=0,Qs(a,{shape:{percent:1}},i,t),this.add(a);var r=new zo({name:"label",lineLabelOriginalOpacity:1});this.add(r),I(R_,(function(n){var i=V_(n,e,t);this.add(i),this[B_(n)]=e.getItemVisual(t,n)}),this),this._updateCommonStl(e,t,n)},H_.updateData=function(e,t,n){var i=e.hostModel,a=this.childOfName("line"),r=e.getItemLayout(t),o={shape:{}};G_(o.shape,r),Js(a,o,i,t),I(R_,(function(n){var i=e.getItemVisual(t,n),a=B_(n);if(this[a]!==i){this.remove(this.childOfName(n));var r=V_(n,e,t);this.add(r)}this[a]=i}),this),this._updateCommonStl(e,t,n)},H_._updateCommonStl=function(e,t,n){var i=e.hostModel,a=this.childOfName("line"),r=n&&n.lineStyle,o=n&&n.hoverLineStyle,s=n&&n.labelModel,l=n&&n.hoverLabelModel;if(!n||e.hasItemOption){var u=e.getItemModel(t);r=u.getModel("lineStyle").getLineStyle(),o=u.getModel("emphasis.lineStyle").getLineStyle(),s=u.getModel("label"),l=u.getModel("emphasis.label")}var c=e.getItemVisual(t,"color"),h=$(e.getItemVisual(t,"opacity"),r.opacity,1);a.useStyle(_({strokeNoScale:!0,fill:"none",stroke:c,opacity:h},r)),a.hoverStyle=o,I(R_,(function(e){var t=this.childOfName(e);t&&(t.setColor(c),t.setStyle({opacity:h}))}),this);var d,p,f=s.getShallow("show"),g=l.getShallow("show"),m=this.childOfName("label");if((f||g)&&(d=c||"#000",null==(p=i.getFormattedLabel(t,"normal",e.dataType)))){var v=i.getRawValue(t);p=null==v?e.getName(t):isFinite(v)?Sl(v):v}var y=f?p:null,x=g?F(i.getFormattedLabel(t,"emphasis",e.dataType),p):null,b=m.style;if(null!=y||null!=x){$s(m.style,s,{text:y},{autoColor:d}),m.__textAlign=b.textAlign,m.__verticalAlign=b.textVerticalAlign,m.__position=s.get("position")||"middle";var w=s.get("distance");z(w)||(w=[w,w]),m.__labelDistance=w}m.hoverStyle=null!=x?{text:x,textFill:l.getTextColor(!0),fontStyle:l.getShallow("fontStyle"),fontWeight:l.getShallow("fontWeight"),fontSize:l.getShallow("fontSize"),fontFamily:l.getShallow("fontFamily")}:{text:null},m.ignore=!f&&!g,Bs(this)},H_.highlight=function(){this.trigger("emphasis")},H_.downplay=function(){this.trigger("normal")},H_.updateLayout=function(e,t){this.setLinePoints(e.getItemLayout(t))},H_.setLinePoints=function(e){var t=this.childOfName("line");G_(t.shape,e),t.dirty()},M(W_,An);var $_=F_.prototype;function X_(e){var t=e.hostModel;return{lineStyle:t.getModel("lineStyle").getLineStyle(),hoverLineStyle:t.getModel("emphasis.lineStyle").getLineStyle(),labelModel:t.getModel("label"),hoverLabelModel:t.getModel("emphasis.label")}}function Y_(e){return isNaN(e[0])||isNaN(e[1])}function U_(e){return!Y_(e[0])&&!Y_(e[1])}function j_(e){var t=e.coordinateSystem;if("view"!==t.type)return 1;var n=e.option.nodeScaleRatio,i=t.scale,a=i&&i[0]||1;return((t.getZoom()-1)*n+1)/a}function Z_(e){var t=e.getVisual("symbolSize");return t instanceof Array&&(t=(t[0]+t[1])/2),+t}$_.isPersistent=function(){return!0},$_.updateData=function(e){var t=this,n=t.group,i=t._lineData;t._lineData=e,i||n.removeAll();var a=X_(e);e.diff(i).add((function(n){!function(e,t,n,i){if(U_(t.getItemLayout(n))){var a=new e._ctor(t,n,i);t.setItemGraphicEl(n,a),e.group.add(a)}}(t,e,n,a)})).update((function(n,r){!function(e,t,n,i,a,r){var o=t.getItemGraphicEl(i);if(!U_(n.getItemLayout(a)))return e.group.remove(o);o?o.updateData(n,a,r):o=new e._ctor(n,a,r),n.setItemGraphicEl(a,o),e.group.add(o)}(t,i,e,r,n,a)})).remove((function(e){n.remove(i.getItemGraphicEl(e))})).execute()},$_.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl((function(t,n){t.updateLayout(e,n)}),this)},$_.incrementalPrepareUpdate=function(e){this._seriesScope=X_(e),this._lineData=null,this.group.removeAll()},$_.incrementalUpdate=function(e,t){function n(e){e.isGroup||function(e){return e.animators&&0<e.animators.length}(e)||(e.incremental=e.useHoverLayer=!0)}for(var i=e.start;i<e.end;i++)if(U_(t.getItemLayout(i))){var a=new this._ctor(t,i,this._seriesScope);a.traverse(n),this.group.add(a),t.setItemGraphicEl(i,a)}},$_.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},$_._clearIncremental=function(){var e=this._incremental;e&&e.clearDisplaybles()};var q_=[],K_=[],J_=[],Q_=_r,eb=_e,tb=Math.abs;function nb(e,t,n){for(var i,a=e[0],r=e[1],o=e[2],s=1/0,l=n*n,u=.1,c=.1;c<=.9;c+=.1)q_[0]=Q_(a[0],r[0],o[0],c),q_[1]=Q_(a[1],r[1],o[1],c),(p=tb(eb(q_,t)-l))<s&&(s=p,i=c);for(var h=0;h<32;h++){var d=i+u;K_[0]=Q_(a[0],r[0],o[0],i),K_[1]=Q_(a[1],r[1],o[1],i),J_[0]=Q_(a[0],r[0],o[0],d),J_[1]=Q_(a[1],r[1],o[1],d);var p=eb(K_,t)-l;if(tb(p)<.01)break;var f=eb(J_,t)-l;u/=2,p<0?0<=f?i+=u:i-=u:0<=f?i-=u:i+=u}return i}function ib(e,t){var n=[],i=Sr,a=[[],[],[]],r=[[],[]],o=[];t/=2,e.eachEdge((function(e,s){var l=e.getLayout(),u=e.getVisual("fromSymbol"),c=e.getVisual("toSymbol");l.__original||(l.__original=[oe(l[0]),oe(l[1])],l[2]&&l.__original.push(oe(l[2])));var h=l.__original;if(null!=l[2]){if(re(a[0],h[0]),re(a[1],h[2]),re(a[2],h[1]),u&&"none"!==u){var d=Z_(e.node1),p=nb(a,h[0],d*t);i(a[0][0],a[1][0],a[2][0],p,n),a[0][0]=n[3],a[1][0]=n[4],i(a[0][1],a[1][1],a[2][1],p,n),a[0][1]=n[3],a[1][1]=n[4]}c&&"none"!==c&&(d=Z_(e.node2),p=nb(a,h[1],d*t),i(a[0][0],a[1][0],a[2][0],p,n),a[1][0]=n[1],a[2][0]=n[2],i(a[0][1],a[1][1],a[2][1],p,n),a[1][1]=n[1],a[2][1]=n[2]),re(l[0],a[0]),re(l[1],a[2]),re(l[2],a[1])}else re(r[0],h[0]),re(r[1],h[1]),ce(o,r[1],r[0]),me(o,o),u&&"none"!==u&&(d=Z_(e.node1),ue(r[0],r[0],o,d*t)),c&&"none"!==c&&(d=Z_(e.node2),ue(r[1],r[1],o,-d*t)),re(l[0],r[0]),re(l[1],r[1])}))}var ab="__focusNodeAdjacency",rb="__unfocusNodeAdjacency",ob=["itemStyle","opacity"],sb=["lineStyle","opacity"];function lb(e,t){var n=e.getVisual("opacity");return null!=n?n:e.getModel().get(t)}function ub(e,t,n){var i=e.getGraphicEl(),a=lb(e,t);null!=n&&(null==a&&(a=1),a*=n),i.downplay&&i.downplay(),i.traverse((function(e){if(!e.isGroup){var t=e.lineLabelOriginalOpacity;null!=t&&null==n||(t=a),e.setStyle("opacity",t)}}))}function cb(e,t){var n=lb(e,t),i=e.getGraphicEl();i.traverse((function(e){e.isGroup||e.setStyle("opacity",n)})),i.highlight&&i.highlight()}function hb(e){return e instanceof Array||(e=[e,e]),e}function db(e){var t=e.coordinateSystem;if(!t||"view"===t.type){var n=e.getGraph();n.eachNode((function(e){var t=e.getModel();e.setLayout([+t.get("x"),+t.get("y")])})),pb(n,e)}}function pb(e,t){e.eachEdge((function(e,n){var i=$(e.getModel().get("lineStyle.curveness"),-L_(e,t,n,!0),0),a=oe(e.node1.getLayout()),r=oe(e.node2.getLayout()),o=[a,r];+i&&o.push([(a[0]+r[0])/2-(a[1]-r[1])*i,(a[1]+r[1])/2-(r[0]-a[0])*i]),e.setLayout(o)}))}pp({type:"graph",init:function(e,t){var n=new Ng,i=new F_,a=this.group;this._controller=new my(t.getZr()),this._controllerHost={target:a},a.add(n.group),a.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},render:function(e,t,n){var i=this,a=e.coordinateSystem;this._model=e;var r=this._symbolDraw,o=this._lineDraw,s=this.group;if("view"===a.type){var l={position:a.position,scale:a.scale};this._firstRender?s.attr(l):Js(s,l,e)}ib(e.getGraph(),j_(e));var u=e.getData();r.updateData(u);var c=e.getEdgeData();o.updateData(c),this._updateNodeAndLinkScale(),this._updateController(e,t,n),clearTimeout(this._layoutTimeout);var h=e.forceLayout,d=e.get("force.layoutAnimation");h&&this._startForceLayoutIteration(h,d),u.eachItemGraphicEl((function(t,a){var r=u.getItemModel(a);t.off("drag").off("dragend");var o=r.get("draggable");o&&t.on("drag",(function(){h&&(h.warmUp(),this._layouting||this._startForceLayoutIteration(h,d),h.setFixed(a),u.setItemLayout(a,t.position))}),this).on("dragend",(function(){h&&h.setUnfixed(a)}),this),t.setDraggable(o&&h),t[ab]&&t.off("mouseover",t[ab]),t[rb]&&t.off("mouseout",t[rb]),r.get("focusNodeAdjacency")&&(t.on("mouseover",t[ab]=function(){i._clearTimer(),n.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,dataIndex:t.dataIndex})}),t.on("mouseout",t[rb]=function(){i._dispatchUnfocus(n)}))}),this),u.graph.eachEdge((function(t){var a=t.getGraphicEl();a[ab]&&a.off("mouseover",a[ab]),a[rb]&&a.off("mouseout",a[rb]),t.getModel().get("focusNodeAdjacency")&&(a.on("mouseover",a[ab]=function(){i._clearTimer(),n.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,edgeDataIndex:t.dataIndex})}),a.on("mouseout",a[rb]=function(){i._dispatchUnfocus(n)}))}));var p="circular"===e.get("layout")&&e.get("circular.rotateLabel"),f=u.getLayout("cx"),g=u.getLayout("cy");u.eachItemGraphicEl((function(e,t){var n=u.getItemModel(t).get("label.rotate")||0,i=e.getSymbolPath();if(p){var a=u.getItemLayout(t),r=Math.atan2(a[1]-g,a[0]-f);r<0&&(r=2*Math.PI+r);var o=a[0]<f;o&&(r-=Math.PI);var s=o?"left":"right";Fs(i,{textRotation:-r,textPosition:s,textOrigin:"center"},{textPosition:s})}else Fs(i,{textRotation:n*=Math.PI/180})})),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={},this._clearTimer()},_dispatchUnfocus:function(e,t){var n=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout((function(){n._unfocusDelayTimer=null,e.dispatchAction({type:"unfocusNodeAdjacency",seriesId:n._model.id})}),500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(e,t,n,i){var a=e.getData().graph,r=i.dataIndex,o=i.edgeDataIndex,s=a.getNodeByIndex(r),l=a.getEdgeByIndex(o);(s||l)&&(a.eachNode((function(e){ub(e,ob,.1)})),a.eachEdge((function(e){ub(e,sb,.1)})),s&&(cb(s,ob),I(s.edges,(function(e){e.dataIndex<0||(cb(e,sb),cb(e.node1,ob),cb(e.node2,ob))}))),l&&(cb(l,sb),cb(l.node1,ob),cb(l.node2,ob)))},unfocusNodeAdjacency:function(e,t,n,i){var a=e.getData().graph;a.eachNode((function(e){ub(e,ob)})),a.eachEdge((function(e){ub(e,sb)}))},_startForceLayoutIteration:function(e,t){var n=this;!function i(){e.step((function(e){n.updateLayout(n._model),(n._layouting=!e)&&(t?n._layoutTimeout=setTimeout(i,16):i())}))}()},_updateController:function(e,t,n){var i=this._controller,a=this._controllerHost,r=this.group;i.setPointerChecker((function(t,i,a){var o=r.getBoundingRect();return o.applyTransform(r.transform),o.contain(i,a)&&!Ay(t,n,e)})),"view"===e.coordinateSystem.type?(i.enable(e.get("roam")),a.zoomLimit=e.get("scaleLimit"),a.zoom=e.coordinateSystem.getZoom(),i.off("pan").off("zoom").on("pan",(function(t){Ty(a,t.dx,t.dy),n.dispatchAction({seriesId:e.id,type:"graphRoam",dx:t.dx,dy:t.dy})})).on("zoom",(function(t){Cy(a,t.scale,t.originX,t.originY),n.dispatchAction({seriesId:e.id,type:"graphRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(),ib(e.getGraph(),j_(e)),this._lineDraw.updateLayout()}),this)):i.disable()},_updateNodeAndLinkScale:function(){var e=this._model,t=e.getData(),n=j_(e),i=[n,n];t.eachItemGraphicEl((function(e,t){e.attr("scale",i)}))},updateLayout:function(e){ib(e.getGraph(),j_(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}}),ap({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},(function(){})),ap({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},(function(){})),ap({type:"graphRoam",event:"graphRoam",update:"none"},(function(e,t){t.eachComponent({mainType:"series",query:e},(function(t){var n=Ny(t.coordinateSystem,e);t.setCenter&&t.setCenter(n.center),t.setZoom&&t.setZoom(n.zoom)}))}));var fb=Math.PI,gb=[];function mb(e,t){var n=e.coordinateSystem;if(!n||"view"===n.type){var i=n.getBoundingRect(),a=e.getData(),r=a.graph,o=i.width/2+i.x,s=i.height/2+i.y,l=Math.min(i.width,i.height)/2,u=a.count();a.setLayout({cx:o,cy:s}),u&&(vb[t](e,n,r,a,l,o,s,u),r.eachEdge((function(t,n){var i,a=$(t.getModel().get("lineStyle.curveness"),L_(t,e,n),0),r=oe(t.node1.getLayout()),l=oe(t.node2.getLayout()),u=(r[0]+l[0])/2,c=(r[1]+l[1])/2;+a&&(i=[o*(a*=3)+u*(1-a),s*a+c*(1-a)]),t.setLayout([r,l,i])})))}}var vb={value:function(e,t,n,i,a,r,o,s){var l=0,u=i.getSum("value"),c=2*Math.PI/(u||s);n.eachNode((function(e){var t=e.getValue("value"),n=c*(u?t:1)/2;l+=n,e.setLayout([a*Math.cos(l)+r,a*Math.sin(l)+o]),l+=n}))},symbolSize:function(e,t,n,i,a,r,o,s){var l=0;gb.length=s;var u=j_(e);n.eachNode((function(e){var t=Z_(e);isNaN(t)&&(t=2),t<0&&(t=0),t*=u;var n=Math.asin(t/2/a);isNaN(n)&&(n=fb/2),gb[e.dataIndex]=n,l+=2*n}));var c=(2*fb-l)/s/2,h=0;n.eachNode((function(e){var t=c+gb[e.dataIndex];h+=t,e.setLayout([a*Math.cos(h)+r,a*Math.sin(h)+o]),h+=t}))}},yb=ue;ip((function(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.eachSeriesByType("graph",(function(e){var n=e.getCategoriesData(),i=e.getGraph().data,a=n.mapArray(n.getName);i.filterSelf((function(e){var n=i.getItemModel(e).getShallow("category");if(null!=n){"number"==typeof n&&(n=a[n]);for(var r=0;r<t.length;r++)if(!t[r].isSelected(n))return!1}return!0}))}),this)})),sp(um("graph","circle",null)),sp((function(e){var t={};e.eachSeriesByType("graph",(function(e){var n=e.getCategoriesData(),i=e.getData(),a={};n.each((function(i){var r=n.getName(i);a["ec-"+r]=i;var o=n.getItemModel(i),s=o.get("itemStyle.color")||e.getColorFromPalette(r,t);n.setItemVisual(i,"color",s);for(var l=["opacity","symbol","symbolSize","symbolKeepAspect"],u=0;u<l.length;u++){var c=o.getShallow(l[u],!0);null!=c&&n.setItemVisual(i,l[u],c)}})),n.count()&&i.each((function(e){var t=i.getItemModel(e).getShallow("category");if(null!=t){"string"==typeof t&&(t=a["ec-"+t]);for(var r=["color","opacity","symbol","symbolSize","symbolKeepAspect"],o=0;o<r.length;o++)null==i.getItemVisual(e,r[o],!0)&&i.setItemVisual(e,r[o],n.getItemVisual(t,r[o]))}}))}))})),sp((function(e){e.eachSeriesByType("graph",(function(e){var t=e.getGraph(),n=e.getEdgeData(),i=hb(e.get("edgeSymbol")),a=hb(e.get("edgeSymbolSize")),r="lineStyle.color".split("."),o="lineStyle.opacity".split(".");n.setVisual("fromSymbol",i&&i[0]),n.setVisual("toSymbol",i&&i[1]),n.setVisual("fromSymbolSize",a&&a[0]),n.setVisual("toSymbolSize",a&&a[1]),n.setVisual("color",e.get(r)),n.setVisual("opacity",e.get(o)),n.each((function(e){var i=n.getItemModel(e),a=t.getEdgeByIndex(e),s=hb(i.getShallow("symbol",!0)),l=hb(i.getShallow("symbolSize",!0)),u=i.get(r),c=i.get(o);switch(u){case"source":u=a.node1.getVisual("color");break;case"target":u=a.node2.getVisual("color")}s[0]&&a.setVisual("fromSymbol",s[0]),s[1]&&a.setVisual("toSymbol",s[1]),l[0]&&a.setVisual("fromSymbolSize",l[0]),l[1]&&a.setVisual("toSymbolSize",l[1]),a.setVisual("color",u),a.setVisual("opacity",c)}))}))})),op((function(e,t){e.eachSeriesByType("graph",(function(e){var t=e.get("layout"),n=e.coordinateSystem;if(n&&"view"!==n.type){var i=e.getData(),a=[];I(n.dimensions,(function(e){a=a.concat(i.mapDimension(e,!0))}));for(var r=0;r<i.count();r++){for(var o=[],s=!1,l=0;l<a.length;l++){var u=i.get(a[l],r);isNaN(u)||(s=!0),o.push(u)}s?i.setItemLayout(r,n.dataToPoint(o)):i.setItemLayout(r,[NaN,NaN])}pb(i.graph,e)}else t&&"none"!==t||db(e)}))})),op(gd.VISUAL.POST_CHART_LAYOUT,(function(e){e.eachSeriesByType("graph",(function(e){"circular"===e.get("layout")&&mb(e,"symbolSize")}))})),op((function(e){e.eachSeriesByType("graph",(function(e){if(!(h=e.coordinateSystem)||"view"===h.type)if("force"===e.get("layout")){var t=e.preservedPoints||{},n=e.getGraph(),i=n.data,a=n.edgeData,r=e.getModel("force"),o=r.get("initLayout");e.preservedPoints?i.each((function(e){var n=i.getId(e);i.setItemLayout(e,t[n]||[NaN,NaN])})):o&&"none"!==o?"circular"===o&&mb(e,"value"):db(e);var s=i.getDataExtent("value"),l=a.getDataExtent("value"),u=r.get("repulsion"),c=r.get("edgeLength");z(u)||(u=[u,u]),z(c)||(c=[c,c]),c=[c[1],c[0]];var h,d=i.mapArray("value",(function(e,t){var n=i.getItemLayout(t),a=bl(e,s,u);return isNaN(a)&&(a=(u[0]+u[1])/2),{w:a,rep:a,fixed:i.getItemModel(t).get("fixed"),p:!n||isNaN(n[0])||isNaN(n[1])?null:n}})),p=a.mapArray("value",(function(t,i){var a=n.getEdgeByIndex(i),r=bl(t,l,c);isNaN(r)&&(r=(c[0]+c[1])/2);var o=a.getModel(),s=$(o.get("lineStyle.curveness"),-L_(a,e,i,!0),0);return{n1:d[a.node1.dataIndex],n2:d[a.node2.dataIndex],d:r,curveness:s,ignoreForceLayout:o.get("ignoreForceLayout")}})),f=(h=e.coordinateSystem).getBoundingRect(),g=function(e,t,n){for(var i=n.rect,a=i.width,r=i.height,o=[i.x+a/2,i.y+r/2],s=null==n.gravity?.1:n.gravity,l=0;l<e.length;l++){var u=e[l];u.p||(u.p=ae(a*(Math.random()-.5)+o[0],r*(Math.random()-.5)+o[1])),u.pp=oe(u.p),u.edges=null}var c=null==n.friction?.6:n.friction,h=c;return{warmUp:function(){h=.8*c},setFixed:function(t){e[t].fixed=!0},setUnfixed:function(t){e[t].fixed=!1},step:function(n){for(var i=[],a=e.length,r=0;r<t.length;r++){var l=t[r];if(!l.ignoreForceLayout){var u=l.n1;ce(i,(f=l.n2).p,u.p);var c=he(i)-l.d,d=f.w/(u.w+f.w);isNaN(d)&&(d=0),me(i,i),u.fixed||yb(u.p,u.p,i,d*c*h),f.fixed||yb(f.p,f.p,i,-(1-d)*c*h)}}for(r=0;r<a;r++)(v=e[r]).fixed||(ce(i,o,v.p),yb(v.p,v.p,i,s*h));for(r=0;r<a;r++){u=e[r];for(var p=r+1;p<a;p++){var f;ce(i,(f=e[p]).p,u.p),0===(c=he(i))&&(se(i,Math.random()-.5,Math.random()-.5),c=1);var g=(u.rep+f.rep)/c/c;u.fixed||yb(u.pp,u.pp,i,g),f.fixed||yb(f.pp,f.pp,i,-g)}}var m=[];for(r=0;r<a;r++){var v;(v=e[r]).fixed||(ce(m,v.p,v.pp),yb(v.p,v.p,m,h),re(v.pp,v.p))}h*=.992,n&&n(e,t,h<.01)}}}(d,p,{rect:f,gravity:r.get("gravity"),friction:r.get("friction")}),m=g.step;g.step=function(e){for(var a=0,r=d.length;a<r;a++)d[a].fixed&&re(d[a].p,n.getNodeByIndex(a).getLayout());m((function(a,r,o){for(var s=0,l=a.length;s<l;s++)a[s].fixed||n.getNodeByIndex(s).setLayout(a[s].p),t[i.getId(s)]=a[s].p;for(s=0,l=r.length;s<l;s++){var u=r[s],c=n.getEdgeByIndex(s),h=u.n1.p,d=u.n2.p,p=c.getLayout();(p=p?p.slice():[])[0]=p[0]||[],p[1]=p[1]||[],re(p[0],h),re(p[1],d),+u.curveness&&(p[2]=[(h[0]+d[0])/2-(h[1]-d[1])*u.curveness,(h[1]+d[1])/2-(d[0]-h[0])*u.curveness]),c.setLayout(p)}e&&e(o)}))},e.forceLayout=g,e.preservedPoints=t,g.step()}else e.forceLayout=null}))})),rp("graphView",{create:function(e,t){var n=[];return e.eachSeriesByType("graph",(function(e){var i=e.get("coordinateSystem");if(!i||"view"===i){var a=e.getData(),r=[],o=[];Er(a.mapArray((function(e){var t=a.getItemModel(e);return[+t.get("x"),+t.get("y")]})),r,o),o[0]-r[0]==0&&(o[0]+=1,r[0]-=1),o[1]-r[1]==0&&(o[1]+=1,r[1]-=1);var s=(o[0]-r[0])/(o[1]-r[1]),l=function(e,t,n){var i=e.getBoxLayoutParams();return i.aspect=n,lu(i,{width:t.getWidth(),height:t.getHeight()})}(e,t,s);isNaN(s)&&(r=[l.x,l.y],o=[l.x+l.width,l.y+l.height]);var u=o[0]-r[0],c=o[1]-r[1],h=l.width,d=l.height,p=e.coordinateSystem=new Vy;p.zoomLimit=e.get("scaleLimit"),p.setBoundingRect(r[0],r[1],u,c),p.setViewRect(l.x,l.y,h,d),p.setCenter(e.get("center")),p.setZoom(e.get("zoom")),n.push(p)}})),n}}),Yc.extend({type:"series.gauge",getInitialData:function(e,t){return Tv(this,["value"])},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}});var xb=vo.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(e,t){var n=Math.cos,i=Math.sin,a=t.r,r=t.width,o=t.angle,s=t.x-n(o)*r*(a/3<=r?1:2),l=t.y-i(o)*r*(a/3<=r?1:2);o=t.angle-Math.PI/2,e.moveTo(s,l),e.lineTo(t.x+n(o)*r,t.y+i(o)*r),e.lineTo(t.x+n(t.angle)*a,t.y+i(t.angle)*a),e.lineTo(t.x-n(o)*r,t.y-i(o)*r),e.lineTo(s,l)}});function _b(e,t){return t&&("string"==typeof t?e=t.replace("{value}",null!=e?e:""):"function"==typeof t&&(e=t(e))),e}var bb=2*Math.PI,wb=(rh.extend({type:"gauge",render:function(e,t,n){this.group.removeAll();var i=e.get("axisLine.lineStyle.color"),a=function(e,t){var n=e.get("center"),i=t.getWidth(),a=t.getHeight(),r=Math.min(i,a);return{cx:wl(n[0],t.getWidth()),cy:wl(n[1],t.getHeight()),r:wl(e.get("radius"),r/2)}}(e,n);this._renderMain(e,t,n,i,a)},dispose:function(){},_renderMain:function(e,t,n,i,a){for(var r=this.group,o=e.getModel("axisLine"),s=o.getModel("lineStyle"),l=e.get("clockwise"),u=-e.get("startAngle")/180*Math.PI,c=((g=-e.get("endAngle")/180*Math.PI)-u)%bb,h=u,d=s.get("width"),p=o.get("show"),f=0;p&&f<i.length;f++){var g,m=Math.min(Math.max(i[f][0],0),1),v=new Bo({shape:{startAngle:h,endAngle:g=u+c*m,cx:a.cx,cy:a.cy,clockwise:l,r0:a.r-d,r:a.r},silent:!0});v.setStyle({fill:i[f][1]}),v.setStyle(s.getLineStyle(["color","borderWidth","borderColor"])),r.add(v),h=g}function y(e){if(e<=0)return i[0][1];for(var t=0;t<i.length;t++)if(i[t][0]>=e&&(0===t?0:i[t-1][0])<e)return i[t][1];return i[t-1][1]}if(!l){var x=u;u=g,g=x}this._renderTicks(e,t,n,y,a,u,g,l),this._renderPointer(e,t,n,y,a,u,g,l),this._renderTitle(e,t,n,y,a),this._renderDetail(e,t,n,y,a)},_renderTicks:function(e,t,n,i,a,r,o,s){for(var l=this.group,u=a.cx,c=a.cy,h=a.r,d=+e.get("min"),p=+e.get("max"),f=e.getModel("splitLine"),g=e.getModel("axisTick"),m=e.getModel("axisLabel"),v=e.get("splitNumber"),y=g.get("splitNumber"),x=wl(f.get("length"),h),_=wl(g.get("length"),h),b=r,w=(o-r)/v,S=w/y,M=f.getModel("lineStyle").getLineStyle(),T=g.getModel("lineStyle").getLineStyle(),C=0;C<=v;C++){var I=Math.cos(b),A=Math.sin(b);if(f.get("show")){var D=new Ko({shape:{x1:I*h+u,y1:A*h+c,x2:I*(h-x)+u,y2:A*(h-x)+c},style:M,silent:!0});"auto"===M.stroke&&D.setStyle({stroke:i(C/v)}),l.add(D)}if(m.get("show")){var k=_b(Sl(C/v*(p-d)+d),m.get("formatter")),L=m.get("distance"),E=i(C/v);l.add(new zo({style:$s({},m,{text:k,x:I*(h-x-L)+u,y:A*(h-x-L)+c,textVerticalAlign:A<-.4?"top":.4<A?"bottom":"middle",textAlign:I<-.4?"left":.4<I?"right":"center"},{autoColor:E}),silent:!0}))}if(g.get("show")&&C!==v){for(var P=0;P<=y;P++){I=Math.cos(b),A=Math.sin(b);var z=new Ko({shape:{x1:I*h+u,y1:A*h+c,x2:I*(h-_)+u,y2:A*(h-_)+c},silent:!0,style:T});"auto"===T.stroke&&z.setStyle({stroke:i((C+P/y)/v)}),l.add(z),b+=S}b-=S}else b+=w}},_renderPointer:function(e,t,n,i,a,r,o,s){var l=this.group,u=this._data;if(e.get("pointer.show")){var c=[+e.get("min"),+e.get("max")],h=[r,o],d=e.getData(),p=d.mapDimension("value");d.diff(u).add((function(t){var n=new xb({shape:{angle:r}});Qs(n,{shape:{angle:bl(d.get(p,t),c,h,!0)}},e),l.add(n),d.setItemGraphicEl(t,n)})).update((function(t,n){var i=u.getItemGraphicEl(n);Js(i,{shape:{angle:bl(d.get(p,t),c,h,!0)}},e),l.add(i),d.setItemGraphicEl(t,i)})).remove((function(e){var t=u.getItemGraphicEl(e);l.remove(t)})).execute(),d.eachItemGraphicEl((function(e,t){var n=d.getItemModel(t),r=n.getModel("pointer");e.setShape({x:a.cx,y:a.cy,width:wl(r.get("width"),a.r),r:wl(r.get("length"),a.r)}),e.useStyle(n.getModel("itemStyle").getItemStyle()),"auto"===e.style.fill&&e.setStyle("fill",i(bl(d.get(p,t),c,[0,1],!0))),Bs(e,n.getModel("emphasis.itemStyle").getItemStyle())})),this._data=d}else u&&u.eachItemGraphicEl((function(e){l.remove(e)}))},_renderTitle:function(e,t,n,i,a){var r=e.getData(),o=r.mapDimension("value"),s=e.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),u=a.cx+wl(l[0],a.r),c=a.cy+wl(l[1],a.r),h=+e.get("min"),d=+e.get("max"),p=i(bl(e.getData().get(o,0),[h,d],[0,1],!0));this.group.add(new zo({silent:!0,style:$s({},s,{x:u,y:c,text:r.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:p,forceRich:!0})}))}},_renderDetail:function(e,t,n,i,a){var r=e.getModel("detail"),o=+e.get("min"),s=+e.get("max");if(r.get("show")){var l=r.get("offsetCenter"),u=a.cx+wl(l[0],a.r),c=a.cy+wl(l[1],a.r),h=wl(r.get("width"),a.r),d=wl(r.get("height"),a.r),p=e.getData(),f=p.get(p.mapDimension("value"),0),g=i(bl(f,[o,s],[0,1],!0));this.group.add(new zo({silent:!0,style:$s({},r,{x:u,y:c,text:_b(f,r.get("formatter")),textWidth:isNaN(h)?null:h,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),dp({type:"series.funnel",init:function(e){wb.superApply(this,"init",arguments),this.legendVisualProvider=new Iv(E(this.getData,this),E(this.getRawData,this)),this._defaultLabelLine(e)},getInitialData:function(e,t){return Tv(this,{coordDimensions:["value"],encodeDefaulter:P(Bu,this)})},_defaultLabelLine:function(e){za(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},getDataParams:function(e){var t=this.getData(),n=wb.superCall(this,"getDataParams",e),i=t.mapDimension("value"),a=t.getSum(i);return n.percent=a?+(t.get(i,e)/a*100).toFixed(2):0,n.$vars.push("percent"),n},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}}));function Sb(e,t){An.call(this);var n=new Ho,i=new Fo,a=new zo;this.add(n),this.add(i),this.add(a),this.highDownOnUpdate=function(e,t){"emphasis"===t?(i.ignore=i.hoverIgnore,a.ignore=a.hoverIgnore):(i.ignore=i.normalIgnore,a.ignore=a.normalIgnore)},this.updateData(e,t,!0)}var Mb=Sb.prototype,Tb=["itemStyle","opacity"];function Cb(e,t,n,i,a){_g.call(this,e,t,n),this.type=i||"value",this.axisIndex=a}function Ib(e,t,n,i,a,r){e=e||0;var o=n[1]-n[0];if(null!=a&&(a=Db(a,[0,o])),null!=r&&(r=Math.max(r,null!=a?a:0)),"all"===i){var s=Math.abs(t[1]-t[0]);a=r=Db(s=Db(s,[0,o]),[a,r]),i=0}t[0]=Db(t[0],n),t[1]=Db(t[1],n);var l=Ab(t,i);t[i]+=e;var u=a||0,c=n.slice();l.sign<0?c[0]+=u:c[1]-=u,t[i]=Db(t[i],c);var h=Ab(t,i);return null!=a&&(h.sign!==l.sign||h.span<a)&&(t[1-i]=t[i]+l.sign*a),h=Ab(t,i),null!=r&&h.span>r&&(t[1-i]=t[i]+h.sign*r),t}function Ab(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:0<n?-1:n<0?1:t?-1:1}}function Db(e,t){return Math.min(null!=t[1]?t[1]:1/0,Math.max(null!=t[0]?t[0]:-1/0,e))}Mb.updateData=function(e,t,n){var i=this.childAt(0),a=e.hostModel,r=e.getItemModel(t),o=e.getItemLayout(t),s=e.getItemModel(t).get(Tb);s=null==s?1:s,i.useStyle({}),n?(i.setShape({points:o.points}),i.setStyle({opacity:0}),Qs(i,{style:{opacity:s}},a,t)):Js(i,{style:{opacity:s},shape:{points:o.points}},a,t);var l=r.getModel("itemStyle"),u=e.getItemVisual(t,"color");i.setStyle(_({lineJoin:"round",fill:u},l.getItemStyle(["opacity"]))),i.hoverStyle=l.getModel("emphasis").getItemStyle(),this._updateLabel(e,t),Bs(this)},Mb._updateLabel=function(e,t){var n=this.childAt(1),i=this.childAt(2),a=e.hostModel,r=e.getItemModel(t),o=e.getItemLayout(t).label,s=e.getItemVisual(t,"color");Js(n,{shape:{points:o.linePoints||o.linePoints}},a,t),Js(i,{style:{x:o.x,y:o.y}},a,t),i.attr({rotation:o.rotation,origin:[o.x,o.y],z2:10});var l=r.getModel("label"),u=r.getModel("emphasis.label"),c=r.getModel("labelLine"),h=r.getModel("emphasis.labelLine");s=e.getItemVisual(t,"color"),Hs(i.style,i.hoverStyle={},l,u,{labelFetcher:e.hostModel,labelDataIndex:t,defaultText:e.getName(t),autoColor:s,useInsideStyle:!!o.inside},{textAlign:o.textAlign,textVerticalAlign:o.verticalAlign}),i.ignore=i.normalIgnore=!l.get("show"),i.hoverIgnore=!u.get("show"),n.ignore=n.normalIgnore=!c.get("show"),n.hoverIgnore=!h.get("show"),n.setStyle({stroke:s}),n.setStyle(c.getModel("lineStyle").getLineStyle()),n.hoverStyle=h.getModel("lineStyle").getLineStyle()},M(Sb,An),rh.extend({type:"funnel",render:function(e,t,n){var i=e.getData(),a=this._data,r=this.group;i.diff(a).add((function(e){var t=new Sb(i,e);i.setItemGraphicEl(e,t),r.add(t)})).update((function(e,t){var n=a.getItemGraphicEl(t);n.updateData(i,e),r.add(n),i.setItemGraphicEl(e,n)})).remove((function(e){var t=a.getItemGraphicEl(e);r.remove(t)})).execute(),this._data=i},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}}),sp(zv("funnel")),op((function(e,t,n){e.eachSeriesByType("funnel",(function(e){var n=e.getData(),i=n.mapDimension("value"),a=e.get("sort"),r=function(e,t){return lu(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t),o=function(e,t){for(var n=e.mapDimension("value"),i=e.mapArray(n,(function(e){return e})),a=[],r="ascending"===t,o=0,s=e.count();o<s;o++)a[o]=o;return"function"==typeof t?a.sort(t):"none"!==t&&a.sort((function(e,t){return r?i[e]-i[t]:i[t]-i[e]})),a}(n,a),s=e.get("orient"),l=r.width,u=r.height,c=r.x,h=r.y,d="horizontal"===s?[wl(e.get("minSize"),u),wl(e.get("maxSize"),u)]:[wl(e.get("minSize"),l),wl(e.get("maxSize"),l)],p=n.getDataExtent(i),f=e.get("min"),g=e.get("max");function m(e,t){if("horizontal"===s){var a,r=bl(n.get(i,e)||0,[f,g],d,!0);switch(v){case"top":a=h;break;case"center":a=h+(u-r)/2;break;case"bottom":a=h+(u-r)}return[[t,a],[t,a+r]]}var o,p=bl(n.get(i,e)||0,[f,g],d,!0);switch(v){case"left":o=c;break;case"center":o=c+(l-p)/2;break;case"right":o=c+l-p}return[[o,t],[o+p,t]]}null==f&&(f=Math.min(p[0],0)),null==g&&(g=p[1]);var v=e.get("funnelAlign"),y=e.get("gap"),x=(("horizontal"===s?l:u)-y*(n.count()-1))/n.count();"ascending"===a&&(x=-x,y=-y,"horizontal"===s?c+=l:h+=u,o=o.reverse());for(var _=0;_<o.length;_++){var b=o[_],w=o[_+1],S=n.getItemModel(b);if("horizontal"===s){var M=S.get("itemStyle.width");null==M?M=x:(M=wl(M,l),"ascending"===a&&(M=-M));var T=m(b,c),C=m(w,c+M);c+=M+y,n.setItemLayout(b,{points:T.concat(C.slice().reverse())})}else{var I=S.get("itemStyle.height");null==I?I=x:(I=wl(I,u),"ascending"===a&&(I=-I)),T=m(b,"horizontal"===s?c:h),C=m(w,"horizontal"===s?c+M:h+I),h+=I+y,n.setItemLayout(b,{points:T.concat(C.slice().reverse())})}}!function(e){e.each((function(t){var n,i,a,r,o=e.getItemModel(t),s=o.getModel("label").get("position"),l=o.get("orient"),u=o.getModel("labelLine"),c=e.getItemLayout(t),h=c.points,d="inner"===s||"inside"===s||"center"===s||"insideLeft"===s||"insideRight"===s;if(d)n="insideLeft"===s?(i=(h[0][0]+h[3][0])/2+5,a=(h[0][1]+h[3][1])/2,"left"):"insideRight"===s?(i=(h[1][0]+h[2][0])/2-5,a=(h[1][1]+h[2][1])/2,"right"):(i=(h[0][0]+h[1][0]+h[2][0]+h[3][0])/4,a=(h[0][1]+h[1][1]+h[2][1]+h[3][1])/4,"center"),r=[[i,a],[i,a]];else{var p,f,g,m,v=u.get("length");n="left"===s?(p=(h[3][0]+h[0][0])/2,f=(h[3][1]+h[0][1])/2,i=(g=p-v)-5,"right"):"right"===s?(p=(h[1][0]+h[2][0])/2,f=(h[1][1]+h[2][1])/2,i=(g=p+v)+5,"left"):"top"===s?(p=(h[3][0]+h[0][0])/2,a=(m=(f=(h[3][1]+h[0][1])/2)-v)-5,"center"):"bottom"===s?(p=(h[1][0]+h[2][0])/2,a=(m=(f=(h[1][1]+h[2][1])/2)+v)+5,"center"):"rightTop"===s?(p="horizontal"===l?h[3][0]:h[1][0],f="horizontal"===l?h[3][1]:h[1][1],"horizontal"===l?(a=(m=f-v)-5,"center"):(i=(g=p+v)+5,"top")):"rightBottom"===s?(p=h[2][0],f=h[2][1],"horizontal"===l?(a=(m=f+v)+5,"center"):(i=(g=p+v)+5,"bottom")):"leftTop"===s?(p=h[0][0],f="horizontal"===l?h[0][1]:h[1][1],"horizontal"===l?(a=(m=f-v)-5,"center"):(i=(g=p-v)-5,"right")):"leftBottom"===s?(p="horizontal"===l?h[1][0]:h[3][0],f="horizontal"===l?h[1][1]:h[2][1],"horizontal"===l?(a=(m=f+v)+5,"center"):(i=(g=p-v)-5,"right")):(p=(h[1][0]+h[2][0])/2,f=(h[1][1]+h[2][1])/2,"horizontal"===l?(a=(m=f+v)+5,"center"):(i=(g=p+v)+5,"left")),"horizontal"===l?i=g=p:a=m=f,r=[[p,f],[g,m]]}c.label={linePoints:r,x:i,y:a,verticalAlign:"middle",textAlign:n,inside:d}}))}(n)}))})),ip(Gv("funnel")),Cb.prototype={constructor:Cb,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},M(Cb,_g);var kb=I,Lb=Math.min,Eb=Math.max,Pb=Math.floor,zb=Math.ceil,Ob=Sl,Nb=Math.PI;function Rb(e,t,n){this._axesMap=Q(),this._axesLayout={},this.dimensions=e.dimensions,this._rect,this._model=e,this._init(e,t,n)}function Bb(e,t){return Lb(Eb(e,t[0]),t[1])}Rb.prototype={type:"parallel",constructor:Rb,_init:function(e,t,n){var i=e.dimensions,a=e.parallelAxisIndex;kb(i,(function(e,n){var i=a[n],r=t.getComponent("parallelAxis",i),o=this._axesMap.set(e,new Cb(e,$f(r),[0,0],r.get("type"),i)),s="category"===o.type;o.onBand=s&&r.get("boundaryGap"),o.inverse=r.get("inverse"),(r.axis=o).model=r,o.coordinateSystem=r.coordinateSystem=this}),this)},update:function(e,t){this._updateAxesFromSeries(this._model,e)},containPoint:function(e){var t=this._makeLayoutInfo(),n=t.axisBase,i=t.layoutBase,a=t.pixelDimIndex,r=e[1-a],o=e[a];return n<=r&&r<=n+t.axisLength&&i<=o&&o<=i+t.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(e,t){t.eachSeries((function(n){if(e.contains(n,t)){var i=n.getData();kb(this.dimensions,(function(e){var t=this._axesMap.get(e);t.scale.unionExtentFromData(i,i.mapDimension(e)),Ff(t.scale,t.model)}),this)}}),this)},resize:function(e,t){this._rect=lu(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var e,t=this._model,n=this._rect,i=["x","y"],a=["width","height"],r=t.get("layout"),o="horizontal"===r?0:1,s=n[a[o]],l=[0,s],u=this.dimensions.length,c=Bb(t.get("axisExpandWidth"),l),h=Bb(t.get("axisExpandCount")||0,[0,u]),d=t.get("axisExpandable")&&3<u&&h<u&&1<h&&0<c&&0<s,p=t.get("axisExpandWindow");p?(e=Bb(p[1]-p[0],l),p[1]=p[0]+e):(e=Bb(c*(h-1),l),(p=[c*(t.get("axisExpandCenter")||Pb(u/2))-e/2])[1]=p[0]+e);var f=(s-e)/(u-h);f<3&&(f=0);var g=[Pb(Ob(p[0]/c,1))+1,zb(Ob(p[1]/c,1))-1],m=f/c*p[0];return{layout:r,pixelDimIndex:o,layoutBase:n[i[o]],layoutLength:s,axisBase:n[i[1-o]],axisLength:n[a[1-o]],axisExpandable:d,axisExpandWidth:c,axisCollapseWidth:f,axisExpandWindow:p,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:m}},_layoutAxes:function(){var e=this._rect,t=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),a=i.layout;t.each((function(e){var t=[0,i.axisLength],n=e.inverse?1:0;e.setExtent(t[n],t[1-n])})),kb(n,(function(t,n){var r=(i.axisExpandable?function(e,t){var n,i,a=t.layoutLength,r=t.axisExpandWidth,o=t.axisCount,s=t.axisCollapseWidth,l=t.winInnerIndices,u=s,c=!1;return e<l[0]?(n=e*s,i=s):e<=l[1]?(n=t.axisExpandWindow0Pos+e*r-t.axisExpandWindow[0],u=r,c=!0):(n=a-(o-1-e)*s,i=s),{position:n,axisNameAvailableWidth:u,axisLabelShow:c,nameTruncateMaxWidth:i}}:function(e,t){var n=t.layoutLength/(t.axisCount-1);return{position:n*e,axisNameAvailableWidth:n,axisLabelShow:!0}})(n,i),o={horizontal:{x:r.position,y:i.axisLength},vertical:{x:0,y:r.position}},s={horizontal:Nb/2,vertical:0},l=[o[a].x+e.x,o[a].y+e.y],u=s[a],c=at();ut(c,c,u),lt(c,c,l),this._axesLayout[t]={position:l,rotation:u,transform:c,axisNameAvailableWidth:r.axisNameAvailableWidth,axisLabelShow:r.axisLabelShow,nameTruncateMaxWidth:r.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},getAxis:function(e){return this._axesMap.get(e)},dataToPoint:function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},eachActiveState:function(e,t,n,i){null==n&&(n=0),null==i&&(i=e.count());var a=this._axesMap,r=this.dimensions,o=[],s=[];I(r,(function(t){o.push(e.mapDimension(t)),s.push(a.get(t).model)}));for(var l=this.hasAxisBrushed(),u=n;u<i;u++){var c;if(l){c="active";for(var h=e.getValues(o,u),d=0,p=r.length;d<p;d++)if("inactive"===s[d].getActiveState(h[d])){c="inactive";break}}else c="normal";t(c,u)}},hasAxisBrushed:function(){for(var e=this.dimensions,t=this._axesMap,n=!1,i=0,a=e.length;i<a;i++)"normal"!==t.get(e[i]).model.getActiveState()&&(n=!0);return n},axisCoordToPoint:function(e,t){return tl([e,0],this._axesLayout[t].transform)},getAxisLayout:function(e){return m(this._axesLayout[e])},getSlidedAxisExpandWindow:function(e){var t=this._makeLayoutInfo(),n=t.pixelDimIndex,i=t.axisExpandWindow.slice(),a=i[1]-i[0],r=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:i};var o,s=e[n]-t.layoutBase-t.axisExpandWindow0Pos,l="slide",u=t.axisCollapseWidth,c=this._model.get("axisExpandSlideTriggerArea"),h=null!=c[0];return u?(h&&u&&s<a*c[0]?(l="jump",o=s-a*c[2]):h&&u&&s>a*(1-c[0])?(l="jump",o=s-a*(1-c[2])):0<=(o=s-a*c[1])&&(o=s-a*(1-c[1]))<=0&&(o=0),(o*=t.axisExpandWidth/u)?Ib(o,i,r,"all"):l="none"):(a=i[1]-i[0],(i=[Eb(0,r[1]*s/a-a/2)])[1]=Lb(r[1],i[0]+a),i[0]=i[1]-a),{axisExpandWindow:i,behavior:l}}},ju.register("parallel",{create:function(e,t){var n=[];return e.eachComponent("parallel",(function(i,a){var r=new Rb(i,e,t);r.name="parallel_"+a,r.resize(i,t),(i.coordinateSystem=r).model=i,n.push(r)})),e.eachSeries((function(t){if("parallel"===t.get("coordinateSystem")){var n=e.queryComponents({mainType:"parallel",index:t.get("parallelIndex"),id:t.get("parallelId")})[0];t.coordinateSystem=n.coordinateSystem}})),n}});var Vb=vu.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return ir([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(e){var t=this.activeIntervals=m(e);if(t)for(var n=t.length-1;0<=n;n--)Ml(t[n])},getActiveState:function(e){var t=this.activeIntervals;if(!t.length)return"normal";if(null==e||isNaN(e))return"inactive";if(1===t.length){var n=t[0];if(n[0]<=e&&e<=n[1])return"active"}else for(var i=0,a=t.length;i<a;i++)if(t[i][0]<=e&&e<=t[i][1])return"active";return"inactive"}});v(Vb.prototype,Zf),xm("parallel",Vb,(function(e,t){return t.type||(t.data?"category":"value")}),{type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10}),vu.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},init:function(){vu.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(e){var t=this.option;e&&v(t,e,!0),this._initDimensions()},contains:function(e,t){var n=e.get("parallelIndex");return null!=n&&t.getComponent("parallel",n)===this},setAxisExpand:function(e){I(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])}),this)},_initDimensions:function(){var e=this.dimensions=[],t=this.parallelAxisIndex=[];I(k(this.dependentModels.parallelAxis,(function(e){return(e.get("parallelIndex")||0)===this.componentIndex}),this),(function(n){e.push("dim"+n.get("dim")),t.push(n.componentIndex)}))}}),ap({type:"axisAreaSelect",event:"axisAreaSelected"},(function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},(function(t){t.axis.model.setActiveIntervals(e.intervals)}))})),ap("parallelAxisExpand",(function(e,t){t.eachComponent({mainType:"parallel",query:e},(function(t){t.setAxisExpand(e)}))}));var Gb=P,Wb=I,Hb=A,Fb=Math.min,$b=Math.max,Xb=Math.pow,Yb="globalPan",Ub={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},jb={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},Zb={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},qb=0;function Kb(e){De.call(this),this._zr=e,this.group=new An,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+qb++,this._handlers={},Wb(Sw,(function(e,t){this._handlers[t]=E(e,this)}),this)}function Jb(e,t){var n=Tw[t.brushType].createCover(e,t);return n.__brushOption=t,tw(n,t),e.group.add(n),n}function Qb(e,t){var n=iw(t);return n.endCreating&&(n.endCreating(e,t),tw(t,t.__brushOption)),t}function ew(e,t){var n=t.__brushOption;iw(t).updateCoverShape(e,t,n.range,n)}function tw(e,t){var n=t.z;null==n&&(n=1e4),e.traverse((function(e){e.z=n,e.z2=n}))}function nw(e,t){iw(t).updateCommon(e,t),ew(e,t)}function iw(e){return Tw[e.__brushOption.brushType]}function aw(e,t,n){var i,a=e._panels;if(!a)return!0;var r=e._transform;return Wb(a,(function(e){e.isTargetByCursor(t,n,r)&&(i=e)})),i}function rw(e,t){var n=e._panels;if(!n)return!0;var i=t.__brushOption.panelId;return null==i||n[i]}function ow(e){var t=e._covers,n=t.length;return Wb(t,(function(t){e.group.remove(t)}),e),t.length=0,!!n}function sw(e,t){var n=Hb(e._covers,(function(e){var t=e.__brushOption,n=m(t.range);return{brushType:t.brushType,panelId:t.panelId,range:n}}));e.trigger("brush",n,{isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function lw(e){var t=e.length-1;return t<0&&(t=0),[e[0],e[t]]}function uw(e,t,n,i){var a=new An;return a.add(new Zo({name:"main",style:pw(n),silent:!0,draggable:!0,cursor:"move",drift:Gb(e,t,a,"nswe"),ondragend:Gb(sw,t,{isEnd:!0})})),Wb(i,(function(n){a.add(new Zo({name:n,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Gb(e,t,a,n),ondragend:Gb(sw,t,{isEnd:!0})}))})),a}function cw(e,t,n,i){var a=i.brushStyle.lineWidth||0,r=$b(a,6),o=n[0][0],s=n[1][0],l=o-a/2,u=s-a/2,c=n[0][1],h=n[1][1],d=c-r+a/2,p=h-r+a/2,f=c-o,g=h-s,m=f+a,v=g+a;dw(e,t,"main",o,s,f,g),i.transformable&&(dw(e,t,"w",l,u,r,v),dw(e,t,"e",d,u,r,v),dw(e,t,"n",l,u,m,r),dw(e,t,"s",l,p,m,r),dw(e,t,"nw",l,u,r,r),dw(e,t,"ne",d,u,r,r),dw(e,t,"sw",l,p,r,r),dw(e,t,"se",d,p,r,r))}function hw(e,t){var n=t.__brushOption,i=n.transformable,a=t.childAt(0);a.useStyle(pw(n)),a.attr({silent:!i,cursor:i?"move":"default"}),Wb(["w","e","n","s","se","sw","ne","nw"],(function(n){var a=t.childOfName(n),r=function e(t,n){if(1<n.length)return"e"!==(i=[e(t,(n=n.split(""))[0]),e(t,n[1])])[0]&&"w"!==i[0]||i.reverse(),i.join("");var i;return{left:"w",right:"e",top:"n",bottom:"s"}[i=nl({w:"left",e:"right",n:"top",s:"bottom"}[n],el(t.group))]}(e,n);a&&a.attr({silent:!i,invisible:!i,cursor:i?jb[r]+"-resize":null})}))}function dw(e,t,n,i,a,r,o){var s=t.childOfName(n);s&&s.setShape(function(e){var t=Fb(e[0][0],e[1][0]),n=Fb(e[0][1],e[1][1]);return{x:t,y:n,width:$b(e[0][0],e[1][0])-t,height:$b(e[0][1],e[1][1])-n}}(yw(e,t,[[i,a],[i+r,a+o]])))}function pw(e){return _({strokeNoScale:!0},e.brushStyle)}function fw(e,t,n,i){var a=[Fb(e,n),Fb(t,i)],r=[$b(e,n),$b(t,i)];return[[a[0],r[0]],[a[1],r[1]]]}function gw(e,t,n,i,a,r,o,s){var l=i.__brushOption,u=e(l.range),c=vw(n,r,o);Wb(a.split(""),(function(e){var t=Ub[e];u[t[0]][t[1]]+=c[t[0]]})),l.range=t(fw(u[0][0],u[1][0],u[0][1],u[1][1])),nw(n,i),sw(n,{isEnd:!1})}function mw(e,t,n,i,a){var r=t.__brushOption.range,o=vw(e,n,i);Wb(r,(function(e){e[0]+=o[0],e[1]+=o[1]})),nw(e,t),sw(e,{isEnd:!1})}function vw(e,t,n){var i=e.group,a=i.transformCoordToLocal(t,n),r=i.transformCoordToLocal(0,0);return[a[0]-r[0],a[1]-r[1]]}function yw(e,t,n){var i=rw(e,t);return i&&!0!==i?i.clipPath(n,e._transform):m(n)}function xw(e){var t=e.event;t.preventDefault&&t.preventDefault()}function _w(e,t,n){return e.childOfName("main").contain(t,n)}function bw(e,t,n,i){var a,r=e._creatingCover,o=e._creatingPanel,s=e._brushOption;if(e._track.push(n.slice()),function(e){var t=e._track;if(!t.length)return!1;var n=t[t.length-1],i=t[0],a=n[0]-i[0],r=n[1]-i[1];return 6<Xb(a*a+r*r,.5)}(e)||r){if(o&&!r){"single"===s.brushMode&&ow(e);var l=m(s);l.brushType=ww(l.brushType,o),l.panelId=!0===o?null:o.panelId,r=e._creatingCover=Jb(e,l),e._covers.push(r)}if(r){var u=Tw[ww(e._brushType,o)];r.__brushOption.range=u.getCreatingRange(yw(e,r,e._track)),i&&(Qb(e,r),u.updateCommon(e,r)),ew(e,r),a={isEnd:i}}}else i&&"single"===s.brushMode&&s.removeOnClick&&aw(e,t,n)&&ow(e)&&(a={isEnd:i,removeOnClick:!0});return a}function ww(e,t){return"auto"===e?t.defaultBrushType:e}Kb.prototype={constructor:Kb,enableBrush:function(e){return this._brushType&&function(e){var t=e._zr;(function(e,t,n){var i=gy(e);i[t]===n&&(i[t]=null)})(t,Yb,e._uid),function(e,t){Wb(t,(function(t,n){e.off(n,t)}))}(t,e._handlers),e._brushType=e._brushOption=null}(this),e.brushType&&function(e,t){var n=e._zr;e._enableGlobalPan||function(e,t,n){gy(e).globalPan=n}(n,0,e._uid),function(e,t){Wb(t,(function(t,n){e.on(n,t)}))}(n,e._handlers),e._brushType=t.brushType,e._brushOption=v(m(Zb),t,!0)}(this,e),this},setPanels:function(e){if(e&&e.length){var t=this._panels={};I(e,(function(e){t[e.panelId]=m(e)}))}else this._panels=null;return this},mount:function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var t=this.group;return this._zr.add(t),t.attr({position:e.position||[0,0],rotation:e.rotation||0,scale:e.scale||[1,1]}),this._transform=t.getLocalTransform(),this},eachCover:function(e,t){Wb(this._covers,e,t)},updateCovers:function(e){e=A(e,(function(e){return v(m(Zb),e,!0)}));var t=this._covers,n=this._covers=[],i=this,a=this._creatingCover;return new gp(t,e,(function(e,t){return r(e.__brushOption,t)}),r).add(o).update(o).remove((function(e){t[e]!==a&&i.group.remove(t[e])})).execute(),this;function r(e,t){return(null!=e.id?e.id:"\0-brush-index-"+t)+"-"+e.brushType}function o(r,o){var s=e[r];if(null!=o&&t[o]===a)n[r]=t[o];else{var l=n[r]=null!=o?(t[o].__brushOption=s,t[o]):Qb(i,Jb(i,s));nw(i,l)}}},unmount:function(){return this.enableBrush(!1),ow(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},T(Kb,De);var Sw={mousedown:function(e){if(this._dragging)Mw(this,e);else if(!e.target||!e.target.draggable){xw(e);var t=this.group.transformCoordToLocal(e.offsetX,e.offsetY);this._creatingCover=null,(this._creatingPanel=aw(this,e,t))&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(e){var t=e.offsetX,n=e.offsetY,i=this.group.transformCoordToLocal(t,n);if(function(e,t,n){if(e._brushType&&!function(e,t,n){var i=e._zr;return t<0||t>i.getWidth()||n>i.getHeight()}(e,t)){var i=e._zr,a=e._covers,r=aw(e,t,n);if(!e._dragging)for(var o=0;o<a.length;o++){var s=a[o].__brushOption;if(r&&(!0===r||s.panelId===r.panelId)&&Tw[s.brushType].contain(a[o],n[0],n[1]))return}r&&i.setCursorStyle("crosshair")}}(this,e,i),this._dragging){xw(e);var a=bw(this,e,i,!1);a&&sw(this,a)}},mouseup:function(e){Mw(this,e)}};function Mw(e,t){if(e._dragging){xw(t);var n=t.offsetX,i=t.offsetY,a=e.group.transformCoordToLocal(n,i),r=bw(e,t,a,!0);e._dragging=!1,e._track=[],e._creatingCover=null,r&&sw(e,r)}}var Tw={lineX:Cw(0),lineY:Cw(1),rect:{createCover:function(e,t){return uw(Gb(gw,(function(e){return e}),(function(e){return e})),e,t,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(e){var t=lw(e);return fw(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(e,t,n,i){cw(e,t,n,i)},updateCommon:hw,contain:_w},polygon:{createCover:function(e,t){var n=new An;return n.add(new Fo({name:"main",style:pw(t),silent:!0})),n},getCreatingRange:function(e){return e},endCreating:function(e,t){t.remove(t.childAt(0)),t.add(new Ho({name:"main",draggable:!0,drift:Gb(mw,e,t),ondragend:Gb(sw,e,{isEnd:!0})}))},updateCoverShape:function(e,t,n,i){t.childAt(0).setShape({points:yw(e,t,n)})},updateCommon:hw,contain:_w}};function Cw(e){return{createCover:function(t,n){return uw(Gb(gw,(function(t){var n=[t,[0,100]];return e&&n.reverse(),n}),(function(t){return t[e]})),t,n,[["w","e"],["n","s"]][e])},getCreatingRange:function(t){var n=lw(t);return[Fb(n[0][e],n[1][e]),$b(n[0][e],n[1][e])]},updateCoverShape:function(t,n,i,a){var r,o=rw(t,n);if(!0!==o&&o.getLinearBrushOtherExtent)r=o.getLinearBrushOtherExtent(e,t._transform);else{var s=t._zr;r=[0,[s.getWidth(),s.getHeight()][1-e]]}var l=[i,r];e&&l.reverse(),cw(t,n,l,a)},updateCommon:hw,contain:_w}}function Iw(e){return e=kw(e),function(t,n){return al(t,e)}}function Aw(e,t){return e=kw(e),function(n){var i=null!=t?t:n,a=i?e.width:e.height,r=i?e.x:e.y;return[r,r+(a||0)]}}function Dw(e,t,n){return e=kw(e),function(i,a,r){return e.contain(a[0],a[1])&&!Ay(i,t,n)}}function kw(e){return In.create(e)}var Lw=["axisLine","axisTickLabel","axisName"],Ew=hp({type:"parallelAxis",init:function(e,t){Ew.superApply(this,"init",arguments),(this._brushController=new Kb(t.getZr())).on("brush",E(this._onBrush,this))},render:function(e,t,n,i){if(!function(e,t,n){return n&&"axisAreaSelect"===n.type&&t.findComponents({mainType:"parallelAxis",query:n})[0]===e}(e,t,i)){this.axisModel=e,this.api=n,this.group.removeAll();var a=this._axisGroup;if(this._axisGroup=new An,this.group.add(this._axisGroup),e.get("show")){var r=function(e,t){return t.getComponent("parallel",e.get("parallelIndex"))}(e,t),o=r.coordinateSystem,s=e.getAreaSelectStyle(),l=s.width,u=e.axis.dim,c=x({strokeContainThreshold:l},o.getAxisLayout(u)),h=new Em(e,c);I(Lw,h.add,h),this._axisGroup.add(h.getGroup()),this._refreshBrushController(c,s,e,r,l,n);var d=i&&!1===i.animation?null:e;il(a,this._axisGroup,d)}}},_refreshBrushController:function(e,t,n,i,a,r){var o=n.axis.getExtent(),s=o[1]-o[0],l=Math.min(30,.1*Math.abs(s)),u=In.create({x:o[0],y:-a/2,width:s,height:a});u.x-=l,u.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,position:e.position}).setPanels([{panelId:"pl",clipPath:Iw(u),isTargetByCursor:Dw(u,r,i),getLinearBrushOtherExtent:Aw(u,0)}]).enableBrush({brushType:"lineX",brushStyle:t,removeOnClick:!0}).updateCovers(function(e){var t=e.axis;return A(e.activeIntervals,(function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}}))}(n))},_onBrush:function(e,t){var n=this.axisModel,i=n.axis,a=A(e,(function(e){return[i.coordToData(e.range[0],!0),i.coordToData(e.range[1],!0)]}));!n.option.realtime!==t.isEnd&&!t.removeOnClick||this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:a})},dispose:function(){this._brushController.dispose()}});hp({type:"parallel",render:function(e,t,n){this._model=e,this._api=n,this._handlers||(this._handlers={},I(Pw,(function(e,t){n.getZr().on(t,this._handlers[t]=E(e,this))}),this)),mh(this,"_throttledDispatchExpand",e.get("axisExpandRate"),"fixRate")},dispose:function(e,t){I(this._handlers,(function(e,n){t.getZr().off(n,e)})),this._handlers=null},_throttledDispatchExpand:function(e){this._dispatchExpand(e)},_dispatchExpand:function(e){e&&this._api.dispatchAction(x({type:"parallelAxisExpand"},e))}});var Pw={mousedown:function(e){zw(this,"click")&&(this._mouseDownPoint=[e.offsetX,e.offsetY])},mouseup:function(e){var t=this._mouseDownPoint;if(zw(this,"click")&&t){var n=[e.offsetX,e.offsetY];if(5<Math.pow(t[0]-n[0],2)+Math.pow(t[1]-n[1],2))return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(e){if(!this._mouseDownPoint&&zw(this,"mousemove")){var t=this._model,n=t.coordinateSystem.getSlidedAxisExpandWindow([e.offsetX,e.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i&&null})}}};function zw(e,t){var n=e._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===t}function Ow(e,t,n,i){for(var a,r=[],o=0;o<n.length;o++){var s=n[o],l=e.get(e.mapDimension(s),t);a=l,("category"===i.getAxis(s).type?null==a:null==a||isNaN(a))||r.push(i.dataToPoint(l,s))}return r}function Nw(e,t,n,i,a){var r=Ow(e,n,i,a),o=new Fo({shape:{points:r},silent:!0,z2:10});return t.add(o),e.setItemGraphicEl(n,o),o}function Rw(e){var t=e.get("smooth",!0);return!0===t&&(t=.3),{lineStyle:e.getModel("lineStyle").getLineStyle(),smooth:null!=t?t:.3}}function Bw(e,t,n,i){var a=i.lineStyle;t.hasItemOption&&(a=t.getItemModel(n).getModel("lineStyle").getLineStyle()),e.useStyle(a);var r=e.style;r.fill=null,r.stroke=t.getItemVisual(n,"color"),r.opacity=t.getItemVisual(n,"opacity"),i.smooth&&(e.shape.smooth=i.smooth)}np((function(e){!function(e){if(!e.parallel){var t=!1;I(e.series,(function(e){e&&"parallel"===e.type&&(t=!0)})),t&&(e.parallel=[{}])}}(e),function(e){I(Pa(e.parallelAxis),(function(t){if(R(t)){var n=t.parallelIndex||0,i=Pa(e.parallel)[n];i&&i.parallelAxisDefault&&v(t,i.parallelAxisDefault,!1)}}))}(e)})),Yc.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(e,t){var n=this.getSource();return function(e,t){if(!e.encodeDefine){var n=t.ecModel.getComponent("parallel",t.get("parallelIndex"));if(n){var i=e.encodeDefine=Q();I(n.dimensions,(function(e){var t=function(e){return+e.replace("dim","")}(e);i.set(e,t)}))}}}(n,this),Jp(n,this)},getRawIndicesByActiveState:function(e){var t=this.coordinateSystem,n=this.getData(),i=[];return t.eachActiveState(n,(function(t,a){e===t&&i.push(n.getRawIndex(a))})),i},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"}}),rh.extend({type:"parallel",init:function(){this._dataGroup=new An,this.group.add(this._dataGroup),this._data,this._initialized},render:function(e,t,n,i){var a=this._dataGroup,r=e.getData(),o=this._data,s=e.coordinateSystem,l=s.dimensions,u=Rw(e);if(r.diff(o).add((function(e){Bw(Nw(r,a,e,l,s),r,e,u)})).update((function(t,n){var a=o.getItemGraphicEl(n),c=Ow(r,t,l,s);r.setItemGraphicEl(t,a),Js(a,{shape:{points:c}},i&&!1===i.animation?null:e,t),Bw(a,r,t,u)})).remove((function(e){var t=o.getItemGraphicEl(e);a.remove(t)})).execute(),!this._initialized){this._initialized=!0;var c=function(e,t,n){var i=e.model,a=e.getRect(),r=new Zo({shape:{x:a.x,y:a.y,width:a.width,height:a.height}}),o="horizontal"===i.get("layout")?"width":"height";return r.setShape(o,0),Qs(r,{shape:{width:a.width,height:a.height}},t,n),r}(s,e,(function(){setTimeout((function(){a.removeClipPath()}))}));a.setClipPath(c)}this._data=r},incrementalPrepareRender:function(e,t,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(e,t,n){for(var i=t.getData(),a=t.coordinateSystem,r=a.dimensions,o=Rw(t),s=e.start;s<e.end;s++){var l=Nw(i,this._dataGroup,s,r,a);l.incremental=!0,Bw(l,i,s,o)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}});var Vw=["lineStyle","normal","opacity"];sp({seriesType:"parallel",reset:function(e,t,n){var i=e.getModel("itemStyle"),a=e.getModel("lineStyle"),r=t.get("color"),o=a.get("color")||i.get("color")||r[e.seriesIndex%r.length],s=e.get("inactiveOpacity"),l=e.get("activeOpacity"),u=e.getModel("lineStyle").getLineStyle(),c=e.coordinateSystem,h=e.getData(),d={normal:u.opacity,active:l,inactive:s};return h.setVisual("color",o),{progress:function(e,t){c.eachActiveState(t,(function(e,n){var i=d[e];if("normal"===e&&t.hasItemOption){var a=t.getItemModel(n).get(Vw,!0);null!=a&&(i=a)}t.setItemVisual(n,"opacity",i)}),e.start,e.end)}}}});var Gw=Yc.extend({type:"series.sankey",layoutInfo:null,levelModels:null,getInitialData:function(e,t){for(var n=e.edges||e.links,i=e.data||e.nodes,a=e.levels,r=this.levelModels={},o=0;o<a.length;o++)null!=a[o].depth&&0<=a[o].depth&&(r[a[o].depth]=new ml(a[o],this,t));if(i&&n)return T_(i,n,this,!0,(function(e,t){e.wrapMethod("getItemModel",(function(e,t){return e.customizeGetParent((function(e){var n=this.parentModel,i=n.getData().getItemLayout(t).depth;return n.levelModels[i]||this.parentModel})),e})),t.wrapMethod("getItemModel",(function(e,t){return e.customizeGetParent((function(e){var n=this.parentModel,i=n.getGraph().getEdgeByIndex(t).node1.getLayout().depth;return n.levelModels[i]||this.parentModel})),e}))})).data},setNodePosition:function(e,t){var n=this.option.data[e];n.localX=t[0],n.localY=t[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(e,t,n){if("edge"===n){var i=this.getDataParams(e,n),a=i.data,r=a.source+" -- "+a.target;return i.value&&(r+=" : "+i.value),Xl(r)}if("node"!==n)return Gw.superCall(this,"formatTooltip",e,t);var o=this.getGraph().getNodeByIndex(e).getLayout().value,s=this.getDataParams(e,n).data.name;return o&&(r=s+" : "+o),Xl(r)},optionUpdated:function(){var e=this.option;!0===e.focusNodeAdjacency&&(e.focusNodeAdjacency="allEdges")},getDataParams:function(e,t){var n=Gw.superCall(this,"getDataParams",e,t);if(null==n.value&&"node"===t){var i=this.getGraph().getNodeByIndex(e).getLayout().value;n.value=i}return n},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},levels:[],nodeAlign:"justify",itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},animationEasing:"linear",animationDuration:1e3}}),Ww=["itemStyle","opacity"],Hw=["emphasis","itemStyle","opacity"],Fw=["lineStyle","opacity"],$w=["emphasis","lineStyle","opacity"];function Xw(e,t){return e.getVisual("opacity")||e.getModel().get(t)}function Yw(e,t,n){var i=e.getGraphicEl(),a=Xw(e,t);null!=n&&(null==a&&(a=1),a*=n),i.downplay&&i.downplay(),i.traverse((function(e){"group"!==e.type&&e.setStyle("opacity",a)}))}function Uw(e,t){var n=Xw(e,t),i=e.getGraphicEl();i.traverse((function(e){"group"!==e.type&&e.setStyle("opacity",n)})),i.highlight&&i.highlight()}var jw=ms({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(e,t){var n=t.extent;e.moveTo(t.x1,t.y1),e.bezierCurveTo(t.cpx1,t.cpy1,t.cpx2,t.cpy2,t.x2,t.y2),"vertical"===t.orient?(e.lineTo(t.x2+n,t.y2),e.bezierCurveTo(t.cpx2+n,t.cpy2,t.cpx1+n,t.cpy1,t.x1+n,t.y1)):(e.lineTo(t.x2,t.y2+n),e.bezierCurveTo(t.cpx2,t.cpy2+n,t.cpx1,t.cpy1+n,t.x1,t.y1+n)),e.closePath()},highlight:function(){this.trigger("emphasis")},downplay:function(){this.trigger("normal")}});function Zw(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return null!=t.depth&&0<=t.depth}function qw(e,t,n,i,a){var r="vertical"===a?"x":"y";I(e,(function(e){var o,s,l;e.sort((function(e,t){return e.getLayout()[r]-t.getLayout()[r]}));for(var u=0,c=e.length,h="vertical"===a?"dx":"dy",d=0;d<c;d++)0<(l=u-(s=e[d]).getLayout()[r])&&(o=s.getLayout()[r]+l,"vertical"===a?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),u=s.getLayout()[r]+s.getLayout()[h]+t;if(0<(l=u-t-("vertical"===a?i:n)))for(o=s.getLayout()[r]-l,"vertical"===a?s.setLayout({x:o},!0):s.setLayout({y:o},!0),u=o,d=c-2;0<=d;--d)0<(l=(s=e[d]).getLayout()[r]+s.getLayout()[h]+t-u)&&(o=s.getLayout()[r]-l,"vertical"===a?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),u=s.getLayout()[r]}))}function Kw(e,t,n){I(e.slice().reverse(),(function(e){I(e,(function(e){if(e.outEdges.length){var i=aS(e.outEdges,Jw,n)/aS(e.outEdges,iS,n);if(isNaN(i)){var a=e.outEdges.length;i=a?aS(e.outEdges,Qw,n)/a:0}if("vertical"===n){var r=e.getLayout().x+(i-nS(e,n))*t;e.setLayout({x:r},!0)}else{var o=e.getLayout().y+(i-nS(e,n))*t;e.setLayout({y:o},!0)}}}))}))}function Jw(e,t){return nS(e.node2,t)*e.getValue()}function Qw(e,t){return nS(e.node2,t)}function eS(e,t){return nS(e.node1,t)*e.getValue()}function tS(e,t){return nS(e.node1,t)}function nS(e,t){return"vertical"===t?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function iS(e){return e.getValue()}function aS(e,t,n){for(var i=0,a=e.length,r=-1;++r<a;){var o=+t.call(e,e[r],n);isNaN(o)||(i+=o)}return i}function rS(e,t,n){I(e,(function(e){I(e,(function(e){if(e.inEdges.length){var i=aS(e.inEdges,eS,n)/aS(e.inEdges,iS,n);if(isNaN(i)){var a=e.inEdges.length;i=a?aS(e.inEdges,tS,n)/a:0}if("vertical"===n){var r=e.getLayout().x+(i-nS(e,n))*t;e.setLayout({x:r},!0)}else{var o=e.getLayout().y+(i-nS(e,n))*t;e.setLayout({y:o},!0)}}}))}))}pp({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(e,t,n){var i=this,a=e.getGraph(),r=this.group,o=e.layoutInfo,s=o.width,l=o.height,u=e.getData(),c=e.getData("edge"),h=e.get("orient");this._model=e,r.removeAll(),r.attr("position",[o.x,o.y]),a.eachEdge((function(t){var n=new jw;n.dataIndex=t.dataIndex,n.seriesIndex=e.seriesIndex,n.dataType="edge";var i,a,o,u,d,p,f,g,m=t.getModel("lineStyle"),v=m.get("curveness"),y=t.node1.getLayout(),x=t.node1.getModel(),_=x.get("localX"),b=x.get("localY"),w=t.node2.getLayout(),S=t.node2.getModel(),M=S.get("localX"),T=S.get("localY"),C=t.getLayout();switch(n.shape.extent=Math.max(1,C.dy),g="vertical"===(n.shape.orient=h)?(i=(null!=_?_*s:y.x)+C.sy,a=(null!=b?b*l:y.y)+y.dy,o=(null!=M?M*s:w.x)+C.ty,d=i,p=a*(1-v)+(u=null!=T?T*l:w.y)*v,f=o,a*v+u*(1-v)):(i=(null!=_?_*s:y.x)+y.dx,a=(null!=b?b*l:y.y)+C.sy,d=i*(1-v)+(o=null!=M?M*s:w.x)*v,p=a,f=i*v+o*(1-v),u=(null!=T?T*l:w.y)+C.ty),n.setShape({x1:i,y1:a,x2:o,y2:u,cpx1:d,cpy1:p,cpx2:f,cpy2:g}),n.setStyle(m.getItemStyle()),n.style.fill){case"source":n.style.fill=t.node1.getVisual("color");break;case"target":n.style.fill=t.node2.getVisual("color")}Bs(n,t.getModel("emphasis.lineStyle").getItemStyle()),r.add(n),c.setItemGraphicEl(t.dataIndex,n)})),a.eachNode((function(t){var n=t.getLayout(),i=t.getModel(),a=i.get("localX"),o=i.get("localY"),c=i.getModel("label"),h=i.getModel("emphasis.label"),d=new Zo({shape:{x:null!=a?a*s:n.x,y:null!=o?o*l:n.y,width:n.dx,height:n.dy},style:i.getModel("itemStyle").getItemStyle()}),p=t.getModel("emphasis.itemStyle").getItemStyle();Hs(d.style,p,c,h,{labelFetcher:e,labelDataIndex:t.dataIndex,defaultText:t.id,isRectText:!0}),d.setStyle("fill",t.getVisual("color")),Bs(d,p),r.add(d),u.setItemGraphicEl(t.dataIndex,d),d.dataType="node"})),u.eachItemGraphicEl((function(t,a){var r=u.getItemModel(a);r.get("draggable")&&(t.drift=function(t,r){i._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=r,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:u.getRawIndex(a),localX:this.shape.x/s,localY:this.shape.y/l})},t.ondragend=function(){i._focusAdjacencyDisabled=!1},t.draggable=!0,t.cursor="move"),t.highlight=function(){this.trigger("emphasis")},t.downplay=function(){this.trigger("normal")},t.focusNodeAdjHandler&&t.off("mouseover",t.focusNodeAdjHandler),t.unfocusNodeAdjHandler&&t.off("mouseout",t.unfocusNodeAdjHandler),r.get("focusNodeAdjacency")&&(t.on("mouseover",t.focusNodeAdjHandler=function(){i._focusAdjacencyDisabled||(i._clearTimer(),n.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,dataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){i._focusAdjacencyDisabled||i._dispatchUnfocus(n)}))})),c.eachItemGraphicEl((function(t,a){var r=c.getItemModel(a);t.focusNodeAdjHandler&&t.off("mouseover",t.focusNodeAdjHandler),t.unfocusNodeAdjHandler&&t.off("mouseout",t.unfocusNodeAdjHandler),r.get("focusNodeAdjacency")&&(t.on("mouseover",t.focusNodeAdjHandler=function(){i._focusAdjacencyDisabled||(i._clearTimer(),n.dispatchAction({type:"focusNodeAdjacency",seriesId:e.id,edgeDataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){i._focusAdjacencyDisabled||i._dispatchUnfocus(n)}))})),!this._data&&e.get("animation")&&r.setClipPath(function(e,t,n){var i=new Zo({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Qs(i,{shape:{width:e.width+20}},t,(function(){r.removeClipPath()})),i}(r.getBoundingRect(),e)),this._data=e.getData()},dispose:function(){this._clearTimer()},_dispatchUnfocus:function(e){var t=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout((function(){t._unfocusDelayTimer=null,e.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t._model.id})}),500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(e,t,n,i){var a=e.getData(),r=a.graph,o=i.dataIndex,s=a.getItemModel(o),l=i.edgeDataIndex;if(null!=o||null!=l){var u=r.getNodeByIndex(o),c=r.getEdgeByIndex(l);if(r.eachNode((function(e){Yw(e,Ww,.1)})),r.eachEdge((function(e){Yw(e,Fw,.1)})),u){Uw(u,Hw);var h=s.get("focusNodeAdjacency");"outEdges"===h?I(u.outEdges,(function(e){e.dataIndex<0||(Uw(e,$w),Uw(e.node2,Hw))})):"inEdges"===h?I(u.inEdges,(function(e){e.dataIndex<0||(Uw(e,$w),Uw(e.node1,Hw))})):"allEdges"===h&&I(u.edges,(function(e){e.dataIndex<0||(Uw(e,$w),e.node1!==u&&Uw(e.node1,Hw),e.node2!==u&&Uw(e.node2,Hw))}))}c&&(Uw(c,$w),Uw(c.node1,Hw),Uw(c.node2,Hw))}},unfocusNodeAdjacency:function(e,t,n,i){var a=e.getGraph();a.eachNode((function(e){Yw(e,Ww)})),a.eachEdge((function(e){Yw(e,Fw)}))}}),ap({type:"dragNode",event:"dragnode",update:"update"},(function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},(function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])}))})),op((function(e,t,n){e.eachSeriesByType("sankey",(function(e){var n=e.get("nodeWidth"),i=e.get("nodeGap"),a=function(e,t){return lu(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}(e,t),r=(e.layoutInfo=a).width,o=a.height,s=e.getGraph(),l=s.nodes,u=s.edges;!function(e){I(e,(function(e){var t=aS(e.outEdges,iS),n=aS(e.inEdges,iS),i=e.getValue()||0,a=Math.max(t,n,i);e.setLayout({value:a},!0)}))}(l),function(e,t,n,i,a,r,o,s,l){(function(e,t,n,i,a,r,o){for(var s=[],l=[],u=[],c=[],h=0,d=0;d<t.length;d++)s[d]=1;for(d=0;d<e.length;d++)l[d]=e[d].inEdges.length,0===l[d]&&u.push(e[d]);for(var p=-1;u.length;){for(var f=0;f<u.length;f++){var g=u[f],m=g.hostGraph.data.getRawDataItem(g.dataIndex),v=null!=m.depth&&0<=m.depth;v&&m.depth>p&&(p=m.depth),g.setLayout({depth:v?m.depth:h},!0),"vertical"===r?g.setLayout({dy:n},!0):g.setLayout({dx:n},!0);for(var y=0;y<g.outEdges.length;y++){var x=g.outEdges[y];s[t.indexOf(x)]=0;var _=x.node2;0==--l[e.indexOf(_)]&&c.indexOf(_)<0&&c.push(_)}}++h,u=c,c=[]}for(d=0;d<s.length;d++)if(1===s[d])throw new Error("Sankey is a DAG, the original data has cycle!");var b=h-1<p?p:h-1;o&&"left"!==o&&function(e,t,n,i){if("right"===t){for(var a=[],r=e,o=0;r.length;){for(var s=0;s<r.length;s++){var l=r[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];a.indexOf(c.node1)<0&&a.push(c.node1)}}r=a,a=[],++o}I(e,(function(e){Zw(e)||e.setLayout({depth:Math.max(0,i-e.getLayout().skNodeHeight)},!0)}))}else"justify"===t&&function(e,t){I(e,(function(e){Zw(e)||e.outEdges.length||e.setLayout({depth:t},!0)}))}(e,i)}(e,o,0,b),function(e,t,n){I(e,(function(e){var i=e.getLayout().depth*t;"vertical"===n?e.setLayout({y:i},!0):e.setLayout({x:i},!0)}))}(e,"vertical"===r?(a-n)/b:(i-n)/b,r)})(e,t,n,a,r,s,l),function(e,t,n,i,a,r,o){var s=function(e,t){var n=[],i="vertical"===t?"y":"x",a=ja(e,(function(e){return e.getLayout()[i]}));return a.keys.sort((function(e,t){return e-t})),I(a.keys,(function(e){n.push(a.buckets.get(e))})),n}(e,o);(function(e,t,n,i,a,r){var o=1/0;I(e,(function(e){var t=e.length,s=0;I(e,(function(e){s+=e.getLayout().value}));var l="vertical"===r?(i-(t-1)*a)/s:(n-(t-1)*a)/s;l<o&&(o=l)})),I(e,(function(e){I(e,(function(e,t){var n=e.getLayout().value*o;"vertical"===r?(e.setLayout({x:t},!0),e.setLayout({dx:n},!0)):(e.setLayout({y:t},!0),e.setLayout({dy:n},!0))}))})),I(t,(function(e){var t=+e.getValue()*o;e.setLayout({dy:t},!0)}))})(s,t,n,i,a,o),qw(s,a,n,i,o);for(var l=1;0<r;r--)Kw(s,l*=.99,o),qw(s,a,n,i,o),rS(s,l,o),qw(s,a,n,i,o)}(e,t,r,a,i,o,s),function(e,t){var n="vertical"===t?"x":"y";I(e,(function(e){e.outEdges.sort((function(e,t){return e.node2.getLayout()[n]-t.node2.getLayout()[n]})),e.inEdges.sort((function(e,t){return e.node1.getLayout()[n]-t.node1.getLayout()[n]}))})),I(e,(function(e){var t=0,n=0;I(e.outEdges,(function(e){e.setLayout({sy:t},!0),t+=e.getLayout().dy})),I(e.inEdges,(function(e){e.setLayout({ty:n},!0),n+=e.getLayout().dy}))}))}(e,s)}(l,u,n,i,r,o,0!==k(l,(function(e){return 0===e.getLayout().value})).length?0:e.get("layoutIterations"),e.get("orient"),e.get("nodeAlign"))}))})),sp((function(e,t){e.eachSeriesByType("sankey",(function(e){var t=e.getGraph().nodes;if(t.length){var n=1/0,i=-1/0;I(t,(function(e){var t=e.getLayout().value;t<n&&(n=t),i<t&&(i=t)})),I(t,(function(t){var a=new Hx({type:"color",mappingMethod:"linear",dataExtent:[n,i],visual:e.get("color")}).mapValueToVisual(t.getLayout().value),r=t.getModel().get("itemStyle.color");null!=r?t.setVisual("color",r):t.setVisual("color",a)}))}}))}));var oS={_baseAxisDim:null,getInitialData:function(e,t){var n,i,a=t.getComponent("xAxis",this.get("xAxisIndex")),r=t.getComponent("yAxis",this.get("yAxisIndex")),o=a.get("type"),s=r.get("type");"category"===o?(e.layout="horizontal",n=a.getOrdinalMeta(),i=!0):"category"===s?(e.layout="vertical",n=r.getOrdinalMeta(),i=!0):e.layout=e.layout||"horizontal";var l=["x","y"],u="horizontal"===e.layout?0:1,c=this._baseAxisDim=l[u],h=l[1-u],d=[a,r],p=d[u].get("type"),f=d[1-u].get("type"),g=e.data;if(g&&i){var m=[];I(g,(function(e,t){var n;e.value&&z(e.value)?(n=e.value.slice(),e.value.unshift(t)):z(e)?(n=e.slice(),e.unshift(t)):n=e,m.push(n)})),e.data=m}var v=this.defaultValueDimensions,y=[{name:c,type:xp(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:xp(f),dimsDef:v.slice()}];return Tv(this,{coordDimensions:y,dimensionsCount:v.length+1,encodeDefaulter:P(Ru,y,this)})},getBaseAxis:function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis}};T(Yc.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}}),oS,!0);var sS=["itemStyle"],lS=["emphasis","itemStyle"],uS=(rh.extend({type:"boxplot",render:function(e,t,n){var i=e.getData(),a=this.group,r=this._data;this._data||a.removeAll();var o="horizontal"===e.get("layout")?1:0;i.diff(r).add((function(e){if(i.hasValue(e)){var t=cS(i.getItemLayout(e),i,e,o,!0);i.setItemGraphicEl(e,t),a.add(t)}})).update((function(e,t){var n=r.getItemGraphicEl(t);if(i.hasValue(e)){var s=i.getItemLayout(e);n?hS(s,n,i,e):n=cS(s,i,e,o),a.add(n),i.setItemGraphicEl(e,n)}else a.remove(n)})).remove((function(e){var t=r.getItemGraphicEl(e);t&&a.remove(t)})).execute(),this._data=i},remove:function(e){var t=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl((function(e){e&&t.remove(e)}))},dispose:te}),vo.extend({type:"boxplotBoxPath",shape:{},buildPath:function(e,t){var n=t.points,i=0;for(e.moveTo(n[i][0],n[i][1]),i++;i<4;i++)e.lineTo(n[i][0],n[i][1]);for(e.closePath();i<n.length;i++)e.moveTo(n[i][0],n[i][1]),i++,e.lineTo(n[i][0],n[i][1])}}));function cS(e,t,n,i,a){var r=e.ends,o=new uS({shape:{points:a?function(e,t,n){return A(e,(function(e){return(e=e.slice())[t]=n.initBaseline,e}))}(r,i,e):r}});return hS(e,o,t,n,a),o}function hS(e,t,n,i,a){var r=n.hostModel;(0,ul[a?"initProps":"updateProps"])(t,{shape:{points:e.ends}},r,i);var o=n.getItemModel(i),s=o.getModel(sS),l=n.getItemVisual(i,"color"),u=s.getItemStyle(["borderColor"]);u.stroke=l,u.strokeNoScale=!0,t.useStyle(u),t.z2=100,Bs(t,o.getModel(lS).getItemStyle())}var dS=["itemStyle","borderColor"],pS=I;sp((function(e,t){var n=e.get("color");e.eachRawSeriesByType("boxplot",(function(t){var i=n[t.seriesIndex%n.length],a=t.getData();a.setVisual({legendSymbol:"roundRect",color:t.get(dS)||i}),e.isSeriesFiltered(t)||a.each((function(e){var t=a.getItemModel(e);a.setItemVisual(e,{color:t.get(dS,!0)})}))}))})),op((function(e){var t=function(e){var t=[],n=[];return e.eachSeriesByType("boxplot",(function(e){var i=e.getBaseAxis(),a=S(n,i);a<0&&(a=n.length,n[a]=i,t[a]={axis:i,seriesModels:[]}),t[a].seriesModels.push(e)})),t}(e);pS(t,(function(e){var t=e.seriesModels;t.length&&(function(e){var t,n,i=e.axis,a=e.seriesModels,r=a.length,o=e.boxWidthList=[],s=e.boxOffsetList=[],l=[];if("category"===i.type)n=i.getBandWidth();else{var u=0;pS(a,(function(e){u=Math.max(u,e.getData().count())})),t=i.getExtent(),Math.abs(t[1]-t[0])}pS(a,(function(e){var t=e.get("boxWidth");z(t)||(t=[t,t]),l.push([wl(t[0],n)||0,wl(t[1],n)||0])}));var c=.8*n-2,h=c/r*.3,d=(c-h*(r-1))/r,p=d/2-c/2;pS(a,(function(e,t){s.push(p),p+=h+d,o.push(Math.min(Math.max(d,l[t][0]),l[t][1]))}))}(e),pS(t,(function(t,n){!function(e,t,n){var i=e.coordinateSystem,a=e.getData(),r=n/2,o="horizontal"===e.get("layout")?0:1,s=1-o,l=["x","y"],u=a.mapDimension(l[o]),c=a.mapDimension(l[s],!0);if(!(null==u||c.length<5))for(var h=0;h<a.count();h++){var d=a.get(u,h),p=x(d,c[2],h),f=x(d,c[0],h),g=x(d,c[1],h),m=x(d,c[3],h),v=x(d,c[4],h),y=[];_(y,g,0),_(y,m,1),y.push(f,g,v,m),b(y,f),b(y,v),b(y,p),a.setItemLayout(h,{initBaseline:p[s],ends:y})}function x(e,n,r){var l,u=a.get(n,r),c=[];return c[o]=e,c[s]=u,isNaN(e)||isNaN(u)?l=[NaN,NaN]:(l=i.dataToPoint(c))[o]+=t,l}function _(e,t,n){var i=t.slice(),a=t.slice();i[o]+=r,a[o]-=r,n?e.push(i,a):e.push(a,i)}function b(e,t){var n=t.slice(),i=t.slice();n[o]-=r,i[o]+=r,e.push(n,i)}}(t,e.boxOffsetList[n],e.boxWidthList[n])})))}))})),T(Yc.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,clip:!0,itemStyle:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(e,t,n){var i=t.getItemLayout(e);return i&&n.rect(i.brushRect)}}),oS,!0);var fS=["itemStyle"],gS=["emphasis","itemStyle"],mS=["color","color0","borderColor","borderColor0"],vS=(rh.extend({type:"candlestick",render:function(e,t,n){this.group.removeClipPath(),this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},incrementalPrepareRender:function(e,t,n){this._clear(),this._updateDrawMode(e)},incrementalRender:function(e,t,n,i){this._isLargeDraw?this._incrementalRenderLarge(e,t):this._incrementalRenderNormal(e,t)},_updateDrawMode:function(e){var t=e.pipelineContext.large;(null==this._isLargeDraw||t^this._isLargeDraw)&&(this._isLargeDraw=t,this._clear())},_renderNormal:function(e){var t=e.getData(),n=this._data,i=this.group,a=t.getLayout("isSimpleBox"),r=e.get("clip",!0),o=e.coordinateSystem,s=o.getArea&&o.getArea();this._data||i.removeAll(),t.diff(n).add((function(n){if(t.hasValue(n)){var o,l=t.getItemLayout(n);if(r&&xS(s,l))return;Qs(o=yS(l,n,!0),{shape:{points:l.ends}},e,n),_S(o,t,n,a),i.add(o),t.setItemGraphicEl(n,o)}})).update((function(o,l){var u=n.getItemGraphicEl(l);if(t.hasValue(o)){var c=t.getItemLayout(o);r&&xS(s,c)?i.remove(u):(u?Js(u,{shape:{points:c.ends}},e,o):u=yS(c,o),_S(u,t,o,a),i.add(u),t.setItemGraphicEl(o,u))}else i.remove(u)})).remove((function(e){var t=n.getItemGraphicEl(e);t&&i.remove(t)})).execute(),this._data=t},_renderLarge:function(e){this._clear(),wS(e,this.group);var t=e.get("clip",!0)?im(e.coordinateSystem,!1,e):null;t?this.group.setClipPath(t):this.group.removeClipPath()},_incrementalRenderNormal:function(e,t){for(var n,i=t.getData(),a=i.getLayout("isSimpleBox");null!=(n=e.next());){var r;_S(r=yS(i.getItemLayout(n),n),i,n,a),r.incremental=!0,this.group.add(r)}},_incrementalRenderLarge:function(e,t){wS(t,this.group,!0)},remove:function(e){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:te}),vo.extend({type:"normalCandlestickBox",shape:{},buildPath:function(e,t){var n=t.points;this.__simpleBox?(e.moveTo(n[4][0],n[4][1]),e.lineTo(n[6][0],n[6][1])):(e.moveTo(n[0][0],n[0][1]),e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]),e.lineTo(n[3][0],n[3][1]),e.closePath(),e.moveTo(n[4][0],n[4][1]),e.lineTo(n[5][0],n[5][1]),e.moveTo(n[6][0],n[6][1]),e.lineTo(n[7][0],n[7][1]))}}));function yS(e,t,n){var i=e.ends;return new vS({shape:{points:n?function(e,t){return A(e,(function(e){return(e=e.slice())[1]=t.initBaseline,e}))}(i,e):i},z2:100})}function xS(e,t){for(var n=!0,i=0;i<t.ends.length;i++)if(e.contain(t.ends[i][0],t.ends[i][1])){n=!1;break}return n}function _S(e,t,n,i){var a=t.getItemModel(n),r=a.getModel(fS),o=t.getItemVisual(n,"color"),s=t.getItemVisual(n,"borderColor")||o,l=r.getItemStyle(mS);e.useStyle(l),e.style.strokeNoScale=!0,e.style.fill=o,e.style.stroke=s,e.__simpleBox=i,Bs(e,a.getModel(gS).getItemStyle())}var bS=vo.extend({type:"largeCandlestickBox",shape:{},buildPath:function(e,t){for(var n=t.points,i=0;i<n.length;)if(this.__sign===n[i++]){var a=n[i++];e.moveTo(a,n[i++]),e.lineTo(a,n[i++])}else i+=3}});function wS(e,t,n){var i=e.getData(),a=i.getLayout("largePoints"),r=new bS({shape:{points:a},__sign:1});t.add(r);var o=new bS({shape:{points:a},__sign:-1});t.add(o),SS(1,r,e,i),SS(-1,o,e,i),n&&(r.incremental=!0,o.incremental=!0)}function SS(e,t,n,i){var a=0<e?"P":"N",r=i.getVisual("borderColor"+a)||i.getVisual("color"+a),o=n.getModel(fS).getItemStyle(mS);t.useStyle(o),t.style.fill=null,t.style.stroke=r}var MS=["itemStyle","borderColor"],TS=["itemStyle","borderColor0"],CS=["itemStyle","color"],IS=["itemStyle","color0"],AS={seriesType:"candlestick",plan:nh(),performRawSeries:!0,reset:function(e,t){if(e.getData().setVisual({legendSymbol:"roundRect",colorP:n(1,e),colorN:n(-1,e),borderColorP:i(1,e),borderColorN:i(-1,e)}),!t.isSeriesFiltered(e))return!e.pipelineContext.large&&{progress:function(e,t){for(var a;null!=(a=e.next());){var r=t.getItemModel(a),o=t.getItemLayout(a).sign;t.setItemVisual(a,{color:n(o,r),borderColor:i(o,r)})}}};function n(e,t){return t.get(0<e?CS:IS)}function i(e,t){return t.get(0<e?MS:TS)}}},DS="undefined"!=typeof Float32Array?Float32Array:Array,kS={seriesType:"candlestick",plan:nh(),reset:function(e){var t=e.coordinateSystem,n=e.getData(),i=function(e,t){var n,i=e.getBaseAxis(),a="category"===i.type?i.getBandWidth():(n=i.getExtent(),Math.abs(n[1]-n[0])/t.count()),r=wl(F(e.get("barMaxWidth"),a),a),o=wl(F(e.get("barMinWidth"),1),a),s=e.get("barWidth");return null!=s?wl(s,a):Math.max(Math.min(a/2,r),o)}(e,n),a=["x","y"],r=n.mapDimension(a[0]),o=n.mapDimension(a[1],!0),s=o[0],l=o[1],u=o[2],c=o[3];if(n.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),!(null==r||o.length<4))return{progress:e.pipelineContext.large?function(e,n){for(var i,a,o=new DS(4*e.count),h=0,d=[],p=[];null!=(a=e.next());){var f=n.get(r,a),g=n.get(s,a),m=n.get(l,a),v=n.get(u,a),y=n.get(c,a);isNaN(f)||isNaN(v)||isNaN(y)?(o[h++]=NaN,h+=3):(o[h++]=LS(n,a,g,m,l),d[0]=f,d[1]=v,i=t.dataToPoint(d,null,p),o[h++]=i?i[0]:NaN,o[h++]=i?i[1]:NaN,d[1]=y,i=t.dataToPoint(d,null,p),o[h++]=i?i[1]:NaN)}n.setLayout("largePoints",o)}:function(e,n){for(var a;null!=(a=e.next());){var o=n.get(r,a),h=n.get(s,a),d=n.get(l,a),p=n.get(u,a),f=n.get(c,a),g=Math.min(h,d),m=Math.max(h,d),v=w(g,o),y=w(m,o),x=w(p,o),_=w(f,o),b=[];S(b,y,0),S(b,v,1),b.push(T(_),T(y),T(x),T(v)),n.setItemLayout(a,{sign:LS(n,a,h,d,l),initBaseline:d<h?y[1]:v[1],ends:b,brushRect:M(p,f,o)})}function w(e,n){var i=[];return i[0]=n,i[1]=e,isNaN(n)||isNaN(e)?[NaN,NaN]:t.dataToPoint(i)}function S(e,t,n){var a=t.slice(),r=t.slice();a[0]=Ms(a[0]+i/2,1,!1),r[0]=Ms(r[0]-i/2,1,!0),n?e.push(a,r):e.push(r,a)}function M(e,t,n){var a=w(e,n),r=w(t,n);return a[0]-=i/2,r[0]-=i/2,{x:a[0],y:a[1],width:i,height:r[1]-a[1]}}function T(e){return e[0]=Ms(e[0],1),e}}}}};function LS(e,t,n,i,a){return i<n?-1:n<i?1:0<t?e.get(a,t-1)<=i?1:-1:1}function ES(e,t){var n=t.rippleEffectColor||t.color;e.eachChild((function(e){e.attr({z:t.z,zlevel:t.zlevel,style:{stroke:"stroke"===t.brushType?n:null,fill:"fill"===t.brushType?n:null}})}))}function PS(e,t){An.call(this);var n=new Cg(e,t),i=new An;this.add(n),this.add(i),i.beforeUpdate=function(){this.attr(n.getScale())},this.updateData(e,t)}np((function(e){e&&z(e.series)&&I(e.series,(function(e){R(e)&&"k"===e.type&&(e.type="candlestick")}))})),sp(AS),op(kS),Yc.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(e,t){return Jp(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});var zS=PS.prototype;zS.stopEffectAnimation=function(){this.childAt(1).removeAll()},zS.startEffectAnimation=function(e){for(var t=e.symbolType,n=e.color,i=this.childAt(1),a=0;a<3;a++){var r=ag(t,-1,-1,2,2,n);r.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var o=-a/3*e.period+e.effectOffset;r.animate("",!0).when(e.period,{scale:[e.rippleScale/2,e.rippleScale/2]}).delay(o).start(),r.animateStyle(!0).when(e.period,{opacity:0}).delay(o).start(),i.add(r)}ES(i,e)},zS.updateEffectAnimation=function(e){for(var t=this._effectCfg,n=this.childAt(1),i=["symbolType","period","rippleScale"],a=0;a<i.length;a++){var r=i[a];if(t[r]!==e[r])return this.stopEffectAnimation(),void this.startEffectAnimation(e)}ES(n,e)},zS.highlight=function(){this.trigger("emphasis")},zS.downplay=function(){this.trigger("normal")},zS.updateData=function(e,t){var n=e.hostModel;this.childAt(0).updateData(e,t);var i=this.childAt(1),a=e.getItemModel(t),r=e.getItemVisual(t,"symbol"),o=function(e){return z(e)||(e=[+e,+e]),e}(e.getItemVisual(t,"symbolSize")),s=e.getItemVisual(t,"color");i.attr("scale",o),i.traverse((function(e){e.attr({fill:s})}));var l=a.getShallow("symbolOffset");if(l){var u=i.position;u[0]=wl(l[0],o[0]),u[1]=wl(l[1],o[1])}var c=e.getItemVisual(t,"symbolRotate");i.rotation=(c||0)*Math.PI/180||0;var h={};if(h.showEffectOn=n.get("showEffectOn"),h.rippleScale=a.get("rippleEffect.scale"),h.brushType=a.get("rippleEffect.brushType"),h.period=1e3*a.get("rippleEffect.period"),h.effectOffset=t/e.count(),h.z=a.getShallow("z")||0,h.zlevel=a.getShallow("zlevel")||0,h.symbolType=r,h.color=s,h.rippleEffectColor=a.get("rippleEffect.color"),this.off("mouseover").off("mouseout").off("emphasis").off("normal"),"render"===h.showEffectOn)this._effectCfg?this.updateEffectAnimation(h):this.startEffectAnimation(h),this._effectCfg=h;else{this._effectCfg=null,this.stopEffectAnimation();var d=this.childAt(0),p=function(){d.highlight(),"render"!==h.showEffectOn&&this.startEffectAnimation(h)},f=function(){d.downplay(),"render"!==h.showEffectOn&&this.stopEffectAnimation()};this.on("mouseover",p,this).on("mouseout",f,this).on("emphasis",p,this).on("normal",f,this)}this._effectCfg=h},zS.fadeOut=function(e){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),e&&e()},M(PS,An),pp({type:"effectScatter",init:function(){this._symbolDraw=new Ng(PS)},render:function(e,t,n){var i=e.getData(),a=this._symbolDraw;a.updateData(i),this.group.add(a.group)},updateTransform:function(e,t,n){var i=e.getData();this.group.dirty();var a=cm().reset(e);a.progress&&a.progress({start:0,end:i.count()},i),this._symbolDraw.updateLayout(i)},_updateGroupTransform:function(e){var t=e.coordinateSystem;t&&t.getRoamTransform&&(this.group.transform=dt(t.getRoamTransform()),this.group.decomposeTransform())},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(t)},dispose:function(){}}),sp(um("effectScatter","circle")),op(cm("effectScatter"));var OS="undefined"==typeof Uint32Array?Array:Uint32Array,NS="undefined"==typeof Float64Array?Array:Float64Array;function RS(e){var t=e.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(e.data=A(t,(function(e){var t={coords:[e[0].coord,e[1].coord]};return e[0].name&&(t.fromName=e[0].name),e[1].name&&(t.toName=e[1].name),y([t,e[0],e[1]])})))}var BS=Yc.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(e){e.data=e.data||[],RS(e);var t=this._processFlatCoordsArray(e.data);this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset,t.flatCoords&&(e.data=new Float32Array(t.count)),BS.superApply(this,"init",arguments)},mergeOption:function(e){if(RS(e),e.data){var t=this._processFlatCoordsArray(e.data);this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset,t.flatCoords&&(e.data=new Float32Array(t.count))}BS.superApply(this,"mergeOption",arguments)},appendData:function(e){var t=this._processFlatCoordsArray(e.data);t.flatCoords&&(this._flatCoords?(this._flatCoords=ee(this._flatCoords,t.flatCoords),this._flatCoordsOffset=ee(this._flatCoordsOffset,t.flatCoordsOffset)):(this._flatCoords=t.flatCoords,this._flatCoordsOffset=t.flatCoordsOffset),e.data=new Float32Array(t.count)),this.getRawData().appendData(e.data)},_getCoordsFromItemModel:function(e){var t=this.getData().getItemModel(e);return t.option instanceof Array?t.option:t.getShallow("coords")},getLineCoordsCount:function(e){return this._flatCoordsOffset?this._flatCoordsOffset[2*e+1]:this._getCoordsFromItemModel(e).length},getLineCoords:function(e,t){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*e],i=this._flatCoordsOffset[2*e+1],a=0;a<i;a++)t[a]=t[a]||[],t[a][0]=this._flatCoords[n+2*a],t[a][1]=this._flatCoords[n+2*a+1];return i}var r=this._getCoordsFromItemModel(e);for(a=0;a<r.length;a++)t[a]=t[a]||[],t[a][0]=r[a][0],t[a][1]=r[a][1];return r.length},_processFlatCoordsArray:function(e){var t=0;if(this._flatCoords&&(t=this._flatCoords.length),"number"!=typeof e[0])return{flatCoordsOffset:null,flatCoords:null,count:e.length};for(var n=e.length,i=new OS(n),a=new NS(n),r=0,o=0,s=0,l=0;l<n;){s++;var u=e[l++];i[o++]=r+t,i[o++]=u;for(var c=0;c<u;c++){var h=e[l++],d=e[l++];a[r++]=h,a[r++]=d}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,o),flatCoords:a,count:s}},getInitialData:function(e,t){var n=new Lp(["value"],this);return n.hasItemOption=!1,n.initData(e.data,[],(function(e,t,i,a){if(e instanceof Array)return NaN;n.hasItemOption=!0;var r=e.value;return null!=r?r instanceof Array?r[a]:r:void 0})),n},formatTooltip:function(e){var t=this.getData().getItemModel(e),n=t.get("name");if(n)return n;var i=t.get("fromName"),a=t.get("toName"),r=[];return null!=i&&r.push(i),null!=a&&r.push(a),Xl(r.join(" > "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var e=this.option.progressive;return null==e?this.option.large?1e4:this.get("progressive"):e},getProgressiveThreshold:function(){var e=this.option.progressiveThreshold;return null==e?this.option.large?2e4:this.get("progressiveThreshold"):e},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}});function VS(e,t,n){An.call(this),this.add(this.createLine(e,t,n)),this._updateEffectSymbol(e,t)}var GS=VS.prototype;function WS(e,t,n){An.call(this),this._createPolyline(e,t,n)}GS.createLine=function(e,t,n){return new W_(e,t,n)},GS._updateEffectSymbol=function(e,t){var n=e.getItemModel(t).getModel("effect"),i=n.get("symbolSize"),a=n.get("symbol");z(i)||(i=[i,i]);var r=n.get("color")||e.getItemVisual(t,"color"),o=this.childAt(1);this._symbolType!==a&&(this.remove(o),(o=ag(a,-.5,-.5,1,1,r)).z2=100,o.culling=!0,this.add(o)),o&&(o.setStyle("shadowColor",r),o.setStyle(n.getItemStyle(["color"])),o.attr("scale",i),o.setColor(r),o.attr("scale",i),this._symbolType=a,this._symbolScale=i,this._updateEffectAnimation(e,n,t))},GS._updateEffectAnimation=function(e,t,n){var i=this.childAt(1);if(i){var a=this,r=e.getItemLayout(n),o=1e3*t.get("period"),s=t.get("loop"),l=t.get("constantSpeed"),u=H(t.get("delay"),(function(t){return t/e.count()*o/3})),c="function"==typeof u;if(i.ignore=!0,this.updateAnimationPoints(i,r),0<l&&(o=this.getLineLength(i)/l*1e3),o!==this._period||s!==this._loop){i.stopAnimation();var h=u;c&&(h=u(n)),0<i.__t&&(h=-o*i.__t),i.__t=0;var d=i.animate("",s).when(o,{__t:1}).delay(h).during((function(){a.updateSymbolPosition(i)}));s||d.done((function(){a.remove(i)})),d.start()}this._period=o,this._loop=s}},GS.getLineLength=function(e){return ye(e.__p1,e.__cp1)+ye(e.__cp1,e.__p2)},GS.updateAnimationPoints=function(e,t){e.__p1=t[0],e.__p2=t[1],e.__cp1=t[2]||[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]},GS.updateData=function(e,t,n){this.childAt(0).updateData(e,t,n),this._updateEffectSymbol(e,t)},GS.updateSymbolPosition=function(e){var t=e.__p1,n=e.__p2,i=e.__cp1,a=e.__t,r=e.position,o=[r[0],r[1]],s=_r,l=br;r[0]=s(t[0],i[0],n[0],a),r[1]=s(t[1],i[1],n[1],a);var u=l(t[0],i[0],n[0],a),c=l(t[1],i[1],n[1],a);if(e.rotation=-Math.atan2(c,u)-Math.PI/2,"line"===this._symbolType||"rect"===this._symbolType||"roundRect"===this._symbolType)if(void 0!==e.__lastT&&e.__lastT<e.__t){var h=1.05*ye(o,r);e.attr("scale",[e.scale[0],h]),1===a&&(r[0]=o[0]+(r[0]-o[0])/2,r[1]=o[1]+(r[1]-o[1])/2)}else 1===e.__lastT?(h=2*ye(t,r),e.attr("scale",[e.scale[0],h])):e.attr("scale",this._symbolScale);e.__lastT=e.__t,e.ignore=!1},GS.updateLayout=function(e,t){this.childAt(0).updateLayout(e,t);var n=e.getItemModel(t).getModel("effect");this._updateEffectAnimation(e,n,t)},M(VS,An);var HS=WS.prototype;function FS(e,t,n){VS.call(this,e,t,n),this._lastFrame=0,this._lastFramePercent=0}HS._createPolyline=function(e,t,n){var i=e.getItemLayout(t),a=new Fo({shape:{points:i}});this.add(a),this._updateCommonStl(e,t,n)},HS.updateData=function(e,t,n){var i=e.hostModel;Js(this.childAt(0),{shape:{points:e.getItemLayout(t)}},i,t),this._updateCommonStl(e,t,n)},HS._updateCommonStl=function(e,t,n){var i=this.childAt(0),a=e.getItemModel(t),r=e.getItemVisual(t,"color"),o=n&&n.lineStyle,s=n&&n.hoverLineStyle;n&&!e.hasItemOption||(o=a.getModel("lineStyle").getLineStyle(),s=a.getModel("emphasis.lineStyle").getLineStyle()),i.useStyle(_({strokeNoScale:!0,fill:"none",stroke:r},o)),i.hoverStyle=s,Bs(this)},HS.updateLayout=function(e,t){this.childAt(0).setShape("points",e.getItemLayout(t))},M(WS,An);var $S=FS.prototype;$S.createLine=function(e,t,n){return new WS(e,t,n)},$S.updateAnimationPoints=function(e,t){this._points=t;for(var n=[0],i=0,a=1;a<t.length;a++){var r=t[a-1],o=t[a];i+=ye(r,o),n.push(i)}if(0!==i){for(a=0;a<n.length;a++)n[a]/=i;this._offsets=n,this._length=i}},$S.getLineLength=function(e){return this._length},$S.updateSymbolPosition=function(e){var t=e.__t,n=this._points,i=this._offsets,a=n.length;if(i){var r=this._lastFrame;if(t<this._lastFramePercent){for(o=Math.min(r+1,a-1);0<=o&&!(i[o]<=t);o--);o=Math.min(o,a-2)}else{for(var o=r;o<a&&!(i[o]>t);o++);o=Math.min(o-1,a-2)}be(e.position,n[o],n[o+1],(t-i[o])/(i[o+1]-i[o]));var s=n[o+1][0]-n[o][0],l=n[o+1][1]-n[o][1];e.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=t,e.ignore=!1}},M(FS,VS);var XS=ms({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(e,t){var n=t.segs,i=t.curveness;if(t.polyline)for(var a=0;a<n.length;){var r=n[a++];if(0<r){e.moveTo(n[a++],n[a++]);for(var o=1;o<r;o++)e.lineTo(n[a++],n[a++])}}else for(a=0;a<n.length;){var s=n[a++],l=n[a++],u=n[a++],c=n[a++];if(e.moveTo(s,l),0<i){var h=(s+u)/2-(l-c)*i,d=(l+c)/2-(u-s)*i;e.quadraticCurveTo(h,d,u,c)}else e.lineTo(u,c)}},findDataIndex:function(e,t){var n=this.shape,i=n.segs,a=n.curveness;if(n.polyline)for(var r=0,o=0;o<i.length;){var s=i[o++];if(0<s)for(var l=i[o++],u=i[o++],c=1;c<s;c++)if(Kr(l,u,h=i[o++],d=i[o++]))return r;r++}else for(r=0,o=0;o<i.length;){l=i[o++],u=i[o++];var h=i[o++],d=i[o++];if(0<a){if(Qr(l,u,(l+h)/2-(u-d)*a,(u+d)/2-(h-l)*a,h,d))return r}else if(Kr(l,u,h,d))return r;r++}return-1}});function YS(){this.group=new An}var US=YS.prototype;US.isPersistent=function(){return!this._incremental},US.updateData=function(e){this.group.removeAll();var t=new XS({rectHover:!0,cursor:"default"});t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e),this.group.add(t),this._incremental=null},US.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clearIncremental(),5e5<e.count()?(this._incremental||(this._incremental=new os({silent:!0})),this.group.add(this._incremental)):this._incremental=null},US.incrementalUpdate=function(e,t){var n=new XS;n.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(n,t,!!this._incremental),this._incremental?this._incremental.addDisplayable(n,!0):(n.rectHover=!0,n.cursor="default",n.__startIndex=e.start,this.group.add(n))},US.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},US._setCommon=function(e,t,n){var i=t.hostModel;e.setShape({polyline:i.get("polyline"),curveness:i.get("lineStyle.curveness")}),e.useStyle(i.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var a=t.getVisual("color");a&&e.setStyle("stroke",a),e.setStyle("fill"),n||(e.seriesIndex=i.seriesIndex,e.on("mousemove",(function(t){e.dataIndex=null;var n=e.findDataIndex(t.offsetX,t.offsetY);0<n&&(e.dataIndex=n+e.__startIndex)})))},US._clearIncremental=function(){var e=this._incremental;e&&e.clearDisplaybles()};var jS={seriesType:"lines",plan:nh(),reset:function(e){var t=e.coordinateSystem,n=e.get("polyline"),i=e.pipelineContext.large;return{progress:function(a,r){var o=[];if(i){var s,l=a.end-a.start;if(n){for(var u=0,c=a.start;c<a.end;c++)u+=e.getLineCoordsCount(c);s=new Float32Array(l+2*u)}else s=new Float32Array(4*l);var h=0,d=[];for(c=a.start;c<a.end;c++){var p=e.getLineCoords(c,o);n&&(s[h++]=p);for(var f=0;f<p;f++)d=t.dataToPoint(o[f],!1,d),s[h++]=d[0],s[h++]=d[1]}r.setLayout("linesPoints",s)}else for(c=a.start;c<a.end;c++){var g=r.getItemModel(c),m=(p=e.getLineCoords(c,o),[]);if(n)for(var v=0;v<p;v++)m.push(t.dataToPoint(o[v]));else{m[0]=t.dataToPoint(o[0]),m[1]=t.dataToPoint(o[1]);var y=g.get("lineStyle.curveness");+y&&(m[2]=[(m[0][0]+m[1][0])/2-(m[0][1]-m[1][1])*y,(m[0][1]+m[1][1])/2-(m[1][0]-m[0][0])*y])}r.setItemLayout(c,m)}}}}};function ZS(e){return e instanceof Array||(e=[e,e]),e}pp({type:"lines",init:function(){},render:function(e,t,n){var i=e.getData(),a=this._updateLineDraw(i,e),r=e.get("zlevel"),o=e.get("effect.trailLength"),s=n.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(r).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(e)&&o&&(l||s.configLayer(r,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(o/10+.9,1),0)})),a.updateData(i);var u=e.get("clip",!0)&&im(e.coordinateSystem,!1,e);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=r,this._finished=!0},incrementalPrepareRender:function(e,t,n){var i=e.getData();this._updateLineDraw(i,e).incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},incrementalRender:function(e,t,n){this._lineDraw.incrementalUpdate(e,t.getData()),this._finished=e.end===t.getData().count()},updateTransform:function(e,t,n){var i=e.getData(),a=e.pipelineContext;if(!this._finished||a.large||a.progressiveRender)return{update:!0};var r=jS.reset(e);r.progress&&r.progress({start:0,end:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},_updateLineDraw:function(e,t){var n=this._lineDraw,i=this._showEffect(t),a=!!t.get("polyline"),r=t.pipelineContext.large;return n&&i===this._hasEffet&&a===this._isPolyline&&r===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=r?new YS:new F_(a?i?FS:WS:i?VS:W_),this._hasEffet=i,this._isPolyline=a,this._isLargeDraw=r,this.group.removeAll()),this.group.add(n.group),n},_showEffect:function(e){return!!e.get("effect.show")},_clearLayer:function(e){var t=e.getZr();"svg"===t.painter.getType()||null==this._lastZlevel||t.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(e,t){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(t)},dispose:function(){}});var qS="lineStyle.opacity".split("."),KS={seriesType:"lines",reset:function(e,t,n){var i=ZS(e.get("symbol")),a=ZS(e.get("symbolSize")),r=e.getData();return r.setVisual("fromSymbol",i&&i[0]),r.setVisual("toSymbol",i&&i[1]),r.setVisual("fromSymbolSize",a&&a[0]),r.setVisual("toSymbolSize",a&&a[1]),r.setVisual("opacity",e.get(qS)),{dataEach:r.hasItemOption?function(e,t){var n=e.getItemModel(t),i=ZS(n.getShallow("symbol",!0)),a=ZS(n.getShallow("symbolSize",!0)),r=n.get(qS);i[0]&&e.setItemVisual(t,"fromSymbol",i[0]),i[1]&&e.setItemVisual(t,"toSymbol",i[1]),a[0]&&e.setItemVisual(t,"fromSymbolSize",a[0]),a[1]&&e.setItemVisual(t,"toSymbolSize",a[1]),e.setItemVisual(t,"opacity",r)}:null}}};function JS(){var e=b();this.canvas=e,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}op(jS),sp(KS),Yc.extend({type:"series.heatmap",getInitialData:function(e,t){return Jp(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var e=ju.get(this.get("coordinateSystem"));if(e&&e.dimensions)return"lng"===e.dimensions[0]&&"lat"===e.dimensions[1]},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}}),JS.prototype={update:function(e,t,n,i,a,r){var o=this._getBrush(),s=this._getGradient(e,a,"inRange"),l=this._getGradient(e,a,"outOfRange"),u=this.pointSize+this.blurSize,c=this.canvas,h=c.getContext("2d"),d=e.length;c.width=t,c.height=n;for(var p=0;p<d;++p){var f=e[p],g=f[0],m=f[1],v=i(f[2]);h.globalAlpha=v,h.drawImage(o,g-u,m-u)}if(!c.width||!c.height)return c;for(var y=h.getImageData(0,0,c.width,c.height),x=y.data,_=0,b=x.length,w=this.minOpacity,S=this.maxOpacity-w;_<b;){v=x[_+3]/256;var M=4*Math.floor(255*v);if(0<v){var T=r(v)?s:l;0<v&&(v=v*S+w),x[_++]=T[M],x[_++]=T[1+M],x[_++]=T[2+M],x[_++]=T[3+M]*v*256}else _+=4}return h.putImageData(y,0,0),c},_getBrush:function(){var e=this._brushCanvas||(this._brushCanvas=b()),t=this.pointSize+this.blurSize,n=2*t;e.width=n,e.height=n;var i=e.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-t,t,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),e},_getGradient:function(e,t,n){for(var i=this._gradientPixels,a=i[n]||(i[n]=new Uint8ClampedArray(1024)),r=[0,0,0,0],o=0,s=0;s<256;s++)t[n](s/255,!0,r),a[o++]=r[0],a[o++]=r[1],a[o++]=r[2],a[o++]=r[3];return a}},pp({type:"heatmap",render:function(e,t,n){var i;t.eachComponent("visualMap",(function(t){t.eachTargetSeries((function(n){n===e&&(i=t)}))})),this.group.removeAll(),this._incrementalDisplayable=null;var a=e.coordinateSystem;"cartesian2d"===a.type||"calendar"===a.type?this._renderOnCartesianAndCalendar(e,n,0,e.getData().count()):function(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}(a)&&this._renderOnGeo(a,e,i,n)},incrementalPrepareRender:function(e,t,n){this.group.removeAll()},incrementalRender:function(e,t,n,i){t.coordinateSystem&&this._renderOnCartesianAndCalendar(t,i,e.start,e.end,!0)},_renderOnCartesianAndCalendar:function(e,t,n,i,a){var r,o,s=e.coordinateSystem;if("cartesian2d"===s.type){var l=s.getAxis("x"),u=s.getAxis("y");r=l.getBandWidth(),o=u.getBandWidth()}for(var c=this.group,h=e.getData(),d="emphasis.itemStyle",p="emphasis.label",f=e.getModel("itemStyle").getItemStyle(["color"]),g=e.getModel(d).getItemStyle(),m=e.getModel("label"),v=e.getModel(p),y=s.type,_="cartesian2d"===y?[h.mapDimension("x"),h.mapDimension("y"),h.mapDimension("value")]:[h.mapDimension("time"),h.mapDimension("value")],b=n;b<i;b++){var w;if("cartesian2d"===y){if(isNaN(h.get(_[2],b)))continue;var S=s.dataToPoint([h.get(_[0],b),h.get(_[1],b)]);w=new Zo({shape:{x:Math.floor(Math.round(S[0])-r/2),y:Math.floor(Math.round(S[1])-o/2),width:Math.ceil(r),height:Math.ceil(o)},style:{fill:h.getItemVisual(b,"color"),opacity:h.getItemVisual(b,"opacity")}})}else{if(isNaN(h.get(_[1],b)))continue;w=new Zo({z2:1,shape:s.dataToRect([h.get(_[0],b)]).contentShape,style:{fill:h.getItemVisual(b,"color"),opacity:h.getItemVisual(b,"opacity")}})}var M=h.getItemModel(b);h.hasItemOption&&(f=M.getModel("itemStyle").getItemStyle(["color"]),g=M.getModel(d).getItemStyle(),m=M.getModel("label"),v=M.getModel(p));var T=e.getRawValue(b),C="-";T&&null!=T[2]&&(C=T[2]),Hs(f,g,m,v,{labelFetcher:e,labelDataIndex:b,defaultText:C,isRectText:!0}),w.setStyle(f),Bs(w,h.hasItemOption?g:x({},g)),(w.incremental=a)&&(w.useHoverLayer=!0),c.add(w),h.setItemGraphicEl(b,w)}},_renderOnGeo:function(e,t,n,i){var a=n.targetVisuals.inRange,r=n.targetVisuals.outOfRange,o=t.getData(),s=this._hmLayer||this._hmLayer||new JS;s.blurSize=t.get("blurSize"),s.pointSize=t.get("pointSize"),s.minOpacity=t.get("minOpacity"),s.maxOpacity=t.get("maxOpacity");var l=e.getViewRect().clone(),u=e.getRoamTransform();l.applyTransform(u);var c=Math.max(l.x,0),h=Math.max(l.y,0),d=Math.min(l.width+l.x,i.getWidth()),p=Math.min(l.height+l.y,i.getHeight()),f=d-c,g=p-h,m=[o.mapDimension("lng"),o.mapDimension("lat"),o.mapDimension("value")],v=o.mapArray(m,(function(t,n,i){var a=e.dataToPoint([t,n]);return a[0]-=c,a[1]-=h,a.push(i),a})),y=n.getExtent(),x="visualMap.continuous"===n.type?function(e,t){var n=e[1]-e[0];return t=[(t[0]-e[0])/n,(t[1]-e[0])/n],function(e){return e>=t[0]&&e<=t[1]}}(y,n.option.range):function(e,t,n){var i=e[1]-e[0],a=(t=A(t,(function(t){return{interval:[(t.interval[0]-e[0])/i,(t.interval[1]-e[0])/i]}}))).length,r=0;return function(e){for(var i=r;i<a;i++)if((o=t[i].interval)[0]<=e&&e<=o[1]){r=i;break}if(i===a)for(i=r-1;0<=i;i--){var o;if((o=t[i].interval)[0]<=e&&e<=o[1]){r=i;break}}return 0<=i&&i<a&&n[i]}}(y,n.getPieceList(),n.option.selected);s.update(v,f,g,a.color.getNormalizer(),{inRange:a.color.getColorMapper(),outOfRange:r.color.getColorMapper()},x);var _=new Zi({style:{width:f,height:g,x:c,y:h,image:s.canvas},silent:!0});this.group.add(_)},dispose:function(){}});var QS=av.extend({type:"series.pictorialBar",dependencies:["grid"],defaultOption:{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,hoverAnimation:!1},getInitialData:function(e){return e.stack=null,QS.superApply(this,"getInitialData",arguments)}}),eM=["itemStyle","borderWidth"],tM=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],nM=new No;function iM(e,t,n,i){var a=e.getItemLayout(t),r=n.get("symbolRepeat"),o=n.get("symbolClip"),s=n.get("symbolPosition")||"start",l=(n.get("symbolRotate")||0)*Math.PI/180||0,u=n.get("symbolPatternSize")||2,c=n.isAnimationEnabled(),h={dataIndex:t,layout:a,itemModel:n,symbolType:e.getItemVisual(t,"symbol")||"circle",color:e.getItemVisual(t,"color"),symbolClip:o,symbolRepeat:r,symbolRepeatDirection:n.get("symbolRepeatDirection"),symbolPatternSize:u,rotation:l,animationModel:c?n:null,hoverAnimation:c&&n.get("hoverAnimation"),z2:n.getShallow("z",!0)||0};!function(e,t,n,i,a){var r,o=i.valueDim,s=e.get("symbolBoundingData"),l=i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()),u=l.toGlobalCoord(l.dataToCoord(0)),c=1-+(n[o.wh]<=0);if(z(s)){var h=[aM(l,s[0])-u,aM(l,s[1])-u];h[1]<h[0]&&h.reverse(),r=h[c]}else r=null!=s?aM(l,s)-u:t?i.coordSysExtent[o.index][c]-u:n[o.wh];a.boundingLength=r,t&&(a.repeatCutLength=n[o.wh]),a.pxSign=0<r?1:r<0?-1:0}(n,r,a,i,h),function(e,t,n,i,a,r,o,s,l,u){var c=l.valueDim,h=l.categoryDim,d=Math.abs(n[h.wh]),p=e.getItemVisual(t,"symbolSize");(p=z(p)?p.slice():(null==p&&(p="100%"),[p,p]))[h.index]=wl(p[h.index],d),p[c.index]=wl(p[c.index],i?d:Math.abs(r)),u.symbolSize=p,(u.symbolScale=[p[0]/s,p[1]/s])[c.index]*=(l.isHorizontal?-1:1)*o}(e,t,a,r,0,h.boundingLength,h.pxSign,u,i,h),function(e,t,n,i,a){var r=e.get(eM)||0;r&&(nM.attr({scale:t.slice(),rotation:n}),nM.updateTransform(),r/=nM.getLineScale(),r*=t[i.valueDim.index]),a.valueLineWidth=r}(n,h.symbolScale,l,i,h);var d=h.symbolSize,p=n.get("symbolOffset");return z(p)&&(p=[wl(p[0],d[0]),wl(p[1],d[1])]),function(e,t,n,i,a,r,o,s,l,u,c,h){var d=c.categoryDim,p=c.valueDim,f=h.pxSign,g=Math.max(t[p.index]+s,0),m=g;if(i){var v=Math.abs(l),y=H(e.get("symbolMargin"),"15%")+"",_=!1;y.lastIndexOf("!")===y.length-1&&(_=!0,y=y.slice(0,y.length-1)),y=wl(y,t[p.index]);var b=Math.max(g+2*y,0),w=_?0:2*y,S=Bl(i),M=S?i:_M((v+w)/b);b=g+2*(y=(v-M*g)/2/(_?M:M-1)),w=_?0:2*y,S||"fixed"===i||(M=u?_M((Math.abs(u)+w)/b):0),m=M*b-w,h.repeatTimes=M,h.symbolMargin=y}var T=f*(m/2),C=h.pathPosition=[];C[d.index]=n[d.wh]/2,C[p.index]="start"===o?T:"end"===o?l-T:l/2,r&&(C[0]+=r[0],C[1]+=r[1]);var I=h.bundlePosition=[];I[d.index]=n[d.xy],I[p.index]=n[p.xy];var A=h.barRectShape=x({},n);A[p.wh]=f*Math.max(Math.abs(n[p.wh]),Math.abs(C[p.index]+T)),A[d.wh]=n[d.wh];var D=h.clipShape={};D[d.xy]=-n[d.xy],D[d.wh]=c.ecSize[d.wh],D[p.xy]=0,D[p.wh]=n[p.wh]}(n,d,a,r,0,p,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,i,h),h}function aM(e,t){return e.toGlobalCoord(e.dataToCoord(e.scale.parse(t)))}function rM(e){var t=e.symbolPatternSize,n=ag(e.symbolType,-t/2,-t/2,t,t,e.color);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function oM(e,t,n,i){var a=e.__pictorialBundle,r=n.symbolSize,o=n.valueLineWidth,s=n.pathPosition,l=t.valueDim,u=n.repeatTimes||0,c=0,h=r[t.valueDim.index]+o+2*n.symbolMargin;for(vM(e,(function(e){e.__pictorialAnimationIndex=c,e.__pictorialRepeatTimes=u,c<u?yM(e,null,f(c),n,i):yM(e,null,{scale:[0,0]},n,i,(function(){a.remove(e)})),pM(e,n),c++}));c<u;c++){var d=rM(n);d.__pictorialAnimationIndex=c,d.__pictorialRepeatTimes=u,a.add(d);var p=f(c);yM(d,{position:p.position,scale:[0,0]},{scale:p.scale,rotation:p.rotation},n,i),d.on("mouseover",g).on("mouseout",m),pM(d,n)}function f(e){var t=s.slice(),i=n.pxSign,a=e;return("start"===n.symbolRepeatDirection?0<i:i<0)&&(a=u-1-e),t[l.index]=h*(a-u/2+.5)+s[l.index],{position:t,scale:n.symbolScale.slice(),rotation:n.rotation}}function g(){vM(e,(function(e){e.trigger("emphasis")}))}function m(){vM(e,(function(e){e.trigger("normal")}))}}function sM(e,t,n,i){var a=e.__pictorialBundle,r=e.__pictorialMainPath;r?yM(r,null,{position:n.pathPosition.slice(),scale:n.symbolScale.slice(),rotation:n.rotation},n,i):(r=e.__pictorialMainPath=rM(n),a.add(r),yM(r,{position:n.pathPosition.slice(),scale:[0,0],rotation:n.rotation},{scale:n.symbolScale.slice()},n,i),r.on("mouseover",(function(){this.trigger("emphasis")})).on("mouseout",(function(){this.trigger("normal")}))),pM(r,n)}function lM(e,t,n){var i=x({},t.barRectShape),a=e.__pictorialBarRect;a?yM(a,null,{shape:i},t,n):(a=e.__pictorialBarRect=new Zo({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),e.add(a))}function uM(e,t,n,i){if(n.symbolClip){var a=e.__pictorialClipPath,r=x({},n.clipShape),o=t.valueDim,s=n.animationModel,l=n.dataIndex;if(a)Js(a,{shape:r},s,l);else{r[o.wh]=0,a=new Zo({shape:r}),e.__pictorialBundle.setClipPath(a),e.__pictorialClipPath=a;var u={};u[o.wh]=n.clipShape[o.wh],ul[i?"updateProps":"initProps"](a,{shape:u},s,l)}}}function cM(e,t){var n=e.getItemModel(t);return n.getAnimationDelayParams=hM,n.isAnimationEnabled=dM,n}function hM(e){return{index:e.__pictorialAnimationIndex,count:e.__pictorialRepeatTimes}}function dM(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function pM(e,t){e.off("emphasis").off("normal");var n=t.symbolScale.slice();t.hoverAnimation&&e.on("emphasis",(function(){this.animateTo({scale:[1.1*n[0],1.1*n[1]]},400,"elasticOut")})).on("normal",(function(){this.animateTo({scale:n.slice()},400,"elasticOut")}))}function fM(e,t,n,i){var a=new An,r=new An;return a.add(r),(a.__pictorialBundle=r).attr("position",n.bundlePosition.slice()),n.symbolRepeat?oM(a,t,n):sM(a,0,n),lM(a,n,i),uM(a,t,n,i),a.__pictorialShapeStr=mM(e,n),a.__pictorialSymbolMeta=n,a}function gM(e,t,n,i){var a=i.__pictorialBarRect;a&&(a.style.text=null);var r=[];vM(i,(function(e){r.push(e)})),i.__pictorialMainPath&&r.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),I(r,(function(e){Js(e,{scale:[0,0]},n,t,(function(){i.parent&&i.parent.remove(i)}))})),e.setItemGraphicEl(t,null)}function mM(e,t){return[e.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function vM(e,t,n){I(e.__pictorialBundle.children(),(function(i){i!==e.__pictorialBarRect&&t.call(n,i)}))}function yM(e,t,n,i,a,r){t&&e.attr(t),i.symbolClip&&!a?n&&e.attr(n):n&&ul[a?"updateProps":"initProps"](e,n,i.animationModel,i.dataIndex,r)}function xM(e,t,n){var i=n.color,a=n.dataIndex,r=n.itemModel,o=r.getModel("itemStyle").getItemStyle(["color"]),s=r.getModel("emphasis.itemStyle").getItemStyle(),l=r.getShallow("cursor");vM(e,(function(e){e.setColor(i),e.setStyle(_({fill:i,opacity:n.opacity},o)),Bs(e,s),l&&(e.cursor=l),e.z2=n.z2}));var u={},c=(t.valueDim.posDesc[+(0<n.boundingLength)],e.__pictorialBarRect);rv(c.style,u,r,i,t.seriesModel,a),Bs(c,u)}function _M(e){var t=Math.round(e);return Math.abs(e-t)<1e-4?t:Math.ceil(e)}function bM(e,t,n,i,a){_g.call(this,e,t,n),this.type=i||"value",this.position=a||"bottom",this.orient=null}function wM(e,t,n){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(e,t,n),this.model=e}function SM(e,t){t=t||{};var n=e.coordinateSystem,i=e.axis,a={},r=i.position,o=i.orient,s=n.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};a.position=["vertical"===o?u.vertical[r]:l[0],"horizontal"===o?u.horizontal[r]:l[3]],a.rotation=Math.PI/2*{horizontal:0,vertical:1}[o],a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,right:1,left:-1}[r],e.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),H(t.labelInside,e.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var c=t.rotate;return null==c&&(c=e.get("axisLabel.rotate")),a.labelRotation="top"===r?-c:c,a.z2=1,a}pp({type:"pictorialBar",render:function(e,t,n){var i=this.group,a=e.getData(),r=this._data,o=e.coordinateSystem,s=!!o.getBaseAxis().isHorizontal(),l=o.grid.getRect(),u={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:e,coordSys:o,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:tM[+s],categoryDim:tM[1-s]};return a.diff(r).add((function(e){if(a.hasValue(e)){var t=cM(a,e),n=iM(a,e,t,u),r=fM(a,u,n);a.setItemGraphicEl(e,r),i.add(r),xM(r,u,n)}})).update((function(e,t){var n=r.getItemGraphicEl(t);if(a.hasValue(e)){var o=cM(a,e),s=iM(a,e,o,u),l=mM(a,s);n&&l!==n.__pictorialShapeStr&&(i.remove(n),a.setItemGraphicEl(e,null),n=null),n?function(e,t,n){var i=n.animationModel,a=n.dataIndex;Js(e.__pictorialBundle,{position:n.bundlePosition.slice()},i,a),n.symbolRepeat?oM(e,t,n,!0):sM(e,t,n,!0),lM(e,n,!0),uM(e,t,n,!0)}(n,u,s):n=fM(a,u,s,!0),a.setItemGraphicEl(e,n),n.__pictorialSymbolMeta=s,i.add(n),xM(n,u,s)}else i.remove(n)})).remove((function(e){var t=r.getItemGraphicEl(e);t&&gM(r,e,t.__pictorialSymbolMeta.animationModel,t)})).execute(),this._data=a,this.group},dispose:te,remove:function(e,t){var n=this.group,i=this._data;e.get("animation")?i&&i.eachItemGraphicEl((function(t){gM(i,t.dataIndex,e,t)})):n.removeAll()}}),op(P(bf,"pictorialBar")),sp(um("pictorialBar","roundRect")),bM.prototype={constructor:bM,model:null,isHorizontal:function(){var e=this.position;return"top"===e||"bottom"===e},pointToData:function(e,t){return this.coordinateSystem.pointToData(e,t)[0]},toGlobalCoord:null,toLocalCoord:null},M(bM,_g),ju.register("single",{create:function(e,t){var n=[];return e.eachComponent("singleAxis",(function(i,a){var r=new wM(i,e,t);r.name="single_"+a,r.resize(i,t),i.coordinateSystem=r,n.push(r)})),e.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var n=e.queryComponents({mainType:"singleAxis",index:t.get("singleAxisIndex"),id:t.get("singleAxisId")})[0];t.coordinateSystem=n&&n.coordinateSystem}})),n},dimensions:(wM.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:wM,_init:function(e,t,n){var i=new bM(this.dimension,$f(e),[0,0],e.get("type"),e.get("position")),a="category"===i.type;i.onBand=a&&e.get("boundaryGap"),i.inverse=e.get("inverse"),i.orient=e.get("orient"),(e.axis=i).model=e,(i.coordinateSystem=this)._axis=i},update:function(e,t){e.eachSeries((function(e){if(e.coordinateSystem===this){var t=e.getData();I(t.mapDimension(this.dimension,!0),(function(e){this._axis.scale.unionExtentFromData(t,e)}),this),Ff(this._axis.scale,this._axis.model)}}),this)},resize:function(e,t){this._rect=lu({left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")},{width:t.getWidth(),height:t.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var e=this._rect,t=this._axis,n=t.isHorizontal(),i=n?[0,e.width]:[0,e.height],a=t.reverse?1:0;t.setExtent(i[a],i[1-a]),this._updateAxisTransform(t,n?e.x:e.y)},_updateAxisTransform:function(e,t){var n=e.getExtent(),i=n[0]+n[1],a=e.isHorizontal();e.toGlobalCoord=a?function(e){return e+t}:function(e){return i-e+t},e.toLocalCoord=a?function(e){return e-t}:function(e){return i-e+t}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(e){var t=this.getRect(),n=this.getAxis();return"horizontal"===n.orient?n.contain(n.toLocalCoord(e[0]))&&e[1]>=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},pointToData:function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e["horizontal"===t.orient?0:1]))]},dataToPoint:function(e){var t=this.getAxis(),n=this.getRect(),i=[],a="horizontal"===t.orient?0:1;return e instanceof Array&&(e=e[0]),i[a]=t.toGlobalCoord(t.dataToCoord(+e)),i[1-a]=0==a?n.y+n.height/2:n.x+n.width/2,i}}).dimensions});var MM=["axisLine","axisTickLabel","axisName"],TM=["splitArea","splitLine"],CM=jm.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(e,t,n,i){var a=this.group;a.removeAll();var r=this._axisGroup;this._axisGroup=new An;var o=SM(e),s=new Em(e,o);I(MM,s.add,s),a.add(this._axisGroup),a.add(s.getGroup()),I(TM,(function(t){e.get(t+".show")&&this["_"+t](e)}),this),il(r,this._axisGroup,e),CM.superCall(this,"render",e,t,n,i)},remove:function(){ev(this)},_splitLine:function(e){var t=e.axis;if(!t.scale.isBlank()){var n=e.getModel("splitLine"),i=n.getModel("lineStyle"),a=i.get("width"),r=i.get("color");r=r instanceof Array?r:[r];for(var o=e.coordinateSystem.getRect(),s=t.isHorizontal(),l=[],u=0,c=t.getTicksCoords({tickModel:n}),h=[],d=[],p=0;p<c.length;++p){var f=t.toGlobalCoord(c[p].coord);s?(h[0]=f,h[1]=o.y,d[0]=f,d[1]=o.y+o.height):(h[0]=o.x,h[1]=f,d[0]=o.x+o.width,d[1]=f);var g=u++%r.length;l[g]=l[g]||[],l[g].push(new Ko({subPixelOptimize:!0,shape:{x1:h[0],y1:h[1],x2:d[0],y2:d[1]},style:{lineWidth:a},silent:!0}))}for(p=0;p<l.length;++p)this.group.add(ws(l[p],{style:{stroke:r[p%r.length],lineDash:i.getLineDash(a),lineWidth:a},silent:!0}))}},_splitArea:function(e){Qm(this,this._axisGroup,e,e)}}),IM=vu.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}});function AM(e,t){var n,i=[],a=e.seriesIndex;if(null==a||!(n=t.getSeriesByIndex(a)))return{point:[]};var r=n.getData(),o=Wa(r,e);if(null==o||o<0||z(o))return{point:[]};var s=r.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)i=l.dataToPoint(r.getValues(A(l.dimensions,(function(e){return r.mapDimension(e)})),o,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),i=[u.x+u.width/2,u.y+u.height/2]}return{point:i,el:s}}v(IM.prototype,Zf),xm("single",IM,(function(e,t){return t.type||(t.data?"category":"value")}),{left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}});var DM=I,kM=P,LM=Ha();function EM(e,t,n,i,a){var r=e.axis;if(!r.scale.isBlank()&&r.containData(t))if(e.involveSeries){var o=function(e,t){var n=t.axis,i=n.dim,a=e,r=[],o=Number.MAX_VALUE,s=-1;return DM(t.seriesModels,(function(t,l){var u,c,h=t.getData().mapDimension(i,!0);if(t.getAxisTooltipData){var d=t.getAxisTooltipData(h,e,n);c=d.dataIndices,u=d.nestestValue}else{if(!(c=t.getData().indicesOfNearest(h[0],e,"category"===n.type?.5:null)).length)return;u=t.getData().get(h[0],c[0])}if(null!=u&&isFinite(u)){var p=e-u,f=Math.abs(p);f<=o&&((f<o||0<=p&&s<0)&&(o=f,s=p,a=u,r.length=0),DM(c,(function(e){r.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})})))}})),{payloadBatch:r,snapToValue:a}}(t,e),s=o.payloadBatch,l=o.snapToValue;s[0]&&null==a.seriesIndex&&x(a,s[0]),!i&&e.snap&&r.containData(l)&&null!=l&&(t=l),n.showPointer(e,t,s,a),n.showTooltip(e,o,l)}else n.showPointer(e,t)}function PM(e,t,n,i){e[t.key]={value:n,payloadBatch:i}}function zM(e,t,n,i){var a=n.payloadBatch,r=t.axis,o=r.model,s=t.axisPointerModel;if(t.triggerTooltip&&a.length){var l=t.coordSys.model,u=Um(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:r.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:i,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:a.slice()})}}function OM(e){var t=e.axis.model,n={},i=n.axisDim=e.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=t.componentIndex,n.axisName=n[i+"AxisName"]=t.name,n.axisId=n[i+"AxisId"]=t.id,n}function NM(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}cp({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}});var RM=Ha(),BM=I;function VM(e,t,n){if(!a.node){var i=t.getZr();RM(i).records||(RM(i).records={}),function(e,t){function n(n,i){e.on(n,(function(n){var a=function(e){var t={showTip:[],hideTip:[]},n=function(i){var a=t[i.type];a?a.push(i):(i.dispatchAction=n,e.dispatchAction(i))};return{dispatchAction:n,pendings:t}}(t);BM(RM(e).records,(function(e){e&&i(e,n,a.dispatchAction)})),function(e,t){var n,i=e.showTip.length,a=e.hideTip.length;i?n=e.showTip[i-1]:a&&(n=e.hideTip[a-1]),n&&(n.dispatchAction=null,t.dispatchAction(n))}(a.pendings,t)}))}RM(e).initialized||(RM(e).initialized=!0,n("click",P(WM,"click")),n("mousemove",P(WM,"mousemove")),n("globalout",GM))}(i,t),(RM(i).records[e]||(RM(i).records[e]={})).handler=n}}function GM(e,t,n){e.handler("leave",null,n)}function WM(e,t,n,i){t.handler(e,n,i)}function HM(e,t){if(!a.node){var n=t.getZr();(RM(n).records||{})[e]&&(RM(n).records[e]=null)}}var FM=hp({type:"axisPointer",render:function(e,t,n){var i=t.getComponent("tooltip"),a=e.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";VM("axisPointer",n,(function(e,t,n){"none"!==a&&("leave"===e||0<=a.indexOf(e))&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})}))},remove:function(e,t){HM(t.getZr(),"axisPointer"),FM.superApply(this._model,"remove",arguments)},dispose:function(e,t){HM("axisPointer",t),FM.superApply(this._model,"dispose",arguments)}}),$M=Ha(),XM=m,YM=E;function UM(){}function jM(e,t,n,i){!function e(t,n){if(R(t)&&R(n)){var i=!0;return I(n,(function(n,a){i=i&&e(t[a],n)})),!!i}return t===n}($M(n).lastProp,i)&&($M(n).lastProp=i,t?Js(n,i,e):(n.stopAnimation(),n.attr(i)))}function ZM(e,t){e[t.get("label.show")?"show":"hide"]()}function qM(e){return{position:e.position.slice(),rotation:e.rotation||0}}function KM(e,t,n){var i=t.get("z"),a=t.get("zlevel");e&&e.traverse((function(e){"group"!==e.type&&(null!=i&&(e.z=i),null!=a&&(e.zlevel=a),e.silent=n)}))}function JM(e){var t,n=e.get("type"),i=e.getModel(n+"Style");return"line"===n?(t=i.getLineStyle()).fill=null:"shadow"===n&&((t=i.getAreaStyle()).stroke=null),t}function QM(e,t,n,i,a){var r=eT(n.get("value"),t.axis,t.ecModel,n.get("seriesDataIndices"),{precision:n.get("label.precision"),formatter:n.get("label.formatter")}),o=n.getModel("label"),s=Hl(o.get("padding")||0),l=o.getFont(),u=hi(r,l),c=a.position,h=u.width+s[1]+s[3],d=u.height+s[0]+s[2],p=a.align;"right"===p&&(c[0]-=h),"center"===p&&(c[0]-=h/2);var f=a.verticalAlign;"bottom"===f&&(c[1]-=d),"middle"===f&&(c[1]-=d/2),function(e,t,n,i){var a=i.getWidth(),r=i.getHeight();e[0]=Math.min(e[0]+t,a)-t,e[1]=Math.min(e[1]+n,r)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}(c,h,d,i);var g=o.get("backgroundColor");g&&"auto"!==g||(g=t.get("axisLine.lineStyle.color")),e.label={shape:{x:0,y:0,width:h,height:d,r:o.get("borderRadius")},position:c.slice(),style:{text:r,textFont:l,textFill:o.getTextColor(),textPosition:"inside",textPadding:s,fill:g,stroke:o.get("borderColor")||"transparent",lineWidth:o.get("borderWidth")||0,shadowBlur:o.get("shadowBlur"),shadowColor:o.get("shadowColor"),shadowOffsetX:o.get("shadowOffsetX"),shadowOffsetY:o.get("shadowOffsetY")},z2:10}}function eT(e,t,n,i,a){e=t.scale.parse(e);var r=t.scale.getLabel(e,{precision:a.precision}),o=a.formatter;if(o){var s={value:Yf(t,e),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};I(i,(function(e){var t=n.getSeriesByIndex(e.seriesIndex),i=e.dataIndexInside,a=t&&t.getDataParams(i);a&&s.seriesData.push(a)})),N(o)?r=o.replace("{value}",r):O(o)&&(r=o(s))}return r}function tT(e,t,n){var i=at();return ut(i,i,n.rotation),lt(i,i,n.position),tl([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function nT(e,t,n,i,a,r){var o=Em.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=a.get("label.margin"),QM(t,i,a,r,{position:tT(i.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function iT(e,t,n){return{x1:e[n=n||0],y1:e[1-n],x2:t[n],y2:t[1-n]}}function aT(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}}function rT(e,t,n,i,a,r){return{cx:e,cy:t,r0:n,r:i,startAngle:a,endAngle:r,clockwise:!0}}Ka((UM.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(e,t,n,i){var a=t.get("value"),r=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,i||this._lastValue!==a||this._lastStatus!==r){this._lastValue=a,this._lastStatus=r;var o=this._group,s=this._handle;if(!r||"hide"===r)return o&&o.hide(),void(s&&s.hide());o&&o.show(),s&&s.show();var l={};this.makeElOption(l,a,e,t,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var c=this._moveAnimation=this.determineAnimation(e,t);if(o){var h=P(jM,t,c);this.updatePointerEl(o,l,h,t),this.updateLabelEl(o,l,h,t)}else o=this._group=new An,this.createPointerEl(o,l,e,t),this.createLabelEl(o,l,e,t),n.getZr().add(o);KM(o,t,!0),this._renderHandle(a)}},remove:function(e){this.clear(e)},dispose:function(e){this.clear(e)},determineAnimation:function(e,t){var n=t.get("animation"),i=e.axis,a="category"===i.type,r=t.get("snap");if(!r&&!a)return!1;if("auto"!==n&&null!=n)return!0===n;var o=this.animationThreshold;if(a&&i.getBandWidth()>o)return!0;if(r){var s=Xm(e).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>o}return!1},makeElOption:function(e,t,n,i,a){},createPointerEl:function(e,t,n,i){var a=t.pointer;if(a){var r=$M(e).pointerEl=new ul[a.type](XM(t.pointer));e.add(r)}},createLabelEl:function(e,t,n,i){if(t.label){var a=$M(e).labelEl=new Zo(XM(t.label));e.add(a),ZM(a,i)}},updatePointerEl:function(e,t,n){var i=$M(e).pointerEl;i&&t.pointer&&(i.setStyle(t.pointer.style),n(i,{shape:t.pointer.shape}))},updateLabelEl:function(e,t,n,i){var a=$M(e).labelEl;a&&(a.setStyle(t.label.style),n(a,{shape:t.label.shape,position:t.label.position}),ZM(a,i))},_renderHandle:function(e){if(!this._dragging&&this.updateHandleTransform){var t,n=this._axisPointerModel,i=this._api.getZr(),a=this._handle,r=n.getModel("handle"),o=n.get("status");if(!r.get("show")||!o||"hide"===o)return a&&i.remove(a),void(this._handle=null);this._handle||(t=!0,a=this._handle=rl(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){Ye(e.event)},onmousedown:YM(this._onHandleDragMove,this,0,0),drift:YM(this._onHandleDragMove,this),ondragend:YM(this._onHandleDragEnd,this)}),i.add(a)),KM(a,n,!1),a.setStyle(r.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=r.get("size");z(s)||(s=[s,s]),a.attr("scale",[s[0]/2,s[1]/2]),mh(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,t)}},_moveHandleToValue:function(e,t){jM(this._axisPointerModel,!t&&this._moveAnimation,this._handle,qM(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(e,t){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(qM(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(qM(i)),$M(n).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},_onHandleDragEnd:function(e){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,i=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),i&&t.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}}}).constructor=UM);var oT=UM.extend({makeElOption:function(e,t,n,i,a){var r=n.axis,o=r.grid,s=i.get("type"),l=sT(o,r).getOtherAxis(r).getGlobalExtent(),u=r.toGlobalCoord(r.dataToCoord(t,!0));if(s&&"none"!==s){var c=JM(i),h=lT[s](r,u,l);h.style=c,e.graphicKey=h.type,e.pointer=h}nT(t,e,Jm(o.model,n),n,i,a)},getHandleTransform:function(e,t,n){var i=Jm(t.axis.grid.model,t,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:tT(t.axis,e,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(e,t,n,i){var a=n.axis,r=a.grid,o=a.getGlobalExtent(!0),s=sT(r,a).getOtherAxis(a).getGlobalExtent(),l="x"===a.dim?0:1,u=e.position;u[l]+=t[l],u[l]=Math.min(o[1],u[l]),u[l]=Math.max(o[0],u[l]);var c=(s[1]+s[0])/2,h=[c,c];return h[l]=u[l],{position:u,rotation:e.rotation,cursorPoint:h,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}});function sT(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var lT={line:function(e,t,n){return{type:"Line",subPixelOptimize:!0,shape:iT([t,n[0]],[t,n[1]],uT(e))}},shadow:function(e,t,n){var i=Math.max(1,e.getBandWidth()),a=n[1]-n[0];return{type:"Rect",shape:aT([t-i/2,n[0]],[i,a],uT(e))}}};function uT(e){return"x"===e.dim?0:1}jm.registerAxisPointerClass("CartesianAxisPointer",oT),np((function(e){if(e){e.axisPointer&&0!==e.axisPointer.length||(e.axisPointer={});var t=e.axisPointer.link;t&&!z(t)&&(e.axisPointer.link=[t])}})),ip(gd.PROCESSOR.STATISTIC,(function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=function(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(e,t,n){var i=t.getComponent("tooltip"),a=t.getComponent("axisPointer"),r=a.get("link",!0)||[],o=[];Hm(n.getCoordinateSystems(),(function(n){if(n.axisPointerEnabled){var s=Um(n.model),l=e.coordSysAxesInfo[s]={},u=(e.coordSysMap[s]=n).model.getModel("tooltip",i);if(Hm(n.getAxes(),Fm(p,!1,null)),n.getTooltipAxes&&i&&u.get("show")){var c="axis"===u.get("trigger"),h="cross"===u.get("axisPointer.type"),d=n.getTooltipAxes(u.get("axisPointer.axis"));(c||h)&&Hm(d.baseAxes,Fm(p,!h||"cross",c)),h&&Hm(d.otherAxes,Fm(p,"cross",!1))}}function p(i,s,c){var h=c.model.getModel("axisPointer",a),d=h.get("show");if(d&&("auto"!==d||i||Ym(h))){null==s&&(s=h.get("triggerTooltip"));var p=(h=i?function(e,t,n,i,a,r){var o=t.getModel("axisPointer"),s={};Hm(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(e){s[e]=m(o.get(e))})),s.snap="category"!==e.type&&!!r,"cross"===o.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===a){var u=o.get("label.show");if(l.show=null==u||u,!r){var c=s.lineStyle=o.get("crossStyle");c&&_(l,c.textStyle)}}return e.model.getModel("axisPointer",new ml(s,n,i))}(c,u,a,t,i,s):h).get("snap"),f=Um(c.model),g=s||p||"category"===c.type,v=e.axesInfo[f]={key:f,axis:c,coordSys:n,axisPointerModel:h,triggerTooltip:s,involveSeries:g,snap:p,useHandle:Ym(h),seriesModels:[]};l[f]=v,e.seriesInvolved|=g;var y=function(e,t){for(var n=t.model,i=t.dim,a=0;a<e.length;a++){var r=e[a]||{};if($m(r[i+"AxisId"],n.id)||$m(r[i+"AxisIndex"],n.componentIndex)||$m(r[i+"AxisName"],n.name))return a}}(r,c);if(null!=y){var x=o[y]||(o[y]={axesInfo:{}});x.axesInfo[f]=v,x.mapper=r[y].mapper,v.linkGroup=x}}}}))}(n,e,t),n.seriesInvolved&&function(e,t){t.eachSeries((function(t){var n=t.coordinateSystem,i=t.get("tooltip.trigger",!0),a=t.get("tooltip.show",!0);n&&"none"!==i&&!1!==i&&"item"!==i&&!1!==a&&!1!==t.get("axisPointer.show",!0)&&Hm(e.coordSysAxesInfo[Um(n.model)],(function(e){var i=e.axis;n.getAxis(i.dim)===i&&(e.seriesModels.push(t),null==e.seriesDataCount&&(e.seriesDataCount=0),e.seriesDataCount+=t.getData().count())}))}),this)}(n,e),n}(e,t)})),ap({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},(function(e,t,n){var i=e.currTrigger,a=[e.x,e.y],r=e,o=e.dispatchAction||E(n.dispatchAction,n),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){NM(a)&&(a=AM({seriesIndex:r.seriesIndex,dataIndex:r.dataIndex},t).point);var l=NM(a),u=r.axesInfo,c=s.axesInfo,h="leave"===i||NM(a),d={},p={},f={list:[],map:{}},g={showPointer:kM(PM,p),showTooltip:kM(zM,f)};DM(s.coordSysMap,(function(e,t){var n=l||e.containPoint(a);DM(s.coordSysAxesInfo[t],(function(e,t){var i=e.axis,r=function(e,t){for(var n=0;n<(e||[]).length;n++){var i=e[n];if(t.axis.dim===i.axisDim&&t.axis.model.componentIndex===i.axisIndex)return i}}(u,e);if(!h&&n&&(!u||r)){var o=r&&r.value;null!=o||l||(o=i.pointToData(a)),null!=o&&EM(e,o,g,!1,d)}}))}));var m={};return DM(c,(function(e,t){var n=e.linkGroup;n&&!p[t]&&DM(n.axesInfo,(function(t,i){var a=p[i];if(t!==e&&a){var r=a.value;n.mapper&&(r=e.axis.scale.parse(n.mapper(r,OM(t),OM(e)))),m[e.key]=r}}))})),DM(m,(function(e,t){EM(c[t],e,g,!0,d)})),function(e,t,n){var i=n.axesInfo=[];DM(t,(function(t,n){var a=t.axisPointerModel.option,r=e[n];r?(t.useHandle||(a.status="show"),a.value=r.value,a.seriesDataIndices=(r.payloadBatch||[]).slice()):t.useHandle||(a.status="hide"),"show"===a.status&&i.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:a.value})}))}(p,c,d),function(e,t,n,i){if(NM(t)||!e.list.length)return i({type:"hideTip"});var a=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:e.list})}(f,a,e,o),function(e,t,n){var i=n.getZr(),a="axisPointerLastHighlights",r=LM(i)[a]||{},o=LM(i)[a]={};DM(e,(function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&DM(n.seriesDataIndices,(function(e){var t=e.seriesIndex+" | "+e.dataIndex;o[t]=e}))}));var s=[],l=[];I(r,(function(e,t){o[t]||l.push(e)})),I(o,(function(e,t){r[t]||s.push(e)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}(c,0,n),d}}));var cT=["x","y"],hT=["width","height"],dT=UM.extend({makeElOption:function(e,t,n,i,a){var r=n.axis,o=r.coordinateSystem,s=gT(o,1-fT(r)),l=o.dataToPoint(t)[0],u=i.get("type");if(u&&"none"!==u){var c=JM(i),h=pT[u](r,l,s);h.style=c,e.graphicKey=h.type,e.pointer=h}nT(t,e,SM(n),n,i,a)},getHandleTransform:function(e,t,n){var i=SM(t,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:tT(t.axis,e,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(e,t,n,i){var a=n.axis,r=a.coordinateSystem,o=fT(a),s=gT(r,o),l=e.position;l[o]+=t[o],l[o]=Math.min(s[1],l[o]),l[o]=Math.max(s[0],l[o]);var u=gT(r,1-o),c=(u[1]+u[0])/2,h=[c,c];return h[o]=l[o],{position:l,rotation:e.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}}}),pT={line:function(e,t,n){return{type:"Line",subPixelOptimize:!0,shape:iT([t,n[0]],[t,n[1]],fT(e))}},shadow:function(e,t,n){var i=e.getBandWidth(),a=n[1]-n[0];return{type:"Rect",shape:aT([t-i/2,n[0]],[i,a],fT(e))}}};function fT(e){return e.isHorizontal()?0:1}function gT(e,t){var n=e.getRect();return[n[cT[t]],n[cT[t]]+n[hT[t]]]}jm.registerAxisPointerClass("SingleAxisPointer",dT),hp({type:"single"});var mT=Yc.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(e){mT.superApply(this,"init",arguments),this.legendVisualProvider=new Iv(E(this.getData,this),E(this.getRawData,this))},fixData:function(e){var t=e.length,n={},i=ja(e,(function(e){return n.hasOwnProperty(e[0])||(n[e[0]]=-1),e[2]})),a=[];i.buckets.each((function(e,t){a.push({name:t,dataList:e})}));for(var r=a.length,o=0;o<r;++o){for(var s=a[o].name,l=0;l<a[o].dataList.length;++l){var u=a[o].dataList[l][0];n[u]=o}for(var u in n)n.hasOwnProperty(u)&&n[u]!==o&&(n[u]=o,e[t]=[],e[t][0]=u,e[t][1]=0,e[t][2]=s,t++)}return e},getInitialData:function(e,t){for(var n=t.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0].get("type"),i=k(e.data,(function(e){return void 0!==e[2]})),a=this.fixData(i||[]),r=[],o=this.nameMap=Q(),s=0,l=0;l<a.length;++l)r.push(a[l][2]),o.get(a[l][2])||(o.set(a[l][2],s),s++);var u=Xp(a,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:xp(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),c=new Lp(u,this);return c.initData(a),c},getLayerSeries:function(){for(var e=this.getData(),t=e.count(),n=[],i=0;i<t;++i)n[i]=i;var a=e.mapDimension("single"),r=ja(n,(function(t){return e.get("name",t)})),o=[];return r.buckets.each((function(t,n){t.sort((function(t,n){return e.get(a,t)-e.get(a,n)})),o.push({name:n,indices:t})})),o},getAxisTooltipData:function(e,t,n){z(e)||(e=e?[e]:[]);for(var i,a=this.getData(),r=this.getLayerSeries(),o=[],s=r.length,l=0;l<s;++l){for(var u=Number.MAX_VALUE,c=-1,h=r[l].indices.length,d=0;d<h;++d){var p=a.get(e[0],r[l].indices[d]),f=Math.abs(p-t);f<=u&&(i=p,u=f,c=r[l].indices[d])}o.push(c)}return{dataIndices:o,nestestValue:i}},formatTooltip:function(e){var t=this.getData(),n=t.getName(e),i=t.get(t.mapDimension("value"),e);return!isNaN(i)&&null!=i||(i="-"),Xl(n+" : "+i)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",color:"#000",fontSize:11},emphasis:{label:{show:!0}}}});function vT(e,t,n){if(e.count())for(var i,a=t.coordinateSystem,r=t.getLayerSeries(),o=e.mapDimension("single"),s=e.mapDimension("value"),l=A(r,(function(t){return A(t.indices,(function(t){var n=a.dataToPoint(e.get(o,t));return n[1]=e.get(s,t),n}))})),u=function(e){for(var t=e.length,n=e[0].length,i=[],a=[],r=0,o={},s=0;s<n;++s){for(var l=0,u=0;l<t;++l)u+=e[l][s][1];r<u&&(r=u),i.push(u)}for(var c=0;c<n;++c)a[c]=(r-i[c])/2;for(var h=r=0;h<n;++h){var d=i[h]+a[h];r<d&&(r=d)}return o.y0=a,o.max=r,o}(l),c=u.y0,h=n/u.max,d=r.length,p=r[0].indices.length,f=0;f<p;++f){i=c[f]*h,e.setItemLayout(r[0].indices[f],{layerIndex:0,x:l[0][f][0],y0:i,y:l[0][f][1]*h});for(var g=1;g<d;++g)i+=l[g-1][f][1]*h,e.setItemLayout(r[g].indices[f],{layerIndex:g,x:l[g][f][0],y0:i,y:l[g][f][1]*h})}}pp({type:"themeRiver",init:function(){this._layers=[]},render:function(e,t,n){var i=e.getData(),a=this.group,r=e.getLayerSeries(),o=i.getLayout("layoutInfo"),s=o.rect,l=o.boundaryGap;function u(e){return e.name}a.attr("position",[0,s.y+l[0]]);var c=new gp(this._layersSeries||[],r,u,u),h={};function d(t,n,o){var s=this._layers;if("remove"!==t){for(var l,u,c,d=[],p=[],f=r[n].indices,g=0;g<f.length;g++){var m=i.getItemLayout(f[g]),v=m.x,y=m.y0,_=m.y;d.push([v,y]),p.push([v,y+_]),l=i.getItemVisual(f[g],"color")}var b=i.getItemLayout(f[0]),w=i.getItemModel(f[g-1]),S=w.getModel("label"),M=S.get("margin");if("add"===t){var T=h[n]=new An;u=new em({shape:{points:d,stackedOnPoints:p,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),c=new zo({style:{x:b.x-M,y:b.y0+b.y/2}}),T.add(u),T.add(c),a.add(T),u.setClipPath(function(e,t,n){var i=new Zo({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return Qs(i,{shape:{width:e.width+20,height:e.height+20}},t,(function(){u.removeClipPath()})),i}(u.getBoundingRect(),e))}else T=s[o],u=T.childAt(0),c=T.childAt(1),a.add(T),h[n]=T,Js(u,{shape:{points:d,stackedOnPoints:p}},e),Js(c,{style:{x:b.x-M,y:b.y0+b.y/2}},e);var C=w.getModel("emphasis.itemStyle"),I=w.getModel("itemStyle");$s(c.style,S,{text:S.get("show")?e.getFormattedLabel(f[g-1],"normal")||i.getName(f[g-1]):null,textVerticalAlign:"middle"}),u.setStyle(x({fill:l},I.getItemStyle(["color"]))),Bs(u,C.getItemStyle())}else a.remove(s[n])}c.add(E(d,this,"add")).update(E(d,this,"update")).remove(E(d,this,"remove")).execute(),this._layersSeries=r,this._layers=h},dispose:function(){}}),op((function(e,t){e.eachSeriesByType("themeRiver",(function(e){var t=e.getData(),n=e.coordinateSystem,i={},a=n.getRect();i.rect=a;var r=e.get("boundaryGap"),o=n.getAxis();i.boundaryGap=r,"horizontal"===o.orient?(r[0]=wl(r[0],a.height),r[1]=wl(r[1],a.height),vT(t,e,a.height-r[0]-r[1])):(r[0]=wl(r[0],a.width),r[1]=wl(r[1],a.width),vT(t,e,a.width-r[0]-r[1])),t.setLayout("layoutInfo",i)}))})),sp((function(e){e.eachSeriesByType("themeRiver",(function(e){var t=e.getData(),n=e.getRawData(),i=e.get("color"),a=Q();t.each((function(e){a.set(t.getRawIndex(e),e)})),n.each((function(r){var o=n.getName(r),s=i[(e.nameMap.get(o)-1)%i.length];n.setItemVisual(r,"color",s);var l=a.get(r);null!=l&&t.setItemVisual(l,"color",s)}))}))})),ip(Gv("themeRiver")),Yc.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(e,t){var n={name:e.name,children:e.data};!function e(t){var n=0;I(t.children,(function(t){e(t);var i=t.value;z(i)&&(i=i[0]),n+=i}));var i=t.value;z(i)&&(i=i[0]),null!=i&&!isNaN(i)||(i=n),i<0&&(i=0),z(t.value)?t.value[0]=i:t.value=i}(n);var i=A(e.levels||[],(function(e){return new ml(e,this,t)}),this),a=ix.createTree(n,this,(function(e){e.wrapMethod("getItemModel",(function(e,t){var n=a.getNodeByDataIndex(t),r=i[n.depth];return r&&(e.parentModel=r),e}))}));return a.data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(e){var t=Yc.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return t.treePathInfo=Sx(n,this),t},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},highlight:{itemStyle:{opacity:1}},downplay:{itemStyle:{opacity:.5},label:{opacity:.6}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(e){e?this._viewRoot=e:e=this._viewRoot;var t=this.getRawData().tree.root;e&&(e===t||t.contains(e))||(this._viewRoot=t)}});function yT(e,t,n){An.call(this);var i=new Bo({z2:2});i.seriesIndex=t.seriesIndex;var a=new zo({z2:4,silent:e.getModel("label").get("silent")});function r(){a.ignore=a.hoverIgnore}function o(){a.ignore=a.normalIgnore}this.add(i),this.add(a),this.updateData(!0,e,"normal",t,n),this.on("emphasis",r).on("normal",o).on("mouseover",r).on("mouseout",o)}var xT=yT.prototype;xT.updateData=function(e,t,n,i,a){(this.node=t).piece=this,i=i||this._seriesModel,a=a||this._ecModel;var r=this.childAt(0);r.dataIndex=t.dataIndex;var o=t.getModel(),s=t.getLayout(),l=x({},s);l.label=null;var u=function(e,t,n){var i=e.getVisual("color"),a=e.getVisual("visualMeta");a&&0!==a.length||(i=null);var r=e.getModel("itemStyle").get("color");if(r)return r;if(i)return i;if(0===e.depth)return n.option.color[0];var o=n.option.color.length;return r=n.option.color[function(e){for(var t=e;1<t.depth;)t=t.parentNode;return S(e.getAncestors()[0].children,t)}(e)%o]}(t,0,a);!function(e,t,n){t.getData().setItemVisual(e.dataIndex,"color",n)}(t,i,u);var c,h=o.getModel("itemStyle").getItemStyle();c=_({lineJoin:"bevel",fill:(c="normal"===n?h:v(o.getModel(n+".itemStyle").getItemStyle(),h)).fill||u},c),e?(r.setShape(l),r.shape.r=s.r0,Js(r,{shape:{r:s.r}},i,t.dataIndex),r.useStyle(c)):"object"==typeof c.fill&&c.fill.type||"object"==typeof r.style.fill&&r.style.fill.type?(Js(r,{shape:l},i),r.useStyle(c)):Js(r,{shape:l,style:c},i),this._updateLabel(i,u,n);var d=o.getShallow("cursor");if(d&&r.attr("cursor",d),e){var p=i.getShallow("highlightPolicy");this._initEvents(r,t,i,p)}this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel,Bs(this)},xT.onEmphasis=function(e){var t=this;this.node.hostTree.root.eachNode((function(n){n.piece&&(t.node===n?n.piece.updateData(!1,n,"emphasis"):function(e,t,n){return"none"!==n&&("self"===n?e===t:"ancestor"===n?e===t||e.isAncestorOf(t):e===t||e.isDescendantOf(t))}(n,t.node,e)?n.piece.childAt(0).trigger("highlight"):"none"!==e&&n.piece.childAt(0).trigger("downplay"))}))},xT.onNormal=function(){this.node.hostTree.root.eachNode((function(e){e.piece&&e.piece.updateData(!1,e,"normal")}))},xT.onHighlight=function(){this.updateData(!1,this.node,"highlight")},xT.onDownplay=function(){this.updateData(!1,this.node,"downplay")},xT._updateLabel=function(e,t,n){var i=this.node.getModel(),a=i.getModel("label"),r="normal"===n||"emphasis"===n?a:i.getModel(n+".label"),o=i.getModel("emphasis.label"),s=r.get("formatter")?n:"normal",l=H(e.getFormattedLabel(this.node.dataIndex,s,null,null,"label"),this.node.name);!1===M("show")&&(l="");var u=this.node.getLayout(),c=r.get("minAngle");null==c&&(c=a.get("minAngle")),c=c/180*Math.PI;var h=u.endAngle-u.startAngle;null!=c&&Math.abs(h)<c&&(l="");var d=this.childAt(1);Hs(d.style,d.hoverStyle||{},a,o,{defaultText:r.getShallow("show")?l:null,autoColor:t,useInsideStyle:!0});var p,f=(u.startAngle+u.endAngle)/2,g=Math.cos(f),m=Math.sin(f),v=M("position"),y=M("distance")||0,x=M("align");"outside"===v?(p=u.r+y,x=f>Math.PI/2?"right":"left"):x&&"center"!==x?"left"===x?(p=u.r0+y,f>Math.PI/2&&(x="right")):"right"===x&&(p=u.r-y,f>Math.PI/2&&(x="left")):(p=(u.r+u.r0)/2,x="center"),d.attr("style",{text:l,textAlign:x,textVerticalAlign:M("verticalAlign")||"middle",opacity:M("opacity")});var _=p*g+u.cx,b=p*m+u.cy;d.attr("position",[_,b]);var w=M("rotate"),S=0;function M(e){var t=r.get(e);return null==t?a.get(e):t}"radial"===w?(S=-f)<-Math.PI/2&&(S+=Math.PI):"tangential"===w?(S=Math.PI/2-f)>Math.PI/2?S-=Math.PI:S<-Math.PI/2&&(S+=Math.PI):"number"==typeof w&&(S=w*Math.PI/180),d.attr("rotation",S)},xT._initEvents=function(e,t,n,i){function a(){o.onEmphasis(i)}function r(){o.onNormal()}e.off("mouseover").off("mouseout").off("emphasis").off("normal");var o=this;n.isAnimationEnabled()&&e.on("mouseover",a).on("mouseout",r).on("emphasis",a).on("normal",r).on("downplay",(function(){o.onDownplay()})).on("highlight",(function(){o.onHighlight()}))},M(yT,An),rh.extend({type:"sunburst",init:function(){},render:function(e,t,n,i){var a=this;this.seriesModel=e,this.api=n,this.ecModel=t;var r=e.getData(),o=r.tree.root,s=e.getViewRoot(),l=this.group,u=e.get("renderLabelForZeroData"),c=[];s.eachNode((function(e){c.push(e)}));var h=this._oldChildren||[];if(function(n,i){function a(e){return e.getId()}function s(a,s){!function(n,i){if(u||!n||n.getValue()||(n=null),n!==o&&i!==o)if(i&&i.piece)n?(i.piece.updateData(!1,n,"normal",e,t),r.setItemGraphicEl(n.dataIndex,i.piece)):function(e){e&&e.piece&&(l.remove(e.piece),e.piece=null)}(i);else if(n){var a=new yT(n,e,t);l.add(a),r.setItemGraphicEl(n.dataIndex,a)}}(null==a?null:n[a],null==s?null:i[s])}0===n.length&&0===i.length||new gp(i,n,a,a).add(s).update(s).remove(P(s,null)).execute()}(c,h),function(n,i){if(0<i.depth){a.virtualPiece?a.virtualPiece.updateData(!1,n,"normal",e,t):(a.virtualPiece=new yT(n,e,t),l.add(a.virtualPiece)),i.piece._onclickEvent&&i.piece.off("click",i.piece._onclickEvent);var r=function(e){a._rootToNode(i.parentNode)};i.piece._onclickEvent=r,a.virtualPiece.on("click",r)}else a.virtualPiece&&(l.remove(a.virtualPiece),a.virtualPiece=null)}(o,s),i&&i.highlight&&i.highlight.piece){var d=e.getShallow("highlightPolicy");i.highlight.piece.onEmphasis(d)}else if(i&&i.unhighlight){var p=this.virtualPiece;!p&&o.children.length&&(p=o.children[0].piece),p&&p.onNormal()}this._initEvents(),this._oldChildren=c},dispose:function(){},_initEvents:function(){function e(e){var n=!1;t.seriesModel.getViewRoot().eachNode((function(i){if(!n&&i.piece&&i.piece.childAt(0)===e.target){var a=i.getModel().get("nodeClick");if("rootToNode"===a)t._rootToNode(i);else if("link"===a){var r=i.getModel(),o=r.get("link");o&&tu(o,r.get("target",!0)||"_blank")}n=!0}}))}var t=this;this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",e),this.group._onclickEvent=e},_rootToNode:function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:"sunburstRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},containPoint:function(e,t){var n=t.getData().getItemLayout(0);if(n){var i=e[0]-n.cx,a=e[1]-n.cy,r=Math.sqrt(i*i+a*a);return r<=n.r&&r>=n.r0}}});var _T="sunburstRootToNode";ap({type:_T,update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},(function(t,n){var i=xx(e,[_T],t);if(i){var a=t.getViewRoot();a&&(e.direction=bx(a,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node)}}))}));var bT="sunburstHighlight";ap({type:bT,update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},(function(t,n){var i=xx(e,[bT],t);i&&(e.highlight=i.node)}))})),ap({type:"sunburstUnhighlight",update:"updateView"},(function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},(function(t,n){e.unhighlight=!0}))}));var wT=Math.PI/180;function ST(e,t){return t=t||[0,0],A(["x","y"],(function(n,i){var a=this.getAxis(n),r=t[i],o=e[i]/2;return"category"===a.type?a.getBandWidth():Math.abs(a.dataToCoord(r-o)-a.dataToCoord(r+o))}),this)}function MT(e,t){return t=t||[0,0],A([0,1],(function(n){var i=t[n],a=e[n]/2,r=[],o=[];return r[n]=i-a,o[n]=i+a,r[1-n]=o[1-n]=t[1-n],Math.abs(this.dataToPoint(r)[n]-this.dataToPoint(o)[n])}),this)}function TT(e,t){var n=this.getAxis(),i=t instanceof Array?t[0]:t,a=(e instanceof Array?e[0]:e)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-a)-n.dataToCoord(i+a))}function CT(e,t){return A(["Radius","Angle"],(function(n,i){var a=this["get"+n+"Axis"](),r=t[i],o=e[i]/2,s="dataTo"+n,l="category"===a.type?a.getBandWidth():Math.abs(a[s](r-o)-a[s](r+o));return"Angle"===n&&(l=l*Math.PI/180),l}),this)}sp(P(zv,"sunburst")),op(P((function(e,t,n,i){t.eachSeriesByType(e,(function(e){var t=e.get("center"),i=e.get("radius");z(i)||(i=[0,i]),z(t)||(t=[t,t]);var a=n.getWidth(),r=n.getHeight(),o=Math.min(a,r),s=wl(t[0],a),l=wl(t[1],r),u=wl(i[0],o/2),c=wl(i[1],o/2),h=-e.get("startAngle")*wT,d=e.get("minAngle")*wT,p=e.getData().tree.root,f=e.getViewRoot(),g=f.depth,m=e.get("sort");null!=m&&function e(t,n){var i=t.children||[];t.children=function(e,t){if("function"==typeof t)return e.sort(t);var n="asc"===t;return e.sort((function(e,t){var i=(e.getValue()-t.getValue())*(n?1:-1);return 0==i?(e.dataIndex-t.dataIndex)*(n?-1:1):i}))}(i,n),i.length&&I(t.children,(function(t){e(t,n)}))}(f,m);var v=0;I(f.children,(function(e){isNaN(e.getValue())||v++}));var y=f.getValue(),x=Math.PI/(y||v)*2,_=0<f.depth,b=f.height-(_?-1:1),w=(c-u)/(b||1),S=e.get("clockwise"),M=e.get("stillShowZeroSum"),T=S?1:-1,C=function(e,t){if(e){var n=t;if(e!==p){var i=e.getValue(),a=0===y&&M?x:i*x;a<d&&(a=d),n=t+T*a;var r=e.depth-g-(_?-1:1),c=u+w*r,h=u+w*(1+r),f=e.getModel();null!=f.get("r0")&&(c=wl(f.get("r0"),o/2)),null!=f.get("r")&&(h=wl(f.get("r"),o/2)),e.setLayout({angle:a,startAngle:t,endAngle:n,clockwise:S,cx:s,cy:l,r0:c,r:h})}if(e.children&&e.children.length){var m=0;I(e.children,(function(e){m+=C(e,t+m)}))}return n-t}};if(_){var A=u,D=u+w,k=2*Math.PI;p.setLayout({angle:k,startAngle:h,endAngle:h+k,clockwise:S,cx:s,cy:l,r0:A,r:D})}C(f,h)}))}),"sunburst")),ip(P(Gv,"sunburst"));var IT=hs,AT=["itemStyle"],DT=["emphasis","itemStyle"],kT=["label"],LT=["emphasis","label"],ET={cartesian2d:function(e){var t=e.grid.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:E(ST,e)}}},geo:function(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(t){return e.dataToPoint(t)},size:E(MT,e)}}},singleAxis:function(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:E(TT,e)}}},polar:function(e){var t=e.getRadiusAxis(),n=e.getAngleAxis(),i=t.getExtent();return i[0]>i[1]&&i.reverse(),{coordSys:{type:"polar",cx:e.cx,cy:e.cy,r:i[1],r0:i[0]},api:{coord:E((function(i){var a=t.dataToRadius(i[0]),r=n.dataToAngle(i[1]),o=e.coordToPoint([a,r]);return o.push(a,r*Math.PI/180),o})),size:E(CT,e)}}},calendar:function(e){var t=e.getRect(),n=e.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:e.getCellWidth(),cellHeight:e.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(t,n){return e.dataToPoint(t,n)}}}}};function PT(e,t,n,i,a){null==n[e]||a||(t[e]=n[e],n[e]=i[e])}function zT(e,t,n,i){var a=e.get("renderItem"),r=e.coordinateSystem,o={};r&&(o=r.prepareCustoms?r.prepareCustoms():ET[r.type](r));var s,l,u,c,h,d=_({getWidth:i.getWidth,getHeight:i.getHeight,getZr:i.getZr,getDevicePixelRatio:i.getDevicePixelRatio,value:function(e,n){return null==n&&(n=s),t.get(t.getDimension(e||0),n)},style:function(n,i){null==i&&(i=s),g(i);var a=l.getModel(AT).getItemStyle();null!=h&&(a.fill=h);var r=t.getItemVisual(i,"opacity");null!=r&&(a.opacity=r);var o=n?VT(n,u):u;return $s(a,o,null,{autoColor:h,isRectText:!0}),a.text=o.getShallow("show")?F(e.getFormattedLabel(i,"normal"),Tg(t,i)):null,n&&GT(a,n),a},styleEmphasis:function(n,i){null==i&&(i=s),g(i);var a=l.getModel(DT).getItemStyle(),r=n?VT(n,c):c;return $s(a,r,null,{isRectText:!0},!0),a.text=r.getShallow("show")?$(e.getFormattedLabel(i,"emphasis"),e.getFormattedLabel(i,"normal"),Tg(t,i)):null,n&&GT(a,n),a},visual:function(e,n){return null==n&&(n=s),t.getItemVisual(n,e)},barLayout:function(e){if(r.getBaseAxis)return function(e){var t=[],n=e.axis;if("category"===n.type){for(var i=n.getBandWidth(),a=0;a<e.count;a++)t.push(_({bandWidth:i,axisKey:"axis0",stackId:pf+a},e));var r=xf(t),o=[];for(a=0;a<e.count;a++){var s=r.axis0[pf+a];s.offsetCenter=s.offset+s.width/2,o.push(s)}return o}}(_({axis:r.getBaseAxis()},e))},currentSeriesIndices:function(){return n.getCurrentSeriesIndices()},font:function(e){return qs(e,n)}},o.api||{}),p={context:{},seriesId:e.id,seriesName:e.name,seriesIndex:e.seriesIndex,coordSys:o.coordSys,dataInsideLength:t.count(),encode:function(e){var t={};return I(e.dimensions,(function(n,i){var a=e.getDimensionInfo(n);if(!a.isExtraCoord){var r=a.coordDim;(t[r]=t[r]||[])[a.coordDimIndex]=i}})),t}(e.getData())},f=!0;return function(e,n){return s=e,f=!0,a&&a(_({dataIndexInside:e,dataIndex:t.getRawIndex(e),actionType:n?n.type:null},p),d)};function g(e){null==e&&(e=s),f&&(l=t.getItemModel(e),u=l.getModel(kT),c=l.getModel(LT),h=t.getItemVisual(e,"color"),f=!1)}}function OT(e,t,n,i,a,r){return(e=NT(e,t,n,i,a,r,!0))&&r.setItemGraphicEl(t,e),e}function NT(e,t,n,i,a,r,o){var s=!n,l=(n=n||{}).type,u=n.shape,c=n.style;if(e&&(s||null!=l&&l!==e.__customGraphicType||"path"===l&&function(e){return e&&(e.hasOwnProperty("pathData")||e.hasOwnProperty("d"))}(u)&&HT(u)!==e.__customPathData||"image"===l&&FT(c,"image")&&c.image!==e.__customImagePath||"text"===l&&FT(u,"text")&&c.text!==e.__customText)&&(a.remove(e),e=null),!s){var h=!e;return function(e,t,n,i,a,r,o){var s={},l=n.style||{};if(n.shape&&(s.shape=m(n.shape)),n.position&&(s.position=n.position.slice()),n.scale&&(s.scale=n.scale.slice()),n.origin&&(s.origin=n.origin.slice()),n.rotation&&(s.rotation=n.rotation),"image"===e.type&&n.style){var u=s.style={};I(["x","y","width","height"],(function(t){PT(t,u,l,e.style,r)}))}if("text"===e.type&&n.style&&(u=s.style={},I(["x","y"],(function(t){PT(t,u,l,e.style,r)})),!l.hasOwnProperty("textFill")&&l.fill&&(l.textFill=l.fill),!l.hasOwnProperty("textStroke")&&l.stroke&&(l.textStroke=l.stroke)),"group"!==e.type&&(e.useStyle(l),r)){e.style.opacity=0;var c=l.opacity;null==c&&(c=1),Qs(e,{style:{opacity:c}},i,t)}r?e.attr(s):Js(e,s,i,t),n.hasOwnProperty("z2")&&e.attr("z2",n.z2||0),n.hasOwnProperty("silent")&&e.attr("silent",n.silent),n.hasOwnProperty("invisible")&&e.attr("invisible",n.invisible),n.hasOwnProperty("ignore")&&e.attr("ignore",n.ignore),n.hasOwnProperty("info")&&e.attr("info",n.info);var h=n.styleEmphasis;Es(e,h),o&&Vs(e,!1!==h)}(e=e||function(e){var t,n=e.type;if("path"===n){var i=e.shape,a=null!=i.width&&null!=i.height?{x:i.x||0,y:i.y||0,width:i.width,height:i.height}:null,r=HT(i);(t=xs(r,null,a,i.layout||"center")).__customPathData=r}else if("image"===n)(t=new Zi({})).__customImagePath=e.style.image;else if("text"===n)(t=new zo({})).__customText=e.style.text;else if("group"===n)t=new An;else{if("compoundPath"===n)throw new Error('"compoundPath" is not supported yet.');t=new(ys(n))}return t.__customGraphicType=n,t.name=e.name,t}(n),t,n,i,0,h,o),"group"===l&&function(e,t,n,i,a){var r=n.children,o=r?r.length:0,s=n.$mergeChildren,l="byName"===s||n.diffChildrenByName,u=!1===s;if(o||l||u){if(l)return function(e){new gp(e.oldChildren,e.newChildren,RT,RT,e).add(BT).update(BT).remove(WT).execute()}({oldChildren:e.children()||[],newChildren:r||[],dataIndex:t,animatableModel:i,group:e,data:a});u&&e.removeAll();for(var c=0;c<o;c++)r[c]&&NT(e.childAt(c),t,r[c],i,e,a)}}(e,t,n,i,r),a.add(e),e}}function RT(e,t){var n=e&&e.name;return null!=n?n:"e\0\0"+t}function BT(e,t){var n=this.context,i=null!=e?n.newChildren[e]:null;NT(null!=t?n.oldChildren[t]:null,n.dataIndex,i,n.animatableModel,n.group,n.data)}function VT(e,t){var n=new ml({},t);return I(IT,(function(t,i){e.hasOwnProperty(t)&&(n.option[i]=e[t])})),n}function GT(e,t){for(var n in t)!t.hasOwnProperty(n)&&IT.hasOwnProperty(n)||(e[n]=t[n])}function WT(e){var t=this.context,n=t.oldChildren[e];n&&t.group.remove(n)}function HT(e){return e&&(e.pathData||e.d)}function FT(e,t){return e&&e.hasOwnProperty(t)}function $T(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function XT(e,t){return t.dim+e.model.componentIndex}function YT(e,t){_g.call(this,"radius",e,t),this.type="category"}Yc.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0,clip:!1},getInitialData:function(e,t){return Jp(this.getSource(),this)},getDataParams:function(e,t,n){var i=Yc.prototype.getDataParams.apply(this,arguments);return n&&(i.info=n.info),i}}),rh.extend({type:"custom",_data:null,render:function(e,t,n,i){var a=this._data,r=e.getData(),o=this.group,s=zT(e,r,t,n);r.diff(a).add((function(t){OT(null,t,s(t,i),e,o,r)})).update((function(t,n){OT(a.getItemGraphicEl(n),t,s(t,i),e,o,r)})).remove((function(e){var t=a.getItemGraphicEl(e);t&&o.remove(t)})).execute();var l=e.get("clip",!0)?im(e.coordinateSystem,!1,e):null;l?o.setClipPath(l):o.removeClipPath(),this._data=r},incrementalPrepareRender:function(e,t,n){this.group.removeAll(),this._data=null},incrementalRender:function(e,t,n,i,a){var r=t.getData(),o=zT(t,r,n,i);function s(e){e.isGroup||(e.incremental=!0,e.useHoverLayer=!0)}for(var l=e.start;l<e.end;l++)OT(null,l,o(l,a),t,this.group,r).traverse(s)},dispose:te,filterForExposedEvent:function(e,t,n,i){var a=t.element;if(null==a||n.name===a)return!0;for(;(n=n.parent)&&n!==this.group;)if(n.name===a)return!0;return!1}}),YT.prototype={constructor:YT,pointToData:function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},dataToRadius:_g.prototype.dataToCoord,radiusToData:_g.prototype.coordToData},M(YT,_g);var UT=Ha();function jT(e,t){t=t||[0,360],_g.call(this,"angle",e,t),this.type="category"}function ZT(e){this.name=e||"",this.cx=0,this.cy=0,this._radiusAxis=new YT,this._angleAxis=new jT,this._radiusAxis.polar=this._angleAxis.polar=this}jT.prototype={constructor:jT,pointToData:function(e,t){return this.polar.pointToData(e,t)["radius"===this.dim?0:1]},dataToAngle:_g.prototype.dataToCoord,angleToData:_g.prototype.coordToData,calculateCategoryInterval:function(){var e=this.getLabelModel(),t=this.scale,n=t.getExtent(),i=t.count();if(n[1]-n[0]<1)return 0;var a=n[0],r=this.dataToCoord(a+1)-this.dataToCoord(a),o=Math.abs(r),s=hi(a,e.getFont(),"center","top"),l=Math.max(s.height,7)/o;isNaN(l)&&(l=1/0);var u=Math.max(0,Math.floor(l)),c=UT(this.model),h=c.lastAutoInterval,d=c.lastTickCount;return null!=h&&null!=d&&Math.abs(h-u)<=1&&Math.abs(d-i)<=1&&u<h?u=h:(c.lastTickCount=i,c.lastAutoInterval=u),u}},M(jT,_g),ZT.prototype={type:"polar",axisPointerEnabled:!0,constructor:ZT,dimensions:["radius","angle"],model:null,containPoint:function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},containData:function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},getAxis:function(e){return this["_"+e+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(e){var t=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===e&&t.push(n),i.scale.type===e&&t.push(i),t},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(e){var t=null!=e&&"auto"!==e?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},dataToPoint:function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},pointToData:function(e,t){var n=this.pointToCoord(e);return[this._radiusAxis.radiusToData(n[0],t),this._angleAxis.angleToData(n[1],t)]},pointToCoord:function(e){var t=e[0]-this.cx,n=e[1]-this.cy,i=this.getAngleAxis(),a=i.getExtent(),r=Math.min(a[0],a[1]),o=Math.max(a[0],a[1]);i.inverse?r=o-360:o=r+360;var s=Math.sqrt(t*t+n*n);t/=s,n/=s;for(var l=Math.atan2(-n,t)/Math.PI*180,u=l<r?1:-1;l<r||o<l;)l+=360*u;return[s,l]},coordToPoint:function(e){var t=e[0],n=e[1]/180*Math.PI;return[Math.cos(n)*t+this.cx,-Math.sin(n)*t+this.cy]},getArea:function(){var e=this.getAngleAxis(),t=this.getRadiusAxis().getExtent().slice();t[0]>t[1]&&t.reverse();var n=e.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:t[0],r:t[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:e.inverse,contain:function(e,t){var n=e-this.cx,i=t-this.cy,a=n*n+i*i,r=this.r,o=this.r0;return a<=r*r&&o*o<=a}}}};var qT=vu.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});v(qT.prototype,Zf);function KT(e,t){return t.type||(t.data?"category":"value")}function JT(e,t){var n=this,i=n.getAngleAxis(),a=n.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),e.eachSeries((function(e){if(e.coordinateSystem===n){var t=e.getData();I(t.mapDimension("radius",!0),(function(e){a.scale.unionExtentFromData(t,Kp(t,e))})),I(t.mapDimension("angle",!0),(function(e){i.scale.unionExtentFromData(t,Kp(t,e))}))}})),Ff(i.scale,i.model),Ff(a.scale,a.model),"category"===i.type&&!i.onBand){var r=i.getExtent(),o=360/i.scale.count();i.inverse?r[1]+=o:r[1]-=o,i.setExtent(r[0],r[1])}}function QT(e,t){if(e.type=t.get("type"),e.scale=$f(t),e.onBand=t.get("boundaryGap")&&"category"===e.type,e.inverse=t.get("inverse"),"angleAxis"===t.mainType){e.inverse^=t.get("clockwise");var n=t.get("startAngle");e.setExtent(n,n+(e.inverse?-360:360))}(t.axis=e).model=t}xm("angle",qT,KT,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),xm("radius",qT,KT,{splitNumber:5}),cp({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(e){var t;return this.ecModel.eachComponent(e,(function(e){e.getCoordSysModel()===this&&(t=e)}),this),t},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}}),ju.register("polar",{dimensions:ZT.prototype.dimensions,create:function(e,t){var n=[];return e.eachComponent("polar",(function(e,i){var a=new ZT(i);a.update=JT;var r=a.getRadiusAxis(),o=a.getAngleAxis(),s=e.findAxisModel("radiusAxis"),l=e.findAxisModel("angleAxis");QT(r,s),QT(o,l),function(e,t,n){var i=t.get("center"),a=n.getWidth(),r=n.getHeight();e.cx=wl(i[0],a),e.cy=wl(i[1],r);var o=e.getRadiusAxis(),s=Math.min(a,r)/2,l=t.get("radius");null==l?l=[0,"100%"]:z(l)||(l=[0,l]),l=[wl(l[0],s),wl(l[1],s)],o.inverse?o.setExtent(l[1],l[0]):o.setExtent(l[0],l[1])}(a,e,t),n.push(a),(e.coordinateSystem=a).model=e})),e.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var n=e.queryComponents({mainType:"polar",index:t.get("polarIndex"),id:t.get("polarId")})[0];t.coordinateSystem=n.coordinateSystem}})),n}});var eC=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function tC(e,t,n){t[1]>t[0]&&(t=t.slice().reverse());var i=e.coordToPoint([t[0],n]),a=e.coordToPoint([t[1],n]);return{x1:i[0],y1:i[1],x2:a[0],y2:a[1]}}function nC(e){return e.getRadiusAxis().inverse?0:1}function iC(e){var t=e[0],n=e[e.length-1];t&&n&&Math.abs(Math.abs(t.coord-n.coord)-360)<1e-4&&e.pop()}jm.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var n=e.axis,i=n.polar,a=i.getRadiusAxis().getExtent(),r=n.getTicksCoords(),o=n.getMinorTicksCoords(),s=A(n.getViewLabels(),(function(e){return(e=m(e)).coord=n.dataToCoord(e.tickValue),e}));iC(s),iC(r),I(eC,(function(t){!e.get(t+".show")||n.scale.isBlank()&&"axisLine"!==t||this["_"+t](e,i,r,o,a,s)}),this)}},_axisLine:function(e,t,n,i,a){var r,o=e.getModel("axisLine.lineStyle"),s=nC(t),l=s?0:1;(r=0===a[l]?new No({shape:{cx:t.cx,cy:t.cy,r:a[s]},style:o.getLineStyle(),z2:1,silent:!0}):new Vo({shape:{cx:t.cx,cy:t.cy,r:a[s],r0:a[l]},style:o.getLineStyle(),z2:1,silent:!0})).style.fill=null,this.group.add(r)},_axisTick:function(e,t,n,i,a){var r=e.getModel("axisTick"),o=(r.get("inside")?-1:1)*r.get("length"),s=a[nC(t)],l=A(n,(function(e){return new Ko({shape:tC(t,[s,s+o],e.coord)})}));this.group.add(ws(l,{style:_(r.getModel("lineStyle").getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")})}))},_minorTick:function(e,t,n,i,a){if(i.length){for(var r=e.getModel("axisTick"),o=e.getModel("minorTick"),s=(r.get("inside")?-1:1)*o.get("length"),l=a[nC(t)],u=[],c=0;c<i.length;c++)for(var h=0;h<i[c].length;h++)u.push(new Ko({shape:tC(t,[l,l+s],i[c][h].coord)}));this.group.add(ws(u,{style:_(o.getModel("lineStyle").getLineStyle(),_(r.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}))}))}},_axisLabel:function(e,t,n,i,a,r){var o=e.getCategories(!0),s=e.getModel("axisLabel"),l=s.get("margin"),u=e.get("triggerEvent");I(r,(function(n,i){var r=s,c=n.tickValue,h=a[nC(t)],d=t.coordToPoint([h+l,n.coord]),p=t.cx,f=t.cy,g=Math.abs(d[0]-p)/h<.3?"center":d[0]>p?"left":"right",m=Math.abs(d[1]-f)/h<.3?"middle":d[1]>f?"top":"bottom";o&&o[c]&&o[c].textStyle&&(r=new ml(o[c].textStyle,s,s.ecModel));var v=new zo({silent:Em.isLabelSilent(e)});this.group.add(v),$s(v.style,r,{x:d[0],y:d[1],textFill:r.getTextColor()||e.get("axisLine.lineStyle.color"),text:n.formattedLabel,textAlign:g,textVerticalAlign:m}),u&&(v.eventData=Em.makeAxisEventDataBase(e),v.eventData.targetType="axisLabel",v.eventData.value=n.rawLabel)}),this)},_splitLine:function(e,t,n,i,a){var r=e.getModel("splitLine").getModel("lineStyle"),o=r.get("color"),s=0;o=o instanceof Array?o:[o];for(var l=[],u=0;u<n.length;u++){var c=s++%o.length;l[c]=l[c]||[],l[c].push(new Ko({shape:tC(t,a,n[u].coord)}))}for(u=0;u<l.length;u++)this.group.add(ws(l[u],{style:_({stroke:o[u%o.length]},r.getLineStyle()),silent:!0,z:e.get("z")}))},_minorSplitLine:function(e,t,n,i,a){if(i.length){for(var r=e.getModel("minorSplitLine").getModel("lineStyle"),o=[],s=0;s<i.length;s++)for(var l=0;l<i[s].length;l++)o.push(new Ko({shape:tC(t,a,i[s][l].coord)}));this.group.add(ws(o,{style:r.getLineStyle(),silent:!0,z:e.get("z")}))}},_splitArea:function(e,t,n,i,a){if(n.length){var r=e.getModel("splitArea").getModel("areaStyle"),o=r.get("color"),s=0;o=o instanceof Array?o:[o];for(var l=[],u=Math.PI/180,c=-n[0].coord*u,h=Math.min(a[0],a[1]),d=Math.max(a[0],a[1]),p=e.get("clockwise"),f=1;f<n.length;f++){var g=s++%o.length;l[g]=l[g]||[],l[g].push(new Bo({shape:{cx:t.cx,cy:t.cy,r0:h,r:d,startAngle:c,endAngle:-n[f].coord*u,clockwise:p},silent:!0})),c=-n[f].coord*u}for(f=0;f<l.length;f++)this.group.add(ws(l[f],{style:_({fill:o[f%o.length]},r.getAreaStyle()),silent:!0}))}}});var aC=["axisLine","axisTickLabel","axisName"],rC=["splitLine","splitArea","minorSplitLine"];jm.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var n=e.axis,i=n.polar,a=i.getAngleAxis(),r=n.getTicksCoords(),o=n.getMinorTicksCoords(),s=a.getExtent()[0],l=n.getExtent(),u=function(e,t,n){return{position:[e.cx,e.cy],rotation:n/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:t.getModel("axisLabel").get("rotate"),z2:1}}(i,e,s),c=new Em(e,u);I(aC,c.add,c),this.group.add(c.getGroup()),I(rC,(function(t){e.get(t+".show")&&!n.scale.isBlank()&&this["_"+t](e,i,s,l,r,o)}),this)}},_splitLine:function(e,t,n,i,a){var r=e.getModel("splitLine").getModel("lineStyle"),o=r.get("color"),s=0;o=o instanceof Array?o:[o];for(var l=[],u=0;u<a.length;u++){var c=s++%o.length;l[c]=l[c]||[],l[c].push(new No({shape:{cx:t.cx,cy:t.cy,r:a[u].coord}}))}for(u=0;u<l.length;u++)this.group.add(ws(l[u],{style:_({stroke:o[u%o.length],fill:null},r.getLineStyle()),silent:!0}))},_minorSplitLine:function(e,t,n,i,a,r){if(r.length){for(var o=e.getModel("minorSplitLine").getModel("lineStyle"),s=[],l=0;l<r.length;l++)for(var u=0;u<r[l].length;u++)s.push(new No({shape:{cx:t.cx,cy:t.cy,r:r[l][u].coord}}));this.group.add(ws(s,{style:_({fill:null},o.getLineStyle()),silent:!0}))}},_splitArea:function(e,t,n,i,a){if(a.length){var r=e.getModel("splitArea").getModel("areaStyle"),o=r.get("color"),s=0;o=o instanceof Array?o:[o];for(var l=[],u=a[0].coord,c=1;c<a.length;c++){var h=s++%o.length;l[h]=l[h]||[],l[h].push(new Bo({shape:{cx:t.cx,cy:t.cy,r0:u,r:a[c].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),u=a[c].coord}for(c=0;c<l.length;c++)this.group.add(ws(l[c],{style:_({fill:o[c%o.length]},r.getAreaStyle()),silent:!0}))}}});var oC=UM.extend({makeElOption:function(e,t,n,i,a){var r=n.axis;"angle"===r.dim&&(this.animationThreshold=Math.PI/18);var o,s=r.polar,l=s.getOtherAxis(r).getExtent();o=r["dataTo"+Ql(r.dim)](t);var u=i.get("type");if(u&&"none"!==u){var c=JM(i),h=sC[u](r,s,o,l,c);h.style=c,e.graphicKey=h.type,e.pointer=h}var d=i.get("label.margin");QM(e,n,i,a,function(e,t,n,i,a){var r=t.axis,o=r.dataToCoord(e),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,c,h=i.getRadiusAxis().getExtent();if("radius"===r.dim){var d=at();ut(d,d,s),lt(d,d,[i.cx,i.cy]),l=tl([o,-a],d);var p=t.getModel("axisLabel").get("rotate")||0,f=Em.innerTextLayout(s,p*Math.PI/180,-1);u=f.textAlign,c=f.textVerticalAlign}else{var g=h[1];l=i.coordToPoint([g+a,o]);var m=i.cx,v=i.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",c=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:c}}(t,n,0,s,d))}}),sC={line:function(e,t,n,i,a){return"angle"===e.dim?{type:"Line",shape:iT(t.coordToPoint([i[0],n]),t.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:n}}},shadow:function(e,t,n,i,a){var r=Math.max(1,e.getBandWidth()),o=Math.PI/180;return"angle"===e.dim?{type:"Sector",shape:rT(t.cx,t.cy,i[0],i[1],(-n-r/2)*o,(r/2-n)*o)}:{type:"Sector",shape:rT(t.cx,t.cy,n-r/2,n+r/2,0,2*Math.PI)}}};function lC(e,t){t.update="updateView",ap(t,(function(t,n){var i={};return n.eachComponent({mainType:"geo",query:t},(function(n){n[e](t.name),I(n.coordinateSystem.regions,(function(e){i[e.name]=n.isSelected(e.name)||!1}))})),{selected:i,name:t.name}}))}function uC(e,t,n){this._model=e}function cC(e,t,n,i){var a=n.calendarModel,r=n.seriesModel,o=a?a.coordinateSystem:r?r.coordinateSystem:null;return o===this?o[e](i):null}jm.registerAxisPointerClass("PolarAxisPointer",oC),op(P((function(e,t,n){var i={},a=function(e){var t={};I(e,(function(e,n){var i=e.getData(),a=e.coordinateSystem,r=a.getBaseAxis(),o=XT(a,r),s=r.getExtent(),l="category"===r.type?r.getBandWidth():Math.abs(s[1]-s[0])/i.count(),u=t[o]||{bandWidth:l,remainedWidth:l,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},c=u.stacks;t[o]=u;var h=$T(e);c[h]||u.autoWidthCount++,c[h]=c[h]||{width:0,maxWidth:0};var d=wl(e.get("barWidth"),l),p=wl(e.get("barMaxWidth"),l),f=e.get("barGap"),g=e.get("barCategoryGap");d&&!c[h].width&&(d=Math.min(u.remainedWidth,d),c[h].width=d,u.remainedWidth-=d),p&&(c[h].maxWidth=p),null!=f&&(u.gap=f),null!=g&&(u.categoryGap=g)}));var n={};return I(t,(function(e,t){n[t]={};var i=e.stacks,a=e.bandWidth,r=wl(e.categoryGap,a),o=wl(e.gap,1),s=e.remainedWidth,l=e.autoWidthCount,u=(s-r)/(l+(l-1)*o);u=Math.max(u,0),I(i,(function(e,t){var n=e.maxWidth;n&&n<u&&(n=Math.min(n,s),e.width&&(n=Math.min(n,e.width)),s-=n,e.width=n,l--)})),u=(s-r)/(l+(l-1)*o),u=Math.max(u,0);var c,h=0;I(i,(function(e,t){e.width||(e.width=u),h+=(c=e).width*(1+o)})),c&&(h-=c.width*o);var d=-h/2;I(i,(function(e,i){n[t][i]=n[t][i]||{offset:d,width:e.width},d+=e.width*(1+o)}))})),n}(k(t.getSeriesByType(e),(function(e){return!t.isSeriesFiltered(e)&&e.coordinateSystem&&"polar"===e.coordinateSystem.type})));t.eachSeriesByType(e,(function(e){if("polar"===e.coordinateSystem.type){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),o=XT(n,r),s=$T(e),l=a[o][s],u=l.offset,c=l.width,h=n.getOtherAxis(r),d=e.coordinateSystem.cx,p=e.coordinateSystem.cy,f=e.get("barMinHeight")||0,g=e.get("barMinAngle")||0;i[s]=i[s]||[];for(var m=t.mapDimension(h.dim),v=t.mapDimension(r.dim),y=qp(t,m),x="radius"!==r.dim||!e.get("roundCap",!0),_="radius"===h.dim?h.dataToRadius(0):h.dataToAngle(0),b=0,w=t.count();b<w;b++){var S,M,T,C,I=t.get(m,b),A=t.get(v,b),D=0<=I?"p":"n",k=_;if(y&&(i[s][A]||(i[s][A]={p:_,n:_}),k=i[s][A][D]),"radius"===h.dim){var L=h.dataToRadius(I)-_,E=r.dataToAngle(A);Math.abs(L)<f&&(L=(L<0?-1:1)*f),M=(S=k)+L,C=(T=E-u)-c,y&&(i[s][A][D]=M)}else{var P=h.dataToAngle(I,x)-_,z=r.dataToRadius(A);Math.abs(P)<g&&(P=(P<0?-1:1)*g),M=(S=z+u)+c,C=(T=k)+P,y&&(i[s][A][D]=C)}t.setItemLayout(b,{cx:d,cy:p,r0:S,r:M,startAngle:-T*Math.PI/180,endAngle:-C*Math.PI/180})}}}),this)}),"bar")),hp({type:"polar"}),T(vu.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(e){vu.prototype.init.apply(this,arguments),za(e,"label",["show"])},optionUpdated:function(){var e=this.option,t=this;e.regions=Xy.getFilledRegions(e.regions,e.map,e.nameMap),this._optionModelMap=D(e.regions||[],(function(e,n){return n.name&&e.set(n.name,new ml(n,t)),e}),Q()),this.updateSelectedMap(e.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(e){return this._optionModelMap.get(e)||new ml(null,this,this.ecModel)},getFormattedLabel:function(e,t){t=t||"normal";var n=this.getRegionModel(e).get(("normal"===t?"":t+".")+"label.formatter"),i={name:e};return"function"==typeof n?(i.status=t,n(i)):"string"==typeof n?n.replace("{a}",null!=e?e:""):void 0},setZoom:function(e){this.option.zoom=e},setCenter:function(e){this.option.center=e}}),Cv),hp({type:"geo",init:function(e,t){var n=new Ly(t,!0);this._mapDraw=n,this.group.add(n.group)},render:function(e,t,n,i){if(!i||"geoToggleSelect"!==i.type||i.from!==this.uid){var a=this._mapDraw;e.get("show")?a.draw(e,t,n,this,i):this._mapDraw.group.removeAll(),this.group.silent=e.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}}),lC("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),lC("select",{type:"geoSelect",event:"geoselected"}),lC("unSelect",{type:"geoUnSelect",event:"geounselected"}),uC.prototype={constructor:uC,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(e){var t=(e=Pl(e)).getFullYear(),n=e.getMonth()+1;n=n<10?"0"+n:n;var i=e.getDate();i=i<10?"0"+i:i;var a=e.getDay();return{y:t,m:n,d:i,day:a=Math.abs((a+7-this.getFirstDayOfWeek())%7),time:e.getTime(),formatedDate:t+"-"+n+"-"+i,date:e}},getNextNDay:function(e,t){return 0===(t=t||0)||(e=new Date(this.getDateInfo(e).time)).setDate(e.getDate()+t),this.getDateInfo(e)},update:function(e,t){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,i=["width","height"],a=this._model.get("cellSize").slice(),r=this._model.getBoxLayoutParams(),o="horizontal"===this._orient?[n,7]:[7,n];I([0,1],(function(e){u(a,e)&&(r[i[e]]=a[e]*o[e])}));var s={width:t.getWidth(),height:t.getHeight()},l=this._rect=lu(r,s);function u(e,t){return null!=e[t]&&"auto"!==e[t]}I([0,1],(function(e){u(a,e)||(a[e]=l[i[e]]/o[e])})),this._sw=a[0],this._sh=a[1]},dataToPoint:function(e,t){z(e)&&(e=e[0]),null==t&&(t=!0);var n=this.getDateInfo(e),i=this._rangeInfo,a=n.formatedDate;if(t&&!(n.time>=i.start.time&&n.time<i.end.time+864e5))return[NaN,NaN];var r=n.day,o=this._getRangeInfo([i.start.time,a]).nthWeek;return"vertical"===this._orient?[this._rect.x+r*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]:[this._rect.x+o*this._sw+this._sw/2,this._rect.y+r*this._sh+this._sh/2]},pointToData:function(e){var t=this.pointToDate(e);return t&&t.time},dataToRect:function(e,t){var n=this.dataToPoint(e,t);return{contentShape:{x:n[0]-(this._sw-this._lineWidth)/2,y:n[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},pointToDate:function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,n=Math.floor((e[1]-this._rect.y)/this._sh)+1,i=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(n,t-1,i):this._getDateByWeeksAndDay(t,n-1,i)},convertToPixel:P(cC,"dataToPoint"),convertFromPixel:P(cC,"pointToData"),_initRangeOption:function(){var e=this._model.get("range"),t=e;if(z(t)&&1===t.length&&(t=t[0]),/^\d{4}$/.test(t)&&(e=[t+"-01-01",t+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(t)){var n=this.getDateInfo(t),i=n.date;i.setMonth(i.getMonth()+1);var a=this.getNextNDay(i,-1);e=[n.formatedDate,a.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(t)&&(e=[t,t]);var r=this._getRangeInfo(e);return r.start.time>r.end.time&&e.reverse(),e},_getRangeInfo:function(e){var t;(e=[this.getDateInfo(e[0]),this.getDateInfo(e[1])])[0].time>e[1].time&&(t=!0,e.reverse());var n=Math.floor(e[1].time/864e5)-Math.floor(e[0].time/864e5)+1,i=new Date(e[0].time),a=i.getDate(),r=e[1].date.getDate();i.setDate(a+n-1);var o=i.getDate();if(o!==r)for(var s=0<i.getTime()-e[1].time?1:-1;(o=i.getDate())!==r&&0<(i.getTime()-e[1].time)*s;)n-=s,i.setDate(o-s);var l=Math.floor((n+e[0].day+6)/7),u=t?1-l:l-1;return t&&e.reverse(),{range:[e[0].formatedDate,e[1].formatedDate],start:e[0],end:e[1],allDay:n,weeks:l,nthWeek:u,fweek:e[0].day,lweek:e[1].day}},_getDateByWeeksAndDay:function(e,t,n){var i=this._getRangeInfo(n);if(e>i.weeks||0===e&&t<i.fweek||e===i.weeks&&t>i.lweek)return!1;var a=7*(e-1)-i.fweek+t,r=new Date(i.start.time);return r.setDate(i.start.d+a),this.getDateInfo(r)}},uC.dimensions=uC.prototype.dimensions,uC.getDimensionsInfo=uC.prototype.getDimensionsInfo,uC.create=function(e,t){var n=[];return e.eachComponent("calendar",(function(i){var a=new uC(i,e,t);n.push(a),i.coordinateSystem=a})),e.eachSeries((function(e){"calendar"===e.get("coordinateSystem")&&(e.coordinateSystem=n[e.get("calendarIndex")||0])})),n},ju.register("calendar",uC);var hC=vu.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(e,t,n,i){var a=hu(e);hC.superApply(this,"init",arguments),dC(e,a)},mergeOption:function(e,t){hC.superApply(this,"mergeOption",arguments),dC(this.option,e)}});function dC(e,t){var n=e.cellSize;z(n)?1===n.length&&(n[1]=n[0]):n=e.cellSize=[n,n];var i=A([0,1],(function(e){return function(e,t){return null!=e[ru[t][0]]||null!=e[ru[t][1]]&&null!=e[ru[t][2]]}(t,e)&&(n[e]="auto"),null!=n[e]&&"auto"!==n[e]}));cu(e,t,{type:"box",ignoreSize:i})}var pC={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"]},fC={EN:["S","M","T","W","T","F","S"],CN:["\u65e5","\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d"]};hp({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(e,t,n){var i=this.group;i.removeAll();var a=e.coordinateSystem,r=a.getRangeInfo(),o=a.getOrient();this._renderDayRect(e,r,i),this._renderLines(e,r,o,i),this._renderYearText(e,r,o,i),this._renderMonthText(e,o,i),this._renderWeekText(e,r,o,i)},_renderDayRect:function(e,t,n){for(var i=e.coordinateSystem,a=e.getModel("itemStyle").getItemStyle(),r=i.getCellWidth(),o=i.getCellHeight(),s=t.start.time;s<=t.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new Zo({shape:{x:l[0],y:l[1],width:r,height:o},cursor:"default",style:a});n.add(u)}},_renderLines:function(e,t,n,i){var a=this,r=e.coordinateSystem,o=e.getModel("splitLine.lineStyle").getLineStyle(),s=e.get("splitLine.show"),l=o.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=t.start,c=0;u.time<=t.end.time;c++){d(u.formatedDate),0===c&&(u=r.getDateInfo(t.start.y+"-"+t.start.m));var h=u.date;h.setMonth(h.getMonth()+1),u=r.getDateInfo(h)}function d(t){a._firstDayOfMonth.push(r.getDateInfo(t)),a._firstDayPoints.push(r.dataToRect([t],!1).tl);var l=a._getLinePointsOfOneWeek(e,t,n);a._tlpoints.push(l[0]),a._blpoints.push(l[l.length-1]),s&&a._drawSplitline(l,o,i)}d(r.getNextNDay(t.end.time,1).formatedDate),s&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,l,n),o,i),s&&this._drawSplitline(a._getEdgesPoints(a._blpoints,l,n),o,i)},_getEdgesPoints:function(e,t,n){var i=[e[0].slice(),e[e.length-1].slice()],a="horizontal"===n?0:1;return i[0][a]=i[0][a]-t/2,i[1][a]=i[1][a]+t/2,i},_drawSplitline:function(e,t,n){var i=new Fo({z2:20,shape:{points:e},style:t});n.add(i)},_getLinePointsOfOneWeek:function(e,t,n){var i=e.coordinateSystem;t=i.getDateInfo(t);for(var a=[],r=0;r<7;r++){var o=i.getNextNDay(t.time,r),s=i.dataToRect([o.time],!1);a[2*o.day]=s.tl,a[2*o.day+1]=s["horizontal"===n?"bl":"tr"]}return a},_formatterLabel:function(e,t){return"string"==typeof e&&e?Zl(e,t):"function"==typeof e?e(t):t.nameMap},_yearTextPositionControl:function(e,t,n,i,a){t=t.slice();var r=["center","bottom"];"bottom"===i?(t[1]+=a,r=["center","top"]):"left"===i?t[0]-=a:"right"===i?(t[0]+=a,r=["center","top"]):t[1]-=a;var o=0;return"left"!==i&&"right"!==i||(o=Math.PI/2),{rotation:o,position:t,style:{textAlign:r[0],textVerticalAlign:r[1]}}},_renderYearText:function(e,t,n,i){var a=e.getModel("yearLabel");if(a.get("show")){var r=a.get("margin"),o=a.get("position");o=o||("horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,c="horizontal"===n?0:1,h={top:[l,s[c][1]],bottom:[l,s[1-c][1]],left:[s[1-c][0],u],right:[s[c][0],u]},d=t.start.y;+t.end.y>+t.start.y&&(d=d+"-"+t.end.y);var p=a.get("formatter"),f={start:t.start.y,end:t.end.y,nameMap:d},g=this._formatterLabel(p,f),m=new zo({z2:30});$s(m.style,a,{text:g}),m.attr(this._yearTextPositionControl(m,h[o],n,o,r)),i.add(m)}},_monthTextPositionControl:function(e,t,n,i,a){var r="left",o="top",s=e[0],l=e[1];return"horizontal"===n?(l+=a,t&&(r="center"),"start"===i&&(o="bottom")):(s+=a,t&&(o="middle"),"start"===i&&(r="right")),{x:s,y:l,textAlign:r,textVerticalAlign:o}},_renderMonthText:function(e,t,n){var i=e.getModel("monthLabel");if(i.get("show")){var a=i.get("nameMap"),r=i.get("margin"),o=i.get("position"),s=i.get("align"),l=[this._tlpoints,this._blpoints];N(a)&&(a=pC[a.toUpperCase()]||[]);var u="start"===o?0:1,c="horizontal"===t?0:1;r="start"===o?-r:r;for(var h="center"===s,d=0;d<l[u].length-1;d++){var p=l[u][d].slice(),f=this._firstDayOfMonth[d];if(h){var g=this._firstDayPoints[d];p[c]=(g[c]+l[0][d+1][c])/2}var m=i.get("formatter"),v=a[+f.m-1],y={yyyy:f.y,yy:(f.y+"").slice(2),MM:f.m,M:+f.m,nameMap:v},_=this._formatterLabel(m,y),b=new zo({z2:30});x($s(b.style,i,{text:_}),this._monthTextPositionControl(p,h,t,o,r)),n.add(b)}}},_weekTextPositionControl:function(e,t,n,i,a){var r="center",o="middle",s=e[0],l=e[1],u="start"===n;return"horizontal"===t?(s=s+i+(u?1:-1)*a[0]/2,r=u?"right":"left"):(l=l+i+(u?1:-1)*a[1]/2,o=u?"bottom":"top"),{x:s,y:l,textAlign:r,textVerticalAlign:o}},_renderWeekText:function(e,t,n,i){var a=e.getModel("dayLabel");if(a.get("show")){var r=e.coordinateSystem,o=a.get("position"),s=a.get("nameMap"),l=a.get("margin"),u=r.getFirstDayOfWeek();N(s)&&(s=fC[s.toUpperCase()]||[]);var c=r.getNextNDay(t.end.time,7-t.lweek).time,h=[r.getCellWidth(),r.getCellHeight()];l=wl(l,h["horizontal"===n?0:1]),"start"===o&&(c=r.getNextNDay(t.start.time,-(7+t.fweek)).time,l=-l);for(var d=0;d<7;d++){var p,f=r.getNextNDay(c,d),g=r.dataToRect([f.time],!1).center;p=Math.abs((d+u)%7);var m=new zo({z2:30});x($s(m.style,a,{text:s[p]}),this._weekTextPositionControl(g,n,o,l,h)),i.add(m)}}}});var gC={path:null,compoundPath:null,group:An,image:Zi,text:zo};np((function(e){var t=e.graphic;z(t)?t[0]&&t[0].elements?e.graphic=[e.graphic[0]]:e.graphic=[{elements:t}]:t&&!t.elements&&(e.graphic=[{elements:[t]}])}));var mC=cp({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(e){var t=this.option.elements;this.option.elements=null,mC.superApply(this,"mergeOption",arguments),this.option.elements=t},optionUpdated:function(e,t){var n=this.option,i=(t?n:e).elements,a=n.elements=t?[]:n.elements,r=[];this._flatten(i,r);var o=Ra(a,r);Ba(o);var s=this._elOptionsToUpdate=[];I(o,(function(e,t){var n=e.option;n&&(s.push(n),function(e,t){var n=e.exist;if(t.id=e.keyInfo.id,!t.type&&n&&(t.type=n.type),null==t.parentId){var i=t.parentOption;i?t.parentId=i.id:n&&(t.parentId=n.parentId)}t.parentOption=null}(e,n),function(e,t,n){var i=x({},n),a=e[t],r=n.$action||"merge";"merge"===r?a?(v(a,i,!0),cu(a,i,{ignoreSize:!0}),du(n,a)):e[t]=i:"replace"===r?e[t]=i:"remove"===r&&a&&(e[t]=null)}(a,t,n),function(e,t){e&&(e.hv=t.hv=[xC(t,["left","right"]),xC(t,["top","bottom"])],"group"===e.type&&(null==e.width&&(e.width=t.width=0),null==e.height&&(e.height=t.height=0)))}(a[t],n))}),this);for(var l=a.length-1;0<=l;l--)null==a[l]?a.splice(l,1):delete a[l].$action},_flatten:function(e,t,n){I(e,(function(e){if(e){n&&(e.parentOption=n),t.push(e);var i=e.children;"group"===e.type&&i&&this._flatten(i,t,e),delete e.children}}),this)},useElOptionsToUpdate:function(){var e=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,e}});function vC(e,t,n,i){var a=n.type,r=new(gC.hasOwnProperty(a)?gC[a]:ys(a))(n);t.add(r),i.set(e,r),r.__ecGraphicId=e}function yC(e,t){var n=e&&e.parent;n&&("group"===e.type&&e.traverse((function(e){yC(e,t)})),t.removeKey(e.__ecGraphicId),n.remove(e))}function xC(e,t){var n;return I(t,(function(t){null!=e[t]&&"auto"!==e[t]&&(n=!0)})),n}hp({type:"graphic",init:function(e,t){this._elMap=Q(),this._lastGraphicModel},render:function(e,t,n){e!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=e,this._updateElements(e),this._relocate(e,n)},_updateElements:function(e){var t=e.useElOptionsToUpdate();if(t){var n=this._elMap,i=this.group;I(t,(function(t){var a=t.$action,r=t.id,o=n.get(r),s=t.parentId,l=null!=s?n.get(s):i,u=t.style;"text"===t.type&&u&&(t.hv&&t.hv[1]&&(u.textVerticalAlign=u.textBaseline=null),!u.hasOwnProperty("textFill")&&u.fill&&(u.textFill=u.fill),!u.hasOwnProperty("textStroke")&&u.stroke&&(u.textStroke=u.stroke));var c=function(e){return e=x({},e),I(["id","parentId","$action","hv","bounding"].concat(au),(function(t){delete e[t]})),e}(t);a&&"merge"!==a?"replace"===a?(yC(o,n),vC(r,l,c,n)):"remove"===a&&yC(o,n):o?o.attr(c):vC(r,l,c,n);var h=n.get(r);h&&(h.__ecGraphicWidthOption=t.width,h.__ecGraphicHeightOption=t.height,function(e,t){var n=e.eventData;e.silent||e.ignore||n||(n=e.eventData={componentType:"graphic",componentIndex:t.componentIndex,name:e.name}),n&&(n.info=e.info)}(h,e))}))}},_relocate:function(e,t){for(var n=e.option.elements,i=this.group,a=this._elMap,r=t.getWidth(),o=t.getHeight(),s=0;s<n.length;s++){var l=n[s];if((c=a.get(l.id))&&c.isGroup){var u=(h=c.parent)===i;c.__ecGraphicWidth=wl(c.__ecGraphicWidthOption,u?r:h.__ecGraphicWidth)||0,c.__ecGraphicHeight=wl(c.__ecGraphicHeightOption,u?o:h.__ecGraphicHeight)||0}}for(s=n.length-1;0<=s;s--){var c,h;l=n[s],(c=a.get(l.id))&&uu(c,l,(h=c.parent)===i?{width:r,height:o}:{width:h.__ecGraphicWidth,height:h.__ecGraphicHeight},null,{hv:l.hv,boundingMode:l.bounding})}},_clear:function(){var e=this._elMap;e.each((function(t){yC(t,e)})),this._elMap=Q()},dispose:function(){this._clear()}});var _C={};function bC(e,t){_C[e]=t}function wC(e){return _C[e]}var SC=cp({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){SC.superApply(this,"optionUpdated",arguments),I(this.option.feature,(function(e,t){var n=wC(t);n&&v(e,n.defaultOption)}))},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1}}});function MC(e,t){var n=Hl(t.get("padding")),i=t.getItemStyle(["color","opacity"]);return i.fill=t.get("backgroundColor"),new Zo({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get("borderRadius")},style:i,silent:!0,z2:-1})}hp({type:"toolbox",render:function(e,t,n,i){var a=this.group;if(a.removeAll(),e.get("show")){var r=+e.get("itemSize"),o=e.get("feature")||{},s=this._features||(this._features={}),l=[];I(o,(function(e,t){l.push(t)})),new gp(this._featureNames||[],l).add(u).update(u).remove(P(u,null)).execute(),this._featureNames=l,function(e,t,n){var i=t.getBoxLayoutParams(),a=t.get("padding"),r={width:n.getWidth(),height:n.getHeight()},o=lu(i,r,a);su(t.get("orient"),e,t.get("itemGap"),o.width,o.height),uu(e,i,r,a)}(a,e,n),a.add(MC(a.getBoundingRect(),e)),a.eachChild((function(e){var t=e.__title,i=e.hoverStyle;if(i&&t){var o=hi(t,Si(i)),s=e.position[0]+a.position[0],l=!1;e.position[1]+a.position[1]+r+o.height>n.getHeight()&&(i.textPosition="top",l=!0);var u=l?-5-o.height:r+8;s+o.width/2>n.getWidth()?(i.textPosition=["100%",u],i.textAlign="right"):s-o.width/2<0&&(i.textPosition=[0,u],i.textAlign="left")}}))}function u(u,c){var h,d=l[u],p=l[c],f=o[d],g=new ml(f,e,e.ecModel);if(i&&null!=i.newTitle&&i.featureName===d&&(f.title=i.newTitle),d&&!p){if(function(e){return 0===e.indexOf("my")}(d))h={model:g,onclick:g.option.onclick,featureName:d};else{var m=wC(d);if(!m)return;h=new m(g,t,n)}s[d]=h}else{if(!(h=s[p]))return;h.model=g,h.ecModel=t,h.api=n}d||!p?g.get("show")&&!h.unusable?(function(i,o,s){var l=i.getModel("iconStyle"),u=i.getModel("emphasis.iconStyle"),c=o.getIcons?o.getIcons():i.get("icon"),h=i.get("title")||{};if("string"==typeof c){var d=c,p=h;h={},(c={})[s]=d,h[s]=p}var f=i.iconPaths={};I(c,(function(s,c){var d=rl(s,{},{x:-r/2,y:-r/2,width:r,height:r});d.setStyle(l.getItemStyle()),d.hoverStyle=u.getItemStyle(),d.setStyle({text:h[c],textAlign:u.get("textAlign"),textBorderRadius:u.get("textBorderRadius"),textPadding:u.get("textPadding"),textFill:null});var p=e.getModel("tooltip");p&&p.get("show")&&d.attr("tooltip",x({content:h[c],formatter:p.get("formatter",!0)||function(){return h[c]},formatterParams:{componentType:"toolbox",name:c,title:h[c],$vars:["name","title"]},position:p.get("position",!0)||"bottom"},p.option)),Bs(d),e.get("showTitle")&&(d.__title=h[c],d.on("mouseover",(function(){var t=u.getItemStyle(),n="vertical"===e.get("orient")?null==e.get("right")?"right":"left":null==e.get("bottom")?"bottom":"top";d.setStyle({textFill:u.get("textFill")||t.fill||t.stroke||"#000",textBackgroundColor:u.get("textBackgroundColor"),textPosition:u.get("textPosition")||n})})).on("mouseout",(function(){d.setStyle({textFill:null,textBackgroundColor:null})}))),d.trigger(i.get("iconStatus."+c)||"normal"),a.add(d),d.on("click",E(o.onclick,o,t,n,c)),f[c]=d}))}(g,h,d),g.setIconStatus=function(e,t){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[e]=t,i[e]&&i[e].trigger(t)},h.render&&h.render(g,t,n,i)):h.remove&&h.remove(t,n):h.dispose&&h.dispose(t,n)}},updateView:function(e,t,n,i){I(this._features,(function(e){e.updateView&&e.updateView(e.model,t,n,i)}))},remove:function(e,t){I(this._features,(function(n){n.remove&&n.remove(e,t)})),this.group.removeAll()},dispose:function(e,t){I(this._features,(function(n){n.dispose&&n.dispose(e,t)}))}});var TC=xh.toolbox.saveAsImage;function CC(e){this.model=e}CC.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:TC.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:TC.lang.slice()},CC.prototype.unusable=!a.canvasSupported,CC.prototype.onclick=function(e,t){var n=this.model,i=n.get("name")||e.get("title.0.text")||"echarts",r="svg"===t.getZr().painter.getType()?"svg":n.get("type",!0)||"png",o=t.getConnectedDataURL({type:r,backgroundColor:n.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if("function"!=typeof MouseEvent||a.browser.ie||a.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(o.split(",")[1]),l=s.length,u=new Uint8Array(l);l--;)u[l]=s.charCodeAt(l);var c=new Blob([u]);window.navigator.msSaveOrOpenBlob(c,i+"."+r)}else{var h=n.get("lang"),d='<body style="margin:0;"><img src="'+o+'" style="max-width:100%;" title="'+(h&&h[0]||"")+'" /></body>';window.open().document.write(d)}else{var p=document.createElement("a");p.download=i+"."+r,p.target="_blank",p.href=o;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});p.dispatchEvent(f)}},bC("saveAsImage",CC);var IC=xh.toolbox.magicType,AC="__ec_magicType_stack__";function DC(e){this.model=e}DC.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:m(IC.title),option:{},seriesIndex:{}};var kC=DC.prototype;kC.getIcons=function(){var e=this.model,t=e.get("icon"),n={};return I(e.get("type"),(function(e){t[e]&&(n[e]=t[e])})),n};var LC={line:function(e,t,n,i){if("bar"===e)return v({id:t,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get("option.line")||{},!0)},bar:function(e,t,n,i){if("line"===e)return v({id:t,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get("option.bar")||{},!0)},stack:function(e,t,n,i){var a=n.get("stack")===AC;if("line"===e||"bar"===e)return i.setIconStatus("stack",a?"normal":"emphasis"),v({id:t,stack:a?"":AC},i.get("option.stack")||{},!0)}},EC=[["line","bar"],["stack"]];kC.onclick=function(e,t,n){var i=this.model,a=i.get("seriesIndex."+n);if(LC[n]){var r,o={series:[]};I(EC,(function(e){0<=S(e,n)&&I(e,(function(e){i.setIconStatus(e,"normal")}))})),i.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:null==a?null:{seriesIndex:a}},(function(t){var a=t.subType,r=t.id,s=LC[n](a,r,t,i);s&&(_(s,t.option),o.series.push(s));var l=t.coordinateSystem;if(l&&"cartesian2d"===l.type&&("line"===n||"bar"===n)){var u=l.getAxesByScale("ordinal")[0];if(u){var c=u.dim+"Axis",h=e.queryComponents({mainType:c,index:t.get(name+"Index"),id:t.get(name+"Id")})[0].componentIndex;o[c]=o[c]||[];for(var d=0;d<=h;d++)o[c][h]=o[c][h]||{};o[c][h].boundaryGap="bar"===n}}})),"stack"===n&&(r=o.series&&o.series[0]&&o.series[0].stack===AC?v({stack:IC.title.tiled},IC.title):m(IC.title)),t.dispatchAction({type:"changeMagicType",currentType:n,newOption:o,newTitle:r,featureName:"magicType"})}},ap({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(e,t){t.mergeOption(e.newOption)})),bC("magicType",DC);var PC=xh.toolbox.dataView,zC=new Array(60).join("-"),OC="\t";function NC(e){return e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var RC=new RegExp("[\t]+","g");function BC(e){this._dom=null,this.model=e}BC.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:m(PC.title),lang:m(PC.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},BC.prototype.onclick=function(e,t){var n=t.getDom(),i=this.model;this._dom&&n.removeChild(this._dom);var a=document.createElement("div");a.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",a.style.backgroundColor=i.get("backgroundColor")||"#fff";var r=document.createElement("h4"),o=i.get("lang")||[];r.innerHTML=o[0]||i.get("title"),r.style.cssText="margin: 10px 20px;",r.style.color=i.get("textColor");var s=document.createElement("div"),l=document.createElement("textarea");s.style.cssText="display:block;width:100%;overflow:auto;";var u=i.get("optionToContent"),c=i.get("contentToOption"),h=function(e){var t=function(e){var t={},n=[],i=[];return e.eachRawSeries((function(e){var a=e.coordinateSystem;if(!a||"cartesian2d"!==a.type&&"polar"!==a.type)n.push(e);else{var r=a.getBaseAxis();if("category"===r.type){var o=r.dim+"_"+r.index;t[o]||(t[o]={categoryAxis:r,valueAxis:a.getOtherAxis(r),series:[]},i.push({axisDim:r.dim,axisIndex:r.index})),t[o].series.push(e)}else n.push(e)}})),{seriesGroupByCategoryAxis:t,other:n,meta:i}}(e);return{value:k([function(e){var t=[];return I(e,(function(e,n){var i=e.categoryAxis,a=e.valueAxis.dim,r=[" "].concat(A(e.series,(function(e){return e.name}))),o=[i.model.getCategories()];I(e.series,(function(e){var t=e.getRawData();o.push(e.getRawData().mapArray(t.mapDimension(a),(function(e){return e})))}));for(var s=[r.join(OC)],l=0;l<o[0].length;l++){for(var u=[],c=0;c<o.length;c++)u.push(o[c][l]);s.push(u.join(OC))}t.push(s.join("\n"))})),t.join("\n\n"+zC+"\n\n")}(t.seriesGroupByCategoryAxis),function(e){return A(e,(function(e){var t=e.getRawData(),n=[e.name],i=[];return t.each(t.dimensions,(function(){for(var e=arguments.length,a=arguments[e-1],r=t.getName(a),o=0;o<e-1;o++)i[o]=arguments[o];n.push((r?r+OC:"")+i.join(OC))})),n.join("\n")})).join("\n\n"+zC+"\n\n")}(t.other)],(function(e){return e.replace(/[\n\t\s]/g,"")})).join("\n\n"+zC+"\n\n"),meta:t.meta}}(e);if("function"==typeof u){var d=u(t.getOption());"string"==typeof d?s.innerHTML=d:G(d)&&s.appendChild(d)}else s.appendChild(l),l.readOnly=i.get("readOnly"),l.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",l.style.color=i.get("textColor"),l.style.borderColor=i.get("textareaBorderColor"),l.style.backgroundColor=i.get("textareaColor"),l.value=h.value;var p=h.meta,f=document.createElement("div");f.style.cssText="position:absolute;bottom:0;left:0;right:0;";var g="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",m=document.createElement("div"),v=document.createElement("div");g+=";background-color:"+i.get("buttonColor"),g+=";color:"+i.get("buttonTextColor");var y=this;function x(){n.removeChild(a),y._dom=null}Xe(m,"click",x),Xe(v,"click",(function(){var e;try{e="function"==typeof c?c(s,t.getOption()):function(e,t){var n=e.split(new RegExp("\n*"+zC+"\n*","g")),i={series:[]};return I(n,(function(e,n){if(function(e){if(0<=e.slice(0,e.indexOf("\n")).indexOf(OC))return!0}(e)){var a=function(e){for(var t=e.split(/\n+/g),n=[],i=A(NC(t.shift()).split(RC),(function(e){return{name:e,data:[]}})),a=0;a<t.length;a++){var r=NC(t[a]).split(RC);n.push(r.shift());for(var o=0;o<r.length;o++)i[o]&&(i[o].data[a]=r[o])}return{series:i,categories:n}}(e),r=t[n],o=r.axisDim+"Axis";r&&(i[o]=i[o]||[],i[o][r.axisIndex]={data:a.categories},i.series=i.series.concat(a.series))}else a=function(e){for(var t=e.split(/\n+/g),n=NC(t.shift()),i=[],a=0;a<t.length;a++){var r=NC(t[a]);if(r){var o,s=r.split(RC),l="",u=!1;o=isNaN(s[0])?(u=!0,l=s[0],s=s.slice(1),i[a]={name:l,value:[]},i[a].value):i[a]=[];for(var c=0;c<s.length;c++)o.push(+s[c]);1===o.length&&(u?i[a].value=o[0]:i[a]=o[0])}}return{name:n,data:i}}(e),i.series.push(a)})),i}(l.value,p)}catch(e){throw x(),new Error("Data view format error "+e)}e&&t.dispatchAction({type:"changeDataView",newOption:e}),x()})),m.innerHTML=o[1],v.innerHTML=o[2],v.style.cssText=g,m.style.cssText=g,i.get("readOnly")||f.appendChild(v),f.appendChild(m),a.appendChild(r),a.appendChild(s),a.appendChild(f),s.style.height=n.clientHeight-80+"px",n.appendChild(a),this._dom=a},BC.prototype.remove=function(e,t){this._dom&&t.getDom().removeChild(this._dom)},BC.prototype.dispose=function(e,t){this.remove(e,t)},bC("dataView",BC),ap({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},(function(e,t){var n=[];I(e.newOption.series,(function(e){var i=t.getSeriesByName(e.name)[0];if(i){var a=i.get("data");n.push({name:e.name,data:function(e,t){return A(e,(function(e,n){var i=t&&t[n];if(!R(i)||z(i))return e;R(e)&&!z(e)||(e={value:e});var a=null!=i.name&&null==e.name;return e=_(e,i),a&&delete e.name,e}))}(e.data,a)})}else n.push(x({type:"scatter"},e))})),t.mergeOption(_({series:n},e.newOption))}));var VC=I,GC=S,WC=P,HC=["dataToPoint","pointToData"],FC=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function $C(e,t,n){var i=this._targetInfoList=[],a={},r=UC(t,e);VC(jC,(function(e,t){n&&n.include&&!(0<=GC(n.include,t))||e(r,i,a)}))}var XC=$C.prototype;function YC(e){return e[0]>e[1]&&e.reverse(),e}function UC(e,t){return $a(e,t,{includeMainTypes:FC})}XC.setOutputRanges=function(e,t){this.matchOutputRanges(e,t,(function(e,t,n){if((e.coordRanges||(e.coordRanges=[])).push(t),!e.coordRange){e.coordRange=t;var i=KC[e.brushType](0,n,t);e.__rangeOffset={offset:QC[e.brushType](i.values,e.range,[1,1]),xyMinMax:i.xyMinMax}}}))},XC.matchOutputRanges=function(e,t,n){VC(e,(function(e){var i=this.findTargetInfo(e,t);i&&!0!==i&&I(i.coordSyses,(function(i){var a=KC[e.brushType](1,i,e.range);n(e,a.values,i,t)}))}),this)},XC.setInputRanges=function(e,t){VC(e,(function(e){var n=this.findTargetInfo(e,t);if(e.range=e.range||[],n&&!0!==n){e.panelId=n.panelId;var i=KC[e.brushType](0,n.coordSys,e.coordRange),a=e.__rangeOffset;e.range=a?QC[e.brushType](i.values,a.offset,function(e,t){var n=tI(e),i=tI(t),a=[n[0]/i[0],n[1]/i[1]];return isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a}(i.xyMinMax,a.xyMinMax)):i.values}}),this)},XC.makePanelOpts=function(e,t){return A(this._targetInfoList,(function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t&&t(n),clipPath:Iw(i),isTargetByCursor:Dw(i,e,n.coordSysModel),getLinearBrushOtherExtent:Aw(i)}}))},XC.controlSeries=function(e,t,n){var i=this.findTargetInfo(e,n);return!0===i||i&&0<=GC(i.coordSyses,t.coordinateSystem)},XC.findTargetInfo=function(e,t){for(var n=this._targetInfoList,i=UC(t,e),a=0;a<n.length;a++){var r=n[a],o=e.panelId;if(o){if(r.panelId===o)return r}else for(a=0;a<ZC.length;a++)if(ZC[a](i,r))return r}return!0};var jC={grid:function(e,t){var n=e.xAxisModels,i=e.yAxisModels,a=e.gridModels,r=Q(),o={},s={};(n||i||a)&&(VC(n,(function(e){var t=e.axis.grid.model;r.set(t.id,t),o[t.id]=!0})),VC(i,(function(e){var t=e.axis.grid.model;r.set(t.id,t),s[t.id]=!0})),VC(a,(function(e){r.set(e.id,e),o[e.id]=!0,s[e.id]=!0})),r.each((function(e){var a=e.coordinateSystem,r=[];VC(a.getCartesians(),(function(e,t){(0<=GC(n,e.getAxis("x").model)||0<=GC(i,e.getAxis("y").model))&&r.push(e)})),t.push({panelId:"grid--"+e.id,gridModel:e,coordSysModel:e,coordSys:r[0],coordSyses:r,getPanelRect:qC.grid,xAxisDeclared:o[e.id],yAxisDeclared:s[e.id]})})))},geo:function(e,t){VC(e.geoModels,(function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:qC.geo})}))}},ZC=[function(e,t){var n=e.xAxisModel,i=e.yAxisModel,a=e.gridModel;return!a&&n&&(a=n.axis.grid.model),!a&&i&&(a=i.axis.grid.model),a&&a===t.gridModel},function(e,t){var n=e.geoModel;return n&&n===t.geoModel}],qC={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var e=this.coordSys,t=e.getBoundingRect().clone();return t.applyTransform(el(e)),t}},KC={lineX:WC(JC,0),lineY:WC(JC,1),rect:function(e,t,n){var i=t[HC[e]]([n[0][0],n[1][0]]),a=t[HC[e]]([n[0][1],n[1][1]]),r=[YC([i[0],a[0]]),YC([i[1],a[1]])];return{values:r,xyMinMax:r}},polygon:function(e,t,n){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:A(n,(function(n){var a=t[HC[e]](n);return i[0][0]=Math.min(i[0][0],a[0]),i[1][0]=Math.min(i[1][0],a[1]),i[0][1]=Math.max(i[0][1],a[0]),i[1][1]=Math.max(i[1][1],a[1]),a})),xyMinMax:i}}};function JC(e,t,n,i){var a=n.getAxis(["x","y"][e]),r=YC(A([0,1],(function(e){return t?a.coordToData(a.toLocalCoord(i[e])):a.toGlobalCoord(a.dataToCoord(i[e]))}))),o=[];return o[e]=r,o[1-e]=[NaN,NaN],{values:r,xyMinMax:o}}var QC={lineX:WC(eI,0),lineY:WC(eI,1),rect:function(e,t,n){return[[e[0][0]-n[0]*t[0][0],e[0][1]-n[0]*t[0][1]],[e[1][0]-n[1]*t[1][0],e[1][1]-n[1]*t[1][1]]]},polygon:function(e,t,n){return A(e,(function(e,i){return[e[0]-n[0]*t[i][0],e[1]-n[1]*t[i][1]]}))}};function eI(e,t,n,i){return[t[0]-i[e]*n[0],t[1]-i[e]*n[1]]}function tI(e){return e?[e[0][1]-e[0][0],e[1][1]-e[1][0]]:[NaN,NaN]}var nI=I,iI="\0_ec_hist_store";function aI(e){var t=e[iI];return t||(e[iI]=[{}])}vu.registerSubTypeDefaulter("dataZoom",(function(){return"slider"}));var rI,oI,sI,lI,uI=["cartesian2d","polar","singleAxis"],cI=(oI=["axisIndex","axis","index","id"],sI=A(rI=(rI=["x","y","z","radius","angle","single"]).slice(),Ql),lI=A(oI=(oI||[]).slice(),Ql),function(e,t){I(rI,(function(n,i){for(var a={name:n,capital:sI[i]},r=0;r<oI.length;r++)a[oI[r]]=n+lI[r];e.call(t,a)}))});function hI(e,t,n,i){this._dimName=e,this._axisIndex=t,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=i,this._dataZoomModel=n}var dI=I,pI=Ml;function fI(e,t){var n=e.getAxisModel(),i=e._percentWindow,a=e._valueWindow;if(i){var r=Il(a,[0,500]);r=Math.min(r,20);var o=t||0===i[0]&&100===i[1];n.setRange(o?null:+a[0].toFixed(r),o?null:+a[1].toFixed(r))}}hI.prototype={constructor:hI,hostedBy:function(e){return this._dataZoomModel===e},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var e=[],t=this.ecModel;return t.eachSeries((function(n){if(function(e){return 0<=S(uI,e)}(n.get("coordinateSystem"))){var i=this._dimName,a=t.queryComponents({mainType:i+"Axis",index:n.get(i+"AxisIndex"),id:n.get(i+"AxisId")})[0];this._axisIndex===(a&&a.componentIndex)&&e.push(n)}}),this),e},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var e,t,n,i=this._dimName,a=this.ecModel,r=this.getAxisModel();return e="x"===i||"y"===i?(t="gridIndex","x"===i?"y":"x"):(t="polarIndex","angle"===i?"radius":"angle"),a.eachComponent(e+"Axis",(function(e){(e.get(t)||0)===(r.get(t)||0)&&(n=e)})),n},getMinMaxSpan:function(){return m(this._minMaxSpan)},calculateDataWindow:function(e){var t,n=this._dataExtent,i=this.getAxisModel().axis.scale,a=this._dataZoomModel.getRangePropMode(),r=[0,100],o=[],s=[];dI(["start","end"],(function(l,u){var c=e[l],h=e[l+"Value"];"percent"===a[u]?(null==c&&(c=r[u]),h=i.parse(bl(c,r,n))):(t=!0,c=bl(h=null==h?n[u]:i.parse(h),n,r)),s[u]=h,o[u]=c})),pI(s),pI(o);var l=this._minMaxSpan;function u(e,t,n,a,r){var o=r?"Span":"ValueSpan";Ib(0,e,n,"all",l["min"+o],l["max"+o]);for(var s=0;s<2;s++)t[s]=bl(e[s],n,a,!0),r&&(t[s]=i.parse(t[s]))}return t?u(s,o,n,r,!1):u(o,s,r,n,!0),{valueWindow:s,percentWindow:o}},reset:function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=function(e,t,n){var i=[1/0,-1/0];return dI(n,(function(e){var n=e.getData();n&&dI(n.mapDimension(t,!0),(function(e){var t=n.getApproximateExtent(e);t[0]<i[0]&&(i[0]=t[0]),t[1]>i[1]&&(i[1]=t[1])}))})),i[1]<i[0]&&(i=[NaN,NaN]),function(e,t){var n=e.getAxisModel(),i=n.getMin(!0),a="category"===n.get("type"),r=a&&n.getCategories().length;null!=i&&"dataMin"!==i&&"function"!=typeof i?t[0]=i:a&&(t[0]=0<r?0:NaN);var o=n.getMax(!0);null!=o&&"dataMax"!==o&&"function"!=typeof o?t[1]=o:a&&(t[1]=0<r?r-1:NaN),n.get("scale",!0)||(0<t[0]&&(t[0]=0),t[1]<0&&(t[1]=0))}(e,i),i}(this,this._dimName,t),function(e){var t=e._minMaxSpan={},n=e._dataZoomModel,i=e._dataExtent;dI(["min","max"],(function(a){var r=n.get(a+"Span"),o=n.get(a+"ValueSpan");null!=o&&(o=e.getAxisModel().axis.scale.parse(o)),null!=o?r=bl(i[0]+o,i,[0,100],!0):null!=r&&(o=bl(r,[0,100],i,!0)-i[0]),t[a+"Span"]=r,t[a+"ValueSpan"]=o}))}(this);var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,fI(this)}},restore:function(e){e===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,fI(this,!0))},filterData:function(e,t){if(e===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),a=e.get("filterMode"),r=this._valueWindow;"none"!==a&&dI(i,(function(e){var t=e.getData(),i=t.mapDimension(n,!0);i.length&&("weakFilter"===a?t.filterSelf((function(e){for(var n,a,o,s=0;s<i.length;s++){var l=t.get(i[s],e),u=!isNaN(l),c=l<r[0],h=l>r[1];if(u&&!c&&!h)return!0;u&&(o=!0),c&&(n=!0),h&&(a=!0)}return o&&n&&a})):dI(i,(function(n){if("empty"===a)e.setData(t=t.map(n,(function(e){return function(e){return e>=r[0]&&e<=r[1]}(e)?e:NaN})));else{var i={};i[n]=r,t.selectRange(i)}})),dI(i,(function(e){t.setApproximateExtent(r,e)})))}))}}};var gI=I,mI=cI,vI=cp({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(e,t,n){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var i=yI(e);this.settledOption=i,this.mergeDefaultAndTheme(e,n),this.doInit(i)},mergeOption:function(e){var t=yI(e);v(this.option,e,!0),v(this.settledOption,t,!0),this.doInit(t)},doInit:function(e){var t=this.option;a.canvasSupported||(t.realtime=!1),this._setDefaultThrottle(e),xI(this,e);var n=this.settledOption;gI([["start","startValue"],["end","endValue"]],(function(e,i){"value"===this._rangePropMode[i]&&(t[e[0]]=n[e[0]]=null)}),this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var e=this._axisProxies;this.eachTargetAxis((function(t,n,i,a){var r=this.dependentModels[t.axis][n],o=r.__dzAxisProxy||(r.__dzAxisProxy=new hI(t.name,n,this,a));e[t.name+"_"+n]=o}),this)},_resetTarget:function(){var e=this.option,t=this._judgeAutoMode();mI((function(t){var n=t.axisIndex;e[n]=Pa(e[n])}),this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,t=!1;mI((function(n){null!=e[n.axisIndex]&&(t=!0)}),this);var n=e.orient;return null==n&&t?"orient":t?void 0:(null==n&&(e.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var e=!0,t=this.get("orient",!0),n=this.option,i=this.dependentModels;if(e){var a="vertical"===t?"y":"x";i[a+"Axis"].length?(n[a+"AxisIndex"]=[0],e=!1):gI(i.singleAxis,(function(i){e&&i.get("orient",!0)===t&&(n.singleAxisIndex=[i.componentIndex],e=!1)}))}e&&mI((function(t){if(e){var i=[],a=this.dependentModels[t.axis];if(a.length&&!i.length)for(var r=0,o=a.length;r<o;r++)"category"===a[r].get("type")&&i.push(r);(n[t.axisIndex]=i).length&&(e=!1)}}),this),e&&this.ecModel.eachSeries((function(e){this._isSeriesHasAllAxesTypeOf(e,"value")&&mI((function(t){var i=n[t.axisIndex],a=e.get(t.axisIndex),r=e.get(t.axisId);S(i,a=e.ecModel.queryComponents({mainType:t.axis,index:a,id:r})[0].componentIndex)<0&&i.push(a)}))}),this)},_autoSetOrient:function(){var e;this.eachTargetAxis((function(t){e=e||t.name}),this),this.option.orient="y"===e?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(e,t){var n=!0;return mI((function(i){var a=e.get(i.axisIndex),r=this.dependentModels[i.axis][a];r&&r.get("type")===t||(n=!1)}),this),n},_setDefaultThrottle:function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var t=this.ecModel.option;this.option.throttle=t.animation&&0<t.animationDurationUpdate?100:20}},getFirstTargetAxisModel:function(){var e;return mI((function(t){if(null==e){var n=this.get(t.axisIndex);n.length&&(e=this.dependentModels[t.axis][n[0]])}}),this),e},eachTargetAxis:function(e,t){var n=this.ecModel;mI((function(i){gI(this.get(i.axisIndex),(function(a){e.call(t,i,a,this,n)}),this)}),this)},getAxisProxy:function(e,t){return this._axisProxies[e+"_"+t]},getAxisModel:function(e,t){var n=this.getAxisProxy(e,t);return n&&n.getAxisModel()},setRawRange:function(e){var t=this.option,n=this.settledOption;gI([["start","startValue"],["end","endValue"]],(function(i){null==e[i[0]]&&null==e[i[1]]||(t[i[0]]=n[i[0]]=e[i[0]],t[i[1]]=n[i[1]]=e[i[1]])}),this),xI(this,e)},setCalculatedRange:function(e){var t=this.option;gI(["start","startValue","end","endValue"],(function(n){t[n]=e[n]}))},getPercentRange:function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},getValueRange:function(e,t){if(null!=e||null!=t)return this.getAxisProxy(e,t).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(e){if(e)return e.__dzAxisProxy;var t=this._axisProxies;for(var n in t)if(t.hasOwnProperty(n)&&t[n].hostedBy(this))return t[n];for(var n in t)if(t.hasOwnProperty(n)&&!t[n].hostedBy(this))return t[n]},getRangePropMode:function(){return this._rangePropMode.slice()}});function yI(e){var t={};return gI(["start","end","startValue","endValue","throttle"],(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}function xI(e,t){var n=e._rangePropMode,i=e.get("rangeMode");gI([["start","startValue"],["end","endValue"]],(function(e,a){var r=null!=t[e[0]],o=null!=t[e[1]];r&&!o?n[a]="percent":!r&&o?n[a]="value":i?n[a]=i[a]:r&&(n[a]="percent")}))}var _I=eh.extend({type:"dataZoom",render:function(e,t,n,i){this.dataZoomModel=e,this.ecModel=t,this.api=n},getTargetCoordInfo:function(){var e=this.dataZoomModel,t=this.ecModel,n={};return e.eachTargetAxis((function(e,i){var a=t.getComponent(e.axis,i);if(a){var r=a.getCoordSysModel();r&&function(e,t,n,i){for(var a,r=0;r<n.length;r++)if(n[r].model===e){a=n[r];break}a||n.push(a={model:e,axisModels:[],coordIndex:i}),a.axisModels.push(t)}(r,a,n[r.mainType]||(n[r.mainType]=[]),r.componentIndex)}}),this),n}});vI.extend({type:"dataZoom.select"}),_I.extend({type:"dataZoom.select"}),ip({getTargetSeries:function(e){var t=Q();return e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(e,n,i){I(i.getAxisProxy(e.name,n).getTargetSeriesModels(),(function(e){t.set(e.uid,e)}))}))})),t},modifyOutputEnd:!0,overallReset:function(e,t){e.eachComponent("dataZoom",(function(e){e.eachTargetAxis((function(e,n,i){i.getAxisProxy(e.name,n).reset(i,t)})),e.eachTargetAxis((function(e,n,i){i.getAxisProxy(e.name,n).filterData(i,t)}))})),e.eachComponent("dataZoom",(function(e){var t=e.findRepresentativeAxisProxy(),n=t.getDataPercentWindow(),i=t.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}))}}),ap("dataZoom",(function(e,t){var n=function(e,t,n){return function(a){var r,o={nodes:[],records:{}};if(t((function(e){o.records[e.name]={}})),!a)return o;for(i(a,o);r=!1,e(s),r;);function s(e){!function(e,t){return 0<=S(t.nodes,e)}(e,o)&&function(e,i){var a=!1;return t((function(t){I(n(e,t)||[],(function(e){i.records[t.name][e]&&(a=!0)}))})),a}(e,o)&&(i(e,o),r=!0)}return o};function i(e,i){i.nodes.push(e),t((function(t){I(n(e,t)||[],(function(e){i.records[t.name][e]=!0}))}))}}(E(t.eachComponent,t,"dataZoom"),cI,(function(e,t){return e.get(t.axisIndex)})),i=[];t.eachComponent({mainType:"dataZoom",query:e},(function(e,t){i.push.apply(i,n(e).nodes)})),I(i,(function(t,n){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})}))}));var bI=xh.toolbox.dataZoom,wI=I;function SI(e,t,n){(this._brushController=new Kb(n.getZr())).on("brush",E(this._onBrush,this)).mount(),this._isZoomActive}SI.defaultOption={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:m(bI.title),brushStyle:{borderWidth:0,color:"rgba(0,0,0,0.2)"}};var MI=SI.prototype;MI.render=function(e,t,n,i){this.model=e,this.ecModel=t,this.api=n,function(e,t,n,i,a){var r=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(r="dataZoomSelect"===i.key&&i.dataZoomSelectActive),n._isZoomActive=r,e.setIconStatus("zoom",r?"emphasis":"normal");var o=new $C(CI(e.option),t,{include:["grid"]});n._brushController.setPanels(o.makePanelOpts(a,(function(e){return e.xAxisDeclared&&!e.yAxisDeclared?"lineX":!e.xAxisDeclared&&e.yAxisDeclared?"lineY":"rect"}))).enableBrush(!!r&&{brushType:"auto",brushStyle:e.getModel("brushStyle").getItemStyle()})}(e,t,this,i,n),function(e,t){e.setIconStatus("back",1<function(e){return aI(e).length}(t)?"emphasis":"normal")}(e,t)},MI.onclick=function(e,t,n){TI[n].call(this)},MI.remove=function(e,t){this._brushController.unmount()},MI.dispose=function(e,t){this._brushController.dispose()};var TI={zoom:function(){var e=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:e})},back:function(){this._dispatchZoomAction(function(e){var t=aI(e),n=t[t.length-1];1<t.length&&t.pop();var i={};return nI(n,(function(e,n){for(var a=t.length-1;0<=a;a--)if(e=t[a][n]){i[n]=e;break}})),i}(this.ecModel))}};function CI(e){var t={};return I(["xAxisIndex","yAxisIndex"],(function(n){t[n]=e[n],null==t[n]&&(t[n]="all"),!1!==t[n]&&"none"!==t[n]||(t[n]=[])})),t}MI._onBrush=function(e,t){if(t.isEnd&&e.length){var n={},i=this.ecModel;this._brushController.updateCovers([]),new $C(CI(this.model.option),i,{include:["grid"]}).matchOutputRanges(e,i,(function(e,t,n){if("cartesian2d"===n.type){var i=e.brushType;"rect"===i?(a("x",n,t[0]),a("y",n,t[1])):a({lineX:"x",lineY:"y"}[i],n,t)}})),function(e,t){var n=aI(e);nI(t,(function(t,i){for(var a=n.length-1;0<=a&&!n[a][i];a--);if(a<0){var r=e.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(r){var o=r.getPercentRange();n[0][i]={dataZoomId:i,start:o[0],end:o[1]}}}})),n.push(t)}(i,n),this._dispatchZoomAction(n)}function a(e,t,a){var r=t.getAxis(e),o=r.model,s=function(e,t,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(e,t.componentIndex)&&(i=n)})),i}(e,o,i),l=s.findRepresentativeAxisProxy(o).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(a=Ib(0,a.slice(),r.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:a[0],endValue:a[1]})}},MI._dispatchZoomAction=function(e){var t=[];wI(e,(function(e,n){t.push(m(e))})),t.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:t})},bC("dataZoom",SI),np((function(e){if(e){var t=e.dataZoom||(e.dataZoom=[]);z(t)||(e.dataZoom=t=[t]);var n=e.toolbox;if(n&&(z(n)&&(n=n[0]),n&&n.feature)){var i=n.feature.dataZoom;a("xAxis",i),a("yAxis",i)}}function a(n,i){if(i){var a=n+"Index",r=i[a];null==r||"all"===r||z(r)||(r=!1===r||"none"===r?[]:[r]),function(o,s){var l=e[o];z(l)||(l=l?[l]:[]),wI(l,(function(e,o){if(null==r||"all"===r||-1!==S(r,o)){var s={type:"select",$fromToolbox:!0,filterMode:i.filterMode||"filter",id:"\0_ec_\0toolbox-dataZoom_"+n+o};s[a]=o,t.push(s)}}))}(n)}}}));var II=xh.toolbox.restore;function AI(e){this.model=e}AI.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:II.title},AI.prototype.onclick=function(e,t,n){!function(e){e[iI]=null}(e),t.dispatchAction({type:"restore",from:this.uid})},bC("restore",AI),ap({type:"restore",event:"restore",update:"prepareAndUpdate"},(function(e,t){t.resetOption("recreate")})),cp({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var DI=I,kI=Wl,LI=["","-webkit-","-moz-","-o-"];function EI(e,t,n,i,a){var r=t&&t.painter;if(n){var o=r&&r.getViewportRoot();o&&function(e,t,n,i,a){Ne(Oe,t,i,a,!0)&&Ne(e,n,Oe[0],Oe[1])}(e,o,document.body,i,a)}else{e[0]=i,e[1]=a;var s=r&&r.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}function PI(e,t,n){if(a.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var r=this._zr=t.getZr(),o=this._appendToBody=n&&n.appendToBody;this._styleCoord=[0,0,0,0],EI(this._styleCoord,r,o,t.getWidth()/2,t.getHeight()/2),o?document.body.appendChild(i):e.appendChild(i),this._container=e,this._show=!1,this._hideTimeout;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(e){if(e=e||window.event,!s._enterable){var t=r.handler;$e(r.painter.getViewportRoot(),e,!0),t.dispatch("mousemove",e)}},i.onmouseleave=function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1}}function zI(e,t,n,i){e[0]=n,e[1]=i,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}function OI(e){var t=this._zr=e.getZr();this._styleCoord=[0,0,0,0],zI(this._styleCoord,t,e.getWidth()/2,e.getHeight()/2),this._show=!1,this._hideTimeout}PI.prototype={constructor:PI,_enterable:!0,update:function(e){var t=this._container,n=t.currentStyle||document.defaultView.getComputedStyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==n.position&&(i.position="relative"),e.get("alwaysShowContent")&&this._moveTooltipIfResized()},_moveTooltipIfResized:function(){var e=this._styleCoord[2],t=this._styleCoord[3],n=e*this._zr.getWidth(),i=t*this._zr.getHeight();this.moveTo(n,i)},show:function(e){clearTimeout(this._hideTimeout);var t=this.el,n=this._styleCoord;t.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+function(e){var t=[],n=e.get("transitionDuration"),i=e.get("backgroundColor"),r=e.getModel("textStyle"),o=e.get("padding");return n&&t.push(function(e){var t="cubic-bezier(0.23, 1, 0.32, 1)",n="left "+e+"s "+t+",top "+e+"s "+t;return A(LI,(function(e){return e+"transition:"+n})).join(";")}(n)),i&&(a.canvasSupported?t.push("background-Color:"+i):(t.push("background-Color:#"+Ft(i)),t.push("filter:alpha(opacity=70)"))),DI(["width","color","radius"],(function(n){var i="border-"+n,a=kI(i),r=e.get(a);null!=r&&t.push(i+":"+r+("color"===n?"":"px"))})),t.push(function(e){var t=[],n=e.get("fontSize"),i=e.getTextColor();i&&t.push("color:"+i),t.push("font:"+e.getFont());var a=e.get("lineHeight");null==a&&(a=Math.round(3*n/2)),n&&t.push("line-height:"+a+"px");var r=e.get("textShadowColor"),o=e.get("textShadowBlur")||0,s=e.get("textShadowOffsetX")||0,l=e.get("textShadowOffsetY")||0;return o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+r),DI(["decoration","align"],(function(n){var i=e.get(n);i&&t.push("text-"+n+":"+i)})),t.join(";")}(r)),null!=o&&t.push("padding:"+Hl(o).join("px ")+"px"),t.join(";")+";"}(e)+";left:"+n[0]+"px;top:"+n[1]+"px;"+(e.get("extraCssText")||""),t.style.display=t.innerHTML?"block":"none",t.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(e){this.el.innerHTML=null==e?"":e},setEnterable:function(e){this._enterable=e},getSize:function(){var e=this.el;return[e.clientWidth,e.clientHeight]},moveTo:function(e,t){var n=this._styleCoord;EI(n,this._zr,this._appendToBody,e,t);var i=this.el.style;i.left=n[0]+"px",i.top=n[1]+"px"},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(e){!this._show||this._inContent&&this._enterable||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(E(this.hide,this),e)):this.hide())},isShow:function(){return this._show},dispose:function(){this.el.parentNode.removeChild(this.el)},getOuterSize:function(){var e=this.el.clientWidth,t=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var n=document.defaultView.getComputedStyle(this.el);n&&(e+=parseInt(n.borderLeftWidth,10)+parseInt(n.borderRightWidth,10),t+=parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10))}return{width:e,height:t}}},OI.prototype={constructor:OI,_enterable:!0,update:function(e){e.get("alwaysShowContent")&&this._moveTooltipIfResized()},_moveTooltipIfResized:function(){var e=this._styleCoord[2],t=this._styleCoord[3],n=e*this._zr.getWidth(),i=t*this._zr.getHeight();this.moveTo(n,i)},show:function(e){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(e,t,n){this.el&&this._zr.remove(this.el);for(var i={},a=e,r="{marker",o=a.indexOf(r);0<=o;){var s=a.indexOf("|}"),l=a.substr(o+r.length,s-o-r.length);-1<l.indexOf("sub")?i["marker"+l]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:t[l],textOffset:[3,0]}:i["marker"+l]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:t[l]},o=(a=a.substr(s+1)).indexOf("{marker")}var u=n.getModel("textStyle"),c=u.get("fontSize"),h=n.get("textLineHeight");null==h&&(h=Math.round(3*c/2)),this.el=new zo({style:$s({},u,{rich:i,text:e,textBackgroundColor:n.get("backgroundColor"),textBorderRadius:n.get("borderRadius"),textFill:n.get("textStyle.color"),textPadding:n.get("padding"),textLineHeight:h}),z:n.get("z")}),this._zr.add(this.el);var d=this;this.el.on("mouseover",(function(){d._enterable&&(clearTimeout(d._hideTimeout),d._show=!0),d._inContent=!0})),this.el.on("mouseout",(function(){d._enterable&&d._show&&d.hideLater(d._hideDelay),d._inContent=!1}))},setEnterable:function(e){this._enterable=e},getSize:function(){var e=this.el.getBoundingRect();return[e.width,e.height]},moveTo:function(e,t){if(this.el){var n=this._styleCoord;zI(n,this._zr,e,t),this.el.attr("position",[n[0],n[1]])}},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(e){!this._show||this._inContent&&this._enterable||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(E(this.hide,this),e)):this.hide())},isShow:function(){return this._show},dispose:function(){clearTimeout(this._hideTimeout),this.el&&this._zr.remove(this.el)},getOuterSize:function(){var e=this.getSize();return{width:e[0],height:e[1]}}};var NI=E,RI=I,BI=wl,VI=new Zo({shape:{x:-1,y:-1,width:2,height:2}});function GI(e){for(var t=e.pop();e.length;){var n=e.pop();n&&(ml.isInstance(n)&&(n=n.get("tooltip",!0)),"string"==typeof n&&(n={formatter:n}),t=new ml(n,t,t.ecModel))}return t}function WI(e,t){return e.dispatchAction||E(t.dispatchAction,t)}function HI(e){return"center"===e||"middle"===e}hp({type:"tooltip",init:function(e,t){if(!a.node){var n,i=e.getComponent("tooltip"),r=i.get("renderMode");this._renderMode=Ua(r),"html"===this._renderMode?(n=new PI(t.getDom(),t,{appendToBody:i.get("appendToBody",!0)}),this._newLine="<br/>"):(n=new OI(t),this._newLine="\n"),this._tooltipContent=n}},render:function(e,t,n){if(!a.node){this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n,this._lastDataByCoordSys=null,this._alwaysShowContent=e.get("alwaysShowContent");var i=this._tooltipContent;i.update(e),i.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var e=this._tooltipModel.get("triggerOn");VM("itemTooltip",this._api,NI((function(t,n,i){"none"!==e&&(0<=e.indexOf(t)?this._tryShow(n,i):"leave"===t&&this._hide(i))}),this))},_keepShow:function(){var e=this._tooltipModel,t=this._ecModel,n=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==e.get("triggerOn")){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){n.isDisposed()||i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY})}))}},manuallyShowTip:function(e,t,n,i){if(i.from!==this.uid&&!a.node){var r=WI(i,n);this._ticket="";var o=i.dataByCoordSys;if(i.tooltip&&null!=i.x&&null!=i.y){var s=VI;s.position=[i.x,i.y],s.update(),s.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:s},r)}else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:i.dataByCoordSys,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,i))return;var l=AM(i,t),u=l.point[0],c=l.point[1];null!=u&&null!=c&&this._tryShow({offsetX:u,offsetY:c,position:i.position,target:l.el},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},r))}},manuallyHideTip:function(e,t,n,i){var a=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&a.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,i.from!==this.uid&&this._hide(WI(i,n))},_manuallyAxisShowTip:function(e,t,n,i){var a=i.seriesIndex,r=i.dataIndex,o=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=a&&null!=r&&null!=o){var s=t.getSeriesByIndex(a);if(s&&"axis"===(e=GI([s.getData().getItemModel(r),s,(s.coordinateSystem||{}).model,e])).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:a,dataIndex:r,position:i.position}),!0}},_tryShow:function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var i=e.dataByCoordSys;i&&i.length?this._showAxisTooltip(i,e):n&&null!=n.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(e,n,t)):n&&n.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(e,n,t)):(this._lastDataByCoordSys=null,this._hide(t))}},_showOrMove:function(e,t){var n=e.get("showDelay");t=E(t,this),clearTimeout(this._showTimout),0<n?this._showTimout=setTimeout(t,n):t()},_showAxisTooltip:function(e,t){var n=this._ecModel,i=this._tooltipModel,a=[t.offsetX,t.offsetY],r=[],o=[],s=GI([t.tooltipOption,i]),l=this._renderMode,u=this._newLine,c={};RI(e,(function(e){RI(e.dataByAxis,(function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),i=e.value,a=[];if(t&&null!=i){var s=eT(i,t.axis,n,e.seriesDataIndices,e.valueLabelOpt);I(e.seriesDataIndices,(function(r){var u=n.getSeriesByIndex(r.seriesIndex),h=r.dataIndexInside,d=u&&u.getDataParams(h);if(d.axisDim=e.axisDim,d.axisIndex=e.axisIndex,d.axisType=e.axisType,d.axisId=e.axisId,d.axisValue=Yf(t.axis,i),d.axisValueLabel=s,d){o.push(d);var p,f=u.formatTooltip(h,!0,null,l);if(R(f)){p=f.html;var g=f.markers;v(c,g)}else p=f;a.push(p)}}));var h=s;"html"!==l?r.push(a.join(u)):r.push((h?Xl(h)+u:"")+a.join(u))}}))}),this),r.reverse(),r=r.join(this._newLine+this._newLine);var h=t.position;this._showOrMove(s,(function(){this._updateContentNotChangedOnAxis(e)?this._updatePosition(s,h,a[0],a[1],this._tooltipContent,o):this._showTooltipContent(s,r,o,Math.random(),a[0],a[1],h,void 0,c)}))},_showSeriesItemTooltip:function(e,t,n){var i=this._ecModel,a=t.seriesIndex,r=i.getSeriesByIndex(a),o=t.dataModel||r,s=t.dataIndex,l=t.dataType,u=o.getData(l),c=GI([u.getItemModel(s),o,r&&(r.coordinateSystem||{}).model,this._tooltipModel]),h=c.get("trigger");if(null==h||"item"===h){var d,p,f=o.getDataParams(s,l),g=o.formatTooltip(s,!1,l,this._renderMode);p=R(g)?(d=g.html,g.markers):(d=g,null);var m="item_"+o.name+"_"+s;this._showOrMove(c,(function(){this._showTooltipContent(c,d,f,m,e.offsetX,e.offsetY,e.position,e.target,p)})),n({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:a,from:this.uid})}},_showComponentItemTooltip:function(e,t,n){var i=t.tooltip;"string"==typeof i&&(i={content:i,formatter:i});var a=new ml(i,this._tooltipModel,this._ecModel),r=a.get("content"),o=Math.random();this._showOrMove(a,(function(){this._showTooltipContent(a,r,a.get("formatterParams")||{},o,e.offsetX,e.offsetY,e.position,t)})),n({type:"showTip",from:this.uid})},_showTooltipContent:function(e,t,n,i,a,r,o,s,l){if(this._ticket="",e.get("showContent")&&e.get("show")){var u=this._tooltipContent,c=e.get("formatter");o=o||e.get("position");var h=t;if(c&&"string"==typeof c)h=jl(c,n,!0);else if("function"==typeof c){var d=NI((function(t,i){t===this._ticket&&(u.setContent(i,l,e),this._updatePosition(e,o,a,r,u,n,s))}),this);this._ticket=i,h=c(n,i,d)}u.setContent(h,l,e),u.show(e),this._updatePosition(e,o,a,r,u,n,s)}},_updatePosition:function(e,t,n,i,a,r,o){var s=this._api.getWidth(),l=this._api.getHeight();t=t||e.get("position");var u=a.getSize(),c=e.get("align"),h=e.get("verticalAlign"),d=o&&o.getBoundingRect().clone();if(o&&d.applyTransform(o.transform),"function"==typeof t&&(t=t([n,i],r,a.el,d,{viewSize:[s,l],contentSize:u.slice()})),z(t))n=BI(t[0],s),i=BI(t[1],l);else if(R(t)){t.width=u[0],t.height=u[1];var p=lu(t,{width:s,height:l});n=p.x,i=p.y,h=c=null}else if("string"==typeof t&&o)n=(f=function(e,t,n){var i=n[0],a=n[1],r=0,o=0,s=t.width,l=t.height;switch(e){case"inside":r=t.x+s/2-i/2,o=t.y+l/2-a/2;break;case"top":r=t.x+s/2-i/2,o=t.y-a-5;break;case"bottom":r=t.x+s/2-i/2,o=t.y+l+5;break;case"left":r=t.x-i-5,o=t.y+l/2-a/2;break;case"right":r=t.x+s+5,o=t.y+l/2-a/2}return[r,o]}(t,d,u))[0],i=f[1];else{var f;n=(f=function(e,t,n,i,a,r,o){var s=n.getOuterSize(),l=s.width,u=s.height;return null!=r&&(i<e+l+r?e-=l+r:e+=r),null!=o&&(a<t+u+o?t-=u+o:t+=o),[e,t]}(n,i,a,s,l,c?null:20,h?null:20))[0],i=f[1]}c&&(n-=HI(c)?u[0]/2:"right"===c?u[0]:0),h&&(i-=HI(h)?u[1]/2:"bottom"===h?u[1]:0),e.get("confine")&&(n=(f=function(e,t,n,i,a){var r=n.getOuterSize(),o=r.width,s=r.height;return e=Math.min(e+o,i)-o,t=Math.min(t+s,a)-s,[e=Math.max(e,0),t=Math.max(t,0)]}(n,i,a,s,l))[0],i=f[1]),a.moveTo(n,i)},_updateContentNotChangedOnAxis:function(e){var t=this._lastDataByCoordSys,n=!!t&&t.length===e.length;return n&&RI(t,(function(t,i){var a=t.dataByAxis||{},r=(e[i]||{}).dataByAxis||[];(n&=a.length===r.length)&&RI(a,(function(e,t){var i=r[t]||{},a=e.seriesDataIndices||[],o=i.seriesDataIndices||[];(n&=e.value===i.value&&e.axisType===i.axisType&&e.axisId===i.axisId&&a.length===o.length)&&RI(a,(function(e,t){var i=o[t];n&=e.seriesIndex===i.seriesIndex&&e.dataIndex===i.dataIndex}))}))})),this._lastDataByCoordSys=e,!!n},_hide:function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},dispose:function(e,t){a.node||(this._tooltipContent.dispose(),HM("itemTooltip",t))}}),ap({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},(function(){})),ap({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},(function(){}));var FI=["rect","polygon","keep","clear"],$I=I;function XI(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!0}function YI(e,t,n){var i={};return $I(t,(function(t){var a=i[t]=function(){function e(){}return e.prototype.__hidden=e.prototype,new e}();$I(e[t],(function(e,i){if(Hx.isValidType(i)){var r={type:i,visual:e};n&&n(r,t),a[i]=new Hx(r),"opacity"===i&&((r=m(r)).type="colorAlpha",a.__hidden.__alphaForOpacity=new Hx(r))}}))})),i}function UI(e,t,n){var i;I(n,(function(e){t.hasOwnProperty(e)&&XI(t[e])&&(i=!0)})),i&&I(n,(function(n){t.hasOwnProperty(n)&&XI(t[n])?e[n]=m(t[n]):delete e[n]}))}var jI={lineX:ZI(0),lineY:ZI(1),rect:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])},rect:function(e,t,n){return e&&n.boundingRect.intersect(e)}},polygon:{point:function(e,t,n){return e&&n.boundingRect.contain(e[0],e[1])&&lg(n.range,e[0],e[1])},rect:function(e,t,n){var i=n.range;if(!e||i.length<=1)return!1;var a=e.x,r=e.y,o=e.width,s=e.height,l=i[0];return!!(lg(i,a,r)||lg(i,a+o,r)||lg(i,a,r+s)||lg(i,a+o,r+s)||In.create(e).contain(l[0],l[1])||ol(a,r,a+o,r,i)||ol(a,r,a,r+s,i)||ol(a+o,r,a+o,r+s,i)||ol(a,r+s,a+o,r+s,i))||void 0}}};function ZI(e){var t=["x","y"],n=["width","height"];return{point:function(t,n,i){if(t){var a=i.range;return qI(t[e],a)}},rect:function(i,a,r){if(i){var o=r.range,s=[i[t[e]],i[t[e]]+i[n[e]]];return s[1]<s[0]&&s.reverse(),qI(s[0],o)||qI(s[1],o)||qI(o[0],s)||qI(o[1],s)}}}}function qI(e,t){return t[0]<=e&&e<=t[1]}var KI=["inBrush","outOfBrush"],JI="__ecBrushSelect",QI="__ecInBrushSelectEvent",eA=gd.VISUAL.BRUSH;function tA(e){e.eachComponent({mainType:"brush"},(function(t){(t.brushTargetManager=new $C(t.option,e)).setInputRanges(t.areas,e)}))}function nA(e,t){if(!e.isDisposed()){var n=e.getZr();n[QI]=!0,e.dispatchAction({type:"brushSelect",batch:t}),n[QI]=!1}}function iA(e,t,n,i){for(var a=0,r=t.length;a<r;a++){var o=t[a];if(e[o.brushType](i,n,o.selectors,o))return!0}}function aA(e){var t=e.brushSelector;if(N(t)){var n=[];return I(jI,(function(e,i){n[i]=function(n,i,a,r){var o=i.getItemLayout(n);return e[t](o,a,r)}})),n}if(O(t)){var i={};return I(jI,(function(e,n){i[n]=t})),i}return t}op(eA,(function(e,t,n){e.eachComponent({mainType:"brush"},(function(e){n&&"takeGlobalCursor"===n.type&&e.setBrushOption("brush"===n.key?n.brushOption:{brushType:!1})})),tA(e)})),sp(eA,(function(e,t,n){var i,a,r=[];e.eachComponent({mainType:"brush"},(function(t,n){var o={brushId:t.id,brushIndex:n,brushName:t.name,areas:m(t.areas),selected:[]};r.push(o);var s=t.option,l=s.brushLink,u=[],c=[],h=[],d=0;n||(i=s.throttleType,a=s.throttleDelay);var p=A(t.areas,(function(e){return function(e){var t=e.selectors={};return I(jI[e.brushType],(function(n,i){t[i]=function(i){return n(i,t,e)}})),e}(_({boundingRect:rA[e.brushType](e)},e))})),f=YI(t.option,KI,(function(e){e.mappingMethod="fixed"}));function g(e){return"all"===l||u[e]}function v(e){return!!e.length}z(l)&&I(l,(function(e){u[e]=1})),e.eachSeries((function(n,i){var a=h[i]=[];"parallel"===n.subType?function(e,t){var n=e.coordinateSystem;d|=n.hasAxisBrushed(),g(t)&&n.eachActiveState(e.getData(),(function(e,t){"active"===e&&(c[t]=1)}))}(n,i):function(n,i,a){var r=aA(n);if(r&&!function(e,t){var n=e.option.seriesIndex;return null!=n&&"all"!==n&&(z(n)?S(n,t)<0:t!==n)}(t,i)&&(I(p,(function(i){r[i.brushType]&&t.brushTargetManager.controlSeries(i,n,e)&&a.push(i),d|=v(a)})),g(i)&&v(a))){var o=n.getData();o.each((function(e){iA(r,a,o,e)&&(c[e]=1)}))}}(n,i,a)})),e.eachSeries((function(e,t){var n={seriesId:e.id,seriesIndex:t,seriesName:e.name,dataIndex:[]};o.selected.push(n);var i=aA(e),a=h[t],r=e.getData(),s=g(t)?function(e){return c[e]?(n.dataIndex.push(r.getRawIndex(e)),"inBrush"):"outOfBrush"}:function(e){return iA(i,a,r,e)?(n.dataIndex.push(r.getRawIndex(e)),"inBrush"):"outOfBrush"};(g(t)?d:v(a))&&function(e,t,n,i,a,r){var o,s={};function l(e){return n.getItemVisual(o,e)}function u(e,t){n.setItemVisual(o,e,t)}function c(e,a){o=e;var r=n.getRawDataItem(o);if(!r||!1!==r.visualMap)for(var c=i.call(void 0,e),h=t[c],d=s[c],p=0,f=d.length;p<f;p++){var g=d[p];h[g]&&h[g].applyVisual(e,l,u)}}I(e,(function(e){var n=Hx.prepareVisualTypes(t[e]);s[e]=n})),n.each(c)}(KI,f,r,s)}))})),function(e,t,n,i,a){if(a){var r=e.getZr();r[QI]||(r[JI]||(r[JI]=nA),mh(r,JI,n,t)(e,i))}}(t,i,a,r,n)}));var rA={lineX:te,lineY:te,rect:function(e){return oA(e.range)},polygon:function(e){for(var t,n=e.range,i=0,a=n.length;i<a;i++){t=t||[[1/0,-1/0],[1/0,-1/0]];var r=n[i];r[0]<t[0][0]&&(t[0][0]=r[0]),r[0]>t[0][1]&&(t[0][1]=r[0]),r[1]<t[1][0]&&(t[1][0]=r[1]),r[1]>t[1][1]&&(t[1][1]=r[1])}return t&&oA(t)}};function oA(e){return new In(e[0][0],e[1][0],e[0][1]-e[0][0],e[1][1]-e[1][0])}var sA=["#ddd"];function lA(e,t){return v({brushType:e.brushType,brushMode:e.brushMode,transformable:e.transformable,brushStyle:new ml(e.brushStyle).getItemStyle(),removeOnClick:e.removeOnClick,z:e.z},t,!0)}function uA(e,t,n,i){i&&i.$from===e.id||this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())}cp({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(e,t){var n=this.option;t||UI(n,e,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:sA},i.hasOwnProperty("liftZ")||(i.liftZ=5)},setAreas:function(e){e&&(this.areas=A(e,(function(e){return lA(this.option,e)}),this))},setBrushOption:function(e){this.brushOption=lA(this.option,e),this.brushType=this.brushOption.brushType}}),hp({type:"brush",init:function(e,t){this.ecModel=e,this.api=t,this.model,(this._brushController=new Kb(t.getZr())).on("brush",E(this._onBrush,this)).mount()},render:function(e){return this.model=e,uA.apply(this,arguments)},updateTransform:function(e,t){return tA(t),uA.apply(this,arguments)},updateView:uA,dispose:function(){this._brushController.dispose()},_onBrush:function(e,t){var n=this.model.id;this.model.brushTargetManager.setOutputRanges(e,this.ecModel),t.isEnd&&!t.removeOnClick||this.api.dispatchAction({type:"brush",brushId:n,areas:m(e),$from:n}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:m(e),$from:n})}}),ap({type:"brush",event:"brush"},(function(e,t){t.eachComponent({mainType:"brush",query:e},(function(t){t.setAreas(e.areas)}))})),ap({type:"brushSelect",event:"brushSelected",update:"none"},(function(){})),ap({type:"brushEnd",event:"brushEnd",update:"none"},(function(){}));var cA=xh.toolbox.brush;function hA(e,t,n){this.model=e,this.ecModel=t,this.api=n,this._brushType,this._brushMode}hA.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:m(cA.title)};var dA=hA.prototype;function pA(e){var t=e.itemStyle||(e.itemStyle={}),n=t.emphasis||(t.emphasis={}),i=e.label||e.label||{},a=i.normal||(i.normal={}),r={normal:1,emphasis:1};I(i,(function(e,t){r[t]||fA(a,t)||(a[t]=e)})),n.label&&!fA(i,"emphasis")&&(i.emphasis=n.label,delete n.label)}function fA(e,t){return e.hasOwnProperty(t)}dA.render=dA.updateView=function(e,t,n){var i,a,r;t.eachComponent({mainType:"brush"},(function(e){i=e.brushType,a=e.brushOption.brushMode||"single",r|=e.areas.length})),this._brushType=i,this._brushMode=a,I(e.get("type",!0),(function(t){e.setIconStatus(t,("keep"===t?"multiple"===a:"clear"===t?r:t===i)?"emphasis":"normal")}))},dA.getIcons=function(){var e=this.model,t=e.get("icon",!0),n={};return I(e.get("type",!0),(function(e){t[e]&&(n[e]=t[e])})),n},dA.onclick=function(e,t,n){var i=this._brushType,a=this._brushMode;"clear"===n?(t.dispatchAction({type:"axisAreaSelect",intervals:[]}),t.dispatchAction({type:"brush",command:"clear",areas:[]})):t.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===a?"single":"multiple":a}})},bC("brush",hA),np((function(e,t){var n=e&&e.brush;if(z(n)||(n=n?[n]:[]),n.length){var i=[];I(n,(function(e){var t=e.hasOwnProperty("toolbox")?e.toolbox:[];t instanceof Array&&(i=i.concat(t))}));var a=e&&e.toolbox;z(a)&&(a=a[0]),a||(a={feature:{}},e.toolbox=[a]);var r=a.feature||(a.feature={}),o=r.brush||(r.brush={}),s=o.type||(o.type=[]);s.push.apply(s,i),function(e){var t={};I(e,(function(e){t[e]=1})),e.length=0,I(t,(function(t,n){e.push(n)}))}(s),t&&!s.length&&s.push.apply(s,FI)}})),cp({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),hp({type:"title",render:function(e,t,n){if(this.group.removeAll(),e.get("show")){var i=this.group,a=e.getModel("textStyle"),r=e.getModel("subtextStyle"),o=e.get("textAlign"),s=F(e.get("textBaseline"),e.get("textVerticalAlign")),l=new zo({style:$s({},a,{text:e.get("text"),textFill:a.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),c=e.get("subtext"),h=new zo({style:$s({},r,{text:c,textFill:r.getTextColor(),y:u.height+e.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=e.get("link"),p=e.get("sublink"),f=e.get("triggerEvent",!0);l.silent=!d&&!f,h.silent=!p&&!f,d&&l.on("click",(function(){tu(d,"_"+e.get("target"))})),p&&h.on("click",(function(){tu(p,"_"+e.get("subtarget"))})),l.eventData=h.eventData=f?{componentType:"title",componentIndex:e.componentIndex}:null,i.add(l),c&&i.add(h);var g=i.getBoundingRect(),m=e.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=lu(m,{width:n.getWidth(),height:n.getHeight()},e.get("padding"));o||("middle"===(o=e.get("left")||e.get("right"))&&(o="center"),"right"===o?v.x+=v.width:"center"===o&&(v.x+=v.width/2)),s||("center"===(s=e.get("top")||e.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),i.attr("position",[v.x,v.y]);var y={textAlign:o,textVerticalAlign:s};l.setStyle(y),h.setStyle(y),g=i.getBoundingRect();var x=v.margin,_=e.getItemStyle(["color","opacity"]);_.fill=e.get("backgroundColor");var b=new Zo({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:e.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});i.add(b)}}}),vu.registerSubTypeDefaulter("timeline",(function(){return"slider"})),ap({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},(function(e,t){var n=t.getComponent("timeline");return n&&null!=e.currentIndex&&(n.setCurrentIndex(e.currentIndex),!n.get("loop",!0)&&n.isIndexMax()&&n.setPlayState(!1)),t.resetOption("timeline"),_({currentIndex:n.option.currentIndex},e)})),ap({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},(function(e,t){var n=t.getComponent("timeline");n&&null!=e.playState&&n.setPlayState(e.playState)}));var gA=vu.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(e,t,n){this._data,this._names,this.mergeDefaultAndTheme(e,n),this._initData()},mergeOption:function(e){gA.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(e){null==e&&(e=this.option.currentIndex);var t=this._data.count();this.option.loop?e=(e%t+t)%t:(t<=e&&(e=t-1),e<0&&(e=0)),this.option.currentIndex=e},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(e){this.option.autoPlay=!!e},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var e=this.option,t=e.data||[],n=e.axisType,i=this._names=[];if("category"===n){var a=[];I(t,(function(e,t){var n,r=Na(e);R(e)?(n=m(e)).value=t:n=t,a.push(n),N(r)||null!=r&&!isNaN(r)||(r=""),i.push(r+"")})),t=a}var r={category:"ordinal",time:"time"}[n]||"number";(this._data=new Lp([{name:"value",type:r}],this)).initData(t,i)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}});function mA(e,t,n,i){_g.call(this,e,t,n),this.type=i||"value",this.model=null}T(gA.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}}),Lc);var vA=eh.extend({type:"timeline"});mA.prototype={constructor:mA,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},M(mA,_g);var yA=E,xA=I,_A=Math.PI;function bA(e,t,n,i,a,r){var o=t.get("color");a?(a.setColor(o),n.add(a),r&&r.onUpdate(a)):((a=ag(e.get("symbol"),-1,-1,2,2,o)).setStyle("strokeNoScale",!0),n.add(a),r&&r.onCreate(a));var s=t.getItemStyle(["color","symbol","symbolSize"]);a.setStyle(s),i=v({rectHover:!0,z2:100},i,!0);var l=e.get("symbolSize");(l=l instanceof Array?l.slice():[+l,+l])[0]/=2,l[1]/=2,i.scale=l;var u=e.get("symbolOffset");if(u){var c=i.position=i.position||[0,0];c[0]+=wl(u[0],l[0]),c[1]+=wl(u[1],l[1])}var h=e.get("symbolRotate");return i.rotation=(h||0)*Math.PI/180||0,a.attr(i),a.updateTransform(),a}function wA(e,t,n,i,a){if(!e.dragging){var r=i.getModel("checkpointStyle"),o=n.dataToCoord(i.getData().get(["value"],t));a||!r.get("animation",!0)?e.attr({position:[o,0]}):(e.stopAnimation(!0),e.animateTo({position:[o,0]},r.get("animationDuration",!0),r.get("animationEasing",!0)))}}vA.extend({type:"timeline.slider",init:function(e,t){this.api=t,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(e,t,n,i){if(this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get("show",!0)){var a=this._layout(e,n),r=this._createGroup("mainGroup"),o=this._createGroup("labelGroup"),s=this._axis=this._createAxis(a,e);e.formatTooltip=function(e){return Xl(s.scale.getLabel(e))},xA(["AxisLine","AxisTick","Control","CurrentPointer"],(function(t){this["_render"+t](a,r,s,e)}),this),this._renderAxisLabel(a,o,s,e),this._position(a,e)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(e,t){var n=e.get("label.position"),i=e.get("orient"),a=function(e,t){return lu(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()},e.get("padding"))}(e,t);null==n||"auto"===n?n="horizontal"===i?a.y+a.height/2<t.getHeight()/2?"-":"+":a.x+a.width/2<t.getWidth()/2?"+":"-":isNaN(n)&&(n={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[i][n]);var r,o,s,l,u={horizontal:"center",vertical:0<=n||"+"===n?"left":"right"},c={horizontal:0<=n||"+"===n?"top":"bottom",vertical:"middle"},h={horizontal:0,vertical:_A/2},d="vertical"===i?a.height:a.width,p=e.getModel("controlStyle"),f=p.get("show",!0),g=f?p.get("itemSize"):0,m=f?p.get("itemGap"):0,v=g+m,y=e.get("label.rotate")||0;y=y*_A/180;var x=p.get("position",!0),_=f&&p.get("showPlayBtn",!0),b=f&&p.get("showPrevBtn",!0),w=0,S=d;return"left"===x||"bottom"===x?(_&&(r=[0,0],w+=v),b&&(o=[w,0],w+=v)):(_&&(r=[S-g,0],S-=v),b&&(o=[0,0],w+=v)),f&&p.get("showNextBtn",!0)&&(s=[S-g,0],S-=v),l=[w,S],e.get("inverse")&&l.reverse(),{viewRect:a,mainLength:d,orient:i,rotation:h[i],labelRotation:y,labelPosOpt:n,labelAlign:e.get("label.align")||u[i],labelBaseline:e.get("label.verticalAlign")||e.get("label.baseline")||c[i],playPosition:r,prevBtnPosition:o,nextBtnPosition:s,axisExtent:l,controlSize:g,controlGap:m}},_position:function(e,t){var n=this._mainGroup,i=this._labelGroup,a=e.viewRect;if("vertical"===e.orient){var r=at(),o=a.x,s=a.y+a.height;lt(r,r,[-o,-s]),ut(r,r,-_A/2),lt(r,r,[o,s]),(a=a.clone()).applyTransform(r)}var l=m(a),u=m(n.getBoundingRect()),c=m(i.getBoundingRect()),h=n.position,d=i.position;d[0]=h[0]=l[0][0];var p,f=e.labelPosOpt;function g(e){var t=e.position;e.origin=[l[0][0]-t[0],l[1][0]-t[1]]}function m(e){return[[e.x,e.x+e.width],[e.y,e.y+e.height]]}function v(e,t,n,i,a){e[i]+=n[i][a]-t[i][a]}isNaN(f)?(v(h,u,l,1,p="+"===f?0:1),v(d,c,l,1,1-p)):(v(h,u,l,1,p=0<=f?0:1),d[1]=h[1]+f),n.attr("position",h),i.attr("position",d),n.rotation=i.rotation=e.rotation,g(n),g(i)},_createAxis:function(e,t){var n=t.getData(),i=t.get("axisType"),a=$f(t,i);a.getTicks=function(){return n.mapArray(["value"],(function(e){return e}))};var r=n.getDataExtent("value");a.setExtent(r[0],r[1]),a.niceTicks();var o=new mA("value",a,e.axisExtent,i);return o.model=t,o},_createGroup:function(e){var t=this["_"+e]=new An;return this.group.add(t),t},_renderAxisLine:function(e,t,n,i){var a=n.getExtent();i.get("lineStyle.show")&&t.add(new Ko({shape:{x1:a[0],y1:0,x2:a[1],y2:0},style:x({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(e,t,n,i){var a=i.getData(),r=n.scale.getTicks();xA(r,(function(e){var r=n.dataToCoord(e),o=a.getItemModel(e),s=o.getModel("itemStyle"),l=o.getModel("emphasis.itemStyle"),u={position:[r,0],onclick:yA(this._changeTimeline,this,e)},c=bA(o,s,t,u);Bs(c,l.getItemStyle()),o.get("tooltip")?(c.dataIndex=e,c.dataModel=i):c.dataIndex=c.dataModel=null}),this)},_renderAxisLabel:function(e,t,n,i){if(n.getLabelModel().get("show")){var a=i.getData(),r=n.getViewLabels();xA(r,(function(i){var r=i.tickValue,o=a.getItemModel(r),s=o.getModel("label"),l=o.getModel("emphasis.label"),u=n.dataToCoord(i.tickValue),c=new zo({position:[u,0],rotation:e.labelRotation-e.rotation,onclick:yA(this._changeTimeline,this,r),silent:!1});$s(c.style,s,{text:i.formattedLabel,textAlign:e.labelAlign,textVerticalAlign:e.labelBaseline}),t.add(c),Bs(c,$s({},l))}),this)}},_renderControl:function(e,t,n,i){var a=e.controlSize,r=e.rotation,o=i.getModel("controlStyle").getItemStyle(),s=i.getModel("emphasis.controlStyle").getItemStyle(),l=[0,-a/2,a,a],u=i.getPlayState(),c=i.get("inverse",!0);function h(e,n,u,c){if(e){var h=function(e,t,n,i){var a=i.style,r=rl(e.get(t),i||{},new In(n[0],n[1],n[2],n[3]));return a&&r.setStyle(a),r}(i,n,l,{position:e,origin:[a/2,0],rotation:c?-r:0,rectHover:!0,style:o,onclick:u});t.add(h),Bs(h,s)}}h(e.nextBtnPosition,"controlStyle.nextIcon",yA(this._changeTimeline,this,c?"-":"+")),h(e.prevBtnPosition,"controlStyle.prevIcon",yA(this._changeTimeline,this,c?"+":"-")),h(e.playPosition,"controlStyle."+(u?"stopIcon":"playIcon"),yA(this._handlePlayClick,this,!u),!0)},_renderCurrentPointer:function(e,t,n,i){var a=i.getData(),r=i.getCurrentIndex(),o=a.getItemModel(r).getModel("checkpointStyle"),s=this,l={onCreate:function(e){e.draggable=!0,e.drift=yA(s._handlePointerDrag,s),e.ondragend=yA(s._handlePointerDragend,s),wA(e,r,n,i,!0)},onUpdate:function(e){wA(e,r,n,i)}};this._currentPointer=bA(o,o,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},_handlePointerDrag:function(e,t,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},_handlePointerDragend:function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},_pointerChangeTimeline:function(e,t){var n=this._toAxisCoord(e)[0],i=Ml(this._axis.getExtent().slice());n>i[1]&&(n=i[1]),n<i[0]&&(n=i[0]),this._currentPointer.position[0]=n,this._currentPointer.dirty();var a=this._findNearestTick(n),r=this.model;(t||a!==r.getCurrentIndex()&&r.get("realtime"))&&this._changeTimeline(a)},_doPlayStop:function(){this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(yA((function(){var e=this.model;this._changeTimeline(e.getCurrentIndex()+(e.get("rewind",!0)?-1:1))}),this),this.model.get("playInterval")))},_toAxisCoord:function(e){return tl(e,this._mainGroup.getLocalTransform(),!0)},_findNearestTick:function(e){var t,n=this.model.getData(),i=1/0,a=this._axis;return n.each(["value"],(function(n,r){var o=a.dataToCoord(n),s=Math.abs(o-e);s<i&&(i=s,t=r)})),t},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_changeTimeline:function(e){var t=this.model.getCurrentIndex();"+"===e?e=t+1:"-"===e&&(e=t-1),this.api.dispatchAction({type:"timelineChange",currentIndex:e,from:this.uid})}}),np((function(e){var t=e&&e.timeline;z(t)||(t=t?[t]:[]),I(t,(function(e){e&&function(e){var t=e.type,n={number:"value",time:"time"};if(n[t]&&(e.axisType=n[t],delete e.type),pA(e),fA(e,"controlPosition")){var i=e.controlStyle||(e.controlStyle={});fA(i,"position")||(i.position=e.controlPosition),"none"!==i.position||fA(i,"show")||(i.show=!1,delete i.position),delete e.controlPosition}I(e.data||[],(function(e){R(e)&&!z(e)&&(!fA(e,"value")&&fA(e,"name")&&(e.value=e.name),pA(e))}))}(e)}))}));var SA=Gl,MA=Xl;function TA(e){za(e,"label",["show"])}var CA=cp({type:"marker",dependencies:["series","grid","polar","geo"],init:function(e,t,n){this.mergeDefaultAndTheme(e,n),this._mergeOption(e,n,!1,!0)},isAnimationEnabled:function(){if(a.node)return!1;var e=this.__hostSeries;return this.getShallow("animation")&&e&&e.isAnimationEnabled()},mergeOption:function(e,t){this._mergeOption(e,t,!1,!1)},_mergeOption:function(e,t,n,i){var a=this.constructor,r=this.mainType+"Model";n||t.eachSeries((function(e){var n=e.get(this.mainType,!0),o=e[r];n&&n.data?(o?o._mergeOption(n,t,!0):(i&&TA(n),I(n.data,(function(e){e instanceof Array?(TA(e[0]),TA(e[1])):TA(e)})),x(o=new a(n,this,t),{mainType:this.mainType,seriesIndex:e.seriesIndex,name:e.name,createdBySelf:!0}),o.__hostSeries=e),e[r]=o):e[r]=null}),this)},formatTooltip:function(e,t,n,i){var a=this.getData(),r=this.getRawValue(e),o=z(r)?A(r,SA).join(", "):SA(r),s=a.getName(e),l=MA(this.name);return null==r&&!s||(l+="html"===i?"<br/>":"\n"),s&&(l+=MA(s),null!=r&&(l+=" : ")),null!=r&&(l+=MA(o)),l},getData:function(){return this._data},setData:function(e){this._data=e}});T(CA,Lc),CA.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var IA=S;function AA(e,t,n,i,a,r){var o=[],s=qp(t,i)?t.getCalculationInfo("stackResultDimension"):i,l=OA(t,s,e),u=t.indicesOfNearest(s,l)[0];o[a]=t.get(n,u),o[r]=t.get(s,u);var c=t.get(i,u),h=Tl(t.get(i,u));return 0<=(h=Math.min(h,20))&&(o[r]=+o[r].toFixed(h)),[o,c]}var DA=P,kA={min:DA(AA,"min"),max:DA(AA,"max"),average:DA(AA,"average")};function LA(e,t){var n=e.getData(),i=e.coordinateSystem;if(t&&!function(e){return!isNaN(parseFloat(e.x))&&!isNaN(parseFloat(e.y))}(t)&&!z(t.coord)&&i){var a=i.dimensions,r=EA(t,n,i,e);if((t=m(t)).type&&kA[t.type]&&r.baseAxis&&r.valueAxis){var o=IA(a,r.baseAxis.dim),s=IA(a,r.valueAxis.dim),l=kA[t.type](n,r.baseDataDim,r.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else{for(var u=[null!=t.xAxis?t.xAxis:t.radiusAxis,null!=t.yAxis?t.yAxis:t.angleAxis],c=0;c<2;c++)kA[u[c]]&&(u[c]=OA(n,n.mapDimension(a[c]),u[c]));t.coord=u}}return t}function EA(e,t,n,i){var a={};return null!=e.valueIndex||null!=e.valueDim?(a.valueDataDim=null!=e.valueIndex?t.getDimension(e.valueIndex):e.valueDim,a.valueAxis=n.getAxis(function(e,t){var n=e.getData(),i=n.dimensions;t=n.getDimension(t);for(var a=0;a<i.length;a++){var r=n.getDimensionInfo(i[a]);if(r.name===t)return r.coordDim}}(i,a.valueDataDim)),a.baseAxis=n.getOtherAxis(a.valueAxis),a.baseDataDim=t.mapDimension(a.baseAxis.dim)):(a.baseAxis=i.getBaseAxis(),a.valueAxis=n.getOtherAxis(a.baseAxis),a.baseDataDim=t.mapDimension(a.baseAxis.dim),a.valueDataDim=t.mapDimension(a.valueAxis.dim)),a}function PA(e,t){return!(e&&e.containData&&t.coord&&!function(e){return!(isNaN(parseFloat(e.x))&&isNaN(parseFloat(e.y)))}(t))||e.containData(t.coord)}function zA(e,t,n,i){return i<2?e.coord&&e.coord[i]:e.value}function OA(e,t,n){if("average"!==n)return"median"===n?e.getMedian(t):e.getDataExtent(t,!0)["max"===n?1:0];var i=0,a=0;return e.each(t,(function(e,t){isNaN(e)||(i+=e,a++)})),i/a}var NA=hp({type:"marker",init:function(){this.markerGroupMap=Q()},render:function(e,t,n){var i=this.markerGroupMap;i.each((function(e){e.__keep=!1}));var a=this.type+"Model";t.eachSeries((function(e){var i=e[a];i&&this.renderSeries(e,i,t,n)}),this),i.each((function(e){e.__keep||this.group.remove(e.group)}),this)},renderSeries:function(){}});function RA(e,t,n){var i=t.coordinateSystem;e.each((function(a){var r,o=e.getItemModel(a),s=wl(o.get("x"),n.getWidth()),l=wl(o.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(t.getMarkerPosition)r=t.getMarkerPosition(e.getValues(e.dimensions,a));else if(i){var u=e.get(i.dimensions[0],a),c=e.get(i.dimensions[1],a);r=i.dataToPoint([u,c])}}else r=[s,l];isNaN(s)||(r[0]=s),isNaN(l)||(r[1]=l),e.setItemLayout(a,r)}))}function BA(e,t,n,i){var a=e.getData(),r=i.type;if(!z(i)&&("min"===r||"max"===r||"average"===r||"median"===r||null!=i.xAxis||null!=i.yAxis)){var o,s;if(null!=i.yAxis||null!=i.xAxis)o=t.getAxis(null!=i.yAxis?"y":"x"),s=H(i.yAxis,i.xAxis);else{var l=EA(i,a,t,e);o=l.valueAxis,s=OA(a,Kp(a,l.valueDataDim),r)}var u="x"===o.dim?0:1,c=1-u,h=m(i),d={};h.type=null,h.coord=[],d.coord=[],h.coord[c]=-1/0,d.coord[c]=1/0;var p=n.get("precision");0<=p&&"number"==typeof s&&(s=+s.toFixed(Math.min(p,20))),h.coord[u]=d.coord[u]=s,i=[h,d,{type:r,valueIndex:i.valueIndex,value:s}]}return(i=[LA(e,i[0]),LA(e,i[1]),x({},i[2])])[2].type=i[2].type||"",v(i[2],i[0]),v(i[2],i[1]),i}function VA(e){return!isNaN(e)&&!isFinite(e)}function GA(e,t,n,i){var a=1-e,r=i.dimensions[e];return VA(t[a])&&VA(n[a])&&t[e]===n[e]&&i.getAxis(r).containData(t[e])}function WA(e,t){if("cartesian2d"===e.type){var n=t[0].coord,i=t[1].coord;if(n&&i&&(GA(1,n,i,e)||GA(0,n,i,e)))return!0}return PA(e,t[0])&&PA(e,t[1])}function HA(e,t,n,i,a){var r,o=i.coordinateSystem,s=e.getItemModel(t),l=wl(s.get("x"),a.getWidth()),u=wl(s.get("y"),a.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)r=i.getMarkerPosition(e.getValues(e.dimensions,t));else{var c=o.dimensions,h=e.get(c[0],t),d=e.get(c[1],t);r=o.dataToPoint([h,d])}if("cartesian2d"===o.type){var p=o.getAxis("x"),f=o.getAxis("y");c=o.dimensions,VA(e.get(c[0],t))?r[0]=p.toGlobalCoord(p.getExtent()[n?0:1]):VA(e.get(c[1],t))&&(r[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(l)||(r[0]=l),isNaN(u)||(r[1]=u)}else r=[l,u];e.setItemLayout(t,r)}function FA(e,t,n,i){var a=LA(e,i[0]),r=LA(e,i[1]),o=H,s=a.coord,l=r.coord;s[0]=o(s[0],-1/0),s[1]=o(s[1],-1/0),l[0]=o(l[0],1/0),l[1]=o(l[1],1/0);var u=y([{},a,r]);return u.coord=[a.coord,r.coord],u.x0=a.x,u.y0=a.y,u.x1=r.x,u.y1=r.y,u}function $A(e){return!isNaN(e)&&!isFinite(e)}function XA(e,t,n){var i=1-e;return $A(t[i])&&$A(n[i])}function YA(e,t){var n=t.coord[0],i=t.coord[1];return!("cartesian2d"!==e.type||!n||!i||!XA(1,n,i)&&!XA(0,n,i))||PA(e,{coord:n,x:t.x0,y:t.y0})||PA(e,{coord:i,x:t.x1,y:t.y1})}function UA(e,t,n,i,a){var r,o=i.coordinateSystem,s=e.getItemModel(t),l=wl(s.get(n[0]),a.getWidth()),u=wl(s.get(n[1]),a.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)r=i.getMarkerPosition(e.getValues(n,t));else{var c=[p=e.get(n[0],t),f=e.get(n[1],t)];o.clampData&&o.clampData(c,c),r=o.dataToPoint(c,!0)}if("cartesian2d"===o.type){var h=o.getAxis("x"),d=o.getAxis("y"),p=e.get(n[0],t),f=e.get(n[1],t);$A(p)?r[0]=h.toGlobalCoord(h.getExtent()["x0"===n[0]?0:1]):$A(f)&&(r[1]=d.toGlobalCoord(d.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(r[0]=l),isNaN(u)||(r[1]=u)}else r=[l,u];return r}NA.extend({type:"markPoint",updateTransform:function(e,t,n){t.eachSeries((function(e){var t=e.markPointModel;t&&(RA(t.getData(),e,n),this.markerGroupMap.get(e.id).updateLayout(t))}),this)},renderSeries:function(e,t,n,i){var a=e.coordinateSystem,r=e.id,o=e.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,new Ng),u=function(e,t,n){var i;i=e?A(e&&e.dimensions,(function(e){return _({name:e},t.getData().getDimensionInfo(t.getData().mapDimension(e))||{})})):[{name:"value",type:"float"}];var a=new Lp(i,n),r=A(n.get("data"),P(LA,t));return e&&(r=k(r,P(PA,e))),a.initData(r,null,e?zA:function(e){return e.value}),a}(a,e,t);t.setData(u),RA(t.getData(),e,i),u.each((function(e){var n=u.getItemModel(e),i=n.getShallow("symbol"),a=n.getShallow("symbolSize"),r=n.getShallow("symbolRotate"),s=O(i),l=O(a),c=O(r);if(s||l||c){var h=t.getRawValue(e),d=t.getDataParams(e);s&&(i=i(h,d)),l&&(a=a(h,d)),c&&(r=r(h,d))}u.setItemVisual(e,{symbol:i,symbolSize:a,symbolRotate:r,color:n.get("itemStyle.color")||o.getVisual("color")})})),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl((function(e){e.traverse((function(e){e.dataModel=t}))})),l.__keep=!0,l.group.silent=t.get("silent")||e.get("silent")}}),np((function(e){e.markPoint=e.markPoint||{}})),CA.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}}),NA.extend({type:"markLine",updateTransform:function(e,t,n){t.eachSeries((function(e){var t=e.markLineModel;if(t){var i=t.getData(),a=t.__from,r=t.__to;a.each((function(t){HA(a,t,!0,e,n),HA(r,t,!1,e,n)})),i.each((function(e){i.setItemLayout(e,[a.getItemLayout(e),r.getItemLayout(e)])})),this.markerGroupMap.get(e.id).updateLayout()}}),this)},renderSeries:function(e,t,n,i){var a=e.coordinateSystem,r=e.id,o=e.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,new F_);this.group.add(l.group);var u=function(e,t,n){var i;i=e?A(e&&e.dimensions,(function(e){return _({name:e},t.getData().getDimensionInfo(t.getData().mapDimension(e))||{})})):[{name:"value",type:"float"}];var a=new Lp(i,n),r=new Lp(i,n),o=new Lp([],n),s=A(n.get("data"),P(BA,t,e,n));e&&(s=k(s,P(WA,e)));var l=e?zA:function(e){return e.value};return a.initData(A(s,(function(e){return e[0]})),null,l),r.initData(A(s,(function(e){return e[1]})),null,l),o.initData(A(s,(function(e){return e[2]}))),o.hasItemOption=!0,{from:a,to:r,line:o}}(a,e,t),c=u.from,h=u.to,d=u.line;t.__from=c,t.__to=h,t.setData(d);var p=t.get("symbol"),f=t.get("symbolSize");function g(t,n,a){var r=t.getItemModel(n);HA(t,n,a,e,i),t.setItemVisual(n,{symbolRotate:r.get("symbolRotate"),symbolSize:r.get("symbolSize")||f[a?0:1],symbol:r.get("symbol",!0)||p[a?0:1],color:r.get("itemStyle.color")||o.getVisual("color")})}z(p)||(p=[p,p]),"number"==typeof f&&(f=[f,f]),u.from.each((function(e){g(c,e,!0),g(h,e,!1)})),d.each((function(e){var t=d.getItemModel(e).get("lineStyle.color");d.setItemVisual(e,{color:t||c.getItemVisual(e,"color")}),d.setItemLayout(e,[c.getItemLayout(e),h.getItemLayout(e)]),d.setItemVisual(e,{fromSymbolRotate:c.getItemVisual(e,"symbolRotate"),fromSymbolSize:c.getItemVisual(e,"symbolSize"),fromSymbol:c.getItemVisual(e,"symbol"),toSymbolRotate:h.getItemVisual(e,"symbolRotate"),toSymbolSize:h.getItemVisual(e,"symbolSize"),toSymbol:h.getItemVisual(e,"symbol")})})),l.updateData(d),u.line.eachItemGraphicEl((function(e,n){e.traverse((function(e){e.dataModel=t}))})),l.__keep=!0,l.group.silent=t.get("silent")||e.get("silent")}}),np((function(e){e.markLine=e.markLine||{}})),CA.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});var jA=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];NA.extend({type:"markArea",updateTransform:function(e,t,n){t.eachSeries((function(e){var t=e.markAreaModel;if(t){var i=t.getData();i.each((function(t){var a=A(jA,(function(a){return UA(i,t,a,e,n)}));i.setItemLayout(t,a),i.getItemGraphicEl(t).setShape("points",a)}))}}),this)},renderSeries:function(e,t,n,i){var a=e.coordinateSystem,r=e.id,o=e.getData(),s=this.markerGroupMap,l=s.get(r)||s.set(r,{group:new An});this.group.add(l.group),l.__keep=!0;var u=function(e,t,n){var i,a;a=e?(i=A(e&&e.dimensions,(function(e){var n=t.getData();return _({name:e},n.getDimensionInfo(n.mapDimension(e))||{})})),new Lp(A(["x0","y0","x1","y1"],(function(e,t){return{name:e,type:i[t%2].type}})),n)):new Lp(i=[{name:"value",type:"float"}],n);var r=A(n.get("data"),P(FA,t,e,n));e&&(r=k(r,P(YA,e)));var o=e?function(e,t,n,i){return e.coord[Math.floor(i/2)][i%2]}:function(e){return e.value};return a.initData(r,null,o),a.hasItemOption=!0,a}(a,e,t);t.setData(u),u.each((function(t){var n=A(jA,(function(n){return UA(u,t,n,e,i)})),r=!0;I(jA,(function(e){if(r){var n=u.get(e[0],t),i=u.get(e[1],t);($A(n)||a.getAxis("x").containData(n))&&($A(i)||a.getAxis("y").containData(i))&&(r=!1)}})),u.setItemLayout(t,{points:n,allClipped:r}),u.setItemVisual(t,{color:o.getVisual("color")})})),u.diff(l.__data).add((function(e){var t=u.getItemLayout(e);if(!t.allClipped){var n=new Ho({shape:{points:t.points}});u.setItemGraphicEl(e,n),l.group.add(n)}})).update((function(e,n){var i=l.__data.getItemGraphicEl(n),a=u.getItemLayout(e);a.allClipped?i&&l.group.remove(i):(i?Js(i,{shape:{points:a.points}},t,e):i=new Ho({shape:{points:a.points}}),u.setItemGraphicEl(e,i),l.group.add(i))})).remove((function(e){var t=l.__data.getItemGraphicEl(e);l.group.remove(t)})).execute(),u.eachItemGraphicEl((function(e,n){var i=u.getItemModel(n),a=i.getModel("label"),r=i.getModel("emphasis.label"),o=u.getItemVisual(n,"color");e.useStyle(_(i.getModel("itemStyle").getItemStyle(),{fill:Zt(o,.4),stroke:o})),e.hoverStyle=i.getModel("emphasis.itemStyle").getItemStyle(),Hs(e.style,e.hoverStyle,a,r,{labelFetcher:t,labelDataIndex:n,defaultText:u.getName(n)||"",isRectText:!0,autoColor:o}),Bs(e,{}),e.dataModel=t})),l.__data=u,l.group.silent=t.get("silent")||e.get("silent")}}),np((function(e){e.markArea=e.markArea||{}}));var ZA=xh.legend.selector,qA={all:{type:"all",title:m(ZA.all)},inverse:{type:"inverse",title:m(ZA.inverse)}},KA=cp({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},mergeOption:function(e){KA.superCall(this,"mergeOption",e),this._updateSelector(e)},_updateSelector:function(e){var t=e.selector;!0===t&&(t=e.selector=["all","inverse"]),z(t)&&I(t,(function(e,n){N(e)&&(e={type:e}),t[n]=v(e,qA[e.type])}))},optionUpdated:function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&"single"===this.get("selectedMode")){for(var t=!1,n=0;n<e.length;n++){var i=e[n].get("name");if(this.isSelected(i)){this.select(i),t=!0;break}}t||this.select(e[0].get("name"))}},_updateData:function(e){var t=[],n=[];e.eachRawSeries((function(i){var a,r=i.name;if(n.push(r),i.legendVisualProvider){var o=i.legendVisualProvider.getAllNames();e.isSeriesFiltered(i)||(n=n.concat(o)),o.length?t=t.concat(o):a=!0}else a=!0;a&&Va(i)&&t.push(i.name)})),this._availableNames=n;var i=A(this.get("data")||t,(function(e){return"string"!=typeof e&&"number"!=typeof e||(e={name:e}),new ml(e,this,this.ecModel)}),this);this._data=i},getData:function(){return this._data},select:function(e){var t=this.option.selected;"single"===this.get("selectedMode")&&I(this._data,(function(e){t[e.get("name")]=!1})),t[e]=!0},unSelect:function(e){"single"!==this.get("selectedMode")&&(this.option.selected[e]=!1)},toggleSelected:function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?"unSelect":"select"](e)},allSelect:function(){var e=this._data,t=this.option.selected;I(e,(function(e){t[e.get("name",!0)]=!0}))},inverseSelect:function(){var e=this._data,t=this.option.selected;I(e,(function(e){var n=e.get("name",!0);t.hasOwnProperty(n)||(t[n]=!0),t[n]=!t[n]}))},isSelected:function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&0<=S(this._availableNames,e)},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}}});function JA(e,t,n){var i,a={},r="toggleSelected"===e;return n.eachComponent("legend",(function(n){r&&null!=i?n[i?"select":"unSelect"](t.name):"allSelect"===e||"inverseSelect"===e?n[e]():(n[e](t.name),i=n.isSelected(t.name)),I(n.getData(),(function(e){var t=e.get("name");if("\n"!==t&&""!==t){var i=n.isSelected(t);a.hasOwnProperty(t)?a[t]=a[t]&&i:a[t]=i}}))})),"allSelect"===e||"inverseSelect"===e?{selected:a}:{name:t.name,selected:a}}ap("legendToggleSelect","legendselectchanged",P(JA,"toggleSelected")),ap("legendAllSelect","legendselectall",P(JA,"allSelect")),ap("legendInverseSelect","legendinverseselect",P(JA,"inverseSelect")),ap("legendSelect","legendselected",P(JA,"select")),ap("legendUnSelect","legendunselected",P(JA,"unSelect"));var QA=P,eD=I,tD=An,nD=hp({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new tD),this._backgroundEl,this.group.add(this._selectorGroup=new tD),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(e,t,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get("show",!0)){var a=e.get("align"),r=e.get("orient");a&&"auto"!==a||(a="right"===e.get("left")&&"vertical"===r?"right":"left");var o=e.get("selector",!0),s=e.get("selectorPosition",!0);!o||s&&"auto"!==s||(s="horizontal"===r?"end":"start"),this.renderInner(a,e,t,n,o,r,s);var l=e.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},c=e.get("padding"),h=lu(l,u,c),d=this.layoutInner(e,a,h,i,o,s),p=lu(_({width:d.width,height:d.height},l),u,c);this.group.attr("position",[p.x-d.x,p.y-d.y]),this.group.add(this._backgroundEl=MC(d,e))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(e,t,n,i,a,r,o){var s=this.getContentGroup(),l=Q(),u=t.get("selectedMode"),c=[];n.eachRawSeries((function(e){e.get("legendHoverLink")||c.push(e.id)})),eD(t.getData(),(function(a,r){var o=a.get("name");if(this.newlineDisabled||""!==o&&"\n"!==o){var h=n.getSeriesByName(o)[0];if(!l.get(o))if(h){var d=h.getData(),p=d.getVisual("color"),f=d.getVisual("borderColor");"function"==typeof p&&(p=p(h.getDataParams(0))),"function"==typeof f&&(f=f(h.getDataParams(0)));var g=d.getVisual("legendSymbol")||"roundRect",m=d.getVisual("symbol");this._createItem(o,r,a,t,g,m,e,p,f,u).on("click",QA(aD,o,null,i,c)).on("mouseover",QA(rD,h.name,null,i,c)).on("mouseout",QA(oD,h.name,null,i,c)),l.set(o,!0)}else n.eachRawSeries((function(n){if(!l.get(o)&&n.legendVisualProvider){var s=n.legendVisualProvider;if(!s.containName(o))return;var h=s.indexOfName(o),d=s.getItemVisual(h,"color"),p=s.getItemVisual(h,"borderColor");this._createItem(o,r,a,t,"roundRect",null,e,d,p,u).on("click",QA(aD,null,o,i,c)).on("mouseover",QA(rD,null,o,i,c)).on("mouseout",QA(oD,null,o,i,c)),l.set(o,!0)}}),this)}else s.add(new tD({newline:!0}))}),this),a&&this._createSelector(a,t,i,r,o)},_createSelector:function(e,t,n,i,a){var r=this.getSelectorGroup();eD(e,(function(e){!function(e){var i=e.type,a=new zo({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"legendAllSelect":"legendInverseSelect"})}});r.add(a);var o=t.getModel("selectorLabel"),s=t.getModel("emphasis.selectorLabel");Hs(a.style,a.hoverStyle={},o,s,{defaultText:e.title,isRectText:!1}),Bs(a)}(e)}))},_createItem:function(e,t,n,i,a,r,o,s,l,u){var c=i.get("itemWidth"),h=i.get("itemHeight"),d=i.get("inactiveColor"),p=i.get("inactiveBorderColor"),f=i.get("symbolKeepAspect"),g=i.getModel("itemStyle"),m=i.isSelected(e),v=new tD,y=n.getModel("textStyle"),_=n.get("icon"),b=n.getModel("tooltip"),w=b.parentModel,S=ag(a=_||a,0,0,c,h,m?s:d,null==f||f);if(v.add(iD(S,a,g,l,p,m)),!_&&r&&(r!==a||"none"===r)){var M=.8*h;"none"===r&&(r="circle");var T=ag(r,(c-M)/2,(h-M)/2,M,M,m?s:d,null==f||f);v.add(iD(T,r,g,l,p,m))}var C="left"===o?c+5:-5,I=o,A=i.get("formatter"),D=e;"string"==typeof A&&A?D=A.replace("{name}",null!=e?e:""):"function"==typeof A&&(D=A(e)),v.add(new zo({style:$s({},y,{text:D,x:C,y:h/2,textFill:m?y.getTextColor():d,textAlign:I,textVerticalAlign:"middle"})}));var k=new Zo({shape:v.getBoundingRect(),invisible:!0,tooltip:b.get("show")?x({content:e,formatter:w.get("formatter",!0)||function(){return e},formatterParams:{componentType:"legend",legendIndex:i.componentIndex,name:e,$vars:["name"]}},b.option):null});return v.add(k),v.eachChild((function(e){e.silent=!0})),k.silent=!u,this.getContentGroup().add(v),Bs(v),v.__legendDataIndex=t,v},layoutInner:function(e,t,n,i,a,r){var o=this.getContentGroup(),s=this.getSelectorGroup();su(e.get("orient"),o,e.get("itemGap"),n.width,n.height);var l=o.getBoundingRect(),u=[-l.x,-l.y];if(a){su("horizontal",s,e.get("selectorItemGap",!0));var c=s.getBoundingRect(),h=[-c.x,-c.y],d=e.get("selectorButtonGap",!0),p=e.getOrient().index,f=0===p?"width":"height",g=0===p?"height":"width",m=0===p?"y":"x";"end"===r?h[p]+=l[f]+d:u[p]+=c[f]+d,h[1-p]+=l[g]/2-c[g]/2,s.attr("position",h),o.attr("position",u);var v={x:0,y:0};return v[f]=l[f]+d+c[f],v[g]=Math.max(l[g],c[g]),v[m]=Math.min(0,c[m]+h[1-p]),v}return o.attr("position",u),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}});function iD(e,t,n,i,a,r){var o;return"line"!==t&&t.indexOf("empty")<0?(o=n.getItemStyle(),e.style.stroke=i,r||(o.stroke=a)):o=n.getItemStyle(["borderWidth","borderColor"]),e.setStyle(o)}function aD(e,t,n,i){oD(e,t,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),rD(e,t,n,i)}function rD(e,t,n,i){var a=n.getZr().storage.getDisplayList()[0];a&&a.useHoverLayer||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:i})}function oD(e,t,n,i){var a=n.getZr().storage.getDisplayList()[0];a&&a.useHoverLayer||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:i})}ip(gd.PROCESSOR.SERIES_FILTER,(function(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries((function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0}))})),vu.registerSubTypeDefaulter("legend",(function(){return"plain"}));var sD=KA.extend({type:"legend.scroll",setScrollDataIndex:function(e){this.option.scrollDataIndex=e},defaultOption:{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800},init:function(e,t,n,i){var a=hu(e);sD.superCall(this,"init",e,t,n,i),lD(this,e,a)},mergeOption:function(e,t){sD.superCall(this,"mergeOption",e,t),lD(this,this.option,e)}});function lD(e,t,n){var i=[1,1];i[e.getOrient().index]=0,cu(t,n,{type:"box",ignoreSize:i})}var uD=An,cD=["width","height"],hD=["x","y"],dD=nD.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){dD.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new uD),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new uD),this._showController},resetInner:function(){dD.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(e,t,n,i,a,r,o){var s=this;dD.superCall(this,"renderInner",e,t,n,i,a,r,o);var l=this._controllerGroup,u=t.get("pageIconSize",!0);z(u)||(u=[u,u]),h("pagePrev",0);var c=t.getModel("pageTextStyle");function h(e,n){var a=e+"DataIndex",r=rl(t.get("pageIcons",!0)[t.getOrient().name][n],{onclick:E(s._pageGo,s,a,t,i)},{x:-u[0]/2,y:-u[1]/2,width:u[0],height:u[1]});r.name=e,l.add(r)}l.add(new zo({name:"pageText",style:{textFill:c.getTextColor(),font:c.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),h("pageNext",1)},layoutInner:function(e,t,n,i,a,r){var o=this.getSelectorGroup(),s=e.getOrient().index,l=cD[s],u=hD[s],c=cD[1-s],h=hD[1-s];a&&su("horizontal",o,e.get("selectorItemGap",!0));var d=e.get("selectorButtonGap",!0),p=o.getBoundingRect(),f=[-p.x,-p.y],g=m(n);a&&(g[l]=n[l]-p[l]-d);var v=this._layoutContentAndController(e,i,g,s,l,c,h);if(a){if("end"===r)f[s]+=v[l]+d;else{var y=p[l]+d;f[s]-=y,v[u]-=y}v[l]+=p[l]+d,f[1-s]+=v[h]+v[c]/2-p[c]/2,v[c]=Math.max(v[c],p[c]),v[h]=Math.min(v[h],p[h]+f[1-s]),o.attr("position",f)}return v},_layoutContentAndController:function(e,t,n,i,a,r,o){var s=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;su(e.get("orient"),s,e.get("itemGap"),i?n.width:null,i?null:n.height),su("horizontal",u,e.get("pageButtonItemGap",!0));var c=s.getBoundingRect(),h=u.getBoundingRect(),d=this._showController=c[a]>n[a],p=[-c.x,-c.y];t||(p[i]=s.position[i]);var f=[0,0],g=[-h.x,-h.y],m=F(e.get("pageButtonGap",!0),e.get("itemGap",!0));d&&("end"===e.get("pageButtonPosition",!0)?g[i]+=n[a]-h[a]:f[i]+=h[a]+m),g[1-i]+=c[r]/2-h[r]/2,s.attr("position",p),l.attr("position",f),u.attr("position",g);var v={x:0,y:0};if(v[a]=d?n[a]:c[a],v[r]=Math.max(c[r],h[r]),v[o]=Math.min(0,h[o]+g[1-i]),l.__rectSize=n[a],d){var y={x:0,y:0};y[a]=Math.max(n[a]-h[a]-m,0),y[r]=v[r],l.setClipPath(new Zo({shape:y})),l.__rectSize=y[a]}else u.eachChild((function(e){e.attr({invisible:!0,silent:!0})}));var x=this._getPageInfo(e);return null!=x.pageIndex&&Js(s,{position:x.contentPosition},d&&e),this._updatePageInfoView(e,x),v},_pageGo:function(e,t,n){var i=this._getPageInfo(t)[e];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:t.id})},_updatePageInfoView:function(e,t){var n=this._controllerGroup;I(["pagePrev","pageNext"],(function(i){var a=null!=t[i+"DataIndex"],r=n.childOfName(i);r&&(r.setStyle("fill",a?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),r.cursor=a?"pointer":"default")}));var i=n.childOfName("pageText"),a=e.get("pageFormatter"),r=t.pageIndex,o=null!=r?r+1:0,s=t.pageCount;i&&a&&i.setStyle("text",N(a)?a.replace("{current}",o).replace("{total}",s):a({current:o,total:s}))},_getPageInfo:function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,a=e.getOrient().index,r=cD[a],o=hD[a],s=this._findTargetItemIndex(t),l=n.children(),u=l[s],c=l.length,h=c?1:0,d={contentPosition:n.position.slice(),pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var p=y(u);d.contentPosition[a]=-p.s;for(var f=s+1,g=p,m=p,v=null;f<=c;++f)(!(v=y(l[f]))&&m.e>g.s+i||v&&!x(v,g.s))&&(g=m.i>g.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=v;for(f=s-1,g=p,m=p,v=null;-1<=f;--f)(v=y(l[f]))&&x(m,v.s)||!(g.i<m.i)||(m=g,null==d.pagePrevDataIndex&&(d.pagePrevDataIndex=g.i),++d.pageCount,++d.pageIndex),g=v;return d;function y(e){if(e){var t=e.getBoundingRect(),n=t[o]+e.position[a];return{s:n,e:n+t[r],i:e.__legendDataIndex}}}function x(e,t){return e.e>=t&&e.s<=t+i}},_findTargetItemIndex:function(e){return this._showController?(this.getContentGroup().eachChild((function(i,a){var r=i.__legendDataIndex;null==n&&null!=r&&(n=a),r===e&&(t=a)})),null!=t?t:n):0;var t,n}});ap("legendScroll","legendscroll",(function(e,t){var n=e.scrollDataIndex;null!=n&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},(function(e){e.setScrollDataIndex(n)}))})),vI.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}});var pD=Zo,fD=bl,gD=Ml,mD=E,vD=I,yD="horizontal",xD="vertical",_D=["line","bar","candlestick","scatter"],bD=_I.extend({type:"dataZoom.slider",init:function(e,t){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=t},render:function(e,t,n,i){bD.superApply(this,"render",arguments),mh(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=e.get("orient"),!1!==this.dataZoomModel.get("show")?(i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){bD.superApply(this,"remove",arguments),vh(this,"_dispatchZoomAction")},dispose:function(){bD.superApply(this,"dispose",arguments),vh(this,"_dispatchZoomAction")},_buildView:function(){var e=this.group;e.removeAll(),this._resetLocation(),this._resetInterval();var t=this._displayables.barGroup=new An;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(t),this._positionGroup()},_resetLocation:function(){var e=this.dataZoomModel,t=this.api,n=this._findCoordRect(),i={width:t.getWidth(),height:t.getHeight()},a=this._orient===yD?{right:i.width-n.x-n.width,top:i.height-30-7,width:n.width,height:30}:{right:7,top:n.y,width:30,height:n.height},r=hu(e.option);I(["right","top","width","height"],(function(e){"ph"===r[e]&&(r[e]=a[e])}));var o=lu(r,i,e.padding);this._location={x:o.x,y:o.y},this._size=[o.width,o.height],this._orient===xD&&this._size.reverse()},_positionGroup:function(){var e=this.group,t=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),a=i&&i.get("inverse"),r=this._displayables.barGroup,o=(this._dataShadowInfo||{}).otherAxisInverse;r.attr(n!==yD||a?n===yD&&a?{scale:o?[-1,1]:[-1,-1]}:n!==xD||a?{scale:o?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:o?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:o?[1,1]:[1,-1]});var s=e.getBoundingRect([r]);e.attr("position",[t.x-s.x,t.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var e=this.dataZoomModel,t=this._size,n=this._displayables.barGroup;n.add(new pD({silent:!0,shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:e.get("backgroundColor")},z2:-40})),n.add(new pD({shape:{x:0,y:0,width:t[0],height:t[1]},style:{fill:"transparent"},z2:0,onclick:E(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(e){var t=this._size,n=e.series,i=n.getRawData(),a=n.getShadowDim?n.getShadowDim():e.otherDim;if(null!=a){var r=i.getDataExtent(a),o=.3*(r[1]-r[0]);r=[r[0]-o,r[1]+o];var s,l=[0,t[1]],u=[0,t[0]],c=[[t[0],0],[0,0]],h=[],d=u[1]/(i.count()-1),p=0,f=Math.round(i.count()/t[0]);i.each([a],(function(e,t){if(0<f&&t%f)p+=d;else{var n=null==e||isNaN(e)||""===e,i=n?0:fD(e,r,l,!0);n&&!s&&t?(c.push([c[c.length-1][0],0]),h.push([h[h.length-1][0],0])):!n&&s&&(c.push([p,0]),h.push([p,0])),c.push([p,i]),h.push([p,i]),p+=d,s=n}}));var g=this.dataZoomModel;this._displayables.barGroup.add(new Ho({shape:{points:c},style:_({fill:g.get("dataBackgroundColor")},g.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new Fo({shape:{points:h},style:g.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var e=this.dataZoomModel,t=e.get("showDataShadow");if(!1!==t){var n,i=this.ecModel;return e.eachTargetAxis((function(a,r){I(e.getAxisProxy(a.name,r).getTargetSeriesModels(),(function(e){if(!(n||!0!==t&&S(_D,e.get("type"))<0)){var o,s=i.getComponent(a.axis,r).axis,l=function(e){return{x:"y",y:"x",radius:"angle",angle:"radius"}[e]}(a.name),u=e.coordinateSystem;null!=l&&u.getOtherAxis&&(o=u.getOtherAxis(s).inverse),l=e.getData().mapDimension(l),n={thisAxis:s,series:e,thisDim:a.name,otherDim:l,otherAxisInverse:o}}}),this)}),this),n}},_renderHandle:function(){var e=this._displayables,t=e.handles=[],n=e.handleLabels=[],i=this._displayables.barGroup,a=this._size,r=this.dataZoomModel;i.add(e.filler=new pD({draggable:!0,cursor:wD(this._orient),drift:mD(this._onDragMove,this,"all"),ondragstart:mD(this._showDataInfo,this,!0),ondragend:mD(this._onDragEnd,this),onmouseover:mD(this._showDataInfo,this,!0),onmouseout:mD(this._showDataInfo,this,!1),style:{fill:r.get("fillerColor"),textPosition:"inside"}})),i.add(new pD({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{stroke:r.get("dataBackgroundColor")||r.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),vD([0,1],(function(e){var a=rl(r.get("handleIcon"),{cursor:wD(this._orient),draggable:!0,drift:mD(this._onDragMove,this,e),ondragend:mD(this._onDragEnd,this),onmouseover:mD(this._showDataInfo,this,!0),onmouseout:mD(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),o=a.getBoundingRect();this._handleHeight=wl(r.get("handleSize"),this._size[1]),this._handleWidth=o.width/o.height*this._handleHeight,a.setStyle(r.getModel("handleStyle").getItemStyle());var s=r.get("handleColor");null!=s&&(a.style.fill=s),i.add(t[e]=a);var l=r.textStyleModel;this.group.add(n[e]=new zo({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:l.getTextColor(),textFont:l.getFont()},z2:10}))}),this)},_resetInterval:function(){var e=this._range=this.dataZoomModel.getPercentRange(),t=this._getViewExtent();this._handleEnds=[fD(e[0],[0,100],t,!0),fD(e[1],[0,100],t,!0)]},_updateInterval:function(e,t){var n=this.dataZoomModel,i=this._handleEnds,a=this._getViewExtent(),r=n.findRepresentativeAxisProxy().getMinMaxSpan(),o=[0,100];Ib(t,i,a,n.get("zoomLock")?"all":e,null!=r.minSpan?fD(r.minSpan,o,a,!0):null,null!=r.maxSpan?fD(r.maxSpan,o,a,!0):null);var s=this._range,l=this._range=gD([fD(i[0],a,o,!0),fD(i[1],a,o,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(e){var t=this._displayables,n=this._handleEnds,i=gD(n.slice()),a=this._size;vD([0,1],(function(e){var i=t.handles[e],r=this._handleHeight;i.attr({scale:[r/2,r/2],position:[n[e],a[1]/2-r/2]})}),this),t.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:a[1]}),this._updateDataInfo(e)},_updateDataInfo:function(e){var t=this.dataZoomModel,n=this._displayables,i=n.handleLabels,a=this._orient,r=["",""];if(t.get("showDetail")){var o=t.findRepresentativeAxisProxy();if(o){var s=o.getAxisModel().axis,l=this._range,u=e?o.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:o.getDataValueWindow();r=[this._formatLabel(u[0],s),this._formatLabel(u[1],s)]}}var c=gD(this._handleEnds.slice());function h(e){var t=el(n.handles[e].parent,this.group),o=nl(0===e?"right":"left",t),s=this._handleWidth/2+5,l=tl([c[e]+(0===e?-s:s),this._size[1]/2],t);i[e].setStyle({x:l[0],y:l[1],textVerticalAlign:a===yD?"middle":o,textAlign:a===yD?o:"center",text:r[e]})}h.call(this,0),h.call(this,1)},_formatLabel:function(e,t){var n=this.dataZoomModel,i=n.get("labelFormatter"),a=n.get("labelPrecision");null!=a&&"auto"!==a||(a=t.getPixelPrecision());var r=null==e||isNaN(e)?"":"category"===t.type||"time"===t.type?t.scale.getLabel(Math.round(e)):e.toFixed(Math.min(a,20));return O(i)?i(e,r):N(i)?i.replace("{value}",r):r},_showDataInfo:function(e){e=this._dragging||e;var t=this._displayables.handleLabels;t[0].attr("invisible",!e),t[1].attr("invisible",!e)},_onDragMove:function(e,t,n,i){this._dragging=!0,Ye(i.event);var a=tl([t,n],this._displayables.barGroup.getLocalTransform(),!0),r=this._updateInterval(e,a[0]),o=this.dataZoomModel.get("realtime");this._updateView(!o),r&&o&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),this.dataZoomModel.get("realtime")||this._dispatchZoomAction()},_onClickPanelClick:function(e){var t=this._size,n=this._displayables.barGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(n[0]<0||n[0]>t[0]||n[1]<0||n[1]>t[1])){var i=this._handleEnds,a=(i[0]+i[1])/2,r=this._updateInterval("all",n[0]-a);this._updateView(),r&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:e[0],end:e[1]})},_findCoordRect:function(){var e;if(vD(this.getTargetCoordInfo(),(function(t){if(!e&&t.length){var n=t[0].model.coordinateSystem;e=n.getRect&&n.getRect()}})),!e){var t=this.api.getWidth(),n=this.api.getHeight();e={x:.2*t,y:.2*n,width:.6*t,height:.6*n}}return e}});function wD(e){return"vertical"===e?"ns-resize":"ew-resize"}vI.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var SD="\0_ec_dataZoom_roams";function MD(e,t){var n=CD(e),i=t.dataZoomId,a=t.coordId;I(n,(function(e,n){var r=e.dataZoomInfos;r[i]&&S(t.allCoordIds,a)<0&&(delete r[i],e.count--)})),ID(n);var r=n[a];r||((r=n[a]={coordId:a,dataZoomInfos:{},count:0}).controller=function(e,t){var n=new my(e.getZr());return I(["pan","zoom","scrollMove"],(function(e){n.on(e,(function(n){var i=[];I(t.dataZoomInfos,(function(a){if(n.isAvailableBehavior(a.dataZoomModel.option)){var r=(a.getRange||{})[e],o=r&&r(t.controller,n);!a.dataZoomModel.get("disabled",!0)&&o&&i.push({dataZoomId:a.dataZoomId,start:o[0],end:o[1]})}})),i.length&&t.dispatchAction(i)}))})),n}(e,r),r.dispatchAction=P(AD,e)),r.dataZoomInfos[i]||r.count++,r.dataZoomInfos[i]=t;var o=function(e){var t,n={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return I(e,(function(e){var a=e.dataZoomModel,r=!a.get("disabled",!0)&&(!a.get("zoomLock",!0)||"move");n["type_"+t]<n["type_"+r]&&(t=r),i&=a.get("preventDefaultMouseMove",!0)})),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}(r.dataZoomInfos);r.controller.enable(o.controlType,o.opt),r.controller.setPointerChecker(t.containsPoint),mh(r,"dispatchAction",t.dataZoomModel.get("throttle",!0),"fixRate")}function TD(e){return e.type+"\0_"+e.id}function CD(e){var t=e.getZr();return t[SD]||(t[SD]={})}function ID(e){I(e,(function(t,n){t.count||(t.controller.dispose(),delete e[n])}))}function AD(e,t){e.dispatchAction({type:"dataZoom",batch:t})}var DD=E,kD=_I.extend({type:"dataZoom.inside",init:function(e,t){this._range},render:function(e,t,n,i){kD.superApply(this,"render",arguments),this._range=e.getPercentRange(),I(this.getTargetCoordInfo(),(function(t,i){var a=A(t,(function(e){return TD(e.model)}));I(t,(function(t){var r=t.model,o={};I(["pan","zoom","scrollMove"],(function(e){o[e]=DD(LD[e],this,t,i)}),this),MD(n,{coordId:TD(r),allCoordIds:a,containsPoint:function(e,t,n){return r.coordinateSystem.containPoint([t,n])},dataZoomId:e.id,dataZoomModel:e,getRange:o})}),this)}),this)},dispose:function(){!function(e,t){var n=CD(e);I(n,(function(e){e.controller.dispose();var n=e.dataZoomInfos;n[t]&&(delete n[t],e.count--)})),ID(n)}(this.api,this.dataZoomModel.id),kD.superApply(this,"dispose",arguments),this._range=null}}),LD={zoom:function(e,t,n,i){var a=this._range,r=a.slice(),o=e.axisModels[0];if(o){var s=zD[t](null,[i.originX,i.originY],o,n,e),l=(0<s.signal?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(r[1]-r[0])+r[0],u=Math.max(1/i.scale,0);r[0]=(r[0]-l)*u+l,r[1]=(r[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return Ib(0,r,[0,100],0,c.minSpan,c.maxSpan),this._range=r,a[0]!==r[0]||a[1]!==r[1]?r:void 0}},pan:ED((function(e,t,n,i,a,r){var o=zD[i]([r.oldX,r.oldY],[r.newX,r.newY],t,a,n);return o.signal*(e[1]-e[0])*o.pixel/o.pixelLength})),scrollMove:ED((function(e,t,n,i,a,r){return zD[i]([0,0],[r.scrollDelta,r.scrollDelta],t,a,n).signal*(e[1]-e[0])*r.scrollDelta}))};function ED(e){return function(t,n,i,a){var r=this._range,o=r.slice(),s=t.axisModels[0];if(s)return Ib(e(o,s,t,n,i,a),o,[0,100],"all"),this._range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}}function PD(e){var t=e&&e.visualMap;z(t)||(t=t?[t]:[]),OD(t,(function(e){if(e){ND(e,"splitList")&&!ND(e,"pieces")&&(e.pieces=e.splitList,delete e.splitList);var t=e.pieces;t&&z(t)&&OD(t,(function(e){R(e)&&(ND(e,"start")&&!ND(e,"min")&&(e.min=e.start),ND(e,"end")&&!ND(e,"max")&&(e.max=e.end))}))}}))}var zD={grid:function(e,t,n,i,a){var r=n.axis,o={},s=a.model.coordinateSystem.getRect();return e=e||[0,0],"x"===r.dim?(o.pixel=t[0]-e[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=r.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=r.inverse?-1:1),o},polar:function(e,t,n,i,a){var r=n.axis,o={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return e=e?s.pointToCoord(e):[0,0],t=s.pointToCoord(t),"radiusAxis"===n.mainType?(o.pixel=t[0]-e[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=r.inverse?1:-1):(o.pixel=t[1]-e[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=r.inverse?-1:1),o},singleAxis:function(e,t,n,i,a){var r=n.axis,o=a.model.coordinateSystem.getRect(),s={};return e=e||[0,0],"horizontal"===r.orient?(s.pixel=t[0]-e[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=r.inverse?1:-1):(s.pixel=t[1]-e[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=r.inverse?-1:1),s}},OD=I;function ND(e,t){return e&&e.hasOwnProperty&&e.hasOwnProperty(t)}vu.registerSubTypeDefaulter("visualMap",(function(e){return e.categories||(e.pieces?0<e.pieces.length:0<e.splitNumber)&&!e.calculable?"piecewise":"continuous"}));var RD=gd.VISUAL.COMPONENT;function BD(e,t,n,i){for(var a=t.targetVisuals[i],r=Hx.prepareVisualTypes(a),o={color:e.getData().getVisual("color")},s=0,l=r.length;s<l;s++){var u=r[s],c=a["opacity"===u?"__alphaForOpacity":u];c&&c.applyVisual(n,h,d)}return o.color;function h(e){return o[e]}function d(e,t){o[e]=t}}sp(RD,{createOnAllSeries:!0,reset:function(e,t){var n=[];return t.eachComponent("visualMap",(function(t){var i=e.pipelineContext;!t.isTargetSeries(e)||i&&i.large||n.push(function(e,t,n,i){var a={};return I(e,(function(e){var n=Hx.prepareVisualTypes(t[e]);a[e]=n})),{progress:function(e,r){function o(e){return r.getItemVisual(l,e)}function s(e,t){r.setItemVisual(l,e,t)}var l;for(null!=i&&(i=r.getDimension(i));null!=(l=e.next());){var u=r.getRawDataItem(l);if(!u||!1!==u.visualMap)for(var c=null!=i?r.get(i,l,!0):l,h=n(c),d=t[h],p=a[h],f=0,g=p.length;f<g;f++){var m=p[f];d[m]&&d[m].applyVisual(c,o,s)}}}}}(t.stateList,t.targetVisuals,E(t.getValueState,t),t.getDataDimension(e.getData())))})),n}}),sp(RD,{createOnAllSeries:!0,reset:function(e,t){var n=e.getData(),i=[];t.eachComponent("visualMap",(function(t){if(t.isTargetSeries(e)){var a=t.getVisualMeta(E(BD,null,e,t))||{stops:[],outerColors:[]},r=t.getDataDimension(n),o=n.getDimensionInfo(r);null!=o&&(a.dimension=o.index,i.push(a))}})),e.getData().setVisual("visualMeta",i)}});var VD=function(e,t,n){var i=m((GD[e]||{})[t]);return n&&z(i)?i[i.length-1]:i},GD={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},WD=Hx.mapVisual,HD=Hx.eachVisual,FD=z,$D=I,XD=Ml,YD=bl,UD=cp({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(e,t,n){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(e,n)},optionUpdated:function(e,t){var n=this.option;a.canvasSupported||(n.realtime=!1),t||UI(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(e){var t=this.stateList;e=E(e,this),this.controllerVisuals=YI(this.option.controller,t,e),this.targetVisuals=YI(this.option.target,t,e)},getTargetSeriesIndices:function(){var e=this.option.seriesIndex,t=[];return null==e||"all"===e?this.ecModel.eachSeries((function(e,n){t.push(n)})):t=Pa(e),t},eachTargetSeries:function(e,t){I(this.getTargetSeriesIndices(),(function(n){e.call(t,this.ecModel.getSeriesByIndex(n))}),this)},isTargetSeries:function(e){var t=!1;return this.eachTargetSeries((function(n){n===e&&(t=!0)})),t},formatValueText:function(e,t,n){var i,a,r=this.option,o=r.precision,s=this.dataBound,l=r.formatter;return n=n||["<",">"],z(e)&&(e=e.slice(),i=!0),a=t?e:i?[u(e[0]),u(e[1])]:u(e),N(l)?l.replace("{value}",i?a[0]:a).replace("{value2}",i?a[1]:a):O(l)?i?l(e[0],e[1]):l(e):i?e[0]===s[0]?n[0]+" "+a[1]:e[1]===s[1]?n[1]+" "+a[0]:a[0]+" - "+a[1]:a;function u(e){return e===s[0]?"min":e===s[1]?"max":(+e).toFixed(Math.min(o,20))}},resetExtent:function(){var e=this.option,t=XD([e.min,e.max]);this._dataExtent=t},getDataDimension:function(e){var t=this.option.dimension,n=e.dimensions;if(null!=t||n.length){if(null!=t)return e.getDimension(t);for(var i=e.dimensions,a=i.length-1;0<=a;a--){var r=i[a];if(!e.getDimensionInfo(r).isCalculationCoord)return r}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},i=t.target||(t.target={}),a=t.controller||(t.controller={});v(i,n),v(a,n);var r=this.isCategory();function o(n){FD(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get("gradientColor")},$D(this.stateList,(function(e){var t=n[e];if(N(t)){var i=VD(t,"active",r);i?(n[e]={},n[e][t]=i):delete n[e]}}),this)}o.call(this,i),o.call(this,a),(function(e,t,n){var i=e[t],a=e[n];i&&!a&&(a=e[n]={},$D(i,(function(e,t){if(Hx.isValidType(t)){var n=VD(t,"inactive",r);null!=n&&(a[t]=n,"color"!==t||a.hasOwnProperty("opacity")||a.hasOwnProperty("colorAlpha")||(a.opacity=[0,0]))}})))}).call(this,i,"inRange","outOfRange"),(function(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,i=this.get("inactiveColor");$D(this.stateList,(function(a){var o=this.itemSize,s=e[a];null==(s=s||(e[a]={color:r?i:[i]})).symbol&&(s.symbol=t&&m(t)||(r?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=n&&m(n)||(r?o[0]:[o[0],o[0]])),s.symbol=WD(s.symbol,(function(e){return"none"===e||"square"===e?"roundRect":e}));var l=s.symbolSize;if(null!=l){var u=-1/0;HD(l,(function(e){u<e&&(u=e)})),s.symbolSize=WD(l,(function(e){return YD(e,[0,u],[0,o[0]],!0)}))}}),this)}).call(this,a)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:te,getValueState:te,getVisualMeta:te}),jD=[20,140],ZD=UD.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(e,t){ZD.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual((function(e){e.mappingMethod="linear",e.dataExtent=this.getExtent()})),this._resetRange()},resetItemSize:function(){ZD.superApply(this,"resetItemSize",arguments);var e=this.itemSize;"horizontal"===this._orient&&e.reverse(),null!=e[0]&&!isNaN(e[0])||(e[0]=jD[0]),null!=e[1]&&!isNaN(e[1])||(e[1]=jD[1])},_resetRange:function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):z(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},completeVisualOption:function(){UD.prototype.completeVisualOption.apply(this,arguments),I(this.stateList,(function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=0)}),this)},setSelected:function(e){this.option.range=e.slice(),this._resetRange()},getSelected:function(){var e=this.getExtent(),t=Ml((this.get("range")||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]<e[0]&&(t[0]=e[0]),t[1]<e[0]&&(t[1]=e[0]),t},getValueState:function(e){var t=this.option.range,n=this.getExtent();return(t[0]<=n[0]||t[0]<=e)&&(t[1]>=n[1]||e<=t[1])?"inRange":"outOfRange"},findTargetDataIndices:function(e){var t=[];return this.eachTargetSeries((function(n){var i=[],a=n.getData();a.each(this.getDataDimension(a),(function(t,n){e[0]<=t&&t<=e[1]&&i.push(n)}),this),t.push({seriesId:n.id,dataIndex:i})}),this),t},getVisualMeta:function(e){var t=qD(this,"outOfRange",this.getExtent()),n=qD(this,"inRange",this.option.range.slice()),i=[];function a(t,n){i.push({value:t,color:e(t,n)})}for(var r=0,o=0,s=n.length,l=t.length;o<l&&(!n.length||t[o]<=n[0]);o++)t[o]<n[r]&&a(t[o],"outOfRange");for(var u=1;r<s;r++,u=0)u&&i.length&&a(n[r],"outOfRange"),a(n[r],"inRange");for(u=1;o<l;o++)(!n.length||n[n.length-1]<t[o])&&(u&&(i.length&&a(i[i.length-1].value,"outOfRange"),u=0),a(t[o],"outOfRange"));var c=i.length;return{stops:i,outerColors:[c?i[0].color:"transparent",c?i[c-1].color:"transparent"]}}});function qD(e,t,n){if(n[0]===n[1])return n.slice();for(var i=(n[1]-n[0])/200,a=n[0],r=[],o=0;o<=200&&a<n[1];o++)r.push(a),a+=i;return r.push(n[1]),r}var KD=hp({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(e,t){this.ecModel=e,this.api=t,this.visualMapModel},render:function(e,t,n,i){!1!==(this.visualMapModel=e).get("show")?this.doRender.apply(this,arguments):this.group.removeAll()},renderBackground:function(e){var t=this.visualMapModel,n=Hl(t.get("padding")||0),i=e.getBoundingRect();e.add(new Zo({z2:-1,silent:!0,shape:{x:i.x-n[3],y:i.y-n[0],width:i.width+n[3]+n[1],height:i.height+n[0]+n[2]},style:{fill:t.get("backgroundColor"),stroke:t.get("borderColor"),lineWidth:t.get("borderWidth")}}))},getControllerVisual:function(e,t,n){var i=(n=n||{}).forceState,a=this.visualMapModel,r={};if("symbol"===t&&(r.symbol=a.get("itemSymbol")),"color"===t){var o=a.get("contentColor");r.color=o}function s(e){return r[e]}function l(e,t){r[e]=t}var u=a.controllerVisuals[i||a.getValueState(e)];return I(Hx.prepareVisualTypes(u),(function(i){var a=u[i];n.convertOpacityToAlpha&&"opacity"===i&&(i="colorAlpha",a=u.__alphaForOpacity),Hx.dependsOn(i,t)&&a&&a.applyVisual(e,s,l)})),r[t]},positionGroup:function(e){var t=this.visualMapModel,n=this.api;uu(e,t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},doRender:te});function JD(e,t,n){var i=e.option,a=i.align;if(null!=a&&"auto"!==a)return a;for(var r={width:t.getWidth(),height:t.getHeight()},o="horizontal"===i.orient?1:0,s=[["left","right","width"],["top","bottom","height"]],l=s[o],u=[0,null,10],c={},h=0;h<3;h++)c[s[1-o][h]]=u[h],c[l[h]]=2===h?n[0]:i[l[h]];var d=[["x","width",3],["y","height",0]][o],p=lu(c,r,i.padding);return l[(p.margin[d[2]]||0)+p[d[0]]+.5*p[d[1]]<.5*r[d[1]]?0:1]}function QD(e,t){return I(e||[],(function(e){null!=e.dataIndex&&(e.dataIndexInside=e.dataIndex,e.dataIndex=null),e.highlightKey="visualMap"+(t?t.componentIndex:"")})),e}var ek=bl,tk=I,nk=Math.min,ik=Math.max,ak=KD.extend({type:"visualMap.continuous",init:function(){ak.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(e,t,n,i){i&&"selectDataRange"===i.type&&i.from===this.uid||this._buildView()},_buildView:function(){this.group.removeAll();var e=this.visualMapModel,t=this.group;this._orient=e.get("orient"),this._useHandle=e.get("calculable"),this._resetInterval(),this._renderBar(t);var n=e.get("text");this._renderEndsText(t,n,0),this._renderEndsText(t,n,1),this._updateView(!0),this.renderBackground(t),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(t)},_renderEndsText:function(e,t,n){if(t){var i=t[1-n];i=null!=i?i+"":"";var a=this.visualMapModel,r=a.get("textGap"),o=a.itemSize,s=this._shapes.barGroup,l=this._applyTransform([o[0]/2,0===n?-r:o[1]+r],s),u=this._applyTransform(0===n?"bottom":"top",s),c=this._orient,h=this.visualMapModel.textStyleModel;this.group.add(new zo({style:{x:l[0],y:l[1],textVerticalAlign:"horizontal"===c?"middle":u,textAlign:"horizontal"===c?u:"center",text:i,textFont:h.getFont(),textFill:h.getTextColor()}}))}},_renderBar:function(e){var t=this.visualMapModel,n=this._shapes,i=t.itemSize,a=this._orient,r=this._useHandle,o=JD(t,this.api,i),s=n.barGroup=this._createBarGroup(o);s.add(n.outOfRange=rk()),s.add(n.inRange=rk(null,r?sk(this._orient):null,E(this._dragHandle,this,"all",!1),E(this._dragHandle,this,"all",!0)));var l=t.textStyleModel.getTextRect("\u56fd"),u=ik(l.width,l.height);r&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(s,0,i,u,a,o),this._createHandle(s,1,i,u,a,o)),this._createIndicator(s,i,u,a),e.add(s)},_createHandle:function(e,t,n,i,a){var r=E(this._dragHandle,this,t,!1),o=E(this._dragHandle,this,t,!0),s=rk(function(e,t){return 0===e?[[0,0],[t,0],[t,-t]]:[[0,0],[t,0],[t,t]]}(t,i),sk(this._orient),r,o);s.position[0]=n[0],e.add(s);var l=this.visualMapModel.textStyleModel,u=new zo({draggable:!0,drift:r,onmousemove:function(e){Ye(e.event)},ondragend:o,style:{x:0,y:0,text:"",textFont:l.getFont(),textFill:l.getTextColor()}});this.group.add(u);var c=["horizontal"===a?i/2:1.5*i,"horizontal"===a?0===t?-1.5*i:1.5*i:0===t?-i/2:i/2],h=this._shapes;h.handleThumbs[t]=s,h.handleLabelPoints[t]=c,h.handleLabels[t]=u},_createIndicator:function(e,t,n,i){var a=rk([[0,0]],"move");a.position[0]=t[0],a.attr({invisible:!0,silent:!0}),e.add(a);var r=this.visualMapModel.textStyleModel,o=new zo({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:r.getFont(),textFill:r.getTextColor()}});this.group.add(o);var s=["horizontal"===i?n/2:9,0],l=this._shapes;l.indicator=a,l.indicatorLabel=o,l.indicatorLabelPoint=s},_dragHandle:function(e,t,n,i){if(this._useHandle){if(this._dragging=!t,!t){var a=this._applyTransform([n,i],this._shapes.barGroup,!0);this._updateInterval(e,a[1]),this._updateView()}t===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),t?this._hovering||this._clearHoverLinkToSeries():ok(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[e],!1)}},_resetInterval:function(){var e=this.visualMapModel,t=this._dataInterval=e.getSelected(),n=e.getExtent(),i=[0,e.itemSize[1]];this._handleEnds=[ek(t[0],n,i,!0),ek(t[1],n,i,!0)]},_updateInterval:function(e,t){t=t||0;var n=this.visualMapModel,i=this._handleEnds,a=[0,n.itemSize[1]];Ib(t,i,a,e,0);var r=n.getExtent();this._dataInterval=[ek(i[0],a,r,!0),ek(i[1],a,r,!0)]},_updateView:function(e){var t=this.visualMapModel,n=t.getExtent(),i=this._shapes,a=[0,t.itemSize[1]],r=e?a:this._handleEnds,o=this._createBarVisual(this._dataInterval,n,r,"inRange"),s=this._createBarVisual(n,n,a,"outOfRange");i.inRange.setStyle({fill:o.barColor,opacity:o.opacity}).setShape("points",o.barPoints),i.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(r,o)},_createBarVisual:function(e,t,n,i){var a={forceState:i,convertOpacityToAlpha:!0},r=this._makeColorGradient(e,a),o=[this.getControllerVisual(e[0],"symbolSize",a),this.getControllerVisual(e[1],"symbolSize",a)],s=this._createBarPoints(n,o);return{barColor:new as(0,0,0,1,r),barPoints:s,handlesColor:[r[0].color,r[r.length-1].color]}},_makeColorGradient:function(e,t){var n=[],i=(e[1]-e[0])/100;n.push({color:this.getControllerVisual(e[0],"color",t),offset:0});for(var a=1;a<100;a++){var r=e[0]+i*a;if(r>e[1])break;n.push({color:this.getControllerVisual(r,"color",t),offset:a/100})}return n.push({color:this.getControllerVisual(e[1],"color",t),offset:1}),n},_createBarPoints:function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},_createBarGroup:function(e){var t=this._orient,n=this.visualMapModel.get("inverse");return new An("horizontal"!==t||n?"horizontal"===t&&n?{scale:"bottom"===e?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==t||n?{scale:"left"===e?[1,1]:[-1,1]}:{scale:"left"===e?[1,-1]:[-1,-1]}:{scale:"bottom"===e?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(e,t){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,a=n.handleThumbs,r=n.handleLabels;tk([0,1],(function(o){var s=a[o];s.setStyle("fill",t.handlesColor[o]),s.position[1]=e[o];var l=tl(n.handleLabelPoints[o],el(s,this.group));r[o].setStyle({x:l[0],y:l[1],text:i.formatValueText(this._dataInterval[o]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===o?"bottom":"top":"left",n.barGroup)})}),this)}},_showIndicator:function(e,t,n,i){var a=this.visualMapModel,r=a.getExtent(),o=a.itemSize,s=[0,o[1]],l=ek(e,r,s,!0),u=this._shapes,c=u.indicator;if(c){c.position[1]=l,c.attr("invisible",!1),c.setShape("points",function(e,t,n,i){return e?[[0,-nk(t,ik(n,0))],[6,0],[0,nk(t,ik(i-n,0))]]:[[0,0],[5,-5],[5,5]]}(!!n,i,l,o[1]));var h=this.getControllerVisual(e,"color",{convertOpacityToAlpha:!0});c.setStyle("fill",h);var d=tl(u.indicatorLabelPoint,el(c,this.group)),p=u.indicatorLabel;p.attr("invisible",!1);var f=this._applyTransform("left",u.barGroup),g=this._orient;p.setStyle({text:(n||"")+a.formatValueText(t),textVerticalAlign:"horizontal"===g?f:"middle",textAlign:"horizontal"===g?"center":f,x:d[0],y:d[1]})}},_enableHoverLinkToSeries:function(){var e=this;this._shapes.barGroup.on("mousemove",(function(t){if(e._hovering=!0,!e._dragging){var n=e.visualMapModel.itemSize,i=e._applyTransform([t.offsetX,t.offsetY],e._shapes.barGroup,!0,!0);i[1]=nk(ik(0,i[1]),n[1]),e._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=n[0])}})).on("mouseout",(function(){e._hovering=!1,e._dragging||e._clearHoverLinkToSeries()}))},_enableHoverLinkFromSeries:function(){var e=this.api.getZr();this.visualMapModel.option.hoverLink?(e.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),e.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(e,t){var n=this.visualMapModel,i=n.itemSize;if(n.option.hoverLink){var a=[0,i[1]],r=n.getExtent();e=nk(ik(a[0],e),a[1]);var o=function(e,t,n){var i=6,a=e.get("hoverLinkDataSize");return a&&(i=ek(a,t,n,!0)/2),i}(n,r,a),s=[e-o,e+o],l=ek(e,a,r,!0),u=[ek(s[0],a,r,!0),ek(s[1],a,r,!0)];s[0]<a[0]&&(u[0]=-1/0),a[1]<s[1]&&(u[1]=1/0),t&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",o):u[1]===1/0?this._showIndicator(l,u[0],"> ",o):this._showIndicator(l,l,"\u2248 ",o));var c=this._hoverLinkDataIndices,h=[];(t||ok(n))&&(h=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var d=function(e,t){var n={},i={};return a(e||[],n),a(t||[],i,n),[r(n),r(i)];function a(e,t,n){for(var i=0,a=e.length;i<a;i++)for(var r=e[i].seriesId,o=Pa(e[i].dataIndex),s=n&&n[r],l=0,u=o.length;l<u;l++){var c=o[l];s&&s[c]?s[c]=null:(t[r]||(t[r]={}))[c]=1}}function r(e,t){var n=[];for(var i in e)if(e.hasOwnProperty(i)&&null!=e[i])if(t)n.push(+i);else{var a=r(e[i],!0);a.length&&n.push({seriesId:i,dataIndex:a})}return n}}(c,h);this._dispatchHighDown("downplay",QD(d[0],n)),this._dispatchHighDown("highlight",QD(d[1],n))}},_hoverLinkFromSeriesMouseOver:function(e){var t=e.target,n=this.visualMapModel;if(t&&null!=t.dataIndex){var i=this.ecModel.getSeriesByIndex(t.seriesIndex);if(n.isTargetSeries(i)){var a=i.getData(t.dataType),r=a.get(n.getDataDimension(a),t.dataIndex,!0);isNaN(r)||this._showIndicator(r,r)}}},_hideIndicator:function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var e=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",QD(e,this.visualMapModel)),e.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var e=this.api.getZr();e.off("mouseover",this._hoverLinkFromSeriesMouseOver),e.off("mouseout",this._hideIndicator)},_applyTransform:function(e,t,n,i){var a=el(t,i?null:this.group);return ul[z(e)?"applyTransform":"transformDirection"](e,a,n)},_dispatchHighDown:function(e,t){t&&t.length&&this.api.dispatchAction({type:e,batch:t})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});function rk(e,t,n,i){return new Ho({shape:{points:e},draggable:!!n,cursor:t,drift:n,onmousemove:function(e){Ye(e.event)},ondragend:i})}function ok(e){var t=e.get("hoverLinkOnHandle");return!!(null==t?e.get("realtime"):t)}function sk(e){return"vertical"===e?"ns-resize":"ew-resize"}ap({type:"selectDataRange",event:"dataRangeSelected",update:"update"},(function(e,t){t.eachComponent({mainType:"visualMap",query:e},(function(t){t.setSelected(e.selected)}))})),np(PD);var lk=UD.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(e,t){lk.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var n=this._mode=this._determineMode();uk[this._mode].call(this),this._resetSelected(e,t);var i=this.option.categories;this.resetVisual((function(e,t){"categories"===n?(e.mappingMethod="category",e.categories=m(i)):(e.dataExtent=this.getExtent(),e.mappingMethod="piecewise",e.pieceList=A(this._pieceList,(function(e){return e=m(e),"inRange"!==t&&(e.visual=null),e})))}))},completeVisualOption:function(){var e=this.option,t={},n=Hx.listVisualTypes(),i=this.isCategory();function a(e,t,n){return e&&e[t]&&(R(e[t])?e[t].hasOwnProperty(n):e[t]===n)}I(e.pieces,(function(e){I(n,(function(n){e.hasOwnProperty(n)&&(t[n]=1)}))})),I(t,(function(t,n){var r=0;I(this.stateList,(function(t){r|=a(e,t,n)||a(e.target,t,n)}),this),r||I(this.stateList,(function(t){(e[t]||(e[t]={}))[n]=VD(n,"inRange"===t?"active":"inactive",i)}))}),this),UD.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(e,t){var n=this.option,i=this._pieceList,a=(t?n:e).selected||{};if(n.selected=a,I(i,(function(e,t){var n=this.getSelectedMapKey(e);a.hasOwnProperty(n)||(a[n]=!0)}),this),"single"===n.selectedMode){var r=!1;I(i,(function(e,t){var n=this.getSelectedMapKey(e);a[n]&&(r?a[n]=!1:r=!0)}),this)}},getSelectedMapKey:function(e){return"categories"===this._mode?e.value+"":e.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var e=this.option;return e.pieces&&0<e.pieces.length?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(e){this.option.selected=m(e)},getValueState:function(e){var t=Hx.findPieceIndex(e,this._pieceList);return null!=t&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},findTargetDataIndices:function(e){var t=[];return this.eachTargetSeries((function(n){var i=[],a=n.getData();a.each(this.getDataDimension(a),(function(t,n){Hx.findPieceIndex(t,this._pieceList)===e&&i.push(n)}),this),t.push({seriesId:n.id,dataIndex:i})}),this),t},getRepresentValue:function(e){var t;if(this.isCategory())t=e.value;else if(null!=e.value)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},getVisualMeta:function(e){if(!this.isCategory()){var t=[],n=[],i=this,a=this._pieceList.slice();if(a.length){var r=a[0].interval[0];r!==-1/0&&a.unshift({interval:[-1/0,r]}),(r=a[a.length-1].interval[1])!==1/0&&a.push({interval:[r,1/0]})}else a.push({interval:[-1/0,1/0]});var o=-1/0;return I(a,(function(e){var t=e.interval;t&&(t[0]>o&&s([o,t[0]],"outOfRange"),s(t.slice()),o=t[1])}),this),{stops:t,outerColors:n}}function s(a,r){var o=i.getRepresentValue({interval:a});r=r||i.getValueState(o);var s=e(o,r);a[0]===-1/0?n[0]=s:a[1]===1/0?n[1]=s:t.push({value:a[0],color:s},{value:a[1],color:s})}}}),uk={splitNumber:function(){var e=this.option,t=this._pieceList,n=Math.min(e.precision,20),i=this.getExtent(),a=e.splitNumber;a=Math.max(parseInt(a,10),1),e.splitNumber=a;for(var r=(i[1]-i[0])/a;+r.toFixed(n)!==r&&n<5;)n++;e.precision=n,r=+r.toFixed(n),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var o=0,s=i[0];o<a;s+=r,o++){var l=o===a-1?i[1]:s+r;t.push({interval:[s,l],close:[1,1]})}e.maxOpen&&t.push({interval:[i[1],1/0],close:[0,0]}),Rl(t),I(t,(function(e,t){e.index=t,e.text=this.formatValueText(e.interval)}),this)},categories:function(){var e=this.option;I(e.categories,(function(e){this._pieceList.push({text:this.formatValueText(e,!0),value:e})}),this),ck(e,this._pieceList)},pieces:function(){var e=this.option,t=this._pieceList;I(e.pieces,(function(e,n){R(e)||(e={value:e});var i={text:"",index:n};if(null!=e.label&&(i.text=e.label),e.hasOwnProperty("value")){var a=i.value=e.value;i.interval=[a,a],i.close=[1,1]}else{for(var r=i.interval=[],o=i.close=[0,0],s=[1,0,1],l=[-1/0,1/0],u=[],c=0;c<2;c++){for(var h=[["gte","gt","min"],["lte","lt","max"]][c],d=0;d<3&&null==r[c];d++)r[c]=e[h[d]],o[c]=s[d],u[c]=2===d;null==r[c]&&(r[c]=l[c])}u[0]&&r[1]===1/0&&(o[0]=0),u[1]&&r[0]===-1/0&&(o[1]=0),r[0]===r[1]&&o[0]&&o[1]&&(i.value=r[0])}i.visual=Hx.retrieveVisuals(e),t.push(i)}),this),ck(e,t),Rl(t),I(t,(function(e){var t=e.close,n=[["<","\u2264"][t[1]],[">","\u2265"][t[0]]];e.text=e.text||this.formatValueText(null!=e.value?e.value:e.interval,!1,n)}),this)}};function ck(e,t){var n=e.inverse;("vertical"===e.orient?!n:n)&&t.reverse()}KD.extend({type:"visualMap.piecewise",doRender:function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get("textGap"),i=t.textStyleModel,a=i.getFont(),r=i.getTextColor(),o=this._getItemAlign(),s=t.itemSize,l=this._getViewData(),u=l.endsText,c=H(t.get("showLabel",!0),!u);u&&this._renderEndsText(e,u[0],s,c,o),I(l.viewPieceList,(function(i){var l=i.piece,u=new An;u.onclick=E(this._onItemClick,this,l),this._enableHoverLink(u,i.indexInModelPieceList);var h=t.getRepresentValue(l);if(this._createItemSymbol(u,h,[0,0,s[0],s[1]]),c){var d=this.visualMapModel.getValueState(h);u.add(new zo({style:{x:"right"===o?-n:s[0]+n,y:s[1]/2,text:l.text,textVerticalAlign:"middle",textAlign:o,textFont:a,textFill:r,opacity:"outOfRange"===d?.5:1}}))}e.add(u)}),this),u&&this._renderEndsText(e,u[1],s,c,o),su(t.get("orient"),e,t.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},_enableHoverLink:function(e,t){function n(e){var n=this.visualMapModel;n.option.hoverLink&&this.api.dispatchAction({type:e,batch:QD(n.findTargetDataIndices(t),n)})}e.on("mouseover",E(n,this,"highlight")).on("mouseout",E(n,this,"downplay"))},_getItemAlign:function(){var e=this.visualMapModel,t=e.option;if("vertical"===t.orient)return JD(e,this.api,e.itemSize);var n=t.align;return n&&"auto"!==n||(n="left"),n},_renderEndsText:function(e,t,n,i,a){if(t){var r=new An,o=this.visualMapModel.textStyleModel;r.add(new zo({style:{x:i?"right"===a?n[0]:0:n[0]/2,y:n[1]/2,textVerticalAlign:"middle",textAlign:i?a:"center",text:t,textFont:o.getFont(),textFill:o.getTextColor()}})),e.add(r)}},_getViewData:function(){var e=this.visualMapModel,t=A(e.getPieceList(),(function(e,t){return{piece:e,indexInModelPieceList:t}})),n=e.get("text"),i=e.get("orient"),a=e.get("inverse");return("horizontal"===i?a:!a)?t.reverse():n=n&&n.slice().reverse(),{viewPieceList:t,endsText:n}},_createItemSymbol:function(e,t,n){e.add(ag(this.getControllerVisual(t,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(t,"color")))},_onItemClick:function(e){var t=this.visualMapModel,n=t.option,i=m(n.selected),a=t.getSelectedMapKey(e);"single"===n.selectedMode?(i[a]=!0,I(i,(function(e,t){i[t]=t===a}))):i[a]=!i[a],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}}),np(PD);var hk,dk="urn:schemas-microsoft-com:vml",pk="undefined"==typeof window?null:window,fk=!1,gk=pk&&pk.document;function mk(e){return hk(e)}if(gk&&!a.canvasSupported)try{gk.namespaces.zrvml||gk.namespaces.add("zrvml",dk),hk=function(e){return gk.createElement("<zrvml:"+e+' class="zrvml">')}}catch(e){hk=function(e){return gk.createElement("<"+e+' xmlns="'+dk+'" class="zrvml">')}}var vk,yk=qr.CMD,xk=Math.round,_k=Math.sqrt,bk=Math.abs,wk=Math.cos,Sk=Math.sin,Mk=Math.max;if(!a.canvasSupported){var Tk=",",Ck="progid:DXImageTransform.Microsoft",Ik=21600,Ak=Ik/2,Dk=function(e){e.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",e.coordsize=Ik+","+Ik,e.coordorigin="0,0"},kk=function(e,t,n){return"rgb("+[e,t,n].join(",")+")"},Lk=function(e,t){t&&e&&t.parentNode!==e&&e.appendChild(t)},Ek=function(e,t){t&&e&&t.parentNode===e&&e.removeChild(t)},Pk=function(e,t,n){return 1e5*(parseFloat(e)||0)+1e3*(parseFloat(t)||0)+n},zk=Fi,Ok=function(e,t,n){var i=Gt(t);n=+n,isNaN(n)&&(n=1),i&&(e.color=kk(i[0],i[1],i[2]),e.opacity=n*i[3])},Nk=function(e,t,n,i){var a="fill"===t,r=e.getElementsByTagName(t)[0];null!=n[t]&&"none"!==n[t]&&(a||!a&&n.lineWidth)?(e[a?"filled":"stroked"]="true",n[t]instanceof es&&Ek(e,r),r=r||mk(t),a?function(e,t,n){var i,a=t.fill;if(null!=a)if(a instanceof es){var r,o=0,s=[0,0],l=0,u=1,c=n.getBoundingRect(),h=c.width,d=c.height;if("linear"===a.type){r="gradient";var p=n.transform,f=[a.x*h,a.y*d],g=[a.x2*h,a.y2*d];p&&(we(f,f,p),we(g,g,p));var m=g[0]-f[0],v=g[1]-f[1];(o=180*Math.atan2(m,v)/Math.PI)<0&&(o+=360),o<1e-6&&(o=0)}else{r="gradientradial",f=[a.x*h,a.y*d],p=n.transform;var y=n.scale,x=h,_=d;s=[(f[0]-c.x)/x,(f[1]-c.y)/_],p&&we(f,f,p),x/=y[0]*Ik,_/=y[1]*Ik;var b=Mk(x,_);l=0/b,u=2*a.r/b-l}var w=a.colorStops.slice();w.sort((function(e,t){return e.offset-t.offset}));for(var S=w.length,M=[],T=[],C=0;C<S;C++){var I=w[C],A=(i=Gt(I.color),[kk(i[0],i[1],i[2]),i[3]]);T.push(I.offset*u+l+" "+A[0]),0!==C&&C!==S-1||M.push(A)}if(2<=S){var D=M[0][0],k=M[1][0],L=M[0][1]*t.opacity,E=M[1][1]*t.opacity;e.type=r,e.method="none",e.focus="100%",e.angle=o,e.color=D,e.color2=k,e.colors=T.join(","),e.opacity=E,e.opacity2=L}"radial"===r&&(e.focusposition=s.join(","))}else Ok(e,a,t.opacity)}(r,n,i):function(e,t){t.lineDash&&(e.dashstyle=t.lineDash.join(" ")),null==t.stroke||t.stroke instanceof es||Ok(e,t.stroke,t.opacity)}(r,n),Lk(e,r)):(e[a?"filled":"stroked"]="false",Ek(e,r))},Rk=[[],[],[]];vo.prototype.brushVML=function(e){var t=this.style,n=this._vmlEl;n||(n=mk("shape"),Dk(n),this._vmlEl=n),Nk(n,"fill",t,this),Nk(n,"stroke",t,this);var i=this.transform,a=null!=i,r=n.getElementsByTagName("stroke")[0];if(r){var o=t.lineWidth;if(a&&!t.strokeNoScale){var s=i[0]*i[3]-i[1]*i[2];o*=_k(bk(s))}r.weight=o+"px"}var l=this.path||(this.path=new qr);this.__dirtyPath&&(l.beginPath(),l.subPixelOptimize=!1,this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),n.path=function(e,t){var n,i,a,r,o,s,l=yk.M,u=yk.C,c=yk.L,h=yk.A,d=yk.Q,p=[],f=e.data,g=e.len();for(r=0;r<g;){switch(i="",n=0,a=f[r++]){case l:i=" m ",n=1,o=f[r++],s=f[r++],Rk[0][0]=o,Rk[0][1]=s;break;case c:i=" l ",n=1,o=f[r++],s=f[r++],Rk[0][0]=o,Rk[0][1]=s;break;case d:case u:i=" c ",n=3;var m,v,y=f[r++],x=f[r++],_=f[r++],b=f[r++];a===d?(_=((m=_)+2*y)/3,b=((v=b)+2*x)/3,y=(o+2*y)/3,x=(s+2*x)/3):(m=f[r++],v=f[r++]),Rk[0][0]=y,Rk[0][1]=x,Rk[1][0]=_,Rk[1][1]=b,o=Rk[2][0]=m,s=Rk[2][1]=v;break;case h:var w=0,S=0,M=1,T=1,C=0;t&&(w=t[4],S=t[5],M=_k(t[0]*t[0]+t[1]*t[1]),T=_k(t[2]*t[2]+t[3]*t[3]),C=Math.atan2(-t[1]/T,t[0]/M));var I=f[r++],A=f[r++],D=f[r++],k=f[r++],L=f[r++]+C,E=f[r++]+L+C;r++;var P=f[r++],z=I+wk(L)*D,O=A+Sk(L)*k,N=(y=I+wk(E)*D,x=A+Sk(E)*k,P?" wa ":" at ");Math.abs(z-y)<1e-4&&(.01<Math.abs(E-L)?P&&(z+=.0125):Math.abs(O-A)<1e-4?P&&z<I||!P&&I<z?x-=.0125:x+=.0125:P&&O<A||!P&&A<O?y+=.0125:y-=.0125),p.push(N,xk(((I-D)*M+w)*Ik-Ak),Tk,xk(((A-k)*T+S)*Ik-Ak),Tk,xk(((I+D)*M+w)*Ik-Ak),Tk,xk(((A+k)*T+S)*Ik-Ak),Tk,xk((z*M+w)*Ik-Ak),Tk,xk((O*T+S)*Ik-Ak),Tk,xk((y*M+w)*Ik-Ak),Tk,xk((x*T+S)*Ik-Ak)),o=y,s=x;break;case yk.R:var R=Rk[0],B=Rk[1];R[0]=f[r++],R[1]=f[r++],B[0]=R[0]+f[r++],B[1]=R[1]+f[r++],t&&(we(R,R,t),we(B,B,t)),R[0]=xk(R[0]*Ik-Ak),B[0]=xk(B[0]*Ik-Ak),R[1]=xk(R[1]*Ik-Ak),B[1]=xk(B[1]*Ik-Ak),p.push(" m ",R[0],Tk,R[1]," l ",B[0],Tk,R[1]," l ",B[0],Tk,B[1]," l ",R[0],Tk,B[1]);break;case yk.Z:p.push(" x ")}if(0<n){p.push(i);for(var V=0;V<n;V++){var G=Rk[V];t&&we(G,G,t),p.push(xk(G[0]*Ik-Ak),Tk,xk(G[1]*Ik-Ak),V<n-1?Tk:"")}}}return p.join("")}(l,this.transform),n.style.zIndex=Pk(this.zlevel,this.z,this.z2),Lk(e,n),null!=t.text?this.drawRectText(e,this.getBoundingRect()):this.removeRectText(e)},vo.prototype.onRemove=function(e){Ek(e,this._vmlEl),this.removeRectText(e)},vo.prototype.onAdd=function(e){Lk(e,this._vmlEl),this.appendRectText(e)},Zi.prototype.brushVML=function(e){var t,n,i=this.style,a=i.image;if(function(e){return"object"==typeof e&&e.tagName&&"IMG"===e.tagName.toUpperCase()}(a)){var r=a.src;if(r===this._imageSrc)t=this._imageWidth,n=this._imageHeight;else{var o=a.runtimeStyle,s=o.width,l=o.height;o.width="auto",o.height="auto",t=a.width,n=a.height,o.width=s,o.height=l,this._imageSrc=r,this._imageWidth=t,this._imageHeight=n}a=r}else a===this._imageSrc&&(t=this._imageWidth,n=this._imageHeight);if(a){var u=i.x||0,c=i.y||0,h=i.width,d=i.height,p=i.sWidth,f=i.sHeight,g=i.sx||0,m=i.sy||0,v=p&&f,y=this._vmlEl;y||(y=gk.createElement("div"),Dk(y),this._vmlEl=y);var x,_=y.style,b=!1,w=1,S=1;if(this.transform&&(x=this.transform,w=_k(x[0]*x[0]+x[1]*x[1]),S=_k(x[2]*x[2]+x[3]*x[3]),b=x[1]||x[2]),b){var M=[u,c],T=[u+h,c],C=[u,c+d],I=[u+h,c+d];we(M,M,x),we(T,T,x),we(C,C,x),we(I,I,x);var A=Mk(M[0],T[0],C[0],I[0]),D=Mk(M[1],T[1],C[1],I[1]),k=[];k.push("M11=",x[0]/w,Tk,"M12=",x[2]/S,Tk,"M21=",x[1]/w,Tk,"M22=",x[3]/S,Tk,"Dx=",xk(u*w+x[4]),Tk,"Dy=",xk(c*S+x[5])),_.padding="0 "+xk(A)+"px "+xk(D)+"px 0",_.filter=Ck+".Matrix("+k.join("")+", SizingMethod=clip)"}else x&&(u=u*w+x[4],c=c*S+x[5]),_.filter="",_.left=xk(u)+"px",_.top=xk(c)+"px";var L=this._imageEl,E=this._cropEl;L||(L=gk.createElement("div"),this._imageEl=L);var P=L.style;if(v){if(t&&n)P.width=xk(w*t*h/p)+"px",P.height=xk(S*n*d/f)+"px";else{var z=new Image,O=this;z.onload=function(){z.onload=null,t=z.width,n=z.height,P.width=xk(w*t*h/p)+"px",P.height=xk(S*n*d/f)+"px",O._imageWidth=t,O._imageHeight=n,O._imageSrc=a},z.src=a}E||((E=gk.createElement("div")).style.overflow="hidden",this._cropEl=E);var N=E.style;N.width=xk((h+g*h/p)*w),N.height=xk((d+m*d/f)*S),N.filter=Ck+".Matrix(Dx="+-g*h/p*w+",Dy="+-m*d/f*S+")",E.parentNode||y.appendChild(E),L.parentNode!==E&&E.appendChild(L)}else P.width=xk(w*h)+"px",P.height=xk(S*d)+"px",y.appendChild(L),E&&E.parentNode&&(y.removeChild(E),this._cropEl=null);var R="",B=i.opacity;B<1&&(R+=".Alpha(opacity="+xk(100*B)+") "),R+=Ck+".AlphaImageLoader(src="+a+", SizingMethod=scale)",P.filter=R,y.style.zIndex=Pk(this.zlevel,this.z,this.z2),Lk(e,y),null!=i.text&&this.drawRectText(e,this.getBoundingRect())}},Zi.prototype.onRemove=function(e){Ek(e,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(e)},Zi.prototype.onAdd=function(e){Lk(e,this._vmlEl),this.appendRectText(e)};var Bk,Vk="normal",Gk={},Wk=0,Hk=document.createElement("div");vk=function(e,t){var n=gk;Bk||((Bk=n.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",gk.body.appendChild(Bk));try{Bk.style.font=t}catch(e){}return Bk.innerHTML="",Bk.appendChild(n.createTextNode(e)),{width:Bk.offsetWidth}},ui.measureText=vk;for(var Fk=new In,$k=function(e,t,n,i){var a=this.style;this.__dirty&&Li(a);var r=a.text;if(null!=r&&(r+=""),r){if(a.rich){var o=bi(r,a);r=[];for(var s=0;s<o.lines.length;s++){for(var l=o.lines[s].tokens,u=[],c=0;c<l.length;c++)u.push(l[c].text);r.push(u.join(""))}r=r.join("\n")}var h,d,p=a.textAlign,f=a.textVerticalAlign,g=function(e){var t=Gk[e];if(!t){100<Wk&&(Wk=0,Gk={});var n,i=Hk.style;try{i.font=e,n=i.fontFamily.split(",")[0]}catch(e){}t={style:i.fontStyle||Vk,variant:i.fontVariant||Vk,weight:i.fontWeight||Vk,size:0|parseFloat(i.fontSize||12),family:n||"Microsoft YaHei"},Gk[e]=t,Wk++}return t}(a.font),m=g.style+" "+g.variant+" "+g.weight+" "+g.size+'px "'+g.family+'"';n=n||hi(r,m,p,f,a.textPadding,a.textLineHeight);var v=this.transform;if(v&&!i&&(Fk.copy(t),Fk.applyTransform(v),t=Fk),i)h=t.x,d=t.y;else{var y=a.textPosition;if(y instanceof Array)h=t.x+zk(y[0],t.width),d=t.y+zk(y[1],t.height),p=p||"left";else{var x=this.calculateTextPosition?this.calculateTextPosition({},a,t):fi({},a,t);h=x.x,d=x.y,p=p||x.textAlign,f=f||x.textVerticalAlign}}h=di(h,n.width,p),d=pi(d,n.height,f),d+=n.height/2;var _,b,w,S=mk,M=this._textVmlEl;M?b=(_=(w=M.firstChild).nextSibling).nextSibling:(M=S("line"),_=S("path"),b=S("textpath"),w=S("skew"),b.style["v-text-align"]="left",Dk(M),_.textpathok=!0,b.on=!0,M.from="0 0",M.to="1000 0.05",Lk(M,w),Lk(M,_),Lk(M,b),this._textVmlEl=M);var T=[h,d],C=M.style;v&&i?(we(T,T,v),w.on=!0,w.matrix=v[0].toFixed(3)+Tk+v[2].toFixed(3)+Tk+v[1].toFixed(3)+Tk+v[3].toFixed(3)+",0,0",w.offset=(xk(T[0])||0)+","+(xk(T[1])||0),w.origin="0 0",C.left="0px",C.top="0px"):(w.on=!1,C.left=xk(h)+"px",C.top=xk(d)+"px"),b.string=function(e){return String(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;")}(r);try{b.style.font=m}catch(e){}Nk(M,"fill",{fill:a.textFill,opacity:a.opacity},this),Nk(M,"stroke",{stroke:a.textStroke,opacity:a.opacity,lineDash:a.lineDash||null},this),M.style.zIndex=Pk(this.zlevel,this.z,this.z2),Lk(e,M)}},Xk=function(e){Ek(e,this._textVmlEl),this._textVmlEl=null},Yk=function(e){Lk(e,this._textVmlEl)},Uk=[Yi,ji,Zi,vo,zo],jk=0;jk<Uk.length;jk++){var Zk=Uk[jk].prototype;Zk.drawRectText=$k,Zk.removeRectText=Xk,Zk.appendRectText=Yk}zo.prototype.brushVML=function(e){var t=this.style;null!=t.text?this.drawRectText(e,{x:t.x||0,y:t.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(e)},zo.prototype.onRemove=function(e){this.removeRectText(e)},zo.prototype.onAdd=function(e){this.appendRectText(e)}}function qk(e){return parseInt(e,10)}function Kk(e,t){!function(){if(!fk&&gk){fk=!0;var e=gk.styleSheets;e.length<31?gk.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):e[0].addRule(".zrvml","behavior:url(#default#VML)")}}(),this.root=e,this.storage=t;var n=document.createElement("div"),i=document.createElement("div");n.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",i.style.cssText="position:absolute;left:0;top:0;",e.appendChild(n),this._vmlRoot=i,this._vmlViewport=n,this.resize();var a=t.delFromStorage,r=t.addToStorage;t.delFromStorage=function(e){a.call(t,e),e&&e.onRemove&&e.onRemove(i)},t.addToStorage=function(e){e.onAdd&&e.onAdd(i),r.call(t,e)},this._firstPaint=!0}function Jk(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}Kk.prototype={constructor:Kk,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(){var e=this.storage.getDisplayList(!0,!0);this._paintList(e)},_paintList:function(e){for(var t=this._vmlRoot,n=0;n<e.length;n++){var i=e[n];i.invisible||i.ignore?(i.__alreadyNotVisible||i.onRemove(t),i.__alreadyNotVisible=!0):(i.__alreadyNotVisible&&i.onAdd(t),i.__alreadyNotVisible=!1,i.__dirty&&(i.beforeBrush&&i.beforeBrush(),(i.brushVML||i.brush).call(i,t),i.afterBrush&&i.afterBrush())),i.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(t),this._firstPaint=!1)},resize:function(e,t){if(e=null==e?this._getWidth():e,t=null==t?this._getHeight():t,this._width!==e||this._height!==t){this._width=e,this._height=t;var n=this._vmlViewport.style;n.width=e+"px",n.height=t+"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 e=this.root,t=e.currentStyle;return(e.clientWidth||qk(t.width))-qk(t.paddingLeft)-qk(t.paddingRight)|0},_getHeight:function(){var e=this.root,t=e.currentStyle;return(e.clientHeight||qk(t.height))-qk(t.paddingTop)-qk(t.paddingBottom)|0}},I(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],(function(e){Kk.prototype[e]=function(e){return function(){mn('In IE8.0 VML mode painter not support method "'+e+'"')}}(e)})),Ca("vml",Kk);var Qk=qr.CMD,eL=Array.prototype.join,tL="none",nL=Math.round,iL=Math.sin,aL=Math.cos,rL=Math.PI,oL=2*Math.PI,sL=180/rL;function lL(e){return nL(1e4*e)/1e4}function uL(e){return e<1e-4&&-1e-4<e}function cL(e,t){t&&hL(e,"transform","matrix("+eL.call(t,",")+")")}function hL(e,t,n){n&&("linear"===n.type||"radial"===n.type)||e.setAttribute(t,n)}function dL(e,t,n,i){if(function(e,t){var n=t?e.textFill:e.fill;return null!=n&&n!==tL}(t,n)){var a=n?t.textFill:t.fill;hL(e,"fill",a="transparent"===a?tL:a),hL(e,"fill-opacity",null!=t.fillOpacity?t.fillOpacity*t.opacity:t.opacity)}else hL(e,"fill",tL);if(function(e,t){var n=t?e.textStroke:e.stroke;return null!=n&&n!==tL}(t,n)){var r=n?t.textStroke:t.stroke;hL(e,"stroke",r="transparent"===r?tL:r),hL(e,"stroke-width",(n?t.textStrokeWidth:t.lineWidth)/(!n&&t.strokeNoScale?i.getLineScale():1)),hL(e,"paint-order",n?"stroke":"fill"),hL(e,"stroke-opacity",null!=t.strokeOpacity?t.strokeOpacity:t.opacity),t.lineDash?(hL(e,"stroke-dasharray",t.lineDash.join(",")),hL(e,"stroke-dashoffset",nL(t.lineDashOffset||0))):hL(e,"stroke-dasharray",""),t.lineCap&&hL(e,"stroke-linecap",t.lineCap),t.lineJoin&&hL(e,"stroke-linejoin",t.lineJoin),t.miterLimit&&hL(e,"stroke-miterlimit",t.miterLimit)}else hL(e,"stroke",tL)}var pL={brush:function(e){var t=e.style,n=e.__svgEl;n||(n=Jk("path"),e.__svgEl=n),e.path||e.createPathProxy();var i=e.path;if(e.__dirtyPath){i.beginPath(),i.subPixelOptimize=!1,e.buildPath(i,e.shape),e.__dirtyPath=!1;var a=function(e){for(var t=[],n=e.data,i=e.len(),a=0;a<i;){var r="",o=0;switch(n[a++]){case Qk.M:r="M",o=2;break;case Qk.L:r="L",o=2;break;case Qk.Q:r="Q",o=4;break;case Qk.C:r="C",o=6;break;case Qk.A:var s=n[a++],l=n[a++],u=n[a++],c=n[a++],h=n[a++],d=n[a++],p=n[a++],f=n[a++],g=Math.abs(d),m=uL(g-oL)||(f?oL<=d:oL<=-d),v=0<d?d%oL:d%oL+oL,y=!1;y=!!m||!uL(g)&&rL<=v==!!f;var x=lL(s+u*aL(h)),_=lL(l+c*iL(h));m&&(d=f?oL-1e-4:1e-4-oL,y=!0,9===a&&t.push("M",x,_));var b=lL(s+u*aL(h+d)),w=lL(l+c*iL(h+d));t.push("A",lL(u),lL(c),nL(p*sL),+y,+f,b,w);break;case Qk.Z:r="Z";break;case Qk.R:b=lL(n[a++]),w=lL(n[a++]);var S=lL(n[a++]),M=lL(n[a++]);t.push("M",b,w,"L",b+S,w,"L",b+S,w+M,"L",b,w+M,"L",b,w)}r&&t.push(r);for(var T=0;T<o;T++)t.push(lL(n[a++]))}return t.join(" ")}(i);a.indexOf("NaN")<0&&hL(n,"d",a)}dL(n,t,!1,e),cL(n,e.transform),null!=t.text?_L(e,e.getBoundingRect()):wL(e)}},fL={brush:function(e){var t=e.style,n=t.image;if(n instanceof HTMLImageElement&&(n=n.src),n){var i=t.x||0,a=t.y||0,r=t.width,o=t.height,s=e.__svgEl;s||(s=Jk("image"),e.__svgEl=s),n!==e.__imageSrc&&(function(e,t,n){e.setAttributeNS("http://www.w3.org/1999/xlink","href",n)}(s,0,n),e.__imageSrc=n),hL(s,"width",r),hL(s,"height",o),hL(s,"x",i),hL(s,"y",a),cL(s,e.transform),null!=t.text?_L(e,e.getBoundingRect()):wL(e)}}},gL={},mL=new In,vL={},yL=[],xL={left:"start",right:"end",center:"middle",middle:"middle"},_L=function(e,t){var n=e.style,i=e.transform,a=e instanceof zo||n.transformText;e.__dirty&&Li(n);var r=n.text;if(null!=r&&(r+=""),Xi(r,n)){null==r&&(r=""),!a&&i&&(mL.copy(t),mL.applyTransform(i),t=mL);var o=e.__textSvgEl;o||(o=Jk("text"),e.__textSvgEl=o);var s=o.style,l=n.font||li,u=o.__computedFont;l!==o.__styleFont&&(s.font=o.__styleFont=l,u=o.__computedFont=s.font);var c=n.textPadding,h=n.textLineHeight,d=e.__textCotentBlock;d&&!e.__dirtyText||(d=e.__textCotentBlock=_i(r,u,c,h,n.truncate));var p=d.outerHeight,f=d.lineHeight;Vi(vL,e,n,t);var g=vL.baseX,m=vL.baseY,v=vL.textAlign||"left",y=vL.textVerticalAlign;!function(e,t,n,i,a,r,o){rt(yL),t&&n&&ot(yL,n);var s=i.textRotation;if(a&&s){var l=i.textOrigin;"center"===l?(r=a.width/2+a.x,o=a.height/2+a.y):l&&(r=l[0]+a.x,o=l[1]+a.y),yL[4]-=r,yL[5]-=o,ut(yL,yL,s),yL[4]+=r,yL[5]+=o}cL(e,yL)}(o,a,i,n,t,g,m);var x=g,_=pi(m,p,y);c&&(x=function(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}(g,v,c),_+=c[0]),_+=f/2,dL(o,n,!0,e);var b=d.canCacheByTextString,w=e.__tspanList||(e.__tspanList=[]),S=w.length;if(b&&e.__canCacheByTextString&&e.__text===r){if(e.__dirtyText&&S)for(var M=0;M<S;++M)bL(w[M],v,x,_+M*f)}else{e.__text=r,e.__canCacheByTextString=b;var T=d.lines,C=T.length;for(M=0;M<C;M++){var I=w[M],A=T[M];I?I.__zrText!==A&&(I.innerHTML="",I.appendChild(document.createTextNode(A))):(I=w[M]=Jk("tspan"),o.appendChild(I),I.appendChild(document.createTextNode(A))),bL(I,v,x,_+M*f)}if(C<S){for(;M<S;M++)o.removeChild(w[M]);w.length=C}}}};function bL(e,t,n,i){hL(e,"dominant-baseline","middle"),hL(e,"text-anchor",xL[t]),hL(e,"x",n),hL(e,"y",i)}function wL(e){e&&e.__textSvgEl&&(e.__textSvgEl.parentNode&&e.__textSvgEl.parentNode.removeChild(e.__textSvgEl),e.__textSvgEl=null,e.__tspanList=[],e.__text=null)}function SL(){}function ML(e,t){for(var n=0,i=t.length,a=0,r=0;n<i;n++){var o=t[n];if(o.removed){for(s=[],l=r;l<r+o.count;l++)s.push(l);o.indices=s,r+=o.count}else{for(var s=[],l=a;l<a+o.count;l++)s.push(l);o.indices=s,a+=o.count,o.added||(r+=o.count)}}return t}gL.drawRectText=_L,gL.brush=function(e){null!=e.style.text?_L(e,!1):wL(e)},SL.prototype={diff:function(e,t,n){n=n||function(e,t){return e===t},this.equals=n;var i=this;e=e.slice();var a=(t=t.slice()).length,r=e.length,o=1,s=a+r,l=[{newPos:-1,components:[]}],u=this.extractCommon(l[0],t,e,0);if(l[0].newPos+1>=a&&r<=u+1){for(var c=[],h=0;h<t.length;h++)c.push(h);return[{indices:c,count:t.length}]}function d(){for(var n=-1*o;n<=o;n+=2){var s,u=l[n-1],c=l[n+1],h=(c?c.newPos:0)-n;u&&(l[n-1]=void 0);var d=u&&u.newPos+1<a,p=c&&0<=h&&h<r;if(d||p){if(!d||p&&u.newPos<c.newPos?(s={newPos:(f=c).newPos,components:f.components.slice(0)},i.pushComponent(s.components,void 0,!0)):((s=u).newPos++,i.pushComponent(s.components,!0,void 0)),h=i.extractCommon(s,t,e,n),s.newPos+1>=a&&r<=h+1)return ML(0,s.components);l[n]=s}else l[n]=void 0}var f;o++}for(;o<=s;){var p=d();if(p)return p}},pushComponent:function(e,t,n){var i=e[e.length-1];i&&i.added===t&&i.removed===n?e[e.length-1]={count:i.count+1,added:t,removed:n}:e.push({count:1,added:t,removed:n})},extractCommon:function(e,t,n,i){for(var a=t.length,r=n.length,o=e.newPos,s=o-i,l=0;o+1<a&&s+1<r&&this.equals(t[o+1],n[s+1]);)o++,s++,l++;return l&&e.components.push({count:l}),e.newPos=o,s},tokenize:function(e){return e.slice()},join:function(e){return e.slice()}};var TL=new SL;function CL(e,t,n,i,a){this._zrId=e,this._svgRoot=t,this._tagNames="string"==typeof n?[n]:n,this._markLabel=i,this._domName=a||"_dom",this.nextId=0}function IL(e,t){CL.call(this,e,t,["linearGradient","radialGradient"],"__gradient_in_use__")}function AL(e,t){CL.call(this,e,t,"clipPath","__clippath_in_use__")}function DL(e,t){CL.call(this,e,t,["filter"],"__filter_in_use__","_shadowDom")}function kL(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY||e.textShadowBlur||e.textShadowOffsetX||e.textShadowOffsetY)}function LL(e){return parseInt(e,10)}function EL(e,t){return t&&e&&t.parentNode!==e}function PL(e,t,n){if(EL(e,t)&&n){var i=n.nextSibling;i?e.insertBefore(t,i):e.appendChild(t)}}function zL(e,t){if(EL(e,t)){var n=e.firstChild;n?e.insertBefore(t,n):e.appendChild(t)}}function OL(e,t){t&&e&&t.parentNode===e&&e.removeChild(t)}function NL(e){return e.__textSvgEl}function RL(e){return e.__svgEl}function BL(e,t,n,i){this.root=e,this.storage=t,this._opts=n=x({},n||{});var a=Jk("svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("version","1.1"),a.setAttribute("baseProfile","full"),a.style.cssText="user-select:none;position:absolute;left:0;top:0;";var r=Jk("g");a.appendChild(r);var o=Jk("g");a.appendChild(o),this.gradientManager=new IL(i,o),this.clipPathManager=new AL(i,o),this.shadowManager=new DL(i,o);var s=document.createElement("div");s.style.cssText="overflow:hidden;position:relative",this._svgDom=a,this._svgRoot=o,this._backgroundRoot=r,this._viewport=s,e.appendChild(s),s.appendChild(a),this.resize(n.width,n.height),this._visibleList=[]}CL.prototype.createElement=Jk,CL.prototype.getDefs=function(e){var t=this._svgRoot,n=this._svgRoot.getElementsByTagName("defs");return 0===n.length?e?((n=t.insertBefore(this.createElement("defs"),t.firstChild)).contains||(n.contains=function(e){var t=n.children;if(!t)return!1;for(var i=t.length-1;0<=i;--i)if(t[i]===e)return!0;return!1}),n):null:n[0]},CL.prototype.update=function(e,t){if(e){var n=this.getDefs(!1);if(e[this._domName]&&n.contains(e[this._domName]))"function"==typeof t&&t(e);else{var i=this.add(e);i&&(e[this._domName]=i)}}},CL.prototype.addDom=function(e){this.getDefs(!0).appendChild(e)},CL.prototype.removeDom=function(e){var t=this.getDefs(!1);t&&e[this._domName]&&(t.removeChild(e[this._domName]),e[this._domName]=null)},CL.prototype.getDoms=function(){var e=this.getDefs(!1);if(!e)return[];var t=[];return I(this._tagNames,(function(n){var i=e.getElementsByTagName(n);t=t.concat([].slice.call(i))})),t},CL.prototype.markAllUnused=function(){var e=this.getDoms(),t=this;I(e,(function(e){e[t._markLabel]="0"}))},CL.prototype.markUsed=function(e){e&&(e[this._markLabel]="1")},CL.prototype.removeUnused=function(){var e=this.getDefs(!1);if(e){var t=this.getDoms(),n=this;I(t,(function(t){"1"!==t[n._markLabel]&&e.removeChild(t)}))}},CL.prototype.getSvgProxy=function(e){return e instanceof vo?pL:e instanceof Zi?fL:e instanceof zo?gL:pL},CL.prototype.getTextSvgElement=function(e){return e.__textSvgEl},CL.prototype.getSvgElement=function(e){return e.__svgEl},M(IL,CL),IL.prototype.addWithoutUpdate=function(e,t){if(t&&t.style){var n=this;I(["fill","stroke"],(function(i){if(t.style[i]&&("linear"===t.style[i].type||"radial"===t.style[i].type)){var a,r=t.style[i],o=n.getDefs(!0);r._dom?(a=r._dom,o.contains(r._dom)||n.addDom(a)):a=n.add(r),n.markUsed(t);var s=a.getAttribute("id");e.setAttribute(i,"url(#"+s+")")}}))}},IL.prototype.add=function(e){var t;if("linear"===e.type)t=this.createElement("linearGradient");else{if("radial"!==e.type)return mn("Illegal gradient type."),null;t=this.createElement("radialGradient")}return e.id=e.id||this.nextId++,t.setAttribute("id","zr"+this._zrId+"-gradient-"+e.id),this.updateDom(e,t),this.addDom(t),t},IL.prototype.update=function(e){var t=this;CL.prototype.update.call(this,e,(function(){var n=e.type,i=e._dom.tagName;"linear"===n&&"linearGradient"===i||"radial"===n&&"radialGradient"===i?t.updateDom(e,e._dom):(t.removeDom(e),t.add(e))}))},IL.prototype.updateDom=function(e,t){if("linear"===e.type)t.setAttribute("x1",e.x),t.setAttribute("y1",e.y),t.setAttribute("x2",e.x2),t.setAttribute("y2",e.y2);else{if("radial"!==e.type)return void mn("Illegal gradient type.");t.setAttribute("cx",e.x),t.setAttribute("cy",e.y),t.setAttribute("r",e.r)}e.global?t.setAttribute("gradientUnits","userSpaceOnUse"):t.setAttribute("gradientUnits","objectBoundingBox"),t.innerHTML="";for(var n=e.colorStops,i=0,a=n.length;i<a;++i){var r=this.createElement("stop");r.setAttribute("offset",100*n[i].offset+"%");var o=n[i].color;if(-1<o.indexOf("rgba")){var s=Gt(o)[3],l=Ft(o);r.setAttribute("stop-color","#"+l),r.setAttribute("stop-opacity",s)}else r.setAttribute("stop-color",n[i].color);t.appendChild(r)}e._dom=t},IL.prototype.markUsed=function(e){if(e.style){var t=e.style.fill;t&&t._dom&&CL.prototype.markUsed.call(this,t._dom),(t=e.style.stroke)&&t._dom&&CL.prototype.markUsed.call(this,t._dom)}},M(AL,CL),AL.prototype.update=function(e){var t=this.getSvgElement(e);t&&this.updateDom(t,e.__clipPaths,!1);var n=this.getTextSvgElement(e);n&&this.updateDom(n,e.__clipPaths,!0),this.markUsed(e)},AL.prototype.updateDom=function(e,t,n){if(t&&0<t.length){var i,a,r=this.getDefs(!0),o=t[0],s=n?"_textDom":"_dom";o[s]?(a=o[s].getAttribute("id"),i=o[s],r.contains(i)||r.appendChild(i)):(a="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(i=this.createElement("clipPath")).setAttribute("id",a),r.appendChild(i),o[s]=i);var l=this.getSvgProxy(o);if(o.transform&&o.parent.invTransform&&!n){var u=Array.prototype.slice.call(o.transform);st(o.transform,o.parent.invTransform,o.transform),l.brush(o),o.transform=u}else l.brush(o);var c=this.getSvgElement(o);i.innerHTML="",i.appendChild(c.cloneNode()),e.setAttribute("clip-path","url(#"+a+")"),1<t.length&&this.updateDom(i,t.slice(1),n)}else e&&e.setAttribute("clip-path","none")},AL.prototype.markUsed=function(e){var t=this;e.__clipPaths&&I(e.__clipPaths,(function(e){e._dom&&CL.prototype.markUsed.call(t,e._dom),e._textDom&&CL.prototype.markUsed.call(t,e._textDom)}))},M(DL,CL),DL.prototype.addWithoutUpdate=function(e,t){if(t&&kL(t.style)){var n;t._shadowDom?(n=t._shadowDom,this.getDefs(!0).contains(t._shadowDom)||this.addDom(n)):n=this.add(t),this.markUsed(t);var i=n.getAttribute("id");e.style.filter="url(#"+i+")"}},DL.prototype.add=function(e){var t=this.createElement("filter");return e._shadowDomId=e._shadowDomId||this.nextId++,t.setAttribute("id","zr"+this._zrId+"-shadow-"+e._shadowDomId),this.updateDom(e,t),this.addDom(t),t},DL.prototype.update=function(e,t){if(kL(t.style)){var n=this;CL.prototype.update.call(this,t,(function(){n.updateDom(t,t._shadowDom)}))}else this.remove(e,t)},DL.prototype.remove=function(e,t){null!=t._shadowDomId&&(this.removeDom(e),e.style.filter="")},DL.prototype.updateDom=function(e,t){var n=t.getElementsByTagName("feDropShadow");n=0===n.length?this.createElement("feDropShadow"):n[0];var i,a,r,o,s=e.style,l=e.scale&&e.scale[0]||1,u=e.scale&&e.scale[1]||1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)i=s.shadowOffsetX||0,a=s.shadowOffsetY||0,r=s.shadowBlur,o=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(t,s);i=s.textShadowOffsetX||0,a=s.textShadowOffsetY||0,r=s.textShadowBlur,o=s.textShadowColor}n.setAttribute("dx",i/l),n.setAttribute("dy",a/u),n.setAttribute("flood-color",o);var c=r/2/l+" "+r/2/u;n.setAttribute("stdDeviation",c),t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width",Math.ceil(r/2*200)+"%"),t.setAttribute("height",Math.ceil(r/2*200)+"%"),t.appendChild(n),e._shadowDom=t},DL.prototype.markUsed=function(e){e._shadowDom&&CL.prototype.markUsed.call(this,e._shadowDom)},BL.prototype={constructor:BL,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},getViewportRootOffset:function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},refresh:function(){var e=this.storage.getDisplayList(!0);this._paintList(e)},setBackgroundColor:function(e){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var t=Jk("rect");t.setAttribute("width",this.getWidth()),t.setAttribute("height",this.getHeight()),t.setAttribute("x",0),t.setAttribute("y",0),t.setAttribute("id",0),t.style.fill=e,this._backgroundRoot.appendChild(t),this._backgroundNode=t},_paintList:function(e){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var t,n,i=this._svgRoot,a=this._visibleList,r=e.length,o=[];for(t=0;t<r;t++){var s=e[t],l=(n=s)instanceof vo?pL:n instanceof Zi?fL:n instanceof zo?gL:pL,u=RL(s)||NL(s);s.invisible||(s.__dirty&&(l&&l.brush(s),this.clipPathManager.update(s),s.style&&(this.gradientManager.update(s.style.fill),this.gradientManager.update(s.style.stroke),this.shadowManager.update(u,s)),s.__dirty=!1),o.push(s))}var c,h=function(e,t,n){return TL.diff(e,t,void 0)}(a,o);for(t=0;t<h.length;t++)if((f=h[t]).removed)for(var d=0;d<f.count;d++){u=RL(s=a[f.indices[d]]);var p=NL(s);OL(i,u),OL(i,p)}for(t=0;t<h.length;t++){var f;if((f=h[t]).added)for(d=0;d<f.count;d++)u=RL(s=o[f.indices[d]]),p=NL(s),c?PL(i,u,c):zL(i,u),u?PL(i,p,u):c?PL(i,p,c):zL(i,p),PL(i,p,u),c=p||u||c,this.gradientManager.addWithoutUpdate(u||p,s),this.shadowManager.addWithoutUpdate(u||p,s),this.clipPathManager.markUsed(s);else if(!f.removed)for(d=0;d<f.count;d++)u=RL(s=o[f.indices[d]]),p=NL(s),u=RL(s),p=NL(s),this.gradientManager.markUsed(s),this.gradientManager.addWithoutUpdate(u||p,s),this.shadowManager.markUsed(s),this.shadowManager.addWithoutUpdate(u||p,s),this.clipPathManager.markUsed(s),p&&PL(i,p,u),c=u||p||c}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=o},_getDefs:function(e){var t,n=this._svgDom;return 0!==(t=n.getElementsByTagName("defs")).length?t[0]:e?((t=n.insertBefore(Jk("defs"),n.firstChild)).contains||(t.contains=function(e){var n=t.children;if(!n)return!1;for(var i=n.length-1;0<=i;--i)if(n[i]===e)return!0;return!1}),t):null},resize:function(e,t){var n=this._viewport;n.style.display="none";var i=this._opts;if(null!=e&&(i.width=e),null!=t&&(i.height=t),e=this._getSize(0),t=this._getSize(1),n.style.display="",this._width!==e||this._height!==t){this._width=e,this._height=t;var a=n.style;a.width=e+"px",a.height=t+"px";var r=this._svgDom;r.setAttribute("width",e),r.setAttribute("height",t)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",e),this._backgroundNode.setAttribute("height",t))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(e){var t=this._opts,n=["width","height"][e],i=["clientWidth","clientHeight"][e],a=["paddingLeft","paddingTop"][e],r=["paddingRight","paddingBottom"][e];if(null!=t[n]&&"auto"!==t[n])return parseFloat(t[n]);var o=this.root,s=document.defaultView.getComputedStyle(o);return(o[i]||LL(s[n])||LL(o.style[n]))-(LL(s[a])||0)-(LL(s[r])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},toDataURL:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(this._svgDom.outerHTML.replace(/></g,">\n\r<"))}},I(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],(function(e){BL.prototype[e]=function(e){return function(){mn('In SVG mode painter not support method "'+e+'"')}}(e)})),Ca("svg",BL),e.version="4.9.0",e.dependencies={zrender:"4.3.2"},e.PRIORITY=gd,e.init=function(e,t,n){var i=ep(e);if(i)return i;var a=new bd(e,t,n);return a.id="ec_"+Zd++,Ud[a.id]=a,Ya(e,Kd,a.id),function(e){var t="__connectUpdateStatus";function n(e,n){for(var i=0;i<e.length;i++)e[i][t]=n}hd(Gd,(function(i,a){e._messageCenter.on(a,(function(i){if(jd[e.group]&&0!==e[t]){if(i&&i.escapeConnect)return;var a=e.makeActionFromEvent(i),r=[];hd(Ud,(function(t){t!==e&&t.group===e.group&&r.push(t)})),n(r,0),hd(r,(function(e){1!==e[t]&&e.dispatchAction(a)})),n(r,2)}}))}))}(a),a},e.connect=function(e){if(z(e)){var t=e;e=null,hd(t,(function(t){null!=t.group&&(e=t.group)})),e=e||"g_"+qd++,hd(t,(function(t){t.group=e}))}return jd[e]=!0,e},e.disConnect=Jd,e.disconnect=Qd,e.dispose=function(e){"string"==typeof e?e=Ud[e]:e instanceof bd||(e=ep(e)),e instanceof bd&&!e.isDisposed()&&e.dispose()},e.getInstanceByDom=ep,e.getInstanceById=function(e){return Ud[e]},e.registerTheme=tp,e.registerPreprocessor=np,e.registerProcessor=ip,e.registerPostUpdate=function(e){Fd.push(e)},e.registerAction=ap,e.registerCoordinateSystem=rp,e.getCoordinateSystemDimensions=function(e){var t=ju.get(e);if(t)return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()},e.registerLayout=op,e.registerVisual=sp,e.registerLoading=up,e.extendComponentModel=cp,e.extendComponentView=hp,e.extendSeriesModel=dp,e.extendChartView=pp,e.setCanvasCreator=function(e){g("createCanvas",e)},e.registerMap=function(e,t,n){sd(e,t,n)},e.getMap=function(e){var t=ld(e);return t&&t[0]&&{geoJson:t[0].geoJSON,specialAreas:t[0].specialAreas}},e.dataTool={},e.zrender=Aa,e.number=Vl,e.format=nu,e.throttle=gh,e.helper=og,e.matrix=pt,e.vector=Te,e.color=Kt,e.parseGeoJSON=hg,e.parseGeoJson=wg,e.util=Sg,e.graphic=Mg,e.List=Lp,e.Model=ml,e.Axis=_g,e.env=a})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Swiper=t()}(this,(function(){"use strict";function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function t(){return(t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function n(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function i(e,t){void 0===e&&(e={}),void 0===t&&(t={}),Object.keys(t).forEach((function(a){void 0===e[a]?e[a]=t[a]:n(t[a])&&n(e[a])&&Object.keys(t[a]).length>0&&i(e[a],t[a])}))}var a={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function r(){var e="undefined"!=typeof document?document:{};return i(e,a),e}var o={document:a,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(e){return"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0)},cancelAnimationFrame:function(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function s(){var e="undefined"!=typeof window?window:{};return i(e,o),e}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function h(e,t,n){return(h=c()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var a=new(Function.bind.apply(e,i));return n&&u(a,n.prototype),a}).apply(null,arguments)}function d(e){var t="function"==typeof Map?new Map:void 0;return(d=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return h(e,arguments,l(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),u(i,e)})(e)}var p=function(e){var t,n;function i(t){var n,i,a;return i=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n=e.call.apply(e,[this].concat(t))||this),a=i.__proto__,Object.defineProperty(i,"__proto__",{get:function(){return a},set:function(e){a.__proto__=e}}),n}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i}(d(Array));function f(e){void 0===e&&(e=[]);var t=[];return e.forEach((function(e){Array.isArray(e)?t.push.apply(t,f(e)):t.push(e)})),t}function g(e,t){return Array.prototype.filter.call(e,t)}function m(e,t){var n=s(),i=r(),a=[];if(!t&&e instanceof p)return e;if(!e)return new p(a);if("string"==typeof e){var o=e.trim();if(o.indexOf("<")>=0&&o.indexOf(">")>=0){var l="div";0===o.indexOf("<li")&&(l="ul"),0===o.indexOf("<tr")&&(l="tbody"),0!==o.indexOf("<td")&&0!==o.indexOf("<th")||(l="tr"),0===o.indexOf("<tbody")&&(l="table"),0===o.indexOf("<option")&&(l="select");var u=i.createElement(l);u.innerHTML=o;for(var c=0;c<u.childNodes.length;c+=1)a.push(u.childNodes[c])}else a=function(e,t){if("string"!=typeof e)return[e];for(var n=[],i=t.querySelectorAll(e),a=0;a<i.length;a+=1)n.push(i[a]);return n}(e.trim(),t||i)}else if(e.nodeType||e===n||e===i)a.push(e);else if(Array.isArray(e)){if(e instanceof p)return e;a=e}return new p(function(e){for(var t=[],n=0;n<e.length;n+=1)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(a))}m.fn=p.prototype;var v,y,x,_={addClass:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=f(t.map((function(e){return e.split(" ")})));return this.forEach((function(e){var t;(t=e.classList).add.apply(t,i)})),this},removeClass:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=f(t.map((function(e){return e.split(" ")})));return this.forEach((function(e){var t;(t=e.classList).remove.apply(t,i)})),this},hasClass:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=f(t.map((function(e){return e.split(" ")})));return g(this,(function(e){return i.filter((function(t){return e.classList.contains(t)})).length>0})).length>0},toggleClass:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=f(t.map((function(e){return e.split(" ")})));this.forEach((function(e){i.forEach((function(t){e.classList.toggle(t)}))}))},attr:function(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(var n=0;n<this.length;n+=1)if(2===arguments.length)this[n].setAttribute(e,t);else for(var i in e)this[n][i]=e[i],this[n].setAttribute(i,e[i]);return this},removeAttr:function(e){for(var t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this},transform:function(e){for(var t=0;t<this.length;t+=1)this[t].style.transform=e;return this},transition:function(e){for(var t=0;t<this.length;t+=1)this[t].style.transitionDuration="string"!=typeof e?e+"ms":e;return this},on:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t[0],a=t[1],r=t[2],o=t[3];function s(e){var t=e.target;if(t){var n=e.target.dom7EventData||[];if(n.indexOf(e)<0&&n.unshift(e),m(t).is(a))r.apply(t,n);else for(var i=m(t).parents(),o=0;o<i.length;o+=1)m(i[o]).is(a)&&r.apply(i[o],n)}}function l(e){var t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),r.apply(this,t)}"function"==typeof t[1]&&(i=t[0],r=t[1],o=t[2],a=void 0),o||(o=!1);for(var u,c=i.split(" "),h=0;h<this.length;h+=1){var d=this[h];if(a)for(u=0;u<c.length;u+=1){var p=c[u];d.dom7LiveListeners||(d.dom7LiveListeners={}),d.dom7LiveListeners[p]||(d.dom7LiveListeners[p]=[]),d.dom7LiveListeners[p].push({listener:r,proxyListener:s}),d.addEventListener(p,s,o)}else for(u=0;u<c.length;u+=1){var f=c[u];d.dom7Listeners||(d.dom7Listeners={}),d.dom7Listeners[f]||(d.dom7Listeners[f]=[]),d.dom7Listeners[f].push({listener:r,proxyListener:l}),d.addEventListener(f,l,o)}}return this},off:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t[0],a=t[1],r=t[2],o=t[3];"function"==typeof t[1]&&(i=t[0],r=t[1],o=t[2],a=void 0),o||(o=!1);for(var s=i.split(" "),l=0;l<s.length;l+=1)for(var u=s[l],c=0;c<this.length;c+=1){var h=this[c],d=void 0;if(!a&&h.dom7Listeners?d=h.dom7Listeners[u]:a&&h.dom7LiveListeners&&(d=h.dom7LiveListeners[u]),d&&d.length)for(var p=d.length-1;p>=0;p-=1){var f=d[p];r&&f.listener===r||r&&f.listener&&f.listener.dom7proxy&&f.listener.dom7proxy===r?(h.removeEventListener(u,f.proxyListener,o),d.splice(p,1)):r||(h.removeEventListener(u,f.proxyListener,o),d.splice(p,1))}}return this},trigger:function(){for(var e=s(),t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];for(var a=n[0].split(" "),r=n[1],o=0;o<a.length;o+=1)for(var l=a[o],u=0;u<this.length;u+=1){var c=this[u];if(e.CustomEvent){var h=new e.CustomEvent(l,{detail:r,bubbles:!0,cancelable:!0});c.dom7EventData=n.filter((function(e,t){return t>0})),c.dispatchEvent(h),c.dom7EventData=[],delete c.dom7EventData}}return this},transitionEnd:function(e){var t=this;return e&&t.on("transitionend",(function n(i){i.target===this&&(e.call(this,i),t.off("transitionend",n))})),this},outerWidth:function(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetWidth+parseFloat(t.getPropertyValue("margin-right"))+parseFloat(t.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},outerHeight:function(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetHeight+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},styles:function(){var e=s();return this[0]?e.getComputedStyle(this[0],null):{}},offset:function(){if(this.length>0){var e=s(),t=r(),n=this[0],i=n.getBoundingClientRect(),a=t.body,o=n.clientTop||a.clientTop||0,l=n.clientLeft||a.clientLeft||0,u=n===e?e.scrollY:n.scrollTop,c=n===e?e.scrollX:n.scrollLeft;return{top:i.top+u-o,left:i.left+c-l}}return null},css:function(e,t){var n,i=s();if(1===arguments.length){if("string"!=typeof e){for(n=0;n<this.length;n+=1)for(var a in e)this[n].style[a]=e[a];return this}if(this[0])return i.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(n=0;n<this.length;n+=1)this[n].style[e]=t;return this}return this},each:function(e){return e?(this.forEach((function(t,n){e.apply(t,[t,n])})),this):this},html:function(e){if(void 0===e)return this[0]?this[0].innerHTML:null;for(var t=0;t<this.length;t+=1)this[t].innerHTML=e;return this},text:function(e){if(void 0===e)return this[0]?this[0].textContent.trim():null;for(var t=0;t<this.length;t+=1)this[t].textContent=e;return this},is:function(e){var t,n,i=s(),a=r(),o=this[0];if(!o||void 0===e)return!1;if("string"==typeof e){if(o.matches)return o.matches(e);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(e);if(o.msMatchesSelector)return o.msMatchesSelector(e);for(t=m(e),n=0;n<t.length;n+=1)if(t[n]===o)return!0;return!1}if(e===a)return o===a;if(e===i)return o===i;if(e.nodeType||e instanceof p){for(t=e.nodeType?[e]:e,n=0;n<t.length;n+=1)if(t[n]===o)return!0;return!1}return!1},index:function(){var e,t=this[0];if(t){for(e=0;null!==(t=t.previousSibling);)1===t.nodeType&&(e+=1);return e}},eq:function(e){if(void 0===e)return this;var t=this.length;if(e>t-1)return m([]);if(e<0){var n=t+e;return m(n<0?[]:[this[n]])}return m([this[e]])},append:function(){for(var e,t=r(),n=0;n<arguments.length;n+=1){e=n<0||arguments.length<=n?void 0:arguments[n];for(var i=0;i<this.length;i+=1)if("string"==typeof e){var a=t.createElement("div");for(a.innerHTML=e;a.firstChild;)this[i].appendChild(a.firstChild)}else if(e instanceof p)for(var o=0;o<e.length;o+=1)this[i].appendChild(e[o]);else this[i].appendChild(e)}return this},prepend:function(e){var t,n,i=r();for(t=0;t<this.length;t+=1)if("string"==typeof e){var a=i.createElement("div");for(a.innerHTML=e,n=a.childNodes.length-1;n>=0;n-=1)this[t].insertBefore(a.childNodes[n],this[t].childNodes[0])}else if(e instanceof p)for(n=0;n<e.length;n+=1)this[t].insertBefore(e[n],this[t].childNodes[0]);else this[t].insertBefore(e,this[t].childNodes[0]);return this},next:function(e){return this.length>0?e?this[0].nextElementSibling&&m(this[0].nextElementSibling).is(e)?m([this[0].nextElementSibling]):m([]):this[0].nextElementSibling?m([this[0].nextElementSibling]):m([]):m([])},nextAll:function(e){var t=[],n=this[0];if(!n)return m([]);for(;n.nextElementSibling;){var i=n.nextElementSibling;e?m(i).is(e)&&t.push(i):t.push(i),n=i}return m(t)},prev:function(e){if(this.length>0){var t=this[0];return e?t.previousElementSibling&&m(t.previousElementSibling).is(e)?m([t.previousElementSibling]):m([]):t.previousElementSibling?m([t.previousElementSibling]):m([])}return m([])},prevAll:function(e){var t=[],n=this[0];if(!n)return m([]);for(;n.previousElementSibling;){var i=n.previousElementSibling;e?m(i).is(e)&&t.push(i):t.push(i),n=i}return m(t)},parent:function(e){for(var t=[],n=0;n<this.length;n+=1)null!==this[n].parentNode&&(e?m(this[n].parentNode).is(e)&&t.push(this[n].parentNode):t.push(this[n].parentNode));return m(t)},parents:function(e){for(var t=[],n=0;n<this.length;n+=1)for(var i=this[n].parentNode;i;)e?m(i).is(e)&&t.push(i):t.push(i),i=i.parentNode;return m(t)},closest:function(e){var t=this;return void 0===e?m([]):(t.is(e)||(t=t.parents(e).eq(0)),t)},find:function(e){for(var t=[],n=0;n<this.length;n+=1)for(var i=this[n].querySelectorAll(e),a=0;a<i.length;a+=1)t.push(i[a]);return m(t)},children:function(e){for(var t=[],n=0;n<this.length;n+=1)for(var i=this[n].children,a=0;a<i.length;a+=1)e&&!m(i[a]).is(e)||t.push(i[a]);return m(t)},filter:function(e){return m(g(this,e))},remove:function(){for(var e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this}};function b(e,t){return void 0===t&&(t=0),setTimeout(e,t)}function w(){return Date.now()}function S(e,t){void 0===t&&(t="x");var n,i,a,r=s(),o=function(e){var t,n=s();return n.getComputedStyle&&(t=n.getComputedStyle(e,null)),!t&&e.currentStyle&&(t=e.currentStyle),t||(t=e.style),t}(e);return r.WebKitCSSMatrix?((i=o.transform||o.webkitTransform).split(",").length>6&&(i=i.split(", ").map((function(e){return e.replace(",",".")})).join(", ")),a=new r.WebKitCSSMatrix("none"===i?"":i)):n=(a=o.MozTransform||o.OTransform||o.MsTransform||o.msTransform||o.transform||o.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===t&&(i=r.WebKitCSSMatrix?a.m41:16===n.length?parseFloat(n[12]):parseFloat(n[4])),"y"===t&&(i=r.WebKitCSSMatrix?a.m42:16===n.length?parseFloat(n[13]):parseFloat(n[5])),i||0}function M(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function T(e){return"undefined"!=typeof window&&void 0!==window.HTMLElement?e instanceof HTMLElement:e&&(1===e.nodeType||11===e.nodeType)}function C(){for(var e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"],n=1;n<arguments.length;n+=1){var i=n<0||arguments.length<=n?void 0:arguments[n];if(null!=i&&!T(i))for(var a=Object.keys(Object(i)).filter((function(e){return t.indexOf(e)<0})),r=0,o=a.length;r<o;r+=1){var s=a[r],l=Object.getOwnPropertyDescriptor(i,s);void 0!==l&&l.enumerable&&(M(e[s])&&M(i[s])?i[s].__swiper__?e[s]=i[s]:C(e[s],i[s]):!M(e[s])&&M(i[s])?(e[s]={},i[s].__swiper__?e[s]=i[s]:C(e[s],i[s])):e[s]=i[s])}}return e}function I(e,t){Object.keys(t).forEach((function(n){M(t[n])&&Object.keys(t[n]).forEach((function(i){"function"==typeof t[n][i]&&(t[n][i]=t[n][i].bind(e))})),e[n]=t[n]}))}function A(e){return void 0===e&&(e=""),"."+e.trim().replace(/([\.:!\/])/g,"\\$1").replace(/ /g,".")}function D(e,t,n,i){var a=r();return n&&Object.keys(i).forEach((function(n){if(!t[n]&&!0===t.auto){var r=a.createElement("div");r.className=i[n],e.append(r),t[n]=r}})),t}function k(){return v||(v=function(){var e=s(),t=r();return{touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch),pointerEvents:!!e.PointerEvent&&"maxTouchPoints"in e.navigator&&e.navigator.maxTouchPoints>=0,observer:"MutationObserver"in e||"WebkitMutationObserver"in e,passiveListener:function(){var t=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t=!0}});e.addEventListener("testPassiveListener",null,n)}catch(e){}return t}(),gestures:"ongesturestart"in e}}()),v}function L(e){return void 0===e&&(e={}),y||(y=function(e){var t=(void 0===e?{}:e).userAgent,n=k(),i=s(),a=i.navigator.platform,r=t||i.navigator.userAgent,o={ios:!1,android:!1},l=i.screen.width,u=i.screen.height,c=r.match(/(Android);?[\s\/]+([\d.]+)?/),h=r.match(/(iPad).*OS\s([\d_]+)/),d=r.match(/(iPod)(.*OS\s([\d_]+))?/),p=!h&&r.match(/(iPhone\sOS|iOS)\s([\d_]+)/),f="Win32"===a,g="MacIntel"===a;return!h&&g&&n.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(l+"x"+u)>=0&&((h=r.match(/(Version)\/([\d.]+)/))||(h=[0,1,"13_0_0"]),g=!1),c&&!f&&(o.os="android",o.android=!0),(h||p||d)&&(o.os="ios",o.ios=!0),o}(e)),y}function E(){return x||(x=function(){var e,t=s();return{isEdge:!!t.navigator.userAgent.match(/Edge/g),isSafari:(e=t.navigator.userAgent.toLowerCase(),e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0),isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(t.navigator.userAgent)}}()),x}Object.keys(_).forEach((function(e){Object.defineProperty(m.fn,e,{value:_[e],writable:!0})}));var P={name:"resize",create:function(){var e=this;C(e,{resize:{observer:null,createObserver:function(){e&&!e.destroyed&&e.initialized&&(e.resize.observer=new ResizeObserver((function(t){var n=e.width,i=e.height,a=n,r=i;t.forEach((function(t){var n=t.contentBoxSize,i=t.contentRect,o=t.target;o&&o!==e.el||(a=i?i.width:(n[0]||n).inlineSize,r=i?i.height:(n[0]||n).blockSize)})),a===n&&r===i||e.resize.resizeHandler()})),e.resize.observer.observe(e.el))},removeObserver:function(){e.resize.observer&&e.resize.observer.unobserve&&e.el&&(e.resize.observer.unobserve(e.el),e.resize.observer=null)},resizeHandler:function(){e&&!e.destroyed&&e.initialized&&(e.emit("beforeResize"),e.emit("resize"))},orientationChangeHandler:function(){e&&!e.destroyed&&e.initialized&&e.emit("orientationchange")}}})},on:{init:function(e){var t=s();e.params.resizeObserver&&void 0!==s().ResizeObserver?e.resize.createObserver():(t.addEventListener("resize",e.resize.resizeHandler),t.addEventListener("orientationchange",e.resize.orientationChangeHandler))},destroy:function(e){var t=s();e.resize.removeObserver(),t.removeEventListener("resize",e.resize.resizeHandler),t.removeEventListener("orientationchange",e.resize.orientationChangeHandler)}}},z={attach:function(e,t){void 0===t&&(t={});var n=s(),i=this,a=new(n.MutationObserver||n.WebkitMutationObserver)((function(e){if(1!==e.length){var t=function(){i.emit("observerUpdate",e[0])};n.requestAnimationFrame?n.requestAnimationFrame(t):n.setTimeout(t,0)}else i.emit("observerUpdate",e[0])}));a.observe(e,{attributes:void 0===t.attributes||t.attributes,childList:void 0===t.childList||t.childList,characterData:void 0===t.characterData||t.characterData}),i.observer.observers.push(a)},init:function(){var e=this;if(e.support.observer&&e.params.observer){if(e.params.observeParents)for(var t=e.$el.parents(),n=0;n<t.length;n+=1)e.observer.attach(t[n]);e.observer.attach(e.$el[0],{childList:e.params.observeSlideChildren}),e.observer.attach(e.$wrapperEl[0],{attributes:!1})}},destroy:function(){this.observer.observers.forEach((function(e){e.disconnect()})),this.observer.observers=[]}},O={name:"observer",params:{observer:!1,observeParents:!1,observeSlideChildren:!1},create:function(){I(this,{observer:t({},z,{observers:[]})})},on:{init:function(e){e.observer.init()},destroy:function(e){e.observer.destroy()}}};function N(e){var t=this,n=r(),i=s(),a=t.touchEventsData,o=t.params,l=t.touches;if(t.enabled&&(!t.animating||!o.preventInteractionOnTransition)){var u=e;u.originalEvent&&(u=u.originalEvent);var c=m(u.target);if(("wrapper"!==o.touchEventsTarget||c.closest(t.wrapperEl).length)&&(a.isTouchEvent="touchstart"===u.type,(a.isTouchEvent||!("which"in u)||3!==u.which)&&!(!a.isTouchEvent&&"button"in u&&u.button>0||a.isTouched&&a.isMoved))){o.noSwipingClass&&""!==o.noSwipingClass&&u.target&&u.target.shadowRoot&&e.path&&e.path[0]&&(c=m(e.path[0]));var h=o.noSwipingSelector?o.noSwipingSelector:"."+o.noSwipingClass,d=!(!u.target||!u.target.shadowRoot);if(o.noSwiping&&(d?function(e,t){return void 0===t&&(t=this),function t(n){return n&&n!==r()&&n!==s()?(n.assignedSlot&&(n=n.assignedSlot),n.closest(e)||t(n.getRootNode().host)):null}(t)}(h,u.target):c.closest(h)[0]))t.allowClick=!0;else if(!o.swipeHandler||c.closest(o.swipeHandler)[0]){l.currentX="touchstart"===u.type?u.targetTouches[0].pageX:u.pageX,l.currentY="touchstart"===u.type?u.targetTouches[0].pageY:u.pageY;var p=l.currentX,f=l.currentY,g=o.edgeSwipeDetection||o.iOSEdgeSwipeDetection,v=o.edgeSwipeThreshold||o.iOSEdgeSwipeThreshold;if(g&&(p<=v||p>=i.innerWidth-v)){if("prevent"!==g)return;e.preventDefault()}if(C(a,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),l.startX=p,l.startY=f,a.touchStartTime=w(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,o.threshold>0&&(a.allowThresholdMove=!1),"touchstart"!==u.type){var y=!0;c.is(a.focusableElements)&&(y=!1),n.activeElement&&m(n.activeElement).is(a.focusableElements)&&n.activeElement!==c[0]&&n.activeElement.blur();var x=y&&t.allowTouchMove&&o.touchStartPreventDefault;!o.touchStartForcePreventDefault&&!x||c[0].isContentEditable||u.preventDefault()}t.emit("touchStart",u)}}}}function R(e){var t=r(),n=this,i=n.touchEventsData,a=n.params,o=n.touches,s=n.rtlTranslate;if(n.enabled){var l=e;if(l.originalEvent&&(l=l.originalEvent),i.isTouched){if(!i.isTouchEvent||"touchmove"===l.type){var u="touchmove"===l.type&&l.targetTouches&&(l.targetTouches[0]||l.changedTouches[0]),c="touchmove"===l.type?u.pageX:l.pageX,h="touchmove"===l.type?u.pageY:l.pageY;if(l.preventedByNestedSwiper)return o.startX=c,void(o.startY=h);if(!n.allowTouchMove)return n.allowClick=!1,void(i.isTouched&&(C(o,{startX:c,startY:h,currentX:c,currentY:h}),i.touchStartTime=w()));if(i.isTouchEvent&&a.touchReleaseOnEdges&&!a.loop)if(n.isVertical()){if(h<o.startY&&n.translate<=n.maxTranslate()||h>o.startY&&n.translate>=n.minTranslate())return i.isTouched=!1,void(i.isMoved=!1)}else if(c<o.startX&&n.translate<=n.maxTranslate()||c>o.startX&&n.translate>=n.minTranslate())return;if(i.isTouchEvent&&t.activeElement&&l.target===t.activeElement&&m(l.target).is(i.focusableElements))return i.isMoved=!0,void(n.allowClick=!1);if(i.allowTouchCallbacks&&n.emit("touchMove",l),!(l.targetTouches&&l.targetTouches.length>1)){o.currentX=c,o.currentY=h;var d,p=o.currentX-o.startX,f=o.currentY-o.startY;if(!(n.params.threshold&&Math.sqrt(Math.pow(p,2)+Math.pow(f,2))<n.params.threshold))if(void 0===i.isScrolling&&(n.isHorizontal()&&o.currentY===o.startY||n.isVertical()&&o.currentX===o.startX?i.isScrolling=!1:p*p+f*f>=25&&(d=180*Math.atan2(Math.abs(f),Math.abs(p))/Math.PI,i.isScrolling=n.isHorizontal()?d>a.touchAngle:90-d>a.touchAngle)),i.isScrolling&&n.emit("touchMoveOpposite",l),void 0===i.startMoving&&(o.currentX===o.startX&&o.currentY===o.startY||(i.startMoving=!0)),i.isScrolling)i.isTouched=!1;else if(i.startMoving){n.allowClick=!1,!a.cssMode&&l.cancelable&&l.preventDefault(),a.touchMoveStopPropagation&&!a.nested&&l.stopPropagation(),i.isMoved||(a.loop&&n.loopFix(),i.startTranslate=n.getTranslate(),n.setTransition(0),n.animating&&n.$wrapperEl.trigger("webkitTransitionEnd transitionend"),i.allowMomentumBounce=!1,!a.grabCursor||!0!==n.allowSlideNext&&!0!==n.allowSlidePrev||n.setGrabCursor(!0),n.emit("sliderFirstMove",l)),n.emit("sliderMove",l),i.isMoved=!0;var g=n.isHorizontal()?p:f;o.diff=g,g*=a.touchRatio,s&&(g=-g),n.swipeDirection=g>0?"prev":"next",i.currentTranslate=g+i.startTranslate;var v=!0,y=a.resistanceRatio;if(a.touchReleaseOnEdges&&(y=0),g>0&&i.currentTranslate>n.minTranslate()?(v=!1,a.resistance&&(i.currentTranslate=n.minTranslate()-1+Math.pow(-n.minTranslate()+i.startTranslate+g,y))):g<0&&i.currentTranslate<n.maxTranslate()&&(v=!1,a.resistance&&(i.currentTranslate=n.maxTranslate()+1-Math.pow(n.maxTranslate()-i.startTranslate-g,y))),v&&(l.preventedByNestedSwiper=!0),!n.allowSlideNext&&"next"===n.swipeDirection&&i.currentTranslate<i.startTranslate&&(i.currentTranslate=i.startTranslate),!n.allowSlidePrev&&"prev"===n.swipeDirection&&i.currentTranslate>i.startTranslate&&(i.currentTranslate=i.startTranslate),n.allowSlidePrev||n.allowSlideNext||(i.currentTranslate=i.startTranslate),a.threshold>0){if(!(Math.abs(g)>a.threshold||i.allowThresholdMove))return void(i.currentTranslate=i.startTranslate);if(!i.allowThresholdMove)return i.allowThresholdMove=!0,o.startX=o.currentX,o.startY=o.currentY,i.currentTranslate=i.startTranslate,void(o.diff=n.isHorizontal()?o.currentX-o.startX:o.currentY-o.startY)}a.followFinger&&!a.cssMode&&((a.freeMode||a.watchSlidesProgress||a.watchSlidesVisibility)&&(n.updateActiveIndex(),n.updateSlidesClasses()),a.freeMode&&(0===i.velocities.length&&i.velocities.push({position:o[n.isHorizontal()?"startX":"startY"],time:i.touchStartTime}),i.velocities.push({position:o[n.isHorizontal()?"currentX":"currentY"],time:w()})),n.updateProgress(i.currentTranslate),n.setTranslate(i.currentTranslate))}}}}else i.startMoving&&i.isScrolling&&n.emit("touchMoveOpposite",l)}}function B(e){var t=this,n=t.touchEventsData,i=t.params,a=t.touches,r=t.rtlTranslate,o=t.$wrapperEl,s=t.slidesGrid,l=t.snapGrid;if(t.enabled){var u=e;if(u.originalEvent&&(u=u.originalEvent),n.allowTouchCallbacks&&t.emit("touchEnd",u),n.allowTouchCallbacks=!1,!n.isTouched)return n.isMoved&&i.grabCursor&&t.setGrabCursor(!1),n.isMoved=!1,void(n.startMoving=!1);i.grabCursor&&n.isMoved&&n.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);var c,h=w(),d=h-n.touchStartTime;if(t.allowClick&&(t.updateClickedSlide(u),t.emit("tap click",u),d<300&&h-n.lastClickTime<300&&t.emit("doubleTap doubleClick",u)),n.lastClickTime=w(),b((function(){t.destroyed||(t.allowClick=!0)})),!n.isTouched||!n.isMoved||!t.swipeDirection||0===a.diff||n.currentTranslate===n.startTranslate)return n.isTouched=!1,n.isMoved=!1,void(n.startMoving=!1);if(n.isTouched=!1,n.isMoved=!1,n.startMoving=!1,c=i.followFinger?r?t.translate:-t.translate:-n.currentTranslate,!i.cssMode)if(i.freeMode){if(c<-t.minTranslate())return void t.slideTo(t.activeIndex);if(c>-t.maxTranslate())return void(t.slides.length<l.length?t.slideTo(l.length-1):t.slideTo(t.slides.length-1));if(i.freeModeMomentum){if(n.velocities.length>1){var p=n.velocities.pop(),f=n.velocities.pop(),g=p.position-f.position,m=p.time-f.time;t.velocity=g/m,t.velocity/=2,Math.abs(t.velocity)<i.freeModeMinimumVelocity&&(t.velocity=0),(m>150||w()-p.time>300)&&(t.velocity=0)}else t.velocity=0;t.velocity*=i.freeModeMomentumVelocityRatio,n.velocities.length=0;var v=1e3*i.freeModeMomentumRatio,y=t.velocity*v,x=t.translate+y;r&&(x=-x);var _,S,M=!1,T=20*Math.abs(t.velocity)*i.freeModeMomentumBounceRatio;if(x<t.maxTranslate())i.freeModeMomentumBounce?(x+t.maxTranslate()<-T&&(x=t.maxTranslate()-T),_=t.maxTranslate(),M=!0,n.allowMomentumBounce=!0):x=t.maxTranslate(),i.loop&&i.centeredSlides&&(S=!0);else if(x>t.minTranslate())i.freeModeMomentumBounce?(x-t.minTranslate()>T&&(x=t.minTranslate()+T),_=t.minTranslate(),M=!0,n.allowMomentumBounce=!0):x=t.minTranslate(),i.loop&&i.centeredSlides&&(S=!0);else if(i.freeModeSticky){for(var C,I=0;I<l.length;I+=1)if(l[I]>-x){C=I;break}x=-(x=Math.abs(l[C]-x)<Math.abs(l[C-1]-x)||"next"===t.swipeDirection?l[C]:l[C-1])}if(S&&t.once("transitionEnd",(function(){t.loopFix()})),0!==t.velocity){if(v=r?Math.abs((-x-t.translate)/t.velocity):Math.abs((x-t.translate)/t.velocity),i.freeModeSticky){var A=Math.abs((r?-x:x)-t.translate),D=t.slidesSizesGrid[t.activeIndex];v=A<D?i.speed:A<2*D?1.5*i.speed:2.5*i.speed}}else if(i.freeModeSticky)return void t.slideToClosest();i.freeModeMomentumBounce&&M?(t.updateProgress(_),t.setTransition(v),t.setTranslate(x),t.transitionStart(!0,t.swipeDirection),t.animating=!0,o.transitionEnd((function(){t&&!t.destroyed&&n.allowMomentumBounce&&(t.emit("momentumBounce"),t.setTransition(i.speed),setTimeout((function(){t.setTranslate(_),o.transitionEnd((function(){t&&!t.destroyed&&t.transitionEnd()}))}),0))}))):t.velocity?(t.updateProgress(x),t.setTransition(v),t.setTranslate(x),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,o.transitionEnd((function(){t&&!t.destroyed&&t.transitionEnd()})))):(t.emit("_freeModeNoMomentumRelease"),t.updateProgress(x)),t.updateActiveIndex(),t.updateSlidesClasses()}else{if(i.freeModeSticky)return void t.slideToClosest();i.freeMode&&t.emit("_freeModeNoMomentumRelease")}(!i.freeModeMomentum||d>=i.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}else{for(var k=0,L=t.slidesSizesGrid[0],E=0;E<s.length;E+=E<i.slidesPerGroupSkip?1:i.slidesPerGroup){var P=E<i.slidesPerGroupSkip-1?1:i.slidesPerGroup;void 0!==s[E+P]?c>=s[E]&&c<s[E+P]&&(k=E,L=s[E+P]-s[E]):c>=s[E]&&(k=E,L=s[s.length-1]-s[s.length-2])}var z=(c-s[k])/L,O=k<i.slidesPerGroupSkip-1?1:i.slidesPerGroup;if(d>i.longSwipesMs){if(!i.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(z>=i.longSwipesRatio?t.slideTo(k+O):t.slideTo(k)),"prev"===t.swipeDirection&&(z>1-i.longSwipesRatio?t.slideTo(k+O):t.slideTo(k))}else{if(!i.shortSwipes)return void t.slideTo(t.activeIndex);!t.navigation||u.target!==t.navigation.nextEl&&u.target!==t.navigation.prevEl?("next"===t.swipeDirection&&t.slideTo(k+O),"prev"===t.swipeDirection&&t.slideTo(k)):u.target===t.navigation.nextEl?t.slideTo(k+O):t.slideTo(k)}}}}function V(){var e=this,t=e.params,n=e.el;if(!n||0!==n.offsetWidth){t.breakpoints&&e.setBreakpoint();var i=e.allowSlideNext,a=e.allowSlidePrev,r=e.snapGrid;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses(),("auto"===t.slidesPerView||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.run(),e.allowSlidePrev=a,e.allowSlideNext=i,e.params.watchOverflow&&r!==e.snapGrid&&e.checkOverflow()}}function G(e){var t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function W(){var e=this,t=e.wrapperEl,n=e.rtlTranslate;if(e.enabled){e.previousTranslate=e.translate,e.isHorizontal()?e.translate=n?t.scrollWidth-t.offsetWidth-t.scrollLeft:-t.scrollLeft:e.translate=-t.scrollTop,-0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();var i=e.maxTranslate()-e.minTranslate();(0===i?0:(e.translate-e.minTranslate())/i)!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}}var H=!1;function F(){}var $={init:!0,direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!1,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,slidesPerGroupSkip:0,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!1,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopFillGroupWithBlank:!1,loopPreventsSlide:!0,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0,_emitClasses:!1},X={modular:{useParams:function(e){var t=this;t.modules&&Object.keys(t.modules).forEach((function(n){var i=t.modules[n];i.params&&C(e,i.params)}))},useModules:function(e){void 0===e&&(e={});var t=this;t.modules&&Object.keys(t.modules).forEach((function(n){var i=t.modules[n],a=e[n]||{};i.on&&t.on&&Object.keys(i.on).forEach((function(e){t.on(e,i.on[e])})),i.create&&i.create.bind(t)(a)}))}},eventsEmitter:{on:function(e,t,n){var i=this;if("function"!=typeof t)return i;var a=n?"unshift":"push";return e.split(" ").forEach((function(e){i.eventsListeners[e]||(i.eventsListeners[e]=[]),i.eventsListeners[e][a](t)})),i},once:function(e,t,n){var i=this;if("function"!=typeof t)return i;function a(){i.off(e,a),a.__emitterProxy&&delete a.__emitterProxy;for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];t.apply(i,r)}return a.__emitterProxy=t,i.on(e,a,n)},onAny:function(e,t){var n=this;if("function"!=typeof e)return n;var i=t?"unshift":"push";return n.eventsAnyListeners.indexOf(e)<0&&n.eventsAnyListeners[i](e),n},offAny:function(e){var t=this;if(!t.eventsAnyListeners)return t;var n=t.eventsAnyListeners.indexOf(e);return n>=0&&t.eventsAnyListeners.splice(n,1),t},off:function(e,t){var n=this;return n.eventsListeners?(e.split(" ").forEach((function(e){void 0===t?n.eventsListeners[e]=[]:n.eventsListeners[e]&&n.eventsListeners[e].forEach((function(i,a){(i===t||i.__emitterProxy&&i.__emitterProxy===t)&&n.eventsListeners[e].splice(a,1)}))})),n):n},emit:function(){var e,t,n,i=this;if(!i.eventsListeners)return i;for(var a=arguments.length,r=new Array(a),o=0;o<a;o++)r[o]=arguments[o];"string"==typeof r[0]||Array.isArray(r[0])?(e=r[0],t=r.slice(1,r.length),n=i):(e=r[0].events,t=r[0].data,n=r[0].context||i),t.unshift(n);var s=Array.isArray(e)?e:e.split(" ");return s.forEach((function(e){i.eventsAnyListeners&&i.eventsAnyListeners.length&&i.eventsAnyListeners.forEach((function(i){i.apply(n,[e].concat(t))})),i.eventsListeners&&i.eventsListeners[e]&&i.eventsListeners[e].forEach((function(e){e.apply(n,t)}))})),i}},update:{updateSize:function(){var e,t,n=this,i=n.$el;e=void 0!==n.params.width&&null!==n.params.width?n.params.width:i[0].clientWidth,t=void 0!==n.params.height&&null!==n.params.height?n.params.height:i[0].clientHeight,0===e&&n.isHorizontal()||0===t&&n.isVertical()||(e=e-parseInt(i.css("padding-left")||0,10)-parseInt(i.css("padding-right")||0,10),t=t-parseInt(i.css("padding-top")||0,10)-parseInt(i.css("padding-bottom")||0,10),Number.isNaN(e)&&(e=0),Number.isNaN(t)&&(t=0),C(n,{width:e,height:t,size:n.isHorizontal()?e:t}))},updateSlides:function(){var e=this;function t(t){return e.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}function n(e,n){return parseFloat(e.getPropertyValue(t(n))||0)}var i=e.params,a=e.$wrapperEl,r=e.size,o=e.rtlTranslate,s=e.wrongRTL,l=e.virtual&&i.virtual.enabled,u=l?e.virtual.slides.length:e.slides.length,c=a.children("."+e.params.slideClass),h=l?e.virtual.slides.length:c.length,d=[],p=[],f=[],g=i.slidesOffsetBefore;"function"==typeof g&&(g=i.slidesOffsetBefore.call(e));var m=i.slidesOffsetAfter;"function"==typeof m&&(m=i.slidesOffsetAfter.call(e));var v=e.snapGrid.length,y=e.slidesGrid.length,x=i.spaceBetween,_=-g,b=0,w=0;if(void 0!==r){var S,M;"string"==typeof x&&x.indexOf("%")>=0&&(x=parseFloat(x.replace("%",""))/100*r),e.virtualSize=-x,o?c.css({marginLeft:"",marginBottom:"",marginTop:""}):c.css({marginRight:"",marginBottom:"",marginTop:""}),i.slidesPerColumn>1&&(S=Math.floor(h/i.slidesPerColumn)===h/e.params.slidesPerColumn?h:Math.ceil(h/i.slidesPerColumn)*i.slidesPerColumn,"auto"!==i.slidesPerView&&"row"===i.slidesPerColumnFill&&(S=Math.max(S,i.slidesPerView*i.slidesPerColumn)));for(var T,I,A,D=i.slidesPerColumn,k=S/D,L=Math.floor(h/i.slidesPerColumn),E=0;E<h;E+=1){M=0;var P=c.eq(E);if(i.slidesPerColumn>1){var z=void 0,O=void 0,N=void 0;if("row"===i.slidesPerColumnFill&&i.slidesPerGroup>1){var R=Math.floor(E/(i.slidesPerGroup*i.slidesPerColumn)),B=E-i.slidesPerColumn*i.slidesPerGroup*R,V=0===R?i.slidesPerGroup:Math.min(Math.ceil((h-R*D*i.slidesPerGroup)/D),i.slidesPerGroup);z=(O=B-(N=Math.floor(B/V))*V+R*i.slidesPerGroup)+N*S/D,P.css({"-webkit-box-ordinal-group":z,"-moz-box-ordinal-group":z,"-ms-flex-order":z,"-webkit-order":z,order:z})}else"column"===i.slidesPerColumnFill?(N=E-(O=Math.floor(E/D))*D,(O>L||O===L&&N===D-1)&&(N+=1)>=D&&(N=0,O+=1)):O=E-(N=Math.floor(E/k))*k;P.css(t("margin-top"),0!==N?i.spaceBetween&&i.spaceBetween+"px":"")}if("none"!==P.css("display")){if("auto"===i.slidesPerView){var G=getComputedStyle(P[0]),W=P[0].style.transform,H=P[0].style.webkitTransform;if(W&&(P[0].style.transform="none"),H&&(P[0].style.webkitTransform="none"),i.roundLengths)M=e.isHorizontal()?P.outerWidth(!0):P.outerHeight(!0);else{var F=n(G,"width"),$=n(G,"padding-left"),X=n(G,"padding-right"),Y=n(G,"margin-left"),U=n(G,"margin-right"),j=G.getPropertyValue("box-sizing");if(j&&"border-box"===j)M=F+Y+U;else{var Z=P[0],q=Z.clientWidth;M=F+$+X+Y+U+(Z.offsetWidth-q)}}W&&(P[0].style.transform=W),H&&(P[0].style.webkitTransform=H),i.roundLengths&&(M=Math.floor(M))}else M=(r-(i.slidesPerView-1)*x)/i.slidesPerView,i.roundLengths&&(M=Math.floor(M)),c[E]&&(c[E].style[t("width")]=M+"px");c[E]&&(c[E].swiperSlideSize=M),f.push(M),i.centeredSlides?(_=_+M/2+b/2+x,0===b&&0!==E&&(_=_-r/2-x),0===E&&(_=_-r/2-x),Math.abs(_)<.001&&(_=0),i.roundLengths&&(_=Math.floor(_)),w%i.slidesPerGroup==0&&d.push(_),p.push(_)):(i.roundLengths&&(_=Math.floor(_)),(w-Math.min(e.params.slidesPerGroupSkip,w))%e.params.slidesPerGroup==0&&d.push(_),p.push(_),_=_+M+x),e.virtualSize+=M+x,b=M,w+=1}}if(e.virtualSize=Math.max(e.virtualSize,r)+m,o&&s&&("slide"===i.effect||"coverflow"===i.effect)&&a.css({width:e.virtualSize+i.spaceBetween+"px"}),i.setWrapperSize&&a.css(((I={})[t("width")]=e.virtualSize+i.spaceBetween+"px",I)),i.slidesPerColumn>1&&(e.virtualSize=(M+i.spaceBetween)*S,e.virtualSize=Math.ceil(e.virtualSize/i.slidesPerColumn)-i.spaceBetween,a.css(((A={})[t("width")]=e.virtualSize+i.spaceBetween+"px",A)),i.centeredSlides)){T=[];for(var K=0;K<d.length;K+=1){var J=d[K];i.roundLengths&&(J=Math.floor(J)),d[K]<e.virtualSize+d[0]&&T.push(J)}d=T}if(!i.centeredSlides){T=[];for(var Q=0;Q<d.length;Q+=1){var ee=d[Q];i.roundLengths&&(ee=Math.floor(ee)),d[Q]<=e.virtualSize-r&&T.push(ee)}d=T,Math.floor(e.virtualSize-r)-Math.floor(d[d.length-1])>1&&d.push(e.virtualSize-r)}if(0===d.length&&(d=[0]),0!==i.spaceBetween){var te,ne=e.isHorizontal()&&o?"marginLeft":t("marginRight");c.filter((function(e,t){return!i.cssMode||t!==c.length-1})).css(((te={})[ne]=x+"px",te))}if(i.centeredSlides&&i.centeredSlidesBounds){var ie=0;f.forEach((function(e){ie+=e+(i.spaceBetween?i.spaceBetween:0)}));var ae=(ie-=i.spaceBetween)-r;d=d.map((function(e){return e<0?-g:e>ae?ae+m:e}))}if(i.centerInsufficientSlides){var re=0;if(f.forEach((function(e){re+=e+(i.spaceBetween?i.spaceBetween:0)})),(re-=i.spaceBetween)<r){var oe=(r-re)/2;d.forEach((function(e,t){d[t]=e-oe})),p.forEach((function(e,t){p[t]=e+oe}))}}C(e,{slides:c,snapGrid:d,slidesGrid:p,slidesSizesGrid:f}),h!==u&&e.emit("slidesLengthChange"),d.length!==v&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),p.length!==y&&e.emit("slidesGridLengthChange"),(i.watchSlidesProgress||i.watchSlidesVisibility)&&e.updateSlidesOffset()}},updateAutoHeight:function(e){var t,n=this,i=[],a=n.virtual&&n.params.virtual.enabled,r=0;"number"==typeof e?n.setTransition(e):!0===e&&n.setTransition(n.params.speed);var o=function(e){return a?n.slides.filter((function(t){return parseInt(t.getAttribute("data-swiper-slide-index"),10)===e}))[0]:n.slides.eq(e)[0]};if("auto"!==n.params.slidesPerView&&n.params.slidesPerView>1)if(n.params.centeredSlides)n.visibleSlides.each((function(e){i.push(e)}));else for(t=0;t<Math.ceil(n.params.slidesPerView);t+=1){var s=n.activeIndex+t;if(s>n.slides.length&&!a)break;i.push(o(s))}else i.push(o(n.activeIndex));for(t=0;t<i.length;t+=1)if(void 0!==i[t]){var l=i[t].offsetHeight;r=l>r?l:r}r&&n.$wrapperEl.css("height",r+"px")},updateSlidesOffset:function(){for(var e=this.slides,t=0;t<e.length;t+=1)e[t].swiperSlideOffset=this.isHorizontal()?e[t].offsetLeft:e[t].offsetTop},updateSlidesProgress:function(e){void 0===e&&(e=this&&this.translate||0);var t=this,n=t.params,i=t.slides,a=t.rtlTranslate;if(0!==i.length){void 0===i[0].swiperSlideOffset&&t.updateSlidesOffset();var r=-e;a&&(r=e),i.removeClass(n.slideVisibleClass),t.visibleSlidesIndexes=[],t.visibleSlides=[];for(var o=0;o<i.length;o+=1){var s=i[o],l=(r+(n.centeredSlides?t.minTranslate():0)-s.swiperSlideOffset)/(s.swiperSlideSize+n.spaceBetween);if(n.watchSlidesVisibility||n.centeredSlides&&n.autoHeight){var u=-(r-s.swiperSlideOffset),c=u+t.slidesSizesGrid[o];(u>=0&&u<t.size-1||c>1&&c<=t.size||u<=0&&c>=t.size)&&(t.visibleSlides.push(s),t.visibleSlidesIndexes.push(o),i.eq(o).addClass(n.slideVisibleClass))}s.progress=a?-l:l}t.visibleSlides=m(t.visibleSlides)}},updateProgress:function(e){var t=this;if(void 0===e){var n=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*n||0}var i=t.params,a=t.maxTranslate()-t.minTranslate(),r=t.progress,o=t.isBeginning,s=t.isEnd,l=o,u=s;0===a?(r=0,o=!0,s=!0):(o=(r=(e-t.minTranslate())/a)<=0,s=r>=1),C(t,{progress:r,isBeginning:o,isEnd:s}),(i.watchSlidesProgress||i.watchSlidesVisibility||i.centeredSlides&&i.autoHeight)&&t.updateSlidesProgress(e),o&&!l&&t.emit("reachBeginning toEdge"),s&&!u&&t.emit("reachEnd toEdge"),(l&&!o||u&&!s)&&t.emit("fromEdge"),t.emit("progress",r)},updateSlidesClasses:function(){var e,t=this,n=t.slides,i=t.params,a=t.$wrapperEl,r=t.activeIndex,o=t.realIndex,s=t.virtual&&i.virtual.enabled;n.removeClass(i.slideActiveClass+" "+i.slideNextClass+" "+i.slidePrevClass+" "+i.slideDuplicateActiveClass+" "+i.slideDuplicateNextClass+" "+i.slideDuplicatePrevClass),(e=s?t.$wrapperEl.find("."+i.slideClass+'[data-swiper-slide-index="'+r+'"]'):n.eq(r)).addClass(i.slideActiveClass),i.loop&&(e.hasClass(i.slideDuplicateClass)?a.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+o+'"]').addClass(i.slideDuplicateActiveClass):a.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+o+'"]').addClass(i.slideDuplicateActiveClass));var l=e.nextAll("."+i.slideClass).eq(0).addClass(i.slideNextClass);i.loop&&0===l.length&&(l=n.eq(0)).addClass(i.slideNextClass);var u=e.prevAll("."+i.slideClass).eq(0).addClass(i.slidePrevClass);i.loop&&0===u.length&&(u=n.eq(-1)).addClass(i.slidePrevClass),i.loop&&(l.hasClass(i.slideDuplicateClass)?a.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass):a.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass),u.hasClass(i.slideDuplicateClass)?a.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+u.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass):a.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+u.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass)),t.emitSlidesClasses()},updateActiveIndex:function(e){var t,n=this,i=n.rtlTranslate?n.translate:-n.translate,a=n.slidesGrid,r=n.snapGrid,o=n.params,s=n.activeIndex,l=n.realIndex,u=n.snapIndex,c=e;if(void 0===c){for(var h=0;h<a.length;h+=1)void 0!==a[h+1]?i>=a[h]&&i<a[h+1]-(a[h+1]-a[h])/2?c=h:i>=a[h]&&i<a[h+1]&&(c=h+1):i>=a[h]&&(c=h);o.normalizeSlideIndex&&(c<0||void 0===c)&&(c=0)}if(r.indexOf(i)>=0)t=r.indexOf(i);else{var d=Math.min(o.slidesPerGroupSkip,c);t=d+Math.floor((c-d)/o.slidesPerGroup)}if(t>=r.length&&(t=r.length-1),c!==s){var p=parseInt(n.slides.eq(c).attr("data-swiper-slide-index")||c,10);C(n,{snapIndex:t,realIndex:p,previousIndex:s,activeIndex:c}),n.emit("activeIndexChange"),n.emit("snapIndexChange"),l!==p&&n.emit("realIndexChange"),(n.initialized||n.params.runCallbacksOnInit)&&n.emit("slideChange")}else t!==u&&(n.snapIndex=t,n.emit("snapIndexChange"))},updateClickedSlide:function(e){var t,n=this,i=n.params,a=m(e.target).closest("."+i.slideClass)[0],r=!1;if(a)for(var o=0;o<n.slides.length;o+=1)if(n.slides[o]===a){r=!0,t=o;break}if(!a||!r)return n.clickedSlide=void 0,void(n.clickedIndex=void 0);n.clickedSlide=a,n.virtual&&n.params.virtual.enabled?n.clickedIndex=parseInt(m(a).attr("data-swiper-slide-index"),10):n.clickedIndex=t,i.slideToClickedSlide&&void 0!==n.clickedIndex&&n.clickedIndex!==n.activeIndex&&n.slideToClickedSlide()}},translate:{getTranslate:function(e){void 0===e&&(e=this.isHorizontal()?"x":"y");var t=this,n=t.params,i=t.rtlTranslate,a=t.translate,r=t.$wrapperEl;if(n.virtualTranslate)return i?-a:a;if(n.cssMode)return a;var o=S(r[0],e);return i&&(o=-o),o||0},setTranslate:function(e,t){var n=this,i=n.rtlTranslate,a=n.params,r=n.$wrapperEl,o=n.wrapperEl,s=n.progress,l=0,u=0;n.isHorizontal()?l=i?-e:e:u=e,a.roundLengths&&(l=Math.floor(l),u=Math.floor(u)),a.cssMode?o[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-l:-u:a.virtualTranslate||r.transform("translate3d("+l+"px, "+u+"px, 0px)"),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?l:u;var c=n.maxTranslate()-n.minTranslate();(0===c?0:(e-n.minTranslate())/c)!==s&&n.updateProgress(e),n.emit("setTranslate",n.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e,t,n,i,a){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===n&&(n=!0),void 0===i&&(i=!0);var r=this,o=r.params,s=r.wrapperEl;if(r.animating&&o.preventInteractionOnTransition)return!1;var l,u=r.minTranslate(),c=r.maxTranslate();if(l=i&&e>u?u:i&&e<c?c:e,r.updateProgress(l),o.cssMode){var h,d=r.isHorizontal();return 0===t?s[d?"scrollLeft":"scrollTop"]=-l:s.scrollTo?s.scrollTo(((h={})[d?"left":"top"]=-l,h.behavior="smooth",h)):s[d?"scrollLeft":"scrollTop"]=-l,!0}return 0===t?(r.setTransition(0),r.setTranslate(l),n&&(r.emit("beforeTransitionStart",t,a),r.emit("transitionEnd"))):(r.setTransition(t),r.setTranslate(l),n&&(r.emit("beforeTransitionStart",t,a),r.emit("transitionStart")),r.animating||(r.animating=!0,r.onTranslateToWrapperTransitionEnd||(r.onTranslateToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.$wrapperEl[0].removeEventListener("transitionend",r.onTranslateToWrapperTransitionEnd),r.$wrapperEl[0].removeEventListener("webkitTransitionEnd",r.onTranslateToWrapperTransitionEnd),r.onTranslateToWrapperTransitionEnd=null,delete r.onTranslateToWrapperTransitionEnd,n&&r.emit("transitionEnd"))}),r.$wrapperEl[0].addEventListener("transitionend",r.onTranslateToWrapperTransitionEnd),r.$wrapperEl[0].addEventListener("webkitTransitionEnd",r.onTranslateToWrapperTransitionEnd))),!0}},transition:{setTransition:function(e,t){var n=this;n.params.cssMode||n.$wrapperEl.transition(e),n.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&&(e=!0);var n=this,i=n.activeIndex,a=n.params,r=n.previousIndex;if(!a.cssMode){a.autoHeight&&n.updateAutoHeight();var o=t;if(o||(o=i>r?"next":i<r?"prev":"reset"),n.emit("transitionStart"),e&&i!==r){if("reset"===o)return void n.emit("slideResetTransitionStart");n.emit("slideChangeTransitionStart"),"next"===o?n.emit("slideNextTransitionStart"):n.emit("slidePrevTransitionStart")}}},transitionEnd:function(e,t){void 0===e&&(e=!0);var n=this,i=n.activeIndex,a=n.previousIndex,r=n.params;if(n.animating=!1,!r.cssMode){n.setTransition(0);var o=t;if(o||(o=i>a?"next":i<a?"prev":"reset"),n.emit("transitionEnd"),e&&i!==a){if("reset"===o)return void n.emit("slideResetTransitionEnd");n.emit("slideChangeTransitionEnd"),"next"===o?n.emit("slideNextTransitionEnd"):n.emit("slidePrevTransitionEnd")}}}},slide:{slideTo:function(e,t,n,i,a){if(void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===n&&(n=!0),"number"!=typeof e&&"string"!=typeof e)throw new Error("The 'index' argument cannot have type other than 'number' or 'string'. ["+typeof e+"] given.");if("string"==typeof e){var r=parseInt(e,10);if(!isFinite(r))throw new Error("The passed-in 'index' (string) couldn't be converted to 'number'. ["+e+"] given.");e=r}var o=this,s=e;s<0&&(s=0);var l=o.params,u=o.snapGrid,c=o.slidesGrid,h=o.previousIndex,d=o.activeIndex,p=o.rtlTranslate,f=o.wrapperEl,g=o.enabled;if(o.animating&&l.preventInteractionOnTransition||!g&&!i&&!a)return!1;var m=Math.min(o.params.slidesPerGroupSkip,s),v=m+Math.floor((s-m)/o.params.slidesPerGroup);v>=u.length&&(v=u.length-1),(d||l.initialSlide||0)===(h||0)&&n&&o.emit("beforeSlideChangeStart");var y,x=-u[v];if(o.updateProgress(x),l.normalizeSlideIndex)for(var _=0;_<c.length;_+=1){var b=-Math.floor(100*x),w=Math.floor(100*c[_]),S=Math.floor(100*c[_+1]);void 0!==c[_+1]?b>=w&&b<S-(S-w)/2?s=_:b>=w&&b<S&&(s=_+1):b>=w&&(s=_)}if(o.initialized&&s!==d){if(!o.allowSlideNext&&x<o.translate&&x<o.minTranslate())return!1;if(!o.allowSlidePrev&&x>o.translate&&x>o.maxTranslate()&&(d||0)!==s)return!1}if(y=s>d?"next":s<d?"prev":"reset",p&&-x===o.translate||!p&&x===o.translate)return o.updateActiveIndex(s),l.autoHeight&&o.updateAutoHeight(),o.updateSlidesClasses(),"slide"!==l.effect&&o.setTranslate(x),"reset"!==y&&(o.transitionStart(n,y),o.transitionEnd(n,y)),!1;if(l.cssMode){var M,T=o.isHorizontal(),C=-x;return p&&(C=f.scrollWidth-f.offsetWidth-C),0===t?f[T?"scrollLeft":"scrollTop"]=C:f.scrollTo?f.scrollTo(((M={})[T?"left":"top"]=C,M.behavior="smooth",M)):f[T?"scrollLeft":"scrollTop"]=C,!0}return 0===t?(o.setTransition(0),o.setTranslate(x),o.updateActiveIndex(s),o.updateSlidesClasses(),o.emit("beforeTransitionStart",t,i),o.transitionStart(n,y),o.transitionEnd(n,y)):(o.setTransition(t),o.setTranslate(x),o.updateActiveIndex(s),o.updateSlidesClasses(),o.emit("beforeTransitionStart",t,i),o.transitionStart(n,y),o.animating||(o.animating=!0,o.onSlideToWrapperTransitionEnd||(o.onSlideToWrapperTransitionEnd=function(e){o&&!o.destroyed&&e.target===this&&(o.$wrapperEl[0].removeEventListener("transitionend",o.onSlideToWrapperTransitionEnd),o.$wrapperEl[0].removeEventListener("webkitTransitionEnd",o.onSlideToWrapperTransitionEnd),o.onSlideToWrapperTransitionEnd=null,delete o.onSlideToWrapperTransitionEnd,o.transitionEnd(n,y))}),o.$wrapperEl[0].addEventListener("transitionend",o.onSlideToWrapperTransitionEnd),o.$wrapperEl[0].addEventListener("webkitTransitionEnd",o.onSlideToWrapperTransitionEnd))),!0},slideToLoop:function(e,t,n,i){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===n&&(n=!0);var a=this,r=e;return a.params.loop&&(r+=a.loopedSlides),a.slideTo(r,t,n,i)},slideNext:function(e,t,n){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var i=this,a=i.params,r=i.animating;if(!i.enabled)return i;var o=i.activeIndex<a.slidesPerGroupSkip?1:a.slidesPerGroup;if(a.loop){if(r&&a.loopPreventsSlide)return!1;i.loopFix(),i._clientLeft=i.$wrapperEl[0].clientLeft}return i.slideTo(i.activeIndex+o,e,t,n)},slidePrev:function(e,t,n){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var i=this,a=i.params,r=i.animating,o=i.snapGrid,s=i.slidesGrid,l=i.rtlTranslate;if(!i.enabled)return i;if(a.loop){if(r&&a.loopPreventsSlide)return!1;i.loopFix(),i._clientLeft=i.$wrapperEl[0].clientLeft}function u(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}var c,h=u(l?i.translate:-i.translate),d=o.map((function(e){return u(e)})),p=o[d.indexOf(h)-1];return void 0===p&&a.cssMode&&o.forEach((function(e){!p&&h>=e&&(p=e)})),void 0!==p&&(c=s.indexOf(p))<0&&(c=i.activeIndex-1),i.slideTo(c,e,t,n)},slideReset:function(e,t,n){return void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),this.slideTo(this.activeIndex,e,t,n)},slideToClosest:function(e,t,n,i){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),void 0===i&&(i=.5);var a=this,r=a.activeIndex,o=Math.min(a.params.slidesPerGroupSkip,r),s=o+Math.floor((r-o)/a.params.slidesPerGroup),l=a.rtlTranslate?a.translate:-a.translate;if(l>=a.snapGrid[s]){var u=a.snapGrid[s];l-u>(a.snapGrid[s+1]-u)*i&&(r+=a.params.slidesPerGroup)}else{var c=a.snapGrid[s-1];l-c<=(a.snapGrid[s]-c)*i&&(r-=a.params.slidesPerGroup)}return r=Math.max(r,0),r=Math.min(r,a.slidesGrid.length-1),a.slideTo(r,e,t,n)},slideToClickedSlide:function(){var e,t=this,n=t.params,i=t.$wrapperEl,a="auto"===n.slidesPerView?t.slidesPerViewDynamic():n.slidesPerView,r=t.clickedIndex;if(n.loop){if(t.animating)return;e=parseInt(m(t.clickedSlide).attr("data-swiper-slide-index"),10),n.centeredSlides?r<t.loopedSlides-a/2||r>t.slides.length-t.loopedSlides+a/2?(t.loopFix(),r=i.children("."+n.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+n.slideDuplicateClass+")").eq(0).index(),b((function(){t.slideTo(r)}))):t.slideTo(r):r>t.slides.length-a?(t.loopFix(),r=i.children("."+n.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+n.slideDuplicateClass+")").eq(0).index(),b((function(){t.slideTo(r)}))):t.slideTo(r)}else t.slideTo(r)}},loop:{loopCreate:function(){var e=this,t=r(),n=e.params,i=e.$wrapperEl;i.children("."+n.slideClass+"."+n.slideDuplicateClass).remove();var a=i.children("."+n.slideClass);if(n.loopFillGroupWithBlank){var o=n.slidesPerGroup-a.length%n.slidesPerGroup;if(o!==n.slidesPerGroup){for(var s=0;s<o;s+=1){var l=m(t.createElement("div")).addClass(n.slideClass+" "+n.slideBlankClass);i.append(l)}a=i.children("."+n.slideClass)}}"auto"!==n.slidesPerView||n.loopedSlides||(n.loopedSlides=a.length),e.loopedSlides=Math.ceil(parseFloat(n.loopedSlides||n.slidesPerView,10)),e.loopedSlides+=n.loopAdditionalSlides,e.loopedSlides>a.length&&(e.loopedSlides=a.length);var u=[],c=[];a.each((function(t,n){var i=m(t);n<e.loopedSlides&&c.push(t),n<a.length&&n>=a.length-e.loopedSlides&&u.push(t),i.attr("data-swiper-slide-index",n)}));for(var h=0;h<c.length;h+=1)i.append(m(c[h].cloneNode(!0)).addClass(n.slideDuplicateClass));for(var d=u.length-1;d>=0;d-=1)i.prepend(m(u[d].cloneNode(!0)).addClass(n.slideDuplicateClass))},loopFix:function(){var e=this;e.emit("beforeLoopFix");var t,n=e.activeIndex,i=e.slides,a=e.loopedSlides,r=e.allowSlidePrev,o=e.allowSlideNext,s=e.snapGrid,l=e.rtlTranslate;e.allowSlidePrev=!0,e.allowSlideNext=!0;var u=-s[n]-e.getTranslate();n<a?(t=i.length-3*a+n,t+=a,e.slideTo(t,0,!1,!0)&&0!==u&&e.setTranslate((l?-e.translate:e.translate)-u)):n>=i.length-a&&(t=-i.length+n+a,t+=a,e.slideTo(t,0,!1,!0)&&0!==u&&e.setTranslate((l?-e.translate:e.translate)-u)),e.allowSlidePrev=r,e.allowSlideNext=o,e.emit("loopFix")},loopDestroy:function(){var e=this,t=e.$wrapperEl,n=e.params,i=e.slides;t.children("."+n.slideClass+"."+n.slideDuplicateClass+",."+n.slideClass+"."+n.slideBlankClass).remove(),i.removeAttr("data-swiper-slide-index")}},grabCursor:{setGrabCursor:function(e){var t=this;if(!(t.support.touch||!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)){var n=t.el;n.style.cursor="move",n.style.cursor=e?"-webkit-grabbing":"-webkit-grab",n.style.cursor=e?"-moz-grabbin":"-moz-grab",n.style.cursor=e?"grabbing":"grab"}},unsetGrabCursor:function(){var e=this;e.support.touch||e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.el.style.cursor="")}},manipulation:{appendSlide:function(e){var t=this,n=t.$wrapperEl,i=t.params;if(i.loop&&t.loopDestroy(),"object"==typeof e&&"length"in e)for(var a=0;a<e.length;a+=1)e[a]&&n.append(e[a]);else n.append(e);i.loop&&t.loopCreate(),i.observer&&t.support.observer||t.update()},prependSlide:function(e){var t=this,n=t.params,i=t.$wrapperEl,a=t.activeIndex;n.loop&&t.loopDestroy();var r=a+1;if("object"==typeof e&&"length"in e){for(var o=0;o<e.length;o+=1)e[o]&&i.prepend(e[o]);r=a+e.length}else i.prepend(e);n.loop&&t.loopCreate(),n.observer&&t.support.observer||t.update(),t.slideTo(r,0,!1)},addSlide:function(e,t){var n=this,i=n.$wrapperEl,a=n.params,r=n.activeIndex;a.loop&&(r-=n.loopedSlides,n.loopDestroy(),n.slides=i.children("."+a.slideClass));var o=n.slides.length;if(e<=0)n.prependSlide(t);else if(e>=o)n.appendSlide(t);else{for(var s=r>e?r+1:r,l=[],u=o-1;u>=e;u-=1){var c=n.slides.eq(u);c.remove(),l.unshift(c)}if("object"==typeof t&&"length"in t){for(var h=0;h<t.length;h+=1)t[h]&&i.append(t[h]);s=r>e?r+t.length:r}else i.append(t);for(var d=0;d<l.length;d+=1)i.append(l[d]);a.loop&&n.loopCreate(),a.observer&&n.support.observer||n.update(),a.loop?n.slideTo(s+n.loopedSlides,0,!1):n.slideTo(s,0,!1)}},removeSlide:function(e){var t=this,n=t.params,i=t.$wrapperEl,a=t.activeIndex;n.loop&&(a-=t.loopedSlides,t.loopDestroy(),t.slides=i.children("."+n.slideClass));var r,o=a;if("object"==typeof e&&"length"in e){for(var s=0;s<e.length;s+=1)r=e[s],t.slides[r]&&t.slides.eq(r).remove(),r<o&&(o-=1);o=Math.max(o,0)}else r=e,t.slides[r]&&t.slides.eq(r).remove(),r<o&&(o-=1),o=Math.max(o,0);n.loop&&t.loopCreate(),n.observer&&t.support.observer||t.update(),n.loop?t.slideTo(o+t.loopedSlides,0,!1):t.slideTo(o,0,!1)},removeAllSlides:function(){for(var e=[],t=0;t<this.slides.length;t+=1)e.push(t);this.removeSlide(e)}},events:{attachEvents:function(){var e=this,t=r(),n=e.params,i=e.touchEvents,a=e.el,o=e.wrapperEl,s=e.device,l=e.support;e.onTouchStart=N.bind(e),e.onTouchMove=R.bind(e),e.onTouchEnd=B.bind(e),n.cssMode&&(e.onScroll=W.bind(e)),e.onClick=G.bind(e);var u=!!n.nested;if(!l.touch&&l.pointerEvents)a.addEventListener(i.start,e.onTouchStart,!1),t.addEventListener(i.move,e.onTouchMove,u),t.addEventListener(i.end,e.onTouchEnd,!1);else{if(l.touch){var c=!("touchstart"!==i.start||!l.passiveListener||!n.passiveListeners)&&{passive:!0,capture:!1};a.addEventListener(i.start,e.onTouchStart,c),a.addEventListener(i.move,e.onTouchMove,l.passiveListener?{passive:!1,capture:u}:u),a.addEventListener(i.end,e.onTouchEnd,c),i.cancel&&a.addEventListener(i.cancel,e.onTouchEnd,c),H||(t.addEventListener("touchstart",F),H=!0)}(n.simulateTouch&&!s.ios&&!s.android||n.simulateTouch&&!l.touch&&s.ios)&&(a.addEventListener("mousedown",e.onTouchStart,!1),t.addEventListener("mousemove",e.onTouchMove,u),t.addEventListener("mouseup",e.onTouchEnd,!1))}(n.preventClicks||n.preventClicksPropagation)&&a.addEventListener("click",e.onClick,!0),n.cssMode&&o.addEventListener("scroll",e.onScroll),n.updateOnWindowResize?e.on(s.ios||s.android?"resize orientationchange observerUpdate":"resize observerUpdate",V,!0):e.on("observerUpdate",V,!0)},detachEvents:function(){var e=this,t=r(),n=e.params,i=e.touchEvents,a=e.el,o=e.wrapperEl,s=e.device,l=e.support,u=!!n.nested;if(!l.touch&&l.pointerEvents)a.removeEventListener(i.start,e.onTouchStart,!1),t.removeEventListener(i.move,e.onTouchMove,u),t.removeEventListener(i.end,e.onTouchEnd,!1);else{if(l.touch){var c=!("onTouchStart"!==i.start||!l.passiveListener||!n.passiveListeners)&&{passive:!0,capture:!1};a.removeEventListener(i.start,e.onTouchStart,c),a.removeEventListener(i.move,e.onTouchMove,u),a.removeEventListener(i.end,e.onTouchEnd,c),i.cancel&&a.removeEventListener(i.cancel,e.onTouchEnd,c)}(n.simulateTouch&&!s.ios&&!s.android||n.simulateTouch&&!l.touch&&s.ios)&&(a.removeEventListener("mousedown",e.onTouchStart,!1),t.removeEventListener("mousemove",e.onTouchMove,u),t.removeEventListener("mouseup",e.onTouchEnd,!1))}(n.preventClicks||n.preventClicksPropagation)&&a.removeEventListener("click",e.onClick,!0),n.cssMode&&o.removeEventListener("scroll",e.onScroll),e.off(s.ios||s.android?"resize orientationchange observerUpdate":"resize observerUpdate",V)}},breakpoints:{setBreakpoint:function(){var e=this,t=e.activeIndex,n=e.initialized,i=e.loopedSlides,a=void 0===i?0:i,r=e.params,o=e.$el,s=r.breakpoints;if(s&&(!s||0!==Object.keys(s).length)){var l=e.getBreakpoint(s,e.params.breakpointsBase,e.el);if(l&&e.currentBreakpoint!==l){var u=l in s?s[l]:void 0;u&&["slidesPerView","spaceBetween","slidesPerGroup","slidesPerGroupSkip","slidesPerColumn"].forEach((function(e){var t=u[e];void 0!==t&&(u[e]="slidesPerView"!==e||"AUTO"!==t&&"auto"!==t?"slidesPerView"===e?parseFloat(t):parseInt(t,10):"auto")}));var c=u||e.originalParams,h=r.slidesPerColumn>1,d=c.slidesPerColumn>1,p=r.enabled;h&&!d?(o.removeClass(r.containerModifierClass+"multirow "+r.containerModifierClass+"multirow-column"),e.emitContainerClasses()):!h&&d&&(o.addClass(r.containerModifierClass+"multirow"),(c.slidesPerColumnFill&&"column"===c.slidesPerColumnFill||!c.slidesPerColumnFill&&"column"===r.slidesPerColumnFill)&&o.addClass(r.containerModifierClass+"multirow-column"),e.emitContainerClasses());var f=c.direction&&c.direction!==r.direction,g=r.loop&&(c.slidesPerView!==r.slidesPerView||f);f&&n&&e.changeDirection(),C(e.params,c);var m=e.params.enabled;C(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),p&&!m?e.disable():!p&&m&&e.enable(),e.currentBreakpoint=l,e.emit("_beforeBreakpoint",c),g&&n&&(e.loopDestroy(),e.loopCreate(),e.updateSlides(),e.slideTo(t-a+e.loopedSlides,0,!1)),e.emit("breakpoint",c)}}},getBreakpoint:function(e,t,n){if(void 0===t&&(t="window"),e&&("container"!==t||n)){var i=!1,a=s(),r="window"===t?a.innerHeight:n.clientHeight,o=Object.keys(e).map((function(e){if("string"==typeof e&&0===e.indexOf("@")){var t=parseFloat(e.substr(1));return{value:r*t,point:e}}return{value:e,point:e}}));o.sort((function(e,t){return parseInt(e.value,10)-parseInt(t.value,10)}));for(var l=0;l<o.length;l+=1){var u=o[l],c=u.point,h=u.value;"window"===t?a.matchMedia("(min-width: "+h+"px)").matches&&(i=c):h<=n.clientWidth&&(i=c)}return i||"max"}}},checkOverflow:{checkOverflow:function(){var e=this,t=e.params,n=e.isLocked,i=e.slides.length>0&&t.slidesOffsetBefore+t.spaceBetween*(e.slides.length-1)+e.slides[0].offsetWidth*e.slides.length;t.slidesOffsetBefore&&t.slidesOffsetAfter&&i?e.isLocked=i<=e.size:e.isLocked=1===e.snapGrid.length,e.allowSlideNext=!e.isLocked,e.allowSlidePrev=!e.isLocked,n!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock"),n&&n!==e.isLocked&&(e.isEnd=!1,e.navigation&&e.navigation.update())}},classes:{addClasses:function(){var e,t,n,i=this,a=i.classNames,r=i.params,o=i.rtl,s=i.$el,l=i.device,u=i.support,c=(e=["initialized",r.direction,{"pointer-events":u.pointerEvents&&!u.touch},{"free-mode":r.freeMode},{autoheight:r.autoHeight},{rtl:o},{multirow:r.slidesPerColumn>1},{"multirow-column":r.slidesPerColumn>1&&"column"===r.slidesPerColumnFill},{android:l.android},{ios:l.ios},{"css-mode":r.cssMode}],t=r.containerModifierClass,n=[],e.forEach((function(e){"object"==typeof e?Object.keys(e).forEach((function(i){e[i]&&n.push(t+i)})):"string"==typeof e&&n.push(t+e)})),n);a.push.apply(a,c),s.addClass([].concat(a).join(" ")),i.emitContainerClasses()},removeClasses:function(){var e=this,t=e.$el,n=e.classNames;t.removeClass(n.join(" ")),e.emitContainerClasses()}},images:{loadImage:function(e,t,n,i,a,r){var o,l=s();function u(){r&&r()}m(e).parent("picture")[0]||e.complete&&a?u():t?((o=new l.Image).onload=u,o.onerror=u,i&&(o.sizes=i),n&&(o.srcset=n),t&&(o.src=t)):u()},preloadImages:function(){var e=this;function t(){null!=e&&e&&!e.destroyed&&(void 0!==e.imagesLoaded&&(e.imagesLoaded+=1),e.imagesLoaded===e.imagesToLoad.length&&(e.params.updateOnImagesReady&&e.update(),e.emit("imagesReady")))}e.imagesToLoad=e.$el.find("img");for(var n=0;n<e.imagesToLoad.length;n+=1){var i=e.imagesToLoad[n];e.loadImage(i,i.currentSrc||i.getAttribute("src"),i.srcset||i.getAttribute("srcset"),i.sizes||i.getAttribute("sizes"),!0,t)}}}},Y={},U=function(){function t(){for(var e,n,i=arguments.length,a=new Array(i),r=0;r<i;r++)a[r]=arguments[r];if(1===a.length&&a[0].constructor&&"Object"===Object.prototype.toString.call(a[0]).slice(8,-1)?n=a[0]:(e=a[0],n=a[1]),n||(n={}),n=C({},n),e&&!n.el&&(n.el=e),n.el&&m(n.el).length>1){var o=[];return m(n.el).each((function(e){var i=C({},n,{el:e});o.push(new t(i))})),o}var s=this;s.__swiper__=!0,s.support=k(),s.device=L({userAgent:n.userAgent}),s.browser=E(),s.eventsListeners={},s.eventsAnyListeners=[],void 0===s.modules&&(s.modules={}),Object.keys(s.modules).forEach((function(e){var t=s.modules[e];if(t.params){var i=Object.keys(t.params)[0],a=t.params[i];if("object"!=typeof a||null===a)return;if(["navigation","pagination","scrollbar"].indexOf(i)>=0&&!0===n[i]&&(n[i]={auto:!0}),!(i in n)||!("enabled"in a))return;!0===n[i]&&(n[i]={enabled:!0}),"object"!=typeof n[i]||"enabled"in n[i]||(n[i].enabled=!0),n[i]||(n[i]={enabled:!1})}}));var l,u,c=C({},$);return s.useParams(c),s.params=C({},c,Y,n),s.originalParams=C({},s.params),s.passedParams=C({},n),s.params&&s.params.on&&Object.keys(s.params.on).forEach((function(e){s.on(e,s.params.on[e])})),s.params&&s.params.onAny&&s.onAny(s.params.onAny),s.$=m,C(s,{enabled:s.params.enabled,el:e,classNames:[],slides:m(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:function(){return"horizontal"===s.params.direction},isVertical:function(){return"vertical"===s.params.direction},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:s.params.allowSlideNext,allowSlidePrev:s.params.allowSlidePrev,touchEvents:(l=["touchstart","touchmove","touchend","touchcancel"],u=["mousedown","mousemove","mouseup"],s.support.pointerEvents&&(u=["pointerdown","pointermove","pointerup"]),s.touchEventsTouch={start:l[0],move:l[1],end:l[2],cancel:l[3]},s.touchEventsDesktop={start:u[0],move:u[1],end:u[2]},s.support.touch||!s.params.simulateTouch?s.touchEventsTouch:s.touchEventsDesktop),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:s.params.focusableElements,lastClickTime:w(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:s.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),s.useModules(),s.emit("_swiper"),s.params.init&&s.init(),s}var n,i,a=t.prototype;return a.enable=function(){var e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))},a.disable=function(){var e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))},a.setProgress=function(e,t){var n=this;e=Math.min(Math.max(e,0),1);var i=n.minTranslate(),a=(n.maxTranslate()-i)*e+i;n.translateTo(a,void 0===t?0:t),n.updateActiveIndex(),n.updateSlidesClasses()},a.emitContainerClasses=function(){var e=this;if(e.params._emitClasses&&e.el){var t=e.el.className.split(" ").filter((function(t){return 0===t.indexOf("swiper-container")||0===t.indexOf(e.params.containerModifierClass)}));e.emit("_containerClasses",t.join(" "))}},a.getSlideClasses=function(e){var t=this;return e.className.split(" ").filter((function(e){return 0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass)})).join(" ")},a.emitSlidesClasses=function(){var e=this;if(e.params._emitClasses&&e.el){var t=[];e.slides.each((function(n){var i=e.getSlideClasses(n);t.push({slideEl:n,classNames:i}),e.emit("_slideClass",n,i)})),e.emit("_slideClasses",t)}},a.slidesPerViewDynamic=function(){var e=this,t=e.params,n=e.slides,i=e.slidesGrid,a=e.size,r=e.activeIndex,o=1;if(t.centeredSlides){for(var s,l=n[r].swiperSlideSize,u=r+1;u<n.length;u+=1)n[u]&&!s&&(o+=1,(l+=n[u].swiperSlideSize)>a&&(s=!0));for(var c=r-1;c>=0;c-=1)n[c]&&!s&&(o+=1,(l+=n[c].swiperSlideSize)>a&&(s=!0))}else for(var h=r+1;h<n.length;h+=1)i[h]-i[r]<a&&(o+=1);return o},a.update=function(){var e=this;if(e&&!e.destroyed){var t=e.snapGrid,n=e.params;n.breakpoints&&e.setBreakpoint(),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.params.freeMode?(i(),e.params.autoHeight&&e.updateAutoHeight()):(("auto"===e.params.slidesPerView||e.params.slidesPerView>1)&&e.isEnd&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0))||i(),n.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}function i(){var t=e.rtlTranslate?-1*e.translate:e.translate,n=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(n),e.updateActiveIndex(),e.updateSlidesClasses()}},a.changeDirection=function(e,t){void 0===t&&(t=!0);var n=this,i=n.params.direction;return e||(e="horizontal"===i?"vertical":"horizontal"),e===i||"horizontal"!==e&&"vertical"!==e||(n.$el.removeClass(""+n.params.containerModifierClass+i).addClass(""+n.params.containerModifierClass+e),n.emitContainerClasses(),n.params.direction=e,n.slides.each((function(t){"vertical"===e?t.style.width="":t.style.height=""})),n.emit("changeDirection"),t&&n.update()),n},a.mount=function(e){var t=this;if(t.mounted)return!0;var n=m(e||t.params.el);if(!(e=n[0]))return!1;e.swiper=t;var i=function(){return"."+(t.params.wrapperClass||"").trim().split(" ").join(".")},a=function(){if(e&&e.shadowRoot&&e.shadowRoot.querySelector){var t=m(e.shadowRoot.querySelector(i()));return t.children=function(e){return n.children(e)},t}return n.children(i())}();if(0===a.length&&t.params.createElements){var o=r().createElement("div");a=m(o),o.className=t.params.wrapperClass,n.append(o),n.children("."+t.params.slideClass).each((function(e){a.append(e)}))}return C(t,{$el:n,el:e,$wrapperEl:a,wrapperEl:a[0],mounted:!0,rtl:"rtl"===e.dir.toLowerCase()||"rtl"===n.css("direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===e.dir.toLowerCase()||"rtl"===n.css("direction")),wrongRTL:"-webkit-box"===a.css("display")}),!0},a.init=function(e){var t=this;return t.initialized||!1===t.mount(e)||(t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.params.loop&&t.loopCreate(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.preloadImages&&t.preloadImages(),t.params.loop?t.slideTo(t.params.initialSlide+t.loopedSlides,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.attachEvents(),t.initialized=!0,t.emit("init"),t.emit("afterInit")),t},a.destroy=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);var n,i=this,a=i.params,r=i.$el,o=i.$wrapperEl,s=i.slides;return void 0===i.params||i.destroyed||(i.emit("beforeDestroy"),i.initialized=!1,i.detachEvents(),a.loop&&i.loopDestroy(),t&&(i.removeClasses(),r.removeAttr("style"),o.removeAttr("style"),s&&s.length&&s.removeClass([a.slideVisibleClass,a.slideActiveClass,a.slideNextClass,a.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),i.emit("destroy"),Object.keys(i.eventsListeners).forEach((function(e){i.off(e)})),!1!==e&&(i.$el[0].swiper=null,n=i,Object.keys(n).forEach((function(e){try{n[e]=null}catch(e){}try{delete n[e]}catch(e){}}))),i.destroyed=!0),null},t.extendDefaults=function(e){C(Y,e)},t.installModule=function(e){t.prototype.modules||(t.prototype.modules={});var n=e.name||Object.keys(t.prototype.modules).length+"_"+w();t.prototype.modules[n]=e},t.use=function(e){return Array.isArray(e)?(e.forEach((function(e){return t.installModule(e)})),t):(t.installModule(e),t)},n=t,i=[{key:"extendedDefaults",get:function(){return Y}},{key:"defaults",get:function(){return $}}],null&&e(n.prototype,null),i&&e(n,i),t}();Object.keys(X).forEach((function(e){Object.keys(X[e]).forEach((function(t){U.prototype[t]=X[e][t]}))})),U.use([P,O]);var j={update:function(e){var t=this,n=t.params,i=n.slidesPerView,a=n.slidesPerGroup,r=n.centeredSlides,o=t.params.virtual,s=o.addSlidesBefore,l=o.addSlidesAfter,u=t.virtual,c=u.from,h=u.to,d=u.slides,p=u.slidesGrid,f=u.renderSlide,g=u.offset;t.updateActiveIndex();var m,v,y,x=t.activeIndex||0;m=t.rtlTranslate?"right":t.isHorizontal()?"left":"top",r?(v=Math.floor(i/2)+a+l,y=Math.floor(i/2)+a+s):(v=i+(a-1)+l,y=a+s);var _=Math.max((x||0)-y,0),b=Math.min((x||0)+v,d.length-1),w=(t.slidesGrid[_]||0)-(t.slidesGrid[0]||0);function S(){t.updateSlides(),t.updateProgress(),t.updateSlidesClasses(),t.lazy&&t.params.lazy.enabled&&t.lazy.load()}if(C(t.virtual,{from:_,to:b,offset:w,slidesGrid:t.slidesGrid}),c===_&&h===b&&!e)return t.slidesGrid!==p&&w!==g&&t.slides.css(m,w+"px"),void t.updateProgress();if(t.params.virtual.renderExternal)return t.params.virtual.renderExternal.call(t,{offset:w,from:_,to:b,slides:function(){for(var e=[],t=_;t<=b;t+=1)e.push(d[t]);return e}()}),void(t.params.virtual.renderExternalUpdate&&S());var M=[],T=[];if(e)t.$wrapperEl.find("."+t.params.slideClass).remove();else for(var I=c;I<=h;I+=1)(I<_||I>b)&&t.$wrapperEl.find("."+t.params.slideClass+'[data-swiper-slide-index="'+I+'"]').remove();for(var A=0;A<d.length;A+=1)A>=_&&A<=b&&(void 0===h||e?T.push(A):(A>h&&T.push(A),A<c&&M.push(A)));T.forEach((function(e){t.$wrapperEl.append(f(d[e],e))})),M.sort((function(e,t){return t-e})).forEach((function(e){t.$wrapperEl.prepend(f(d[e],e))})),t.$wrapperEl.children(".swiper-slide").css(m,w+"px"),S()},renderSlide:function(e,t){var n=this,i=n.params.virtual;if(i.cache&&n.virtual.cache[t])return n.virtual.cache[t];var a=i.renderSlide?m(i.renderSlide.call(n,e,t)):m('<div class="'+n.params.slideClass+'" data-swiper-slide-index="'+t+'">'+e+"</div>");return a.attr("data-swiper-slide-index")||a.attr("data-swiper-slide-index",t),i.cache&&(n.virtual.cache[t]=a),a},appendSlide:function(e){var t=this;if("object"==typeof e&&"length"in e)for(var n=0;n<e.length;n+=1)e[n]&&t.virtual.slides.push(e[n]);else t.virtual.slides.push(e);t.virtual.update(!0)},prependSlide:function(e){var t=this,n=t.activeIndex,i=n+1,a=1;if(Array.isArray(e)){for(var r=0;r<e.length;r+=1)e[r]&&t.virtual.slides.unshift(e[r]);i=n+e.length,a=e.length}else t.virtual.slides.unshift(e);if(t.params.virtual.cache){var o=t.virtual.cache,s={};Object.keys(o).forEach((function(e){var t=o[e],n=t.attr("data-swiper-slide-index");n&&t.attr("data-swiper-slide-index",parseInt(n,10)+1),s[parseInt(e,10)+a]=t})),t.virtual.cache=s}t.virtual.update(!0),t.slideTo(i,0)},removeSlide:function(e){var t=this;if(null!=e){var n=t.activeIndex;if(Array.isArray(e))for(var i=e.length-1;i>=0;i-=1)t.virtual.slides.splice(e[i],1),t.params.virtual.cache&&delete t.virtual.cache[e[i]],e[i]<n&&(n-=1),n=Math.max(n,0);else t.virtual.slides.splice(e,1),t.params.virtual.cache&&delete t.virtual.cache[e],e<n&&(n-=1),n=Math.max(n,0);t.virtual.update(!0),t.slideTo(n,0)}},removeAllSlides:function(){var e=this;e.virtual.slides=[],e.params.virtual.cache&&(e.virtual.cache={}),e.virtual.update(!0),e.slideTo(0,0)}},Z={name:"virtual",params:{virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,renderExternalUpdate:!0,addSlidesBefore:0,addSlidesAfter:0}},create:function(){I(this,{virtual:t({},j,{slides:this.params.virtual.slides,cache:{}})})},on:{beforeInit:function(e){if(e.params.virtual.enabled){e.classNames.push(e.params.containerModifierClass+"virtual");var t={watchSlidesProgress:!0};C(e.params,t),C(e.originalParams,t),e.params.initialSlide||e.virtual.update()}},setTranslate:function(e){e.params.virtual.enabled&&e.virtual.update()}}},q={handle:function(e){var t=this;if(t.enabled){var n=s(),i=r(),a=t.rtlTranslate,o=e;o.originalEvent&&(o=o.originalEvent);var l=o.keyCode||o.charCode,u=t.params.keyboard.pageUpDown,c=u&&33===l,h=u&&34===l,d=37===l,p=39===l,f=38===l,g=40===l;if(!t.allowSlideNext&&(t.isHorizontal()&&p||t.isVertical()&&g||h))return!1;if(!t.allowSlidePrev&&(t.isHorizontal()&&d||t.isVertical()&&f||c))return!1;if(!(o.shiftKey||o.altKey||o.ctrlKey||o.metaKey||i.activeElement&&i.activeElement.nodeName&&("input"===i.activeElement.nodeName.toLowerCase()||"textarea"===i.activeElement.nodeName.toLowerCase()))){if(t.params.keyboard.onlyInViewport&&(c||h||d||p||f||g)){var m=!1;if(t.$el.parents("."+t.params.slideClass).length>0&&0===t.$el.parents("."+t.params.slideActiveClass).length)return;var v=t.$el,y=v[0].clientWidth,x=v[0].clientHeight,_=n.innerWidth,b=n.innerHeight,w=t.$el.offset();a&&(w.left-=t.$el[0].scrollLeft);for(var S=[[w.left,w.top],[w.left+y,w.top],[w.left,w.top+x],[w.left+y,w.top+x]],M=0;M<S.length;M+=1){var T=S[M];if(T[0]>=0&&T[0]<=_&&T[1]>=0&&T[1]<=b){if(0===T[0]&&0===T[1])continue;m=!0}}if(!m)return}t.isHorizontal()?((c||h||d||p)&&(o.preventDefault?o.preventDefault():o.returnValue=!1),((h||p)&&!a||(c||d)&&a)&&t.slideNext(),((c||d)&&!a||(h||p)&&a)&&t.slidePrev()):((c||h||f||g)&&(o.preventDefault?o.preventDefault():o.returnValue=!1),(h||g)&&t.slideNext(),(c||f)&&t.slidePrev()),t.emit("keyPress",l)}}},enable:function(){var e=this,t=r();e.keyboard.enabled||(m(t).on("keydown",e.keyboard.handle),e.keyboard.enabled=!0)},disable:function(){var e=this,t=r();e.keyboard.enabled&&(m(t).off("keydown",e.keyboard.handle),e.keyboard.enabled=!1)}},K={name:"keyboard",params:{keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}},create:function(){I(this,{keyboard:t({enabled:!1},q)})},on:{init:function(e){e.params.keyboard.enabled&&e.keyboard.enable()},destroy:function(e){e.keyboard.enabled&&e.keyboard.disable()}}},J={lastScrollTime:w(),lastEventBeforeSnap:void 0,recentWheelEvents:[],event:function(){return s().navigator.userAgent.indexOf("firefox")>-1?"DOMMouseScroll":function(){var e=r(),t="onwheel",n=t in e;if(!n){var i=e.createElement("div");i.setAttribute(t,"return;"),n="function"==typeof i.onwheel}return!n&&e.implementation&&e.implementation.hasFeature&&!0!==e.implementation.hasFeature("","")&&(n=e.implementation.hasFeature("Events.wheel","3.0")),n}()?"wheel":"mousewheel"},normalize:function(e){var t=0,n=0,i=0,a=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),i=10*t,a=10*n,"deltaY"in e&&(a=e.deltaY),"deltaX"in e&&(i=e.deltaX),e.shiftKey&&!i&&(i=a,a=0),(i||a)&&e.deltaMode&&(1===e.deltaMode?(i*=40,a*=40):(i*=800,a*=800)),i&&!t&&(t=i<1?-1:1),a&&!n&&(n=a<1?-1:1),{spinX:t,spinY:n,pixelX:i,pixelY:a}},handleMouseEnter:function(){this.enabled&&(this.mouseEntered=!0)},handleMouseLeave:function(){this.enabled&&(this.mouseEntered=!1)},handle:function(e){var t=e,n=this;if(n.enabled){var i=n.params.mousewheel;n.params.cssMode&&t.preventDefault();var a=n.$el;if("container"!==n.params.mousewheel.eventsTarget&&(a=m(n.params.mousewheel.eventsTarget)),!n.mouseEntered&&!a[0].contains(t.target)&&!i.releaseOnEdges)return!0;t.originalEvent&&(t=t.originalEvent);var r=0,o=n.rtlTranslate?-1:1,s=J.normalize(t);if(i.forceToAxis)if(n.isHorizontal()){if(!(Math.abs(s.pixelX)>Math.abs(s.pixelY)))return!0;r=-s.pixelX*o}else{if(!(Math.abs(s.pixelY)>Math.abs(s.pixelX)))return!0;r=-s.pixelY}else r=Math.abs(s.pixelX)>Math.abs(s.pixelY)?-s.pixelX*o:-s.pixelY;if(0===r)return!0;i.invert&&(r=-r);var l=n.getTranslate()+r*i.sensitivity;if(l>=n.minTranslate()&&(l=n.minTranslate()),l<=n.maxTranslate()&&(l=n.maxTranslate()),(!!n.params.loop||!(l===n.minTranslate()||l===n.maxTranslate()))&&n.params.nested&&t.stopPropagation(),n.params.freeMode){var u={time:w(),delta:Math.abs(r),direction:Math.sign(r)},c=n.mousewheel.lastEventBeforeSnap,h=c&&u.time<c.time+500&&u.delta<=c.delta&&u.direction===c.direction;if(!h){n.mousewheel.lastEventBeforeSnap=void 0,n.params.loop&&n.loopFix();var d=n.getTranslate()+r*i.sensitivity,p=n.isBeginning,f=n.isEnd;if(d>=n.minTranslate()&&(d=n.minTranslate()),d<=n.maxTranslate()&&(d=n.maxTranslate()),n.setTransition(0),n.setTranslate(d),n.updateProgress(),n.updateActiveIndex(),n.updateSlidesClasses(),(!p&&n.isBeginning||!f&&n.isEnd)&&n.updateSlidesClasses(),n.params.freeModeSticky){clearTimeout(n.mousewheel.timeout),n.mousewheel.timeout=void 0;var g=n.mousewheel.recentWheelEvents;g.length>=15&&g.shift();var v=g.length?g[g.length-1]:void 0,y=g[0];if(g.push(u),v&&(u.delta>v.delta||u.direction!==v.direction))g.splice(0);else if(g.length>=15&&u.time-y.time<500&&y.delta-u.delta>=1&&u.delta<=6){var x=r>0?.8:.2;n.mousewheel.lastEventBeforeSnap=u,g.splice(0),n.mousewheel.timeout=b((function(){n.slideToClosest(n.params.speed,!0,void 0,x)}),0)}n.mousewheel.timeout||(n.mousewheel.timeout=b((function(){n.mousewheel.lastEventBeforeSnap=u,g.splice(0),n.slideToClosest(n.params.speed,!0,void 0,.5)}),500))}if(h||n.emit("scroll",t),n.params.autoplay&&n.params.autoplayDisableOnInteraction&&n.autoplay.stop(),d===n.minTranslate()||d===n.maxTranslate())return!0}}else{var _={time:w(),delta:Math.abs(r),direction:Math.sign(r),raw:e},S=n.mousewheel.recentWheelEvents;S.length>=2&&S.shift();var M=S.length?S[S.length-1]:void 0;if(S.push(_),M?(_.direction!==M.direction||_.delta>M.delta||_.time>M.time+150)&&n.mousewheel.animateSlider(_):n.mousewheel.animateSlider(_),n.mousewheel.releaseScroll(_))return!0}return t.preventDefault?t.preventDefault():t.returnValue=!1,!1}},animateSlider:function(e){var t=this,n=s();return!(this.params.mousewheel.thresholdDelta&&e.delta<this.params.mousewheel.thresholdDelta||this.params.mousewheel.thresholdTime&&w()-t.mousewheel.lastScrollTime<this.params.mousewheel.thresholdTime||!(e.delta>=6&&w()-t.mousewheel.lastScrollTime<60)&&(e.direction<0?t.isEnd&&!t.params.loop||t.animating||(t.slideNext(),t.emit("scroll",e.raw)):t.isBeginning&&!t.params.loop||t.animating||(t.slidePrev(),t.emit("scroll",e.raw)),t.mousewheel.lastScrollTime=(new n.Date).getTime(),1))},releaseScroll:function(e){var t=this,n=t.params.mousewheel;if(e.direction<0){if(t.isEnd&&!t.params.loop&&n.releaseOnEdges)return!0}else if(t.isBeginning&&!t.params.loop&&n.releaseOnEdges)return!0;return!1},enable:function(){var e=this,t=J.event();if(e.params.cssMode)return e.wrapperEl.removeEventListener(t,e.mousewheel.handle),!0;if(!t)return!1;if(e.mousewheel.enabled)return!1;var n=e.$el;return"container"!==e.params.mousewheel.eventsTarget&&(n=m(e.params.mousewheel.eventsTarget)),n.on("mouseenter",e.mousewheel.handleMouseEnter),n.on("mouseleave",e.mousewheel.handleMouseLeave),n.on(t,e.mousewheel.handle),e.mousewheel.enabled=!0,!0},disable:function(){var e=this,t=J.event();if(e.params.cssMode)return e.wrapperEl.addEventListener(t,e.mousewheel.handle),!0;if(!t)return!1;if(!e.mousewheel.enabled)return!1;var n=e.$el;return"container"!==e.params.mousewheel.eventsTarget&&(n=m(e.params.mousewheel.eventsTarget)),n.off(t,e.mousewheel.handle),e.mousewheel.enabled=!1,!0}},Q={toggleEl:function(e,t){e[t?"addClass":"removeClass"](this.params.navigation.disabledClass),e[0]&&"BUTTON"===e[0].tagName&&(e[0].disabled=t)},update:function(){var e=this,t=e.params.navigation,n=e.navigation.toggleEl;if(!e.params.loop){var i=e.navigation,a=i.$nextEl,r=i.$prevEl;r&&r.length>0&&(e.isBeginning?n(r,!0):n(r,!1),e.params.watchOverflow&&e.enabled&&r[e.isLocked?"addClass":"removeClass"](t.lockClass)),a&&a.length>0&&(e.isEnd?n(a,!0):n(a,!1),e.params.watchOverflow&&e.enabled&&a[e.isLocked?"addClass":"removeClass"](t.lockClass))}},onPrevClick:function(e){var t=this;e.preventDefault(),t.isBeginning&&!t.params.loop||t.slidePrev()},onNextClick:function(e){var t=this;e.preventDefault(),t.isEnd&&!t.params.loop||t.slideNext()},init:function(){var e,t,n=this,i=n.params.navigation;n.params.navigation=D(n.$el,n.params.navigation,n.params.createElements,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),(i.nextEl||i.prevEl)&&(i.nextEl&&(e=m(i.nextEl),n.params.uniqueNavElements&&"string"==typeof i.nextEl&&e.length>1&&1===n.$el.find(i.nextEl).length&&(e=n.$el.find(i.nextEl))),i.prevEl&&(t=m(i.prevEl),n.params.uniqueNavElements&&"string"==typeof i.prevEl&&t.length>1&&1===n.$el.find(i.prevEl).length&&(t=n.$el.find(i.prevEl))),e&&e.length>0&&e.on("click",n.navigation.onNextClick),t&&t.length>0&&t.on("click",n.navigation.onPrevClick),C(n.navigation,{$nextEl:e,nextEl:e&&e[0],$prevEl:t,prevEl:t&&t[0]}),n.enabled||(e&&e.addClass(i.lockClass),t&&t.addClass(i.lockClass)))},destroy:function(){var e=this,t=e.navigation,n=t.$nextEl,i=t.$prevEl;n&&n.length&&(n.off("click",e.navigation.onNextClick),n.removeClass(e.params.navigation.disabledClass)),i&&i.length&&(i.off("click",e.navigation.onPrevClick),i.removeClass(e.params.navigation.disabledClass))}},ee={update:function(){var e=this,t=e.rtl,n=e.params.pagination;if(n.el&&e.pagination.el&&e.pagination.$el&&0!==e.pagination.$el.length){var i,a=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,r=e.pagination.$el,o=e.params.loop?Math.ceil((a-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?((i=Math.ceil((e.activeIndex-e.loopedSlides)/e.params.slidesPerGroup))>a-1-2*e.loopedSlides&&(i-=a-2*e.loopedSlides),i>o-1&&(i-=o),i<0&&"bullets"!==e.params.paginationType&&(i=o+i)):i=void 0!==e.snapIndex?e.snapIndex:e.activeIndex||0,"bullets"===n.type&&e.pagination.bullets&&e.pagination.bullets.length>0){var s,l,u,c=e.pagination.bullets;if(n.dynamicBullets&&(e.pagination.bulletSize=c.eq(0)[e.isHorizontal()?"outerWidth":"outerHeight"](!0),r.css(e.isHorizontal()?"width":"height",e.pagination.bulletSize*(n.dynamicMainBullets+4)+"px"),n.dynamicMainBullets>1&&void 0!==e.previousIndex&&(e.pagination.dynamicBulletIndex+=i-e.previousIndex,e.pagination.dynamicBulletIndex>n.dynamicMainBullets-1?e.pagination.dynamicBulletIndex=n.dynamicMainBullets-1:e.pagination.dynamicBulletIndex<0&&(e.pagination.dynamicBulletIndex=0)),s=i-e.pagination.dynamicBulletIndex,u=((l=s+(Math.min(c.length,n.dynamicMainBullets)-1))+s)/2),c.removeClass(n.bulletActiveClass+" "+n.bulletActiveClass+"-next "+n.bulletActiveClass+"-next-next "+n.bulletActiveClass+"-prev "+n.bulletActiveClass+"-prev-prev "+n.bulletActiveClass+"-main"),r.length>1)c.each((function(e){var t=m(e),a=t.index();a===i&&t.addClass(n.bulletActiveClass),n.dynamicBullets&&(a>=s&&a<=l&&t.addClass(n.bulletActiveClass+"-main"),a===s&&t.prev().addClass(n.bulletActiveClass+"-prev").prev().addClass(n.bulletActiveClass+"-prev-prev"),a===l&&t.next().addClass(n.bulletActiveClass+"-next").next().addClass(n.bulletActiveClass+"-next-next"))}));else{var h=c.eq(i),d=h.index();if(h.addClass(n.bulletActiveClass),n.dynamicBullets){for(var p=c.eq(s),f=c.eq(l),g=s;g<=l;g+=1)c.eq(g).addClass(n.bulletActiveClass+"-main");if(e.params.loop)if(d>=c.length-n.dynamicMainBullets){for(var v=n.dynamicMainBullets;v>=0;v-=1)c.eq(c.length-v).addClass(n.bulletActiveClass+"-main");c.eq(c.length-n.dynamicMainBullets-1).addClass(n.bulletActiveClass+"-prev")}else p.prev().addClass(n.bulletActiveClass+"-prev").prev().addClass(n.bulletActiveClass+"-prev-prev"),f.next().addClass(n.bulletActiveClass+"-next").next().addClass(n.bulletActiveClass+"-next-next");else p.prev().addClass(n.bulletActiveClass+"-prev").prev().addClass(n.bulletActiveClass+"-prev-prev"),f.next().addClass(n.bulletActiveClass+"-next").next().addClass(n.bulletActiveClass+"-next-next")}}if(n.dynamicBullets){var y=Math.min(c.length,n.dynamicMainBullets+4),x=(e.pagination.bulletSize*y-e.pagination.bulletSize)/2-u*e.pagination.bulletSize,_=t?"right":"left";c.css(e.isHorizontal()?_:"top",x+"px")}}if("fraction"===n.type&&(r.find(A(n.currentClass)).text(n.formatFractionCurrent(i+1)),r.find(A(n.totalClass)).text(n.formatFractionTotal(o))),"progressbar"===n.type){var b;b=n.progressbarOpposite?e.isHorizontal()?"vertical":"horizontal":e.isHorizontal()?"horizontal":"vertical";var w=(i+1)/o,S=1,M=1;"horizontal"===b?S=w:M=w,r.find(A(n.progressbarFillClass)).transform("translate3d(0,0,0) scaleX("+S+") scaleY("+M+")").transition(e.params.speed)}"custom"===n.type&&n.renderCustom?(r.html(n.renderCustom(e,i+1,o)),e.emit("paginationRender",r[0])):e.emit("paginationUpdate",r[0]),e.params.watchOverflow&&e.enabled&&r[e.isLocked?"addClass":"removeClass"](n.lockClass)}},render:function(){var e=this,t=e.params.pagination;if(t.el&&e.pagination.el&&e.pagination.$el&&0!==e.pagination.$el.length){var n=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,i=e.pagination.$el,a="";if("bullets"===t.type){var r=e.params.loop?Math.ceil((n-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&!e.params.loop&&r>n&&(r=n);for(var o=0;o<r;o+=1)t.renderBullet?a+=t.renderBullet.call(e,o,t.bulletClass):a+="<"+t.bulletElement+' class="'+t.bulletClass+'"></'+t.bulletElement+">";i.html(a),e.pagination.bullets=i.find(A(t.bulletClass))}"fraction"===t.type&&(a=t.renderFraction?t.renderFraction.call(e,t.currentClass,t.totalClass):'<span class="'+t.currentClass+'"></span> / <span class="'+t.totalClass+'"></span>',i.html(a)),"progressbar"===t.type&&(a=t.renderProgressbar?t.renderProgressbar.call(e,t.progressbarFillClass):'<span class="'+t.progressbarFillClass+'"></span>',i.html(a)),"custom"!==t.type&&e.emit("paginationRender",e.pagination.$el[0])}},init:function(){var e=this;e.params.pagination=D(e.$el,e.params.pagination,e.params.createElements,{el:"swiper-pagination"});var t=e.params.pagination;if(t.el){var n=m(t.el);0!==n.length&&(e.params.uniqueNavElements&&"string"==typeof t.el&&n.length>1&&(n=e.$el.find(t.el)),"bullets"===t.type&&t.clickable&&n.addClass(t.clickableClass),n.addClass(t.modifierClass+t.type),"bullets"===t.type&&t.dynamicBullets&&(n.addClass(""+t.modifierClass+t.type+"-dynamic"),e.pagination.dynamicBulletIndex=0,t.dynamicMainBullets<1&&(t.dynamicMainBullets=1)),"progressbar"===t.type&&t.progressbarOpposite&&n.addClass(t.progressbarOppositeClass),t.clickable&&n.on("click",A(t.bulletClass),(function(t){t.preventDefault();var n=m(this).index()*e.params.slidesPerGroup;e.params.loop&&(n+=e.loopedSlides),e.slideTo(n)})),C(e.pagination,{$el:n,el:n[0]}),e.enabled||n.addClass(t.lockClass))}},destroy:function(){var e=this,t=e.params.pagination;if(t.el&&e.pagination.el&&e.pagination.$el&&0!==e.pagination.$el.length){var n=e.pagination.$el;n.removeClass(t.hiddenClass),n.removeClass(t.modifierClass+t.type),e.pagination.bullets&&e.pagination.bullets.removeClass(t.bulletActiveClass),t.clickable&&n.off("click",A(t.bulletClass))}}},te={setTranslate:function(){var e=this;if(e.params.scrollbar.el&&e.scrollbar.el){var t=e.scrollbar,n=e.rtlTranslate,i=e.progress,a=t.dragSize,r=t.trackSize,o=t.$dragEl,s=t.$el,l=e.params.scrollbar,u=a,c=(r-a)*i;n?(c=-c)>0?(u=a-c,c=0):-c+a>r&&(u=r+c):c<0?(u=a+c,c=0):c+a>r&&(u=r-c),e.isHorizontal()?(o.transform("translate3d("+c+"px, 0, 0)"),o[0].style.width=u+"px"):(o.transform("translate3d(0px, "+c+"px, 0)"),o[0].style.height=u+"px"),l.hide&&(clearTimeout(e.scrollbar.timeout),s[0].style.opacity=1,e.scrollbar.timeout=setTimeout((function(){s[0].style.opacity=0,s.transition(400)}),1e3))}},setTransition:function(e){var t=this;t.params.scrollbar.el&&t.scrollbar.el&&t.scrollbar.$dragEl.transition(e)},updateSize:function(){var e=this;if(e.params.scrollbar.el&&e.scrollbar.el){var t=e.scrollbar,n=t.$dragEl,i=t.$el;n[0].style.width="",n[0].style.height="";var a,r=e.isHorizontal()?i[0].offsetWidth:i[0].offsetHeight,o=e.size/e.virtualSize,s=o*(r/e.size);a="auto"===e.params.scrollbar.dragSize?r*o:parseInt(e.params.scrollbar.dragSize,10),e.isHorizontal()?n[0].style.width=a+"px":n[0].style.height=a+"px",i[0].style.display=o>=1?"none":"",e.params.scrollbar.hide&&(i[0].style.opacity=0),C(t,{trackSize:r,divider:o,moveDivider:s,dragSize:a}),e.params.watchOverflow&&e.enabled&&t.$el[e.isLocked?"addClass":"removeClass"](e.params.scrollbar.lockClass)}},getPointerPosition:function(e){return this.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientX:e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientY:e.clientY},setDragPosition:function(e){var t,n=this,i=n.scrollbar,a=n.rtlTranslate,r=i.$el,o=i.dragSize,s=i.trackSize,l=i.dragStartPos;t=(i.getPointerPosition(e)-r.offset()[n.isHorizontal()?"left":"top"]-(null!==l?l:o/2))/(s-o),t=Math.max(Math.min(t,1),0),a&&(t=1-t);var u=n.minTranslate()+(n.maxTranslate()-n.minTranslate())*t;n.updateProgress(u),n.setTranslate(u),n.updateActiveIndex(),n.updateSlidesClasses()},onDragStart:function(e){var t=this,n=t.params.scrollbar,i=t.scrollbar,a=t.$wrapperEl,r=i.$el,o=i.$dragEl;t.scrollbar.isTouched=!0,t.scrollbar.dragStartPos=e.target===o[0]||e.target===o?i.getPointerPosition(e)-e.target.getBoundingClientRect()[t.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),a.transition(100),o.transition(100),i.setDragPosition(e),clearTimeout(t.scrollbar.dragTimeout),r.transition(0),n.hide&&r.css("opacity",1),t.params.cssMode&&t.$wrapperEl.css("scroll-snap-type","none"),t.emit("scrollbarDragStart",e)},onDragMove:function(e){var t=this,n=t.scrollbar,i=t.$wrapperEl,a=n.$el,r=n.$dragEl;t.scrollbar.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,n.setDragPosition(e),i.transition(0),a.transition(0),r.transition(0),t.emit("scrollbarDragMove",e))},onDragEnd:function(e){var t=this,n=t.params.scrollbar,i=t.scrollbar,a=t.$wrapperEl,r=i.$el;t.scrollbar.isTouched&&(t.scrollbar.isTouched=!1,t.params.cssMode&&(t.$wrapperEl.css("scroll-snap-type",""),a.transition("")),n.hide&&(clearTimeout(t.scrollbar.dragTimeout),t.scrollbar.dragTimeout=b((function(){r.css("opacity",0),r.transition(400)}),1e3)),t.emit("scrollbarDragEnd",e),n.snapOnRelease&&t.slideToClosest())},enableDraggable:function(){var e=this;if(e.params.scrollbar.el){var t=r(),n=e.scrollbar,i=e.touchEventsTouch,a=e.touchEventsDesktop,o=e.params,s=e.support,l=n.$el[0],u=!(!s.passiveListener||!o.passiveListeners)&&{passive:!1,capture:!1},c=!(!s.passiveListener||!o.passiveListeners)&&{passive:!0,capture:!1};l&&(s.touch?(l.addEventListener(i.start,e.scrollbar.onDragStart,u),l.addEventListener(i.move,e.scrollbar.onDragMove,u),l.addEventListener(i.end,e.scrollbar.onDragEnd,c)):(l.addEventListener(a.start,e.scrollbar.onDragStart,u),t.addEventListener(a.move,e.scrollbar.onDragMove,u),t.addEventListener(a.end,e.scrollbar.onDragEnd,c)))}},disableDraggable:function(){var e=this;if(e.params.scrollbar.el){var t=r(),n=e.scrollbar,i=e.touchEventsTouch,a=e.touchEventsDesktop,o=e.params,s=e.support,l=n.$el[0],u=!(!s.passiveListener||!o.passiveListeners)&&{passive:!1,capture:!1},c=!(!s.passiveListener||!o.passiveListeners)&&{passive:!0,capture:!1};l&&(s.touch?(l.removeEventListener(i.start,e.scrollbar.onDragStart,u),l.removeEventListener(i.move,e.scrollbar.onDragMove,u),l.removeEventListener(i.end,e.scrollbar.onDragEnd,c)):(l.removeEventListener(a.start,e.scrollbar.onDragStart,u),t.removeEventListener(a.move,e.scrollbar.onDragMove,u),t.removeEventListener(a.end,e.scrollbar.onDragEnd,c)))}},init:function(){var e=this,t=e.scrollbar,n=e.$el;e.params.scrollbar=D(n,e.params.scrollbar,e.params.createElements,{el:"swiper-scrollbar"});var i=e.params.scrollbar;if(i.el){var a=m(i.el);e.params.uniqueNavElements&&"string"==typeof i.el&&a.length>1&&1===n.find(i.el).length&&(a=n.find(i.el));var r=a.find("."+e.params.scrollbar.dragClass);0===r.length&&(r=m('<div class="'+e.params.scrollbar.dragClass+'"></div>'),a.append(r)),C(t,{$el:a,el:a[0],$dragEl:r,dragEl:r[0]}),i.draggable&&t.enableDraggable(),a&&a[e.enabled?"removeClass":"addClass"](e.params.scrollbar.lockClass)}},destroy:function(){this.scrollbar.disableDraggable()}},ne={setTransform:function(e,t){var n=this.rtl,i=m(e),a=n?-1:1,r=i.attr("data-swiper-parallax")||"0",o=i.attr("data-swiper-parallax-x"),s=i.attr("data-swiper-parallax-y"),l=i.attr("data-swiper-parallax-scale"),u=i.attr("data-swiper-parallax-opacity");if(o||s?(o=o||"0",s=s||"0"):this.isHorizontal()?(o=r,s="0"):(s=r,o="0"),o=o.indexOf("%")>=0?parseInt(o,10)*t*a+"%":o*t*a+"px",s=s.indexOf("%")>=0?parseInt(s,10)*t+"%":s*t+"px",null!=u){var c=u-(u-1)*(1-Math.abs(t));i[0].style.opacity=c}if(null==l)i.transform("translate3d("+o+", "+s+", 0px)");else{var h=l-(l-1)*(1-Math.abs(t));i.transform("translate3d("+o+", "+s+", 0px) scale("+h+")")}},setTranslate:function(){var e=this,t=e.$el,n=e.slides,i=e.progress,a=e.snapGrid;t.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t){e.parallax.setTransform(t,i)})),n.each((function(t,n){var r=t.progress;e.params.slidesPerGroup>1&&"auto"!==e.params.slidesPerView&&(r+=Math.ceil(n/2)-i*(a.length-1)),r=Math.min(Math.max(r,-1),1),m(t).find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t){e.parallax.setTransform(t,r)}))}))},setTransition:function(e){void 0===e&&(e=this.params.speed),this.$el.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t){var n=m(t),i=parseInt(n.attr("data-swiper-parallax-duration"),10)||e;0===e&&(i=0),n.transition(i)}))}},ie={getDistanceBetweenTouches:function(e){if(e.targetTouches.length<2)return 1;var t=e.targetTouches[0].pageX,n=e.targetTouches[0].pageY,i=e.targetTouches[1].pageX,a=e.targetTouches[1].pageY;return Math.sqrt(Math.pow(i-t,2)+Math.pow(a-n,2))},onGestureStart:function(e){var t=this,n=t.support,i=t.params.zoom,a=t.zoom,r=a.gesture;if(a.fakeGestureTouched=!1,a.fakeGestureMoved=!1,!n.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targetTouches.length<2)return;a.fakeGestureTouched=!0,r.scaleStart=ie.getDistanceBetweenTouches(e)}r.$slideEl&&r.$slideEl.length||(r.$slideEl=m(e.target).closest("."+t.params.slideClass),0===r.$slideEl.length&&(r.$slideEl=t.slides.eq(t.activeIndex)),r.$imageEl=r.$slideEl.find("img, svg, canvas, picture, .swiper-zoom-target"),r.$imageWrapEl=r.$imageEl.parent("."+i.containerClass),r.maxRatio=r.$imageWrapEl.attr("data-swiper-zoom")||i.maxRatio,0!==r.$imageWrapEl.length)?(r.$imageEl&&r.$imageEl.transition(0),t.zoom.isScaling=!0):r.$imageEl=void 0},onGestureChange:function(e){var t=this,n=t.support,i=t.params.zoom,a=t.zoom,r=a.gesture;if(!n.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;a.fakeGestureMoved=!0,r.scaleMove=ie.getDistanceBetweenTouches(e)}r.$imageEl&&0!==r.$imageEl.length?(n.gestures?a.scale=e.scale*a.currentScale:a.scale=r.scaleMove/r.scaleStart*a.currentScale,a.scale>r.maxRatio&&(a.scale=r.maxRatio-1+Math.pow(a.scale-r.maxRatio+1,.5)),a.scale<i.minRatio&&(a.scale=i.minRatio+1-Math.pow(i.minRatio-a.scale+1,.5)),r.$imageEl.transform("translate3d(0,0,0) scale("+a.scale+")")):"gesturechange"===e.type&&a.onGestureStart(e)},onGestureEnd:function(e){var t=this,n=t.device,i=t.support,a=t.params.zoom,r=t.zoom,o=r.gesture;if(!i.gestures){if(!r.fakeGestureTouched||!r.fakeGestureMoved)return;if("touchend"!==e.type||"touchend"===e.type&&e.changedTouches.length<2&&!n.android)return;r.fakeGestureTouched=!1,r.fakeGestureMoved=!1}o.$imageEl&&0!==o.$imageEl.length&&(r.scale=Math.max(Math.min(r.scale,o.maxRatio),a.minRatio),o.$imageEl.transition(t.params.speed).transform("translate3d(0,0,0) scale("+r.scale+")"),r.currentScale=r.scale,r.isScaling=!1,1===r.scale&&(o.$slideEl=void 0))},onTouchStart:function(e){var t=this.device,n=this.zoom,i=n.gesture,a=n.image;i.$imageEl&&0!==i.$imageEl.length&&(a.isTouched||(t.android&&e.cancelable&&e.preventDefault(),a.isTouched=!0,a.touchesStart.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,a.touchesStart.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY))},onTouchMove:function(e){var t=this,n=t.zoom,i=n.gesture,a=n.image,r=n.velocity;if(i.$imageEl&&0!==i.$imageEl.length&&(t.allowClick=!1,a.isTouched&&i.$slideEl)){a.isMoved||(a.width=i.$imageEl[0].offsetWidth,a.height=i.$imageEl[0].offsetHeight,a.startX=S(i.$imageWrapEl[0],"x")||0,a.startY=S(i.$imageWrapEl[0],"y")||0,i.slideWidth=i.$slideEl[0].offsetWidth,i.slideHeight=i.$slideEl[0].offsetHeight,i.$imageWrapEl.transition(0));var o=a.width*n.scale,s=a.height*n.scale;if(!(o<i.slideWidth&&s<i.slideHeight)){if(a.minX=Math.min(i.slideWidth/2-o/2,0),a.maxX=-a.minX,a.minY=Math.min(i.slideHeight/2-s/2,0),a.maxY=-a.minY,a.touchesCurrent.x="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,a.touchesCurrent.y="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,!a.isMoved&&!n.isScaling){if(t.isHorizontal()&&(Math.floor(a.minX)===Math.floor(a.startX)&&a.touchesCurrent.x<a.touchesStart.x||Math.floor(a.maxX)===Math.floor(a.startX)&&a.touchesCurrent.x>a.touchesStart.x))return void(a.isTouched=!1);if(!t.isHorizontal()&&(Math.floor(a.minY)===Math.floor(a.startY)&&a.touchesCurrent.y<a.touchesStart.y||Math.floor(a.maxY)===Math.floor(a.startY)&&a.touchesCurrent.y>a.touchesStart.y))return void(a.isTouched=!1)}e.cancelable&&e.preventDefault(),e.stopPropagation(),a.isMoved=!0,a.currentX=a.touchesCurrent.x-a.touchesStart.x+a.startX,a.currentY=a.touchesCurrent.y-a.touchesStart.y+a.startY,a.currentX<a.minX&&(a.currentX=a.minX+1-Math.pow(a.minX-a.currentX+1,.8)),a.currentX>a.maxX&&(a.currentX=a.maxX-1+Math.pow(a.currentX-a.maxX+1,.8)),a.currentY<a.minY&&(a.currentY=a.minY+1-Math.pow(a.minY-a.currentY+1,.8)),a.currentY>a.maxY&&(a.currentY=a.maxY-1+Math.pow(a.currentY-a.maxY+1,.8)),r.prevPositionX||(r.prevPositionX=a.touchesCurrent.x),r.prevPositionY||(r.prevPositionY=a.touchesCurrent.y),r.prevTime||(r.prevTime=Date.now()),r.x=(a.touchesCurrent.x-r.prevPositionX)/(Date.now()-r.prevTime)/2,r.y=(a.touchesCurrent.y-r.prevPositionY)/(Date.now()-r.prevTime)/2,Math.abs(a.touchesCurrent.x-r.prevPositionX)<2&&(r.x=0),Math.abs(a.touchesCurrent.y-r.prevPositionY)<2&&(r.y=0),r.prevPositionX=a.touchesCurrent.x,r.prevPositionY=a.touchesCurrent.y,r.prevTime=Date.now(),i.$imageWrapEl.transform("translate3d("+a.currentX+"px, "+a.currentY+"px,0)")}}},onTouchEnd:function(){var e=this.zoom,t=e.gesture,n=e.image,i=e.velocity;if(t.$imageEl&&0!==t.$imageEl.length){if(!n.isTouched||!n.isMoved)return n.isTouched=!1,void(n.isMoved=!1);n.isTouched=!1,n.isMoved=!1;var a=300,r=300,o=i.x*a,s=n.currentX+o,l=i.y*r,u=n.currentY+l;0!==i.x&&(a=Math.abs((s-n.currentX)/i.x)),0!==i.y&&(r=Math.abs((u-n.currentY)/i.y));var c=Math.max(a,r);n.currentX=s,n.currentY=u;var h=n.width*e.scale,d=n.height*e.scale;n.minX=Math.min(t.slideWidth/2-h/2,0),n.maxX=-n.minX,n.minY=Math.min(t.slideHeight/2-d/2,0),n.maxY=-n.minY,n.currentX=Math.max(Math.min(n.currentX,n.maxX),n.minX),n.currentY=Math.max(Math.min(n.currentY,n.maxY),n.minY),t.$imageWrapEl.transition(c).transform("translate3d("+n.currentX+"px, "+n.currentY+"px,0)")}},onTransitionEnd:function(){var e=this,t=e.zoom,n=t.gesture;n.$slideEl&&e.previousIndex!==e.activeIndex&&(n.$imageEl&&n.$imageEl.transform("translate3d(0,0,0) scale(1)"),n.$imageWrapEl&&n.$imageWrapEl.transform("translate3d(0,0,0)"),t.scale=1,t.currentScale=1,n.$slideEl=void 0,n.$imageEl=void 0,n.$imageWrapEl=void 0)},toggle:function(e){var t=this.zoom;t.scale&&1!==t.scale?t.out():t.in(e)},in:function(e){var t,n,i,a,r,o,l,u,c,h,d,p,f,g,v,y,x=this,_=s(),b=x.zoom,w=x.params.zoom,S=b.gesture,M=b.image;S.$slideEl||(e&&e.target&&(S.$slideEl=m(e.target).closest("."+x.params.slideClass)),S.$slideEl||(x.params.virtual&&x.params.virtual.enabled&&x.virtual?S.$slideEl=x.$wrapperEl.children("."+x.params.slideActiveClass):S.$slideEl=x.slides.eq(x.activeIndex)),S.$imageEl=S.$slideEl.find("img, svg, canvas, picture, .swiper-zoom-target"),S.$imageWrapEl=S.$imageEl.parent("."+w.containerClass)),S.$imageEl&&0!==S.$imageEl.length&&S.$imageWrapEl&&0!==S.$imageWrapEl.length&&(S.$slideEl.addClass(""+w.zoomedSlideClass),void 0===M.touchesStart.x&&e?(t="touchend"===e.type?e.changedTouches[0].pageX:e.pageX,n="touchend"===e.type?e.changedTouches[0].pageY:e.pageY):(t=M.touchesStart.x,n=M.touchesStart.y),b.scale=S.$imageWrapEl.attr("data-swiper-zoom")||w.maxRatio,b.currentScale=S.$imageWrapEl.attr("data-swiper-zoom")||w.maxRatio,e?(v=S.$slideEl[0].offsetWidth,y=S.$slideEl[0].offsetHeight,i=S.$slideEl.offset().left+_.scrollX+v/2-t,a=S.$slideEl.offset().top+_.scrollY+y/2-n,l=S.$imageEl[0].offsetWidth,u=S.$imageEl[0].offsetHeight,c=l*b.scale,h=u*b.scale,f=-(d=Math.min(v/2-c/2,0)),g=-(p=Math.min(y/2-h/2,0)),(r=i*b.scale)<d&&(r=d),r>f&&(r=f),(o=a*b.scale)<p&&(o=p),o>g&&(o=g)):(r=0,o=0),S.$imageWrapEl.transition(300).transform("translate3d("+r+"px, "+o+"px,0)"),S.$imageEl.transition(300).transform("translate3d(0,0,0) scale("+b.scale+")"))},out:function(){var e=this,t=e.zoom,n=e.params.zoom,i=t.gesture;i.$slideEl||(e.params.virtual&&e.params.virtual.enabled&&e.virtual?i.$slideEl=e.$wrapperEl.children("."+e.params.slideActiveClass):i.$slideEl=e.slides.eq(e.activeIndex),i.$imageEl=i.$slideEl.find("img, svg, canvas, picture, .swiper-zoom-target"),i.$imageWrapEl=i.$imageEl.parent("."+n.containerClass)),i.$imageEl&&0!==i.$imageEl.length&&i.$imageWrapEl&&0!==i.$imageWrapEl.length&&(t.scale=1,t.currentScale=1,i.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"),i.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)"),i.$slideEl.removeClass(""+n.zoomedSlideClass),i.$slideEl=void 0)},toggleGestures:function(e){var t=this,n=t.zoom,i=n.slideSelector,a=n.passiveListener;t.$wrapperEl[e]("gesturestart",i,n.onGestureStart,a),t.$wrapperEl[e]("gesturechange",i,n.onGestureChange,a),t.$wrapperEl[e]("gestureend",i,n.onGestureEnd,a)},enableGestures:function(){this.zoom.gesturesEnabled||(this.zoom.gesturesEnabled=!0,this.zoom.toggleGestures("on"))},disableGestures:function(){this.zoom.gesturesEnabled&&(this.zoom.gesturesEnabled=!1,this.zoom.toggleGestures("off"))},enable:function(){var e=this,t=e.support,n=e.zoom;if(!n.enabled){n.enabled=!0;var i=!("touchstart"!==e.touchEvents.start||!t.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1},a=!t.passiveListener||{passive:!1,capture:!0},r="."+e.params.slideClass;e.zoom.passiveListener=i,e.zoom.slideSelector=r,t.gestures?(e.$wrapperEl.on(e.touchEvents.start,e.zoom.enableGestures,i),e.$wrapperEl.on(e.touchEvents.end,e.zoom.disableGestures,i)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.on(e.touchEvents.start,r,n.onGestureStart,i),e.$wrapperEl.on(e.touchEvents.move,r,n.onGestureChange,a),e.$wrapperEl.on(e.touchEvents.end,r,n.onGestureEnd,i),e.touchEvents.cancel&&e.$wrapperEl.on(e.touchEvents.cancel,r,n.onGestureEnd,i)),e.$wrapperEl.on(e.touchEvents.move,"."+e.params.zoom.containerClass,n.onTouchMove,a)}},disable:function(){var e=this,t=e.zoom;if(t.enabled){var n=e.support;e.zoom.enabled=!1;var i=!("touchstart"!==e.touchEvents.start||!n.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1},a=!n.passiveListener||{passive:!1,capture:!0},r="."+e.params.slideClass;n.gestures?(e.$wrapperEl.off(e.touchEvents.start,e.zoom.enableGestures,i),e.$wrapperEl.off(e.touchEvents.end,e.zoom.disableGestures,i)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.off(e.touchEvents.start,r,t.onGestureStart,i),e.$wrapperEl.off(e.touchEvents.move,r,t.onGestureChange,a),e.$wrapperEl.off(e.touchEvents.end,r,t.onGestureEnd,i),e.touchEvents.cancel&&e.$wrapperEl.off(e.touchEvents.cancel,r,t.onGestureEnd,i)),e.$wrapperEl.off(e.touchEvents.move,"."+e.params.zoom.containerClass,t.onTouchMove,a)}}},ae={loadInSlide:function(e,t){void 0===t&&(t=!0);var n=this,i=n.params.lazy;if(void 0!==e&&0!==n.slides.length){var a=n.virtual&&n.params.virtual.enabled?n.$wrapperEl.children("."+n.params.slideClass+'[data-swiper-slide-index="'+e+'"]'):n.slides.eq(e),r=a.find("."+i.elementClass+":not(."+i.loadedClass+"):not(."+i.loadingClass+")");!a.hasClass(i.elementClass)||a.hasClass(i.loadedClass)||a.hasClass(i.loadingClass)||r.push(a[0]),0!==r.length&&r.each((function(e){var r=m(e);r.addClass(i.loadingClass);var o=r.attr("data-background"),s=r.attr("data-src"),l=r.attr("data-srcset"),u=r.attr("data-sizes"),c=r.parent("picture");n.loadImage(r[0],s||o,l,u,!1,(function(){if(null!=n&&n&&(!n||n.params)&&!n.destroyed){if(o?(r.css("background-image",'url("'+o+'")'),r.removeAttr("data-background")):(l&&(r.attr("srcset",l),r.removeAttr("data-srcset")),u&&(r.attr("sizes",u),r.removeAttr("data-sizes")),c.length&&c.children("source").each((function(e){var t=m(e);t.attr("data-srcset")&&(t.attr("srcset",t.attr("data-srcset")),t.removeAttr("data-srcset"))})),s&&(r.attr("src",s),r.removeAttr("data-src"))),r.addClass(i.loadedClass).removeClass(i.loadingClass),a.find("."+i.preloaderClass).remove(),n.params.loop&&t){var e=a.attr("data-swiper-slide-index");if(a.hasClass(n.params.slideDuplicateClass)){var h=n.$wrapperEl.children('[data-swiper-slide-index="'+e+'"]:not(.'+n.params.slideDuplicateClass+")");n.lazy.loadInSlide(h.index(),!1)}else{var d=n.$wrapperEl.children("."+n.params.slideDuplicateClass+'[data-swiper-slide-index="'+e+'"]');n.lazy.loadInSlide(d.index(),!1)}}n.emit("lazyImageReady",a[0],r[0]),n.params.autoHeight&&n.updateAutoHeight()}})),n.emit("lazyImageLoad",a[0],r[0])}))}},load:function(){var e=this,t=e.$wrapperEl,n=e.params,i=e.slides,a=e.activeIndex,r=e.virtual&&n.virtual.enabled,o=n.lazy,s=n.slidesPerView;function l(e){if(r){if(t.children("."+n.slideClass+'[data-swiper-slide-index="'+e+'"]').length)return!0}else if(i[e])return!0;return!1}function u(e){return r?m(e).attr("data-swiper-slide-index"):m(e).index()}if("auto"===s&&(s=0),e.lazy.initialImageLoaded||(e.lazy.initialImageLoaded=!0),e.params.watchSlidesVisibility)t.children("."+n.slideVisibleClass).each((function(t){var n=r?m(t).attr("data-swiper-slide-index"):m(t).index();e.lazy.loadInSlide(n)}));else if(s>1)for(var c=a;c<a+s;c+=1)l(c)&&e.lazy.loadInSlide(c);else e.lazy.loadInSlide(a);if(o.loadPrevNext)if(s>1||o.loadPrevNextAmount&&o.loadPrevNextAmount>1){for(var h=o.loadPrevNextAmount,d=s,p=Math.min(a+d+Math.max(h,d),i.length),f=Math.max(a-Math.max(d,h),0),g=a+s;g<p;g+=1)l(g)&&e.lazy.loadInSlide(g);for(var v=f;v<a;v+=1)l(v)&&e.lazy.loadInSlide(v)}else{var y=t.children("."+n.slideNextClass);y.length>0&&e.lazy.loadInSlide(u(y));var x=t.children("."+n.slidePrevClass);x.length>0&&e.lazy.loadInSlide(u(x))}},checkInViewOnLoad:function(){var e=s(),t=this;if(t&&!t.destroyed){var n=t.params.lazy.scrollingElement?m(t.params.lazy.scrollingElement):m(e),i=n[0]===e,a=i?e.innerWidth:n[0].offsetWidth,r=i?e.innerHeight:n[0].offsetHeight,o=t.$el.offset(),l=!1;t.rtlTranslate&&(o.left-=t.$el[0].scrollLeft);for(var u=[[o.left,o.top],[o.left+t.width,o.top],[o.left,o.top+t.height],[o.left+t.width,o.top+t.height]],c=0;c<u.length;c+=1){var h=u[c];if(h[0]>=0&&h[0]<=a&&h[1]>=0&&h[1]<=r){if(0===h[0]&&0===h[1])continue;l=!0}}var d=!("touchstart"!==t.touchEvents.start||!t.support.passiveListener||!t.params.passiveListeners)&&{passive:!0,capture:!1};l?(t.lazy.load(),n.off("scroll",t.lazy.checkInViewOnLoad,d)):t.lazy.scrollHandlerAttached||(t.lazy.scrollHandlerAttached=!0,n.on("scroll",t.lazy.checkInViewOnLoad,d))}}},re={LinearSpline:function(e,t){var n,i,a,r,o;return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(o=function(e,t){for(i=-1,n=e.length;n-i>1;)e[a=n+i>>1]<=t?i=a:n=a;return n}(this.x,e),r=o-1,(e-this.x[r])*(this.y[o]-this.y[r])/(this.x[o]-this.x[r])+this.y[r]):0},this},getInterpolateFunction:function(e){var t=this;t.controller.spline||(t.controller.spline=t.params.loop?new re.LinearSpline(t.slidesGrid,e.slidesGrid):new re.LinearSpline(t.snapGrid,e.snapGrid))},setTranslate:function(e,t){var n,i,a=this,r=a.controller.control,o=a.constructor;function s(e){var t=a.rtlTranslate?-a.translate:a.translate;"slide"===a.params.controller.by&&(a.controller.getInterpolateFunction(e),i=-a.controller.spline.interpolate(-t)),i&&"container"!==a.params.controller.by||(n=(e.maxTranslate()-e.minTranslate())/(a.maxTranslate()-a.minTranslate()),i=(t-a.minTranslate())*n+e.minTranslate()),a.params.controller.inverse&&(i=e.maxTranslate()-i),e.updateProgress(i),e.setTranslate(i,a),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(r))for(var l=0;l<r.length;l+=1)r[l]!==t&&r[l]instanceof o&&s(r[l]);else r instanceof o&&t!==r&&s(r)},setTransition:function(e,t){var n,i=this,a=i.constructor,r=i.controller.control;function o(t){t.setTransition(e,i),0!==e&&(t.transitionStart(),t.params.autoHeight&&b((function(){t.updateAutoHeight()})),t.$wrapperEl.transitionEnd((function(){r&&(t.params.loop&&"slide"===i.params.controller.by&&t.loopFix(),t.transitionEnd())})))}if(Array.isArray(r))for(n=0;n<r.length;n+=1)r[n]!==t&&r[n]instanceof a&&o(r[n]);else r instanceof a&&t!==r&&o(r)}},oe={getRandomNumber:function(e){return void 0===e&&(e=16),"x".repeat(e).replace(/x/g,(function(){return Math.round(16*Math.random()).toString(16)}))},makeElFocusable:function(e){return e.attr("tabIndex","0"),e},makeElNotFocusable:function(e){return e.attr("tabIndex","-1"),e},addElRole:function(e,t){return e.attr("role",t),e},addElRoleDescription:function(e,t){return e.attr("aria-roledescription",t),e},addElControls:function(e,t){return e.attr("aria-controls",t),e},addElLabel:function(e,t){return e.attr("aria-label",t),e},addElId:function(e,t){return e.attr("id",t),e},addElLive:function(e,t){return e.attr("aria-live",t),e},disableEl:function(e){return e.attr("aria-disabled",!0),e},enableEl:function(e){return e.attr("aria-disabled",!1),e},onEnterOrSpaceKey:function(e){if(13===e.keyCode||32===e.keyCode){var t=this,n=t.params.a11y,i=m(e.target);t.navigation&&t.navigation.$nextEl&&i.is(t.navigation.$nextEl)&&(t.isEnd&&!t.params.loop||t.slideNext(),t.isEnd?t.a11y.notify(n.lastSlideMessage):t.a11y.notify(n.nextSlideMessage)),t.navigation&&t.navigation.$prevEl&&i.is(t.navigation.$prevEl)&&(t.isBeginning&&!t.params.loop||t.slidePrev(),t.isBeginning?t.a11y.notify(n.firstSlideMessage):t.a11y.notify(n.prevSlideMessage)),t.pagination&&i.is(A(t.params.pagination.bulletClass))&&i[0].click()}},notify:function(e){var t=this.a11y.liveRegion;0!==t.length&&(t.html(""),t.html(e))},updateNavigation:function(){var e=this;if(!e.params.loop&&e.navigation){var t=e.navigation,n=t.$nextEl,i=t.$prevEl;i&&i.length>0&&(e.isBeginning?(e.a11y.disableEl(i),e.a11y.makeElNotFocusable(i)):(e.a11y.enableEl(i),e.a11y.makeElFocusable(i))),n&&n.length>0&&(e.isEnd?(e.a11y.disableEl(n),e.a11y.makeElNotFocusable(n)):(e.a11y.enableEl(n),e.a11y.makeElFocusable(n)))}},updatePagination:function(){var e=this,t=e.params.a11y;e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.bullets.each((function(n){var i=m(n);e.a11y.makeElFocusable(i),e.params.pagination.renderBullet||(e.a11y.addElRole(i,"button"),e.a11y.addElLabel(i,t.paginationBulletMessage.replace(/\{\{index\}\}/,i.index()+1)))}))},init:function(){var e=this,t=e.params.a11y;e.$el.append(e.a11y.liveRegion);var n=e.$el;t.containerRoleDescriptionMessage&&e.a11y.addElRoleDescription(n,t.containerRoleDescriptionMessage),t.containerMessage&&e.a11y.addElLabel(n,t.containerMessage);var i=e.$wrapperEl,a=i.attr("id")||"swiper-wrapper-"+e.a11y.getRandomNumber(16),r=e.params.autoplay&&e.params.autoplay.enabled?"off":"polite";e.a11y.addElId(i,a),e.a11y.addElLive(i,r),t.itemRoleDescriptionMessage&&e.a11y.addElRoleDescription(m(e.slides),t.itemRoleDescriptionMessage),e.a11y.addElRole(m(e.slides),t.slideRole);var o,s,l=e.params.loop?e.slides.filter((function(t){return!t.classList.contains(e.params.slideDuplicateClass)})).length:e.slides.length;e.slides.each((function(n,i){var a=m(n),r=e.params.loop?parseInt(a.attr("data-swiper-slide-index"),10):i,o=t.slideLabelMessage.replace(/\{\{index\}\}/,r+1).replace(/\{\{slidesLength\}\}/,l);e.a11y.addElLabel(a,o)})),e.navigation&&e.navigation.$nextEl&&(o=e.navigation.$nextEl),e.navigation&&e.navigation.$prevEl&&(s=e.navigation.$prevEl),o&&o.length&&(e.a11y.makeElFocusable(o),"BUTTON"!==o[0].tagName&&(e.a11y.addElRole(o,"button"),o.on("keydown",e.a11y.onEnterOrSpaceKey)),e.a11y.addElLabel(o,t.nextSlideMessage),e.a11y.addElControls(o,a)),s&&s.length&&(e.a11y.makeElFocusable(s),"BUTTON"!==s[0].tagName&&(e.a11y.addElRole(s,"button"),s.on("keydown",e.a11y.onEnterOrSpaceKey)),e.a11y.addElLabel(s,t.prevSlideMessage),e.a11y.addElControls(s,a)),e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.$el.on("keydown",A(e.params.pagination.bulletClass),e.a11y.onEnterOrSpaceKey)},destroy:function(){var e,t,n=this;n.a11y.liveRegion&&n.a11y.liveRegion.length>0&&n.a11y.liveRegion.remove(),n.navigation&&n.navigation.$nextEl&&(e=n.navigation.$nextEl),n.navigation&&n.navigation.$prevEl&&(t=n.navigation.$prevEl),e&&e.off("keydown",n.a11y.onEnterOrSpaceKey),t&&t.off("keydown",n.a11y.onEnterOrSpaceKey),n.pagination&&n.params.pagination.clickable&&n.pagination.bullets&&n.pagination.bullets.length&&n.pagination.$el.off("keydown",A(n.params.pagination.bulletClass),n.a11y.onEnterOrSpaceKey)}},se={init:function(){var e=this,t=s();if(e.params.history){if(!t.history||!t.history.pushState)return e.params.history.enabled=!1,void(e.params.hashNavigation.enabled=!0);var n=e.history;n.initialized=!0,n.paths=se.getPathValues(e.params.url),(n.paths.key||n.paths.value)&&(n.scrollToSlide(0,n.paths.value,e.params.runCallbacksOnInit),e.params.history.replaceState||t.addEventListener("popstate",e.history.setHistoryPopState))}},destroy:function(){var e=s();this.params.history.replaceState||e.removeEventListener("popstate",this.history.setHistoryPopState)},setHistoryPopState:function(){var e=this;e.history.paths=se.getPathValues(e.params.url),e.history.scrollToSlide(e.params.speed,e.history.paths.value,!1)},getPathValues:function(e){var t=s(),n=(e?new URL(e):t.location).pathname.slice(1).split("/").filter((function(e){return""!==e})),i=n.length;return{key:n[i-2],value:n[i-1]}},setHistory:function(e,t){var n=this,i=s();if(n.history.initialized&&n.params.history.enabled){var a;a=n.params.url?new URL(n.params.url):i.location;var r=n.slides.eq(t),o=se.slugify(r.attr("data-history"));if(n.params.history.root.length>0){var l=n.params.history.root;"/"===l[l.length-1]&&(l=l.slice(0,l.length-1)),o=l+"/"+e+"/"+o}else a.pathname.includes(e)||(o=e+"/"+o);var u=i.history.state;u&&u.value===o||(n.params.history.replaceState?i.history.replaceState({value:o},null,o):i.history.pushState({value:o},null,o))}},slugify:function(e){return e.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},scrollToSlide:function(e,t,n){var i=this;if(t)for(var a=0,r=i.slides.length;a<r;a+=1){var o=i.slides.eq(a);if(se.slugify(o.attr("data-history"))===t&&!o.hasClass(i.params.slideDuplicateClass)){var s=o.index();i.slideTo(s,e,n)}}else i.slideTo(0,e,n)}},le={onHashChange:function(){var e=this,t=r();e.emit("hashChange");var n=t.location.hash.replace("#","");if(n!==e.slides.eq(e.activeIndex).attr("data-hash")){var i=e.$wrapperEl.children("."+e.params.slideClass+'[data-hash="'+n+'"]').index();if(void 0===i)return;e.slideTo(i)}},setHash:function(){var e=this,t=s(),n=r();if(e.hashNavigation.initialized&&e.params.hashNavigation.enabled)if(e.params.hashNavigation.replaceState&&t.history&&t.history.replaceState)t.history.replaceState(null,null,"#"+e.slides.eq(e.activeIndex).attr("data-hash")||""),e.emit("hashSet");else{var i=e.slides.eq(e.activeIndex),a=i.attr("data-hash")||i.attr("data-history");n.location.hash=a||"",e.emit("hashSet")}},init:function(){var e=this,t=r(),n=s();if(!(!e.params.hashNavigation.enabled||e.params.history&&e.params.history.enabled)){e.hashNavigation.initialized=!0;var i=t.location.hash.replace("#","");if(i)for(var a=0,o=e.slides.length;a<o;a+=1){var l=e.slides.eq(a);if((l.attr("data-hash")||l.attr("data-history"))===i&&!l.hasClass(e.params.slideDuplicateClass)){var u=l.index();e.slideTo(u,0,e.params.runCallbacksOnInit,!0)}}e.params.hashNavigation.watchState&&m(n).on("hashchange",e.hashNavigation.onHashChange)}},destroy:function(){var e=s();this.params.hashNavigation.watchState&&m(e).off("hashchange",this.hashNavigation.onHashChange)}},ue={run:function(){var e=this,t=e.slides.eq(e.activeIndex),n=e.params.autoplay.delay;t.attr("data-swiper-autoplay")&&(n=t.attr("data-swiper-autoplay")||e.params.autoplay.delay),clearTimeout(e.autoplay.timeout),e.autoplay.timeout=b((function(){var t;e.params.autoplay.reverseDirection?e.params.loop?(e.loopFix(),t=e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.isBeginning?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(t=e.slideTo(e.slides.length-1,e.params.speed,!0,!0),e.emit("autoplay")):(t=e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.params.loop?(e.loopFix(),t=e.slideNext(e.params.speed,!0,!0),e.emit("autoplay")):e.isEnd?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(t=e.slideTo(0,e.params.speed,!0,!0),e.emit("autoplay")):(t=e.slideNext(e.params.speed,!0,!0),e.emit("autoplay")),(e.params.cssMode&&e.autoplay.running||!1===t)&&e.autoplay.run()}),n)},start:function(){var e=this;return void 0===e.autoplay.timeout&&!e.autoplay.running&&(e.autoplay.running=!0,e.emit("autoplayStart"),e.autoplay.run(),!0)},stop:function(){var e=this;return!!e.autoplay.running&&void 0!==e.autoplay.timeout&&(e.autoplay.timeout&&(clearTimeout(e.autoplay.timeout),e.autoplay.timeout=void 0),e.autoplay.running=!1,e.emit("autoplayStop"),!0)},pause:function(e){var t=this;t.autoplay.running&&(t.autoplay.paused||(t.autoplay.timeout&&clearTimeout(t.autoplay.timeout),t.autoplay.paused=!0,0!==e&&t.params.autoplay.waitForTransition?["transitionend","webkitTransitionEnd"].forEach((function(e){t.$wrapperEl[0].addEventListener(e,t.autoplay.onTransitionEnd)})):(t.autoplay.paused=!1,t.autoplay.run())))},onVisibilityChange:function(){var e=this,t=r();"hidden"===t.visibilityState&&e.autoplay.running&&e.autoplay.pause(),"visible"===t.visibilityState&&e.autoplay.paused&&(e.autoplay.run(),e.autoplay.paused=!1)},onTransitionEnd:function(e){var t=this;t&&!t.destroyed&&t.$wrapperEl&&e.target===t.$wrapperEl[0]&&(["transitionend","webkitTransitionEnd"].forEach((function(e){t.$wrapperEl[0].removeEventListener(e,t.autoplay.onTransitionEnd)})),t.autoplay.paused=!1,t.autoplay.running?t.autoplay.run():t.autoplay.stop())},onMouseEnter:function(){var e=this;e.params.autoplay.disableOnInteraction?e.autoplay.stop():e.autoplay.pause(),["transitionend","webkitTransitionEnd"].forEach((function(t){e.$wrapperEl[0].removeEventListener(t,e.autoplay.onTransitionEnd)}))},onMouseLeave:function(){var e=this;e.params.autoplay.disableOnInteraction||(e.autoplay.paused=!1,e.autoplay.run())},attachMouseEvents:function(){var e=this;e.params.autoplay.pauseOnMouseEnter&&(e.$el.on("mouseenter",e.autoplay.onMouseEnter),e.$el.on("mouseleave",e.autoplay.onMouseLeave))},detachMouseEvents:function(){var e=this;e.$el.off("mouseenter",e.autoplay.onMouseEnter),e.$el.off("mouseleave",e.autoplay.onMouseLeave)}},ce={setTranslate:function(){for(var e=this,t=e.slides,n=0;n<t.length;n+=1){var i=e.slides.eq(n),a=-i[0].swiperSlideOffset;e.params.virtualTranslate||(a-=e.translate);var r=0;e.isHorizontal()||(r=a,a=0);var o=e.params.fadeEffect.crossFade?Math.max(1-Math.abs(i[0].progress),0):1+Math.min(Math.max(i[0].progress,-1),0);i.css({opacity:o}).transform("translate3d("+a+"px, "+r+"px, 0px)")}},setTransition:function(e){var t=this,n=t.slides,i=t.$wrapperEl;if(n.transition(e),t.params.virtualTranslate&&0!==e){var a=!1;n.transitionEnd((function(){if(!a&&t&&!t.destroyed){a=!0,t.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],n=0;n<e.length;n+=1)i.trigger(e[n])}}))}}},he={setTranslate:function(){var e,t=this,n=t.$el,i=t.$wrapperEl,a=t.slides,r=t.width,o=t.height,s=t.rtlTranslate,l=t.size,u=t.browser,c=t.params.cubeEffect,h=t.isHorizontal(),d=t.virtual&&t.params.virtual.enabled,p=0;c.shadow&&(h?(0===(e=i.find(".swiper-cube-shadow")).length&&(e=m('<div class="swiper-cube-shadow"></div>'),i.append(e)),e.css({height:r+"px"})):0===(e=n.find(".swiper-cube-shadow")).length&&(e=m('<div class="swiper-cube-shadow"></div>'),n.append(e)));for(var f=0;f<a.length;f+=1){var g=a.eq(f),v=f;d&&(v=parseInt(g.attr("data-swiper-slide-index"),10));var y=90*v,x=Math.floor(y/360);s&&(y=-y,x=Math.floor(-y/360));var _=Math.max(Math.min(g[0].progress,1),-1),b=0,w=0,S=0;v%4==0?(b=4*-x*l,S=0):(v-1)%4==0?(b=0,S=4*-x*l):(v-2)%4==0?(b=l+4*x*l,S=l):(v-3)%4==0&&(b=-l,S=3*l+4*l*x),s&&(b=-b),h||(w=b,b=0);var M="rotateX("+(h?0:-y)+"deg) rotateY("+(h?y:0)+"deg) translate3d("+b+"px, "+w+"px, "+S+"px)";if(_<=1&&_>-1&&(p=90*v+90*_,s&&(p=90*-v-90*_)),g.transform(M),c.slideShadows){var T=h?g.find(".swiper-slide-shadow-left"):g.find(".swiper-slide-shadow-top"),C=h?g.find(".swiper-slide-shadow-right"):g.find(".swiper-slide-shadow-bottom");0===T.length&&(T=m('<div class="swiper-slide-shadow-'+(h?"left":"top")+'"></div>'),g.append(T)),0===C.length&&(C=m('<div class="swiper-slide-shadow-'+(h?"right":"bottom")+'"></div>'),g.append(C)),T.length&&(T[0].style.opacity=Math.max(-_,0)),C.length&&(C[0].style.opacity=Math.max(_,0))}}if(i.css({"-webkit-transform-origin":"50% 50% -"+l/2+"px","-moz-transform-origin":"50% 50% -"+l/2+"px","-ms-transform-origin":"50% 50% -"+l/2+"px","transform-origin":"50% 50% -"+l/2+"px"}),c.shadow)if(h)e.transform("translate3d(0px, "+(r/2+c.shadowOffset)+"px, "+-r/2+"px) rotateX(90deg) rotateZ(0deg) scale("+c.shadowScale+")");else{var I=Math.abs(p)-90*Math.floor(Math.abs(p)/90),A=1.5-(Math.sin(2*I*Math.PI/360)/2+Math.cos(2*I*Math.PI/360)/2),D=c.shadowScale,k=c.shadowScale/A,L=c.shadowOffset;e.transform("scale3d("+D+", 1, "+k+") translate3d(0px, "+(o/2+L)+"px, "+-o/2/k+"px) rotateX(-90deg)")}var E=u.isSafari||u.isWebView?-l/2:0;i.transform("translate3d(0px,0,"+E+"px) rotateX("+(t.isHorizontal()?0:p)+"deg) rotateY("+(t.isHorizontal()?-p:0)+"deg)")},setTransition:function(e){var t=this,n=t.$el;t.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),t.params.cubeEffect.shadow&&!t.isHorizontal()&&n.find(".swiper-cube-shadow").transition(e)}},de={setTranslate:function(){for(var e=this,t=e.slides,n=e.rtlTranslate,i=0;i<t.length;i+=1){var a=t.eq(i),r=a[0].progress;e.params.flipEffect.limitRotation&&(r=Math.max(Math.min(a[0].progress,1),-1));var o=-180*r,s=0,l=-a[0].swiperSlideOffset,u=0;if(e.isHorizontal()?n&&(o=-o):(u=l,l=0,s=-o,o=0),a[0].style.zIndex=-Math.abs(Math.round(r))+t.length,e.params.flipEffect.slideShadows){var c=e.isHorizontal()?a.find(".swiper-slide-shadow-left"):a.find(".swiper-slide-shadow-top"),h=e.isHorizontal()?a.find(".swiper-slide-shadow-right"):a.find(".swiper-slide-shadow-bottom");0===c.length&&(c=m('<div class="swiper-slide-shadow-'+(e.isHorizontal()?"left":"top")+'"></div>'),a.append(c)),0===h.length&&(h=m('<div class="swiper-slide-shadow-'+(e.isHorizontal()?"right":"bottom")+'"></div>'),a.append(h)),c.length&&(c[0].style.opacity=Math.max(-r,0)),h.length&&(h[0].style.opacity=Math.max(r,0))}a.transform("translate3d("+l+"px, "+u+"px, 0px) rotateX("+s+"deg) rotateY("+o+"deg)")}},setTransition:function(e){var t=this,n=t.slides,i=t.activeIndex,a=t.$wrapperEl;if(n.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),t.params.virtualTranslate&&0!==e){var r=!1;n.eq(i).transitionEnd((function(){if(!r&&t&&!t.destroyed){r=!0,t.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],n=0;n<e.length;n+=1)a.trigger(e[n])}}))}}},pe={setTranslate:function(){for(var e=this,t=e.width,n=e.height,i=e.slides,a=e.slidesSizesGrid,r=e.params.coverflowEffect,o=e.isHorizontal(),s=e.translate,l=o?t/2-s:n/2-s,u=o?r.rotate:-r.rotate,c=r.depth,h=0,d=i.length;h<d;h+=1){var p=i.eq(h),f=a[h],g=(l-p[0].swiperSlideOffset-f/2)/f*r.modifier,v=o?u*g:0,y=o?0:u*g,x=-c*Math.abs(g),_=r.stretch;"string"==typeof _&&-1!==_.indexOf("%")&&(_=parseFloat(r.stretch)/100*f);var b=o?0:_*g,w=o?_*g:0,S=1-(1-r.scale)*Math.abs(g);Math.abs(w)<.001&&(w=0),Math.abs(b)<.001&&(b=0),Math.abs(x)<.001&&(x=0),Math.abs(v)<.001&&(v=0),Math.abs(y)<.001&&(y=0),Math.abs(S)<.001&&(S=0);var M="translate3d("+w+"px,"+b+"px,"+x+"px) rotateX("+y+"deg) rotateY("+v+"deg) scale("+S+")";if(p.transform(M),p[0].style.zIndex=1-Math.abs(Math.round(g)),r.slideShadows){var T=o?p.find(".swiper-slide-shadow-left"):p.find(".swiper-slide-shadow-top"),C=o?p.find(".swiper-slide-shadow-right"):p.find(".swiper-slide-shadow-bottom");0===T.length&&(T=m('<div class="swiper-slide-shadow-'+(o?"left":"top")+'"></div>'),p.append(T)),0===C.length&&(C=m('<div class="swiper-slide-shadow-'+(o?"right":"bottom")+'"></div>'),p.append(C)),T.length&&(T[0].style.opacity=g>0?g:0),C.length&&(C[0].style.opacity=-g>0?-g:0)}}},setTransition:function(e){this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}},fe={init:function(){var e=this,t=e.params.thumbs;if(e.thumbs.initialized)return!1;e.thumbs.initialized=!0;var n=e.constructor;return t.swiper instanceof n?(e.thumbs.swiper=t.swiper,C(e.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),C(e.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1})):M(t.swiper)&&(e.thumbs.swiper=new n(C({},t.swiper,{watchSlidesVisibility:!0,watchSlidesProgress:!0,slideToClickedSlide:!1})),e.thumbs.swiperCreated=!0),e.thumbs.swiper.$el.addClass(e.params.thumbs.thumbsContainerClass),e.thumbs.swiper.on("tap",e.thumbs.onThumbClick),!0},onThumbClick:function(){var e=this,t=e.thumbs.swiper;if(t){var n=t.clickedIndex,i=t.clickedSlide;if(!(i&&m(i).hasClass(e.params.thumbs.slideThumbActiveClass)||null==n)){var a;if(a=t.params.loop?parseInt(m(t.clickedSlide).attr("data-swiper-slide-index"),10):n,e.params.loop){var r=e.activeIndex;e.slides.eq(r).hasClass(e.params.slideDuplicateClass)&&(e.loopFix(),e._clientLeft=e.$wrapperEl[0].clientLeft,r=e.activeIndex);var o=e.slides.eq(r).prevAll('[data-swiper-slide-index="'+a+'"]').eq(0).index(),s=e.slides.eq(r).nextAll('[data-swiper-slide-index="'+a+'"]').eq(0).index();a=void 0===o?s:void 0===s?o:s-r<r-o?s:o}e.slideTo(a)}}},update:function(e){var t=this,n=t.thumbs.swiper;if(n){var i="auto"===n.params.slidesPerView?n.slidesPerViewDynamic():n.params.slidesPerView,a=t.params.thumbs.autoScrollOffset,r=a&&!n.params.loop;if(t.realIndex!==n.realIndex||r){var o,s,l=n.activeIndex;if(n.params.loop){n.slides.eq(l).hasClass(n.params.slideDuplicateClass)&&(n.loopFix(),n._clientLeft=n.$wrapperEl[0].clientLeft,l=n.activeIndex);var u=n.slides.eq(l).prevAll('[data-swiper-slide-index="'+t.realIndex+'"]').eq(0).index(),c=n.slides.eq(l).nextAll('[data-swiper-slide-index="'+t.realIndex+'"]').eq(0).index();o=void 0===u?c:void 0===c?u:c-l==l-u?n.params.slidesPerGroup>1?c:l:c-l<l-u?c:u,s=t.activeIndex>t.previousIndex?"next":"prev"}else s=(o=t.realIndex)>t.previousIndex?"next":"prev";r&&(o+="next"===s?a:-1*a),n.visibleSlidesIndexes&&n.visibleSlidesIndexes.indexOf(o)<0&&(n.params.centeredSlides?o=o>l?o-Math.floor(i/2)+1:o+Math.floor(i/2)-1:o>l&&n.params.slidesPerGroup,n.slideTo(o,e?0:void 0))}var h=1,d=t.params.thumbs.slideThumbActiveClass;if(t.params.slidesPerView>1&&!t.params.centeredSlides&&(h=t.params.slidesPerView),t.params.thumbs.multipleActiveThumbs||(h=1),h=Math.floor(h),n.slides.removeClass(d),n.params.loop||n.params.virtual&&n.params.virtual.enabled)for(var p=0;p<h;p+=1)n.$wrapperEl.children('[data-swiper-slide-index="'+(t.realIndex+p)+'"]').addClass(d);else for(var f=0;f<h;f+=1)n.slides.eq(t.realIndex+f).addClass(d)}}},ge=[Z,K,{name:"mousewheel",params:{mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null}},create:function(){I(this,{mousewheel:{enabled:!1,lastScrollTime:w(),lastEventBeforeSnap:void 0,recentWheelEvents:[],enable:J.enable,disable:J.disable,handle:J.handle,handleMouseEnter:J.handleMouseEnter,handleMouseLeave:J.handleMouseLeave,animateSlider:J.animateSlider,releaseScroll:J.releaseScroll}})},on:{init:function(e){!e.params.mousewheel.enabled&&e.params.cssMode&&e.mousewheel.disable(),e.params.mousewheel.enabled&&e.mousewheel.enable()},destroy:function(e){e.params.cssMode&&e.mousewheel.enable(),e.mousewheel.enabled&&e.mousewheel.disable()}}},{name:"navigation",params:{navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock"}},create:function(){I(this,{navigation:t({},Q)})},on:{init:function(e){e.navigation.init(),e.navigation.update()},toEdge:function(e){e.navigation.update()},fromEdge:function(e){e.navigation.update()},destroy:function(e){e.navigation.destroy()},"enable disable":function(e){var t=e.navigation,n=t.$nextEl,i=t.$prevEl;n&&n[e.enabled?"removeClass":"addClass"](e.params.navigation.lockClass),i&&i[e.enabled?"removeClass":"addClass"](e.params.navigation.lockClass)},click:function(e,t){var n=e.navigation,i=n.$nextEl,a=n.$prevEl,r=t.target;if(e.params.navigation.hideOnClick&&!m(r).is(a)&&!m(r).is(i)){if(e.pagination&&e.params.pagination&&e.params.pagination.clickable&&(e.pagination.el===r||e.pagination.el.contains(r)))return;var o;i?o=i.hasClass(e.params.navigation.hiddenClass):a&&(o=a.hasClass(e.params.navigation.hiddenClass)),!0===o?e.emit("navigationShow"):e.emit("navigationHide"),i&&i.toggleClass(e.params.navigation.hiddenClass),a&&a.toggleClass(e.params.navigation.hiddenClass)}}}},{name:"pagination",params:{pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:function(e){return e},formatFractionTotal:function(e){return e},bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",modifierClass:"swiper-pagination-",currentClass:"swiper-pagination-current",totalClass:"swiper-pagination-total",hiddenClass:"swiper-pagination-hidden",progressbarFillClass:"swiper-pagination-progressbar-fill",progressbarOppositeClass:"swiper-pagination-progressbar-opposite",clickableClass:"swiper-pagination-clickable",lockClass:"swiper-pagination-lock"}},create:function(){I(this,{pagination:t({dynamicBulletIndex:0},ee)})},on:{init:function(e){e.pagination.init(),e.pagination.render(),e.pagination.update()},activeIndexChange:function(e){(e.params.loop||void 0===e.snapIndex)&&e.pagination.update()},snapIndexChange:function(e){e.params.loop||e.pagination.update()},slidesLengthChange:function(e){e.params.loop&&(e.pagination.render(),e.pagination.update())},snapGridLengthChange:function(e){e.params.loop||(e.pagination.render(),e.pagination.update())},destroy:function(e){e.pagination.destroy()},"enable disable":function(e){var t=e.pagination.$el;t&&t[e.enabled?"removeClass":"addClass"](e.params.pagination.lockClass)},click:function(e,t){var n=t.target;if(e.params.pagination.el&&e.params.pagination.hideOnClick&&e.pagination.$el.length>0&&!m(n).hasClass(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&n===e.navigation.nextEl||e.navigation.prevEl&&n===e.navigation.prevEl))return;!0===e.pagination.$el.hasClass(e.params.pagination.hiddenClass)?e.emit("paginationShow"):e.emit("paginationHide"),e.pagination.$el.toggleClass(e.params.pagination.hiddenClass)}}}},{name:"scrollbar",params:{scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag"}},create:function(){I(this,{scrollbar:t({isTouched:!1,timeout:null,dragTimeout:null},te)})},on:{init:function(e){e.scrollbar.init(),e.scrollbar.updateSize(),e.scrollbar.setTranslate()},update:function(e){e.scrollbar.updateSize()},resize:function(e){e.scrollbar.updateSize()},observerUpdate:function(e){e.scrollbar.updateSize()},setTranslate:function(e){e.scrollbar.setTranslate()},setTransition:function(e,t){e.scrollbar.setTransition(t)},"enable disable":function(e){var t=e.scrollbar.$el;t&&t[e.enabled?"removeClass":"addClass"](e.params.scrollbar.lockClass)},destroy:function(e){e.scrollbar.destroy()}}},{name:"parallax",params:{parallax:{enabled:!1}},create:function(){I(this,{parallax:t({},ne)})},on:{beforeInit:function(e){e.params.parallax.enabled&&(e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0)},init:function(e){e.params.parallax.enabled&&e.parallax.setTranslate()},setTranslate:function(e){e.params.parallax.enabled&&e.parallax.setTranslate()},setTransition:function(e,t){e.params.parallax.enabled&&e.parallax.setTransition(t)}}},{name:"zoom",params:{zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}},create:function(){var e=this;I(e,{zoom:t({enabled:!1,scale:1,currentScale:1,isScaling:!1,gesture:{$slideEl:void 0,slideWidth:void 0,slideHeight:void 0,$imageEl:void 0,$imageWrapEl:void 0,maxRatio:3},image:{isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0}},ie)});var n=1;Object.defineProperty(e.zoom,"scale",{get:function(){return n},set:function(t){if(n!==t){var i=e.zoom.gesture.$imageEl?e.zoom.gesture.$imageEl[0]:void 0,a=e.zoom.gesture.$slideEl?e.zoom.gesture.$slideEl[0]:void 0;e.emit("zoomChange",t,i,a)}n=t}})},on:{init:function(e){e.params.zoom.enabled&&e.zoom.enable()},destroy:function(e){e.zoom.disable()},touchStart:function(e,t){e.zoom.enabled&&e.zoom.onTouchStart(t)},touchEnd:function(e,t){e.zoom.enabled&&e.zoom.onTouchEnd(t)},doubleTap:function(e,t){!e.animating&&e.params.zoom.enabled&&e.zoom.enabled&&e.params.zoom.toggle&&e.zoom.toggle(t)},transitionEnd:function(e){e.zoom.enabled&&e.params.zoom.enabled&&e.zoom.onTransitionEnd()},slideChange:function(e){e.zoom.enabled&&e.params.zoom.enabled&&e.params.cssMode&&e.zoom.onTransitionEnd()}}},{name:"lazy",params:{lazy:{checkInView:!1,enabled:!1,loadPrevNext:!1,loadPrevNextAmount:1,loadOnTransitionStart:!1,scrollingElement:"",elementClass:"swiper-lazy",loadingClass:"swiper-lazy-loading",loadedClass:"swiper-lazy-loaded",preloaderClass:"swiper-lazy-preloader"}},create:function(){I(this,{lazy:t({initialImageLoaded:!1},ae)})},on:{beforeInit:function(e){e.params.lazy.enabled&&e.params.preloadImages&&(e.params.preloadImages=!1)},init:function(e){e.params.lazy.enabled&&!e.params.loop&&0===e.params.initialSlide&&(e.params.lazy.checkInView?e.lazy.checkInViewOnLoad():e.lazy.load())},scroll:function(e){e.params.freeMode&&!e.params.freeModeSticky&&e.lazy.load()},"scrollbarDragMove resize _freeModeNoMomentumRelease":function(e){e.params.lazy.enabled&&e.lazy.load()},transitionStart:function(e){e.params.lazy.enabled&&(e.params.lazy.loadOnTransitionStart||!e.params.lazy.loadOnTransitionStart&&!e.lazy.initialImageLoaded)&&e.lazy.load()},transitionEnd:function(e){e.params.lazy.enabled&&!e.params.lazy.loadOnTransitionStart&&e.lazy.load()},slideChange:function(e){var t=e.params,n=t.lazy,i=t.cssMode,a=t.watchSlidesVisibility,r=t.watchSlidesProgress,o=t.touchReleaseOnEdges,s=t.resistanceRatio;n.enabled&&(i||(a||r)&&(o||0===s))&&e.lazy.load()}}},{name:"controller",params:{controller:{control:void 0,inverse:!1,by:"slide"}},create:function(){I(this,{controller:t({control:this.params.controller.control},re)})},on:{update:function(e){e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},resize:function(e){e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},observerUpdate:function(e){e.controller.control&&e.controller.spline&&(e.controller.spline=void 0,delete e.controller.spline)},setTranslate:function(e,t,n){e.controller.control&&e.controller.setTranslate(t,n)},setTransition:function(e,t,n){e.controller.control&&e.controller.setTransition(t,n)}}},{name:"a11y",params:{a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",slideLabelMessage:"{{index}} / {{slidesLength}}",containerMessage:null,containerRoleDescriptionMessage:null,itemRoleDescriptionMessage:null,slideRole:"group"}},create:function(){I(this,{a11y:t({},oe,{liveRegion:m('<span class="'+this.params.a11y.notificationClass+'" aria-live="assertive" aria-atomic="true"></span>')})})},on:{afterInit:function(e){e.params.a11y.enabled&&(e.a11y.init(),e.a11y.updateNavigation())},toEdge:function(e){e.params.a11y.enabled&&e.a11y.updateNavigation()},fromEdge:function(e){e.params.a11y.enabled&&e.a11y.updateNavigation()},paginationUpdate:function(e){e.params.a11y.enabled&&e.a11y.updatePagination()},destroy:function(e){e.params.a11y.enabled&&e.a11y.destroy()}}},{name:"history",params:{history:{enabled:!1,root:"",replaceState:!1,key:"slides"}},create:function(){I(this,{history:t({},se)})},on:{init:function(e){e.params.history.enabled&&e.history.init()},destroy:function(e){e.params.history.enabled&&e.history.destroy()},"transitionEnd _freeModeNoMomentumRelease":function(e){e.history.initialized&&e.history.setHistory(e.params.history.key,e.activeIndex)},slideChange:function(e){e.history.initialized&&e.params.cssMode&&e.history.setHistory(e.params.history.key,e.activeIndex)}}},{name:"hash-navigation",params:{hashNavigation:{enabled:!1,replaceState:!1,watchState:!1}},create:function(){I(this,{hashNavigation:t({initialized:!1},le)})},on:{init:function(e){e.params.hashNavigation.enabled&&e.hashNavigation.init()},destroy:function(e){e.params.hashNavigation.enabled&&e.hashNavigation.destroy()},"transitionEnd _freeModeNoMomentumRelease":function(e){e.hashNavigation.initialized&&e.hashNavigation.setHash()},slideChange:function(e){e.hashNavigation.initialized&&e.params.cssMode&&e.hashNavigation.setHash()}}},{name:"autoplay",params:{autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}},create:function(){I(this,{autoplay:t({},ue,{running:!1,paused:!1})})},on:{init:function(e){e.params.autoplay.enabled&&(e.autoplay.start(),r().addEventListener("visibilitychange",e.autoplay.onVisibilityChange),e.autoplay.attachMouseEvents())},beforeTransitionStart:function(e,t,n){e.autoplay.running&&(n||!e.params.autoplay.disableOnInteraction?e.autoplay.pause(t):e.autoplay.stop())},sliderFirstMove:function(e){e.autoplay.running&&(e.params.autoplay.disableOnInteraction?e.autoplay.stop():e.autoplay.pause())},touchEnd:function(e){e.params.cssMode&&e.autoplay.paused&&!e.params.autoplay.disableOnInteraction&&e.autoplay.run()},destroy:function(e){e.autoplay.detachMouseEvents(),e.autoplay.running&&e.autoplay.stop(),r().removeEventListener("visibilitychange",e.autoplay.onVisibilityChange)}}},{name:"effect-fade",params:{fadeEffect:{crossFade:!1}},create:function(){I(this,{fadeEffect:t({},ce)})},on:{beforeInit:function(e){if("fade"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"fade");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};C(e.params,t),C(e.originalParams,t)}},setTranslate:function(e){"fade"===e.params.effect&&e.fadeEffect.setTranslate()},setTransition:function(e,t){"fade"===e.params.effect&&e.fadeEffect.setTransition(t)}}},{name:"effect-cube",params:{cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}},create:function(){I(this,{cubeEffect:t({},he)})},on:{beforeInit:function(e){if("cube"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"cube"),e.classNames.push(e.params.containerModifierClass+"3d");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0};C(e.params,t),C(e.originalParams,t)}},setTranslate:function(e){"cube"===e.params.effect&&e.cubeEffect.setTranslate()},setTransition:function(e,t){"cube"===e.params.effect&&e.cubeEffect.setTransition(t)}}},{name:"effect-flip",params:{flipEffect:{slideShadows:!0,limitRotation:!0}},create:function(){I(this,{flipEffect:t({},de)})},on:{beforeInit:function(e){if("flip"===e.params.effect){e.classNames.push(e.params.containerModifierClass+"flip"),e.classNames.push(e.params.containerModifierClass+"3d");var t={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};C(e.params,t),C(e.originalParams,t)}},setTranslate:function(e){"flip"===e.params.effect&&e.flipEffect.setTranslate()},setTransition:function(e,t){"flip"===e.params.effect&&e.flipEffect.setTransition(t)}}},{name:"effect-coverflow",params:{coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}},create:function(){I(this,{coverflowEffect:t({},pe)})},on:{beforeInit:function(e){"coverflow"===e.params.effect&&(e.classNames.push(e.params.containerModifierClass+"coverflow"),e.classNames.push(e.params.containerModifierClass+"3d"),e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0)},setTranslate:function(e){"coverflow"===e.params.effect&&e.coverflowEffect.setTranslate()},setTransition:function(e,t){"coverflow"===e.params.effect&&e.coverflowEffect.setTransition(t)}}},{name:"thumbs",params:{thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-container-thumbs"}},create:function(){I(this,{thumbs:t({swiper:null,initialized:!1},fe)})},on:{beforeInit:function(e){var t=e.params.thumbs;t&&t.swiper&&(e.thumbs.init(),e.thumbs.update(!0))},slideChange:function(e){e.thumbs.swiper&&e.thumbs.update()},update:function(e){e.thumbs.swiper&&e.thumbs.update()},resize:function(e){e.thumbs.swiper&&e.thumbs.update()},observerUpdate:function(e){e.thumbs.swiper&&e.thumbs.update()},setTransition:function(e,t){var n=e.thumbs.swiper;n&&n.setTransition(t)},beforeDestroy:function(e){var t=e.thumbs.swiper;t&&e.thumbs.swiperCreated&&t&&t.destroy()}}}];return U.use(ge),U})),function(e){function t(){}e.TLWSA=t,t.prototype.initTLWSA=function(){null!=fe&&me&&fe.close();null!=ge&&ve&&ge.close();fe=null,ge=null,me=!1,ve=!1,ye=null,xe={},(be={}).fun=0,we=!1,Se=i,Me=a},t.prototype.tlaOpen=function(n){if(me)return De("\u5df2\u7ecf\u8fde\u63a5\u5230\u670d\u52a1\u5668"),!1;var a="ws://"+n;if(De(a),"WebSocket"in e)fe=new WebSocket(a);else{if(!("MozWebSocket"in e))return alert("browser not support WebSocket"),!1;fe=new MozWebSocket(a)}return fe.onopen=function(){me=!0,De("\u8fde\u63a5\u670d\u52a1\u5668\u6210\u529f"),Ce(1),Se=i,clearInterval(ye),ye=setInterval((function(){Ae(be)}),2e3),t.onOpenreturn&&t.onOpenreturn(0)},fe.onclose=function(){me=!1,De("\u4e0e\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4e2d\u65ad"),ve||(we=!1,clearInterval(ye)),t.onClosed&&t.onClosed()},fe.onerror=function(){me=!1,ve||(we=!1),De("websocket\u51fa\u9519\u4e86"),t.onOpenreturn&&t.onOpenreturn(1)},fe.onmessage=function(e){return ke(e.data)},!0},t.prototype.tlaOpenSlaveServer=function(n){if(ve)return De("\u5df2\u7ecf\u8fde\u63a5\u5230\u5907\u7528\u670d\u52a1\u5668"),!1;if(we)return De("\u5fc5\u987b\u5728\u767b\u5f55\u4e4b\u524d\u8c03\u7528\u672c\u51fd\u6570"),!1;var i="ws://"+n;if(De(i),"WebSocket"in e)ge=new WebSocket(i);else{if(!("MozWebSocket"in e))return alert("browser not support WebSocket"),!1;ge=new MozWebSocket(i)}return ge.onopen=function(){ve=!0,De("\u8fde\u63a5\u5907\u7528\u670d\u52a1\u5668\u6210\u529f"),Ce(2),t.onOpenslaveserverreturn&&t.onOpenslaveserverreturn(0)},ge.onclose=function(){ve=!1,De("\u4e0e\u5907\u7528\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4e2d\u65ad"),me||(we=!1,clearInterval(ye)),t.onSlaveserverclosed&&t.onSlaveserverclosed()},ge.onerror=function(){ve=!1,me||(we=!1),De("\u8fde\u63a5\u5907\u7528\u670d\u52a1\u5668\u7684websocket\u51fa\u9519\u4e86"),t.onOpenslaveserverreturn&&t.onOpenslaveserverreturn(1)},ge.onmessage=function(e){ke(e.data)},!0},t.prototype.tlaClose=function(){null!=fe&&(fe.onerror=null,fe.onclose=null,fe.close());fe=null,me=!1,null!=ge&&(ge.onerror=null,ge.onclose=null,ge.close());ge=null,ve=!1,we=!1,De("socket to server closed")},t.prototype.tlaLogin=function(e,t,i,a){if(!me&&!ve)return De("in _tlaLogin not connected to server yet"),!1;if(we)return De("already login-ed"),!1;var o={};return o.fun=r,o.wid=e,o.gid=t,o.line=i,o.phonenumber=a,Ae(o),Se=n,Me=r,!0},t.prototype.tlaLogoff=function(){var e={};return e.fun=l,Ie(e)},t.prototype.tlaAcw=function(){var e={};return e.fun=o,Ie(e)},t.prototype.tlaWca=function(){var e={};return e.fun=s,Ie(e)},t.prototype.tlaMute=function(){var e={};return e.fun=P,Ie(e)},t.prototype.tlaUnmute=function(){var e={};return e.fun=z,Ie(e)},t.prototype.tlaSetphonenumber=function(e){var t={};return t.fun=T,t.phone=e,Ie(t)},t.prototype.tlaCallagc=function(e){var t={};return t.fun=u,t.mode=1,t.callee=e,Ie(t)},t.prototype.tlaCallout=function(e,t,n){var i={};return i.fun=u,i.mode=2,i.callee=e,i.caller=t,i.co=n,Ie(i)},t.prototype.tlaCancelcall=function(){var e={};return e.fun=v,Ie(e)},t.prototype.tlaTransfertoagc=function(e){var t={};return t.fun=h,t.mode=1,t.callee=e,Ie(t)},t.prototype.tlaTransferout=function(e,t,n){var i={};return i.fun=h,i.mode=2,i.callee=e,i.caller=t,i.co=n,Ie(i)},t.prototype.tlaCanceltransfer=function(){var e={};return e.fun=m,Ie(e)},t.prototype.tlaBlindtransfertoagc=function(e){var t={};return t.fun=Z,t.mode=1,t.callee=e,Ie(t)},t.prototype.tlaBlindtransferout=function(e,t,n){var i={};return i.fun=Z,i.mode=2,i.callee=e,i.caller=t,i.co=n,Ie(i)},t.prototype.tlaTransfertoivr=function(e,t){var n={};return n.fun=x,n.file=e,n.data=t,Ie(n)},t.prototype.tlaTransfertoivrandwait=function(e,t){var n={};return n.fun=N,n.file=e,n.data=t,Ie(n)},t.prototype.tlaStartlisten=function(e){var t={};return t.fun=d,t.wid=e,Ie(t)},t.prototype.tlaStoplisten=function(){var e={};return e.fun=p,Ie(e)},t.prototype.tlaKillworkid=function(e){if(!me)return De("not connected to server yet"),!1;var t={};return t.fun=k,t.mode=2,t.dest=e,Ae(t),Se=n,Me=k,!0},t.prototype.tlaForceonhook=function(e){var t={};return t.fun=M,t.wid=e,Ie(t)},t.prototype.tlaIntrude=function(e){var t={};return t.fun=I,t.wid=e,Ie(t)},t.prototype.tlaGetcall=function(e){var t={};return t.fun=C,t.wid=e,Ie(t)},t.prototype.tlaForceacw=function(e){var t={};return t.fun=k,t.mode=3,t.dest=e,Ie(t)},t.prototype.tlaForcewca=function(e){var t={};return t.fun=k,t.mode=4,t.dest=e,Ie(t)},t.prototype.tlaAnswercall=function(){var e={};return e.fun=f,Ie(e)},t.prototype.tlaOnhook=function(){var e={};return e.fun=g,Ie(e)},t.prototype.tlaHoldcall=function(){var e={};return e.fun=w,Ie(e)},t.prototype.tlaSwapcall=function(){var e={};return e.fun=L,Ie(e)},t.prototype.tlaActivatecall=function(){var e={};return e.fun=E,Ie(e)},t.prototype.tlaUnhold=function(){var e={};return e.fun=S,Ie(e)},t.prototype.tlaLoginotheragent=function(e,t,n,i){var a={};return a.fun=q,a.line=n,a.wid=e,a.gid=t,a.phone=i,Ie(a)},t.prototype.tlaSendmessagetoagent=function(e,t,n){var i={};return i.fun=X,i.mode=e,i.dest=t,i.msg=n,Ie(i)},t.prototype.tlaKillbyline=function(e){if(!me)return De("not connected to server yet"),!1;var t={};return t.fun=k,t.mode=1,t.dest=e,Ae(t),Se=n,Me=k,!0},t.prototype.tlaAnswerqueue=function(e){var t={};return t.fun=V,t.crs=e,Ie(t)},t.prototype.tlaOnhookline=function(e){var t={};return t.fun=k,t.mode=5,t.dest=e,Ie(t)},t.prototype.tlaGetagentcount=Te,t.prototype.tlaGetagentwid=function(e){var t=Te();return e>=0&&e<t?xe.p[2*e]:""},t.prototype.tlaGetagentstate=function(e){var t=Te();return e>=0&&e<t?xe.p[2*e+1]:0},t.prototype.tlaGetacdlength=function(){try{return xe.acdlen}catch(e){return 0}},t.prototype.tlaGettrknumber=function(){try{return xe.trkno}catch(e){return 0}},t.prototype.tlaGetlicenseinfo=function(){return _e},t.prototype.tlaSubscribestateinfo=function(e){var t={};return t.fun=F,t.level=e,Ie(t)},t.prototype.tlaConsulttransferout=function(e,t,n){var i={};return i.fun=ae,i.mode=2,i.callee=e,i.caller=t,i.co=n,Ie(i)},t.prototype.tlaConsulttransfertoagc=function(e){var t={};return t.fun=ae,t.mode=1,t.callee=e,Ie(t)},t.prototype.tlaCompleteconsulttransfer=function(){var e={};return e.fun=re,Ie(e)},t.prototype.tlaGetnodestate=function(e,t){var n={};return n.fun=ne,n.nodeid=e,n.type=t,Ie(n)},t.prototype.tlaTransfernode=function(e,t,n,i){var a={};return a.fun=ie,a.nodeid=e,a.wid=t,a.co=n,a.data=i,Ie(a)},t.prototype.tlaConferencestart=function(){var e={};return e.fun=se,Ie(e)},t.prototype.tlaConferenceappendmember=function(e,t,n,i,a){var r={};return r.fun=le,r.conferenceid=e,r.membertype=t,r.called=n,r.caller=i,r.canspeak=a,Ie(r)},t.prototype.tlaConferencequery=function(e){var t={};return t.fun=ue,t.conferenceid=e,Ie(t)},t.prototype.tlaConferencedismiss=function(e){var t={};return t.fun=ce,t.conferenceid=e,Ie(t)},t.prototype.tlaConferencekickout=function(e,t,n){var i={};return i.fun=de,i.conferenceid=e,i.membertype=t,i.called=n,Ie(i)},t.prototype.tlaConferencechangememberstate=function(e,t,n,i){var a={};return a.fun=pe,a.conferenceid=e,a.membertype=t,a.called=n,a.newstate=i,Ie(a)},t.onOpenreturn=null,t.onOpenslaveserverreturn=null,t.onLoginreturn=null,t.onLogoffreturn=null,t.onAcwreturn=null,t.onWcareturn=null,t.onMutereturn=null,t.onUnmutereturn=null,t.onSetphonenumberreturn=null,t.onCallreturn=null,t.onCancelcallreturn=null,t.onTransferreturn=null,t.onCanceltransferreturn=null,t.onBlindtransferreturn=null,t.onConsulttransferreturn=null,t.onCompleteconsulttransferreturn=null,t.onTransfertoivrreturn=null,t.onTransfertoivrandwaitreturn=null,t.onStartlistenreturn=null,t.onStoplistenreturn=null,t.onKillreturn=null,t.onForceonhookreturn=null,t.onIntrudereturn=null,t.onGetcallreturn=null,t.onAnswercallreturn=null,t.onOnhookreturn=null,t.onHoldcallreturn=null,t.onSwapcallreturn=null,t.onActivatecallreturn=null,t.onUnholdcallreturn=null,t.onLoginotheragentreturn=null,t.onSendmessagetoagentreturn=null,t.onAnswerqueuereturn=null,t.onSubscribestateinforeturn=null,t.onGetnodestatereturn=null,t.onTransfernodereturn=null,t.onConferencestartreturn=null,t.onConferenceappendmemberreturn=null,t.onConferencequeryreturn=null,t.onConferencedismissreturn=null,t.onConferencekickoutreturn=null,t.onConferencechangememberstatereturn=null,t.onCallin=null,t.onCallend=null,t.onAcw=null,t.onWca=null,t.onLogoff=null,t.onCallresult=null,t.onTransferresult=null,t.onBlindtransferresult=null,t.onAnswer=null,t.onClosed=null,t.onSlaveserverclosed=null,t.onHoldcallreleased=null,t.onKeepcallreleased=null,t.onCalleealerting=null,t.onQueue=null,t.onQuitqueue=null,t.onRecvmsg=null,t.onHookstate=null,t.onHardwarefail=null,t.onMisscall=null,t.onConsulttransfercalleeanswer=null,t.onStatechange=null,t.onMyStatechange=null,t.onConferencememberstate=null,t.onSlaveserverfail=null,t.onSwitchtoslaveserver=null,e.log=De;var n=1,i=2,a=0,r=1,o=2,s=3,l=4,u=5,c=6,h=8,d=9,p=10,f=11,g=13,m=14,v=15,y=16,x=17,_=18,b=22,w=25,S=26,M=29,T=31,C=32,I=33,A=34,D=35,k=36,L=40,E=41,P=42,z=43,O=44,N=45,R=46,B=47,V=48,G=49,W=50,H=53,F=54,$=55,X=56,Y=57,U=58,j=59,Z=61,q=62,K=71,J=72,Q=73,ee=74,te=75,ne=82,ie=83,ae=91,re=92,oe=93,se=94,le=95,ue=96,ce=97,he=98,de=99,pe=100001,fe=null,ge=null,me=!1,ve=!1,ye=null,xe={},_e={validdate:"0000-00-00",lines:"0",cardno:""},be={},we=!1,Se=i,Me=a;function Te(){try{return xe.p.length/2}catch(e){return 0}}function Ce(e){var t={fun:999};t.authcode=authCode,Ae(t,e)}function Ie(e){return we?(Ae(e),Se=n,Me=e.fun,!0):(De("not logined yet"),!1)}function Ae(e,t=3){if((1==t||3==t)&&null!=fe&&me){var n=JSON.stringify(e);e!=be&&De("\u53d1\u9001\u5230\u670d\u52a1\u7aef "+n),fe.send(n)}if((2==t||3==t)&&null!=ge&&ve){n=JSON.stringify(e);e!=be&&De("\u53d1\u9001\u5230\u5907\u7528\u670d\u52a1\u5668 "+n),ge.send(n)}}function De(e){var t=document.getElementById("logwindow");null!=t&&(t.value.length>5e3&&(t.value=""),t.value=t.value+(new Date).toLocaleString()+" "+e+"\n")}function ke(e){var a=JSON.parse(e);if(null==a)return De("recv invalid packet="+e),!1;switch(null!=a.r&&(a=a.r),"string"==typeof a.fun&&(a.fun=parseInt(a.fun)),a.fun){case r:0==a.err&&(we=!0),null!=t.onLoginreturn&&t.onLoginreturn(a.err),Se=i;break;case o:Se==n&&Me==a.fun?(null!=t.onAcwreturn&&t.onAcwreturn(a.err),Se=i):null!=t.onAcw&&t.onAcw(0);break;case s:Se==n&&Me==a.fun?(null!=t.onWcareturn&&t.onWcareturn(a.err),Se=i):t.onWca&&t.onWca(0);break;case P:Se==n&&Me==a.fun&&(null!=t.onMutereturn&&t.onMutereturn(a.err),Se=i);break;case z:Se==n&&Me==a.fun&&(null!=t.onUnmutereturn&&t.onUnmutereturn(a.err),Se=i);break;case l:0==a.err&&(we=!1),Se==n&&Me==a.fun?(null!=t.onLogoffreturn&&t.onLogoffreturn(a.err),Se=i):null!=t.onLogoff&&t.onLogoff(0);break;case u:Se==n&&Me==a.fun&&(null!=t.onCallreturn&&t.onCallreturn(a.err),Se=i);break;case c:t.onCallin&&t.onCallin(a);break;case h:Se==n&&Me==a.fun&&(null!=t.onTransferreturn&&t.onTransferreturn(a.err),Se=i);break;case d:Se==n&&Me==a.fun&&(null!=t.onStartlistenreturn&&t.onStartlistenreturn(a.err),Se=i);break;case p:Se==n&&Me==a.fun&&(null!=t.onStoplistenreturn&&t.onStoplistenreturn(a.err),Se=i);break;case f:Se==n&&Me==a.fun?(null!=t.onAnswercallreturn&&t.onAnswercallreturn(a.err),Se=i):null!=t.onAnswer&&t.onAnswer(0);break;case g:Se==n&&Me==a.fun?(null!=t.onOnhookreturn&&t.onOnhookreturn(a.err),Se=i):null!=t.onCallend&&t.onCallend(a);break;case m:Se==n&&Me==a.fun&&(null!=t.onCanceltransferreturn&&t.onCanceltransferreturn(a.err),Se=i);break;case ae:Se==n&&Me==a.fun&&(null!=t.onConsulttransferreturn&&t.onConsulttransferreturn(a.err),Se=i);break;case re:Se==n&&Me==a.fun&&(null!=t.onCompleteconsulttransferreturn&&t.onCompleteconsulttransferreturn(a.err),Se=i);break;case v:Se==n&&Me==a.fun&&(null!=t.onCancelcallreturn&&t.onCancelcallreturn(a.err),Se=i);break;case y:t.onCallend&&t.onCallend(a);break;case x:Se==n&&Me==a.fun&&(null!=t.onTransfertoivrreturn&&t.onTransfertoivrreturn(a.err),Se=i);break;case _:null!=t.onQueue&&t.onQueue(a.crs,a.caller,a.callee,a.data);break;case b:null!=t.onHoldcallreleased&&t.onHoldcallreleased(0);break;case w:Se==n&&Me==a.fun&&(null!=t.onHoldcallreturn&&t.onHoldcallreturn(a.err),Se=i);break;case S:Se==n&&Me==a.fun&&(null!=t.onUnholdcallreturn&&t.onUnholdcallreturn(a.err),Se=i);break;case M:Se==n&&Me==a.fun&&(null!=t.onForceonhookreturn&&t.onForceonhookreturn(a.err),Se=i);break;case T:Se==n&&Me==a.fun&&(null!=t.onSetphonenumberreturn&&t.onSetphonenumberreturn(a.err),Se=i);break;case C:Se==n&&Me==a.fun&&(null!=t.onGetcallreturn&&t.onGetcallreturn(a.err,a.caller,a.callee,a.data,a.crs),Se=i);break;case I:Se==n&&Me==a.fun&&(null!=t.onIntrudereturn&&t.onIntrudereturn(a.err),Se=i);break;case A:null!=t.onCallresult&&t.onCallresult(a);break;case D:null!=t.onTransferresult&&t.onTransferresult(a.err);break;case oe:null!=t.onConsulttransfercalleeanswer&&t.onConsulttransfercalleeanswer(a.crs);break;case k:Se==n&&Me==a.fun&&(null!=t.onKillreturn&&t.onKillreturn(a.err),Se=i);break;case L:Se==n&&Me==a.fun&&(null!=t.onSwapcallreturn&&t.onSwapcallreturn(a.err),Se=i);break;case E:Se==n&&Me==a.fun&&(null!=t.onActivatecallreturn&&t.onActivatecallreturn(a.err),Se=i);break;case O:xe=a,null!=t.onStatechange&&t.onStatechange();break;case $:null!=t.onMyStatechange&&t.onMyStatechange(a);break;case N:Se==n&&Me==a.fun&&(null!=t.onTransfertoivrreturn&&t.onTransfertoivrreturn(a.err),Se=i);break;case R:null!=t.onKeepcallreleased&&t.onKeepcallreleased(0);break;case B:null!=t.onQuitqueue&&t.onQuitqueue(a.crs);break;case V:Se==n&&Me==a.fun&&(null!=t.onAnswerqueuereturn&&t.onAnswerqueuereturn(a.err),Se=i);break;case G:null!=t.onAcw&&t.onAcw(0);break;case W:null!=t.onWca&&t.onWca(0);break;case H:_e=a;break;case X:Se==n&&Me==a.fun&&(null!=t.onSendmessagetoagentreturn&&t.onSendmessagetoagentreturn(a.err),Se=i);break;case Y:null!=t.onRecvmsg&&t.onRecvmsg(a.msg,a.from);break;case U:null!=t.onHardwarefail&&t.onHardwarefail(0);break;case j:null!=t.onHookstate&&t.onHookstate(a);break;case Z:Se==n&&Me==a.fun&&(null!=t.onBlindtransferreturn&&t.onBlindtransferreturn(a.err),Se=i);break;case ne:Se==n&&Me==a.fun&&(null!=t.onGetnodestatereturn&&t.onGetnodestatereturn(a),Se=i);break;case ie:Se==n&&Me==a.fun&&(null!=t.onTransfernodereturn&&t.onTransfernodereturn(a),Se=i);break;case q:Se==n&&Me==a.fun&&(null!=t.onLoginotheragentreturn&&t.onLoginotheragentreturn(a.err),Se=i);break;case K:null!=t.onMisscall&&t.onMisscall(0);break;case J:break;case Q:null!=t.onSlaveserverfail&&t.onSlaveserverfail(a.err);break;case ee:null!=t.onSwitchtoslaveserver&&t.onSwitchtoslaveserver(a.err);break;case te:null!=t.onCalleealerting&&t.onCalleealerting(0);break;case F:Se==n&&Me==a.fun&&(null!=t.onSubscribestateinforeturn&&t.onSubscribestateinforeturn(a.err),Se=i);break;case se:Se==n&&Me==a.fun&&(null!=t.onConferencestartreturn&&t.onConferencestartreturn(a),Se=i);break;case le:Se==n&&Me==a.fun&&(null!=t.onConferenceappendmemberreturn&&t.onConferenceappendmemberreturn(a),Se=i);break;case ue:Se==n&&Me==a.fun&&(null!=t.onConferencequeryreturn&&t.onConferencequeryreturn(a),Se=i);break;case ce:Se==n&&Me==a.fun&&(null!=t.onConferencedismissreturn&&t.onConferencedismissreturn(a),Se=i);break;case de:Se==n&&Me==a.fun&&(null!=t.onConferencekickoutreturn&&t.onConferencekickoutreturn(a),Se=i);break;case pe:Se==n&&Me==a.fun&&(null!=t.onConferencechangememberstatereturn&&t.onConferencechangememberstatereturn(a),Se=i);break;case he:null!=t.onConferencememberstate&&t.onConferencememberstate(a)}}}(window);var authCode="tlwsab",tlwsa=new TLWSA;function onopenslaveserverreturn(e){console.log("\u5e94\u7b54:\u8fde\u63a5\u5907\u7528\u670d\u52a1\u5668\u7ed3\u679c "+e)}function onmutereturn(e){console.log("\u5e94\u7b54:\u9759\u97f3\u8bf7\u6c42\u7ed3\u679c "+e)}function onunmutereturn(e){console.log("\u5e94\u7b54:\u53d6\u6d88\u9759\u97f3\u8bf7\u6c42\u7ed3\u679c "+e)}function oncancelcallreturn(e){console.log("\u5e94\u7b54:\u505c\u6b62\u547c\u53eb\u8bf7\u6c42\u7ed3\u679c "+e)}function oncanceltransferreturn(e){console.log("\u5e94\u7b54:\u505c\u6b62\u8f6c\u79fb\u8bf7\u6c42\u7ed3\u679c "+e)}function onblindtransferreturn(e){console.log("\u5e94\u7b54:\u76f2\u8f6c\u8bf7\u6c42\u7ed3\u679c "+e)}function ontransfertoivrreturn(e){console.log("\u5e94\u7b54:\u8f6civr\u8bf7\u6c42\u7ed3\u679c "+e)}function ontransfertoivrandwaitreturn(e){console.log("\u5e94\u7b54:\u8f6civr\u5e76\u7b49\u5f85\u8bf7\u6c42\u7ed3\u679c "+e)}function onstartlistenreturn(e){console.log("\u5e94\u7b54:\u76d1\u542c\u8bf7\u6c42\u7ed3\u679c "+e)}function onstoplistenreturn(e){console.log("\u5e94\u7b54:\u505c\u6b62\u76d1\u542c\u8bf7\u6c42\u7ed3\u679c "+e)}function onforceonhookreturn(e){console.log("\u5e94\u7b54:\u5f3a\u62c6\u5750\u5e2d\u8bf7\u6c42\u7ed3\u679c "+e)}function onintrudereturn(e){console.log("\u5e94\u7b54:\u5f3a\u63d2\u8bf7\u6c42\u7ed3\u679c "+e)}function ongetcallreturn(e,t,n,i,a){console.log("\u5e94\u7b54:\u4ee3\u63a5\u8bf7\u6c42\u7ed3\u679c "+e+" "+t)}function onanswercallreturn(e){console.log("\u5e94\u7b54:\u5e94\u7b54\u8bf7\u6c42\u7ed3\u679c "+e)}function ononhookreturn(e){console.log("\u5e94\u7b54:\u6302\u673a\u8bf7\u6c42\u7ed3\u679c "+e)}function onholdcallreturn(e){console.log("\u5e94\u7b54:\u4fdd\u6301\u8bf7\u6c42\u7ed3\u679c "+e)}function onswapcallreturn(e){console.log("\u5e94\u7b54:\u5207\u6362\u547c\u53eb\u8bf7\u6c42\u7ed3\u679c "+e)}function onactivatecallreturn(e){console.log("\u5e94\u7b54:\u6fc0\u6d3b\u547c\u53eb\u8bf7\u6c42\u7ed3\u679c "+e)}function onunholdcallreturn(e){console.log("\u5e94\u7b54:\u53d6\u56de\u4fdd\u6301\u547c\u53eb\u8bf7\u6c42\u7ed3\u679c "+e)}function onloginotheragentreturn(e){console.log("\u5e94\u7b54:\u767b\u5f55\u5176\u4ed6\u5750\u5e2d\u8bf7\u6c42\u7ed3\u679c "+e)}function onsendmessagetoagentreturn(e){console.log("\u5e94\u7b54:\u53d1\u9001\u6d88\u606f\u8bf7\u6c42\u7ed3\u679c "+e)}function onanswerqueuereturn(e){console.log("\u5e94\u7b54:\u5e94\u7b54\u961f\u5217\u4e2d\u7684\u5916\u7ebf\u8bf7\u6c42\u7ed3\u679c "+e)}function onconsulttransferreturn(e){console.log("\u5e94\u7b54\uff1a\u54a8\u8be2\u8f6c\u79fb\u8bf7\u6c42\u7ed3\u679c "+e)}function oncompleteconsulttransferreturn(e){console.log("\u5e94\u7b54\uff1a\u5b8c\u6210\u54a8\u8be2\u8f6c\u79fb\u8bf7\u6c42\u7ed3\u679c "+e)}function ongetnodestatereturn(e){console.log("node state \u7ed3\u679c "+JSON.stringify(e))}function ontransfernodereturn(e){console.log("transfer node \u7ed3\u679c "+JSON.stringify(e))}function onconferencestartreturn(e){console.log("\u542f\u52a8\u4f1a\u8bae \u7ed3\u679c "+e.err+" \u4f1a\u8baeID="+e.conferenceid),0==e.err&&(conferenceid.value=e.conferenceid)}function onconferenceappendmemberreturn(e){console.log("\u6dfb\u52a0\u4f1a\u8bae\u6210\u5458 \u7ed3\u679c "+JSON.stringify(e))}function onconferencequeryreturn(e){console.log("\u4f1a\u8bae\u72b6\u6001\u67e5\u8be2 \u7ed3\u679c "+JSON.stringify(e))}function onconferencedismissreturn(e){console.log("\u89e3\u6563\u4f1a\u8bae \u7ed3\u679c "+JSON.stringify(e))}function onconferencekickoutreturn(e){console.log("\u8e22\u51fa\u6210\u5458 \u7ed3\u679c "+JSON.stringify(e))}function onconferencechangememberstatereturn(e){console.log("\u6539\u53d8\u6210\u5458\u72b6\u6001 \u7ed3\u679c "+e.err)}function onlogoff(){console.log("\u4e8b\u4ef6:\u60a8\u5df2\u7ecf\u88ab\u6ce8\u9500")}function onconsulttransfercalleeanswer(e){console.log("\u4e8b\u4ef6:\u54a8\u8be2\u8f6c\u79fb\u88ab\u53eb\u5e94\u7b54 crs="+e)}function onblindtransferresult(e){console.log("\u4e8b\u4ef6:\u76f2\u8f6c\u7ed3\u679c "+JSON.stringify(e))}function onslaveserverclosed(e){console.log("\u4e8b\u4ef6:\u4e0e\u5907\u7528\u670d\u52a1\u5668\u7684\u7f51\u7edc\u8fde\u63a5\u4e2d\u65ad")}function onholdcallreleased(e){console.log("\u4e8b\u4ef6:\u88ab\u4fdd\u6301\u7684\u5bf9\u65b9\u5df2\u6302\u673a")}function onkeepcallreleased(e){console.log("\u4e8b\u4ef6:\u8f6c\u56deivr\u5e76\u7b49\u5f85\u7684\u5916\u7ebf\u5df2\u6302\u673a")}function oncalleealerting(e){console.log("\u4e8b\u4ef6:\u547c\u53eb\u7684\u5916\u7ebf\u5df2\u7ecf\u5f00\u59cb\u632f\u94c3")}function onqueue(e,t,n,i){console.log("\u4e8b\u4ef6:\u5916\u7ebf\u8fdb\u5165\u961f\u5217\uff0ccrs,caller,callee,data= "+e+" "+t+" "+n+" "+i)}function onmystatechange(e){console.log("\u4e8b\u4ef6:\u72b6\u6001\u53d8\u5316----------------------------------------------------"),console.log(JSON.stringify(e))}function onquitqueue(e){console.log("\u4e8b\u4ef6:\u5916\u7ebf\u9000\u51fa\u961f\u5217,crs= "+e)}function onrecvmsg(e,t){console.log("\u4e8b\u4ef6:\u6536\u5230\u6765\u81ea"+t+"\u7684\u6d88\u606f:"+e)}function onhookstate(e){console.log("\u4e8b\u4ef6:\u5750\u5e2d\u53c9\u7c27\u72b6\u6001"+JSON.stringify(e))}function onhardwarefail(e){console.log("\u4e8b\u4ef6:keygoe\u4ea4\u6362\u673a\u786c\u4ef6\u6545\u969c")}function onconferencememberstate(e){console.log("\u4f1a\u8bae\u6210\u5458\u72b6\u6001\u53d1\u751f\u53d8\u5316 "+JSON.stringify(e))}function onslaveserverfail(e){console.log("\u6ce8\u610f\uff1a\u5907\u7528\u670d\u52a1\u5668\u5df2\u5931\u8054")}function onswitchtoslaveserver(e){console.log("\u6ce8\u610f\uff1a\u4e3b\u670d\u52a1\u5668\u6545\u969c\uff0c\u5df2\u7ecf\u5207\u6362\u5230\u5907\u7528\u670d\u52a1\u5668")}function queryAgentState(){console.log("\u6392\u961f\u5916\u7ebf\u6570\u91cf "+tlwsa.tlaGetacdlength()),console.log("\u5916\u7ebf\u603b\u6570\u91cf "+tlwsa.tlaGettrknumber());var e=tlwsa.tlaGetagentcount();console.log("\u767b\u5f55\u5750\u5e2d\u6570\u91cf "+e);for(var t=0;t<e;t++)console.log("agnet No. "+t+" workid is "+tlwsa.tlaGetagentwid(t)+" state is "+tlwsa.tlaGetagentstate(t)+" "+getStateInfo(tlwsa.tlaGetagentstate(t)))}function getLicenseInfo(){ajo=tlwsa.tlaGetlicenseinfo(),console.log("\u6388\u6743\u6709\u6548\u671f "+ajo.validdate+" \u6388\u6743\u7ebf\u6570 "+ajo.lines+" \u5361\u53f7 "+ajo.cardno)}function getStateInfo(e){switch(e){case"0":return"\u672a\u767b\u5f55";case"1":return"\u7a7a\u95f2";case"2":return"\u79bb\u5e2d";case"3":return"\u6b63\u5728\u632f\u94c3";case"4":return"\u64ad\u62a5\u5de5\u53f7";case"5":return"\u901a\u8bdd\u4e2d";case"6":return"\u6b63\u5728\u5916\u547c";case"7":return"\u6b63\u5728\u8f6c\u79fb";case"8":return"\u6b63\u5728\u76d1\u542c"}}window.onload=function(){tlwsa.initTLWSA()},TLWSA.onOpenslaveserverreturn=onopenslaveserverreturn,TLWSA.onMutereturn=onmutereturn,TLWSA.onUnmutereturn=onunmutereturn,TLWSA.onCancelcallreturn=oncancelcallreturn,TLWSA.onCanceltransferreturn=oncanceltransferreturn,TLWSA.onBlindtransferreturn=onblindtransferreturn,TLWSA.onTransfertoivrreturn=ontransfertoivrreturn,TLWSA.onTransfertoivrandwaitreturn=ontransfertoivrandwaitreturn,TLWSA.onStartlistenreturn=onstartlistenreturn,TLWSA.onStoplistenreturn=onstoplistenreturn,TLWSA.onForceonhookreturn=onforceonhookreturn,TLWSA.onIntrudereturn=onintrudereturn,TLWSA.onGetcallreturn=ongetcallreturn,TLWSA.onAnswercallreturn=onanswercallreturn,TLWSA.onOnhookreturn=ononhookreturn,TLWSA.onHoldcallreturn=onholdcallreturn,TLWSA.onSwapcallreturn=onswapcallreturn,TLWSA.onActivatecallreturn=onactivatecallreturn,TLWSA.onUnholdcallreturn=onunholdcallreturn,TLWSA.onLoginotheragentreturn=onloginotheragentreturn,TLWSA.onSendmessagetoagentreturn=onsendmessagetoagentreturn,TLWSA.onAnswerqueuereturn=onanswerqueuereturn,TLWSA.onConsulttransferreturn=onconsulttransferreturn,TLWSA.onCompleteconsulttransferreturn=oncompleteconsulttransferreturn,TLWSA.onGetnodestatereturn=ongetnodestatereturn,TLWSA.onTransfernodereturn=ontransfernodereturn,TLWSA.onConferencestartreturn=onconferencestartreturn,TLWSA.onConferenceappendmemberreturn=onconferenceappendmemberreturn,TLWSA.onConferencequeryreturn=onconferencequeryreturn,TLWSA.onConferencedismissreturn=onconferencedismissreturn,TLWSA.onConferencekickoutreturn=onconferencekickoutreturn,TLWSA.onConferencechangememberstatereturn=onconferencechangememberstatereturn,TLWSA.onLogoff=onlogoff,TLWSA.onConsulttransfercalleeanswer=onconsulttransfercalleeanswer,TLWSA.onBlindtransferresult=onblindtransferresult,TLWSA.onSlaveserverclosed=onslaveserverclosed,TLWSA.onHoldcallreleased=onholdcallreleased,TLWSA.onKeepcallreleased=onkeepcallreleased,TLWSA.onCalleealerting=oncalleealerting,TLWSA.onQueue=onqueue,TLWSA.onQuitqueue=onquitqueue,TLWSA.onRecvmsg=onrecvmsg,TLWSA.onHookstate=onhookstate,TLWSA.onHardwarefail=onhardwarefail,TLWSA.onConferencememberstate=onconferencememberstate,TLWSA.onSlaveserverfail=onslaveserverfail,TLWSA.onSwitchtoslaveserver=onswitchtoslaveserver;