mirror of
https://github.com/XiaoDaiGua-Ray/ray-template.git
synced 2025-04-05 19:42:07 +08:00
29 lines
434 KiB
JavaScript
29 lines
434 KiB
JavaScript
import{i as G,r as Ta,m as F,c as U,e as w,a as se,b as lt,d as Y,f as le,g as po,h as N,j as fe,k as Up,l as B,n as X,o as On,p as ze,P as Se,q as _l,s as ie,t as Yp,Z as Or,C as Ga,E as Wc,S as or,R as Hc,u as cs,v as Nn,w as he,L as er,B as Uc,A as vs,x as Xp,y as re,z as mt,D as Zp,F as $p,G as Kp,H as Yc,I as go,T as Xc,J as hs,K as tr,M as qp,N as Ye,O as jp,Q as ge,U as Qp,V as Zc,W as Da,X as we,Y as Jp,_ as Ce,$ as Bn,a0 as K,a1 as $,a2 as xt,a3 as eg,a4 as He,a5 as J,a6 as Be,a7 as be,a8 as oe,a9 as Aa,aa as tg,ab as yt,ac as mo,ad as $c,ae as rg,af as ng,ag,ah as Vn,ai as Sl,aj as pi,ak as ig,al as yo,am as _o,an as og,ao as ds,ap as xl,aq as gi,ar as sg,as as lg,at as Kc,au as on,av as Dr,aw as qc,ax as ug,ay as fg,az as cg,aA as So,aB as bl,aC as vg,aD as hg,aE as dg,aF as pg,aG as gg,aH as wl,aI as Cl,aJ as mg,aK as yg,aL as _g,aM as Sg,aN as xg,aO as bg,aP as wg,aQ as Cg,aR as Tg,aS as Dg}from"./zrender@5.5.0-DW8ownf1.js";import{_ as V}from"./tslib@2.3.0-BDyQ-Jie.js";var Tl=1e-4,jc=20;function Ag(r){return r.replace(/^\s+|\s+$/g,"")}function Ot(r,t,e,n){var a=t[0],i=t[1],o=e[0],s=e[1],l=i-a,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(n)if(l>0){if(r<=a)return o;if(r>=i)return s}else{if(r>=a)return o;if(r<=i)return s}else{if(r===a)return o;if(r===i)return s}return(r-a)/l*u+o}function te(r,t){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return G(r)?Ag(r).match(/%$/)?parseFloat(r)/100*t:parseFloat(r):r==null?NaN:+r}function _e(r,t,e){return t==null&&(t=10),t=Math.min(Math.max(0,t),jc),r=(+r).toFixed(t),e?r:+r}function Ig(r){return r.sort(function(t,e){return t-e}),r}function pt(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var t=1,e=0;e<15;e++,t*=10)if(Math.round(r*t)/t===r)return e}return Mg(r)}function Mg(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),n=e>0?+t.slice(e+1):0,a=e>0?e:t.length,i=t.indexOf("."),o=i<0?0:a-1-i;return Math.max(0,o-n)}function Qc(r,t){var e=Math.log,n=Math.LN10,a=Math.floor(e(r[1]-r[0])/n),i=Math.round(e(Math.abs(t[1]-t[0]))/n),o=Math.min(Math.max(-a+i,0),20);return isFinite(o)?o:20}function Lg(r,t){var e=Ta(r,function(v,d){return v+(isNaN(d)?0:d)},0);if(e===0)return[];for(var n=Math.pow(10,t),a=F(r,function(v){return(isNaN(v)?0:v)/e*n*100}),i=n*100,o=F(a,function(v){return Math.floor(v)}),s=Ta(o,function(v,d){return v+d},0),l=F(a,function(v,d){return v-o[d]});s<i;){for(var u=Number.NEGATIVE_INFINITY,f=null,c=0,h=l.length;c<h;++c)l[c]>u&&(u=l[c],f=c);++o[f],l[f]=0,++s}return F(o,function(v){return v/n})}function Pg(r,t){var e=Math.max(pt(r),pt(t)),n=r+t;return e>jc?n:_e(n,e)}function Jc(r){var t=Math.PI*2;return(r%t+t)%t}function Ia(r){return r>-Tl&&r<Tl}var Rg=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function _t(r){if(r instanceof Date)return r;if(G(r)){var t=Rg.exec(r);if(!t)return new Date(NaN);if(t[8]){var e=+t[4]||0;return t[8].toUpperCase()!=="Z"&&(e-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,e,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}else return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}else if(r==null)return new Date(NaN);return new Date(Math.round(r))}function kg(r){return Math.pow(10,ps(r))}function ps(r){if(r===0)return 0;var t=Math.floor(Math.log(r)/Math.LN10);return r/Math.pow(10,t)>=10&&t++,t}function ev(r,t){var e=ps(r),n=Math.pow(10,e),a=r/n,i;return a<1.5?i=1:a<2.5?i=2:a<4?i=3:a<7?i=5:i=10,r=i*n,e>=-20?+r.toFixed(e<0?-e:0):r}function zt(r){var t=parseFloat(r);return t==r&&(t!==0||!G(r)||r.indexOf("x")<=0)?t:NaN}function tv(r){return!isNaN(zt(r))}function rv(){return Math.round(Math.random()*9)}function nv(r,t){return t===0?r:nv(t,r%t)}function Dl(r,t){return r==null?t:t==null?r:r*t/nv(r,t)}function Q(r){throw new Error(r)}function Al(r,t,e){return(t-r)*e+r}var av="series\0",iv="\0_ec_\0";function de(r){return r instanceof Array?r:r==null?[]:[r]}function xo(r,t,e){if(r){r[t]=r[t]||{},r.emphasis=r.emphasis||{},r.emphasis[t]=r.emphasis[t]||{};for(var n=0,a=e.length;n<a;n++){var i=e[n];!r.emphasis[t].hasOwnProperty(i)&&r[t].hasOwnProperty(i)&&(r.emphasis[t][i]=r[t][i])}}}var Il=["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 zn(r){return Y(r)&&!N(r)&&!(r instanceof Date)?r.value:r}function Eg(r){return Y(r)&&!(r instanceof Array)}function Og(r,t,e){var n=e==="normalMerge",a=e==="replaceMerge",i=e==="replaceAll";r=r||[],t=(t||[]).slice();var o=U();w(t,function(l,u){if(!Y(l)){t[u]=null;return}});var s=Ng(r,o,e);return(n||a)&&Bg(s,r,o,t),n&&Vg(s,t),n||a?zg(s,t,a):i&&Fg(s,t),Gg(s),s}function Ng(r,t,e){var n=[];if(e==="replaceAll")return n;for(var a=0;a<r.length;a++){var i=r[a];i&&i.id!=null&&t.set(i.id,a),n.push({existing:e==="replaceMerge"||Sn(i)?null:i,newOption:null,keyInfo:null,brandNew:null})}return n}function Bg(r,t,e,n){w(n,function(a,i){if(!(!a||a.id==null)){var o=cn(a.id),s=e.get(o);if(s!=null){var l=r[s];lt(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=a,l.existing=t[s],n[i]=null}}})}function Vg(r,t){w(t,function(e,n){if(!(!e||e.name==null))for(var a=0;a<r.length;a++){var i=r[a].existing;if(!r[a].newOption&&i&&(i.id==null||e.id==null)&&!Sn(e)&&!Sn(i)&&ov("name",i,e)){r[a].newOption=e,t[n]=null;return}}})}function zg(r,t,e){w(t,function(n){if(n){for(var a,i=0;(a=r[i])&&(a.newOption||Sn(a.existing)||a.existing&&n.id!=null&&!ov("id",n,a.existing));)i++;a?(a.newOption=n,a.brandNew=e):r.push({newOption:n,brandNew:e,existing:null,keyInfo:null}),i++}})}function Fg(r,t){w(t,function(e){r.push({newOption:e,brandNew:!0,existing:null,keyInfo:null})})}function Gg(r){var t=U();w(r,function(e){var n=e.existing;n&&t.set(n.id,e)}),w(r,function(e){var n=e.newOption;lt(!n||n.id==null||!t.get(n.id)||t.get(n.id)===e,"id duplicates: "+(n&&n.id)),n&&n.id!=null&&t.set(n.id,e),!e.keyInfo&&(e.keyInfo={})}),w(r,function(e,n){var a=e.existing,i=e.newOption,o=e.keyInfo;if(Y(i)){if(o.name=i.name!=null?cn(i.name):a?a.name:av+n,a)o.id=cn(a.id);else if(i.id!=null)o.id=cn(i.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(t.get(o.id))}t.set(o.id,e)}})}function ov(r,t,e){var n=ot(t[r],null),a=ot(e[r],null);return n!=null&&a!=null&&n===a}function cn(r){return ot(r,"")}function ot(r,t){return r==null?t:G(r)?r:le(r)||po(r)?r+"":t}function gs(r){var t=r.name;return!!(t&&t.indexOf(av))}function Sn(r){return r&&r.id!=null&&cn(r.id).indexOf(iv)===0}function Wg(r){return iv+r}function Hg(r,t,e){w(r,function(n){var a=n.newOption;Y(a)&&(n.keyInfo.mainType=t,n.keyInfo.subType=Ug(t,a,n.existing,e))})}function Ug(r,t,e,n){var a=t.type?t.type:e?e.subType:n.determineSubType(r,t);return a}function rr(r,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return N(t.dataIndex)?F(t.dataIndex,function(e){return r.indexOfRawIndex(e)}):r.indexOfRawIndex(t.dataIndex);if(t.name!=null)return N(t.name)?F(t.name,function(e){return r.indexOfName(e)}):r.indexOfName(t.name)}function ue(){var r="__ec_inner_"+Yg++;return function(t){return t[r]||(t[r]={})}}var Yg=rv();function vn(r,t,e){var n=ms(t,e),a=n.mainTypeSpecified,i=n.queryOptionMap,o=n.others,s=o,l=e?e.defaultMainType:null;return!a&&l&&i.set(l,{}),i.each(function(u,f){var c=Fn(r,f,u,{useDefault:l===f,enableAll:e&&e.enableAll!=null?e.enableAll:!0,enableNone:e&&e.enableNone!=null?e.enableNone:!0});s[f+"Models"]=c.models,s[f+"Model"]=c.models[0]}),s}function ms(r,t){var e;if(G(r)){var n={};n[r+"Index"]=0,e=n}else e=r;var a=U(),i={},o=!1;return w(e,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){i[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],f=u[1],c=(u[2]||"").toLowerCase();if(!(!f||!c||t&&t.includeMainTypes&&se(t.includeMainTypes,f)<0)){o=o||!!f;var h=a.get(f)||a.set(f,{});h[c]=s}}),{mainTypeSpecified:o,queryOptionMap:a,others:i}}var Re={useDefault:!0,enableAll:!1,enableNone:!1},Xg={useDefault:!1,enableAll:!0,enableNone:!0};function Fn(r,t,e,n){n=n||Re;var a=e.index,i=e.id,o=e.name,s={models:null,specified:a!=null||i!=null||o!=null};if(!s.specified){var l=void 0;return s.models=n.useDefault&&(l=r.getComponent(t))?[l]:[],s}return a==="none"||a===!1?(lt(n.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):(a==="all"&&(lt(n.enableAll,'`"all"` is not a valid value on index option.'),a=i=o=null),s.models=r.queryComponents({mainType:t,index:a,id:i,name:o}),s)}function sv(r,t,e){r.setAttribute?r.setAttribute(t,e):r[t]=e}function Zg(r,t){return r.getAttribute?r.getAttribute(t):r[t]}function $g(r){return r==="auto"?fe.domSupported?"html":"richText":r||"html"}function lv(r,t,e,n,a){var i=t==null||t==="auto";if(n==null)return n;if(le(n)){var o=Al(e||0,n,a);return _e(o,i?Math.max(pt(e||0),pt(n)):t)}else{if(G(n))return a<1?e:n;for(var s=[],l=e,u=n,f=Math.max(l?l.length:0,u.length),c=0;c<f;++c){var h=r.getDimensionInfo(c);if(h&&h.type==="ordinal")s[c]=(a<1&&l?l:u)[c];else{var v=l&&l[c]?l[c]:0,d=u[c],o=Al(v,d,a);s[c]=_e(o,i?Math.max(pt(v),pt(d)):t)}}return s}}var Kg=".",Ut="___EC__COMPONENT__CONTAINER___",uv="___EC__EXTENDED_CLASS___";function nt(r){var t={main:"",sub:""};if(r){var e=r.split(Kg);t.main=e[0]||"",t.sub=e[1]||""}return t}function qg(r){lt(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function jg(r){return!!(r&&r[uv])}function ys(r,t){r.$constructor=r,r.extend=function(e){var n=this,a;return Qg(n)?a=function(i){V(o,i);function o(){return i.apply(this,arguments)||this}return o}(n):(a=function(){(e.$constructor||n).apply(this,arguments)},Up(a,this)),B(a.prototype,e),a[uv]=!0,a.extend=this.extend,a.superCall=tm,a.superApply=rm,a.superClass=n,a}}function Qg(r){return X(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function fv(r,t){r.extend=t.extend}var Jg=Math.round(Math.random()*10);function em(r){var t=["__\0is_clz",Jg++].join("_");r.prototype[t]=!0,r.isInstance=function(e){return!!(e&&e[t])}}function tm(r,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];return this.superClass.prototype[t].apply(r,e)}function rm(r,t,e){return this.superClass.prototype[t].apply(r,e)}function Wa(r){var t={};r.registerClass=function(n){var a=n.type||n.prototype.type;if(a){qg(a),n.prototype.type=a;var i=nt(a);if(!i.sub)t[i.main]=n;else if(i.sub!==Ut){var o=e(i);o[i.sub]=n}}return n},r.getClass=function(n,a,i){var o=t[n];if(o&&o[Ut]&&(o=a?o[a]:null),i&&!o)throw new Error(a?"Component "+n+"."+(a||"")+" is used but not imported.":n+".type should be specified.");return o},r.getClassesByMainType=function(n){var a=nt(n),i=[],o=t[a.main];return o&&o[Ut]?w(o,function(s,l){l!==Ut&&i.push(s)}):i.push(o),i},r.hasClass=function(n){var a=nt(n);return!!t[a.main]},r.getAllClassMainTypes=function(){var n=[];return w(t,function(a,i){n.push(i)}),n},r.hasSubTypes=function(n){var a=nt(n),i=t[a.main];return i&&i[Ut]};function e(n){var a=t[n.main];return(!a||!a[Ut])&&(a=t[n.main]={},a[Ut]=!0),a}}function xn(r,t){for(var e=0;e<r.length;e++)r[e][1]||(r[e][1]=r[e][0]);return t=t||!1,function(n,a,i){for(var o={},s=0;s<r.length;s++){var l=r[s][1];if(!(a&&se(a,l)>=0||i&&se(i,l)<0)){var u=n.getShallow(l,t);u!=null&&(o[r[s][0]]=u)}}return o}}var nm=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],am=xn(nm),im=function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return am(this,t,e)},r}(),Z=ue(),om=function(r,t,e,n){if(n){var a=Z(n);a.dataIndex=e,a.dataType=t,a.seriesIndex=r,a.ssrType="chart",n.type==="group"&&n.traverse(function(i){var o=Z(i);o.seriesIndex=r,o.dataIndex=e,o.dataType=t,o.ssrType="chart"})}},Ml=1,Ll={},cv=ue(),_s=ue(),Ss=0,Ha=1,Ua=2,Xe=["emphasis","blur","select"],Ma=["normal","emphasis","blur","select"],sm=10,lm=9,Qt="highlight",ga="downplay",hn="select",ma="unselect",dn="toggleSelect";function ur(r){return r!=null&&r!=="none"}function Ya(r,t,e){r.onHoverStateChange&&(r.hoverState||0)!==e&&r.onHoverStateChange(t),r.hoverState=e}function vv(r){Ya(r,"emphasis",Ua)}function hv(r){r.hoverState===Ua&&Ya(r,"normal",Ss)}function xs(r){Ya(r,"blur",Ha)}function dv(r){r.hoverState===Ha&&Ya(r,"normal",Ss)}function um(r){r.selected=!0}function fm(r){r.selected=!1}function Pl(r,t,e){t(r,e)}function bt(r,t,e){Pl(r,t,e),r.isGroup&&r.traverse(function(n){Pl(n,t,e)})}function Rl(r,t){switch(t){case"emphasis":r.hoverState=Ua;break;case"normal":r.hoverState=Ss;break;case"blur":r.hoverState=Ha;break;case"select":r.selected=!0}}function cm(r,t,e,n){for(var a=r.style,i={},o=0;o<t.length;o++){var s=t[o],l=a[s];i[s]=l??(n&&n[s])}for(var o=0;o<r.animators.length;o++){var u=r.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(e)<0&&u.targetName==="style"&&u.saveTo(i,t)}return i}function vm(r,t,e,n){var a=e&&se(e,"select")>=0,i=!1;if(r instanceof Se){var o=cv(r),s=a&&o.selectFill||o.normalFill,l=a&&o.selectStroke||o.normalStroke;if(ur(s)||ur(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(i=!0,n=B({},n),u=B({},u),u.fill=s):!ur(u.fill)&&ur(s)?(i=!0,n=B({},n),u=B({},u),u.fill=_l(s)):!ur(u.stroke)&&ur(l)&&(i||(n=B({},n),u=B({},u)),u.stroke=_l(l)),n.style=u}}if(n&&n.z2==null){i||(n=B({},n));var f=r.z2EmphasisLift;n.z2=r.z2+(f??sm)}return n}function hm(r,t,e){if(e&&e.z2==null){e=B({},e);var n=r.z2SelectLift;e.z2=r.z2+(n??lm)}return e}function dm(r,t,e){var n=se(r.currentStates,t)>=0,a=r.style.opacity,i=n?null:cm(r,["opacity"],t,{opacity:1});e=e||{};var o=e.style||{};return o.opacity==null&&(e=B({},e),o=B({opacity:n?a:i.opacity*.1},o),e.style=o),e}function mi(r,t){var e=this.states[r];if(this.style){if(r==="emphasis")return vm(this,r,t,e);if(r==="blur")return dm(this,r,e);if(r==="select")return hm(this,r,e)}return e}function pm(r){r.stateProxy=mi;var t=r.getTextContent(),e=r.getTextGuideLine();t&&(t.stateProxy=mi),e&&(e.stateProxy=mi)}function kl(r,t){!yv(r,t)&&!r.__highByOuter&&bt(r,vv)}function El(r,t){!yv(r,t)&&!r.__highByOuter&&bt(r,hv)}function Ar(r,t){r.__highByOuter|=1<<(t||0),bt(r,vv)}function Ir(r,t){!(r.__highByOuter&=~(1<<(t||0)))&&bt(r,hv)}function gm(r){bt(r,xs)}function pv(r){bt(r,dv)}function gv(r){bt(r,um)}function mv(r){bt(r,fm)}function yv(r,t){return r.__highDownSilentOnTouch&&t.zrByTouch}function _v(r){var t=r.getModel(),e=[],n=[];t.eachComponent(function(a,i){var o=_s(i),s=a==="series",l=s?r.getViewOfSeriesModel(i):r.getViewOfComponentModel(i);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){dv(u)}),s&&e.push(i)),o.isBlured=!1}),w(n,function(a){a&&a.toggleBlurSeries&&a.toggleBlurSeries(e,!1,t)})}function bo(r,t,e,n){var a=n.getModel();e=e||"coordinateSystem";function i(u,f){for(var c=0;c<f.length;c++){var h=u.getItemGraphicEl(f[c]);h&&pv(h)}}if(r!=null&&!(!t||t==="none")){var o=a.getSeriesByIndex(r),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];a.eachSeries(function(u){var f=o===u,c=u.coordinateSystem;c&&c.master&&(c=c.master);var h=c&&s?c===s:f;if(!(e==="series"&&!f||e==="coordinateSystem"&&!h||t==="series"&&f)){var v=n.getViewOfSeriesModel(u);if(v.group.traverse(function(g){g.__highByOuter&&f&&t==="self"||xs(g)}),On(t))i(u.getData(),t);else if(Y(t))for(var d=ze(t),p=0;p<d.length;p++)i(u.getData(d[p]),t[d[p]]);l.push(u),_s(u).isBlured=!0}}),a.eachComponent(function(u,f){if(u!=="series"){var c=n.getViewOfComponentModel(f);c&&c.toggleBlurSeries&&c.toggleBlurSeries(l,!0,a)}})}}function wo(r,t,e){if(!(r==null||t==null)){var n=e.getModel().getComponent(r,t);if(n){_s(n).isBlured=!0;var a=e.getViewOfComponentModel(n);!a||!a.focusBlurEnabled||a.group.traverse(function(i){xs(i)})}}}function mm(r,t,e){var n=r.seriesIndex,a=r.getData(t.dataType);if(a){var i=rr(a,t);i=(N(i)?i[0]:i)||0;var o=a.getItemGraphicEl(i);if(!o)for(var s=a.count(),l=0;!o&&l<s;)o=a.getItemGraphicEl(l++);if(o){var u=Z(o);bo(n,u.focus,u.blurScope,e)}else{var f=r.get(["emphasis","focus"]),c=r.get(["emphasis","blurScope"]);f!=null&&bo(n,f,c,e)}}}function bs(r,t,e,n){var a={focusSelf:!1,dispatchers:null};if(r==null||r==="series"||t==null||e==null)return a;var i=n.getModel().getComponent(r,t);if(!i)return a;var o=n.getViewOfComponentModel(i);if(!o||!o.findHighDownDispatchers)return a;for(var s=o.findHighDownDispatchers(e),l,u=0;u<s.length;u++)if(Z(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function ym(r,t,e){var n=Z(r),a=bs(n.componentMainType,n.componentIndex,n.componentHighDownName,e),i=a.dispatchers,o=a.focusSelf;i?(o&&wo(n.componentMainType,n.componentIndex,e),w(i,function(s){return kl(s,t)})):(bo(n.seriesIndex,n.focus,n.blurScope,e),n.focus==="self"&&wo(n.componentMainType,n.componentIndex,e),kl(r,t))}function _m(r,t,e){_v(e);var n=Z(r),a=bs(n.componentMainType,n.componentIndex,n.componentHighDownName,e).dispatchers;a?w(a,function(i){return El(i,t)}):El(r,t)}function Sm(r,t,e){if(Do(t)){var n=t.dataType,a=r.getData(n),i=rr(a,t);N(i)||(i=[i]),r[t.type===dn?"toggleSelect":t.type===hn?"select":"unselect"](i,n)}}function Ol(r){var t=r.getAllData();w(t,function(e){var n=e.data,a=e.type;n.eachItemGraphicEl(function(i,o){r.isSelected(o,a)?gv(i):mv(i)})})}function xm(r){var t=[];return r.eachSeries(function(e){var n=e.getAllData();w(n,function(a){a.data;var i=a.type,o=e.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:e.seriesIndex};i!=null&&(s.dataType=i),t.push(s)}})}),t}function Co(r,t,e){Sv(r,!0),bt(r,pm),wm(r,t,e)}function bm(r){Sv(r,!1)}function Mr(r,t,e,n){n?bm(r):Co(r,t,e)}function wm(r,t,e){var n=Z(r);t!=null?(n.focus=t,n.blurScope=e):n.focus&&(n.focus=null)}var Nl=["emphasis","blur","select"],Cm={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function bn(r,t,e,n){e=e||"itemStyle";for(var a=0;a<Nl.length;a++){var i=Nl[a],o=t.getModel([i,e]),s=r.ensureState(i);s.style=o[Cm[e]]()}}function Sv(r,t){var e=t===!1,n=r;r.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=r.highDownSilentOnTouch),(!e||n.__highDownDispatcher)&&(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!e)}function To(r){return!!(r&&r.__highDownDispatcher)}function Tm(r){var t=Ll[r];return t==null&&Ml<=32&&(t=Ll[r]=Ml++),t}function Do(r){var t=r.type;return t===hn||t===ma||t===dn}function Bl(r){var t=r.type;return t===Qt||t===ga}function Dm(r){var t=cv(r);t.normalFill=r.style.fill,t.normalStroke=r.style.stroke;var e=r.states.select||{};t.selectFill=e.style&&e.style.fill||null,t.selectStroke=e.style&&e.style.stroke||null}var xv=ue();function Xa(r,t,e,n,a){var i;if(t&&t.ecModel){var o=t.ecModel.getUpdatePayload();i=o&&o.animation}var s=t&&t.isAnimationEnabled(),l=r==="update";if(s){var u=void 0,f=void 0,c=void 0;n?(u=ie(n.duration,200),f=ie(n.easing,"cubicOut"),c=0):(u=t.getShallow(l?"animationDurationUpdate":"animationDuration"),f=t.getShallow(l?"animationEasingUpdate":"animationEasing"),c=t.getShallow(l?"animationDelayUpdate":"animationDelay")),i&&(i.duration!=null&&(u=i.duration),i.easing!=null&&(f=i.easing),i.delay!=null&&(c=i.delay)),X(c)&&(c=c(e,a)),X(u)&&(u=u(e));var h={duration:u||0,delay:c,easing:f};return h}else return null}function ws(r,t,e,n,a,i,o){var s=!1,l;X(a)?(o=i,i=a,a=null):Y(a)&&(i=a.cb,o=a.during,s=a.isFrom,l=a.removeOpt,a=a.dataIndex);var u=r==="leave";u||t.stopAnimation("leave");var f=Xa(r,n,a,u?l||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(t,a):null);if(f&&f.duration>0){var c=f.duration,h=f.delay,v=f.easing,d={duration:c,delay:h||0,easing:v,done:i,force:!!i||!!o,setToFinal:!u,scope:r,during:o};s?t.animateFrom(e,d):t.animateTo(e,d)}else t.stopAnimation(),!s&&t.attr(e),o&&o(1),i&&i()}function me(r,t,e,n,a,i){ws("update",r,t,e,n,a,i)}function De(r,t,e,n,a,i){ws("enter",r,t,e,n,a,i)}function Sr(r){if(!r.__zr)return!0;for(var t=0;t<r.animators.length;t++){var e=r.animators[t];if(e.scope==="leave")return!0}return!1}function wn(r,t,e,n,a,i){Sr(r)||ws("leave",r,t,e,n,a,i)}function Vl(r,t,e,n){r.removeTextContent(),r.removeTextGuideLine(),wn(r,{style:{opacity:0}},t,e,n)}function La(r,t,e){function n(){r.parent&&r.parent.remove(r)}r.isGroup?r.traverse(function(a){a.isGroup||Vl(a,t,e,n)}):Vl(r,t,e,n)}function Za(r){xv(r).oldStyle=r.style}function Am(r){return xv(r).oldStyle}var Pa=Math.max,Ra=Math.min,Ao={};function Im(r){return Se.extend(r)}var Mm=qp;function Lm(r,t){return Mm(r,t)}function tt(r,t){Ao[r]=t}function Pm(r){if(Ao.hasOwnProperty(r))return Ao[r]}function Cs(r,t,e,n){var a=Yp(r,t);return e&&(n==="center"&&(e=wv(e,a.getBoundingRect())),Cv(a,e)),a}function bv(r,t,e){var n=new Or({style:{image:r,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(a){if(e==="center"){var i={width:a.width,height:a.height};n.setStyle(wv(t,i))}}});return n}function wv(r,t){var e=t.width/t.height,n=r.height*e,a;n<=r.width?a=r.height:(n=r.width,a=n/e);var i=r.x+r.width/2,o=r.y+r.height/2;return{x:i-n/2,y:o-a/2,width:n,height:a}}var Rm=Zp;function Cv(r,t){if(r.applyTransform){var e=r.getBoundingRect(),n=e.calculateTransform(t);r.applyTransform(n)}}function Cn(r,t){return $p(r,r,{lineWidth:t}),r}function km(r){return Kp(r.shape,r.shape,r.style),r}var ya=Xp;function Ts(r,t){for(var e=Yc([]);r&&r!==t;)go(e,r.getLocalTransform(),e),r=r.parent;return e}function Ds(r,t,e){return t&&!On(t)&&(t=Xc.getLocalTransform(t)),e&&(t=hs([],t)),tr([],r,t)}function Tv(r,t,e){var n=t[4]===0||t[5]===0||t[0]===0?1:Math.abs(2*t[4]/t[0]),a=t[4]===0||t[5]===0||t[2]===0?1:Math.abs(2*t[4]/t[2]),i=[r==="left"?-n:r==="right"?n:0,r==="top"?-a:r==="bottom"?a:0];return i=Ds(i,t,e),Math.abs(i[0])>Math.abs(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function zl(r){return!r.isGroup}function Em(r){return r.shape!=null}function Dv(r,t,e){if(!r||!t)return;function n(o){var s={};return o.traverse(function(l){zl(l)&&l.anid&&(s[l.anid]=l)}),s}function a(o){var s={x:o.x,y:o.y,rotation:o.rotation};return Em(o)&&(s.shape=B({},o.shape)),s}var i=n(r);t.traverse(function(o){if(zl(o)&&o.anid){var s=i[o.anid];if(s){var l=a(o);o.attr(a(s)),me(o,l,e,Z(o).dataIndex)}}})}function Av(r,t){return F(r,function(e){var n=e[0];n=Pa(n,t.x),n=Ra(n,t.x+t.width);var a=e[1];return a=Pa(a,t.y),a=Ra(a,t.y+t.height),[n,a]})}function Om(r,t){var e=Pa(r.x,t.x),n=Ra(r.x+r.width,t.x+t.width),a=Pa(r.y,t.y),i=Ra(r.y+r.height,t.y+t.height);if(n>=e&&i>=a)return{x:e,y:a,width:n-e,height:i-a}}function $a(r,t,e){var n=B({rectHover:!0},t),a=n.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(a.image=r.slice(8),re(a,e),new Or(n)):Cs(r.replace("path://",""),n,e,"center")}function Nm(r,t,e,n,a){for(var i=0,o=a[a.length-1];i<a.length;i++){var s=a[i];if(Iv(r,t,e,n,s[0],s[1],o[0],o[1]))return!0;o=s}}function Iv(r,t,e,n,a,i,o,s){var l=e-r,u=n-t,f=o-a,c=s-i,h=yi(f,c,l,u);if(Bm(h))return!1;var v=r-a,d=t-i,p=yi(v,d,l,u)/h;if(p<0||p>1)return!1;var g=yi(v,d,f,c)/h;return!(g<0||g>1)}function yi(r,t,e,n){return r*n-e*t}function Bm(r){return r<=1e-6&&r>=-1e-6}function Ka(r){var t=r.itemTooltipOption,e=r.componentModel,n=r.itemName,a=G(t)?{formatter:t}:t,i=e.mainType,o=e.componentIndex,s={componentType:i,name:n,$vars:["name"]};s[i+"Index"]=o;var l=r.formatterParamsExtra;l&&w(ze(l),function(f){mt(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=Z(r.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:n,option:re({content:n,formatterParams:s},a)}}function Fl(r,t){var e;r.isGroup&&(e=t(r)),e||r.traverse(t)}function Gn(r,t){if(r)if(N(r))for(var e=0;e<r.length;e++)Fl(r[e],t);else Fl(r,t)}tt("circle",Ga);tt("ellipse",Wc);tt("sector",or);tt("ring",Hc);tt("polygon",cs);tt("polyline",Nn);tt("rect",he);tt("line",er);tt("bezierCurve",Uc);tt("arc",vs);const As=Object.freeze(Object.defineProperty({__proto__:null,Arc:vs,BezierCurve:Uc,BoundingRect:Ye,Circle:Ga,CompoundPath:jp,Ellipse:Wc,Group:ge,Image:Or,IncrementalDisplayable:Qp,Line:er,LinearGradient:Zc,OrientedBoundingRect:Da,Path:Se,Point:we,Polygon:cs,Polyline:Nn,RadialGradient:Jp,Rect:he,Ring:Hc,Sector:or,Text:Ce,applyTransform:Ds,clipPointsByRect:Av,clipRectByRect:Om,createIcon:$a,extendPath:Lm,extendShape:Im,getShapeClass:Pm,getTransform:Ts,groupTransition:Dv,initProps:De,isElementRemoved:Sr,lineLineIntersect:Iv,linePolygonIntersect:Nm,makeImage:bv,makePath:Cs,mergePath:Rm,registerShape:tt,removeElement:wn,removeElementWithFadeOut:La,resizePath:Cv,setTooltipConfig:Ka,subPixelOptimize:ya,subPixelOptimizeLine:Cn,subPixelOptimizeRect:km,transformDirection:Tv,traverseElements:Gn,updateProps:me},Symbol.toStringTag,{value:"Module"}));var qa={};function Mv(r,t){for(var e=0;e<Xe.length;e++){var n=Xe[e],a=t[n],i=r.ensureState(n);i.style=i.style||{},i.style.text=a}var o=r.currentStates.slice();r.clearStates(!0),r.setStyle({text:t.normal}),r.useStates(o,!0)}function Io(r,t,e){var n=r.labelFetcher,a=r.labelDataIndex,i=r.labelDimIndex,o=t.normal,s;n&&(s=n.getFormattedLabel(a,"normal",null,i,o&&o.get("formatter"),e!=null?{interpolatedValue:e}:null)),s==null&&(s=X(r.defaultText)?r.defaultText(a,r,e):r.defaultText);for(var l={normal:s},u=0;u<Xe.length;u++){var f=Xe[u],c=t[f];l[f]=ie(n?n.getFormattedLabel(a,f,null,i,c&&c.get("formatter")):null,s)}return l}function Nr(r,t,e,n){e=e||qa;for(var a=r instanceof Ce,i=!1,o=0;o<Ma.length;o++){var s=t[Ma[o]];if(s&&s.getShallow("show")){i=!0;break}}var l=a?r:r.getTextContent();if(i){a||(l||(l=new Ce,r.setTextContent(l)),r.stateProxy&&(l.stateProxy=r.stateProxy));var u=Io(e,t),f=t.normal,c=!!f.getShallow("show"),h=Ft(f,n&&n.normal,e,!1,!a);h.text=u.normal,a||r.setTextConfig(Gl(f,e,!1));for(var o=0;o<Xe.length;o++){var v=Xe[o],s=t[v];if(s){var d=l.ensureState(v),p=!!ie(s.getShallow("show"),c);if(p!==c&&(d.ignore=!p),d.style=Ft(s,n&&n[v],e,!0,!a),d.style.text=u[v],!a){var g=r.ensureState(v);g.textConfig=Gl(s,e,!0)}}}l.silent=!!f.getShallow("silent"),l.style.x!=null&&(h.x=l.style.x),l.style.y!=null&&(h.y=l.style.y),l.ignore=!c,l.useStyle(h),l.dirty(),e.enableTextSetter&&(Vr(l).setLabelText=function(m){var y=Io(e,t,m);Mv(l,y)})}else l&&(l.ignore=!0);r.dirty()}function Br(r,t){t=t||"label";for(var e={normal:r.getModel(t)},n=0;n<Xe.length;n++){var a=Xe[n];e[a]=r.getModel([a,t])}return e}function Ft(r,t,e,n,a){var i={};return Vm(i,r,e,n,a),t&&B(i,t),i}function Gl(r,t,e){t=t||{};var n={},a,i=r.getShallow("rotate"),o=ie(r.getShallow("distance"),e?null:5),s=r.getShallow("offset");return a=r.getShallow("position")||(e?null:"inside"),a==="outside"&&(a=t.defaultOutsidePosition||"top"),a!=null&&(n.position=a),s!=null&&(n.offset=s),i!=null&&(i*=Math.PI/180,n.rotation=i),o!=null&&(n.distance=o),n.outsideFill=r.get("color")==="inherit"?t.inheritColor||null:"auto",n}function Vm(r,t,e,n,a){e=e||qa;var i=t.ecModel,o=i&&i.option.textStyle,s=zm(t),l;if(s){l={};for(var u in s)if(s.hasOwnProperty(u)){var f=t.getModel(["rich",u]);Yl(l[u]={},f,o,e,n,a,!1,!0)}}l&&(r.rich=l);var c=t.get("overflow");c&&(r.overflow=c);var h=t.get("minMargin");h!=null&&(r.margin=h),Yl(r,t,o,e,n,a,!0,!1)}function zm(r){for(var t;r&&r!==r.ecModel;){var e=(r.option||qa).rich;if(e){t=t||{};for(var n=ze(e),a=0;a<n.length;a++){var i=n[a];t[i]=1}}r=r.parentModel}return t}var Wl=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],Hl=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],Ul=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function Yl(r,t,e,n,a,i,o,s){e=!a&&e||qa;var l=n&&n.inheritColor,u=t.getShallow("color"),f=t.getShallow("textBorderColor"),c=ie(t.getShallow("opacity"),e.opacity);(u==="inherit"||u==="auto")&&(l?u=l:u=null),(f==="inherit"||f==="auto")&&(l?f=l:f=null),i||(u=u||e.color,f=f||e.textBorderColor),u!=null&&(r.fill=u),f!=null&&(r.stroke=f);var h=ie(t.getShallow("textBorderWidth"),e.textBorderWidth);h!=null&&(r.lineWidth=h);var v=ie(t.getShallow("textBorderType"),e.textBorderType);v!=null&&(r.lineDash=v);var d=ie(t.getShallow("textBorderDashOffset"),e.textBorderDashOffset);d!=null&&(r.lineDashOffset=d),!a&&c==null&&!s&&(c=n&&n.defaultOpacity),c!=null&&(r.opacity=c),!a&&!i&&r.fill==null&&n.inheritColor&&(r.fill=n.inheritColor);for(var p=0;p<Wl.length;p++){var g=Wl[p],m=ie(t.getShallow(g),e[g]);m!=null&&(r[g]=m)}for(var p=0;p<Hl.length;p++){var g=Hl[p],m=t.getShallow(g);m!=null&&(r[g]=m)}if(r.verticalAlign==null){var y=t.getShallow("baseline");y!=null&&(r.verticalAlign=y)}if(!o||!n.disableBox){for(var p=0;p<Ul.length;p++){var g=Ul[p],m=t.getShallow(g);m!=null&&(r[g]=m)}var _=t.getShallow("borderType");_!=null&&(r.borderDash=_),(r.backgroundColor==="auto"||r.backgroundColor==="inherit")&&l&&(r.backgroundColor=l),(r.borderColor==="auto"||r.borderColor==="inherit")&&l&&(r.borderColor=l)}}function Lv(r,t){var e=t&&t.getModel("textStyle");return Bn([r.fontStyle||e&&e.getShallow("fontStyle")||"",r.fontWeight||e&&e.getShallow("fontWeight")||"",(r.fontSize||e&&e.getShallow("fontSize")||12)+"px",r.fontFamily||e&&e.getShallow("fontFamily")||"sans-serif"].join(" "))}var Vr=ue();function Fm(r,t,e,n){if(r){var a=Vr(r);a.prevValue=a.value,a.value=e;var i=t.normal;a.valueAnimation=i.get("valueAnimation"),a.valueAnimation&&(a.precision=i.get("precision"),a.defaultInterpolatedText=n,a.statesModels=t)}}function Gm(r,t,e,n,a){var i=Vr(r);if(!i.valueAnimation||i.prevValue===i.value)return;var o=i.defaultInterpolatedText,s=ie(i.interpolatedValue,i.prevValue),l=i.value;function u(f){var c=lv(e,i.precision,s,l,f);i.interpolatedValue=f===1?null:c;var h=Io({labelDataIndex:t,labelFetcher:a,defaultText:o?o(c):c+""},i.statesModels,c);Mv(r,h)}r.percent=0,(i.prevValue==null?De:me)(r,{percent:1},n,t,null,u)}var Wm=["textStyle","color"],_i=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],Si=new Ce,Hm=function(){function r(){}return r.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(Wm):null)},r.prototype.getFont=function(){return Lv({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},r.prototype.getTextRect=function(t){for(var e={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<_i.length;n++)e[_i[n]]=this.getShallow(_i[n]);return Si.useStyle(e),Si.update(),Si.getBoundingRect()},r}(),Pv=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],Um=xn(Pv),Ym=function(){function r(){}return r.prototype.getLineStyle=function(t){return Um(this,t)},r}(),Rv=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],Xm=xn(Rv),Zm=function(){function r(){}return r.prototype.getItemStyle=function(t,e){return Xm(this,t,e)},r}(),ce=function(){function r(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}return r.prototype.init=function(t,e,n){},r.prototype.mergeOption=function(t,e){K(this.option,t,!0)},r.prototype.get=function(t,e){return t==null?this.option:this._doGet(this.parsePath(t),!e&&this.parentModel)},r.prototype.getShallow=function(t,e){var n=this.option,a=n==null?n:n[t];if(a==null&&!e){var i=this.parentModel;i&&(a=i.getShallow(t))}return a},r.prototype.getModel=function(t,e){var n=t!=null,a=n?this.parsePath(t):null,i=n?this._doGet(a):this.option;return e=e||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(a)),new r(i,e,this.ecModel)},r.prototype.isEmpty=function(){return this.option==null},r.prototype.restoreData=function(){},r.prototype.clone=function(){var t=this.constructor;return new t($(this.option))},r.prototype.parsePath=function(t){return typeof t=="string"?t.split("."):t},r.prototype.resolveParentPath=function(t){return t},r.prototype.isAnimationEnabled=function(){if(!fe.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},r.prototype._doGet=function(t,e){var n=this.option;if(!t)return n;for(var a=0;a<t.length&&!(t[a]&&(n=n&&typeof n=="object"?n[t[a]]:null,n==null));a++);return n==null&&e&&(n=e._doGet(this.resolveParentPath(t),e.parentModel)),n},r}();ys(ce);em(ce);xt(ce,Ym);xt(ce,Zm);xt(ce,im);xt(ce,Hm);var $m=Math.round(Math.random()*10);function Wn(r){return[r||"",$m++].join("_")}function Km(r){var t={};r.registerSubTypeDefaulter=function(e,n){var a=nt(e);t[a.main]=n},r.determineSubType=function(e,n){var a=n.type;if(!a){var i=nt(e).main;r.hasSubTypes(e)&&t[i]&&(a=t[i](n))}return a}}function qm(r,t){r.topologicalTravel=function(i,o,s,l){if(!i.length)return;var u=e(o),f=u.graph,c=u.noEntryList,h={};for(w(i,function(y){h[y]=!0});c.length;){var v=c.pop(),d=f[v],p=!!h[v];p&&(s.call(l,v,d.originalDeps.slice()),delete h[v]),w(d.successor,p?m:g)}w(h,function(){var y="";throw new Error(y)});function g(y){f[y].entryCount--,f[y].entryCount===0&&c.push(y)}function m(y){h[y]=!0,g(y)}};function e(i){var o={},s=[];return w(i,function(l){var u=n(o,l),f=u.originalDeps=t(l),c=a(f,i);u.entryCount=c.length,u.entryCount===0&&s.push(l),w(c,function(h){se(u.predecessor,h)<0&&u.predecessor.push(h);var v=n(o,h);se(v.successor,h)<0&&v.successor.push(l)})}),{graph:o,noEntryList:s}}function n(i,o){return i[o]||(i[o]={predecessor:[],successor:[]}),i[o]}function a(i,o){var s=[];return w(i,function(l){se(o,l)>=0&&s.push(l)}),s}}function Is(r,t){return K(K({},r,!0),t,!0)}const jm={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},Qm={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var ka="ZH",Ms="EN",xr=Ms,_a={},Ls={},kv=fe.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||xr).toUpperCase();return r.indexOf(ka)>-1?ka:xr}():xr;function Ev(r,t){r=r.toUpperCase(),Ls[r]=new ce(t),_a[r]=t}function Jm(r){if(G(r)){var t=_a[r.toUpperCase()]||{};return r===ka||r===Ms?$(t):K($(t),$(_a[xr]),!1)}else return K($(r),$(_a[xr]),!1)}function ey(r){return Ls[r]}function ty(){return Ls[xr]}Ev(Ms,jm);Ev(ka,Qm);var Ps=1e3,Rs=Ps*60,pn=Rs*60,Ue=pn*24,Xl=Ue*365,sn={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},$n="{yyyy}-{MM}-{dd}",Zl={year:"{yyyy}",month:"{yyyy}-{MM}",day:$n,hour:$n+" "+sn.hour,minute:$n+" "+sn.minute,second:$n+" "+sn.second,millisecond:sn.none},xi=["year","month","day","hour","minute","second","millisecond"],Ov=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Dt(r,t){return r+="","0000".substr(0,t-r.length)+r}function br(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function ry(r){return r===br(r)}function ny(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function ja(r,t,e,n){var a=_t(r),i=a[ks(e)](),o=a[wr(e)]()+1,s=Math.floor((o-1)/3)+1,l=a[Qa(e)](),u=a["get"+(e?"UTC":"")+"Day"](),f=a[Tn(e)](),c=(f-1)%12+1,h=a[Ja(e)](),v=a[ei(e)](),d=a[ti(e)](),p=n instanceof ce?n:ey(n||kv)||ty(),g=p.getModel("time"),m=g.get("month"),y=g.get("monthAbbr"),_=g.get("dayOfWeek"),S=g.get("dayOfWeekAbbr");return(t||"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,Dt(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,m[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,Dt(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Dt(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,_[u]).replace(/{ee}/g,S[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Dt(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,Dt(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,Dt(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,Dt(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,Dt(d,3)).replace(/{S}/g,d+"")}function ay(r,t,e,n,a){var i=null;if(G(e))i=e;else if(X(e))i=e(r.value,t,{level:r.level});else{var o=B({},sn);if(r.level>0)for(var s=0;s<xi.length;++s)o[xi[s]]="{primary|"+o[xi[s]]+"}";var l=e?e.inherit===!1?e:re(e,o):o,u=Nv(r.value,a);if(l[u])i=l[u];else if(l.inherit){for(var f=Ov.indexOf(u),s=f-1;s>=0;--s)if(l[u]){i=l[u];break}i=i||o.none}if(N(i)){var c=r.level==null?0:r.level>=0?r.level:i.length+r.level;c=Math.min(c,i.length-1),i=i[c]}}return ja(new Date(r.value),i,a,n)}function Nv(r,t){var e=_t(r),n=e[wr(t)]()+1,a=e[Qa(t)](),i=e[Tn(t)](),o=e[Ja(t)](),s=e[ei(t)](),l=e[ti(t)](),u=l===0,f=u&&s===0,c=f&&o===0,h=c&&i===0,v=h&&a===1,d=v&&n===1;return d?"year":v?"month":h?"day":c?"hour":f?"minute":u?"second":"millisecond"}function $l(r,t,e){var n=le(r)?_t(r):r;switch(t=t||Nv(r,e),t){case"year":return n[ks(e)]();case"half-year":return n[wr(e)]()>=6?1:0;case"quarter":return Math.floor((n[wr(e)]()+1)/4);case"month":return n[wr(e)]();case"day":return n[Qa(e)]();case"half-day":return n[Tn(e)]()/24;case"hour":return n[Tn(e)]();case"minute":return n[Ja(e)]();case"second":return n[ei(e)]();case"millisecond":return n[ti(e)]()}}function ks(r){return r?"getUTCFullYear":"getFullYear"}function wr(r){return r?"getUTCMonth":"getMonth"}function Qa(r){return r?"getUTCDate":"getDate"}function Tn(r){return r?"getUTCHours":"getHours"}function Ja(r){return r?"getUTCMinutes":"getMinutes"}function ei(r){return r?"getUTCSeconds":"getSeconds"}function ti(r){return r?"getUTCMilliseconds":"getMilliseconds"}function iy(r){return r?"setUTCFullYear":"setFullYear"}function Bv(r){return r?"setUTCMonth":"setMonth"}function Vv(r){return r?"setUTCDate":"setDate"}function zv(r){return r?"setUTCHours":"setHours"}function Fv(r){return r?"setUTCMinutes":"setMinutes"}function Gv(r){return r?"setUTCSeconds":"setSeconds"}function Wv(r){return r?"setUTCMilliseconds":"setMilliseconds"}function Hv(r){if(!tv(r))return G(r)?r:"-";var t=(r+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function Uv(r,t){return r=(r||"").toLowerCase().replace(/-(.)/g,function(e,n){return n.toUpperCase()}),t&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var ri=eg;function Mo(r,t,e){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function a(f){return f&&Bn(f)?f:"-"}function i(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=t==="time",s=r instanceof Date;if(o||s){var l=o?_t(r):r;if(isNaN(+l)){if(s)return"-"}else return ja(l,n,e)}if(t==="ordinal")return po(r)?a(r):le(r)&&i(r)?r+"":"-";var u=zt(r);return i(u)?Hv(u):po(r)?a(r):typeof r=="boolean"?r+"":"-"}var Kl=["a","b","c","d","e","f","g"],bi=function(r,t){return"{"+r+(t??"")+"}"};function Yv(r,t,e){N(t)||(t=[t]);var n=t.length;if(!n)return"";for(var a=t[0].$vars||[],i=0;i<a.length;i++){var o=Kl[i];r=r.replace(bi(o),bi(o,0))}for(var s=0;s<n;s++)for(var l=0;l<a.length;l++){var u=t[s][a[l]];r=r.replace(bi(Kl[l],s),e?He(u):u)}return r}function oy(r,t){var e=G(r)?{color:r,extraCssText:t}:r||{},n=e.color,a=e.type;t=e.extraCssText;var i=e.renderMode||"html";if(!n)return"";if(i==="html")return a==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+He(n)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+He(n)+";"+(t||"")+'"></span>';var o=e.markerId||"markerX";return{renderMode:i,content:"{"+o+"|} ",style:a==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function nr(r,t){return t=t||"transparent",G(r)?r:Y(r)&&r.colorStops&&(r.colorStops[0]||{}).color||t}function ql(r,t){if(t==="_blank"||t==="blank"){var e=window.open();e.opener=null,e.location.href=r}else window.open(r,t)}var Sa=w,sy=["left","right","top","bottom","width","height"],Kn=[["width","left","right"],["height","top","bottom"]];function Es(r,t,e,n,a){var i=0,o=0;n==null&&(n=1/0),a==null&&(a=1/0);var s=0;t.eachChild(function(l,u){var f=l.getBoundingRect(),c=t.childAt(u+1),h=c&&c.getBoundingRect(),v,d;if(r==="horizontal"){var p=f.width+(h?-h.x+f.x:0);v=i+p,v>n||l.newline?(i=0,v=p,o+=s+e,s=f.height):s=Math.max(s,f.height)}else{var g=f.height+(h?-h.y+f.y:0);d=o+g,d>a||l.newline?(i+=s+e,o=0,d=g,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),r==="horizontal"?i=v+e:o=d+e)})}var Cr=Es;J(Es,"vertical");J(Es,"horizontal");function Gt(r,t,e){e=ri(e||0);var n=t.width,a=t.height,i=te(r.left,n),o=te(r.top,a),s=te(r.right,n),l=te(r.bottom,a),u=te(r.width,n),f=te(r.height,a),c=e[2]+e[0],h=e[1]+e[3],v=r.aspect;switch(isNaN(u)&&(u=n-s-h-i),isNaN(f)&&(f=a-l-c-o),v!=null&&(isNaN(u)&&isNaN(f)&&(v>n/a?u=n*.8:f=a*.8),isNaN(u)&&(u=v*f),isNaN(f)&&(f=u/v)),isNaN(i)&&(i=n-s-u-h),isNaN(o)&&(o=a-l-f-c),r.left||r.right){case"center":i=n/2-u/2-e[3];break;case"right":i=n-u-h;break}switch(r.top||r.bottom){case"middle":case"center":o=a/2-f/2-e[0];break;case"bottom":o=a-f-c;break}i=i||0,o=o||0,isNaN(u)&&(u=n-h-i-(s||0)),isNaN(f)&&(f=a-c-o-(l||0));var d=new Ye(i+e[3],o+e[0],u,f);return d.margin=e,d}function ly(r,t,e,n,a,i){i=i||r,i.x=r.x,i.y=r.y;var o;if(o=r.getBoundingRect(),r.needLocalTransform()){var s=r.getLocalTransform();o=o.clone(),o.applyTransform(s)}var l=Gt(re({width:o.width,height:o.height},t),e,n),u=l.x-o.x,f=l.y-o.y;return i.x+=u,i.y+=f,i===r&&r.markRedraw(),!0}function Dn(r){var t=r.layoutMode||r.constructor.layoutMode;return Y(t)?t:t?{type:t}:null}function Lr(r,t,e){var n=e&&e.ignoreSize;!N(n)&&(n=[n,n]);var a=o(Kn[0],0),i=o(Kn[1],1);u(Kn[0],r,a),u(Kn[1],r,i);function o(f,c){var h={},v=0,d={},p=0,g=2;if(Sa(f,function(_){d[_]=r[_]}),Sa(f,function(_){s(t,_)&&(h[_]=d[_]=t[_]),l(h,_)&&v++,l(d,_)&&p++}),n[c])return l(t,f[1])?d[f[2]]=null:l(t,f[2])&&(d[f[1]]=null),d;if(p===g||!v)return d;if(v>=g)return h;for(var m=0;m<f.length;m++){var y=f[m];if(!s(h,y)&&s(r,y)){h[y]=r[y];break}}return h}function s(f,c){return f.hasOwnProperty(c)}function l(f,c){return f[c]!=null&&f[c]!=="auto"}function u(f,c,h){Sa(f,function(v){c[v]=h[v]})}}function ni(r){return uy({},r)}function uy(r,t){return t&&r&&Sa(sy,function(e){t.hasOwnProperty(e)&&(r[e]=t[e])}),r}var fy=ue(),ee=function(r){V(t,r);function t(e,n,a){var i=r.call(this,e,n,a)||this;return i.uid=Wn("ec_cpt_model"),i}return t.prototype.init=function(e,n,a){this.mergeDefaultAndTheme(e,a)},t.prototype.mergeDefaultAndTheme=function(e,n){var a=Dn(this),i=a?ni(e):{},o=n.getTheme();K(e,o.get(this.mainType)),K(e,this.getDefaultOption()),a&&Lr(e,i,a)},t.prototype.mergeOption=function(e,n){K(this.option,e,!0);var a=Dn(this);a&&Lr(this.option,e,a)},t.prototype.optionUpdated=function(e,n){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!jg(e))return e.defaultOption;var n=fy(this);if(!n.defaultOption){for(var a=[],i=e;i;){var o=i.prototype.defaultOption;o&&a.push(o),i=i.superClass}for(var s={},l=a.length-1;l>=0;l--)s=K(s,a[l],!0);n.defaultOption=s}return n.defaultOption},t.prototype.getReferringComponents=function(e,n){var a=e+"Index",i=e+"Id";return Fn(this.ecModel,e,{index:this.get(a,!0),id:this.get(i,!0)},n)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0}(),t}(ce);fv(ee,ce);Wa(ee);Km(ee);qm(ee,cy);function cy(r){var t=[];return w(ee.getClassesByMainType(r),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=F(t,function(e){return nt(e).main}),r!=="dataset"&&se(t,"dataset")<=0&&t.unshift("dataset"),t}var Xv="";typeof navigator<"u"&&(Xv=navigator.platform||"");var fr="rgba(0, 0, 0, 0.2)";const vy={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:fr,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:fr,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:fr,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:fr,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:fr,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:fr,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Xv.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var Zv=U(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Ze="original",Ee="arrayRows",$e="objectRows",ut="keyedColumns",Bt="typedArray",$v="unknown",st="column",zr="row",Te={Must:1,Might:2,Not:3},Kv=ue();function hy(r){Kv(r).datasetMap=U()}function qv(r,t,e){var n={},a=Os(t);if(!a||!r)return n;var i=[],o=[],s=t.ecModel,l=Kv(s).datasetMap,u=a.uid+"_"+e.seriesLayoutBy,f,c;r=r.slice(),w(r,function(p,g){var m=Y(p)?p:r[g]={name:p};m.type==="ordinal"&&f==null&&(f=g,c=d(m)),n[m.name]=[]});var h=l.get(u)||l.set(u,{categoryWayDim:c,valueWayDim:0});w(r,function(p,g){var m=p.name,y=d(p);if(f==null){var _=h.valueWayDim;v(n[m],_,y),v(o,_,y),h.valueWayDim+=y}else if(f===g)v(n[m],0,y),v(i,0,y);else{var _=h.categoryWayDim;v(n[m],_,y),v(o,_,y),h.categoryWayDim+=y}});function v(p,g,m){for(var y=0;y<m;y++)p.push(g+y)}function d(p){var g=p.dimsDef;return g?g.length:1}return i.length&&(n.itemName=i),o.length&&(n.seriesName=o),n}function dy(r,t,e){var n={},a=Os(r);if(!a)return n;var i=t.sourceFormat,o=t.dimensionsDefine,s;(i===$e||i===ut)&&w(o,function(f,c){(Y(f)?f.name:f)==="name"&&(s=c)});var l=function(){for(var f={},c={},h=[],v=0,d=Math.min(5,e);v<d;v++){var p=Qv(t.data,i,t.seriesLayoutBy,o,t.startIndex,v);h.push(p);var g=p===Te.Not;if(g&&f.v==null&&v!==s&&(f.v=v),(f.n==null||f.n===f.v||!g&&h[f.n]===Te.Not)&&(f.n=v),m(f)&&h[f.n]!==Te.Not)return f;g||(p===Te.Might&&c.v==null&&v!==s&&(c.v=v),(c.n==null||c.n===c.v)&&(c.n=v))}function m(y){return y.v!=null&&y.n!=null}return m(f)?f:m(c)?c:null}();if(l){n.value=[l.v];var u=s??l.n;n.itemName=[u],n.seriesName=[u]}return n}function Os(r){var t=r.get("data",!0);if(!t)return Fn(r.ecModel,"dataset",{index:r.get("datasetIndex",!0),id:r.get("datasetId",!0)},Re).models[0]}function py(r){return!r.get("transform",!0)&&!r.get("fromTransformResult",!0)?[]:Fn(r.ecModel,"dataset",{index:r.get("fromDatasetIndex",!0),id:r.get("fromDatasetId",!0)},Re).models}function jv(r,t){return Qv(r.data,r.sourceFormat,r.seriesLayoutBy,r.dimensionsDefine,r.startIndex,t)}function Qv(r,t,e,n,a,i){var o,s=5;if(Be(r))return Te.Not;var l,u;if(n){var f=n[i];Y(f)?(l=f.name,u=f.type):G(f)&&(l=f)}if(u!=null)return u==="ordinal"?Te.Must:Te.Not;if(t===Ee){var c=r;if(e===zr){for(var h=c[i],v=0;v<(h||[]).length&&v<s;v++)if((o=S(h[a+v]))!=null)return o}else for(var v=0;v<c.length&&v<s;v++){var d=c[a+v];if(d&&(o=S(d[i]))!=null)return o}}else if(t===$e){var p=r;if(!l)return Te.Not;for(var v=0;v<p.length&&v<s;v++){var g=p[v];if(g&&(o=S(g[l]))!=null)return o}}else if(t===ut){var m=r;if(!l)return Te.Not;var h=m[l];if(!h||Be(h))return Te.Not;for(var v=0;v<h.length&&v<s;v++)if((o=S(h[v]))!=null)return o}else if(t===Ze)for(var y=r,v=0;v<y.length&&v<s;v++){var g=y[v],_=zn(g);if(!N(_))return Te.Not;if((o=S(_[i]))!=null)return o}function S(b){var x=G(b);if(b!=null&&isFinite(b)&&b!=="")return x?Te.Might:Te.Not;if(x&&b!=="-")return Te.Must}return Te.Not}var Lo=U();function gy(r,t){lt(Lo.get(r)==null&&t),Lo.set(r,t)}function my(r,t,e){var n=Lo.get(t);if(!n)return e;var a=n(r);return a?e.concat(a):e}var jl=ue(),yy=ue(),Ns=function(){function r(){}return r.prototype.getColorFromPalette=function(t,e,n){var a=de(this.get("color",!0)),i=this.get("colorLayer",!0);return Jv(this,jl,a,i,t,e,n)},r.prototype.clearColorPalette=function(){Sy(this,jl)},r}();function Ql(r,t,e,n){var a=de(r.get(["aria","decal","decals"]));return Jv(r,yy,a,null,t,e,n)}function _y(r,t){for(var e=r.length,n=0;n<e;n++)if(r[n].length>t)return r[n];return r[e-1]}function Jv(r,t,e,n,a,i,o){i=i||r;var s=t(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(a))return u[a];var f=o==null||!n?e:_y(n,o);if(f=f||e,!(!f||!f.length)){var c=f[l];return a&&(u[a]=c),s.paletteIdx=(l+1)%f.length,c}}function Sy(r,t){t(r).paletteIdx=0,t(r).paletteNameMap={}}var qn,Yr,Jl,eu="\0_ec_inner",xy=1,Bs=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e,n,a,i,o,s){i=i||{},this.option=null,this._theme=new ce(i),this._locale=new ce(o),this._optionManager=s},t.prototype.setOption=function(e,n,a){var i=nu(n);this._optionManager.setOption(e,a,i),this._resetOption(null,i)},t.prototype.resetOption=function(e,n){return this._resetOption(e,nu(n))},t.prototype._resetOption=function(e,n){var a=!1,i=this._optionManager;if(!e||e==="recreate"){var o=i.mountOption(e==="recreate");!this.option||e==="recreate"?Jl(this,o):(this.restoreData(),this._mergeOption(o,n)),a=!0}if((e==="timeline"||e==="media")&&this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=i.getTimelineOption(this);s&&(a=!0,this._mergeOption(s,n))}if(!e||e==="recreate"||e==="media"){var l=i.getMediaOption(this);l.length&&w(l,function(u){a=!0,this._mergeOption(u,n)},this)}return a},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,n){var a=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=U(),u=n&&n.replaceMergeMainTypeMap;hy(this),w(e,function(c,h){c!=null&&(ee.hasClass(h)?h&&(s.push(h),l.set(h,!0)):a[h]=a[h]==null?$(c):K(a[h],c,!0))}),u&&u.each(function(c,h){ee.hasClass(h)&&!l.get(h)&&(s.push(h),l.set(h,!0))}),ee.topologicalTravel(s,ee.getAllClassMainTypes(),f,this);function f(c){var h=my(this,c,de(e[c])),v=i.get(c),d=v?u&&u.get(c)?"replaceMerge":"normalMerge":"replaceAll",p=Og(v,h,d);Hg(p,c,ee),a[c]=null,i.set(c,null),o.set(c,0);var g=[],m=[],y=0,_;w(p,function(S,b){var x=S.existing,C=S.newOption;if(!C)x&&(x.mergeOption({},this),x.optionUpdated({},!1));else{var T=c==="series",D=ee.getClass(c,S.keyInfo.subType,!T);if(!D)return;if(c==="tooltip"){if(_)return;_=!0}if(x&&x.constructor===D)x.name=S.keyInfo.name,x.mergeOption(C,this),x.optionUpdated(C,!1);else{var A=B({componentIndex:b},S.keyInfo);x=new D(C,this,this,A),B(x,A),S.brandNew&&(x.__requireNewView=!0),x.init(C,this,this),x.optionUpdated(null,!0)}}x?(g.push(x.option),m.push(x),y++):(g.push(void 0),m.push(void 0))},this),a[c]=g,i.set(c,m),o.set(c,y),c==="series"&&qn(this)}this._seriesIndices||qn(this)},t.prototype.getOption=function(){var e=$(this.option);return w(e,function(n,a){if(ee.hasClass(a)){for(var i=de(n),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!Sn(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,e[a]=i}}),delete e[eu],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,n){var a=this._componentsMap.get(e);if(a){var i=a[n||0];if(i)return i;if(n==null){for(var o=0;o<a.length;o++)if(a[o])return a[o]}}},t.prototype.queryComponents=function(e){var n=e.mainType;if(!n)return[];var a=e.index,i=e.id,o=e.name,s=this._componentsMap.get(n);if(!s||!s.length)return[];var l;return a!=null?(l=[],w(de(a),function(u){s[u]&&l.push(s[u])})):i!=null?l=tu("id",i,s):o!=null?l=tu("name",o,s):l=be(s,function(u){return!!u}),ru(l,e)},t.prototype.findComponents=function(e){var n=e.query,a=e.mainType,i=s(n),o=i?this.queryComponents(i):be(this._componentsMap.get(a),function(u){return!!u});return l(ru(o,e));function s(u){var f=a+"Index",c=a+"Id",h=a+"Name";return u&&(u[f]!=null||u[c]!=null||u[h]!=null)?{mainType:a,index:u[f],id:u[c],name:u[h]}:null}function l(u){return e.filter?be(u,e.filter):u}},t.prototype.eachComponent=function(e,n,a){var i=this._componentsMap;if(X(e)){var o=n,s=e;i.each(function(c,h){for(var v=0;c&&v<c.length;v++){var d=c[v];d&&s.call(o,h,d,d.componentIndex)}})}else for(var l=G(e)?i.get(e):Y(e)?this.findComponents(e):null,u=0;l&&u<l.length;u++){var f=l[u];f&&n.call(a,f,f.componentIndex)}},t.prototype.getSeriesByName=function(e){var n=ot(e,null);return be(this._componentsMap.get("series"),function(a){return!!a&&n!=null&&a.name===n})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return be(this._componentsMap.get("series"),function(n){return!!n&&n.subType===e})},t.prototype.getSeries=function(){return be(this._componentsMap.get("series"),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,n){Yr(this),w(this._seriesIndices,function(a){var i=this._componentsMap.get("series")[a];e.call(n,i,a)},this)},t.prototype.eachRawSeries=function(e,n){w(this._componentsMap.get("series"),function(a){a&&e.call(n,a,a.componentIndex)})},t.prototype.eachSeriesByType=function(e,n,a){Yr(this),w(this._seriesIndices,function(i){var o=this._componentsMap.get("series")[i];o.subType===e&&n.call(a,o,i)},this)},t.prototype.eachRawSeriesByType=function(e,n,a){return w(this.getSeriesByType(e),n,a)},t.prototype.isSeriesFiltered=function(e){return Yr(this),this._seriesIndicesMap.get(e.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,n){Yr(this);var a=[];w(this._seriesIndices,function(i){var o=this._componentsMap.get("series")[i];e.call(n,o,i)&&a.push(i)},this),this._seriesIndices=a,this._seriesIndicesMap=U(a)},t.prototype.restoreData=function(e){qn(this);var n=this._componentsMap,a=[];n.each(function(i,o){ee.hasClass(o)&&a.push(o)}),ee.topologicalTravel(a,ee.getAllClassMainTypes(),function(i){w(n.get(i),function(o){o&&(i!=="series"||!by(o,e))&&o.restoreData()})})},t.internalField=function(){qn=function(e){var n=e._seriesIndices=[];w(e._componentsMap.get("series"),function(a){a&&n.push(a.componentIndex)}),e._seriesIndicesMap=U(n)},Yr=function(e){},Jl=function(e,n){e.option={},e.option[eu]=xy,e._componentsMap=U({series:[]}),e._componentsCount=U();var a=n.aria;Y(a)&&a.enabled==null&&(a.enabled=!0),wy(n,e._theme.option),K(n,vy,!1),e._mergeOption(n,null)}}(),t}(ce);function by(r,t){if(t){var e=t.seriesIndex,n=t.seriesId,a=t.seriesName;return e!=null&&r.componentIndex!==e||n!=null&&r.id!==n||a!=null&&r.name!==a}}function wy(r,t){var e=r.color&&!r.colorLayer;w(t,function(n,a){a==="colorLayer"&&e||ee.hasClass(a)||(typeof n=="object"?r[a]=r[a]?K(r[a],n,!1):$(n):r[a]==null&&(r[a]=n))})}function tu(r,t,e){if(N(t)){var n=U();return w(t,function(i){if(i!=null){var o=ot(i,null);o!=null&&n.set(i,!0)}}),be(e,function(i){return i&&n.get(i[r])})}else{var a=ot(t,null);return be(e,function(i){return i&&a!=null&&i[r]===a})}}function ru(r,t){return t.hasOwnProperty("subType")?be(r,function(e){return e&&e.subType===t.subType}):r}function nu(r){var t=U();return r&&w(de(r.replaceMerge),function(e){t.set(e,!0)}),{replaceMergeMainTypeMap:t}}xt(Bs,Ns);var Cy=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],eh=function(){function r(t){w(Cy,function(e){this[e]=oe(t[e],t)},this)}return r}(),wi={},Vs=function(){function r(){this._coordinateSystems=[]}return r.prototype.create=function(t,e){var n=[];w(wi,function(a,i){var o=a.create(t,e);n=n.concat(o||[])}),this._coordinateSystems=n},r.prototype.update=function(t,e){w(this._coordinateSystems,function(n){n.update&&n.update(t,e)})},r.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},r.register=function(t,e){wi[t]=e},r.get=function(t){return wi[t]},r}(),Ty=/^(min|max)?(.+)$/,Dy=function(){function r(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return r.prototype.setOption=function(t,e,n){t&&(w(de(t.series),function(o){o&&o.data&&Be(o.data)&&Aa(o.data)}),w(de(t.dataset),function(o){o&&o.source&&Be(o.source)&&Aa(o.source)})),t=$(t);var a=this._optionBackup,i=Ay(t,e,!a);this._newBaseOption=i.baseOption,a?(i.timelineOptions.length&&(a.timelineOptions=i.timelineOptions),i.mediaList.length&&(a.mediaList=i.mediaList),i.mediaDefault&&(a.mediaDefault=i.mediaDefault)):this._optionBackup=i},r.prototype.mountOption=function(t){var e=this._optionBackup;return this._timelineOptions=e.timelineOptions,this._mediaList=e.mediaList,this._mediaDefault=e.mediaDefault,this._currentMediaIndices=[],$(t?e.baseOption:this._newBaseOption)},r.prototype.getTimelineOption=function(t){var e,n=this._timelineOptions;if(n.length){var a=t.getComponent("timeline");a&&(e=$(n[a.getCurrentIndex()]))}return e},r.prototype.getMediaOption=function(t){var e=this._api.getWidth(),n=this._api.getHeight(),a=this._mediaList,i=this._mediaDefault,o=[],s=[];if(!a.length&&!i)return s;for(var l=0,u=a.length;l<u;l++)Iy(a[l].query,e,n)&&o.push(l);return!o.length&&i&&(o=[-1]),o.length&&!Ly(o,this._currentMediaIndices)&&(s=F(o,function(f){return $(f===-1?i.option:a[f].option)})),this._currentMediaIndices=o,s},r}();function Ay(r,t,e){var n=[],a,i,o=r.baseOption,s=r.timeline,l=r.options,u=r.media,f=!!r.media,c=!!(l||s||o&&o.timeline);o?(i=o,i.timeline||(i.timeline=s)):((c||f)&&(r.options=r.media=null),i=r),f&&N(u)&&w(u,function(v){v&&v.option&&(v.query?n.push(v):a||(a=v))}),h(i),w(l,function(v){return h(v)}),w(n,function(v){return h(v.option)});function h(v){w(t,function(d){d(v,e)})}return{baseOption:i,timelineOptions:l||[],mediaDefault:a,mediaList:n}}function Iy(r,t,e){var n={width:t,height:e,aspectratio:t/e},a=!0;return w(r,function(i,o){var s=o.match(Ty);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();My(n[u],i,l)||(a=!1)}}),a}function My(r,t,e){return e==="min"?r>=t:e==="max"?r<=t:r===t}function Ly(r,t){return r.join(",")===t.join(",")}var Ke=w,An=Y,au=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Ci(r){var t=r&&r.itemStyle;if(t)for(var e=0,n=au.length;e<n;e++){var a=au[e],i=t.normal,o=t.emphasis;i&&i[a]&&(r[a]=r[a]||{},r[a].normal?K(r[a].normal,i[a]):r[a].normal=i[a],i[a]=null),o&&o[a]&&(r[a]=r[a]||{},r[a].emphasis?K(r[a].emphasis,o[a]):r[a].emphasis=o[a],o[a]=null)}}function Ie(r,t,e){if(r&&r[t]&&(r[t].normal||r[t].emphasis)){var n=r[t].normal,a=r[t].emphasis;n&&(e?(r[t].normal=r[t].emphasis=null,re(r[t],n)):r[t]=n),a&&(r.emphasis=r.emphasis||{},r.emphasis[t]=a,a.focus&&(r.emphasis.focus=a.focus),a.blurScope&&(r.emphasis.blurScope=a.blurScope))}}function ln(r){Ie(r,"itemStyle"),Ie(r,"lineStyle"),Ie(r,"areaStyle"),Ie(r,"label"),Ie(r,"labelLine"),Ie(r,"upperLabel"),Ie(r,"edgeLabel")}function pe(r,t){var e=An(r)&&r[t],n=An(e)&&e.textStyle;if(n)for(var a=0,i=Il.length;a<i;a++){var o=Il[a];n.hasOwnProperty(o)&&(e[o]=n[o])}}function We(r){r&&(ln(r),pe(r,"label"),r.emphasis&&pe(r.emphasis,"label"))}function Py(r){if(An(r)){Ci(r),ln(r),pe(r,"label"),pe(r,"upperLabel"),pe(r,"edgeLabel"),r.emphasis&&(pe(r.emphasis,"label"),pe(r.emphasis,"upperLabel"),pe(r.emphasis,"edgeLabel"));var t=r.markPoint;t&&(Ci(t),We(t));var e=r.markLine;e&&(Ci(e),We(e));var n=r.markArea;n&&We(n);var a=r.data;if(r.type==="graph"){a=a||r.nodes;var i=r.links||r.edges;if(i&&!Be(i))for(var o=0;o<i.length;o++)We(i[o]);w(r.categories,function(u){ln(u)})}if(a&&!Be(a))for(var o=0;o<a.length;o++)We(a[o]);if(t=r.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)We(s[o]);if(e=r.markLine,e&&e.data)for(var l=e.data,o=0;o<l.length;o++)N(l[o])?(We(l[o][0]),We(l[o][1])):We(l[o]);r.type==="gauge"?(pe(r,"axisLabel"),pe(r,"title"),pe(r,"detail")):r.type==="treemap"?(Ie(r.breadcrumb,"itemStyle"),w(r.levels,function(u){ln(u)})):r.type==="tree"&&ln(r.leaves)}}function ht(r){return N(r)?r:r?[r]:[]}function iu(r){return(N(r)?r[0]:r)||{}}function Ry(r,t){Ke(ht(r.series),function(n){An(n)&&Py(n)});var e=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&e.push("valueAxis","categoryAxis","logAxis","timeAxis"),Ke(e,function(n){Ke(ht(r[n]),function(a){a&&(pe(a,"axisLabel"),pe(a.axisPointer,"label"))})}),Ke(ht(r.parallel),function(n){var a=n&&n.parallelAxisDefault;pe(a,"axisLabel"),pe(a&&a.axisPointer,"label")}),Ke(ht(r.calendar),function(n){Ie(n,"itemStyle"),pe(n,"dayLabel"),pe(n,"monthLabel"),pe(n,"yearLabel")}),Ke(ht(r.radar),function(n){pe(n,"name"),n.name&&n.axisName==null&&(n.axisName=n.name,delete n.name),n.nameGap!=null&&n.axisNameGap==null&&(n.axisNameGap=n.nameGap,delete n.nameGap)}),Ke(ht(r.geo),function(n){An(n)&&(We(n),Ke(ht(n.regions),function(a){We(a)}))}),Ke(ht(r.timeline),function(n){We(n),Ie(n,"label"),Ie(n,"itemStyle"),Ie(n,"controlStyle",!0);var a=n.data;N(a)&&w(a,function(i){Y(i)&&(Ie(i,"label"),Ie(i,"itemStyle"))})}),Ke(ht(r.toolbox),function(n){Ie(n,"iconStyle"),Ke(n.feature,function(a){Ie(a,"iconStyle")})}),pe(iu(r.axisPointer),"label"),pe(iu(r.tooltip).axisPointer,"label")}function ky(r,t){for(var e=t.split(","),n=r,a=0;a<e.length&&(n=n&&n[e[a]],n!=null);a++);return n}function Ey(r,t,e,n){for(var a=t.split(","),i=r,o,s=0;s<a.length-1;s++)o=a[s],i[o]==null&&(i[o]={}),i=i[o];i[a[s]]==null&&(i[a[s]]=e)}function ou(r){r&&w(Oy,function(t){t[0]in r&&!(t[1]in r)&&(r[t[1]]=r[t[0]])})}var Oy=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Ny=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Ti=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Xr(r){var t=r&&r.itemStyle;if(t)for(var e=0;e<Ti.length;e++){var n=Ti[e][1],a=Ti[e][0];t[n]!=null&&(t[a]=t[n])}}function su(r){r&&r.alignTo==="edge"&&r.margin!=null&&r.edgeDistance==null&&(r.edgeDistance=r.margin)}function lu(r){r&&r.downplay&&!r.blur&&(r.blur=r.downplay)}function By(r){r&&r.focusNodeAdjacency!=null&&(r.emphasis=r.emphasis||{},r.emphasis.focus==null&&(r.emphasis.focus="adjacency"))}function th(r,t){if(r)for(var e=0;e<r.length;e++)t(r[e]),r[e]&&th(r[e].children,t)}function rh(r,t){Ry(r,t),r.series=de(r.series),w(r.series,function(e){if(Y(e)){var n=e.type;if(n==="line")e.clipOverflow!=null&&(e.clip=e.clipOverflow);else if(n==="pie"||n==="gauge"){e.clockWise!=null&&(e.clockwise=e.clockWise),su(e.label);var a=e.data;if(a&&!Be(a))for(var i=0;i<a.length;i++)su(a[i]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if(n==="gauge"){var o=ky(e,"pointer.color");o!=null&&Ey(e,"itemStyle.color",o)}else if(n==="bar"){Xr(e),Xr(e.backgroundStyle),Xr(e.emphasis);var a=e.data;if(a&&!Be(a))for(var i=0;i<a.length;i++)typeof a[i]=="object"&&(Xr(a[i]),Xr(a[i]&&a[i].emphasis))}else if(n==="sunburst"){var s=e.highlightPolicy;s&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=s)),lu(e),th(e.data,lu)}else n==="graph"||n==="sankey"?By(e):n==="map"&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&re(e,e.mapLocation));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(e.emphasis.scale=e.hoverAnimation)),ou(e)}}),r.dataRange&&(r.visualMap=r.dataRange),w(Ny,function(e){var n=r[e];n&&(N(n)||(n=[n]),w(n,function(a){ou(a)}))})}function Vy(r){var t=U();r.eachSeries(function(e){var n=e.get("stack");if(n){var a=t.get(n)||t.set(n,[]),i=e.getData(),o={stackResultDimension:i.getCalculationInfo("stackResultDimension"),stackedOverDimension:i.getCalculationInfo("stackedOverDimension"),stackedDimension:i.getCalculationInfo("stackedDimension"),stackedByDimension:i.getCalculationInfo("stackedByDimension"),isStackedByIndex:i.getCalculationInfo("isStackedByIndex"),data:i,seriesModel:e};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;a.length&&i.setCalculationInfo("stackedOnSeries",a[a.length-1].seriesModel),a.push(o)}}),t.each(zy)}function zy(r){w(r,function(t,e){var n=[],a=[NaN,NaN],i=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";o.modify(i,function(u,f,c){var h=o.get(t.stackedDimension,c);if(isNaN(h))return a;var v,d;s?d=o.getRawIndex(c):v=o.get(t.stackedByDimension,c);for(var p=NaN,g=e-1;g>=0;g--){var m=r[g];if(s||(d=m.data.rawIndexOf(m.stackedByDimension,v)),d>=0){var y=m.data.getByRawIndex(m.stackResultDimension,d);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&h>=0&&y>0||l==="samesign"&&h<=0&&y<0){h=Pg(h,y),p=y;break}}}return n[0]=h,n[1]=p,n})})}var ai=function(){function r(t){this.data=t.data||(t.sourceFormat===ut?{}:[]),this.sourceFormat=t.sourceFormat||$v,this.seriesLayoutBy=t.seriesLayoutBy||st,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var n=0;n<e.length;n++){var a=e[n];a.type==null&&jv(this,n)===Te.Must&&(a.type="ordinal")}}return r}();function zs(r){return r instanceof ai}function Po(r,t,e){e=e||ah(r);var n=t.seriesLayoutBy,a=Gy(r,e,n,t.sourceHeader,t.dimensions),i=new ai({data:r,sourceFormat:e,seriesLayoutBy:n,dimensionsDefine:a.dimensionsDefine,startIndex:a.startIndex,dimensionsDetectedCount:a.dimensionsDetectedCount,metaRawOption:$(t)});return i}function nh(r){return new ai({data:r,sourceFormat:Be(r)?Bt:Ze})}function Fy(r){return new ai({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:$(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount})}function ah(r){var t=$v;if(Be(r))t=Bt;else if(N(r)){r.length===0&&(t=Ee);for(var e=0,n=r.length;e<n;e++){var a=r[e];if(a!=null){if(N(a)||Be(a)){t=Ee;break}else if(Y(a)){t=$e;break}}}}else if(Y(r)){for(var i in r)if(mt(r,i)&&On(r[i])){t=ut;break}}return t}function Gy(r,t,e,n,a){var i,o;if(!r)return{dimensionsDefine:uu(a),startIndex:o,dimensionsDetectedCount:i};if(t===Ee){var s=r;n==="auto"||n==null?fu(function(u){u!=null&&u!=="-"&&(G(u)?o==null&&(o=1):o=0)},e,s,10):o=le(n)?n:n?1:0,!a&&o===1&&(a=[],fu(function(u,f){a[f]=u!=null?u+"":""},e,s,1/0)),i=a?a.length:e===zr?s.length:s[0]?s[0].length:null}else if(t===$e)a||(a=Wy(r));else if(t===ut)a||(a=[],w(r,function(u,f){a.push(f)}));else if(t===Ze){var l=zn(r[0]);i=N(l)&&l.length||1}return{startIndex:o,dimensionsDefine:uu(a),dimensionsDetectedCount:i}}function Wy(r){for(var t=0,e;t<r.length&&!(e=r[t++]););if(e)return ze(e)}function uu(r){if(r){var t=U();return F(r,function(e,n){e=Y(e)?e:{name:e};var a={name:e.name,displayName:e.displayName,type:e.type};if(a.name==null)return a;a.name+="",a.displayName==null&&(a.displayName=a.name);var i=t.get(a.name);return i?a.name+="-"+i.count++:t.set(a.name,{count:1}),a})}}function fu(r,t,e,n){if(t===zr)for(var a=0;a<e.length&&a<n;a++)r(e[a]?e[a][0]:null,a);else for(var i=e[0]||[],a=0;a<i.length&&a<n;a++)r(i[a],a)}function ih(r){var t=r.sourceFormat;return t===$e||t===ut}var Yt,Xt,Zt,cu,vu,oh=function(){function r(t,e){var n=zs(t)?t:nh(t);this._source=n;var a=this._data=n.data;n.sourceFormat===Bt&&(this._offset=0,this._dimSize=e,this._data=a),vu(this,a,n)}return r.prototype.getSource=function(){return this._source},r.prototype.count=function(){return 0},r.prototype.getItem=function(t,e){},r.prototype.appendData=function(t){},r.prototype.clean=function(){},r.protoInitialize=function(){var t=r.prototype;t.pure=!1,t.persistent=!0}(),r.internalField=function(){var t;vu=function(o,s,l){var u=l.sourceFormat,f=l.seriesLayoutBy,c=l.startIndex,h=l.dimensionsDefine,v=cu[Fs(u,f)];if(B(o,v),u===Bt)o.getItem=e,o.count=a,o.fillStorage=n;else{var d=sh(u,f);o.getItem=oe(d,null,s,c,h);var p=lh(u,f);o.count=oe(p,null,s,c,h)}};var e=function(o,s){o=o-this._offset,s=s||[];for(var l=this._data,u=this._dimSize,f=u*o,c=0;c<u;c++)s[c]=l[f+c];return s},n=function(o,s,l,u){for(var f=this._data,c=this._dimSize,h=0;h<c;h++){for(var v=u[h],d=v[0]==null?1/0:v[0],p=v[1]==null?-1/0:v[1],g=s-o,m=l[h],y=0;y<g;y++){var _=f[y*c+h];m[o+y]=_,_<d&&(d=_),_>p&&(p=_)}v[0]=d,v[1]=p}},a=function(){return this._data?this._data.length/this._dimSize:0};cu=(t={},t[Ee+"_"+st]={pure:!0,appendData:i},t[Ee+"_"+zr]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[$e]={pure:!0,appendData:i},t[ut]={pure:!0,appendData:function(o){var s=this._data;w(o,function(l,u){for(var f=s[u]||(s[u]=[]),c=0;c<(l||[]).length;c++)f.push(l[c])})}},t[Ze]={appendData:i},t[Bt]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function i(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}}(),r}(),hu=function(r,t,e,n){return r[n]},Hy=(Yt={},Yt[Ee+"_"+st]=function(r,t,e,n){return r[n+t]},Yt[Ee+"_"+zr]=function(r,t,e,n,a){n+=t;for(var i=a||[],o=r,s=0;s<o.length;s++){var l=o[s];i[s]=l?l[n]:null}return i},Yt[$e]=hu,Yt[ut]=function(r,t,e,n,a){for(var i=a||[],o=0;o<e.length;o++){var s=e[o].name,l=r[s];i[o]=l?l[n]:null}return i},Yt[Ze]=hu,Yt);function sh(r,t){var e=Hy[Fs(r,t)];return e}var du=function(r,t,e){return r.length},Uy=(Xt={},Xt[Ee+"_"+st]=function(r,t,e){return Math.max(0,r.length-t)},Xt[Ee+"_"+zr]=function(r,t,e){var n=r[0];return n?Math.max(0,n.length-t):0},Xt[$e]=du,Xt[ut]=function(r,t,e){var n=e[0].name,a=r[n];return a?a.length:0},Xt[Ze]=du,Xt);function lh(r,t){var e=Uy[Fs(r,t)];return e}var Di=function(r,t,e){return r[t]},Yy=(Zt={},Zt[Ee]=Di,Zt[$e]=function(r,t,e){return r[e]},Zt[ut]=Di,Zt[Ze]=function(r,t,e){var n=zn(r);return n instanceof Array?n[t]:n},Zt[Bt]=Di,Zt);function uh(r){var t=Yy[r];return t}function Fs(r,t){return r===Ee?r+"_"+t:r}function Pr(r,t,e){if(r){var n=r.getRawDataItem(t);if(n!=null){var a=r.getStore(),i=a.getSource().sourceFormat;if(e!=null){var o=r.getDimensionIndex(e),s=a.getDimensionProperty(o);return uh(i)(n,o,s)}else{var l=n;return i===Ze&&(l=zn(n)),l}}}}var Xy=/\{@(.+?)\}/g,Zy=function(){function r(){}return r.prototype.getDataParams=function(t,e){var n=this.getData(e),a=this.getRawValue(t,e),i=n.getRawIndex(t),o=n.getName(t),s=n.getRawDataItem(t),l=n.getItemVisual(t,"style"),u=l&&l[n.getItemVisual(t,"drawType")||"fill"],f=l&&l.stroke,c=this.mainType,h=c==="series",v=n.userOutput&&n.userOutput.get();return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:h?this.subType:null,seriesIndex:this.seriesIndex,seriesId:h?this.id:null,seriesName:h?this.name:null,name:o,dataIndex:i,data:s,dataType:e,value:a,color:u,borderColor:f,dimensionNames:v?v.fullDimensions:null,encode:v?v.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(t,e,n,a,i,o){e=e||"normal";var s=this.getData(n),l=this.getDataParams(t,n);if(o&&(l.value=o.interpolatedValue),a!=null&&N(l.value)&&(l.value=l.value[a]),!i){var u=s.getItemModel(t);i=u.get(e==="normal"?["label","formatter"]:[e,"label","formatter"])}if(X(i))return l.status=e,l.dimensionIndex=a,i(l);if(G(i)){var f=Yv(i,l);return f.replace(Xy,function(c,h){var v=h.length,d=h;d.charAt(0)==="["&&d.charAt(v-1)==="]"&&(d=+d.slice(1,v-1));var p=Pr(s,t,d);if(o&&N(o.interpolatedValue)){var g=s.getDimensionIndex(d);g>=0&&(p=o.interpolatedValue[g])}return p!=null?p+"":""})}},r.prototype.getRawValue=function(t,e){return Pr(this.getData(e),t)},r.prototype.formatTooltip=function(t,e,n){},r}();function pu(r){var t,e;return Y(r)?r.type&&(e=r):t=r,{text:t,frag:e}}function gn(r){return new $y(r)}var $y=function(){function r(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return r.prototype.perform=function(t){var e=this._upstream,n=t&&t.skip;if(this._dirty&&e){var a=this.context;a.data=a.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(i="reset");function f(y){return!(y>=1)&&(y=1),y}var c;(this._dirty||i==="reset")&&(this._dirty=!1,c=this._doReset(n)),this._modBy=l,this._modDataCount=u;var h=t&&t.step;if(e?this._dueEnd=e._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var v=this._dueIndex,d=Math.min(h!=null?this._dueIndex+h:1/0,this._dueEnd);if(!n&&(c||v<d)){var p=this._progress;if(N(p))for(var g=0;g<p.length;g++)this._doProgress(p[g],v,d,l,u);else this._doProgress(p,v,d,l,u)}this._dueIndex=d;var m=this._settedOutputEnd!=null?this._settedOutputEnd:d;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},r.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},r.prototype._doProgress=function(t,e,n,a,i){gu.reset(e,n,a,i),this._callingProgress=t,this._callingProgress({start:e,end:n,count:n-e,next:gu.next},this.context)},r.prototype._doReset=function(t){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var e,n;!t&&this._reset&&(e=this._reset(this.context),e&&e.progress&&(n=e.forceFirstProgress,e=e.progress),N(e)&&!e.length&&(e=null)),this._progress=e,this._modBy=this._modDataCount=null;var a=this._downstream;return a&&a.dirty(),n},r.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},r.prototype.pipe=function(t){(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},r.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},r.prototype.getUpstream=function(){return this._upstream},r.prototype.getDownstream=function(){return this._downstream},r.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},r}(),gu=function(){var r,t,e,n,a,i={reset:function(l,u,f,c){t=l,r=u,e=f,n=c,a=Math.ceil(n/e),i.next=e>1&&n>0?s:o}};return i;function o(){return t<r?t++:null}function s(){var l=t%a*e+Math.ceil(t/a),u=t>=r?null:l<n?l:t;return t++,u}}();function xa(r,t){var e=t&&t.type;return e==="ordinal"?r:(e==="time"&&!le(r)&&r!=null&&r!=="-"&&(r=+_t(r)),r==null||r===""?NaN:+r)}var Ky=U({number:function(r){return parseFloat(r)},time:function(r){return+_t(r)},trim:function(r){return G(r)?Bn(r):r}});function fh(r){return Ky.get(r)}var ch={lt:function(r,t){return r<t},lte:function(r,t){return r<=t},gt:function(r,t){return r>t},gte:function(r,t){return r>=t}},qy=function(){function r(t,e){if(!le(e)){var n="";Q(n)}this._opFn=ch[t],this._rvalFloat=zt(e)}return r.prototype.evaluate=function(t){return le(t)?this._opFn(t,this._rvalFloat):this._opFn(zt(t),this._rvalFloat)},r}(),vh=function(){function r(t,e){var n=t==="desc";this._resultLT=n?1:-1,e==null&&(e=n?"min":"max"),this._incomparable=e==="min"?-1/0:1/0}return r.prototype.evaluate=function(t,e){var n=le(t)?t:zt(t),a=le(e)?e:zt(e),i=isNaN(n),o=isNaN(a);if(i&&(n=this._incomparable),o&&(a=this._incomparable),i&&o){var s=G(t),l=G(e);s&&(n=l?t:0),l&&(a=s?e:0)}return n<a?this._resultLT:n>a?-this._resultLT:0},r}(),jy=function(){function r(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=zt(e)}return r.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(e=zt(t)===this._rvalFloat)}return this._isEQ?e:!e},r}();function Qy(r,t){return r==="eq"||r==="ne"?new jy(r==="eq",t):mt(ch,r)?new qy(r,t):null}var Jy=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(t){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(t){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(t,e){},r.prototype.retrieveValueFromItem=function(t,e){},r.prototype.convertValue=function(t,e){return xa(t,e)},r}();function e0(r,t){var e=new Jy,n=r.data,a=e.sourceFormat=r.sourceFormat,i=r.startIndex,o="";r.seriesLayoutBy!==st&&Q(o);var s=[],l={},u=r.dimensionsDefine;if(u)w(u,function(p,g){var m=p.name,y={index:g,name:m,displayName:p.displayName};if(s.push(y),m!=null){var _="";mt(l,m)&&Q(_),l[m]=y}});else for(var f=0;f<r.dimensionsDetectedCount;f++)s.push({index:f});var c=sh(a,st);t.__isBuiltIn&&(e.getRawDataItem=function(p){return c(n,i,s,p)},e.getRawData=oe(t0,null,r)),e.cloneRawData=oe(r0,null,r);var h=lh(a,st);e.count=oe(h,null,n,i,s);var v=uh(a);e.retrieveValue=function(p,g){var m=c(n,i,s,p);return d(m,g)};var d=e.retrieveValueFromItem=function(p,g){if(p!=null){var m=s[g];if(m)return v(p,g,m.name)}};return e.getDimensionInfo=oe(n0,null,s,l),e.cloneAllDimensionInfo=oe(a0,null,s),e}function t0(r){var t=r.sourceFormat;if(!Gs(t)){var e="";Q(e)}return r.data}function r0(r){var t=r.sourceFormat,e=r.data;if(!Gs(t)){var n="";Q(n)}if(t===Ee){for(var a=[],i=0,o=e.length;i<o;i++)a.push(e[i].slice());return a}else if(t===$e){for(var a=[],i=0,o=e.length;i<o;i++)a.push(B({},e[i]));return a}}function n0(r,t,e){if(e!=null){if(le(e)||!isNaN(e)&&!mt(t,e))return r[e];if(mt(t,e))return t[e]}}function a0(r){return $(r)}var hh=U();function i0(r){r=$(r);var t=r.type,e="";t||Q(e);var n=t.split(":");n.length!==2&&Q(e);var a=!1;n[0]==="echarts"&&(t=n[1],a=!0),r.__isBuiltIn=a,hh.set(t,r)}function o0(r,t,e){var n=de(r),a=n.length,i="";a||Q(i);for(var o=0,s=a;o<s;o++){var l=n[o];t=s0(l,t),o!==s-1&&(t.length=Math.max(t.length,1))}return t}function s0(r,t,e,n){var a="";t.length||Q(a),Y(r)||Q(a);var i=r.type,o=hh.get(i);o||Q(a);var s=F(t,function(u){return e0(u,o)}),l=de(o.transform({upstream:s[0],upstreamList:s,config:$(r.config)}));return F(l,function(u,f){var c="";Y(u)||Q(c),u.data||Q(c);var h=ah(u.data);Gs(h)||Q(c);var v,d=t[0];if(d&&f===0&&!u.dimensions){var p=d.startIndex;p&&(u.data=d.data.slice(0,p).concat(u.data)),v={seriesLayoutBy:st,sourceHeader:p,dimensions:d.metaRawOption.dimensions}}else v={seriesLayoutBy:st,sourceHeader:0,dimensions:u.dimensions};return Po(u.data,v,null)})}function Gs(r){return r===Ee||r===$e}var ii="undefined",l0=typeof Uint32Array===ii?Array:Uint32Array,u0=typeof Uint16Array===ii?Array:Uint16Array,dh=typeof Int32Array===ii?Array:Int32Array,mu=typeof Float64Array===ii?Array:Float64Array,ph={float:mu,int:dh,ordinal:Array,number:Array,time:mu},Ai;function Zr(r){return r>65535?l0:u0}function cr(){return[1/0,-1/0]}function f0(r){var t=r.constructor;return t===Array?r.slice():new t(r)}function yu(r,t,e,n,a){var i=ph[e||"float"];if(a){var o=r[t],s=o&&o.length;if(s!==n){for(var l=new i(n),u=0;u<s;u++)l[u]=o[u];r[t]=l}}else r[t]=new i(n)}var Ro=function(){function r(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=U()}return r.prototype.initData=function(t,e,n){this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var a=t.getSource(),i=this.defaultDimValueGetter=Ai[a.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],ih(a),this._dimensions=F(e,function(o){return{type:o.type,property:o.property}}),this._initDataFromProvider(0,t.count())},r.prototype.getProvider=function(){return this._provider},r.prototype.getSource=function(){return this._provider.getSource()},r.prototype.ensureCalculationDimension=function(t,e){var n=this._calcDimNameToIdx,a=this._dimensions,i=n.get(t);if(i!=null){if(a[i].type===e)return i}else i=a.length;return a[i]={type:e},n.set(t,i),this._chunks[i]=new ph[e||"float"](this._rawCount),this._rawExtent[i]=cr(),i},r.prototype.collectOrdinalMeta=function(t,e){var n=this._chunks[t],a=this._dimensions[t],i=this._rawExtent,o=a.ordinalOffset||0,s=n.length;o===0&&(i[t]=cr());for(var l=i[t],u=o;u<s;u++){var f=n[u]=e.parseAndCollect(n[u]);isNaN(f)||(l[0]=Math.min(f,l[0]),l[1]=Math.max(f,l[1]))}a.ordinalMeta=e,a.ordinalOffset=s,a.type="ordinal"},r.prototype.getOrdinalMeta=function(t){var e=this._dimensions[t],n=e.ordinalMeta;return n},r.prototype.getDimensionProperty=function(t){var e=this._dimensions[t];return e&&e.property},r.prototype.appendData=function(t){var e=this._provider,n=this.count();e.appendData(t);var a=e.count();return e.persistent||(a+=n),n<a&&this._initDataFromProvider(n,a,!0),[n,a]},r.prototype.appendValues=function(t,e){for(var n=this._chunks,a=this._dimensions,i=a.length,o=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e||0),u=0;u<i;u++){var f=a[u];yu(n,u,f.type,l,!0)}for(var c=[],h=s;h<l;h++)for(var v=h-s,d=0;d<i;d++){var f=a[d],p=Ai.arrayRows.call(this,t[v]||c,f.property,v,d);n[d][h]=p;var g=o[d];p<g[0]&&(g[0]=p),p>g[1]&&(g[1]=p)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(t,e,n){for(var a=this._provider,i=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=F(o,function(y){return y.property}),f=0;f<s;f++){var c=o[f];l[f]||(l[f]=cr()),yu(i,f,c.type,e,n)}if(a.fillStorage)a.fillStorage(t,e,i,l);else for(var h=[],v=t;v<e;v++){h=a.getItem(v,h);for(var d=0;d<s;d++){var p=i[d],g=this._dimValueGetter(h,u[d],v,d);p[v]=g;var m=l[d];g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=e,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var n=this._chunks[t];return n?n[this.getRawIndex(e)]:NaN},r.prototype.getValues=function(t,e){var n=[],a=[];if(e==null){e=t,t=[];for(var i=0;i<this._dimensions.length;i++)a.push(i)}else a=t;for(var i=0,o=a.length;i<o;i++)n.push(this.get(a[i],e));return n},r.prototype.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var n=this._chunks[t];return n?n[e]:NaN},r.prototype.getSum=function(t){var e=this._chunks[t],n=0;if(e)for(var a=0,i=this.count();a<i;a++){var o=this.get(t,a);isNaN(o)||(n+=o)}return n},r.prototype.getMedian=function(t){var e=[];this.each([t],function(i){isNaN(i)||e.push(i)});var n=e.sort(function(i,o){return i-o}),a=this.count();return a===0?0:a%2===1?n[(a-1)/2]:(n[a/2]+n[a/2-1])/2},r.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(n!=null&&n<this._count&&n===t)return t;for(var a=0,i=this._count-1;a<=i;){var o=(a+i)/2|0;if(e[o]<t)a=o+1;else if(e[o]>t)i=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(t,e,n){var a=this._chunks,i=a[t],o=[];if(!i)return o;n==null&&(n=1/0);for(var s=1/0,l=-1,u=0,f=0,c=this.count();f<c;f++){var h=this.getRawIndex(f),v=e-i[h],d=Math.abs(v);d<=n&&((d<s||d===s&&v>=0&&l<0)&&(s=d,l=v,u=0),v===l&&(o[u++]=f))}return o.length=u,o},r.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,a=this._count;if(n===Array){t=new n(a);for(var i=0;i<a;i++)t[i]=e[i]}else t=new n(e.buffer,0,a)}else{var n=Zr(this._rawCount);t=new n(this.count());for(var i=0;i<t.length;i++)t[i]=i}return t},r.prototype.filter=function(t,e){if(!this._count)return this;for(var n=this.clone(),a=n.count(),i=Zr(n._rawCount),o=new i(a),s=[],l=t.length,u=0,f=t[0],c=n._chunks,h=0;h<a;h++){var v=void 0,d=n.getRawIndex(h);if(l===0)v=e(h);else if(l===1){var p=c[f][d];v=e(p,h)}else{for(var g=0;g<l;g++)s[g]=c[t[g]][d];s[g]=h,v=e.apply(null,s)}v&&(o[u++]=d)}return u<a&&(n._indices=o),n._count=u,n._extent=[],n._updateGetRawIdx(),n},r.prototype.selectRange=function(t){var e=this.clone(),n=e._count;if(!n)return this;var a=ze(t),i=a.length;if(!i)return this;var o=e.count(),s=Zr(e._rawCount),l=new s(o),u=0,f=a[0],c=t[f][0],h=t[f][1],v=e._chunks,d=!1;if(!e._indices){var p=0;if(i===1){for(var g=v[a[0]],m=0;m<n;m++){var y=g[m];(y>=c&&y<=h||isNaN(y))&&(l[u++]=p),p++}d=!0}else if(i===2){for(var g=v[a[0]],_=v[a[1]],S=t[a[1]][0],b=t[a[1]][1],m=0;m<n;m++){var y=g[m],x=_[m];(y>=c&&y<=h||isNaN(y))&&(x>=S&&x<=b||isNaN(x))&&(l[u++]=p),p++}d=!0}}if(!d)if(i===1)for(var m=0;m<o;m++){var C=e.getRawIndex(m),y=v[a[0]][C];(y>=c&&y<=h||isNaN(y))&&(l[u++]=C)}else for(var m=0;m<o;m++){for(var T=!0,C=e.getRawIndex(m),D=0;D<i;D++){var A=a[D],y=v[A][C];(y<t[A][0]||y>t[A][1])&&(T=!1)}T&&(l[u++]=e.getRawIndex(m))}return u<o&&(e._indices=l),e._count=u,e._extent=[],e._updateGetRawIdx(),e},r.prototype.map=function(t,e){var n=this.clone(t);return this._updateDims(n,t,e),n},r.prototype.modify=function(t,e){this._updateDims(this,t,e)},r.prototype._updateDims=function(t,e,n){for(var a=t._chunks,i=[],o=e.length,s=t.count(),l=[],u=t._rawExtent,f=0;f<e.length;f++)u[e[f]]=cr();for(var c=0;c<s;c++){for(var h=t.getRawIndex(c),v=0;v<o;v++)l[v]=a[e[v]][h];l[o]=c;var d=n&&n.apply(null,l);if(d!=null){typeof d!="object"&&(i[0]=d,d=i);for(var f=0;f<d.length;f++){var p=e[f],g=d[f],m=u[p],y=a[p];y&&(y[h]=g),g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}}},r.prototype.lttbDownSample=function(t,e){var n=this.clone([t],!0),a=n._chunks,i=a[t],o=this.count(),s=0,l=Math.floor(1/e),u=this.getRawIndex(0),f,c,h,v=new(Zr(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));v[s++]=u;for(var d=1;d<o-1;d+=l){for(var p=Math.min(d+l,o-1),g=Math.min(d+l*2,o),m=(g+p)/2,y=0,_=p;_<g;_++){var S=this.getRawIndex(_),b=i[S];isNaN(b)||(y+=b)}y/=g-p;var x=d,C=Math.min(d+l,o),T=d-1,D=i[u];f=-1,h=x;for(var A=-1,I=0,_=x;_<C;_++){var S=this.getRawIndex(_),b=i[S];if(isNaN(b)){I++,A<0&&(A=S);continue}c=Math.abs((T-m)*(b-D)-(T-_)*(y-D)),c>f&&(f=c,h=S)}I>0&&I<C-x&&(v[s++]=Math.min(A,h),h=Math.max(A,h)),v[s++]=h,u=h}return v[s++]=this.getRawIndex(o-1),n._count=s,n._indices=v,n.getRawIndex=this._getRawIdx,n},r.prototype.downSample=function(t,e,n,a){for(var i=this.clone([t],!0),o=i._chunks,s=[],l=Math.floor(1/e),u=o[t],f=this.count(),c=i._rawExtent[t]=cr(),h=new(Zr(this._rawCount))(Math.ceil(f/l)),v=0,d=0;d<f;d+=l){l>f-d&&(l=f-d,s.length=l);for(var p=0;p<l;p++){var g=this.getRawIndex(d+p);s[p]=u[g]}var m=n(s),y=this.getRawIndex(Math.min(d+a(s,m)||0,f-1));u[y]=m,m<c[0]&&(c[0]=m),m>c[1]&&(c[1]=m),h[v++]=y}return i._count=v,i._indices=h,i._updateGetRawIdx(),i},r.prototype.each=function(t,e){if(this._count)for(var n=t.length,a=this._chunks,i=0,o=this.count();i<o;i++){var s=this.getRawIndex(i);switch(n){case 0:e(i);break;case 1:e(a[t[0]][s],i);break;case 2:e(a[t[0]][s],a[t[1]][s],i);break;default:for(var l=0,u=[];l<n;l++)u[l]=a[t[l]][s];u[l]=i,e.apply(null,u)}}},r.prototype.getDataExtent=function(t){var e=this._chunks[t],n=cr();if(!e)return n;var a=this.count(),i=!this._indices,o;if(i)return this._rawExtent[t].slice();if(o=this._extent[t],o)return o.slice();o=n;for(var s=o[0],l=o[1],u=0;u<a;u++){var f=this.getRawIndex(u),c=e[f];c<s&&(s=c),c>l&&(l=c)}return o=[s,l],this._extent[t]=o,o},r.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],a=this._chunks,i=0;i<a.length;i++)n.push(a[i][e]);return n},r.prototype.clone=function(t,e){var n=new r,a=this._chunks,i=t&&Ta(t,function(s,l){return s[l]=!0,s},{});if(i)for(var o=0;o<a.length;o++)n._chunks[o]=i[o]?f0(a[o]):a[o];else n._chunks=a;return this._copyCommonProps(n),e||(n._indices=this._cloneIndices()),n._updateGetRawIdx(),n},r.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=$(this._extent),t._rawExtent=$(this._rawExtent)},r.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,e=void 0;if(t===Array){var n=this._indices.length;e=new t(n);for(var a=0;a<n;a++)e[a]=this._indices[a]}else e=new t(this._indices);return e}return null},r.prototype._getRawIdxIdentity=function(t){return t},r.prototype._getRawIdx=function(t){return t<this._count&&t>=0?this._indices[t]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function t(e,n,a,i){return xa(e[i],this._dimensions[i])}Ai={arrayRows:t,objectRows:function(e,n,a,i){return xa(e[n],this._dimensions[i])},keyedColumns:t,original:function(e,n,a,i){var o=e&&(e.value==null?e:e.value);return xa(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(e,n,a,i){return e[i]}}}(),r}(),gh=function(){function r(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,e=this._getUpstreamSourceManagers(),n=!!e.length,a,i;if(jn(t)){var o=t,s=void 0,l=void 0,u=void 0;if(n){var f=e[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,i=[f._getVersionSign()]}else s=o.get("data",!0),l=Be(s)?Bt:Ze,i=[];var c=this._getSourceMetaRawOption()||{},h=u&&u.metaRawOption||{},v=ie(c.seriesLayoutBy,h.seriesLayoutBy)||null,d=ie(c.sourceHeader,h.sourceHeader),p=ie(c.dimensions,h.dimensions),g=v!==h.seriesLayoutBy||!!d!=!!h.sourceHeader||p;a=g?[Po(s,{seriesLayoutBy:v,sourceHeader:d,dimensions:p},l)]:[]}else{var m=t;if(n){var y=this._applyTransform(e);a=y.sourceList,i=y.upstreamSignList}else{var _=m.get("source",!0);a=[Po(_,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(a,i)},r.prototype._applyTransform=function(t){var e=this._sourceHost,n=e.get("transform",!0),a=e.get("fromTransformResult",!0);if(a!=null){var i="";t.length!==1&&Su(i)}var o,s=[],l=[];return w(t,function(u){u.prepareSource();var f=u.getSource(a||0),c="";a!=null&&!f&&Su(c),s.push(f),l.push(u._getVersionSign())}),n?o=o0(n,s,{datasetIndex:e.componentIndex}):a!=null&&(o=[Fy(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e<t.length;e++){var n=t[e];if(n._isDirty()||this._upstreamSignList[e]!==n._getVersionSign())return!0}},r.prototype.getSource=function(t){t=t||0;var e=this._sourceList[t];if(!e){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(t)}return e},r.prototype.getSharedDataStore=function(t){var e=t.makeStoreSchema();return this._innerGetDataStore(e.dimensions,t.source,e.hash)},r.prototype._innerGetDataStore=function(t,e,n){var a=0,i=this._storeList,o=i[a];o||(o=i[a]={});var s=o[n];if(!s){var l=this._getUpstreamSourceManagers()[0];jn(this._sourceHost)&&l?s=l._innerGetDataStore(t,e,n):(s=new Ro,s.initData(new oh(e,t.length),t)),o[n]=s}return s},r.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(jn(t)){var e=Os(t);return e?[e.getSourceManager()]:[]}else return F(py(t),function(n){return n.getSourceManager()})},r.prototype._getSourceMetaRawOption=function(){var t=this._sourceHost,e,n,a;if(jn(t))e=t.get("seriesLayoutBy",!0),n=t.get("sourceHeader",!0),a=t.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var i=t;e=i.get("seriesLayoutBy",!0),n=i.get("sourceHeader",!0),a=i.get("dimensions",!0)}return{seriesLayoutBy:e,sourceHeader:n,dimensions:a}},r}();function _u(r){var t=r.option.transform;t&&Aa(r.option.transform)}function jn(r){return r.mainType==="series"}function Su(r){throw new Error(r)}var mh="line-height:1";function yh(r,t){var e=r.color||"#6e7079",n=r.fontSize||12,a=r.fontWeight||"400",i=r.color||"#464646",o=r.fontSize||14,s=r.fontWeight||"900";return t==="html"?{nameStyle:"font-size:"+He(n+"")+"px;color:"+He(e)+";font-weight:"+He(a+""),valueStyle:"font-size:"+He(o+"")+"px;color:"+He(i)+";font-weight:"+He(s+"")}:{nameStyle:{fontSize:n,fill:e,fontWeight:a},valueStyle:{fontSize:o,fill:i,fontWeight:s}}}var c0=[0,10,20,30],v0=["",`
|
||
`,`
|
||
|
||
`,`
|
||
|
||
|
||
`];function In(r,t){return t.type=r,t}function ko(r){return r.type==="section"}function _h(r){return ko(r)?h0:d0}function Sh(r){if(ko(r)){var t=0,e=r.blocks.length,n=e>1||e>0&&!r.noHeader;return w(r.blocks,function(a){var i=Sh(a);i>=t&&(t=i+ +(n&&(!i||ko(a)&&!a.noHeader)))}),t}return 0}function h0(r,t,e,n){var a=t.noHeader,i=p0(Sh(t)),o=[],s=t.blocks||[];lt(!s||N(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(mt(u,l)){var f=new vh(u[l],null);s.sort(function(d,p){return f.evaluate(d.sortParam,p.sortParam)})}else l==="seriesDesc"&&s.reverse()}w(s,function(d,p){var g=t.valueFormatter,m=_h(d)(g?B(B({},r),{valueFormatter:g}):r,d,p>0?i.html:0,n);m!=null&&o.push(m)});var c=r.renderMode==="richText"?o.join(i.richText):Eo(o.join(""),a?e:i.html);if(a)return c;var h=Mo(t.header,"ordinal",r.useUTC),v=yh(n,r.renderMode).nameStyle;return r.renderMode==="richText"?xh(r,h,v)+i.richText+c:Eo('<div style="'+v+";"+mh+';">'+He(h)+"</div>"+c,e)}function d0(r,t,e,n){var a=r.renderMode,i=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,f=t.valueFormatter||r.valueFormatter||function(S){return S=N(S)?S:[S],F(S,function(b,x){return Mo(b,N(v)?v[x]:v,u)})};if(!(i&&o)){var c=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",a),h=i?"":Mo(l,"ordinal",u),v=t.valueType,d=o?[]:f(t.value,t.dataIndex),p=!s||!i,g=!s&&i,m=yh(n,a),y=m.nameStyle,_=m.valueStyle;return a==="richText"?(s?"":c)+(i?"":xh(r,h,y))+(o?"":y0(r,d,p,g,_)):Eo((s?"":c)+(i?"":g0(h,!s,y))+(o?"":m0(d,p,g,_)),e)}}function xu(r,t,e,n,a,i){if(r){var o=_h(r),s={useUTC:a,renderMode:e,orderMode:n,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function p0(r){return{html:c0[r],richText:v0[r]}}function Eo(r,t){var e='<div style="clear:both"></div>',n="margin: "+t+"px 0 0";return'<div style="'+n+";"+mh+';">'+r+e+"</div>"}function g0(r,t,e){var n=t?"margin-left:2px":"";return'<span style="'+e+";"+n+'">'+He(r)+"</span>"}function m0(r,t,e,n){var a=e?"10px":"20px",i=t?"float:right;margin-left:"+a:"";return r=N(r)?r:[r],'<span style="'+i+";"+n+'">'+F(r,function(o){return He(o)}).join(" ")+"</span>"}function xh(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function y0(r,t,e,n,a){var i=[a],o=n?10:20;return e&&i.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(N(t)?t.join(" "):t,i)}function _0(r,t){var e=r.getData().getItemVisual(t,"style"),n=e[r.visualDrawType];return nr(n)}function bh(r,t){var e=r.get("padding");return e??(t==="richText"?[8,10]:10)}var Ii=function(){function r(){this.richTextStyles={},this._nextStyleNameId=rv()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,n){var a=n==="richText"?this._generateStyleName():null,i=oy({color:e,type:t,renderMode:n,markerId:a});return G(i)?i:(this.richTextStyles[a]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(t,e){var n={};N(e)?w(e,function(i){return B(n,i)}):B(n,e);var a=this._generateStyleName();return this.richTextStyles[a]=n,"{"+a+"|"+t+"}"},r}();function S0(r){var t=r.series,e=r.dataIndex,n=r.multipleSeries,a=t.getData(),i=a.mapDimensionsAll("defaultedTooltip"),o=i.length,s=t.getRawValue(e),l=N(s),u=_0(t,e),f,c,h,v;if(o>1||l&&!o){var d=x0(s,t,e,i,u);f=d.inlineValues,c=d.inlineValueTypes,h=d.blocks,v=d.inlineValues[0]}else if(o){var p=a.getDimensionInfo(i[0]);v=f=Pr(a,e,i[0]),c=p.type}else v=f=l?s[0]:s;var g=gs(t),m=g&&t.name||"",y=a.getName(e),_=n?m:y;return In("section",{header:m,noHeader:n||!g,sortParam:v,blocks:[In("nameValue",{markerType:"item",markerColor:u,name:_,noName:!Bn(_),value:f,valueType:c,dataIndex:e})].concat(h||[])})}function x0(r,t,e,n,a){var i=t.getData(),o=Ta(r,function(c,h,v){var d=i.getDimensionInfo(v);return c=c||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];n.length?w(n,function(c){f(Pr(i,e,c),c)}):w(r,f);function f(c,h){var v=i.getDimensionInfo(h);!v||v.otherDims.tooltip===!1||(o?u.push(In("nameValue",{markerType:"subItem",markerColor:a,name:v.displayName,value:c,valueType:v.type})):(s.push(c),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var At=ue();function Qn(r,t){return r.getName(t)||r.getId(t)}var ba="__universalTransitionEnabled",Ve=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,n,a){this.seriesIndex=this.componentIndex,this.dataTask=gn({count:w0,reset:C0}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,a);var i=At(this).sourceManager=new gh(this);i.prepareSource();var o=this.getInitialData(e,a);wu(o,this),this.dataTask.context.data=o,At(this).dataBeforeProcessed=o,bu(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,n){var a=Dn(this),i=a?ni(e):{},o=this.subType;ee.hasClass(o)&&(o+="Series"),K(e,n.getTheme().get(this.subType)),K(e,this.getDefaultOption()),xo(e,"label",["show"]),this.fillDataTextStyle(e.data),a&&Lr(e,i,a)},t.prototype.mergeOption=function(e,n){e=K(this.option,e,!0),this.fillDataTextStyle(e.data);var a=Dn(this);a&&Lr(this.option,e,a);var i=At(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(e,n);wu(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,At(this).dataBeforeProcessed=o,bu(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!Be(e))for(var n=["show"],a=0;a<e.length;a++)e[a]&&e[a].label&&xo(e[a],"label",n)},t.prototype.getInitialData=function(e,n){},t.prototype.appendData=function(e){var n=this.getRawData();n.appendData(e.data)},t.prototype.getData=function(e){var n=Oo(this);if(n){var a=n.context.data;return e==null?a:a.getLinkedData(e)}else return At(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var n=Oo(this);if(n){var a=n.context;a.outputData=e,n!==this.dataTask&&(a.data=e)}At(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return U(e)},t.prototype.getSourceManager=function(){return At(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return At(this).dataBeforeProcessed},t.prototype.getColorBy=function(){var e=this.get("colorBy");return e||"series"},t.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.formatTooltip=function(e,n,a){return S0({series:this,dataIndex:e,multipleSeries:n})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(fe.node&&!(e&&e.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,n,a){var i=this.ecModel,o=Ns.prototype.getColorFromPalette.call(this,e,n,a);return o||(o=i.getColorFromPalette(e,n,a)),o},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,n){this._innerSelect(this.getData(n),e)},t.prototype.unselect=function(e,n){var a=this.option.selectedMap;if(a){var i=this.option.selectedMode,o=this.getData(n);if(i==="series"||a==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<e.length;s++){var l=e[s],u=Qn(o,l);a[u]=!1,this._selectedDataIndicesMap[u]=-1}}},t.prototype.toggleSelect=function(e,n){for(var a=[],i=0;i<e.length;i++)a[0]=e[i],this.isSelected(e[i],n)?this.unselect(a,n):this.select(a,n)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,n=ze(e),a=[],i=0;i<n.length;i++){var o=e[n[i]];o>=0&&a.push(o)}return a},t.prototype.isSelected=function(e,n){var a=this.option.selectedMap;if(!a)return!1;var i=this.getData(n);return(a==="all"||a[Qn(i,e)])&&!i.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[ba])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,n){var a,i,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){Y(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f<l;f++){var c=n[f],h=Qn(e,c);u[h]=!0,this._selectedDataIndicesMap[h]=e.getRawIndex(c)}}else if(s==="single"||s===!0){var v=n[l-1],h=Qn(e,v);o.selectedMap=(a={},a[h]=!0,a),this._selectedDataIndicesMap=(i={},i[h]=e.getRawIndex(v),i)}}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var n=[];e.hasItemOption&&e.each(function(a){var i=e.getRawDataItem(a);i&&i.selected&&n.push(a)}),n.length>0&&this._innerSelect(e,n)}},t.registerClass=function(e){return ee.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"}(),t}(ee);xt(Ve,Zy);xt(Ve,Ns);fv(Ve,ee);function bu(r){var t=r.name;gs(r)||(r.name=b0(r)||t)}function b0(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),n=[];return w(e,function(a){var i=t.getDimensionInfo(a);i.displayName&&n.push(i.displayName)}),n.join(" ")}function w0(r){return r.model.getRawData().count()}function C0(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),T0}function T0(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function wu(r,t){w(tg(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,J(D0,t))})}function D0(r,t){var e=Oo(r);return e&&e.setOutputEnd((t||this).count()),t}function Oo(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var n=e.currentTask;if(n){var a=n.agentStubMap;a&&(n=a.get(r.uid))}return n}}var Ne=function(){function r(){this.group=new ge,this.uid=Wn("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,n,a){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,n,a){},r.prototype.updateLayout=function(t,e,n,a){},r.prototype.updateVisual=function(t,e,n,a){},r.prototype.toggleBlurSeries=function(t,e,n){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r}();ys(Ne);Wa(Ne);function Hn(){var r=ue();return function(t){var e=r(t),n=t.pipelineContext,a=!!e.large,i=!!e.progressiveRender,o=e.large=!!(n&&n.large),s=e.progressiveRender=!!(n&&n.progressiveRender);return(a!==o||i!==s)&&"reset"}}var wh=ue(),A0=Hn(),ke=function(){function r(){this.group=new ge,this.uid=Wn("viewChart"),this.renderTask=gn({plan:I0,reset:M0}),this.renderTask.context={view:this}}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,n,a){},r.prototype.highlight=function(t,e,n,a){var i=t.getData(a&&a.dataType);i&&Tu(i,a,"emphasis")},r.prototype.downplay=function(t,e,n,a){var i=t.getData(a&&a.dataType);i&&Tu(i,a,"normal")},r.prototype.remove=function(t,e){this.group.removeAll()},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,n,a){this.render(t,e,n,a)},r.prototype.updateLayout=function(t,e,n,a){this.render(t,e,n,a)},r.prototype.updateVisual=function(t,e,n,a){this.render(t,e,n,a)},r.prototype.eachRendered=function(t){Gn(this.group,t)},r.markUpdateMethod=function(t,e){wh(t).updateMethod=e},r.protoInitialize=function(){var t=r.prototype;t.type="chart"}(),r}();function Cu(r,t,e){r&&To(r)&&(t==="emphasis"?Ar:Ir)(r,e)}function Tu(r,t,e){var n=rr(r,t),a=t&&t.highlightKey!=null?Tm(t.highlightKey):null;n!=null?w(de(n),function(i){Cu(r.getItemGraphicEl(i),e,a)}):r.eachItemGraphicEl(function(i){Cu(i,e,a)})}ys(ke);Wa(ke);function I0(r){return A0(r.model)}function M0(r){var t=r.model,e=r.ecModel,n=r.api,a=r.payload,i=t.pipelineContext.progressiveRender,o=r.view,s=a&&wh(a).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,e,n,a),L0[l]}var L0={incrementalPrepareRender:{progress:function(r,t){t.view.incrementalRender(r,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(r,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},Ea="\0__throttleOriginMethod",Du="\0__throttleRate",Au="\0__throttleType";function Ws(r,t,e){var n,a=0,i=0,o=null,s,l,u,f;t=t||0;function c(){i=new Date().getTime(),o=null,r.apply(l,u||[])}var h=function(){for(var v=[],d=0;d<arguments.length;d++)v[d]=arguments[d];n=new Date().getTime(),l=this,u=v;var p=f||t,g=f||e;f=null,s=n-(g?a:i)-p,clearTimeout(o),g?o=setTimeout(c,p):s>=0?c():o=setTimeout(c,-s),a=n};return h.clear=function(){o&&(clearTimeout(o),o=null)},h.debounceNextCall=function(v){f=v},h}function Ch(r,t,e,n){var a=r[t];if(a){var i=a[Ea]||a,o=a[Au],s=a[Du];if(s!==e||o!==n){if(e==null||!n)return r[t]=i;a=r[t]=Ws(i,e,n==="debounce"),a[Ea]=i,a[Au]=n,a[Du]=e}return a}}function No(r,t){var e=r[t];e&&e[Ea]&&(e.clear&&e.clear(),r[t]=e[Ea])}var Iu=ue(),Mu={itemStyle:xn(Rv,!0),lineStyle:xn(Pv,!0)},P0={lineStyle:"stroke",itemStyle:"fill"};function Th(r,t){var e=r.visualStyleMapper||Mu[t];return e||(console.warn("Unknown style type '"+t+"'."),Mu.itemStyle)}function Dh(r,t){var e=r.visualDrawType||P0[t];return e||(console.warn("Unknown style type '"+t+"'."),"fill")}var R0={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=r.getModel(n),i=Th(r,n),o=i(a),s=a.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var l=Dh(r,n),u=o[l],f=X(u)?u:null,c=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||c){var h=r.getColorFromPalette(r.name,null,t.getSeriesCount());o[l]||(o[l]=h,e.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||X(o.fill)?h:o.fill,o.stroke=o.stroke==="auto"||X(o.stroke)?h:o.stroke}if(e.setVisual("style",o),e.setVisual("drawType",l),!t.isSeriesFiltered(r)&&f)return e.setVisual("colorFromPalette",!1),{dataEach:function(v,d){var p=r.getDataParams(d),g=B({},o);g[l]=f(p),v.setItemVisual(d,"style",g)}}}},$r=new ce,k0={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!(r.ignoreStyleOnData||t.isSeriesFiltered(r))){var e=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=Th(r,n),i=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){$r.option=l[n];var u=a($r),f=o.ensureUniqueItemVisual(s,"style");B(f,u),$r.option.decal&&(o.setItemVisual(s,"decal",$r.option.decal),$r.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},E0={performRawSeries:!0,overallReset:function(r){var t=U();r.eachSeries(function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var a=e.type+"-"+n,i=t.get(a);i||(i={},t.set(a,i)),Iu(e).scope=i}}),r.eachSeries(function(e){if(!(e.isColorBySeries()||r.isSeriesFiltered(e))){var n=e.getRawData(),a={},i=e.getData(),o=Iu(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=Dh(e,s);i.each(function(u){var f=i.getRawIndex(u);a[f]=u}),n.each(function(u){var f=a[u],c=i.getItemVisual(f,"colorFromPalette");if(c){var h=i.ensureUniqueItemVisual(f,"style"),v=n.getName(u)||u+"",d=n.count();h[l]=e.getColorFromPalette(v,o,d)}})}})}},Jn=Math.PI;function O0(r,t){t=t||{},re(t,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var e=new ge,n=new he({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(n);var a=new Ce({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),i=new he({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(i);var o;return t.showSpinner&&(o=new vs({shape:{startAngle:-Jn/2,endAngle:-Jn/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:Jn*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Jn*3/2}).delay(300).start("circularInOut"),e.add(o)),e.resize=function(){var s=a.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(r.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),f=r.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:f}),i.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},e.resize(),e}var Ah=function(){function r(t,e,n,a){this._stageTaskMap=U(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),a=this._visualHandlers=a.slice(),this._allHandlers=n.concat(a)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(n){var a=n.overallTask;a&&a.dirty()})},r.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),a=n.context,i=!e&&n.progressiveEnabled&&(!a||a.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=i?n.step:null,s=a&&a.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},r.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),a=t.getData(),i=a.count(),o=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,s=t.get("large")&&i>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?i:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=U();t.eachSeries(function(a){var i=a.getProgressive(),o=a.uid;n.set(o,{id:o,head:null,tail:null,threshold:a.getProgressiveThreshold(),progressiveEnabled:i&&!(a.preventIncremental&&a.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(a,a.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;w(this._allHandlers,function(a){var i=t.get(a.uid)||t.set(a.uid,{}),o="";lt(!(a.reset&&a.overallReset),o),a.reset&&this._createSeriesStageTask(a,i,e,n),a.overallReset&&this._createOverallStageTask(a,i,e,n)},this)},r.prototype.prepareView=function(t,e,n,a){var i=t.renderTask,o=i.context;o.model=e,o.ecModel=n,o.api=a,i.__block=!t.incrementalPrepareRender,this._pipe(e,i)},r.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},r.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},r.prototype._performStageTasks=function(t,e,n,a){a=a||{};var i=!1,o=this;w(t,function(l,u){if(!(a.visualType&&a.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),c=f.seriesTaskMap,h=f.overallTask;if(h){var v,d=h.agentStubMap;d.each(function(g){s(a,g)&&(g.dirty(),v=!0)}),v&&h.dirty(),o.updatePayload(h,n);var p=o.getPerformArgs(h,a.block);d.each(function(g){g.perform(p)}),h.perform(p)&&(i=!0)}else c&&c.each(function(g,m){s(a,g)&&g.dirty();var y=o.getPerformArgs(g,a.block);y.skip=!l.performRawSeries&&e.isSeriesFiltered(g.context.model),o.updatePayload(g,n),g.perform(y)&&(i=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=i||this.unfinished},r.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(n){e=n.dataTask.perform()||e}),this.unfinished=e||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},r.prototype.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)},r.prototype._createSeriesStageTask=function(t,e,n,a){var i=this,o=e.seriesTaskMap,s=e.seriesTaskMap=U(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(f):l?n.eachRawSeriesByType(l,f):u&&u(n,a).each(f);function f(c){var h=c.uid,v=s.set(h,o&&o.get(h)||gn({plan:F0,reset:G0,count:H0}));v.context={model:c,ecModel:n,api:a,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:i},i._pipe(c,v)}},r.prototype._createOverallStageTask=function(t,e,n,a){var i=this,o=e.overallTask=e.overallTask||gn({reset:N0});o.context={ecModel:n,api:a,overallReset:t.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=U(),u=t.seriesType,f=t.getTargetSeries,c=!0,h=!1,v="";lt(!t.createOnAllSeries,v),u?n.eachRawSeriesByType(u,d):f?f(n,a).each(d):(c=!1,w(n.getSeries(),d));function d(p){var g=p.uid,m=l.set(g,s&&s.get(g)||(h=!0,gn({reset:B0,onDirty:z0})));m.context={model:p,overallProgress:c},m.agent=o,m.__block=c,i._pipe(p,m)}h&&o.dirty()},r.prototype._pipe=function(t,e){var n=t.uid,a=this._pipelineMap.get(n);!a.head&&(a.head=e),a.tail&&a.tail.pipe(e),a.tail=e,e.__idxInPipeline=a.count++,e.__pipeline=a},r.wrapStageHandler=function(t,e){return X(t)&&(t={overallReset:t,seriesType:U0(t)}),t.uid=Wn("stageHandler"),e&&(t.visualType=e),t},r}();function N0(r){r.overallReset(r.ecModel,r.api,r.payload)}function B0(r){return r.overallProgress&&V0}function V0(){this.agent.dirty(),this.getDownstream().dirty()}function z0(){this.agent&&this.agent.dirty()}function F0(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function G0(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=de(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?F(t,function(e,n){return Ih(n)}):W0}var W0=Ih(0);function Ih(r){return function(t,e){var n=e.data,a=e.resetDefines[r];if(a&&a.dataEach)for(var i=t.start;i<t.end;i++)a.dataEach(n,i);else a&&a.progress&&a.progress(t,n)}}function H0(r){return r.data.count()}function U0(r){Oa=null;try{r(Mn,Mh)}catch{}return Oa}var Mn={},Mh={},Oa;Lh(Mn,Bs);Lh(Mh,eh);Mn.eachSeriesByType=Mn.eachRawSeriesByType=function(r){Oa=r};Mn.eachComponent=function(r){r.mainType==="series"&&r.subType&&(Oa=r.subType)};function Lh(r,t){for(var e in t.prototype)r[e]=yt}var Lu=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const Y0={color:Lu,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Lu]};var Le="#B9B8CE",Pu="#100C2A",ea=function(){return{axisLine:{lineStyle:{color:Le}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},Ru=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],Ph={darkMode:!0,color:Ru,backgroundColor:Pu,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:Le}},textStyle:{color:Le},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:Le}},dataZoom:{borderColor:"#71708A",textStyle:{color:Le},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:Le}},timeline:{lineStyle:{color:Le},label:{color:Le},controlStyle:{color:Le,borderColor:Le}},calendar:{itemStyle:{color:Pu},dayLabel:{color:Le},monthLabel:{color:Le},yearLabel:{color:Le}},timeAxis:ea(),logAxis:ea(),valueAxis:ea(),categoryAxis:ea(),line:{symbol:"circle"},graph:{color:Ru},gauge:{title:{color:Le},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:Le},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};Ph.categoryAxis.splitLine.show=!1;var X0=function(){function r(){}return r.prototype.normalizeQuery=function(t){var e={},n={},a={};if(G(t)){var i=nt(t);e.mainType=i.main||null,e.subType=i.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};w(t,function(l,u){for(var f=!1,c=0;c<o.length;c++){var h=o[c],v=u.lastIndexOf(h);if(v>0&&v===u.length-h.length){var d=u.slice(0,v);d!=="data"&&(e.mainType=d,e[h.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(n[u]=l,f=!0),f||(a[u]=l)})}return{cptQuery:e,dataQuery:n,otherQuery:a}},r.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var a=n.targetEl,i=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return f(l,o,"mainType")&&f(l,o,"subType")&&f(l,o,"index","componentIndex")&&f(l,o,"name")&&f(l,o,"id")&&f(u,i,"name")&&f(u,i,"dataIndex")&&f(u,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,a,i));function f(c,h,v,d){return c[v]==null||h[d||v]===c[v]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),Bo=["symbol","symbolSize","symbolRotate","symbolOffset"],ku=Bo.concat(["symbolKeepAspect"]),Z0={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData();if(r.legendIcon&&e.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var n={},a={},i=!1,o=0;o<Bo.length;o++){var s=Bo[o],l=r.get(s);X(l)?(i=!0,a[s]=l):n[s]=l}if(n.symbol=n.symbol||r.defaultSymbol,e.setVisual(B({legendIcon:r.legendIcon||n.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},n)),t.isSeriesFiltered(r))return;var u=ze(a);function f(c,h){for(var v=r.getRawValue(h),d=r.getDataParams(h),p=0;p<u.length;p++){var g=u[p];c.setItemVisual(h,g,a[g](v,d))}}return{dataEach:i?f:null}}},$0={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!r.hasSymbolVisual||t.isSeriesFiltered(r))return;var e=r.getData();function n(a,i){for(var o=a.getItemModel(i),s=0;s<ku.length;s++){var l=ku[s],u=o.getShallow(l,!0);u!=null&&a.setItemVisual(i,l,u)}}return{dataEach:e.hasItemOption?n:null}}};function K0(r,t,e){switch(e){case"color":var n=r.getItemVisual(t,"style");return n[r.getVisual("drawType")];case"opacity":return r.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getItemVisual(t,e)}}function q0(r,t){switch(t){case"color":var e=r.getVisual("style");return e[r.getVisual("drawType")];case"opacity":return r.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getVisual(t)}}function j0(r,t){function e(n,a){var i=[];return n.eachComponent({mainType:"series",subType:r,query:a},function(o){i.push(o.seriesIndex)}),i}w([[r+"ToggleSelect","toggleSelect"],[r+"Select","select"],[r+"UnSelect","unselect"]],function(n){t(n[0],function(a,i,o){a=B({},a),o.dispatchAction(B(a,{type:n[1],seriesIndex:e(i,a)}))})})}function vr(r,t,e,n,a){var i=r+t;e.isSilent(i)||n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=a.selected,f=0;f<u.length;f++)if(u[f].seriesIndex===s){var c=o.getData(),h=rr(c,a.fromActionPayload);e.trigger(i,{type:i,seriesId:o.id,name:N(h)?c.getName(h[0]):c.getName(h),selected:G(l)?l:B({},l)})}})}function Q0(r,t,e){r.on("selectchanged",function(n){var a=e.getModel();n.isFromClick?(vr("map","selectchanged",t,a,n),vr("pie","selectchanged",t,a,n)):n.fromAction==="select"?(vr("map","selected",t,a,n),vr("pie","selected",t,a,n)):n.fromAction==="unselect"&&(vr("map","unselected",t,a,n),vr("pie","unselected",t,a,n))})}function un(r,t,e){for(var n;r&&!(t(r)&&(n=r,e));)r=r.__hostTarget||r.parent;return n}var J0=Se.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,n=t.cy,a=t.width/2,i=t.height/2;r.moveTo(e,n-i),r.lineTo(e+a,n+i),r.lineTo(e-a,n+i),r.closePath()}}),e_=Se.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,n=t.cy,a=t.width/2,i=t.height/2;r.moveTo(e,n-i),r.lineTo(e+a,n),r.lineTo(e,n+i),r.lineTo(e-a,n),r.closePath()}}),t_=Se.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.x,n=t.y,a=t.width/5*3,i=Math.max(a,t.height),o=a/2,s=o*o/(i-o),l=n-i+o+s,u=Math.asin(s/o),f=Math.cos(u)*o,c=Math.sin(u),h=Math.cos(u),v=o*.6,d=o*.7;r.moveTo(e-f,l+s),r.arc(e,l,o,Math.PI-u,Math.PI*2+u),r.bezierCurveTo(e+f-c*v,l+s+h*v,e,n-d,e,n),r.bezierCurveTo(e,n-d,e-f+c*v,l+s+h*v,e-f,l+s),r.closePath()}}),r_=Se.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.height,n=t.width,a=t.x,i=t.y,o=n/3*2;r.moveTo(a,i),r.lineTo(a+o,i+e),r.lineTo(a,i+e/4*3),r.lineTo(a-o,i+e),r.lineTo(a,i),r.closePath()}}),n_={line:er,rect:he,roundRect:he,square:he,circle:Ga,diamond:e_,pin:t_,arrow:r_,triangle:J0},a_={line:function(r,t,e,n,a){a.x1=r,a.y1=t+n/2,a.x2=r+e,a.y2=t+n/2},rect:function(r,t,e,n,a){a.x=r,a.y=t,a.width=e,a.height=n},roundRect:function(r,t,e,n,a){a.x=r,a.y=t,a.width=e,a.height=n,a.r=Math.min(e,n)/4},square:function(r,t,e,n,a){var i=Math.min(e,n);a.x=r,a.y=t,a.width=i,a.height=i},circle:function(r,t,e,n,a){a.cx=r+e/2,a.cy=t+n/2,a.r=Math.min(e,n)/2},diamond:function(r,t,e,n,a){a.cx=r+e/2,a.cy=t+n/2,a.width=e,a.height=n},pin:function(r,t,e,n,a){a.x=r+e/2,a.y=t+n/2,a.width=e,a.height=n},arrow:function(r,t,e,n,a){a.x=r+e/2,a.y=t+n/2,a.width=e,a.height=n},triangle:function(r,t,e,n,a){a.cx=r+e/2,a.cy=t+n/2,a.width=e,a.height=n}},Vo={};w(n_,function(r,t){Vo[t]=new r});var i_=Se.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,t,e){var n=mo(r,t,e),a=this.shape;return a&&a.symbolType==="pin"&&t.position==="inside"&&(n.y=e.y+e.height*.4),n},buildPath:function(r,t,e){var n=t.symbolType;if(n!=="none"){var a=Vo[n];a||(n="rect",a=Vo[n]),a_[n](t.x,t.y,t.width,t.height,a.shape),a.buildPath(r,a.shape,e)}}});function o_(r,t){if(this.type!=="image"){var e=this.style;this.__isEmptyBrush?(e.stroke=r,e.fill=t||"#fff",e.lineWidth=2):this.shape.symbolType==="line"?e.stroke=r:e.fill=r,this.markRedraw()}}function Wt(r,t,e,n,a,i,o){var s=r.indexOf("empty")===0;s&&(r=r.substr(5,1).toLowerCase()+r.substr(6));var l;return r.indexOf("image://")===0?l=bv(r.slice(8),new Ye(t,e,n,a),o?"center":"cover"):r.indexOf("path://")===0?l=Cs(r.slice(7),{},new Ye(t,e,n,a),o?"center":"cover"):l=new i_({shape:{symbolType:r,x:t,y:e,width:n,height:a}}),l.__isEmptyBrush=s,l.setColor=o_,i&&l.setColor(i),l}function s_(r){return N(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function Hs(r,t){if(r!=null)return N(r)||(r=[r,r]),[te(r[0],t[0])||0,te(ie(r[1],r[0]),t[1])||0]}var Mi=new ng,Eu=new ag(100),Ou=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function zo(r,t){if(r==="none")return null;var e=t.getDevicePixelRatio(),n=t.getZr(),a=n.painter.type==="svg";r.dirty&&Mi.delete(r);var i=Mi.get(r);if(i)return i;var o=re(r,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor==="none"&&(o.backgroundColor=null);var s={repeat:"repeat"};return l(s),s.rotation=o.rotation,s.scaleX=s.scaleY=a?1:1/e,Mi.set(r,s),r.dirty=!1,s;function l(u){for(var f=[e],c=!0,h=0;h<Ou.length;++h){var v=o[Ou[h]];if(v!=null&&!N(v)&&!G(v)&&!le(v)&&typeof v!="boolean"){c=!1;break}f.push(v)}var d;if(c){d=f.join(",")+(a?"-svg":"");var p=Eu.get(d);p&&(a?u.svgElement=p:u.image=p)}var g=kh(o.dashArrayX),m=l_(o.dashArrayY),y=Rh(o.symbol),_=u_(g),S=Eh(m),b=!a&&$c.createCanvas(),x=a&&{tag:"g",attrs:{},key:"dcl",children:[]},C=D(),T;b&&(b.width=C.width*e,b.height=C.height*e,T=b.getContext("2d")),A(),c&&Eu.put(d,b||x),u.image=b,u.svgElement=x,u.svgWidth=C.width,u.svgHeight=C.height;function D(){for(var I=1,M=0,L=_.length;M<L;++M)I=Dl(I,_[M]);for(var P=1,M=0,L=y.length;M<L;++M)P=Dl(P,y[M].length);I*=P;var R=S*_.length*y.length;return{width:Math.max(1,Math.min(I,o.maxTileWidth)),height:Math.max(1,Math.min(R,o.maxTileHeight))}}function A(){T&&(T.clearRect(0,0,b.width,b.height),o.backgroundColor&&(T.fillStyle=o.backgroundColor,T.fillRect(0,0,b.width,b.height)));for(var I=0,M=0;M<m.length;++M)I+=m[M];if(I<=0)return;for(var L=-S,P=0,R=0,O=0;L<C.height;){if(P%2===0){for(var W=R/2%y.length,k=0,E=0,z=0;k<C.width*2;){for(var H=0,M=0;M<g[O].length;++M)H+=g[O][M];if(H<=0)break;if(E%2===0){var q=(1-o.symbolSize)*.5,j=k+g[O][E]*q,ne=L+m[P]*q,xe=g[O][E]*o.symbolSize,ye=m[P]*o.symbolSize,wt=z/2%y[W].length;Ct(j,ne,xe,ye,y[W][wt])}k+=g[O][E],++z,++E,E===g[O].length&&(E=0)}++O,O===g.length&&(O=0)}L+=m[P],++R,++P,P===m.length&&(P=0)}function Ct(Gr,Wr,Yn,Xn,Zn){var Ht=a?1:e,Tt=Wt(Zn,Gr*Ht,Wr*Ht,Yn*Ht,Xn*Ht,o.color,o.symbolKeepAspect);if(a){var vt=n.painter.renderOneToVNode(Tt);vt&&x.children.push(vt)}else rg(T,Tt)}}}}function Rh(r){if(!r||r.length===0)return[["rect"]];if(G(r))return[[r]];for(var t=!0,e=0;e<r.length;++e)if(!G(r[e])){t=!1;break}if(t)return Rh([r]);for(var n=[],e=0;e<r.length;++e)G(r[e])?n.push([r[e]]):n.push(r[e]);return n}function kh(r){if(!r||r.length===0)return[[0,0]];if(le(r)){var t=Math.ceil(r);return[[t,t]]}for(var e=!0,n=0;n<r.length;++n)if(!le(r[n])){e=!1;break}if(e)return kh([r]);for(var a=[],n=0;n<r.length;++n)if(le(r[n])){var t=Math.ceil(r[n]);a.push([t,t])}else{var t=F(r[n],function(s){return Math.ceil(s)});t.length%2===1?a.push(t.concat(t)):a.push(t)}return a}function l_(r){if(!r||typeof r=="object"&&r.length===0)return[0,0];if(le(r)){var t=Math.ceil(r);return[t,t]}var e=F(r,function(n){return Math.ceil(n)});return r.length%2?e.concat(e):e}function u_(r){return F(r,function(t){return Eh(t)})}function Eh(r){for(var t=0,e=0;e<r.length;++e)t+=r[e];return r.length%2===1?t*2:t}function f_(r,t){r.eachRawSeries(function(e){if(!r.isSeriesFiltered(e)){var n=e.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var l=n.ensureUniqueItemVisual(o,"style");l.decal=zo(s,t)}});var a=n.getVisual("decal");if(a){var i=n.getVisual("style");i.decal=zo(a,t)}}})}var je=new Vn,Oh={};function c_(r,t){Oh[r]=t}function v_(r){return Oh[r]}var h_=1,d_=800,p_=900,g_=1e3,m_=2e3,y_=5e3,Nh=1e3,__=1100,Us=2e3,Bh=3e3,S_=4e3,oi=4500,x_=4600,b_=5e3,w_=6e3,Vh=7e3,C_={PROCESSOR:{FILTER:g_,SERIES_FILTER:d_,STATISTIC:y_},VISUAL:{LAYOUT:Nh,PROGRESSIVE_LAYOUT:__,GLOBAL:Us,CHART:Bh,POST_CHART_LAYOUT:x_,COMPONENT:S_,BRUSH:b_,CHART_ITEM:oi,ARIA:w_,DECAL:Vh}},Ae="__flagInMainProcess",Oe="__pendingUpdate",Li="__needsUpdateStatus",Nu=/^[a-zA-Z0-9_]+$/,Pi="__connectUpdateStatus",Bu=0,T_=1,D_=2;function zh(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(this.isDisposed()){this.id;return}return Gh(this,r,t)}}function Fh(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Gh(this,r,t)}}function Gh(r,t,e){return e[0]=e[0]&&e[0].toLowerCase(),Vn.prototype[t].apply(r,e)}var Wh=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t}(Vn),Hh=Wh.prototype;Hh.on=Fh("on");Hh.off=Fh("off");var hr,Ri,ta,It,ki,Ei,Oi,Kr,qr,Vu,zu,Ni,Fu,ra,Gu,Uh,Fe,Wu,Yh=function(r){V(t,r);function t(e,n,a){var i=r.call(this,new X0)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],a=a||{},G(n)&&(n=Xh[n]),i._dom=e;var o="canvas",s="auto",l=!1;a.ssr;var u=i._zr=Sl(e,{renderer:a.renderer||o,devicePixelRatio:a.devicePixelRatio,width:a.width,height:a.height,ssr:a.ssr,useDirtyRect:ie(a.useDirtyRect,l),useCoarsePointer:ie(a.useCoarsePointer,s),pointerSize:a.pointerSize});i._ssr=a.ssr,i._throttledZrFlush=Ws(oe(u.flush,u),17),n=$(n),n&&rh(n,!0),i._theme=n,i._locale=Jm(a.locale||kv),i._coordSysMgr=new Vs;var f=i._api=Gu(i);function c(h,v){return h.__prio-v.__prio}return pi(Ba,c),pi(Fo,c),i._scheduler=new Ah(i,f,Fo,Ba),i._messageCenter=new Wh,i._initEvents(),i.resize=oe(i.resize,i),u.animation.on("frame",i._onframe,i),Vu(u,i),zu(u,i),Aa(i),i}return t.prototype._onframe=function(){if(!this._disposed){Wu(this);var e=this._scheduler;if(this[Oe]){var n=this[Oe].silent;this[Ae]=!0;try{hr(this),It.update.call(this,null,this[Oe].updateParams)}catch(l){throw this[Ae]=!1,this[Oe]=null,l}this._zr.flush(),this[Ae]=!1,this[Oe]=null,Kr.call(this,n),qr.call(this,n)}else if(e.unfinished){var a=h_,i=this._model,o=this._api;e.unfinished=!1;do{var s=+new Date;e.performSeriesTasks(i),e.performDataProcessorTasks(i),Ei(this,i),e.performVisualTasks(i),ra(this,this._model,o,"remain",{}),a-=+new Date-s}while(a>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,n,a){if(!this[Ae]){if(this._disposed){this.id;return}var i,o,s;if(Y(n)&&(a=n.lazyUpdate,i=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[Ae]=!0,!this._model||n){var l=new Dy(this._api),u=this._theme,f=this._model=new Bs;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:o},Go);var c={seriesTransition:s,optionChanged:!0};if(a)this[Oe]={silent:i,updateParams:c},this[Ae]=!1,this.getZr().wakeUp();else{try{hr(this),It.update.call(this,null,c)}catch(h){throw this[Oe]=null,this[Ae]=!1,h}this._ssr||this._zr.flush(),this[Oe]=null,this[Ae]=!1,Kr.call(this,i),qr.call(this,i)}}},t.prototype.setTheme=function(){},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||fe.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var n=this._zr.painter;return n.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(fe.svgSupported){var e=this._zr,n=e.storage.getDisplayList();return w(n,function(a){a.stopAnimation(null,!0)}),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e=e||{};var n=e.excludeComponents,a=this._model,i=[],o=this;w(n,function(l){a.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(i.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return w(i,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var n=e.type==="svg",a=this.group,i=Math.min,o=Math.max,s=1/0;if(Hu[a]){var l=s,u=s,f=-s,c=-s,h=[],v=e&&e.pixelRatio||this.getDevicePixelRatio();w(yn,function(_,S){if(_.group===a){var b=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas($(e)),x=_.getDom().getBoundingClientRect();l=i(x.left,l),u=i(x.top,u),f=o(x.right,f),c=o(x.bottom,c),h.push({dom:b,left:x.left,top:x.top})}}),l*=v,u*=v,f*=v,c*=v;var d=f-l,p=c-u,g=$c.createCanvas(),m=Sl(g,{renderer:n?"svg":"canvas"});if(m.resize({width:d,height:p}),n){var y="";return w(h,function(_){var S=_.left-l,b=_.top-u;y+='<g transform="translate('+S+","+b+')">'+_.dom+"</g>"}),m.painter.getSvgRoot().innerHTML=y,e.connectedBackgroundColor&&m.painter.setBackgroundColor(e.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return e.connectedBackgroundColor&&m.add(new he({shape:{x:0,y:0,width:d,height:p},style:{fill:e.connectedBackgroundColor}})),w(h,function(_){var S=new Or({style:{x:_.left*v-l,y:_.top*v-u,image:_.dom}});m.add(S)}),m.refreshImmediately(),g.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,n){return ki(this,"convertToPixel",e,n)},t.prototype.convertFromPixel=function(e,n){return ki(this,"convertFromPixel",e,n)},t.prototype.containPixel=function(e,n){if(this._disposed){this.id;return}var a=this._model,i,o=vn(a,e);return w(o,function(s,l){l.indexOf("Models")>=0&&w(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)i=i||!!f.containPoint(n);else if(l==="seriesModels"){var c=this._chartsMap[u.__viewId];c&&c.containPoint&&(i=i||c.containPoint(n,u))}},this)},this),!!i},t.prototype.getVisual=function(e,n){var a=this._model,i=vn(a,e,{defaultMainType:"series"}),o=i.seriesModel,s=o.getData(),l=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?s.indexOfRawIndex(i.dataIndex):null;return l!=null?K0(s,l,n):q0(s,n)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;w(A_,function(n){var a=function(i){var o=e.getModel(),s=i.target,l,u=n==="globalout";if(u?l={}:s&&un(s,function(d){var p=Z(d);if(p&&p.dataIndex!=null){var g=p.dataModel||o.getSeriesByIndex(p.seriesIndex);return l=g&&g.getDataParams(p.dataIndex,p.dataType,s)||{},!0}else if(p.eventData)return l=B({},p.eventData),!0},!0),l){var f=l.componentType,c=l.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",c=l.seriesIndex);var h=f&&c!=null&&o.getComponent(f,c),v=h&&e[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];l.event=i,l.type=n,e._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:h,view:v},e.trigger(n,l)}};a.zrEventfulCallAtLast=!0,e._zr.on(n,a,e)}),w(mn,function(n,a){e._messageCenter.on(a,function(i){this.trigger(a,i)},e)}),w(["selectchanged"],function(n){e._messageCenter.on(n,function(a){this.trigger(n,a)},e)}),Q0(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var e=this.getDom();e&&sv(this.getDom(),Xs,"");var n=this,a=n._api,i=n._model;w(n._componentsViews,function(o){o.dispose(i,a)}),w(n._chartsViews,function(o){o.dispose(i,a)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete yn[n.id]},t.prototype.resize=function(e){if(!this[Ae]){if(this._disposed){this.id;return}this._zr.resize(e);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var a=n.resetOption("media"),i=e&&e.silent;this[Oe]&&(i==null&&(i=this[Oe].silent),a=!0,this[Oe]=null),this[Ae]=!0;try{a&&hr(this),It.update.call(this,{type:"resize",animation:B({duration:0},e&&e.animation)})}catch(o){throw this[Ae]=!1,o}this[Ae]=!1,Kr.call(this,i),qr.call(this,i)}}},t.prototype.showLoading=function(e,n){if(this._disposed){this.id;return}if(Y(e)&&(n=e,e=""),e=e||"default",this.hideLoading(),!!Wo[e]){var a=Wo[e](this._api,n),i=this._zr;this._loadingFX=a,i.add(a)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var n=B({},e);return n.type=mn[e.type],n},t.prototype.dispatchAction=function(e,n){if(this._disposed){this.id;return}if(Y(n)||(n={silent:!!n}),!!Na[e.type]&&this._model){if(this[Ae]){this._pendingActions.push(e);return}var a=n.silent;Oi.call(this,e,a);var i=n.flush;i?this._zr.flush():i!==!1&&fe.browser.weChat&&this._throttledZrFlush(),Kr.call(this,a),qr.call(this,a)}},t.prototype.updateLabelLayout=function(){je.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var n=e.seriesIndex,a=this.getModel(),i=a.getSeriesByIndex(n);i.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){hr=function(c){var h=c._scheduler;h.restorePipelines(c._model),h.prepareStageTasks(),Ri(c,!0),Ri(c,!1),h.plan()},Ri=function(c,h){for(var v=c._model,d=c._scheduler,p=h?c._componentsViews:c._chartsViews,g=h?c._componentsMap:c._chartsMap,m=c._zr,y=c._api,_=0;_<p.length;_++)p[_].__alive=!1;h?v.eachComponent(function(x,C){x!=="series"&&S(C)}):v.eachSeries(S);function S(x){var C=x.__requireNewView;x.__requireNewView=!1;var T="_ec_"+x.id+"_"+x.type,D=!C&&g[T];if(!D){var A=nt(x.type),I=h?Ne.getClass(A.main,A.sub):ke.getClass(A.sub);D=new I,D.init(v,y),g[T]=D,p.push(D),m.add(D.group)}x.__viewId=D.__id=T,D.__alive=!0,D.__model=x,D.group.__ecComponentInfo={mainType:x.mainType,index:x.componentIndex},!h&&d.prepareView(D,x,v,y)}for(var _=0;_<p.length;){var b=p[_];b.__alive?_++:(!h&&b.renderTask.dispose(),m.remove(b.group),b.dispose(v,y),p.splice(_,1),g[b.__id]===b&&delete g[b.__id],b.__id=b.group.__ecComponentInfo=null)}},ta=function(c,h,v,d,p){var g=c._model;if(g.setUpdatePayload(v),!d){w([].concat(c._componentsViews).concat(c._chartsViews),b);return}var m={};m[d+"Id"]=v[d+"Id"],m[d+"Index"]=v[d+"Index"],m[d+"Name"]=v[d+"Name"];var y={mainType:d,query:m};p&&(y.subType=p);var _=v.excludeSeriesId,S;_!=null&&(S=U(),w(de(_),function(x){var C=ot(x,null);C!=null&&S.set(C,!0)})),g&&g.eachComponent(y,function(x){var C=S&&S.get(x.id)!=null;if(!C)if(Bl(v))if(x instanceof Ve)v.type===Qt&&!v.notBlur&&!x.get(["emphasis","disabled"])&&mm(x,v,c._api);else{var T=bs(x.mainType,x.componentIndex,v.name,c._api),D=T.focusSelf,A=T.dispatchers;v.type===Qt&&D&&!v.notBlur&&wo(x.mainType,x.componentIndex,c._api),A&&w(A,function(I){v.type===Qt?Ar(I):Ir(I)})}else Do(v)&&x instanceof Ve&&(Sm(x,v,c._api),Ol(x),Fe(c))},c),g&&g.eachComponent(y,function(x){var C=S&&S.get(x.id)!=null;C||b(c[d==="series"?"_chartsMap":"_componentsMap"][x.__viewId])},c);function b(x){x&&x.__alive&&x[h]&&x[h](x.__model,g,c._api,v)}},It={prepareAndUpdate:function(c){hr(this),It.update.call(this,c,{optionChanged:c.newOption!=null})},update:function(c,h){var v=this._model,d=this._api,p=this._zr,g=this._coordSysMgr,m=this._scheduler;if(v){v.setUpdatePayload(c),m.restoreData(v,c),m.performSeriesTasks(v),g.create(v,d),m.performDataProcessorTasks(v,c),Ei(this,v),g.update(v,d),e(v),m.performVisualTasks(v,c),Ni(this,v,d,c,h);var y=v.get("backgroundColor")||"transparent",_=v.get("darkMode");p.setBackgroundColor(y),_!=null&&_!=="auto"&&p.setDarkMode(_),je.trigger("afterupdate",v,d)}},updateTransform:function(c){var h=this,v=this._model,d=this._api;if(v){v.setUpdatePayload(c);var p=[];v.eachComponent(function(m,y){if(m!=="series"){var _=h.getViewOfComponentModel(y);if(_&&_.__alive)if(_.updateTransform){var S=_.updateTransform(y,v,d,c);S&&S.update&&p.push(_)}else p.push(_)}});var g=U();v.eachSeries(function(m){var y=h._chartsMap[m.__viewId];if(y.updateTransform){var _=y.updateTransform(m,v,d,c);_&&_.update&&g.set(m.uid,1)}else g.set(m.uid,1)}),e(v),this._scheduler.performVisualTasks(v,c,{setDirty:!0,dirtyMap:g}),ra(this,v,d,c,{},g),je.trigger("afterupdate",v,d)}},updateView:function(c){var h=this._model;h&&(h.setUpdatePayload(c),ke.markUpdateMethod(c,"updateView"),e(h),this._scheduler.performVisualTasks(h,c,{setDirty:!0}),Ni(this,h,this._api,c,{}),je.trigger("afterupdate",h,this._api))},updateVisual:function(c){var h=this,v=this._model;v&&(v.setUpdatePayload(c),v.eachSeries(function(d){d.getData().clearAllVisual()}),ke.markUpdateMethod(c,"updateVisual"),e(v),this._scheduler.performVisualTasks(v,c,{visualType:"visual",setDirty:!0}),v.eachComponent(function(d,p){if(d!=="series"){var g=h.getViewOfComponentModel(p);g&&g.__alive&&g.updateVisual(p,v,h._api,c)}}),v.eachSeries(function(d){var p=h._chartsMap[d.__viewId];p.updateVisual(d,v,h._api,c)}),je.trigger("afterupdate",v,this._api))},updateLayout:function(c){It.update.call(this,c)}},ki=function(c,h,v,d){if(c._disposed){c.id;return}for(var p=c._model,g=c._coordSysMgr.getCoordinateSystems(),m,y=vn(p,v),_=0;_<g.length;_++){var S=g[_];if(S[h]&&(m=S[h](p,y,d))!=null)return m}},Ei=function(c,h){var v=c._chartsMap,d=c._scheduler;h.eachSeries(function(p){d.updateStreamModes(p,v[p.__viewId])})},Oi=function(c,h){var v=this,d=this.getModel(),p=c.type,g=c.escapeConnect,m=Na[p],y=m.actionInfo,_=(y.update||"update").split(":"),S=_.pop(),b=_[0]!=null&&nt(_[0]);this[Ae]=!0;var x=[c],C=!1;c.batch&&(C=!0,x=F(c.batch,function(P){return P=re(B({},P),c),P.batch=null,P}));var T=[],D,A=Do(c),I=Bl(c);if(I&&_v(this._api),w(x,function(P){if(D=m.action(P,v._model,v._api),D=D||B({},P),D.type=y.event||D.type,T.push(D),I){var R=ms(c),O=R.queryOptionMap,W=R.mainTypeSpecified,k=W?O.keys()[0]:"series";ta(v,S,P,k),Fe(v)}else A?(ta(v,S,P,"series"),Fe(v)):b&&ta(v,S,P,b.main,b.sub)}),S!=="none"&&!I&&!A&&!b)try{this[Oe]?(hr(this),It.update.call(this,c),this[Oe]=null):It[S].call(this,c)}catch(P){throw this[Ae]=!1,P}if(C?D={type:y.event||p,escapeConnect:g,batch:T}:D=T[0],this[Ae]=!1,!h){var M=this._messageCenter;if(M.trigger(D.type,D),A){var L={type:"selectchanged",escapeConnect:g,selected:xm(d),isFromClick:c.isFromClick||!1,fromAction:c.type,fromActionPayload:c};M.trigger(L.type,L)}}},Kr=function(c){for(var h=this._pendingActions;h.length;){var v=h.shift();Oi.call(this,v,c)}},qr=function(c){!c&&this.trigger("updated")},Vu=function(c,h){c.on("rendered",function(v){h.trigger("rendered",v),c.animation.isFinished()&&!h[Oe]&&!h._scheduler.unfinished&&!h._pendingActions.length&&h.trigger("finished")})},zu=function(c,h){c.on("mouseover",function(v){var d=v.target,p=un(d,To);p&&(ym(p,v,h._api),Fe(h))}).on("mouseout",function(v){var d=v.target,p=un(d,To);p&&(_m(p,v,h._api),Fe(h))}).on("click",function(v){var d=v.target,p=un(d,function(y){return Z(y).dataIndex!=null},!0);if(p){var g=p.selected?"unselect":"select",m=Z(p);h._api.dispatchAction({type:g,dataType:m.dataType,dataIndexInside:m.dataIndex,seriesIndex:m.seriesIndex,isFromClick:!0})}})};function e(c){c.clearColorPalette(),c.eachSeries(function(h){h.clearColorPalette()})}function n(c){var h=[],v=[],d=!1;if(c.eachComponent(function(y,_){var S=_.get("zlevel")||0,b=_.get("z")||0,x=_.getZLevelKey();d=d||!!x,(y==="series"?v:h).push({zlevel:S,z:b,idx:_.componentIndex,type:y,key:x})}),d){var p=h.concat(v),g,m;pi(p,function(y,_){return y.zlevel===_.zlevel?y.z-_.z:y.zlevel-_.zlevel}),w(p,function(y){var _=c.getComponent(y.type,y.idx),S=y.zlevel,b=y.key;g!=null&&(S=Math.max(g,S)),b?(S===g&&b!==m&&S++,m=b):m&&(S===g&&S++,m=""),g=S,_.setZLevel(S)})}}Ni=function(c,h,v,d,p){n(h),Fu(c,h,v,d,p),w(c._chartsViews,function(g){g.__alive=!1}),ra(c,h,v,d,p),w(c._chartsViews,function(g){g.__alive||g.remove(h,v)})},Fu=function(c,h,v,d,p,g){w(g||c._componentsViews,function(m){var y=m.__model;u(y,m),m.render(y,h,v,d),s(y,m),f(y,m)})},ra=function(c,h,v,d,p,g){var m=c._scheduler;p=B(p||{},{updatedSeries:h.getSeries()}),je.trigger("series:beforeupdate",h,v,p);var y=!1;h.eachSeries(function(_){var S=c._chartsMap[_.__viewId];S.__alive=!0;var b=S.renderTask;m.updatePayload(b,d),u(_,S),g&&g.get(_.uid)&&b.dirty(),b.perform(m.getPerformArgs(b))&&(y=!0),S.group.silent=!!_.get("silent"),o(_,S),Ol(_)}),m.unfinished=y||m.unfinished,je.trigger("series:layoutlabels",h,v,p),je.trigger("series:transition",h,v,p),h.eachSeries(function(_){var S=c._chartsMap[_.__viewId];s(_,S),f(_,S)}),i(c,h),je.trigger("series:afterupdate",h,v,p)},Fe=function(c){c[Li]=!0,c.getZr().wakeUp()},Wu=function(c){c[Li]&&(c.getZr().storage.traverse(function(h){Sr(h)||a(h)}),c[Li]=!1)};function a(c){for(var h=[],v=c.currentStates,d=0;d<v.length;d++){var p=v[d];p==="emphasis"||p==="blur"||p==="select"||h.push(p)}c.selected&&c.states.select&&h.push("select"),c.hoverState===Ua&&c.states.emphasis?h.push("emphasis"):c.hoverState===Ha&&c.states.blur&&h.push("blur"),c.useStates(h)}function i(c,h){var v=c._zr,d=v.storage,p=0;d.traverse(function(g){g.isGroup||p++}),p>h.get("hoverLayerThreshold")&&!fe.node&&!fe.worker&&h.eachSeries(function(g){if(!g.preventUsingHoverLayer){var m=c._chartsMap[g.__viewId];m.__alive&&m.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function o(c,h){var v=c.get("blendMode")||null;h.eachRendered(function(d){d.isGroup||(d.style.blend=v)})}function s(c,h){if(!c.preventAutoZ){var v=c.get("z")||0,d=c.get("zlevel")||0;h.eachRendered(function(p){return l(p,v,d,-1/0),!0})}}function l(c,h,v,d){var p=c.getTextContent(),g=c.getTextGuideLine(),m=c.isGroup;if(m)for(var y=c.childrenRef(),_=0;_<y.length;_++)d=Math.max(l(y[_],h,v,d),d);else c.z=h,c.zlevel=v,d=Math.max(c.z2,d);if(p&&(p.z=h,p.zlevel=v,isFinite(d)&&(p.z2=d+2)),g){var S=c.textGuideLineConfig;g.z=h,g.zlevel=v,isFinite(d)&&(g.z2=d+(S&&S.showAbove?1:-1))}return d}function u(c,h){h.eachRendered(function(v){if(!Sr(v)){var d=v.getTextContent(),p=v.getTextGuideLine();v.stateTransition&&(v.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),v.hasState()?(v.prevStates=v.currentStates,v.clearStates()):v.prevStates&&(v.prevStates=null)}})}function f(c,h){var v=c.getModel("stateAnimation"),d=c.isAnimationEnabled(),p=v.get("duration"),g=p>0?{duration:p,delay:v.get("delay"),easing:v.get("easing")}:null;h.eachRendered(function(m){if(m.states&&m.states.emphasis){if(Sr(m))return;if(m instanceof Se&&Dm(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(d){m.stateTransition=g;var _=m.getTextContent(),S=m.getTextGuideLine();_&&(_.stateTransition=g),S&&(S.stateTransition=g)}m.__dirty&&a(m)}})}Gu=function(c){return new(function(h){V(v,h);function v(){return h!==null&&h.apply(this,arguments)||this}return v.prototype.getCoordinateSystems=function(){return c._coordSysMgr.getCoordinateSystems()},v.prototype.getComponentByElement=function(d){for(;d;){var p=d.__ecComponentInfo;if(p!=null)return c._model.getComponent(p.mainType,p.index);d=d.parent}},v.prototype.enterEmphasis=function(d,p){Ar(d,p),Fe(c)},v.prototype.leaveEmphasis=function(d,p){Ir(d,p),Fe(c)},v.prototype.enterBlur=function(d){gm(d),Fe(c)},v.prototype.leaveBlur=function(d){pv(d),Fe(c)},v.prototype.enterSelect=function(d){gv(d),Fe(c)},v.prototype.leaveSelect=function(d){mv(d),Fe(c)},v.prototype.getModel=function(){return c.getModel()},v.prototype.getViewOfComponentModel=function(d){return c.getViewOfComponentModel(d)},v.prototype.getViewOfSeriesModel=function(d){return c.getViewOfSeriesModel(d)},v}(eh))(c)},Uh=function(c){function h(v,d){for(var p=0;p<v.length;p++){var g=v[p];g[Pi]=d}}w(mn,function(v,d){c._messageCenter.on(d,function(p){if(Hu[c.group]&&c[Pi]!==Bu){if(p&&p.escapeConnect)return;var g=c.makeActionFromEvent(p),m=[];w(yn,function(y){y!==c&&y.group===c.group&&m.push(y)}),h(m,Bu),w(m,function(y){y[Pi]!==T_&&y.dispatchAction(g)}),h(m,D_)}})})}}(),t}(Vn),Ys=Yh.prototype;Ys.on=zh("on");Ys.off=zh("off");Ys.one=function(r,t,e){var n=this;function a(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];t&&t.apply&&t.apply(this,i),n.off(r,a)}this.on.call(this,r,a,e)};var A_=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var Na={},mn={},Fo=[],Go=[],Ba=[],Xh={},Wo={},yn={},Hu={},I_=+new Date-0,Xs="_echarts_instance_";function H1(r,t,e){var n=!(e&&e.ssr);if(n){var a=M_(r);if(a)return a}var i=new Yh(r,t,e);return i.id="ec_"+I_++,yn[i.id]=i,n&&sv(r,Xs,i.id),Uh(i),je.trigger("afterinit",i),i}function M_(r){return yn[Zg(r,Xs)]}function Zh(r,t){Xh[r]=t}function $h(r){se(Go,r)<0&&Go.push(r)}function Kh(r,t){$s(Fo,r,t,m_)}function L_(r){Zs("afterinit",r)}function P_(r){Zs("afterupdate",r)}function Zs(r,t){je.on(r,t)}function ft(r,t,e){X(t)&&(e=t,t="");var n=Y(r)?r.type:[r,r={event:t}][0];r.event=(r.event||n).toLowerCase(),t=r.event,!mn[t]&&(lt(Nu.test(n)&&Nu.test(t)),Na[n]||(Na[n]={action:e,actionInfo:r}),mn[t]=n)}function R_(r,t){Vs.register(r,t)}function k_(r,t){$s(Ba,r,t,Nh,"layout")}function sr(r,t){$s(Ba,r,t,Bh,"visual")}var Uu=[];function $s(r,t,e,n,a){if((X(t)||Y(t))&&(e=t,t=n),!(se(Uu,e)>=0)){Uu.push(e);var i=Ah.wrapStageHandler(e,a);i.__prio=t,i.__raw=e,r.push(i)}}function qh(r,t){Wo[r]=t}function E_(r,t,e){var n=v_("registerMap");n&&n(r,t,e)}var O_=i0;sr(Us,R0);sr(oi,k0);sr(oi,E0);sr(Us,Z0);sr(oi,$0);sr(Vh,f_);$h(rh);Kh(p_,Vy);qh("default",O0);ft({type:Qt,event:Qt,update:Qt},yt);ft({type:ga,event:ga,update:ga},yt);ft({type:hn,event:hn,update:hn},yt);ft({type:ma,event:ma,update:ma},yt);ft({type:dn,event:dn,update:dn},yt);Zh("light",Y0);Zh("dark",Ph);function jr(r){return r==null?0:r.length||1}function Yu(r){return r}var Ln=function(){function r(t,e,n,a,i,o){this._old=t,this._new=e,this._oldKeyGetter=n||Yu,this._newKeyGetter=a||Yu,this.context=i,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(t){return this._add=t,this},r.prototype.update=function(t){return this._update=t,this},r.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},r.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},r.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},r.prototype.remove=function(t){return this._remove=t,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},a=new Array(t.length),i=new Array(e.length);this._initIndexMap(t,null,a,"_oldKeyGetter"),this._initIndexMap(e,n,i,"_newKeyGetter");for(var o=0;o<t.length;o++){var s=a[o],l=n[s],u=jr(l);if(u>1){var f=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(f,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(i,n)},r.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},a={},i=[],o=[];this._initIndexMap(t,n,i,"_oldKeyGetter"),this._initIndexMap(e,a,o,"_newKeyGetter");for(var s=0;s<i.length;s++){var l=i[s],u=n[l],f=a[l],c=jr(u),h=jr(f);if(c>1&&h===1)this._updateManyToOne&&this._updateManyToOne(f,u),a[l]=null;else if(c===1&&h>1)this._updateOneToMany&&this._updateOneToMany(f,u),a[l]=null;else if(c===1&&h===1)this._update&&this._update(f,u),a[l]=null;else if(c>1&&h>1)this._updateManyToMany&&this._updateManyToMany(f,u),a[l]=null;else if(c>1)for(var v=0;v<c;v++)this._remove&&this._remove(u[v]);else this._remove&&this._remove(u)}this._performRestAdd(o,a)},r.prototype._performRestAdd=function(t,e){for(var n=0;n<t.length;n++){var a=t[n],i=e[a],o=jr(i);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(i[s]);else o===1&&this._add&&this._add(i);e[a]=null}},r.prototype._initIndexMap=function(t,e,n,a){for(var i=this._diffModeMultiple,o=0;o<t.length;o++){var s="_ec_"+this[a](t[o],o);if(i||(n[o]=s),!!e){var l=e[s],u=jr(l);u===0?(e[s]=o,i&&n.push(s)):u===1?e[s]=[l,o]:l.push(o)}}},r}(),N_=function(){function r(t,e){this._encode=t,this._schema=e}return r.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},r.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},r}();function B_(r,t){var e={},n=e.encode={},a=U(),i=[],o=[],s={};w(r.dimensions,function(h){var v=r.getDimensionInfo(h),d=v.coordDim;if(d){var p=v.coordDimIndex;Bi(n,d)[p]=h,v.isExtraCoord||(a.set(d,1),V_(v.type)&&(i[0]=h),Bi(s,d)[p]=r.getDimensionIndex(v.name)),v.defaultTooltip&&o.push(h)}Zv.each(function(g,m){var y=Bi(n,m),_=v.otherDims[m];_!=null&&_!==!1&&(y[_]=v.name)})});var l=[],u={};a.each(function(h,v){var d=n[v];u[v]=d[0],l=l.concat(d)}),e.dataDimsOnCoord=l,e.dataDimIndicesOnCoord=F(l,function(h){return r.getDimensionInfo(h).storeDimIndex}),e.encodeFirstDimNotExtra=u;var f=n.label;f&&f.length&&(i=f.slice());var c=n.tooltip;return c&&c.length?o=c.slice():o.length||(o=i.slice()),n.defaultedLabel=i,n.defaultedTooltip=o,e.userOutput=new N_(s,t),e}function Bi(r,t){return r.hasOwnProperty(t)||(r[t]=[]),r[t]}function Ho(r){return r==="category"?"ordinal":r==="time"?"time":"float"}function V_(r){return!(r==="ordinal"||r==="time")}var wa=function(){function r(t){this.otherDims={},t!=null&&B(this,t)}return r}(),z_=ue(),F_={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},jh=function(){function r(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return r.prototype.isDimensionOmitted=function(){return this._dimOmitted},r.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=ed(this.source)))},r.prototype.getSourceDimensionIndex=function(t){return ie(this._dimNameMap.get(t),-1)},r.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},r.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=ih(this.source),n=!td(t),a="",i=[],o=0,s=0;o<t;o++){var l=void 0,u=void 0,f=void 0,c=this.dimensions[s];if(c&&c.storeDimIndex===o)l=e?c.name:null,u=c.type,f=c.ordinalMeta,s++;else{var h=this.getSourceDimension(o);h&&(l=e?h.name:null,u=h.type)}i.push({property:l,type:u,ordinalMeta:f}),e&&l!=null&&(!c||!c.isCalculationCoord)&&(a+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),a+="$",a+=F_[u]||"f",f&&(a+=f.uid),a+="$"}var v=this.source,d=[v.seriesLayoutBy,v.startIndex,a].join("$$");return{dimensions:i,hash:d}},r.prototype.makeOutputDimensionNames=function(){for(var t=[],e=0,n=0;e<this._fullDimCount;e++){var a=void 0,i=this.dimensions[n];if(i&&i.storeDimIndex===e)i.isCalculationCoord||(a=i.name),n++;else{var o=this.getSourceDimension(e);o&&(a=o.name)}t.push(a)}return t},r.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},r}();function Qh(r){return r instanceof jh}function Jh(r){for(var t=U(),e=0;e<(r||[]).length;e++){var n=r[e],a=Y(n)?n.name:n;a!=null&&t.get(a)==null&&t.set(a,e)}return t}function ed(r){var t=z_(r);return t.dimNameMap||(t.dimNameMap=Jh(r.dimensionsDefine))}function td(r){return r>30}var Qr=Y,Mt=F,G_=typeof Int32Array>"u"?Array:Int32Array,W_="e\0\0",Xu=-1,H_=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],U_=["_approximateExtent"],Zu,na,Jr,en,Vi,aa,zi,rd=function(){function r(t,e){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var n,a=!1;Qh(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(a=!0,n=t),n=n||["x","y"];for(var i={},o=[],s={},l=!1,u={},f=0;f<n.length;f++){var c=n[f],h=G(c)?new wa({name:c}):c instanceof wa?c:new wa(c),v=h.name;h.type=h.type||"float",h.coordDim||(h.coordDim=v,h.coordDimIndex=0);var d=h.otherDims=h.otherDims||{};o.push(v),i[v]=h,u[v]!=null&&(l=!0),h.createInvertedIndices&&(s[v]=[]),d.itemName===0&&(this._nameDimIdx=f),d.itemId===0&&(this._idDimIdx=f),a&&(h.storeDimIndex=f)}if(this.dimensions=o,this._dimInfos=i,this._initGetDimensionInfo(l),this.hostModel=e,this._invertedIndicesMap=s,this._dimOmitted){var p=this._dimIdxToName=U();w(o,function(g){p.set(i[g].storeDimIndex,g)})}}return r.prototype.getDimension=function(t){var e=this._recognizeDimIndex(t);if(e==null)return t;if(e=t,!this._dimOmitted)return this.dimensions[e];var n=this._dimIdxToName.get(e);if(n!=null)return n;var a=this._schema.getSourceDimension(e);if(a)return a.name},r.prototype.getDimensionIndex=function(t){var e=this._recognizeDimIndex(t);if(e!=null)return e;if(t==null)return-1;var n=this._getDimInfo(t);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},r.prototype._recognizeDimIndex=function(t){if(le(t)||t!=null&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},r.prototype._getStoreDimIndex=function(t){var e=this.getDimensionIndex(t);return e},r.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},r.prototype._initGetDimensionInfo=function(t){var e=this._dimInfos;this._getDimInfo=t?function(n){return e.hasOwnProperty(n)?e[n]:void 0}:function(n){return e[n]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(t,e){var n=this._dimSummary;if(e==null)return n.encodeFirstDimNotExtra[t];var a=n.encode[t];return a?a[e]:null},r.prototype.mapDimensionsAll=function(t){var e=this._dimSummary,n=e.encode[t];return(n||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(t,e,n){var a=this,i;if(t instanceof Ro&&(i=t),!i){var o=this.dimensions,s=zs(t)||On(t)?new oh(t,o.length):t;i=new Ro;var l=Mt(o,function(u){return{type:a._dimInfos[u].type,property:u}});i.initData(s,l,n)}this._store=i,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,i.count()),this._dimSummary=B_(this,this._schema),this.userOutput=this._dimSummary.userOutput},r.prototype.appendData=function(t){var e=this._store.appendData(t);this._doInit(e[0],e[1])},r.prototype.appendValues=function(t,e){var n=this._store.appendValues(t,e.length),a=n.start,i=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),e)for(var s=a;s<i;s++){var l=s-a;this._nameList[s]=e[l],o&&zi(this,s)}},r.prototype._updateOrdinalMeta=function(){for(var t=this._store,e=this.dimensions,n=0;n<e.length;n++){var a=this._dimInfos[e[n]];a.ordinalMeta&&t.collectOrdinalMeta(a.storeDimIndex,a.ordinalMeta)}},r.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return this._idDimIdx==null&&t.getSource().sourceFormat!==Bt&&!t.fillStorage},r.prototype._doInit=function(t,e){if(!(t>=e)){var n=this._store,a=n.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=a.getSource().sourceFormat,l=s===Ze;if(l&&!a.pure)for(var u=[],f=t;f<e;f++){var c=a.getItem(f,u);if(!this.hasItemOption&&Eg(c)&&(this.hasItemOption=!0),c){var h=c.name;i[f]==null&&h!=null&&(i[f]=ot(h,null));var v=c.id;o[f]==null&&v!=null&&(o[f]=ot(v,null))}}if(this._shouldMakeIdFromName())for(var f=t;f<e;f++)zi(this,f);Zu(this)}},r.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},r.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},r.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},r.prototype.setCalculationInfo=function(t,e){Qr(t)?B(this._calculationInfo,t):this._calculationInfo[t]=e},r.prototype.getName=function(t){var e=this.getRawIndex(t),n=this._nameList[e];return n==null&&this._nameDimIdx!=null&&(n=Jr(this,this._nameDimIdx,e)),n==null&&(n=""),n},r.prototype._getCategory=function(t,e){var n=this._store.get(t,e),a=this._store.getOrdinalMeta(t);return a?a.categories[n]:n},r.prototype.getId=function(t){return na(this,this.getRawIndex(t))},r.prototype.count=function(){return this._store.count()},r.prototype.get=function(t,e){var n=this._store,a=this._dimInfos[t];if(a)return n.get(a.storeDimIndex,e)},r.prototype.getByRawIndex=function(t,e){var n=this._store,a=this._dimInfos[t];if(a)return n.getByRawIndex(a.storeDimIndex,e)},r.prototype.getIndices=function(){return this._store.getIndices()},r.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},r.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},r.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},r.prototype.getValues=function(t,e){var n=this,a=this._store;return N(t)?a.getValues(Mt(t,function(i){return n._getStoreDimIndex(i)}),e):a.getValues(t)},r.prototype.hasValue=function(t){for(var e=this._dimSummary.dataDimIndicesOnCoord,n=0,a=e.length;n<a;n++)if(isNaN(this._store.get(e[n],t)))return!1;return!0},r.prototype.indexOfName=function(t){for(var e=0,n=this._store.count();e<n;e++)if(this.getName(e)===t)return e;return-1},r.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},r.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},r.prototype.rawIndexOf=function(t,e){var n=t&&this._invertedIndicesMap[t],a=n[e];return a==null||isNaN(a)?Xu:a},r.prototype.indicesOfNearest=function(t,e,n){return this._store.indicesOfNearest(this._getStoreDimIndex(t),e,n)},r.prototype.each=function(t,e,n){X(t)&&(n=e,e=t,t=[]);var a=n||this,i=Mt(en(t),this._getStoreDimIndex,this);this._store.each(i,a?oe(e,a):e)},r.prototype.filterSelf=function(t,e,n){X(t)&&(n=e,e=t,t=[]);var a=n||this,i=Mt(en(t),this._getStoreDimIndex,this);return this._store=this._store.filter(i,a?oe(e,a):e),this},r.prototype.selectRange=function(t){var e=this,n={},a=ze(t);return w(a,function(i){var o=e._getStoreDimIndex(i);n[o]=t[i]}),this._store=this._store.selectRange(n),this},r.prototype.mapArray=function(t,e,n){X(t)&&(n=e,e=t,t=[]),n=n||this;var a=[];return this.each(t,function(){a.push(e&&e.apply(this,arguments))},n),a},r.prototype.map=function(t,e,n,a){var i=n||a||this,o=Mt(en(t),this._getStoreDimIndex,this),s=aa(this);return s._store=this._store.map(o,i?oe(e,i):e),s},r.prototype.modify=function(t,e,n,a){var i=n||a||this,o=Mt(en(t),this._getStoreDimIndex,this);this._store.modify(o,i?oe(e,i):e)},r.prototype.downSample=function(t,e,n,a){var i=aa(this);return i._store=this._store.downSample(this._getStoreDimIndex(t),e,n,a),i},r.prototype.lttbDownSample=function(t,e){var n=aa(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(t),e),n},r.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},r.prototype.getItemModel=function(t){var e=this.hostModel,n=this.getRawDataItem(t);return new ce(n,e,e&&e.ecModel)},r.prototype.diff=function(t){var e=this;return new Ln(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(n){return na(t,n)},function(n){return na(e,n)})},r.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},r.prototype.setVisual=function(t,e){this._visual=this._visual||{},Qr(t)?B(this._visual,t):this._visual[t]=e},r.prototype.getItemVisual=function(t,e){var n=this._itemVisuals[t],a=n&&n[e];return a??this.getVisual(e)},r.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},r.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,a=n[t];a||(a=n[t]={});var i=a[e];return i==null&&(i=this.getVisual(e),N(i)?i=i.slice():Qr(i)&&(i=B({},i)),a[e]=i),i},r.prototype.setItemVisual=function(t,e,n){var a=this._itemVisuals[t]||{};this._itemVisuals[t]=a,Qr(e)?B(a,e):a[e]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){Qr(t)?B(this._layout,t):this._layout[t]=e},r.prototype.getLayout=function(t){return this._layout[t]},r.prototype.getItemLayout=function(t){return this._itemLayouts[t]},r.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?B(this._itemLayouts[t]||{},e):e},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;om(n,this.dataType,t,e),this._graphicEls[t]=e},r.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},r.prototype.eachItemGraphicEl=function(t,e){w(this._graphicEls,function(n,a){n&&t&&t.call(e,n,a)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:Mt(this.dimensions,this._getDimInfo,this),this.hostModel)),Vi(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var n=this[t];X(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var a=n.apply(this,arguments);return e.apply(this,[a].concat(ig(arguments)))})},r.internalField=function(){Zu=function(t){var e=t._invertedIndicesMap;w(e,function(n,a){var i=t._dimInfos[a],o=i.ordinalMeta,s=t._store;if(o){n=e[a]=new G_(o.categories.length);for(var l=0;l<n.length;l++)n[l]=Xu;for(var l=0;l<s.count();l++)n[s.get(i.storeDimIndex,l)]=l}})},Jr=function(t,e,n){return ot(t._getCategory(e,n),null)},na=function(t,e){var n=t._idList[e];return n==null&&t._idDimIdx!=null&&(n=Jr(t,t._idDimIdx,e)),n==null&&(n=W_+e),n},en=function(t){return N(t)||(t=t!=null?[t]:[]),t},aa=function(t){var e=new r(t._schema?t._schema:Mt(t.dimensions,t._getDimInfo,t),t.hostModel);return Vi(e,t),e},Vi=function(t,e){w(H_.concat(e.__wrappedMethods||[]),function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t.__wrappedMethods=e.__wrappedMethods,w(U_,function(n){t[n]=$(e[n])}),t._calculationInfo=B({},e._calculationInfo)},zi=function(t,e){var n=t._nameList,a=t._idList,i=t._nameDimIdx,o=t._idDimIdx,s=n[e],l=a[e];if(s==null&&i!=null&&(n[e]=s=Jr(t,i,e)),l==null&&o!=null&&(a[e]=l=Jr(t,o,e)),l==null&&s!=null){var u=t._nameRepeatCount,f=u[s]=(u[s]||0)+1;l=s,f>1&&(l+="__ec__"+f),a[e]=l}}}(),r}();function nd(r,t){zs(r)||(r=nh(r)),t=t||{};var e=t.coordDimensions||[],n=t.dimensionsDefine||r.dimensionsDefine||[],a=U(),i=[],o=X_(r,e,n,t.dimensionsCount),s=t.canOmitUnusedDimensions&&td(o),l=n===r.dimensionsDefine,u=l?ed(r):Jh(n),f=t.encodeDefine;!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(r,o));for(var c=U(f),h=new dh(o),v=0;v<h.length;v++)h[v]=-1;function d(D){var A=h[D];if(A<0){var I=n[D],M=Y(I)?I:{name:I},L=new wa,P=M.name;P!=null&&u.get(P)!=null&&(L.name=L.displayName=P),M.type!=null&&(L.type=M.type),M.displayName!=null&&(L.displayName=M.displayName);var R=i.length;return h[D]=R,L.storeDimIndex=D,i.push(L),L}return i[A]}if(!s)for(var v=0;v<o;v++)d(v);c.each(function(D,A){var I=de(D).slice();if(I.length===1&&!G(I[0])&&I[0]<0){c.set(A,!1);return}var M=c.set(A,[]);w(I,function(L,P){var R=G(L)?u.get(L):L;R!=null&&R<o&&(M[P]=R,g(d(R),A,P))})});var p=0;w(e,function(D){var A,I,M,L;if(G(D))A=D,L={};else{L=D,A=L.name;var P=L.ordinalMeta;L.ordinalMeta=null,L=B({},L),L.ordinalMeta=P,I=L.dimsDef,M=L.otherDims,L.name=L.coordDim=L.coordDimIndex=L.dimsDef=L.otherDims=null}var R=c.get(A);if(R!==!1){if(R=de(R),!R.length)for(var O=0;O<(I&&I.length||1);O++){for(;p<o&&d(p).coordDim!=null;)p++;p<o&&R.push(p++)}w(R,function(W,k){var E=d(W);if(l&&L.type!=null&&(E.type=L.type),g(re(E,L),A,k),E.name==null&&I){var z=I[k];!Y(z)&&(z={name:z}),E.name=E.displayName=z.name,E.defaultTooltip=z.defaultTooltip}M&&re(E.otherDims,M)})}});function g(D,A,I){Zv.get(A)!=null?D.otherDims[A]=I:(D.coordDim=A,D.coordDimIndex=I,a.set(A,!0))}var m=t.generateCoord,y=t.generateCoordCount,_=y!=null;y=m?y||1:0;var S=m||"value";function b(D){D.name==null&&(D.name=D.coordDim)}if(s)w(i,function(D){b(D)}),i.sort(function(D,A){return D.storeDimIndex-A.storeDimIndex});else for(var x=0;x<o;x++){var C=d(x),T=C.coordDim;T==null&&(C.coordDim=Z_(S,a,_),C.coordDimIndex=0,(!m||y<=0)&&(C.isExtraCoord=!0),y--),b(C),C.type==null&&(jv(r,x)===Te.Must||C.isExtraCoord&&(C.otherDims.itemName!=null||C.otherDims.seriesName!=null))&&(C.type="ordinal")}return Y_(i),new jh({source:r,dimensions:i,fullDimensionCount:o,dimensionOmitted:s})}function Y_(r){for(var t=U(),e=0;e<r.length;e++){var n=r[e],a=n.name,i=t.get(a)||0;i>0&&(n.name=a+(i-1)),i++,t.set(a,i)}}function X_(r,t,e,n){var a=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,n||0);return w(t,function(i){var o;Y(i)&&(o=i.dimsDef)&&(a=Math.max(a,o.length))}),a}function Z_(r,t,e){if(e||t.hasKey(r)){for(var n=0;t.hasKey(r+n);)n++;r+=n}return t.set(r,!0),r}var $_=function(){function r(t){this.coordSysDims=[],this.axisMap=U(),this.categoryAxisMap=U(),this.coordSysName=t}return r}();function K_(r){var t=r.get("coordinateSystem"),e=new $_(t),n=q_[t];if(n)return n(r,e,e.axisMap,e.categoryAxisMap),e}var q_={cartesian2d:function(r,t,e,n){var a=r.getReferringComponents("xAxis",Re).models[0],i=r.getReferringComponents("yAxis",Re).models[0];t.coordSysDims=["x","y"],e.set("x",a),e.set("y",i),dr(a)&&(n.set("x",a),t.firstCategoryDimIndex=0),dr(i)&&(n.set("y",i),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,n){var a=r.getReferringComponents("singleAxis",Re).models[0];t.coordSysDims=["single"],e.set("single",a),dr(a)&&(n.set("single",a),t.firstCategoryDimIndex=0)},polar:function(r,t,e,n){var a=r.getReferringComponents("polar",Re).models[0],i=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],e.set("radius",i),e.set("angle",o),dr(i)&&(n.set("radius",i),t.firstCategoryDimIndex=0),dr(o)&&(n.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(r,t,e,n){t.coordSysDims=["lng","lat"]},parallel:function(r,t,e,n){var a=r.ecModel,i=a.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=i.dimensions.slice();w(i.parallelAxisIndex,function(s,l){var u=a.getComponent("parallelAxis",s),f=o[l];e.set(f,u),dr(u)&&(n.set(f,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})}};function dr(r){return r.get("type")==="category"}function j_(r,t,e){e=e||{};var n=e.byIndex,a=e.stackedCoordDimension,i,o,s;Q_(t)?i=t:(o=t.schema,i=o.dimensions,s=t.store);var l=!!(r&&r.get("stack")),u,f,c,h;if(w(i,function(y,_){G(y)&&(i[_]=y={name:y}),l&&!y.isExtraCoord&&(!n&&!u&&y.ordinalMeta&&(u=y),!f&&y.type!=="ordinal"&&y.type!=="time"&&(!a||a===y.coordDim)&&(f=y))}),f&&!n&&!u&&(n=!0),f){c="__\0ecstackresult_"+r.id,h="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var v=f.coordDim,d=f.type,p=0;w(i,function(y){y.coordDim===v&&p++});var g={name:c,coordDim:v,coordDimIndex:p,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},m={name:h,coordDim:h,coordDimIndex:p+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(h,d),m.storeDimIndex=s.ensureCalculationDimension(c,d)),o.appendCalculationDimension(g),o.appendCalculationDimension(m)):(i.push(g),i.push(m))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:h,stackResultDimension:c}}function Q_(r){return!Qh(r.schema)}function Rr(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function J_(r,t){return Rr(r,t)?r.getCalculationInfo("stackResultDimension"):t}function eS(r,t){var e=r.get("coordinateSystem"),n=Vs.get(e),a;return t&&t.coordSysDims&&(a=F(t.coordSysDims,function(i){var o={name:i},s=t.axisMap.get(i);if(s){var l=s.get("type");o.type=Ho(l)}return o})),a||(a=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),a}function tS(r,t,e){var n,a;return e&&w(r,function(i,o){var s=i.coordDim,l=e.categoryAxisMap.get(s);l&&(n==null&&(n=o),i.ordinalMeta=l.getOrdinalMeta(),t&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(a=!0)}),!a&&n!=null&&(r[n].otherDims.itemName=0),n}function si(r,t,e){e=e||{};var n=t.getSourceManager(),a,i=!1;a=n.getSource(),i=a.sourceFormat===Ze;var o=K_(t),s=eS(t,o),l=e.useEncodeDefaulter,u=X(l)?l:l?J(qv,s,t):null,f={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},c=nd(a,f),h=tS(c.dimensions,e.createInvertedIndices,o),v=i?null:n.getSharedDataStore(c),d=j_(t,{schema:c,store:v}),p=new rd(c,t);p.setCalculationInfo(d);var g=h!=null&&rS(a)?function(m,y,_,S){return S===h?_:this.defaultDimValueGetter(m,y,_,S)}:null;return p.hasItemOption=!1,p.initData(i?a:v,null,g),p}function rS(r){if(r.sourceFormat===Ze){var t=nS(r.data||[]);return!N(zn(t))}}function nS(r){for(var t=0;t<r.length&&r[t]==null;)t++;return r[t]}var ct=function(){function r(t){this._setting=t||{},this._extent=[1/0,-1/0]}return r.prototype.getSetting=function(t){return this._setting[t]},r.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},r.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},r.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(t){this._isBlank=t},r}();Wa(ct);var aS=0,Uo=function(){function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++aS}return r.createByAxisModel=function(t){var e=t.option,n=e.data,a=n&&F(n,iS);return new r({categories:a,needCollect:!a,deduplication:e.dedplication!==!1})},r.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},r.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!G(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var a=this._getOrCreateMap();return e=a.get(t),e==null&&(n?(e=this.categories.length,this.categories[e]=t,a.set(t,e)):e=NaN),e},r.prototype._getOrCreateMap=function(){return this._map||(this._map=U(this.categories))},r}();function iS(r){return Y(r)&&r.value!=null?r.value:r+""}function Yo(r){return r.type==="interval"||r.type==="log"}function oS(r,t,e,n){var a={},i=r[1]-r[0],o=a.interval=ev(i/t);e!=null&&o<e&&(o=a.interval=e),n!=null&&o>n&&(o=a.interval=n);var s=a.intervalPrecision=ad(o),l=a.niceTickExtent=[_e(Math.ceil(r[0]/o)*o,s),_e(Math.floor(r[1]/o)*o,s)];return sS(l,r),a}function Fi(r){var t=Math.pow(10,ps(r)),e=r/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,_e(e*t)}function ad(r){return pt(r)+2}function $u(r,t,e){r[t]=Math.max(Math.min(r[t],e[1]),e[0])}function sS(r,t){!isFinite(r[0])&&(r[0]=t[0]),!isFinite(r[1])&&(r[1]=t[1]),$u(r,0,t),$u(r,1,t),r[0]>r[1]&&(r[0]=r[1])}function li(r,t){return r>=t[0]&&r<=t[1]}function ui(r,t){return t[1]===t[0]?.5:(r-t[0])/(t[1]-t[0])}function fi(r,t){return r*(t[1]-t[0])+t[0]}var Ks=function(r){V(t,r);function t(e){var n=r.call(this,e)||this;n.type="ordinal";var a=n.getSetting("ordinalMeta");return a||(a=new Uo({})),N(a)&&(a=new Uo({categories:F(a,function(i){return Y(i)?i.value:i})})),n._ordinalMeta=a,n._extent=n.getSetting("extent")||[0,a.categories.length-1],n}return t.prototype.parse=function(e){return e==null?NaN:G(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return e=this.parse(e),li(e,this._extent)&&this._ordinalMeta.categories[e]!=null},t.prototype.normalize=function(e){return e=this._getTickNumber(this.parse(e)),ui(e,this._extent)},t.prototype.scale=function(e){return e=Math.round(fi(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],n=this._extent,a=n[0];a<=n[1];)e.push({value:a}),a++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=e.ordinalNumbers,a=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o<l;++o){var u=n[o];a[o]=u,i[u]=o}for(var f=0;o<s;++o){for(;i[f]!=null;)f++;a.push(f),i[f]=o}},t.prototype._getTickNumber=function(e){var n=this._ticksByOrdinalNumber;return n&&e>=0&&e<n.length?n[e]:e},t.prototype.getRawOrdinalNumber=function(e){var n=this._ordinalNumbersByTick;return n&&e>=0&&e<n.length?n[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var n=this.getRawOrdinalNumber(e.value),a=this._ordinalMeta.categories[n];return a==null?"":a+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.unionExtentFromData=function(e,n){this.unionExtent(e.getApproximateExtent(n))},t.prototype.isInExtentRange=function(e){return e=this._getTickNumber(e),this._extent[0]<=e&&this._extent[1]>=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(ct);ct.registerClass(Ks);var $t=_e,Fr=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return li(e,this._extent)},t.prototype.normalize=function(e){return ui(e,this._extent)},t.prototype.scale=function(e){return fi(e,this._extent)},t.prototype.setExtent=function(e,n){var a=this._extent;isNaN(e)||(a[0]=parseFloat(e)),isNaN(n)||(a[1]=parseFloat(n))},t.prototype.unionExtent=function(e){var n=this._extent;e[0]<n[0]&&(n[0]=e[0]),e[1]>n[1]&&(n[1]=e[1]),this.setExtent(n[0],n[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=ad(e)},t.prototype.getTicks=function(e){var n=this._interval,a=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var l=1e4;a[0]<i[0]&&(e?s.push({value:$t(i[0]-n,o)}):s.push({value:a[0]}));for(var u=i[0];u<=i[1]&&(s.push({value:u}),u=$t(u+n,o),u!==s[s.length-1].value);)if(s.length>l)return[];var f=s.length?s[s.length-1].value:i[1];return a[1]>f&&(e?s.push({value:$t(f+n,o)}):s.push({value:a[1]})),s},t.prototype.getMinorTicks=function(e){for(var n=this.getTicks(!0),a=[],i=this.getExtent(),o=1;o<n.length;o++){for(var s=n[o],l=n[o-1],u=0,f=[],c=s.value-l.value,h=c/e;u<e-1;){var v=$t(l.value+(u+1)*h);v>i[0]&&v<i[1]&&f.push(v),u++}a.push(f)}return a},t.prototype.getLabel=function(e,n){if(e==null)return"";var a=n&&n.precision;a==null?a=pt(e.value)||0:a==="auto"&&(a=this._intervalPrecision);var i=$t(e.value,a,!0);return Hv(i)},t.prototype.calcNiceTicks=function(e,n,a){e=e||5;var i=this._extent,o=i[1]-i[0];if(isFinite(o)){o<0&&(o=-o,i.reverse());var s=oS(i,e,n,a);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var n=this._extent;if(n[0]===n[1])if(n[0]!==0){var a=Math.abs(n[0]);e.fixMax||(n[1]+=a/2),n[0]-=a/2}else n[1]=1;var i=n[1]-n[0];isFinite(i)||(n[0]=0,n[1]=1),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var o=this._interval;e.fixMin||(n[0]=$t(Math.floor(n[0]/o)*o)),e.fixMax||(n[1]=$t(Math.ceil(n[1]/o)*o))},t.prototype.setNiceExtent=function(e,n){this._niceExtent=[e,n]},t.type="interval",t}(ct);ct.registerClass(Fr);var id=typeof Float32Array<"u",lS=id?Float32Array:Array;function at(r){return N(r)?id?new Float32Array(r):r:new lS(r)}var uS="__ec_stack_";function qs(r){return r.get("stack")||uS+r.seriesIndex}function js(r){return r.dim+r.index}function od(r,t){var e=[];return t.eachSeriesByType(r,function(n){fd(n)&&e.push(n)}),e}function fS(r){var t={};w(r,function(l){var u=l.coordinateSystem,f=u.getBaseAxis();if(!(f.type!=="time"&&f.type!=="value"))for(var c=l.getData(),h=f.dim+"_"+f.index,v=c.getDimensionIndex(c.mapDimension(f.dim)),d=c.getStore(),p=0,g=d.count();p<g;++p){var m=d.get(v,p);t[h]?t[h].push(m):t[h]=[m]}});var e={};for(var n in t)if(t.hasOwnProperty(n)){var a=t[n];if(a){a.sort(function(l,u){return l-u});for(var i=null,o=1;o<a.length;++o){var s=a[o]-a[o-1];s>0&&(i=i===null?s:Math.min(i,s))}e[n]=i}}return e}function sd(r){var t=fS(r),e=[];return w(r,function(n){var a=n.coordinateSystem,i=a.getBaseAxis(),o=i.getExtent(),s;if(i.type==="category")s=i.getBandWidth();else if(i.type==="value"||i.type==="time"){var l=i.dim+"_"+i.index,u=t[l],f=Math.abs(o[1]-o[0]),c=i.scale.getExtent(),h=Math.abs(c[1]-c[0]);s=u?f/h*u:f}else{var v=n.getData();s=Math.abs(o[1]-o[0])/v.count()}var d=te(n.get("barWidth"),s),p=te(n.get("barMaxWidth"),s),g=te(n.get("barMinWidth")||(cd(n)?.5:1),s),m=n.get("barGap"),y=n.get("barCategoryGap");e.push({bandWidth:s,barWidth:d,barMaxWidth:p,barMinWidth:g,barGap:m,barCategoryGap:y,axisKey:js(i),stackId:qs(n)})}),cS(e)}function cS(r){var t={};w(r,function(n,a){var i=n.axisKey,o=n.bandWidth,s=t[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;t[i]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=n.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var c=n.barMaxWidth;c&&(l[u].maxWidth=c);var h=n.barMinWidth;h&&(l[u].minWidth=h);var v=n.barGap;v!=null&&(s.gap=v);var d=n.barCategoryGap;d!=null&&(s.categoryGap=d)});var e={};return w(t,function(n,a){e[a]={};var i=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=ze(i).length;s=Math.max(35-l*4,15)+"%"}var u=te(s,o),f=te(n.gap,1),c=n.remainedWidth,h=n.autoWidthCount,v=(c-u)/(h+(h-1)*f);v=Math.max(v,0),w(i,function(m){var y=m.maxWidth,_=m.minWidth;if(m.width){var S=m.width;y&&(S=Math.min(S,y)),_&&(S=Math.max(S,_)),m.width=S,c-=S+f*S,h--}else{var S=v;y&&y<S&&(S=Math.min(y,c)),_&&_>S&&(S=_),S!==v&&(m.width=S,c-=S+f*S,h--)}}),v=(c-u)/(h+(h-1)*f),v=Math.max(v,0);var d=0,p;w(i,function(m,y){m.width||(m.width=v),p=m,d+=m.width*(1+f)}),p&&(d-=p.width*f);var g=-d/2;w(i,function(m,y){e[a][y]=e[a][y]||{bandWidth:o,offset:g,width:m.width},g+=m.width*(1+f)})}),e}function vS(r,t,e){if(r&&t){var n=r[js(t)];return n!=null&&e!=null?n[qs(e)]:n}}function ld(r,t){var e=od(r,t),n=sd(e);w(e,function(a){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=qs(a),u=n[js(s)][l],f=u.offset,c=u.width;i.setLayout({bandWidth:u.bandWidth,offset:f,size:c})})}function ud(r){return{seriesType:r,plan:Hn(),reset:function(t){if(fd(t)){var e=t.getData(),n=t.coordinateSystem,a=n.getBaseAxis(),i=n.getOtherAxis(a),o=e.getDimensionIndex(e.mapDimension(i.dim)),s=e.getDimensionIndex(e.mapDimension(a.dim)),l=t.get("showBackground",!0),u=e.mapDimension(i.dim),f=e.getCalculationInfo("stackResultDimension"),c=Rr(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),h=i.isHorizontal(),v=hS(a,i),d=cd(t),p=t.get("barMinHeight")||0,g=f&&e.getDimensionIndex(f),m=e.getLayout("size"),y=e.getLayout("offset");return{progress:function(_,S){for(var b=_.count,x=d&&at(b*3),C=d&&l&&at(b*3),T=d&&at(b),D=n.master.getRect(),A=h?D.width:D.height,I,M=S.getStore(),L=0;(I=_.next())!=null;){var P=M.get(c?g:o,I),R=M.get(s,I),O=v,W=void 0;c&&(W=+P-M.get(o,I));var k=void 0,E=void 0,z=void 0,H=void 0;if(h){var q=n.dataToPoint([P,R]);if(c){var j=n.dataToPoint([W,R]);O=j[0]}k=O,E=q[1]+y,z=q[0]-O,H=m,Math.abs(z)<p&&(z=(z<0?-1:1)*p)}else{var q=n.dataToPoint([R,P]);if(c){var j=n.dataToPoint([R,W]);O=j[1]}k=q[0]+y,E=O,z=m,H=q[1]-O,Math.abs(H)<p&&(H=(H<=0?-1:1)*p)}d?(x[L]=k,x[L+1]=E,x[L+2]=h?z:H,C&&(C[L]=h?D.x:k,C[L+1]=h?E:D.y,C[L+2]=A),T[I]=I):S.setItemLayout(I,{x:k,y:E,width:z,height:H}),L+=3}d&&S.setLayout({largePoints:x,largeDataIndices:T,largeBackgroundPoints:C,valueAxisHorizontal:h})}}}}}}function fd(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function cd(r){return r.pipelineContext&&r.pipelineContext.large}function hS(r,t){return t.toGlobalCoord(t.dataToCoord(t.type==="log"?1:0))}var dS=function(r,t,e,n){for(;e<n;){var a=e+n>>>1;r[a][1]<t?e=a+1:n=a}return e},vd=function(r){V(t,r);function t(e){var n=r.call(this,e)||this;return n.type="time",n}return t.prototype.getLabel=function(e){var n=this.getSetting("useUTC");return ja(e.value,Zl[ny(br(this._minLevelUnit))]||Zl.second,n,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,n,a){var i=this.getSetting("useUTC"),o=this.getSetting("locale");return ay(e,n,a,o,i)},t.prototype.getTicks=function(){var e=this._interval,n=this._extent,a=[];if(!e)return a;a.push({value:n[0],level:0});var i=this.getSetting("useUTC"),o=xS(this._minLevelUnit,this._approxInterval,i,n);return a=a.concat(o),a.push({value:n[1],level:0}),a},t.prototype.calcNiceExtent=function(e){var n=this._extent;if(n[0]===n[1]&&(n[0]-=Ue,n[1]+=Ue),n[1]===-1/0&&n[0]===1/0){var a=new Date;n[1]=+new Date(a.getFullYear(),a.getMonth(),a.getDate()),n[0]=n[1]-Ue}this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,n,a){e=e||10;var i=this._extent,o=i[1]-i[0];this._approxInterval=o/e,n!=null&&this._approxInterval<n&&(this._approxInterval=n),a!=null&&this._approxInterval>a&&(this._approxInterval=a);var s=ia.length,l=Math.min(dS(ia,this._approxInterval,0,s),s-1);this._interval=ia[l][1],this._minLevelUnit=ia[Math.max(l-1,0)][0]},t.prototype.parse=function(e){return le(e)?e:+_t(e)},t.prototype.contain=function(e){return li(this.parse(e),this._extent)},t.prototype.normalize=function(e){return ui(this.parse(e),this._extent)},t.prototype.scale=function(e){return fi(e,this._extent)},t.type="time",t}(Fr),ia=[["second",Ps],["minute",Rs],["hour",pn],["quarter-day",pn*6],["half-day",pn*12],["day",Ue*1.2],["half-week",Ue*3.5],["week",Ue*7],["month",Ue*31],["quarter",Ue*95],["half-year",Xl/2],["year",Xl]];function pS(r,t,e,n){var a=_t(t),i=_t(e),o=function(d){return $l(a,d,n)===$l(i,d,n)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},f=function(){return u()&&o("hour")},c=function(){return f()&&o("minute")},h=function(){return c()&&o("second")},v=function(){return h()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return f();case"minute":return c();case"second":return h();case"millisecond":return v()}}function gS(r,t){return r/=Ue,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function mS(r){var t=30*Ue;return r/=t,r>6?6:r>3?3:r>2?2:1}function yS(r){return r/=pn,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function Ku(r,t){return r/=t?Rs:Ps,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function _S(r){return ev(r)}function SS(r,t,e){var n=new Date(r);switch(br(t)){case"year":case"month":n[Bv(e)](0);case"day":n[Vv(e)](1);case"hour":n[zv(e)](0);case"minute":n[Fv(e)](0);case"second":n[Gv(e)](0),n[Wv(e)](0)}return n.getTime()}function xS(r,t,e,n){var a=1e4,i=Ov,o=0;function s(A,I,M,L,P,R,O){for(var W=new Date(I),k=I,E=W[L]();k<M&&k<=n[1];)O.push({value:k}),E+=A,W[P](E),k=W.getTime();O.push({value:k,notAdd:!0})}function l(A,I,M){var L=[],P=!I.length;if(!pS(br(A),n[0],n[1],e)){P&&(I=[{value:SS(new Date(n[0]),A,e)},{value:n[1]}]);for(var R=0;R<I.length-1;R++){var O=I[R].value,W=I[R+1].value;if(O!==W){var k=void 0,E=void 0,z=void 0,H=!1;switch(A){case"year":k=Math.max(1,Math.round(t/Ue/365)),E=ks(e),z=iy(e);break;case"half-year":case"quarter":case"month":k=mS(t),E=wr(e),z=Bv(e);break;case"week":case"half-week":case"day":k=gS(t),E=Qa(e),z=Vv(e),H=!0;break;case"half-day":case"quarter-day":case"hour":k=yS(t),E=Tn(e),z=zv(e);break;case"minute":k=Ku(t,!0),E=Ja(e),z=Fv(e);break;case"second":k=Ku(t,!1),E=ei(e),z=Gv(e);break;case"millisecond":k=_S(t),E=ti(e),z=Wv(e);break}s(k,O,W,E,z,H,L),A==="year"&&M.length>1&&R===0&&M.unshift({value:M[0].value-k})}}for(var R=0;R<L.length;R++)M.push(L[R]);return L}}for(var u=[],f=[],c=0,h=0,v=0;v<i.length&&o++<a;++v){var d=br(i[v]);if(ry(i[v])){l(i[v],u[u.length-1]||[],f);var p=i[v+1]?br(i[v+1]):null;if(d!==p){if(f.length){h=c,f.sort(function(A,I){return A.value-I.value});for(var g=[],m=0;m<f.length;++m){var y=f[m].value;(m===0||f[m-1].value!==y)&&(g.push(f[m]),y>=n[0]&&y<=n[1]&&c++)}var _=(n[1]-n[0])/t;if(c>_*1.5&&h>_/1.5||(u.push(g),c>_||r===i[v]))break}f=[]}}}for(var S=be(F(u,function(A){return be(A,function(I){return I.value>=n[0]&&I.value<=n[1]&&!I.notAdd})}),function(A){return A.length>0}),b=[],x=S.length-1,v=0;v<S.length;++v)for(var C=S[v],T=0;T<C.length;++T)b.push({value:C[T].value,level:x-v});b.sort(function(A,I){return A.value-I.value});for(var D=[],v=0;v<b.length;++v)(v===0||b[v].value!==b[v-1].value)&&D.push(b[v]);return D}ct.registerClass(vd);var qu=ct.prototype,_n=Fr.prototype,bS=_e,wS=Math.floor,CS=Math.ceil,oa=Math.pow,qe=Math.log,Qs=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new Fr,e._interval=0,e}return t.prototype.getTicks=function(e){var n=this._originalScale,a=this._extent,i=n.getExtent(),o=_n.getTicks.call(this,e);return F(o,function(s){var l=s.value,u=_e(oa(this.base,l));return u=l===a[0]&&this._fixMin?sa(u,i[0]):u,u=l===a[1]&&this._fixMax?sa(u,i[1]):u,{value:u}},this)},t.prototype.setExtent=function(e,n){var a=qe(this.base);e=qe(Math.max(0,e))/a,n=qe(Math.max(0,n))/a,_n.setExtent.call(this,e,n)},t.prototype.getExtent=function(){var e=this.base,n=qu.getExtent.call(this);n[0]=oa(e,n[0]),n[1]=oa(e,n[1]);var a=this._originalScale,i=a.getExtent();return this._fixMin&&(n[0]=sa(n[0],i[0])),this._fixMax&&(n[1]=sa(n[1],i[1])),n},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var n=this.base;e[0]=qe(e[0])/qe(n),e[1]=qe(e[1])/qe(n),qu.unionExtent.call(this,e)},t.prototype.unionExtentFromData=function(e,n){this.unionExtent(e.getApproximateExtent(n))},t.prototype.calcNiceTicks=function(e){e=e||10;var n=this._extent,a=n[1]-n[0];if(!(a===1/0||a<=0)){var i=kg(a),o=e/a*i;for(o<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var s=[_e(CS(n[0]/i)*i),_e(wS(n[1]/i)*i)];this._interval=i,this._niceExtent=s}},t.prototype.calcNiceExtent=function(e){_n.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return e=qe(e)/qe(this.base),li(e,this._extent)},t.prototype.normalize=function(e){return e=qe(e)/qe(this.base),ui(e,this._extent)},t.prototype.scale=function(e){return e=fi(e,this._extent),oa(this.base,e)},t.type="log",t}(ct),hd=Qs.prototype;hd.getMinorTicks=_n.getMinorTicks;hd.getLabel=_n.getLabel;function sa(r,t){return bS(r,pt(t))}ct.registerClass(Qs);var TS=function(){function r(t,e,n){this._prepareParams(t,e,n)}return r.prototype._prepareParams=function(t,e,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var a=this._isOrdinal=t.type==="ordinal";this._needCrossZero=t.type==="interval"&&e.getNeedCrossZero&&e.getNeedCrossZero();var i=this._modelMinRaw=e.get("min",!0);X(i)?this._modelMinNum=la(t,i({min:n[0],max:n[1]})):i!=="dataMin"&&(this._modelMinNum=la(t,i));var o=this._modelMaxRaw=e.get("max",!0);if(X(o)?this._modelMaxNum=la(t,o({min:n[0],max:n[1]})):o!=="dataMax"&&(this._modelMaxNum=la(t,o)),a)this._axisDataLen=e.getCategories().length;else{var s=e.get("boundaryGap"),l=N(s)?s:[s||0,s||0];typeof l[0]=="boolean"||typeof l[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[yo(l[0],1),yo(l[1],1)]}},r.prototype.calculate=function(){var t=this._isOrdinal,e=this._dataMin,n=this._dataMax,a=this._axisDataLen,i=this._boundaryGapInner,o=t?null:n-e||Math.abs(e),s=this._modelMinRaw==="dataMin"?e:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,u=s!=null,f=l!=null;s==null&&(s=t?a?0:NaN:e-i[0]*o),l==null&&(l=t?a?a-1:NaN:n+i[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var c=_o(s)||_o(l)||t&&!a;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var h=this._determinedMin,v=this._determinedMax;return h!=null&&(s=h,u=!0),v!=null&&(l=v,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:c}},r.prototype.modifyDataMinMax=function(t,e){this[AS[t]]=e},r.prototype.setDeterminedMinMax=function(t,e){var n=DS[t];this[n]=e},r.prototype.freeze=function(){this.frozen=!0},r}(),DS={min:"_determinedMin",max:"_determinedMax"},AS={min:"_dataMin",max:"_dataMax"};function dd(r,t,e){var n=r.rawExtentInfo;return n||(n=new TS(r,t,e),r.rawExtentInfo=n,n)}function la(r,t){return t==null?null:_o(t)?NaN:r.parse(t)}function pd(r,t){var e=r.type,n=dd(r,t,r.getExtent()).calculate();r.setBlank(n.isBlank);var a=n.min,i=n.max,o=t.ecModel;if(o&&e==="time"){var s=od("bar",o),l=!1;if(w(s,function(c){l=l||c.getBaseAxis()===t.axis}),l){var u=sd(s),f=IS(a,i,t,u);a=f.min,i=f.max}}return{extent:[a,i],fixMin:n.minFixed,fixMax:n.maxFixed}}function IS(r,t,e,n){var a=e.axis.getExtent(),i=a[1]-a[0],o=vS(n,e.axis);if(o===void 0)return{min:r,max:t};var s=1/0;w(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;w(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=t-r,c=1-(s+l)/i,h=f/c-f;return t+=h*(l/u),r-=h*(s/u),{min:r,max:t}}function ju(r,t){var e=t,n=pd(r,e),a=n.extent,i=e.get("splitNumber");r instanceof Qs&&(r.base=e.get("logBase"));var o=r.type,s=e.get("interval"),l=o==="interval"||o==="time";r.setExtent(a[0],a[1]),r.calcNiceExtent({splitNumber:i,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?e.get("minInterval"):null,maxInterval:l?e.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function MS(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new Ks({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new vd({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(ct.getClass(t)||Fr)}}function LS(r){var t=r.scale.getExtent(),e=t[0],n=t[1];return!(e>0&&n>0||e<0&&n<0)}function Un(r){var t=r.getLabelModel().get("formatter"),e=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(n){return function(a,i){return r.scale.getFormattedLabel(a,i,n)}}(t):G(t)?function(n){return function(a){var i=r.scale.getLabel(a),o=n.replace("{value}",i??"");return o}}(t):X(t)?function(n){return function(a,i){return e!=null&&(i=a.value-e),n(Js(r,a),i,a.level!=null?{level:a.level}:null)}}(t):function(n){return r.scale.getLabel(n)}}function Js(r,t){return r.type==="category"?r.scale.getLabel(t):t.value}function PS(r){var t=r.model,e=r.scale;if(!(!t.get(["axisLabel","show"])||e.isBlank())){var n,a,i=e.getExtent();e instanceof Ks?a=e.count():(n=e.getTicks(),a=n.length);var o=r.getLabelModel(),s=Un(r),l,u=1;a>40&&(u=Math.ceil(a/40));for(var f=0;f<a;f+=u){var c=n?n[f]:{value:i[0]+f},h=s(c,f),v=o.getTextRect(h),d=RS(v,o.get("rotate")||0);l?l.union(d):l=d}return l}}function RS(r,t){var e=t*Math.PI/180,n=r.width,a=r.height,i=n*Math.abs(Math.cos(e))+Math.abs(a*Math.sin(e)),o=n*Math.abs(Math.sin(e))+Math.abs(a*Math.cos(e)),s=new Ye(r.x,r.y,i,o);return s}function el(r){var t=r.get("interval");return t??"auto"}function gd(r){return r.type==="category"&&el(r.getLabelModel())===0}function md(r,t){var e={};return w(r.mapDimensionsAll(t),function(n){e[J_(r,n)]=!0}),ze(e)}function kS(r,t,e){t&&w(md(t,e),function(n){var a=t.getApproximateExtent(n);a[0]<r[0]&&(r[0]=a[0]),a[1]>r[1]&&(r[1]=a[1])})}var ES=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},r.prototype.getCoordSysModel=function(){},r}(),Qu=[],OS={registerPreprocessor:$h,registerProcessor:Kh,registerPostInit:L_,registerPostUpdate:P_,registerUpdateLifecycle:Zs,registerAction:ft,registerCoordinateSystem:R_,registerLayout:k_,registerVisual:sr,registerTransform:O_,registerLoading:qh,registerMap:E_,registerImpl:c_,PRIORITY:C_,ComponentModel:ee,ComponentView:Ne,SeriesModel:Ve,ChartView:ke,registerComponentModel:function(r){ee.registerClass(r)},registerComponentView:function(r){Ne.registerClass(r)},registerSeriesModel:function(r){Ve.registerClass(r)},registerChartView:function(r){ke.registerClass(r)},registerSubTypeDefaulter:function(r,t){ee.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){og(r,t)}};function St(r){if(N(r)){w(r,function(t){St(t)});return}se(Qu,r)>=0||(Qu.push(r),X(r)&&(r={install:r}),r.install(OS))}var Pn=ue();function NS(r){return r.type==="category"?VS(r):FS(r)}function BS(r,t){return r.type==="category"?zS(r,t):{ticks:F(r.scale.getTicks(),function(e){return e.value})}}function VS(r){var t=r.getLabelModel(),e=yd(r,t);return!t.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:e.labelCategoryInterval}:e}function yd(r,t){var e=_d(r,"labels"),n=el(t),a=Sd(e,n);if(a)return a;var i,o;return X(n)?i=wd(r,n):(o=n==="auto"?GS(r):n,i=bd(r,o)),xd(e,n,{labels:i,labelCategoryInterval:o})}function zS(r,t){var e=_d(r,"ticks"),n=el(t),a=Sd(e,n);if(a)return a;var i,o;if((!t.get("show")||r.scale.isBlank())&&(i=[]),X(n))i=wd(r,n,!0);else if(n==="auto"){var s=yd(r,r.getLabelModel());o=s.labelCategoryInterval,i=F(s.labels,function(l){return l.tickValue})}else o=n,i=bd(r,o,!0);return xd(e,n,{ticks:i,tickCategoryInterval:o})}function FS(r){var t=r.scale.getTicks(),e=Un(r);return{labels:F(t,function(n,a){return{level:n.level,formattedLabel:e(n,a),rawLabel:r.scale.getLabel(n),tickValue:n.value}})}}function _d(r,t){return Pn(r)[t]||(Pn(r)[t]=[])}function Sd(r,t){for(var e=0;e<r.length;e++)if(r[e].key===t)return r[e].value}function xd(r,t,e){return r.push({key:t,value:e}),e}function GS(r){var t=Pn(r).autoInterval;return t??(Pn(r).autoInterval=r.calculateCategoryInterval())}function WS(r){var t=HS(r),e=Un(r),n=(t.axisRotate-t.labelRotate)/180*Math.PI,a=r.scale,i=a.getExtent(),o=a.count();if(i[1]-i[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var l=i[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),f=Math.abs(u*Math.cos(n)),c=Math.abs(u*Math.sin(n)),h=0,v=0;l<=i[1];l+=s){var d=0,p=0,g=ds(e({value:l}),t.font,"center","top");d=g.width*1.3,p=g.height*1.3,h=Math.max(h,d,7),v=Math.max(v,p,7)}var m=h/f,y=v/c;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(m,y))),S=Pn(r.model),b=r.getExtent(),x=S.lastAutoInterval,C=S.lastTickCount;return x!=null&&C!=null&&Math.abs(x-_)<=1&&Math.abs(C-o)<=1&&x>_&&S.axisExtent0===b[0]&&S.axisExtent1===b[1]?_=x:(S.lastTickCount=o,S.lastAutoInterval=_,S.axisExtent0=b[0],S.axisExtent1=b[1]),_}function HS(r){var t=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function bd(r,t,e){var n=Un(r),a=r.scale,i=a.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=i[0],f=a.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=gd(r),h=o.get("showMinLabel")||c,v=o.get("showMaxLabel")||c;h&&u!==i[0]&&p(i[0]);for(var d=u;d<=i[1];d+=l)p(d);v&&d-l!==i[1]&&p(i[1]);function p(g){var m={value:g};s.push(e?g:{formattedLabel:n(m),rawLabel:a.getLabel(m),tickValue:g})}return s}function wd(r,t,e){var n=r.scale,a=Un(r),i=[];return w(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;t(o.value,s)&&i.push(e?l:{formattedLabel:a(o),rawLabel:s,tickValue:l})}),i}var Ju=[0,1],US=function(){function r(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return r.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),a=Math.max(e[0],e[1]);return t>=n&&t<=a},r.prototype.containData=function(t){return this.scale.contain(t)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(t){return Qc(t||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},r.prototype.dataToCoord=function(t,e){var n=this._extent,a=this.scale;return t=a.normalize(t),this.onBand&&a.type==="ordinal"&&(n=n.slice(),ef(n,a.count())),Ot(t,Ju,n,e)},r.prototype.coordToData=function(t,e){var n=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(n=n.slice(),ef(n,a.count()));var i=Ot(t,n,Ju,e);return this.scale.scale(i)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),n=BS(this,e),a=n.ticks,i=F(a,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=e.get("alignWithLabel");return YS(this,i,o,t.clamp),i},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var n=this.scale.getMinorTicks(e),a=F(n,function(i){return F(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return a},r.prototype.getViewLabels=function(){return NS(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);n===0&&(n=1);var a=Math.abs(t[1]-t[0]);return Math.abs(a)/n},r.prototype.calculateCategoryInterval=function(){return WS(this)},r}();function ef(r,t){var e=r[1]-r[0],n=t,a=e/n/2;r[0]+=a,r[1]-=a}function YS(r,t,e,n){var a=t.length;if(!r.onBand||e||!a)return;var i=r.getExtent(),o,s;if(a===1)t[0].coord=i[0],o=t[1]={coord:i[1]};else{var l=t[a-1].tickValue-t[0].tickValue,u=(t[a-1].coord-t[0].coord)/l;w(t,function(v){v.coord-=u/2});var f=r.scale.getExtent();s=1+f[1]-t[a-1].tickValue,o={coord:t[a-1].coord+u*s},t.push(o)}var c=i[0]>i[1];h(t[0].coord,i[0])&&(n?t[0].coord=i[0]:t.shift()),n&&h(i[0],t[0].coord)&&t.unshift({coord:i[0]}),h(i[1],o.coord)&&(n?o.coord=i[1]:t.pop()),n&&h(o.coord,i[1])&&t.push({coord:i[1]});function h(v,d){return v=_e(v),d=_e(d),c?v>d:v<d}}var tn=Math.PI*2,Kt=Kc.CMD,XS=["top","right","bottom","left"];function ZS(r,t,e,n,a){var i=e.width,o=e.height;switch(r){case"top":n.set(e.x+i/2,e.y-t),a.set(0,-1);break;case"bottom":n.set(e.x+i/2,e.y+o+t),a.set(0,1);break;case"left":n.set(e.x-t,e.y+o/2),a.set(-1,0);break;case"right":n.set(e.x+i+t,e.y+o/2),a.set(1,0);break}}function $S(r,t,e,n,a,i,o,s,l){o-=r,s-=t;var u=Math.sqrt(o*o+s*s);o/=u,s/=u;var f=o*e+r,c=s*e+t;if(Math.abs(n-a)%tn<1e-4)return l[0]=f,l[1]=c,u-e;if(i){var h=n;n=on(a),a=on(h)}else n=on(n),a=on(a);n>a&&(a+=tn);var v=Math.atan2(s,o);if(v<0&&(v+=tn),v>=n&&v<=a||v+tn>=n&&v+tn<=a)return l[0]=f,l[1]=c,u-e;var d=e*Math.cos(n)+r,p=e*Math.sin(n)+t,g=e*Math.cos(a)+r,m=e*Math.sin(a)+t,y=(d-o)*(d-o)+(p-s)*(p-s),_=(g-o)*(g-o)+(m-s)*(m-s);return y<_?(l[0]=d,l[1]=p,Math.sqrt(y)):(l[0]=g,l[1]=m,Math.sqrt(_))}function Va(r,t,e,n,a,i,o,s){var l=a-r,u=i-t,f=e-r,c=n-t,h=Math.sqrt(f*f+c*c);f/=h,c/=h;var v=l*f+u*c,d=v/h;s&&(d=Math.min(Math.max(d,0),1)),d*=h;var p=o[0]=r+d*f,g=o[1]=t+d*c;return Math.sqrt((p-a)*(p-a)+(g-i)*(g-i))}function Cd(r,t,e,n,a,i,o){e<0&&(r=r+e,e=-e),n<0&&(t=t+n,n=-n);var s=r+e,l=t+n,u=o[0]=Math.min(Math.max(a,r),s),f=o[1]=Math.min(Math.max(i,t),l);return Math.sqrt((u-a)*(u-a)+(f-i)*(f-i))}var Qe=[];function KS(r,t,e){var n=Cd(t.x,t.y,t.width,t.height,r.x,r.y,Qe);return e.set(Qe[0],Qe[1]),n}function qS(r,t,e){for(var n=0,a=0,i=0,o=0,s,l,u=1/0,f=t.data,c=r.x,h=r.y,v=0;v<f.length;){var d=f[v++];v===1&&(n=f[v],a=f[v+1],i=n,o=a);var p=u;switch(d){case Kt.M:i=f[v++],o=f[v++],n=i,a=o;break;case Kt.L:p=Va(n,a,f[v],f[v+1],c,h,Qe,!0),n=f[v++],a=f[v++];break;case Kt.C:p=lg(n,a,f[v++],f[v++],f[v++],f[v++],f[v],f[v+1],c,h,Qe),n=f[v++],a=f[v++];break;case Kt.Q:p=sg(n,a,f[v++],f[v++],f[v],f[v+1],c,h,Qe),n=f[v++],a=f[v++];break;case Kt.A:var g=f[v++],m=f[v++],y=f[v++],_=f[v++],S=f[v++],b=f[v++];v+=1;var x=!!(1-f[v++]);s=Math.cos(S)*y+g,l=Math.sin(S)*_+m,v<=1&&(i=s,o=l);var C=(c-g)*_/y+g;p=$S(g,m,_,S,S+b,x,C,h,Qe),n=Math.cos(S+b)*y+g,a=Math.sin(S+b)*_+m;break;case Kt.R:i=n=f[v++],o=a=f[v++];var T=f[v++],D=f[v++];p=Cd(i,o,T,D,c,h,Qe);break;case Kt.Z:p=Va(n,a,i,o,c,h,Qe,!0),n=i,a=o;break}p<u&&(u=p,e.set(Qe[0],Qe[1]))}return u}var et=new we,ae=new we,ve=new we,it=new we,rt=new we;function tf(r,t){if(r){var e=r.getTextGuideLine(),n=r.getTextContent();if(n&&e){var a=r.textGuideLineConfig||{},i=[[0,0],[0,0],[0,0]],o=a.candidates||XS,s=n.getBoundingRect().clone();s.applyTransform(n.getComputedTransform());var l=1/0,u=a.anchor,f=r.getComputedTransform(),c=f&&hs([],f),h=t.get("length2")||0;u&&ve.copy(u);for(var v=0;v<o.length;v++){var d=o[v];ZS(d,0,s,et,it),we.scaleAndAdd(ae,et,it,h),ae.transform(c);var p=r.getBoundingRect(),g=u?u.distance(ae):r instanceof Se?qS(ae,r.path,ve):KS(ae,p,ve);g<l&&(l=g,ae.transform(f),ve.transform(f),ve.toArray(i[0]),ae.toArray(i[1]),et.toArray(i[2]))}Td(i,t.get("minTurnAngle")),e.setShape({points:i})}}}var za=[],Pe=new we;function Td(r,t){if(t<=180&&t>0){t=t/180*Math.PI,et.fromArray(r[0]),ae.fromArray(r[1]),ve.fromArray(r[2]),we.sub(it,et,ae),we.sub(rt,ve,ae);var e=it.len(),n=rt.len();if(!(e<.001||n<.001)){it.scale(1/e),rt.scale(1/n);var a=it.dot(rt),i=Math.cos(t);if(i<a){var o=Va(ae.x,ae.y,ve.x,ve.y,et.x,et.y,za,!1);Pe.fromArray(za),Pe.scaleAndAdd(rt,o/Math.tan(Math.PI-t));var s=ve.x!==ae.x?(Pe.x-ae.x)/(ve.x-ae.x):(Pe.y-ae.y)/(ve.y-ae.y);if(isNaN(s))return;s<0?we.copy(Pe,ae):s>1&&we.copy(Pe,ve),Pe.toArray(r[1])}}}}function jS(r,t,e){if(e<=180&&e>0){e=e/180*Math.PI,et.fromArray(r[0]),ae.fromArray(r[1]),ve.fromArray(r[2]),we.sub(it,ae,et),we.sub(rt,ve,ae);var n=it.len(),a=rt.len();if(!(n<.001||a<.001)){it.scale(1/n),rt.scale(1/a);var i=it.dot(t),o=Math.cos(e);if(i<o){var s=Va(ae.x,ae.y,ve.x,ve.y,et.x,et.y,za,!1);Pe.fromArray(za);var l=Math.PI/2,u=Math.acos(rt.dot(t)),f=l+u-e;if(f>=l)we.copy(Pe,ve);else{Pe.scaleAndAdd(rt,s/Math.tan(Math.PI/2-f));var c=ve.x!==ae.x?(Pe.x-ae.x)/(ve.x-ae.x):(Pe.y-ae.y)/(ve.y-ae.y);if(isNaN(c))return;c<0?we.copy(Pe,ae):c>1&&we.copy(Pe,ve)}Pe.toArray(r[1])}}}}function Gi(r,t,e,n){var a=e==="normal",i=a?r:r.ensureState(e);i.ignore=t;var o=n.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();a?r.useStyle(s):i.style=s}function QS(r,t){var e=t.smooth,n=t.points;if(n)if(r.moveTo(n[0][0],n[0][1]),e>0&&n.length>=3){var a=xl(n[0],n[1]),i=xl(n[1],n[2]);if(!a||!i){r.lineTo(n[1][0],n[1][1]),r.lineTo(n[2][0],n[2][1]);return}var o=Math.min(a,i)*e,s=gi([],n[1],n[0],o/a),l=gi([],n[1],n[2],o/i),u=gi([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],n[2][0],n[2][1])}else for(var f=1;f<n.length;f++)r.lineTo(n[f][0],n[f][1])}function Dd(r,t,e){var n=r.getTextGuideLine(),a=r.getTextContent();if(!a){n&&r.removeTextGuideLine();return}for(var i=t.normal,o=i.get("show"),s=a.ignore,l=0;l<Ma.length;l++){var u=Ma[l],f=t[u],c=u==="normal";if(f){var h=f.get("show"),v=c?s:ie(a.states[u]&&a.states[u].ignore,s);if(v||!ie(h,o)){var d=c?n:n&&n.states[u];d&&(d.ignore=!0),n&&Gi(n,!0,u,f);continue}n||(n=new Nn,r.setTextGuideLine(n),!c&&(s||!o)&&Gi(n,!0,"normal",t.normal),r.stateProxy&&(n.stateProxy=r.stateProxy)),Gi(n,!1,u,f)}}if(n){re(n.style,e),n.style.fill=null;var p=i.get("showAbove"),g=r.textGuideLineConfig=r.textGuideLineConfig||{};g.showAbove=p||!1,n.buildPath=QS}}function Ad(r,t){t=t||"labelLine";for(var e={normal:r.getModel(t)},n=0;n<Xe.length;n++){var a=Xe[n];e[a]=r.getModel([a,t])}return e}function Id(r){for(var t=[],e=0;e<r.length;e++){var n=r[e];if(!n.defaultAttr.ignore){var a=n.label,i=a.getComputedTransform(),o=a.getBoundingRect(),s=!i||i[1]<1e-5&&i[2]<1e-5,l=a.style.margin||0,u=o.clone();u.applyTransform(i),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var f=s?new Da(o,i):null;t.push({label:a,labelLine:n.labelLine,rect:u,localRect:o,obb:f,priority:n.priority,defaultAttr:n.defaultAttr,layoutOption:n.computedLayoutOption,axisAligned:s,transform:i})}}return t}function Md(r,t,e,n,a,i){var o=r.length;if(o<2)return;r.sort(function(T,D){return T.rect[t]-D.rect[t]});for(var s=0,l,u=!1,f=0,c=0;c<o;c++){var h=r[c],v=h.rect;l=v[t]-s,l<0&&(v[t]-=l,h.label[t]-=l,u=!0);var d=Math.max(-l,0);f+=d,s=v[t]+v[e]}f>0&&i&&b(-f/o,0,o);var p=r[0],g=r[o-1],m,y;_(),m<0&&x(-m,.8),y<0&&x(y,.8),_(),S(m,y,1),S(y,m,-1),_(),m<0&&C(-m),y<0&&C(y);function _(){m=p.rect[t]-n,y=a-g.rect[t]-g.rect[e]}function S(T,D,A){if(T<0){var I=Math.min(D,-T);if(I>0){b(I*A,0,o);var M=I+T;M<0&&x(-M*A,1)}else x(-T*A,1)}}function b(T,D,A){T!==0&&(u=!0);for(var I=D;I<A;I++){var M=r[I],L=M.rect;L[t]+=T,M.label[t]+=T}}function x(T,D){for(var A=[],I=0,M=1;M<o;M++){var L=r[M-1].rect,P=Math.max(r[M].rect[t]-L[t]-L[e],0);A.push(P),I+=P}if(I){var R=Math.min(Math.abs(T)/I,D);if(T>0)for(var M=0;M<o-1;M++){var O=A[M]*R;b(O,0,M+1)}else for(var M=o-1;M>0;M--){var O=A[M-1]*R;b(-O,M,o)}}}function C(T){var D=T<0?-1:1;T=Math.abs(T);for(var A=Math.ceil(T/(o-1)),I=0;I<o-1;I++)if(D>0?b(A,0,I+1):b(-A,o-I-1,o),T-=A,T<=0)return}return u}function JS(r,t,e,n){return Md(r,"x","width",t,e,n)}function Ld(r,t,e,n){return Md(r,"y","height",t,e,n)}function Pd(r){var t=[];r.sort(function(p,g){return g.priority-p.priority});var e=new Ye(0,0,0,0);function n(p){if(!p.ignore){var g=p.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}p.ignore=!0}for(var a=0;a<r.length;a++){var i=r[a],o=i.axisAligned,s=i.localRect,l=i.transform,u=i.label,f=i.labelLine;e.copy(i.rect),e.width-=.1,e.height-=.1,e.x+=.05,e.y+=.05;for(var c=i.obb,h=!1,v=0;v<t.length;v++){var d=t[v];if(e.intersect(d.rect)){if(o&&d.axisAligned){h=!0;break}if(d.obb||(d.obb=new Da(d.localRect,d.transform)),c||(c=new Da(s,l)),c.intersect(d.obb)){h=!0;break}}}h?(n(u),f&&n(f)):(u.attr("ignore",i.defaultAttr.ignore),f&&f.attr("ignore",i.defaultAttr.labelGuideIgnore),t.push(i))}}function ex(r){if(r){for(var t=[],e=0;e<r.length;e++)t.push(r[e].slice());return t}}function tx(r,t){var e=r.label,n=t&&t.getTextGuideLine();return{dataIndex:r.dataIndex,dataType:r.dataType,seriesIndex:r.seriesModel.seriesIndex,text:r.label.style.text,rect:r.hostRect,labelRect:r.rect,align:e.style.align,verticalAlign:e.style.verticalAlign,labelLinePoints:ex(n&&n.shape.points)}}var rf=["align","verticalAlign","width","height","fontSize"],Me=new Xc,Wi=ue(),rx=ue();function ua(r,t,e){for(var n=0;n<e.length;n++){var a=e[n];t[a]!=null&&(r[a]=t[a])}}var fa=["x","y","rotation"],nx=function(){function r(){this._labelList=[],this._chartViewList=[]}return r.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},r.prototype._addLabel=function(t,e,n,a,i){var o=a.style,s=a.__hostTarget,l=s.textConfig||{},u=a.getComputedTransform(),f=a.getBoundingRect().plain();Ye.applyTransform(f,f,u),u?Me.setLocalTransform(u):(Me.x=Me.y=Me.rotation=Me.originX=Me.originY=0,Me.scaleX=Me.scaleY=1),Me.rotation=on(Me.rotation);var c=a.__hostTarget,h;if(c){h=c.getBoundingRect().plain();var v=c.getComputedTransform();Ye.applyTransform(h,h,v)}var d=h&&c.getTextGuideLine();this._labelList.push({label:a,labelLine:d,seriesModel:n,dataIndex:t,dataType:e,layoutOption:i,computedLayoutOption:null,rect:f,hostRect:h,priority:h?h.width*h.height:0,defaultAttr:{ignore:a.ignore,labelGuideIgnore:d&&d.ignore,x:Me.x,y:Me.y,scaleX:Me.scaleX,scaleY:Me.scaleY,rotation:Me.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:a.cursor,attachedPos:l.position,attachedRot:l.rotation}})},r.prototype.addLabelsOfSeries=function(t){var e=this;this._chartViewList.push(t);var n=t.__model,a=n.get("labelLayout");(X(a)||ze(a).length)&&t.group.traverse(function(i){if(i.ignore)return!0;var o=i.getTextContent(),s=Z(i);o&&!o.disableLabelLayout&&e._addLabel(s.dataIndex,s.dataType,n,o,a)})},r.prototype.updateLayoutConfig=function(t){var e=t.getWidth(),n=t.getHeight();function a(_,S){return function(){tf(_,S)}}for(var i=0;i<this._labelList.length;i++){var o=this._labelList[i],s=o.label,l=s.__hostTarget,u=o.defaultAttr,f=void 0;X(o.layoutOption)?f=o.layoutOption(tx(o,l)):f=o.layoutOption,f=f||{},o.computedLayoutOption=f;var c=Math.PI/180;l&&l.setTextConfig({local:!1,position:f.x!=null||f.y!=null?null:u.attachedPos,rotation:f.rotate!=null?f.rotate*c:u.attachedRot,offset:[f.dx||0,f.dy||0]});var h=!1;if(f.x!=null?(s.x=te(f.x,e),s.setStyle("x",0),h=!0):(s.x=u.x,s.setStyle("x",u.style.x)),f.y!=null?(s.y=te(f.y,n),s.setStyle("y",0),h=!0):(s.y=u.y,s.setStyle("y",u.style.y)),f.labelLinePoints){var v=l.getTextGuideLine();v&&(v.setShape({points:f.labelLinePoints}),h=!1)}var d=Wi(s);d.needsUpdateLabelLine=h,s.rotation=f.rotate!=null?f.rotate*c:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var p=0;p<rf.length;p++){var g=rf[p];s.setStyle(g,f[g]!=null?f[g]:u.style[g])}if(f.draggable){if(s.draggable=!0,s.cursor="move",l){var m=o.seriesModel;if(o.dataIndex!=null){var y=o.seriesModel.getData(o.dataType);m=y.getItemModel(o.dataIndex)}s.on("drag",a(l,m.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},r.prototype.layout=function(t){var e=t.getWidth(),n=t.getHeight(),a=Id(this._labelList),i=be(a,function(l){return l.layoutOption.moveOverlap==="shiftX"}),o=be(a,function(l){return l.layoutOption.moveOverlap==="shiftY"});JS(i,0,e),Ld(o,0,n);var s=be(a,function(l){return l.layoutOption.hideOverlap});Pd(s)},r.prototype.processLabelsOverall=function(){var t=this;w(this._chartViewList,function(e){var n=e.__model,a=e.ignoreLabelLineUpdate,i=n.isAnimationEnabled();e.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!a,l=o.getTextContent();!s&&l&&(s=Wi(l).needsUpdateLabelLine),s&&t._updateLabelLine(o,n),i&&t._animateLabels(o,n)})})},r.prototype._updateLabelLine=function(t,e){var n=t.getTextContent(),a=Z(t),i=a.dataIndex;if(n&&i!=null){var o=e.getData(a.dataType),s=o.getItemModel(i),l={},u=o.getItemVisual(i,"style");if(u){var f=o.getVisual("drawType");l.stroke=u[f]}var c=s.getModel("labelLine");Dd(t,Ad(s),l),tf(t,c)}},r.prototype._animateLabels=function(t,e){var n=t.getTextContent(),a=t.getTextGuideLine();if(n&&(t.forceLabelAnimation||!n.ignore&&!n.invisible&&!t.disableLabelAnimation&&!Sr(t))){var i=Wi(n),o=i.oldLayout,s=Z(t),l=s.dataIndex,u={x:n.x,y:n.y,rotation:n.rotation},f=e.getData(s.dataType);if(o){n.attr(o);var h=t.prevStates;h&&(se(h,"select")>=0&&n.attr(i.oldLayoutSelect),se(h,"emphasis")>=0&&n.attr(i.oldLayoutEmphasis)),me(n,u,e,l)}else if(n.attr(u),!Vr(n).valueAnimation){var c=ie(n.style.opacity,1);n.style.opacity=0,De(n,{style:{opacity:c}},e,l)}if(i.oldLayout=u,n.states.select){var v=i.oldLayoutSelect={};ua(v,u,fa),ua(v,n.states.select,fa)}if(n.states.emphasis){var d=i.oldLayoutEmphasis={};ua(d,u,fa),ua(d,n.states.emphasis,fa)}Gm(n,l,f,e,e)}if(a&&!a.ignore&&!a.invisible){var i=rx(a),o=i.oldLayout,p={points:a.shape.points};o?(a.attr({shape:o}),me(a,{shape:p},e)):(a.setShape(p),a.style.strokePercent=0,De(a,{style:{strokePercent:1}},e)),i.oldLayout=p}},r}(),Hi=ue();function U1(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,n){var a=Hi(e).labelManager;a||(a=Hi(e).labelManager=new nx),a.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(t,e,n){var a=Hi(e).labelManager;n.updatedSeries.forEach(function(i){a.addLabelsOfSeries(e.getViewOfSeriesModel(i))}),a.updateLayoutConfig(e),a.layout(e),a.processLabelsOverall()})}var ax=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(ee),Xo=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Re).models[0]},t.type="cartesian2dAxis",t}(ee);xt(Xo,ES);var Rd={show:!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:"#6E7079",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:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},ix=K({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Rd),tl=K({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},Rd),ox=K({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},tl),sx=re({logBase:10},tl);const lx={category:ix,value:tl,time:ox,log:sx};var ux={value:1,category:1,time:1,log:1};function nf(r,t,e,n){w(ux,function(a,i){var o=K(K({},lx[i],!0),n,!0),s=function(l){V(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=t+"Axis."+i,f}return u.prototype.mergeDefaultAndTheme=function(f,c){var h=Dn(this),v=h?ni(f):{},d=c.getTheme();K(f,d.get(i+"Axis")),K(f,this.getDefaultOption()),f.type=af(f),h&&Lr(f,v,h)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=Uo.createByAxisModel(this))},u.prototype.getCategories=function(f){var c=this.option;if(c.type==="category")return f?c.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=t+"Axis."+i,u.defaultOption=o,u}(e);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(t+"Axis",af)}function af(r){return r.type||(r.data?"category":"value")}var fx=function(){function r(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return r.prototype.getAxis=function(t){return this._axes[t]},r.prototype.getAxes=function(){return F(this._dimList,function(t){return this._axes[t]},this)},r.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),be(this.getAxes(),function(e){return e.scale.type===t})},r.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},r}(),Zo=["x","y"];function of(r){return r.type==="interval"||r.type==="time"}var cx=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=Zo,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!of(e)||!of(n))){var a=e.getExtent(),i=n.getExtent(),o=this.dataToPoint([a[0],i[0]]),s=this.dataToPoint([a[1],i[1]]),l=a[1]-a[0],u=i[1]-i[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,c=(s[1]-o[1])/u,h=o[0]-a[0]*f,v=o[1]-i[0]*c,d=this._transform=[f,0,0,c,h,v];this._invTransform=hs([],d)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var n=this.getAxis("x"),a=this.getAxis("y");return n.contain(n.toLocalCoord(e[0]))&&a.contain(a.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,n){var a=this.dataToPoint(e),i=this.dataToPoint(n),o=this.getArea(),s=new Ye(a[0],a[1],i[0]-a[0],i[1]-a[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,n,a){a=a||[];var i=e[0],o=e[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return tr(a,e,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return a[0]=s.toGlobalCoord(s.dataToCoord(i,n)),a[1]=l.toGlobalCoord(l.dataToCoord(o,n)),a},t.prototype.clampData=function(e,n){var a=this.getAxis("x").scale,i=this.getAxis("y").scale,o=a.getExtent(),s=i.getExtent(),l=a.parse(e[0]),u=i.parse(e[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},t.prototype.pointToData=function(e,n){var a=[];if(this._invTransform)return tr(a,e,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return a[0]=i.coordToData(i.toLocalCoord(e[0]),n),a[1]=o.coordToData(o.toLocalCoord(e[1]),n),a},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(e){e=e||0;var n=this.getAxis("x").getGlobalExtent(),a=this.getAxis("y").getGlobalExtent(),i=Math.min(n[0],n[1])-e,o=Math.min(a[0],a[1])-e,s=Math.max(n[0],n[1])-i+e,l=Math.max(a[0],a[1])-o+e;return new Ye(i,o,s,l)},t}(fx),vx=function(r){V(t,r);function t(e,n,a,i,o){var s=r.call(this,e,n,a)||this;return s.index=0,s.type=i||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.getGlobalExtent=function(e){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),e&&n[0]>n[1]&&n.reverse(),n},t.prototype.pointToData=function(e,n){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),n)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(US);function $o(r,t,e){e=e||{};var n=r.coordinateSystem,a=t.axis,i={},o=a.getAxesOnZeroOf()[0],s=a.position,l=o?"onZero":s,u=a.dim,f=n.getRect(),c=[f.x,f.x+f.width,f.y,f.y+f.height],h={left:0,right:1,top:0,bottom:1,onZero:2},v=t.get("offset")||0,d=u==="x"?[c[2]-v,c[3]+v]:[c[0]-v,c[1]+v];if(o){var p=o.toGlobalCoord(o.dataToCoord(0));d[h.onZero]=Math.max(Math.min(p,d[1]),d[0])}i.position=[u==="y"?d[h[l]]:c[0],u==="x"?d[h[l]]:c[3]],i.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=g[s],i.labelOffset=o?d[h[s]]-d[h.onZero]:0,t.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),Dr(e.labelInside,t.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var m=t.get(["axisLabel","rotate"]);return i.labelRotate=l==="top"?-m:m,i.z2=1,i}function sf(r){return r.get("coordinateSystem")==="cartesian2d"}function lf(r){var t={xAxisModel:null,yAxisModel:null};return w(t,function(e,n){var a=n.replace(/Model$/,""),i=r.getReferringComponents(a,Re).models[0];t[n]=i}),t}var Ui=Math.log;function hx(r,t,e){var n=Fr.prototype,a=n.getTicks.call(e),i=n.getTicks.call(e,!0),o=a.length-1,s=n.getInterval.call(e),l=pd(r,t),u=l.extent,f=l.fixMin,c=l.fixMax;if(r.type==="log"){var h=Ui(r.base);u=[Ui(u[0])/h,Ui(u[1])/h]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:c});var v=n.getExtent.call(r);f&&(u[0]=v[0]),c&&(u[1]=v[1]);var d=n.getInterval.call(r),p=u[0],g=u[1];if(f&&c)d=(g-p)/o;else if(f)for(g=u[0]+d*o;g<u[1]&&isFinite(g)&&isFinite(u[1]);)d=Fi(d),g=u[0]+d*o;else if(c)for(p=u[1]-d*o;p>u[0]&&isFinite(p)&&isFinite(u[0]);)d=Fi(d),p=u[1]-d*o;else{var m=r.getTicks().length-1;m>o&&(d=Fi(d));var y=d*o;g=Math.ceil(u[1]/d)*d,p=_e(g-y),p<0&&u[0]>=0?(p=0,g=_e(y)):g>0&&u[1]<=0&&(g=0,p=-_e(y))}var _=(a[0].value-i[0].value)/s,S=(a[o].value-i[o].value)/s;n.setExtent.call(r,p+d*_,g+d*S),n.setInterval.call(r,d),(_||S)&&n.setNiceExtent.call(r,p+d,g-d)}var dx=function(){function r(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Zo,this._initCartesian(t,e,n),this.model=t}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model);function a(o){var s,l=ze(o),u=l.length;if(u){for(var f=[],c=u-1;c>=0;c--){var h=+l[c],v=o[h],d=v.model,p=v.scale;Yo(p)&&d.get("alignTicks")&&d.get("interval")==null?f.push(v):(ju(p,d),Yo(p)&&(s=v))}f.length&&(s||(s=f.pop(),ju(s.scale,s.model)),w(f,function(g){hx(g.scale,g.model,s.scale)}))}}a(n.x),a(n.y);var i={};w(n.x,function(o){uf(n,"y",o,i)}),w(n.y,function(o){uf(n,"x",o,i)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,n){var a=t.getBoxLayoutParams(),i=!n&&t.get("containLabel"),o=Gt(a,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var s=this._axesList;l(),i&&(w(s,function(u){if(!u.model.get(["axisLabel","inside"])){var f=PS(u);if(f){var c=u.isHorizontal()?"height":"width",h=u.model.get(["axisLabel","margin"]);o[c]-=f[c]+h,u.position==="top"?o.y+=f.height+h:u.position==="left"&&(o.x+=f.width+h)}}}),l()),w(this._coordsList,function(u){u.calcAffineTransform()});function l(){w(s,function(u){var f=u.isHorizontal(),c=f?[0,o.width]:[0,o.height],h=u.inverse?1:0;u.setExtent(c[h],c[1-h]),px(u,f?o.x:o.y)})}},r.prototype.getAxis=function(t,e){var n=this._axesMap[t];if(n!=null)return n[e||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var n="x"+t+"y"+e;return this._coordsMap[n]}Y(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var a=0,i=this._coordsList;a<i.length;a++)if(i[a].getAxis("x").index===t||i[a].getAxis("y").index===e)return i[a]},r.prototype.getCartesians=function(){return this._coordsList.slice()},r.prototype.convertToPixel=function(t,e,n){var a=this._findConvertTarget(e);return a.cartesian?a.cartesian.dataToPoint(n):a.axis?a.axis.toGlobalCoord(a.axis.dataToCoord(n)):null},r.prototype.convertFromPixel=function(t,e,n){var a=this._findConvertTarget(e);return a.cartesian?a.cartesian.pointToData(n):a.axis?a.axis.coordToData(a.axis.toLocalCoord(n)):null},r.prototype._findConvertTarget=function(t){var e=t.seriesModel,n=t.xAxisModel||e&&e.getReferringComponents("xAxis",Re).models[0],a=t.yAxisModel||e&&e.getReferringComponents("yAxis",Re).models[0],i=t.gridModel,o=this._coordsList,s,l;if(e)s=e.coordinateSystem,se(o,s)<0&&(s=null);else if(n&&a)s=this.getCartesian(n.componentIndex,a.componentIndex);else if(n)l=this.getAxis("x",n.componentIndex);else if(a)l=this.getAxis("y",a.componentIndex);else if(i){var u=i.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},r.prototype.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},r.prototype._initCartesian=function(t,e,n){var a=this,i=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(e.eachComponent("xAxis",u("x"),this),e.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,w(s.x,function(f,c){w(s.y,function(h,v){var d="x"+c+"y"+v,p=new cx(d);p.master=a,p.model=t,a._coordsMap[d]=p,a._coordsList.push(p),p.addAxis(f),p.addAxis(h)})});function u(f){return function(c,h){if(Yi(c,t)){var v=c.get("position");f==="x"?v!=="top"&&v!=="bottom"&&(v=o.bottom?"top":"bottom"):v!=="left"&&v!=="right"&&(v=o.left?"right":"left"),o[v]=!0;var d=new vx(f,MS(c),[0,0],c.get("type"),v),p=d.type==="category";d.onBand=p&&c.get("boundaryGap"),d.inverse=c.get("inverse"),c.axis=d,d.model=c,d.grid=i,d.index=h,i._axesList.push(d),s[f][h]=d,l[f]++}}}},r.prototype._updateScale=function(t,e){w(this._axesList,function(a){if(a.scale.setExtent(1/0,-1/0),a.type==="category"){var i=a.model.get("categorySortInfo");a.scale.setSortInfo(i)}}),t.eachSeries(function(a){if(sf(a)){var i=lf(a),o=i.xAxisModel,s=i.yAxisModel;if(!Yi(o,e)||!Yi(s,e))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=a.getData(),f=l.getAxis("x"),c=l.getAxis("y");n(u,f),n(u,c)}},this);function n(a,i){w(md(a,i.dim),function(o){i.scale.unionExtentFromData(a,o)})}},r.prototype.getTooltipAxes=function(t){var e=[],n=[];return w(this.getCartesians(),function(a){var i=t!=null&&t!=="auto"?a.getAxis(t):a.getBaseAxis(),o=a.getOtherAxis(i);se(e,i)<0&&e.push(i),se(n,o)<0&&n.push(o)}),{baseAxes:e,otherAxes:n}},r.create=function(t,e){var n=[];return t.eachComponent("grid",function(a,i){var o=new r(a,t,e);o.name="grid_"+i,o.resize(a,e,!0),a.coordinateSystem=o,n.push(o)}),t.eachSeries(function(a){if(sf(a)){var i=lf(a),o=i.xAxisModel,s=i.yAxisModel,l=o.getCoordSysModel(),u=l.coordinateSystem;a.coordinateSystem=u.getCartesian(o.componentIndex,s.componentIndex)}}),n},r.dimensions=Zo,r}();function Yi(r,t){return r.getCoordSysModel()===t}function uf(r,t,e,n){e.getAxesOnZeroOf=function(){return i?[i]:[]};var a=r[t],i,o=e.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)ff(a[l])&&(i=a[l]);else for(var u in a)if(a.hasOwnProperty(u)&&ff(a[u])&&!n[f(a[u])]){i=a[u];break}i&&(n[f(i)]=!0);function f(c){return c.dim+"_"+c.index}}function ff(r){return r&&r.type!=="category"&&r.type!=="time"&&LS(r)}function px(r,t){var e=r.getExtent(),n=e[0]+e[1];r.toGlobalCoord=r.dim==="x"?function(a){return a+t}:function(a){return n-a+t},r.toLocalCoord=r.dim==="x"?function(a){return a-t}:function(a){return n-a+t}}var Nt=Math.PI,Vt=function(){function r(t,e){this.group=new ge,this.opt=e,this.axisModel=t,re(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new ge({x:e.position[0],y:e.position[1],rotation:e.rotation});n.updateTransform(),this._transformGroup=n}return r.prototype.hasBuilder=function(t){return!!cf[t]},r.prototype.add=function(t){cf[t](this.opt,this.axisModel,this.group,this._transformGroup)},r.prototype.getGroup=function(){return this.group},r.innerTextLayout=function(t,e,n){var a=Jc(e-t),i,o;return Ia(a)?(o=n>0?"top":"bottom",i="center"):Ia(a-Nt)?(o=n>0?"bottom":"top",i="center"):(o="middle",a>0&&a<Nt?i=n>0?"right":"left":i=n>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:o}},r.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},r.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},r}(),cf={axisLine:function(r,t,e,n){var a=t.get(["axisLine","show"]);if(a==="auto"&&r.handleAutoShown&&(a=r.handleAutoShown("axisLine")),!!a){var i=t.axis.getExtent(),o=n.transform,s=[i[0],0],l=[i[1],0],u=s[0]>l[0];o&&(tr(s,s,o),tr(l,l,o));var f=B({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),c=new er({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:f,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});Cn(c.shape,c.style.lineWidth),c.anid="line",e.add(c);var h=t.get(["axisLine","symbol"]);if(h!=null){var v=t.get(["axisLine","symbolSize"]);G(h)&&(h=[h,h]),(G(v)||le(v))&&(v=[v,v]);var d=Hs(t.get(["axisLine","symbolOffset"])||0,v),p=v[0],g=v[1];w([{rotate:r.rotation+Math.PI/2,offset:d[0],r:0},{rotate:r.rotation-Math.PI/2,offset:d[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(m,y){if(h[y]!=="none"&&h[y]!=null){var _=Wt(h[y],-p/2,-g/2,p,g,f.stroke,!0),S=m.r+m.offset,b=u?l:s;_.attr({rotation:m.rotate,x:b[0]+S*Math.cos(r.rotation),y:b[1]-S*Math.sin(r.rotation),silent:!0,z2:11}),e.add(_)}})}}},axisTickLabel:function(r,t,e,n){var a=yx(e,n,t,r),i=Sx(e,n,t,r);if(mx(t,i,a),_x(e,n,t,r.tickDirection),t.get(["axisLabel","hideOverlap"])){var o=Id(F(i,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));Pd(o)}},axisName:function(r,t,e,n){var a=Dr(r.axisName,t.get("name"));if(a){var i=t.get("nameLocation"),o=r.nameDirection,s=t.getModel("nameTextStyle"),l=t.get("nameGap")||0,u=t.axis.getExtent(),f=u[0]>u[1]?-1:1,c=[i==="start"?u[0]-f*l:i==="end"?u[1]+f*l:(u[0]+u[1])/2,hf(i)?r.labelOffset+o*l:0],h,v=t.get("nameRotate");v!=null&&(v=v*Nt/180);var d;hf(i)?h=Vt.innerTextLayout(r.rotation,v??r.rotation,o):(h=gx(r.rotation,i,v||0,u),d=r.axisNameAvailableWidth,d!=null&&(d=Math.abs(d/Math.sin(h.rotation)),!isFinite(d)&&(d=null)));var p=s.getFont(),g=t.get("nameTruncate",!0)||{},m=g.ellipsis,y=Dr(r.nameTruncateMaxWidth,g.maxWidth,d),_=new Ce({x:c[0],y:c[1],rotation:h.rotation,silent:Vt.isLabelSilent(t),style:Ft(s,{text:a,font:p,overflow:"truncate",width:y,ellipsis:m,fill:s.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:s.get("align")||h.textAlign,verticalAlign:s.get("verticalAlign")||h.textVerticalAlign}),z2:1});if(Ka({el:_,componentModel:t,itemName:a}),_.__fullText=a,_.anid="name",t.get("triggerEvent")){var S=Vt.makeAxisEventDataBase(t);S.targetType="axisName",S.name=a,Z(_).eventData=S}n.add(_),_.updateTransform(),e.add(_),_.decomposeTransform()}}};function gx(r,t,e,n){var a=Jc(e-r),i,o,s=n[0]>n[1],l=t==="start"&&!s||t!=="start"&&s;return Ia(a-Nt/2)?(o=l?"bottom":"top",i="center"):Ia(a-Nt*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",a<Nt*1.5&&a>Nt/2?i=l?"left":"right":i=l?"right":"left"),{rotation:a,textAlign:i,textVerticalAlign:o}}function mx(r,t,e){if(!gd(r.axis)){var n=r.get(["axisLabel","showMinLabel"]),a=r.get(["axisLabel","showMaxLabel"]);t=t||[],e=e||[];var i=t[0],o=t[1],s=t[t.length-1],l=t[t.length-2],u=e[0],f=e[1],c=e[e.length-1],h=e[e.length-2];n===!1?(Ge(i),Ge(u)):vf(i,o)&&(n?(Ge(o),Ge(f)):(Ge(i),Ge(u))),a===!1?(Ge(s),Ge(c)):vf(l,s)&&(a?(Ge(l),Ge(h)):(Ge(s),Ge(c)))}}function Ge(r){r&&(r.ignore=!0)}function vf(r,t){var e=r&&r.getBoundingRect().clone(),n=t&&t.getBoundingRect().clone();if(!(!e||!n)){var a=Yc([]);return qc(a,a,-r.rotation),e.applyTransform(go([],a,r.getLocalTransform())),n.applyTransform(go([],a,t.getLocalTransform())),e.intersect(n)}}function hf(r){return r==="middle"||r==="center"}function kd(r,t,e,n,a){for(var i=[],o=[],s=[],l=0;l<r.length;l++){var u=r[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=e,t&&(tr(o,o,t),tr(s,s,t));var f=new er({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});Cn(f.shape,f.style.lineWidth),f.anid=a+"_"+r[l].tickValue,i.push(f)}return i}function yx(r,t,e,n){var a=e.axis,i=e.getModel("axisTick"),o=i.get("show");if(o==="auto"&&n.handleAutoShown&&(o=n.handleAutoShown("axisTick")),!(!o||a.scale.isBlank())){for(var s=i.getModel("lineStyle"),l=n.tickDirection*i.get("length"),u=a.getTicksCoords(),f=kd(u,t.transform,l,re(s.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}),"ticks"),c=0;c<f.length;c++)r.add(f[c]);return f}}function _x(r,t,e,n){var a=e.axis,i=e.getModel("minorTick");if(!(!i.get("show")||a.scale.isBlank())){var o=a.getMinorTicksCoords();if(o.length)for(var s=i.getModel("lineStyle"),l=n*i.get("length"),u=re(s.getLineStyle(),re(e.getModel("axisTick").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})),f=0;f<o.length;f++)for(var c=kd(o[f],t.transform,l,u,"minorticks_"+f),h=0;h<c.length;h++)r.add(c[h])}}function Sx(r,t,e,n){var a=e.axis,i=Dr(n.axisLabelShow,e.get(["axisLabel","show"]));if(!(!i||a.scale.isBlank())){var o=e.getModel("axisLabel"),s=o.get("margin"),l=a.getViewLabels(),u=(Dr(n.labelRotate,o.get("rotate"))||0)*Nt/180,f=Vt.innerTextLayout(n.rotation,u,n.labelDirection),c=e.getCategories&&e.getCategories(!0),h=[],v=Vt.isLabelSilent(e),d=e.get("triggerEvent");return w(l,function(p,g){var m=a.scale.type==="ordinal"?a.scale.getRawOrdinalNumber(p.tickValue):p.tickValue,y=p.formattedLabel,_=p.rawLabel,S=o;if(c&&c[m]){var b=c[m];Y(b)&&b.textStyle&&(S=new ce(b.textStyle,o,e.ecModel))}var x=S.getTextColor()||e.get(["axisLine","lineStyle","color"]),C=a.dataToCoord(m),T=S.getShallow("align",!0)||f.textAlign,D=ie(S.getShallow("alignMinLabel",!0),T),A=ie(S.getShallow("alignMaxLabel",!0),T),I=S.getShallow("verticalAlign",!0)||S.getShallow("baseline",!0)||f.textVerticalAlign,M=ie(S.getShallow("verticalAlignMinLabel",!0),I),L=ie(S.getShallow("verticalAlignMaxLabel",!0),I),P=new Ce({x:C,y:n.labelOffset+n.labelDirection*s,rotation:f.rotation,silent:v,z2:10+(p.level||0),style:Ft(S,{text:y,align:g===0?D:g===l.length-1?A:T,verticalAlign:g===0?M:g===l.length-1?L:I,fill:X(x)?x(a.type==="category"?_:a.type==="value"?m+"":m,g):x})});if(P.anid="label_"+m,d){var R=Vt.makeAxisEventDataBase(e);R.targetType="axisLabel",R.value=_,R.tickIndex=g,a.type==="category"&&(R.dataIndex=m),Z(P).eventData=R}t.add(P),P.updateTransform(),h.push(P),r.add(P),P.decomposeTransform()}),h}}function xx(r,t){var e={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return bx(e,r,t),e.seriesInvolved&&Cx(e,r),e}function bx(r,t,e){var n=t.getComponent("tooltip"),a=t.getComponent("axisPointer"),i=a.get("link",!0)||[],o=[];w(e.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=Rn(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var f=s.model,c=f.getModel("tooltip",n);if(w(s.getAxes(),J(p,!1,null)),s.getTooltipAxes&&n&&c.get("show")){var h=c.get("trigger")==="axis",v=c.get(["axisPointer","type"])==="cross",d=s.getTooltipAxes(c.get(["axisPointer","axis"]));(h||v)&&w(d.baseAxes,J(p,v?"cross":!0,h)),v&&w(d.otherAxes,J(p,"cross",!1))}function p(g,m,y){var _=y.model.getModel("axisPointer",a),S=_.get("show");if(!(!S||S==="auto"&&!g&&!Ko(_))){m==null&&(m=_.get("triggerTooltip")),_=g?wx(y,c,a,t,g,m):_;var b=_.get("snap"),x=_.get("triggerEmphasis"),C=Rn(y.model),T=m||b||y.type==="category",D=r.axesInfo[C]={key:C,axis:y,coordSys:s,axisPointerModel:_,triggerTooltip:m,triggerEmphasis:x,involveSeries:T,snap:b,useHandle:Ko(_),seriesModels:[],linkGroup:null};u[C]=D,r.seriesInvolved=r.seriesInvolved||T;var A=Tx(i,y);if(A!=null){var I=o[A]||(o[A]={axesInfo:{}});I.axesInfo[C]=D,I.mapper=i[A].mapper,D.linkGroup=I}}}})}function wx(r,t,e,n,a,i){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};w(s,function(h){l[h]=$(o.get(h))}),l.snap=r.type!=="category"&&!!i,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),a==="cross"){var f=o.get(["label","show"]);if(u.show=f??!0,!i){var c=l.lineStyle=o.get("crossStyle");c&&re(u,c.textStyle)}}return r.model.getModel("axisPointer",new ce(l,e,n))}function Cx(r,t){t.eachSeries(function(e){var n=e.coordinateSystem,a=e.get(["tooltip","trigger"],!0),i=e.get(["tooltip","show"],!0);!n||a==="none"||a===!1||a==="item"||i===!1||e.get(["axisPointer","show"],!0)===!1||w(r.coordSysAxesInfo[Rn(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(e),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=e.getData().count())})})}function Tx(r,t){for(var e=t.model,n=t.dim,a=0;a<r.length;a++){var i=r[a]||{};if(Xi(i[n+"AxisId"],e.id)||Xi(i[n+"AxisIndex"],e.componentIndex)||Xi(i[n+"AxisName"],e.name))return a}}function Xi(r,t){return r==="all"||N(r)&&se(r,t)>=0||r===t}function Dx(r){var t=rl(r);if(t){var e=t.axisPointerModel,n=t.axis.scale,a=e.option,i=e.get("status"),o=e.get("value");o!=null&&(o=n.parse(o));var s=Ko(e);i==null&&(a.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),a.value=o,s&&(a.status=t.axis.scale.isBlank()?"hide":"show")}}function rl(r){var t=(r.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[Rn(r)]}function Ax(r){var t=rl(r);return t&&t.axisPointerModel}function Ko(r){return!!r.get(["handle","show"])}function Rn(r){return r.type+"||"+r.id}var df={},Ed=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,a,i){this.axisPointerClass&&Dx(e),r.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,a,!0)},t.prototype.updateAxisPointer=function(e,n,a,i){this._doUpdateAxisPointerClass(e,a,!1)},t.prototype.remove=function(e,n){var a=this._axisPointer;a&&a.remove(n)},t.prototype.dispose=function(e,n){this._disposeAxisPointer(n),r.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,a){var i=t.getAxisPointerClass(this.axisPointerClass);if(i){var o=Ax(e);o?(this._axisPointer||(this._axisPointer=new i)).render(e,o,n,a):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,n){df[e]=n},t.getAxisPointerClass=function(e){return e&&df[e]},t.type="axis",t}(Ne),qo=ue();function Ix(r,t,e,n){var a=e.axis;if(!a.scale.isBlank()){var i=e.getModel("splitArea"),o=i.getModel("areaStyle"),s=o.get("color"),l=n.coordinateSystem.getRect(),u=a.getTicksCoords({tickModel:i,clamp:!0});if(u.length){var f=s.length,c=qo(r).splitAreaColors,h=U(),v=0;if(c)for(var d=0;d<u.length;d++){var p=c.get(u[d].tickValue);if(p!=null){v=(p+(f-1)*d)%f;break}}var g=a.toGlobalCoord(u[0].coord),m=o.getAreaStyle();s=N(s)?s:[s];for(var d=1;d<u.length;d++){var y=a.toGlobalCoord(u[d].coord),_=void 0,S=void 0,b=void 0,x=void 0;a.isHorizontal()?(_=g,S=l.y,b=y-_,x=l.height,g=_+b):(_=l.x,S=g,b=l.width,x=y-S,g=S+x);var C=u[d-1].tickValue;C!=null&&h.set(C,v),t.add(new he({anid:C!=null?"area_"+C:null,shape:{x:_,y:S,width:b,height:x},style:re({fill:s[v]},m),autoBatch:!0,silent:!0})),v=(v+1)%f}qo(r).splitAreaColors=h}}}function Mx(r){qo(r).splitAreaColors=null}var Lx=["axisLine","axisTickLabel","axisName"],Px=["splitArea","splitLine","minorSplitLine"],Od=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="CartesianAxisPointer",e}return t.prototype.render=function(e,n,a,i){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new ge,this.group.add(this._axisGroup),!!e.get("show")){var s=e.getCoordSysModel(),l=$o(s,e),u=new Vt(e,B({handleAutoShown:function(c){for(var h=s.coordinateSystem.getCartesians(),v=0;v<h.length;v++)if(Yo(h[v].getOtherAxis(e.axis).scale))return!0;return!1}},l));w(Lx,u.add,u),this._axisGroup.add(u.getGroup()),w(Px,function(c){e.get([c,"show"])&&Rx[c](this,this._axisGroup,e,s)},this);var f=i&&i.type==="changeAxisOrder"&&i.isInitSort;f||Dv(o,this._axisGroup,e),r.prototype.render.call(this,e,n,a,i)}},t.prototype.remove=function(){Mx(this)},t.type="cartesianAxis",t}(Ed),Rx={splitLine:function(r,t,e,n){var a=e.axis;if(!a.scale.isBlank()){var i=e.getModel("splitLine"),o=i.getModel("lineStyle"),s=o.get("color");s=N(s)?s:[s];for(var l=n.coordinateSystem.getRect(),u=a.isHorizontal(),f=0,c=a.getTicksCoords({tickModel:i}),h=[],v=[],d=o.getLineStyle(),p=0;p<c.length;p++){var g=a.toGlobalCoord(c[p].coord);u?(h[0]=g,h[1]=l.y,v[0]=g,v[1]=l.y+l.height):(h[0]=l.x,h[1]=g,v[0]=l.x+l.width,v[1]=g);var m=f++%s.length,y=c[p].tickValue,_=new er({anid:y!=null?"line_"+c[p].tickValue:null,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:v[0],y2:v[1]},style:re({stroke:s[m]},d),silent:!0});Cn(_.shape,d.lineWidth),t.add(_)}}},minorSplitLine:function(r,t,e,n){var a=e.axis,i=e.getModel("minorSplitLine"),o=i.getModel("lineStyle"),s=n.coordinateSystem.getRect(),l=a.isHorizontal(),u=a.getMinorTicksCoords();if(u.length)for(var f=[],c=[],h=o.getLineStyle(),v=0;v<u.length;v++)for(var d=0;d<u[v].length;d++){var p=a.toGlobalCoord(u[v][d].coord);l?(f[0]=p,f[1]=s.y,c[0]=p,c[1]=s.y+s.height):(f[0]=s.x,f[1]=p,c[0]=s.x+s.width,c[1]=p);var g=new er({anid:"minor_line_"+u[v][d].tickValue,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:c[0],y2:c[1]},style:h,silent:!0});Cn(g.shape,h.lineWidth),t.add(g)}},splitArea:function(r,t,e,n){Ix(r,t,e,n)}},Nd=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="xAxis",t}(Od),kx=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=Nd.type,e}return t.type="yAxis",t}(Od),Ex=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="grid",e}return t.prototype.render=function(e,n){this.group.removeAll(),e.get("show")&&this.group.add(new he({shape:e.coordinateSystem.getRect(),style:re({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t}(Ne),pf={offset:0};function Bd(r){r.registerComponentView(Ex),r.registerComponentModel(ax),r.registerCoordinateSystem("cartesian2d",dx),nf(r,"x",Xo,pf),nf(r,"y",Xo,pf),r.registerComponentView(Nd),r.registerComponentView(kx),r.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}var jt=ue(),gf=$,Zi=oe,Ox=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(t,e,n,a){var i=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,!(!a&&this._lastValue===i&&this._lastStatus===o)){this._lastValue=i,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,i,t,e,n);var f=u.graphicKey;f!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=f;var c=this._moveAnimation=this.determineAnimation(t,e);if(!s)s=this._group=new ge,this.createPointerEl(s,u,t,e),this.createLabelEl(s,u,t,e),n.getZr().add(s);else{var h=J(mf,e,c);this.updatePointerEl(s,u,h),this.updateLabelEl(s,u,h,e)}_f(s,e,!0),this._renderHandle(i)}},r.prototype.remove=function(t){this.clear(t)},r.prototype.dispose=function(t){this.clear(t)},r.prototype.determineAnimation=function(t,e){var n=e.get("animation"),a=t.axis,i=a.type==="category",o=e.get("snap");if(!o&&!i)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(i&&a.getBandWidth()>s)return!0;if(o){var l=rl(t).seriesDataCount,u=a.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},r.prototype.makeElOption=function(t,e,n,a,i){},r.prototype.createPointerEl=function(t,e,n,a){var i=e.pointer;if(i){var o=jt(t).pointerEl=new As[i.type](gf(e.pointer));t.add(o)}},r.prototype.createLabelEl=function(t,e,n,a){if(e.label){var i=jt(t).labelEl=new Ce(gf(e.label));t.add(i),yf(i,a)}},r.prototype.updatePointerEl=function(t,e,n){var a=jt(t).pointerEl;a&&e.pointer&&(a.setStyle(e.pointer.style),n(a,{shape:e.pointer.shape}))},r.prototype.updateLabelEl=function(t,e,n,a){var i=jt(t).labelEl;i&&(i.setStyle(e.label.style),n(i,{x:e.label.x,y:e.label.y}),yf(i,a))},r.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,n=this._api.getZr(),a=this._handle,i=e.getModel("handle"),o=e.get("status");if(!i.get("show")||!o||o==="hide"){a&&n.remove(a),this._handle=null;return}var s;this._handle||(s=!0,a=this._handle=$a(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){ug(u.event)},onmousedown:Zi(this._onHandleDragMove,this,0,0),drift:Zi(this._onHandleDragMove,this),ondragend:Zi(this._onHandleDragEnd,this)}),n.add(a)),_f(a,e,!1),a.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");N(l)||(l=[l,l]),a.scaleX=l[0]/2,a.scaleY=l[1]/2,Ch(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},r.prototype._moveHandleToValue=function(t,e){mf(this._axisPointerModel,!e&&this._moveAnimation,this._handle,$i(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var a=this.updateHandleTransform($i(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=a,n.stopAnimation(),n.attr($i(a)),jt(n).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var e=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,a=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),a&&e.remove(a),this._group=null,this._handle=null,this._payloadInfo=null),No(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}},r}();function mf(r,t,e,n){Vd(jt(e).lastProp,n)||(jt(e).lastProp=n,t?me(e,n,r):(e.stopAnimation(),e.attr(n)))}function Vd(r,t){if(Y(r)&&Y(t)){var e=!0;return w(t,function(n,a){e=e&&Vd(r[a],n)}),!!e}else return r===t}function yf(r,t){r[t.get(["label","show"])?"show":"hide"]()}function $i(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function _f(r,t,e){var n=t.get("z"),a=t.get("zlevel");r&&r.traverse(function(i){i.type!=="group"&&(n!=null&&(i.z=n),a!=null&&(i.zlevel=a),i.silent=e)})}function Nx(r){var t=r.get("type"),e=r.getModel(t+"Style"),n;return t==="line"?(n=e.getLineStyle(),n.fill=null):t==="shadow"&&(n=e.getAreaStyle(),n.stroke=null),n}function Bx(r,t,e,n,a){var i=e.get("value"),o=zd(i,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),s=e.getModel("label"),l=ri(s.get("padding")||0),u=s.getFont(),f=ds(o,u),c=a.position,h=f.width+l[1]+l[3],v=f.height+l[0]+l[2],d=a.align;d==="right"&&(c[0]-=h),d==="center"&&(c[0]-=h/2);var p=a.verticalAlign;p==="bottom"&&(c[1]-=v),p==="middle"&&(c[1]-=v/2),Vx(c,h,v,n);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=t.get(["axisLine","lineStyle","color"])),r.label={x:c[0],y:c[1],style:Ft(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function Vx(r,t,e,n){var a=n.getWidth(),i=n.getHeight();r[0]=Math.min(r[0]+t,a)-t,r[1]=Math.min(r[1]+e,i)-e,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function zd(r,t,e,n,a){r=t.scale.parse(r);var i=t.scale.getLabel({value:r},{precision:a.precision}),o=a.formatter;if(o){var s={value:Js(t,{value:r}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};w(n,function(l){var u=e.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,c=u&&u.getDataParams(f);c&&s.seriesData.push(c)}),G(o)?i=o.replace("{value}",i):X(o)&&(i=o(s))}return i}function Fd(r,t,e){var n=cg();return qc(n,n,e.rotation),fg(n,n,e.position),Ds([r.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],n)}function zx(r,t,e,n,a,i){var o=Vt.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=a.get(["label","margin"]),Bx(t,n,a,i,{position:Fd(n.axis,r,e),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Fx(r,t,e){return e=e||0,{x1:r[e],y1:r[1-e],x2:t[e],y2:t[1-e]}}function Gx(r,t,e){return e=e||0,{x:r[e],y:r[1-e],width:t[e],height:t[1-e]}}var Wx=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,n,a,i,o){var s=a.axis,l=s.grid,u=i.get("type"),f=Sf(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var h=Nx(i),v=Hx[u](s,c,f);v.style=h,e.graphicKey=v.type,e.pointer=v}var d=$o(l.model,a);zx(n,e,d,a,i,o)},t.prototype.getHandleTransform=function(e,n,a){var i=$o(n.axis.grid.model,n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=Fd(n.axis,e,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,n,a,i){var o=a.axis,s=o.grid,l=o.getGlobalExtent(!0),u=Sf(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,c=[e.x,e.y];c[f]+=n[f],c[f]=Math.min(l[1],c[f]),c[f]=Math.max(l[0],c[f]);var h=(u[1]+u[0])/2,v=[h,h];v[f]=c[f];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:c[0],y:c[1],rotation:e.rotation,cursorPoint:v,tooltipOption:d[f]}},t}(Ox);function Sf(r,t){var e={};return e[t.dim+"AxisIndex"]=t.index,r.getCartesian(e)}var Hx={line:function(r,t,e){var n=Fx([t,e[0]],[t,e[1]],xf(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,t,e){var n=Math.max(1,r.getBandWidth()),a=e[1]-e[0];return{type:"Rect",shape:Gx([t-n/2,e[0]],[n,a],xf(r))}}};function xf(r){return r.dim==="x"?0:1}var Ux=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},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}},t}(ee),gt=ue(),Yx=w;function Gd(r,t,e){if(!fe.node){var n=t.getZr();gt(n).records||(gt(n).records={}),Xx(n,t);var a=gt(n).records[r]||(gt(n).records[r]={});a.handler=e}}function Xx(r,t){if(gt(r).initialized)return;gt(r).initialized=!0,e("click",J(bf,"click")),e("mousemove",J(bf,"mousemove")),e("globalout",$x);function e(n,a){r.on(n,function(i){var o=Kx(t);Yx(gt(r).records,function(s){s&&a(s,i,o.dispatchAction)}),Zx(o.pendings,t)})}}function Zx(r,t){var e=r.showTip.length,n=r.hideTip.length,a;e?a=r.showTip[e-1]:n&&(a=r.hideTip[n-1]),a&&(a.dispatchAction=null,t.dispatchAction(a))}function $x(r,t,e){r.handler("leave",null,e)}function bf(r,t,e,n){t.handler(r,e,n)}function Kx(r){var t={showTip:[],hideTip:[]},e=function(n){var a=t[n.type];a?a.push(n):(n.dispatchAction=e,r.dispatchAction(n))};return{dispatchAction:e,pendings:t}}function jo(r,t){if(!fe.node){var e=t.getZr(),n=(gt(e).records||{})[r];n&&(gt(e).records[r]=null)}}var qx=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,a){var i=n.getComponent("tooltip"),o=e.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";Gd("axisPointer",a,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(e,n){jo("axisPointer",n)},t.prototype.dispose=function(e,n){jo("axisPointer",n)},t.type="axisPointer",t}(Ne);function Wd(r,t){var e=[],n=r.seriesIndex,a;if(n==null||!(a=t.getSeriesByIndex(n)))return{point:[]};var i=a.getData(),o=rr(i,r);if(o==null||o<0||N(o))return{point:[]};var s=i.getItemGraphicEl(o),l=a.coordinateSystem;if(a.getTooltipPosition)e=a.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),f=l.getOtherAxis(u),c=f.dim,h=u.dim,v=c==="x"||c==="radius"?1:0,d=i.mapDimension(h),p=[];p[v]=i.get(d,o),p[1-v]=i.get(i.getCalculationInfo("stackResultDimension"),o),e=l.dataToPoint(p)||[]}else e=l.dataToPoint(i.getValues(F(l.dimensions,function(m){return i.mapDimension(m)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),e=[g.x+g.width/2,g.y+g.height/2]}return{point:e,el:s}}var wf=ue();function jx(r,t,e){var n=r.currTrigger,a=[r.x,r.y],i=r,o=r.dispatchAction||oe(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){Ca(a)&&(a=Wd({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},t).point);var l=Ca(a),u=i.axesInfo,f=s.axesInfo,c=n==="leave"||Ca(a),h={},v={},d={list:[],map:{}},p={showPointer:J(Jx,v),showTooltip:J(eb,d)};w(s.coordSysMap,function(m,y){var _=l||m.containPoint(a);w(s.coordSysAxesInfo[y],function(S,b){var x=S.axis,C=ab(u,S);if(!c&&_&&(!u||C)){var T=C&&C.value;T==null&&!l&&(T=x.pointToData(a)),T!=null&&Cf(S,T,p,!1,h)}})});var g={};return w(f,function(m,y){var _=m.linkGroup;_&&!v[y]&&w(_.axesInfo,function(S,b){var x=v[b];if(S!==m&&x){var C=x.value;_.mapper&&(C=m.axis.scale.parse(_.mapper(C,Tf(S),Tf(m)))),g[m.key]=C}})}),w(g,function(m,y){Cf(f[y],m,p,!0,h)}),tb(v,f,h),rb(d,a,r,o),nb(f,o,e),h}}function Cf(r,t,e,n,a){var i=r.axis;if(!(i.scale.isBlank()||!i.containData(t))){if(!r.involveSeries){e.showPointer(r,t);return}var o=Qx(t,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&a.seriesIndex==null&&B(a,s[0]),!n&&r.snap&&i.containData(l)&&l!=null&&(t=l),e.showPointer(r,t,s),e.showTooltip(r,o,l)}}function Qx(r,t){var e=t.axis,n=e.dim,a=r,i=[],o=Number.MAX_VALUE,s=-1;return w(t.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(n),c,h;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(f,r,e);h=v.dataIndices,c=v.nestestValue}else{if(h=l.getData().indicesOfNearest(f[0],r,e.type==="category"?.5:null),!h.length)return;c=l.getData().get(f[0],h[0])}if(!(c==null||!isFinite(c))){var d=r-c,p=Math.abs(d);p<=o&&((p<o||d>=0&&s<0)&&(o=p,s=d,a=c,i.length=0),w(h,function(g){i.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:i,snapToValue:a}}function Jx(r,t,e,n){r[t.key]={value:e,payloadBatch:n}}function eb(r,t,e,n){var a=e.payloadBatch,i=t.axis,o=i.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!a.length)){var l=t.coordSys.model,u=Rn(l),f=r.map[u];f||(f=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(f)),f.dataByAxis.push({axisDim:i.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:a.slice()})}}function tb(r,t,e){var n=e.axesInfo=[];w(t,function(a,i){var o=a.axisPointerModel.option,s=r[i];s?(!a.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!a.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:a.axis.dim,axisIndex:a.axis.model.componentIndex,value:o.value})})}function rb(r,t,e,n){if(Ca(t)||!r.list.length){n({type:"hideTip"});return}var a=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:e.tooltipOption,position:e.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:r.list})}function nb(r,t,e){var n=e.getZr(),a="axisPointerLastHighlights",i=wf(n)[a]||{},o=wf(n)[a]={};w(r,function(u,f){var c=u.axisPointerModel.option;c.status==="show"&&u.triggerEmphasis&&w(c.seriesDataIndices,function(h){var v=h.seriesIndex+" | "+h.dataIndex;o[v]=h})});var s=[],l=[];w(i,function(u,f){!o[f]&&l.push(u)}),w(o,function(u,f){!i[f]&&s.push(u)}),l.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function ab(r,t){for(var e=0;e<(r||[]).length;e++){var n=r[e];if(t.axis.dim===n.axisDim&&t.axis.model.componentIndex===n.axisIndex)return n}}function Tf(r){var t=r.axis.model,e={},n=e.axisDim=r.axis.dim;return e.axisIndex=e[n+"AxisIndex"]=t.componentIndex,e.axisName=e[n+"AxisName"]=t.name,e.axisId=e[n+"AxisId"]=t.id,e}function Ca(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Hd(r){Ed.registerAxisPointerClass("CartesianAxisPointer",Wx),r.registerComponentModel(Ux),r.registerComponentView(qx),r.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!N(e)&&(t.axisPointer.link=[e])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=xx(t,e)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},jx)}function Y1(r){St(Bd),St(Hd)}var Df="\0_ec_interaction_mutex";function ib(r,t,e){var n=Ud(r);n[t]=e}function ob(r,t,e){var n=Ud(r),a=n[t];a===e&&(n[t]=null)}function Ud(r){return r[Df]||(r[Df]={})}ft({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},yt);var sb={axisPointer:1,tooltip:1,brush:1};function lb(r,t,e){var n=t.getComponentByElement(r.topTarget),a=n&&n.coordinateSystem;return n&&n!==e&&!sb.hasOwnProperty(n.mainType)&&a&&a.model!==e}function Yd(r,t,e,n,a,i){r=r||0;var o=e[1]-e[0];if(a!=null&&(a=pr(a,[0,o])),i!=null&&(i=Math.max(i,a??0)),n==="all"){var s=Math.abs(t[1]-t[0]);s=pr(s,[0,o]),a=i=pr(s,[a,i]),n=0}t[0]=pr(t[0],e),t[1]=pr(t[1],e);var l=Ki(t,n);t[n]+=r;var u=a||0,f=e.slice();l.sign<0?f[0]+=u:f[1]-=u,t[n]=pr(t[n],f);var c;return c=Ki(t,n),a!=null&&(c.sign!==l.sign||c.span<a)&&(t[1-n]=t[n]+l.sign*a),c=Ki(t,n),i!=null&&c.span>i&&(t[1-n]=t[n]+c.sign*i),t}function Ki(r,t){var e=r[t]-r[1-t];return{span:Math.abs(e),sign:e>0?-1:e<0?1:t?-1:1}}function pr(r,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,r))}var ar=!0,kn=Math.min,kr=Math.max,ub=Math.pow,fb=1e4,cb=6,vb=6,Af="globalPan",hb={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},db={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},If={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},pb=0,gb=function(r){V(t,r);function t(e){var n=r.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=e,n.group=new ge,n._uid="brushController_"+pb++,w(wb,function(a,i){this._handlers[i]=oe(a,this)},n),n}return t.prototype.enableBrush=function(e){return this._brushType&&this._doDisableBrush(),e.brushType&&this._doEnableBrush(e),this},t.prototype._doEnableBrush=function(e){var n=this._zr;this._enableGlobalPan||ib(n,Af,this._uid),w(this._handlers,function(a,i){n.on(i,a)}),this._brushType=e.brushType,this._brushOption=K($(If),e,!0)},t.prototype._doDisableBrush=function(){var e=this._zr;ob(e,Af,this._uid),w(this._handlers,function(n,a){e.off(a,n)}),this._brushType=this._brushOption=null},t.prototype.setPanels=function(e){if(e&&e.length){var n=this._panels={};w(e,function(a){n[a.panelId]=$(a)})}else this._panels=null;return this},t.prototype.mount=function(e){e=e||{},this._enableGlobalPan=e.enableGlobalPan;var n=this.group;return this._zr.add(n),n.attr({x:e.x||0,y:e.y||0,rotation:e.rotation||0,scaleX:e.scaleX||1,scaleY:e.scaleY||1}),this._transform=n.getLocalTransform(),this},t.prototype.updateCovers=function(e){e=F(e,function(h){return K($(If),h,!0)});var n="\0-brush-index-",a=this._covers,i=this._covers=[],o=this,s=this._creatingCover;return new Ln(a,e,u,l).add(f).update(f).remove(c).execute(),this;function l(h,v){return(h.id!=null?h.id:n+v)+"-"+h.brushType}function u(h,v){return l(h.__brushOption,v)}function f(h,v){var d=e[h];if(v!=null&&a[v]===s)i[h]=a[v];else{var p=i[h]=v!=null?(a[v].__brushOption=d,a[v]):Zd(o,Xd(o,d));nl(o,p)}}function c(h){a[h]!==s&&o.group.remove(a[h])}},t.prototype.unmount=function(){return this.enableBrush(!1),Qo(this),this._zr.remove(this.group),this},t.prototype.dispose=function(){this.unmount(),this.off()},t}(Vn);function Xd(r,t){var e=ci[t.brushType].createCover(r,t);return e.__brushOption=t,Kd(e,t),r.group.add(e),e}function Zd(r,t){var e=al(t);return e.endCreating&&(e.endCreating(r,t),Kd(t,t.__brushOption)),t}function $d(r,t){var e=t.__brushOption;al(t).updateCoverShape(r,t,e.range,e)}function Kd(r,t){var e=t.z;e==null&&(e=fb),r.traverse(function(n){n.z=e,n.z2=e})}function nl(r,t){al(t).updateCommon(r,t),$d(r,t)}function al(r){return ci[r.__brushOption.brushType]}function il(r,t,e){var n=r._panels;if(!n)return ar;var a,i=r._transform;return w(n,function(o){o.isTargetByCursor(t,e,i)&&(a=o)}),a}function qd(r,t){var e=r._panels;if(!e)return ar;var n=t.__brushOption.panelId;return n!=null?e[n]:ar}function Qo(r){var t=r._covers,e=t.length;return w(t,function(n){r.group.remove(n)},r),t.length=0,!!e}function ir(r,t){var e=F(r._covers,function(n){var a=n.__brushOption,i=$(a.range);return{brushType:a.brushType,panelId:a.panelId,range:i}});r.trigger("brush",{areas:e,isEnd:!!t.isEnd,removeOnClick:!!t.removeOnClick})}function mb(r){var t=r._track;if(!t.length)return!1;var e=t[t.length-1],n=t[0],a=e[0]-n[0],i=e[1]-n[1],o=ub(a*a+i*i,.5);return o>cb}function jd(r){var t=r.length-1;return t<0&&(t=0),[r[0],r[t]]}function Qd(r,t,e,n){var a=new ge;return a.add(new he({name:"main",style:ol(e),silent:!0,draggable:!0,cursor:"move",drift:J(Mf,r,t,a,["n","s","w","e"]),ondragend:J(ir,t,{isEnd:!0})})),w(n,function(i){a.add(new he({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:J(Mf,r,t,a,i),ondragend:J(ir,t,{isEnd:!0})}))}),a}function Jd(r,t,e,n){var a=n.brushStyle.lineWidth||0,i=kr(a,vb),o=e[0][0],s=e[1][0],l=o-a/2,u=s-a/2,f=e[0][1],c=e[1][1],h=f-i+a/2,v=c-i+a/2,d=f-o,p=c-s,g=d+a,m=p+a;dt(r,t,"main",o,s,d,p),n.transformable&&(dt(r,t,"w",l,u,i,m),dt(r,t,"e",h,u,i,m),dt(r,t,"n",l,u,g,i),dt(r,t,"s",l,v,g,i),dt(r,t,"nw",l,u,i,i),dt(r,t,"ne",h,u,i,i),dt(r,t,"sw",l,v,i,i),dt(r,t,"se",h,v,i,i))}function Jo(r,t){var e=t.__brushOption,n=e.transformable,a=t.childAt(0);a.useStyle(ol(e)),a.attr({silent:!n,cursor:n?"move":"default"}),w([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=t.childOfName(i.join("")),s=i.length===1?es(r,i[0]):_b(r,i);o&&o.attr({silent:!n,invisible:!n,cursor:n?db[s]+"-resize":null})})}function dt(r,t,e,n,a,i,o){var s=t.childOfName(e);s&&s.setShape(xb(sl(r,t,[[n,a],[n+i,a+o]])))}function ol(r){return re({strokeNoScale:!0},r.brushStyle)}function ep(r,t,e,n){var a=[kn(r,e),kn(t,n)],i=[kr(r,e),kr(t,n)];return[[a[0],i[0]],[a[1],i[1]]]}function yb(r){return Ts(r.group)}function es(r,t){var e={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},a=Tv(e[t],yb(r));return n[a]}function _b(r,t){var e=[es(r,t[0]),es(r,t[1])];return(e[0]==="e"||e[0]==="w")&&e.reverse(),e.join("")}function Mf(r,t,e,n,a,i){var o=e.__brushOption,s=r.toRectRange(o.range),l=tp(t,a,i);w(n,function(u){var f=hb[u];s[f[0]][f[1]]+=l[f[0]]}),o.range=r.fromRectRange(ep(s[0][0],s[1][0],s[0][1],s[1][1])),nl(t,e),ir(t,{isEnd:!1})}function Sb(r,t,e,n){var a=t.__brushOption.range,i=tp(r,e,n);w(a,function(o){o[0]+=i[0],o[1]+=i[1]}),nl(r,t),ir(r,{isEnd:!1})}function tp(r,t,e){var n=r.group,a=n.transformCoordToLocal(t,e),i=n.transformCoordToLocal(0,0);return[a[0]-i[0],a[1]-i[1]]}function sl(r,t,e){var n=qd(r,t);return n&&n!==ar?n.clipPath(e,r._transform):$(e)}function xb(r){var t=kn(r[0][0],r[1][0]),e=kn(r[0][1],r[1][1]),n=kr(r[0][0],r[1][0]),a=kr(r[0][1],r[1][1]);return{x:t,y:e,width:n-t,height:a-e}}function bb(r,t,e){if(!(!r._brushType||Cb(r,t.offsetX,t.offsetY))){var n=r._zr,a=r._covers,i=il(r,t,e);if(!r._dragging)for(var o=0;o<a.length;o++){var s=a[o].__brushOption;if(i&&(i===ar||s.panelId===i.panelId)&&ci[s.brushType].contain(a[o],e[0],e[1]))return}i&&n.setCursorStyle("crosshair")}}function ts(r){var t=r.event;t.preventDefault&&t.preventDefault()}function rs(r,t,e){return r.childOfName("main").contain(t,e)}function rp(r,t,e,n){var a=r._creatingCover,i=r._creatingPanel,o=r._brushOption,s;if(r._track.push(e.slice()),mb(r)||a){if(i&&!a){o.brushMode==="single"&&Qo(r);var l=$(o);l.brushType=Lf(l.brushType,i),l.panelId=i===ar?null:i.panelId,a=r._creatingCover=Xd(r,l),r._covers.push(a)}if(a){var u=ci[Lf(r._brushType,i)],f=a.__brushOption;f.range=u.getCreatingRange(sl(r,a,r._track)),n&&(Zd(r,a),u.updateCommon(r,a)),$d(r,a),s={isEnd:n}}}else n&&o.brushMode==="single"&&o.removeOnClick&&il(r,t,e)&&Qo(r)&&(s={isEnd:n,removeOnClick:!0});return s}function Lf(r,t){return r==="auto"?t.defaultBrushType:r}var wb={mousedown:function(r){if(this._dragging)Pf(this,r);else if(!r.target||!r.target.draggable){ts(r);var t=this.group.transformCoordToLocal(r.offsetX,r.offsetY);this._creatingCover=null;var e=this._creatingPanel=il(this,r,t);e&&(this._dragging=!0,this._track=[t.slice()])}},mousemove:function(r){var t=r.offsetX,e=r.offsetY,n=this.group.transformCoordToLocal(t,e);if(bb(this,r,n),this._dragging){ts(r);var a=rp(this,r,n,!1);a&&ir(this,a)}},mouseup:function(r){Pf(this,r)}};function Pf(r,t){if(r._dragging){ts(t);var e=t.offsetX,n=t.offsetY,a=r.group.transformCoordToLocal(e,n),i=rp(r,t,a,!0);r._dragging=!1,r._track=[],r._creatingCover=null,i&&ir(r,i)}}function Cb(r,t,e){var n=r._zr;return t<0||t>n.getWidth()||e<0||e>n.getHeight()}var ci={lineX:Rf(0),lineY:Rf(1),rect:{createCover:function(r,t){function e(n){return n}return Qd({toRectRange:e,fromRectRange:e},r,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var t=jd(r);return ep(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(r,t,e,n){Jd(r,t,e,n)},updateCommon:Jo,contain:rs},polygon:{createCover:function(r,t){var e=new ge;return e.add(new Nn({name:"main",style:ol(t),silent:!0})),e},getCreatingRange:function(r){return r},endCreating:function(r,t){t.remove(t.childAt(0)),t.add(new cs({name:"main",draggable:!0,drift:J(Sb,r,t),ondragend:J(ir,r,{isEnd:!0})}))},updateCoverShape:function(r,t,e,n){t.childAt(0).setShape({points:sl(r,t,e)})},updateCommon:Jo,contain:rs}};function Rf(r){return{createCover:function(t,e){return Qd({toRectRange:function(n){var a=[n,[0,100]];return r&&a.reverse(),a},fromRectRange:function(n){return n[r]}},t,e,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(t){var e=jd(t),n=kn(e[0][r],e[1][r]),a=kr(e[0][r],e[1][r]);return[n,a]},updateCoverShape:function(t,e,n,a){var i,o=qd(t,e);if(o!==ar&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(r);else{var s=t._zr;i=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[n,i];r&&l.reverse(),Jd(t,e,l,a)},updateCommon:Jo,contain:rs}}function Tb(r){return r=ll(r),function(t){return Av(t,r)}}function Db(r,t){return r=ll(r),function(e){var n=t??e,a=n?r.width:r.height,i=n?r.x:r.y;return[i,i+(a||0)]}}function Ab(r,t,e){var n=ll(r);return function(a,i){return n.contain(i[0],i[1])&&!lb(a,t,e)}}function ll(r){return Ye.create(r)}var kf=["x","y","radius","angle","single"],Ib=["cartesian2d","polar","singleAxis"];function Mb(r){var t=r.get("coordinateSystem");return se(Ib,t)>=0}function _r(r){return r+"Axis"}function Lb(r,t){var e=U(),n=[],a=U();r.eachComponent({mainType:"dataZoom",query:t},function(f){a.get(f.uid)||s(f)});var i;do i=!1,r.eachComponent("dataZoom",o);while(i);function o(f){!a.get(f.uid)&&l(f)&&(s(f),i=!0)}function s(f){a.set(f.uid,!0),n.push(f),u(f)}function l(f){var c=!1;return f.eachTargetAxis(function(h,v){var d=e.get(h);d&&d[v]&&(c=!0)}),c}function u(f){f.eachTargetAxis(function(c,h){(e.get(c)||e.set(c,[]))[h]=!0})}return n}var qi=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},r}(),Pb=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return t.prototype.init=function(e,n,a){var i=Ef(e);this.settledOption=i,this.mergeDefaultAndTheme(e,a),this._doInit(i)},t.prototype.mergeOption=function(e){var n=Ef(e);K(this.option,e,!0),K(this.settledOption,n,!0),this._doInit(n)},t.prototype._doInit=function(e){var n=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var a=this.settledOption;w([["start","startValue"],["end","endValue"]],function(i,o){this._rangePropMode[o]==="value"&&(n[i[0]]=a[i[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),n=this._targetAxisInfoMap=U(),a=this._fillSpecifiedTargetAxis(n);a?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var n=!1;return w(kf,function(a){var i=this.getReferringComponents(_r(a),Xg);if(i.specified){n=!0;var o=new qi;w(i.models,function(s){o.add(s.componentIndex)}),e.set(a,o)}},this),n},t.prototype._fillAutoTargetAxisByOrient=function(e,n){var a=this.ecModel,i=!0;if(i){var o=n==="vertical"?"y":"x",s=a.findComponents({mainType:o+"Axis"});l(s,o)}if(i){var s=a.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===n}});l(s,"single")}function l(u,f){var c=u[0];if(c){var h=new qi;if(h.add(c.componentIndex),e.set(f,h),i=!1,f==="x"||f==="y"){var v=c.getReferringComponents("grid",Re).models[0];v&&w(u,function(d){c.componentIndex!==d.componentIndex&&v===d.getReferringComponents("grid",Re).models[0]&&h.add(d.componentIndex)})}}}i&&w(kf,function(u){if(i){var f=a.findComponents({mainType:_r(u),filter:function(h){return h.get("type",!0)==="category"}});if(f[0]){var c=new qi;c.add(f[0].componentIndex),e.set(u,c),i=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(n){!e&&(e=n)},this),e==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var n=this._rangePropMode,a=this.get("rangeMode");w([["start","startValue"],["end","endValue"]],function(i,o){var s=e[i[0]]!=null,l=e[i[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":a?n[o]=a[o]:s&&(n[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(n,a){e==null&&(e=this.ecModel.getComponent(_r(n),a))},this),e},t.prototype.eachTargetAxis=function(e,n){this._targetAxisInfoMap.each(function(a,i){w(a.indexList,function(o){e.call(n,i,o)})})},t.prototype.getAxisProxy=function(e,n){var a=this.getAxisModel(e,n);if(a)return a.__dzAxisProxy},t.prototype.getAxisModel=function(e,n){var a=this._targetAxisInfoMap.get(e);if(a&&a.indexMap[n])return this.ecModel.getComponent(_r(e),n)},t.prototype.setRawRange=function(e){var n=this.option,a=this.settledOption;w([["start","startValue"],["end","endValue"]],function(i){(e[i[0]]!=null||e[i[1]]!=null)&&(n[i[0]]=a[i[0]]=e[i[0]],n[i[1]]=a[i[1]]=e[i[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var n=this.option;w(["start","startValue","end","endValue"],function(a){n[a]=e[a]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,n){if(e==null&&n==null){var a=this.findRepresentativeAxisProxy();if(a)return a.getDataValueWindow()}else return this.getAxisProxy(e,n).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var n,a=this._targetAxisInfoMap.keys(),i=0;i<a.length;i++)for(var o=a[i],s=this._targetAxisInfoMap.get(o),l=0;l<s.indexList.length;l++){var u=this.getAxisProxy(o,s.indexList[l]);if(u.hostedBy(this))return u;n||(n=u)}return n},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t}(ee);function Ef(r){var t={};return w(["start","end","startValue","endValue","throttle"],function(e){r.hasOwnProperty(e)&&(t[e]=r[e])}),t}var Rb=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.select",t}(Pb),kb=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,a,i){this.dataZoomModel=e,this.ecModel=n,this.api=a},t.type="dataZoom",t}(Ne),Eb=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.select",t}(kb),yr=w,Of=Ig,Ob=function(){function r(t,e,n,a){this._dimName=t,this._axisIndex=e,this.ecModel=a,this._dataZoomModel=n}return r.prototype.hostedBy=function(t){return this._dataZoomModel===t},r.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},r.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},r.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries(function(e){if(Mb(e)){var n=_r(this._dimName),a=e.getReferringComponents(n,Re).models[0];a&&this._axisIndex===a.componentIndex&&t.push(e)}},this),t},r.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},r.prototype.getMinMaxSpan=function(){return $(this._minMaxSpan)},r.prototype.calculateDataWindow=function(t){var e=this._dataExtent,n=this.getAxisModel(),a=n.axis.scale,i=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;yr(["start","end"],function(h,v){var d=t[h],p=t[h+"Value"];i[v]==="percent"?(d==null&&(d=o[v]),p=a.parse(Ot(d,o,e))):(u=!0,p=p==null?e[v]:a.parse(p),d=Ot(p,e,o)),l[v]=p==null||isNaN(p)?e[v]:p,s[v]=d==null||isNaN(d)?o[v]:d}),Of(l),Of(s);var f=this._minMaxSpan;u?c(l,s,e,o,!1):c(s,l,o,e,!0);function c(h,v,d,p,g){var m=g?"Span":"ValueSpan";Yd(0,h,d,"all",f["min"+m],f["max"+m]);for(var y=0;y<2;y++)v[y]=Ot(h[y],d,p,!0),g&&(v[y]=a.parse(v[y]))}return{valueWindow:l,percentWindow:s}},r.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=Nb(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},r.prototype.filterData=function(t,e){if(t!==this._dataZoomModel)return;var n=this._dimName,a=this.getTargetSeriesModels(),i=t.get("filterMode"),o=this._valueWindow;if(i==="none")return;yr(a,function(l){var u=l.getData(),f=u.mapDimensionsAll(n);if(f.length){if(i==="weakFilter"){var c=u.getStore(),h=F(f,function(v){return u.getDimensionIndex(v)},u);u.filterSelf(function(v){for(var d,p,g,m=0;m<f.length;m++){var y=c.get(h[m],v),_=!isNaN(y),S=y<o[0],b=y>o[1];if(_&&!S&&!b)return!0;_&&(g=!0),S&&(d=!0),b&&(p=!0)}return g&&d&&p})}else yr(f,function(v){if(i==="empty")l.setData(u=u.map(v,function(p){return s(p)?p:NaN}));else{var d={};d[v]=o,u.selectRange(d)}});yr(f,function(v){u.setApproximateExtent(o,v)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;yr(["min","max"],function(a){var i=e.get(a+"Span"),o=e.get(a+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=Ot(n[0]+o,n,[0,100],!0):i!=null&&(o=Ot(i,[0,100],n,!0)-n[0]),t[a+"Span"]=i,t[a+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var a=Qc(n,[0,500]);a=Math.min(a,20);var i=t.axis.scale.rawExtentInfo;e[0]!==0&&i.setDeterminedMinMax("min",+n[0].toFixed(a)),e[1]!==100&&i.setDeterminedMinMax("max",+n[1].toFixed(a)),i.freeze()}},r}();function Nb(r,t,e){var n=[1/0,-1/0];yr(e,function(o){kS(n,o.getData(),t)});var a=r.getAxisModel(),i=dd(a.axis.scale,a,n).calculate();return[i.min,i.max]}var Bb={getTargetSeries:function(r){function t(a){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(_r(o),s);a(o,s,l,i)})})}t(function(a,i,o,s){o.__dzAxisProxy=null});var e=[];t(function(a,i,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new Ob(a,i,s,r),e.push(o.__dzAxisProxy))});var n=U();return w(e,function(a){w(a.getTargetSeriesModels(),function(i){n.set(i.uid,i)})}),n},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(n,a){e.getAxisProxy(n,a).reset(e)}),e.eachTargetAxis(function(n,a){e.getAxisProxy(n,a).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var n=e.findRepresentativeAxisProxy();if(n){var a=n.getDataPercentWindow(),i=n.getDataValueWindow();e.setCalculatedRange({start:a[0],end:a[1],startValue:i[0],endValue:i[1]})}})}};function Vb(r){r.registerAction("dataZoom",function(t,e){var n=Lb(e,t);w(n,function(a){a.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var Nf=!1;function zb(r){Nf||(Nf=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,Bb),Vb(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Fb(r){r.registerComponentModel(Rb),r.registerComponentView(Eb),zb(r)}var Je=function(){function r(){}return r}(),np={};function rn(r,t){np[r]=t}function ap(r){return np[r]}var Gb=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;w(this.option.feature,function(n,a){var i=ap(a);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),K(n,i.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,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,position:"bottom"}},t}(ee);function Wb(r,t,e){var n=t.getBoxLayoutParams(),a=t.get("padding"),i={width:e.getWidth(),height:e.getHeight()},o=Gt(n,i,a);Cr(t.get("orient"),r,t.get("itemGap"),o.width,o.height),ly(r,n,i,a)}function ip(r,t){var e=ri(t.get("padding")),n=t.getItemStyle(["color","opacity"]);return n.fill=t.get("backgroundColor"),r=new he({shape:{x:r.x-e[3],y:r.y-e[0],width:r.width+e[1]+e[3],height:r.height+e[0]+e[2],r:t.get("borderRadius")},style:n,silent:!0,z2:-1}),r}var Hb=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,n,a,i){var o=this.group;if(o.removeAll(),!e.get("show"))return;var s=+e.get("itemSize"),l=e.get("orient")==="vertical",u=e.get("feature")||{},f=this._features||(this._features={}),c=[];w(u,function(d,p){c.push(p)}),new Ln(this._featureNames||[],c).add(h).update(h).remove(J(h,null)).execute(),this._featureNames=c;function h(d,p){var g=c[d],m=c[p],y=u[g],_=new ce(y,e,e.ecModel),S;if(i&&i.newTitle!=null&&i.featureName===g&&(y.title=i.newTitle),g&&!m){if(Ub(g))S={onclick:_.option.onclick,featureName:g};else{var b=ap(g);if(!b)return;S=new b}f[g]=S}else if(S=f[m],!S)return;S.uid=Wn("toolbox-feature"),S.model=_,S.ecModel=n,S.api=a;var x=S instanceof Je;if(!g&&m){x&&S.dispose&&S.dispose(n,a);return}if(!_.get("show")||x&&S.unusable){x&&S.remove&&S.remove(n,a);return}v(_,S,g),_.setIconStatus=function(C,T){var D=this.option,A=this.iconPaths;D.iconStatus=D.iconStatus||{},D.iconStatus[C]=T,A[C]&&(T==="emphasis"?Ar:Ir)(A[C])},S instanceof Je&&S.render&&S.render(_,n,a,i)}function v(d,p,g){var m=d.getModel("iconStyle"),y=d.getModel(["emphasis","iconStyle"]),_=p instanceof Je&&p.getIcons?p.getIcons():d.get("icon"),S=d.get("title")||{},b,x;G(_)?(b={},b[g]=_):b=_,G(S)?(x={},x[g]=S):x=S;var C=d.iconPaths={};w(b,function(T,D){var A=$a(T,{},{x:-s/2,y:-s/2,width:s,height:s});A.setStyle(m.getItemStyle());var I=A.ensureState("emphasis");I.style=y.getItemStyle();var M=new Ce({style:{text:x[D],align:y.get("textAlign"),borderRadius:y.get("textBorderRadius"),padding:y.get("textPadding"),fill:null,font:Lv({fontStyle:y.get("textFontStyle"),fontFamily:y.get("textFontFamily"),fontSize:y.get("textFontSize"),fontWeight:y.get("textFontWeight")},n)},ignore:!0});A.setTextContent(M),Ka({el:A,componentModel:e,itemName:D,formatterParamsExtra:{title:x[D]}}),A.__title=x[D],A.on("mouseover",function(){var L=y.getItemStyle(),P=l?e.get("right")==null&&e.get("left")!=="right"?"right":"left":e.get("bottom")==null&&e.get("top")!=="bottom"?"bottom":"top";M.setStyle({fill:y.get("textFill")||L.fill||L.stroke||"#000",backgroundColor:y.get("textBackgroundColor")}),A.setTextConfig({position:y.get("textPosition")||P}),M.ignore=!e.get("showTitle"),a.enterEmphasis(this)}).on("mouseout",function(){d.get(["iconStatus",D])!=="emphasis"&&a.leaveEmphasis(this),M.hide()}),(d.get(["iconStatus",D])==="emphasis"?Ar:Ir)(A),o.add(A),A.on("click",oe(p.onclick,p,n,a,D)),C[D]=A})}Wb(o,e,a),o.add(ip(o.getBoundingRect(),e)),l||o.eachChild(function(d){var p=d.__title,g=d.ensureState("emphasis"),m=g.textConfig||(g.textConfig={}),y=d.getTextContent(),_=y&&y.ensureState("emphasis");if(_&&!X(_)&&p){var S=_.style||(_.style={}),b=ds(p,Ce.makeFont(S)),x=d.x+o.x,C=d.y+o.y+s,T=!1;C+b.height>a.getHeight()&&(m.position="top",T=!0);var D=T?-5-b.height:s+10;x+b.width/2>a.getWidth()?(m.position=["100%",D],S.align="right"):x-b.width/2<0&&(m.position=[0,D],S.align="left")}})},t.prototype.updateView=function(e,n,a,i){w(this._features,function(o){o instanceof Je&&o.updateView&&o.updateView(o.model,n,a,i)})},t.prototype.remove=function(e,n){w(this._features,function(a){a instanceof Je&&a.remove&&a.remove(e,n)}),this.group.removeAll()},t.prototype.dispose=function(e,n){w(this._features,function(a){a instanceof Je&&a.dispose&&a.dispose(e,n)})},t.type="toolbox",t}(Ne);function Ub(r){return r.indexOf("my")===0}var Yb=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,n){var a=this.model,i=a.get("name")||e.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":a.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:a.get("backgroundColor",!0)||e.get("backgroundColor")||"#fff",connectedBackgroundColor:a.get("connectedBackgroundColor"),excludeComponents:a.get("excludeComponents"),pixelRatio:a.get("pixelRatio")}),u=fe.browser;if(X(MouseEvent)&&(u.newEdge||!u.ie&&!u.edge)){var f=document.createElement("a");f.download=i+"."+s,f.target="_blank",f.href=l;var c=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});f.dispatchEvent(c)}else if(window.navigator.msSaveOrOpenBlob||o){var h=l.split(","),v=h[0].indexOf("base64")>-1,d=o?decodeURIComponent(h[1]):h[1];v&&(d=window.atob(d));var p=i+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=d.length,m=new Uint8Array(g);g--;)m[g]=d.charCodeAt(g);var y=new Blob([m]);window.navigator.msSaveOrOpenBlob(y,p)}else{var _=document.createElement("iframe");document.body.appendChild(_);var S=_.contentWindow,b=S.document;b.open("image/svg+xml","replace"),b.write(d),b.close(),S.focus(),b.execCommand("SaveAs",!0,p),document.body.removeChild(_)}}else{var x=a.get("lang"),C='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(x&&x[0]||"")+'" /></body>',T=window.open();T.document.write(C),T.document.title=i}},t.getDefaultOption=function(e){var n={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:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},t}(Je),Bf="__ec_magicType_stack__",Xb=[["line","bar"],["stack"]],Zb=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getIcons=function(){var e=this.model,n=e.get("icon"),a={};return w(e.get("type"),function(i){n[i]&&(a[i]=n[i])}),a},t.getDefaultOption=function(e){var n={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:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},t.prototype.onclick=function(e,n,a){var i=this.model,o=i.get(["seriesIndex",a]);if(Vf[a]){var s={series:[]},l=function(c){var h=c.subType,v=c.id,d=Vf[a](h,v,c,i);d&&(re(d,c.option),s.series.push(d));var p=c.coordinateSystem;if(p&&p.type==="cartesian2d"&&(a==="line"||a==="bar")){var g=p.getAxesByScale("ordinal")[0];if(g){var m=g.dim,y=m+"Axis",_=c.getReferringComponents(y,Re).models[0],S=_.componentIndex;s[y]=s[y]||[];for(var b=0;b<=S;b++)s[y][S]=s[y][S]||{};s[y][S].boundaryGap=a==="bar"}}};w(Xb,function(c){se(c,a)>=0&&w(c,function(h){i.setIconStatus(h,"normal")})}),i.setIconStatus(a,"emphasis"),e.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,f=a;a==="stack"&&(u=K({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",a])!=="emphasis"&&(f="tiled")),n.dispatchAction({type:"changeMagicType",currentType:f,newOption:s,newTitle:u,featureName:"magicType"})}},t}(Je),Vf={line:function(r,t,e,n){if(r==="bar")return K({id:t,type:"line",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(r,t,e,n){if(r==="line")return K({id:t,type:"bar",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(r,t,e,n){var a=e.get("stack")===Bf;if(r==="line"||r==="bar")return n.setIconStatus("stack",a?"normal":"emphasis"),K({id:t,stack:a?"":Bf},n.get(["option","stack"])||{},!0)}};ft({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,t){t.mergeOption(r.newOption)});var vi=new Array(60).join("-"),Er=" ";function $b(r){var t={},e=[],n=[];return r.eachRawSeries(function(a){var i=a.coordinateSystem;if(i&&(i.type==="cartesian2d"||i.type==="polar")){var o=i.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;t[s]||(t[s]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),t[s].series.push(a)}else e.push(a)}else e.push(a)}),{seriesGroupByCategoryAxis:t,other:e,meta:n}}function Kb(r){var t=[];return w(r,function(e,n){var a=e.categoryAxis,i=e.valueAxis,o=i.dim,s=[" "].concat(F(e.series,function(v){return v.name})),l=[a.model.getCategories()];w(e.series,function(v){var d=v.getRawData();l.push(v.getRawData().mapArray(d.mapDimension(o),function(p){return p}))});for(var u=[s.join(Er)],f=0;f<l[0].length;f++){for(var c=[],h=0;h<l.length;h++)c.push(l[h][f]);u.push(c.join(Er))}t.push(u.join(`
|
||
`))}),t.join(`
|
||
|
||
`+vi+`
|
||
|
||
`)}function qb(r){return F(r,function(t){var e=t.getRawData(),n=[t.name],a=[];return e.each(e.dimensions,function(){for(var i=arguments.length,o=arguments[i-1],s=e.getName(o),l=0;l<i-1;l++)a[l]=arguments[l];n.push((s?s+Er:"")+a.join(Er))}),n.join(`
|
||
`)}).join(`
|
||
|
||
`+vi+`
|
||
|
||
`)}function jb(r){var t=$b(r);return{value:be([Kb(t.seriesGroupByCategoryAxis),qb(t.other)],function(e){return!!e.replace(/[\n\t\s]/g,"")}).join(`
|
||
|
||
`+vi+`
|
||
|
||
`),meta:t.meta}}function Fa(r){return r.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Qb(r){var t=r.slice(0,r.indexOf(`
|
||
`));if(t.indexOf(Er)>=0)return!0}var ns=new RegExp("["+Er+"]+","g");function Jb(r){for(var t=r.split(/\n+/g),e=Fa(t.shift()).split(ns),n=[],a=F(e,function(l){return{name:l,data:[]}}),i=0;i<t.length;i++){var o=Fa(t[i]).split(ns);n.push(o.shift());for(var s=0;s<o.length;s++)a[s]&&(a[s].data[i]=o[s])}return{series:a,categories:n}}function ew(r){for(var t=r.split(/\n+/g),e=Fa(t.shift()),n=[],a=0;a<t.length;a++){var i=Fa(t[a]);if(i){var o=i.split(ns),s="",l=void 0,u=!1;isNaN(o[0])?(u=!0,s=o[0],o=o.slice(1),n[a]={name:s,value:[]},l=n[a].value):l=n[a]=[];for(var f=0;f<o.length;f++)l.push(+o[f]);l.length===1&&(u?n[a].value=l[0]:n[a]=l[0])}}return{name:e,data:n}}function tw(r,t){var e=r.split(new RegExp(`
|
||
*`+vi+`
|
||
*`,"g")),n={series:[]};return w(e,function(a,i){if(Qb(a)){var o=Jb(a),s=t[i],l=s.axisDim+"Axis";s&&(n[l]=n[l]||[],n[l][s.axisIndex]={data:o.categories},n.series=n.series.concat(o.series))}else{var o=ew(a);n.series.push(o)}}),n}var rw=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,n){setTimeout(function(){n.dispatchAction({type:"hideTip"})});var a=n.getDom(),i=this.model;this._dom&&a.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=i.get("backgroundColor")||"#fff";var s=document.createElement("h4"),l=i.get("lang")||[];s.innerHTML=l[0]||i.get("title"),s.style.cssText="margin:10px 20px",s.style.color=i.get("textColor");var u=document.createElement("div"),f=document.createElement("textarea");u.style.cssText="overflow:auto";var c=i.get("optionToContent"),h=i.get("contentToOption"),v=jb(e);if(X(c)){var d=c(n.getOption());G(d)?u.innerHTML=d:So(d)&&u.appendChild(d)}else{f.readOnly=i.get("readOnly");var p=f.style;p.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",p.color=i.get("textColor"),p.borderColor=i.get("textareaBorderColor"),p.backgroundColor=i.get("textareaColor"),f.value=v.value,u.appendChild(f)}var g=v.meta,m=document.createElement("div");m.style.cssText="position:absolute;bottom:5px;left:0;right:0";var y="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",_=document.createElement("div"),S=document.createElement("div");y+=";background-color:"+i.get("buttonColor"),y+=";color:"+i.get("buttonTextColor");var b=this;function x(){a.removeChild(o),b._dom=null}bl(_,"click",x),bl(S,"click",function(){if(h==null&&c!=null||h!=null&&c==null){x();return}var C;try{X(h)?C=h(u,n.getOption()):C=tw(f.value,g)}catch(T){throw x(),new Error("Data view format error "+T)}C&&n.dispatchAction({type:"changeDataView",newOption:C}),x()}),_.innerHTML=l[1],S.innerHTML=l[2],S.style.cssText=_.style.cssText=y,!i.get("readOnly")&&m.appendChild(S),m.appendChild(_),o.appendChild(s),o.appendChild(u),o.appendChild(m),u.style.height=a.clientHeight-80+"px",a.appendChild(o),this._dom=o},t.prototype.remove=function(e,n){this._dom&&n.getDom().removeChild(this._dom)},t.prototype.dispose=function(e,n){this.remove(e,n)},t.getDefaultOption=function(e){var n={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:e.getLocaleModel().get(["toolbox","dataView","title"]),lang:e.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"};return n},t}(Je);function nw(r,t){return F(r,function(e,n){var a=t&&t[n];if(Y(a)&&!N(a)){var i=Y(e)&&!N(e);i||(e={value:e});var o=a.name!=null&&e.name==null;return e=re(e,a),o&&delete e.name,e}else return e})}ft({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(r,t){var e=[];w(r.newOption.series,function(n){var a=t.getSeriesByName(n.name)[0];if(!a)e.push(B({type:"scatter"},n));else{var i=a.get("data");e.push({name:n.name,data:nw(n.data,i)})}}),t.mergeOption(re({series:e},r.newOption))});var op=w,sp=ue();function aw(r,t){var e=ul(r);op(t,function(n,a){for(var i=e.length-1;i>=0;i--){var o=e[i];if(o[a])break}if(i<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:a})[0];if(s){var l=s.getPercentRange();e[0][a]={dataZoomId:a,start:l[0],end:l[1]}}}}),e.push(t)}function iw(r){var t=ul(r),e=t[t.length-1];t.length>1&&t.pop();var n={};return op(e,function(a,i){for(var o=t.length-1;o>=0;o--)if(a=t[o][i],a){n[i]=a;break}}),n}function ow(r){sp(r).snapshots=null}function sw(r){return ul(r).length}function ul(r){var t=sp(r);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var lw=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,n){ow(e),n.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){var n={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:e.getLocaleModel().get(["toolbox","restore","title"])};return n},t}(Je);ft({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,t){t.resetOption("recreate")});var uw=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],lp=function(){function r(t,e,n){var a=this;this._targetInfoList=[];var i=zf(e,t);w(fw,function(o,s){(!n||!n.include||se(n.include,s)>=0)&&o(i,a._targetInfoList)})}return r.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(n,a,i){if((n.coordRanges||(n.coordRanges=[])).push(a),!n.coordRange){n.coordRange=a;var o=ji[n.brushType](0,i,a);n.__rangeOffset={offset:Hf[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},r.prototype.matchOutputRanges=function(t,e,n){w(t,function(a){var i=this.findTargetInfo(a,e);i&&i!==!0&&w(i.coordSyses,function(o){var s=ji[a.brushType](1,o,a.range,!0);n(a,s.values,o,e)})},this)},r.prototype.setInputRanges=function(t,e){w(t,function(n){var a=this.findTargetInfo(n,e);if(n.range=n.range||[],a&&a!==!0){n.panelId=a.panelId;var i=ji[n.brushType](0,a.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?Hf[n.brushType](i.values,o.offset,cw(i.xyMinMax,o.xyMinMax)):i.values}},this)},r.prototype.makePanelOpts=function(t,e){return F(this._targetInfoList,function(n){var a=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:Tb(a),isTargetByCursor:Ab(a,t,n.coordSysModel),getLinearBrushOtherExtent:Db(a)}})},r.prototype.controlSeries=function(t,e,n){var a=this.findTargetInfo(t,n);return a===!0||a&&se(a.coordSyses,e.coordinateSystem)>=0},r.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,a=zf(e,t),i=0;i<n.length;i++){var o=n[i],s=t.panelId;if(s){if(o.panelId===s)return o}else for(var l=0;l<Ff.length;l++)if(Ff[l](a,o))return o}return!0},r}();function as(r){return r[0]>r[1]&&r.reverse(),r}function zf(r,t){return vn(r,t,{includeMainTypes:uw})}var fw={grid:function(r,t){var e=r.xAxisModels,n=r.yAxisModels,a=r.gridModels,i=U(),o={},s={};!e&&!n&&!a||(w(e,function(l){var u=l.axis.grid.model;i.set(u.id,u),o[u.id]=!0}),w(n,function(l){var u=l.axis.grid.model;i.set(u.id,u),s[u.id]=!0}),w(a,function(l){i.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),i.each(function(l){var u=l.coordinateSystem,f=[];w(u.getCartesians(),function(c,h){(se(e,c.getAxis("x").model)>=0||se(n,c.getAxis("y").model)>=0)&&f.push(c)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:f[0],coordSyses:f,getPanelRect:Gf.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,t){w(r.geoModels,function(e){var n=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:n,coordSyses:[n],getPanelRect:Gf.geo})})}},Ff=[function(r,t){var e=r.xAxisModel,n=r.yAxisModel,a=r.gridModel;return!a&&e&&(a=e.axis.grid.model),!a&&n&&(a=n.axis.grid.model),a&&a===t.gridModel},function(r,t){var e=r.geoModel;return e&&e===t.geoModel}],Gf={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,t=r.getBoundingRect().clone();return t.applyTransform(Ts(r)),t}},ji={lineX:J(Wf,0),lineY:J(Wf,1),rect:function(r,t,e,n){var a=r?t.pointToData([e[0][0],e[1][0]],n):t.dataToPoint([e[0][0],e[1][0]],n),i=r?t.pointToData([e[0][1],e[1][1]],n):t.dataToPoint([e[0][1],e[1][1]],n),o=[as([a[0],i[0]]),as([a[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(r,t,e,n){var a=[[1/0,-1/0],[1/0,-1/0]],i=F(e,function(o){var s=r?t.pointToData(o,n):t.dataToPoint(o,n);return a[0][0]=Math.min(a[0][0],s[0]),a[1][0]=Math.min(a[1][0],s[1]),a[0][1]=Math.max(a[0][1],s[0]),a[1][1]=Math.max(a[1][1],s[1]),s});return{values:i,xyMinMax:a}}};function Wf(r,t,e,n){var a=e.getAxis(["x","y"][r]),i=as(F([0,1],function(s){return t?a.coordToData(a.toLocalCoord(n[s]),!0):a.toGlobalCoord(a.dataToCoord(n[s]))})),o=[];return o[r]=i,o[1-r]=[NaN,NaN],{values:i,xyMinMax:o}}var Hf={lineX:J(Uf,0),lineY:J(Uf,1),rect:function(r,t,e){return[[r[0][0]-e[0]*t[0][0],r[0][1]-e[0]*t[0][1]],[r[1][0]-e[1]*t[1][0],r[1][1]-e[1]*t[1][1]]]},polygon:function(r,t,e){return F(r,function(n,a){return[n[0]-e[0]*t[a][0],n[1]-e[1]*t[a][1]]})}};function Uf(r,t,e,n){return[t[0]-n[r]*e[0],t[1]-n[r]*e[1]]}function cw(r,t){var e=Yf(r),n=Yf(t),a=[e[0]/n[0],e[1]/n[1]];return isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a}function Yf(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var is=w,vw=Wg("toolbox-dataZoom_"),hw=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,n,a,i){this._brushController||(this._brushController=new gb(a.getZr()),this._brushController.on("brush",oe(this._onBrush,this)).mount()),gw(e,n,this,i,a),pw(e,n)},t.prototype.onclick=function(e,n,a){dw[a].call(this)},t.prototype.remove=function(e,n){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,n){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var n=e.areas;if(!e.isEnd||!n.length)return;var a={},i=this.ecModel;this._brushController.updateCovers([]);var o=new lp(fl(this.model),i,{include:["grid"]});o.matchOutputRanges(n,i,function(u,f,c){if(c.type==="cartesian2d"){var h=u.brushType;h==="rect"?(s("x",c,f[0]),s("y",c,f[1])):s({lineX:"x",lineY:"y"}[h],c,f)}}),aw(i,a),this._dispatchZoomAction(a);function s(u,f,c){var h=f.getAxis(u),v=h.model,d=l(u,v,i),p=d.findRepresentativeAxisProxy(v).getMinMaxSpan();(p.minValueSpan!=null||p.maxValueSpan!=null)&&(c=Yd(0,c.slice(),h.scale.getExtent(),0,p.minValueSpan,p.maxValueSpan)),d&&(a[d.id]={dataZoomId:d.id,startValue:c[0],endValue:c[1]})}function l(u,f,c){var h;return c.eachComponent({mainType:"dataZoom",subType:"select"},function(v){var d=v.getAxisModel(u,f.componentIndex);d&&(h=v)}),h}},t.prototype._dispatchZoomAction=function(e){var n=[];is(e,function(a,i){n.push($(a))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},t.getDefaultOption=function(e){var n={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:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return n},t}(Je),dw={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(iw(this.ecModel))}};function fl(r){var t={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function pw(r,t){r.setIconStatus("back",sw(t)>1?"emphasis":"normal")}function gw(r,t,e,n,a){var i=e._isZoomActive;n&&n.type==="takeGlobalCursor"&&(i=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),e._isZoomActive=i,r.setIconStatus("zoom",i?"emphasis":"normal");var o=new lp(fl(r),t,{include:["grid"]}),s=o.makePanelOpts(a,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});e._brushController.setPanels(s).enableBrush(i&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}gy("dataZoom",function(r){var t=r.getComponent("toolbox",0),e=["feature","dataZoom"];if(!t||t.get(e)==null)return;var n=t.getModel(e),a=[],i=fl(n),o=vn(r,i);is(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),is(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,f){var c=l.componentIndex,h={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:vw+u+c};h[f]=c,a.push(h)}return a});function X1(r){r.registerComponentModel(Gb),r.registerComponentView(Hb),rn("saveAsImage",Yb),rn("magicType",Zb),rn("dataView",rw),rn("dataZoom",hw),rn("restore",lw),St(Fb)}var mw=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t}(ee);function up(r){var t=r.get("confine");return t!=null?!!t:r.get("renderMode")==="richText"}function fp(r){if(fe.domSupported){for(var t=document.documentElement.style,e=0,n=r.length;e<n;e++)if(r[e]in t)return r[e]}}var cp=fp(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),yw=fp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function vp(r,t){if(!r)return t;t=Uv(t,!0);var e=r.indexOf(t);return r=e===-1?t:"-"+r.slice(0,e)+"-"+t,r.toLowerCase()}function _w(r,t){var e=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r);return e?e[t]:null}var Sw=vp(yw,"transition"),cl=vp(cp,"transform"),xw="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(fe.transform3dSupported?"will-change:transform;":"");function bw(r){return r=r==="left"?"right":r==="right"?"left":r==="top"?"bottom":"top",r}function ww(r,t,e){if(!G(e)||e==="inside")return"";var n=r.get("backgroundColor"),a=r.get("borderWidth");t=nr(t);var i=bw(e),o=Math.max(Math.round(a)*1.5,6),s="",l=cl+":",u;se(["left","right"],i)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=i==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=i==="top"?225:45)+"deg)");var f=u*Math.PI/180,c=o+a,h=c*Math.abs(Math.cos(f))+c*Math.abs(Math.sin(f)),v=Math.round(((h-Math.SQRT2*a)/2+Math.SQRT2*a-(h-c)/2)*100)/100;s+=";"+i+":-"+v+"px";var d=t+" solid "+a+"px;",p=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+n+";"];return'<div style="'+p.join("")+'"></div>'}function Cw(r,t){var e="cubic-bezier(0.23,1,0.32,1)",n=" "+r/2+"s "+e,a="opacity"+n+",visibility"+n;return t||(n=" "+r+"s "+e,a+=fe.transformSupported?","+cl+n:",left"+n+",top"+n),Sw+":"+a}function Xf(r,t,e){var n=r.toFixed(0)+"px",a=t.toFixed(0)+"px";if(!fe.transformSupported)return e?"top:"+a+";left:"+n+";":[["top",a],["left",n]];var i=fe.transform3dSupported,o="translate"+(i?"3d":"")+"("+n+","+a+(i?",0":"")+")";return e?"top:0;left:0;"+cl+":"+o+";":[["top",0],["left",0],[cp,o]]}function Tw(r){var t=[],e=r.get("fontSize"),n=r.getTextColor();n&&t.push("color:"+n),t.push("font:"+r.getFont()),e&&t.push("line-height:"+Math.round(e*3/2)+"px");var a=r.get("textShadowColor"),i=r.get("textShadowBlur")||0,o=r.get("textShadowOffsetX")||0,s=r.get("textShadowOffsetY")||0;return a&&i&&t.push("text-shadow:"+o+"px "+s+"px "+i+"px "+a),w(["decoration","align"],function(l){var u=r.get(l);u&&t.push("text-"+l+":"+u)}),t.join(";")}function Dw(r,t,e){var n=[],a=r.get("transitionDuration"),i=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),f=r.getModel("textStyle"),c=bh(r,"html"),h=l+"px "+u+"px "+o+"px "+s;return n.push("box-shadow:"+h),t&&a&&n.push(Cw(a,e)),i&&n.push("background-color:"+i),w(["width","color","radius"],function(v){var d="border-"+v,p=Uv(d),g=r.get(p);g!=null&&n.push(d+":"+g+(v==="color"?"":"px"))}),n.push(Tw(f)),c!=null&&n.push("padding:"+ri(c).join("px ")+"px"),n.join(";")+";"}function Zf(r,t,e,n,a){var i=t&&t.painter;if(e){var o=i&&i.getViewportRoot();o&&hg(r,o,e,n,a)}else{r[0]=n,r[1]=a;var s=i&&i.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var Aw=function(){function r(t,e){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,fe.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var a=this._zr=t.getZr(),i=e.appendTo,o=i&&(G(i)?document.querySelector(i):So(i)?i:X(i)&&i(t.getDom()));Zf(this._styleCoord,a,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(n),this._api=t,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=a.handler,f=a.painter.getViewportRoot();vg(f,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(t){if(!this._container){var e=this._api.getDom(),n=_w(e,"position"),a=e.style;a.position!=="absolute"&&n!=="absolute"&&(a.position="relative")}var i=t.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this.el.className=t.get("className")||""},r.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,a=n.style,i=this._styleCoord;n.innerHTML?a.cssText=xw+Dw(t,!this._firstShow,this._longHide)+Xf(i[0],i[1],!0)+("border-color:"+nr(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):a.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(t,e,n,a,i){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(G(i)&&n.get("trigger")==="item"&&!up(n)&&(s=ww(n,a,i)),G(t))o.innerHTML=t+s;else if(t){o.innerHTML="",N(t)||(t=[t]);for(var l=0;l<t.length;l++)So(t[l])&&t[l].parentNode!==o&&o.appendChild(t[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},r.prototype.setEnterable=function(t){this._enterable=t},r.prototype.getSize=function(){var t=this.el;return[t.offsetWidth,t.offsetHeight]},r.prototype.moveTo=function(t,e){var n=this._styleCoord;if(Zf(n,this._zr,this._container,t,e),n[0]!=null&&n[1]!=null){var a=this.el.style,i=Xf(n[0],n[1]);w(i,function(o){a[o[0]]=o[1]})}},r.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},r.prototype.hide=function(){var t=this,e=this.el.style;e.visibility="hidden",e.opacity="0",fe.transform3dSupported&&(e.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return t._longHide=!0},500)},r.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(oe(this.hide,this),t)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var t=this.el.parentNode;t&&t.removeChild(this.el),this.el=this._container=null},r}(),Iw=function(){function r(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),Kf(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return r.prototype.update=function(t){var e=t.get("alwaysShowContent");e&&this._moveIfResized(),this._alwaysShowContent=e},r.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},r.prototype.setContent=function(t,e,n,a,i){var o=this;Y(t)&&Q(""),this.el&&this._zr.remove(this.el);var s=n.getModel("textStyle");this.el=new Ce({style:{rich:e.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:a,textShadowColor:s.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:bh(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),w(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=n.get(u)}),w(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){o.el.style[u]=s.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},r.prototype.setEnterable=function(t){this._enterable=t},r.prototype.getSize=function(){var t=this.el,e=this.el.getBoundingRect(),n=$f(t.style);return[e.width+n.left+n.right,e.height+n.top+n.bottom]},r.prototype.moveTo=function(t,e){var n=this.el;if(n){var a=this._styleCoord;Kf(a,this._zr,t,e),t=a[0],e=a[1];var i=n.style,o=kt(i.borderWidth||0),s=$f(i);n.x=t+o+s.left,n.y=e+o+s.top,n.markRedraw()}},r.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},r.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},r.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(oe(this.hide,this),t)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this._zr.remove(this.el)},r}();function kt(r){return Math.max(0,r)}function $f(r){var t=kt(r.shadowBlur||0),e=kt(r.shadowOffsetX||0),n=kt(r.shadowOffsetY||0);return{left:kt(t-e),right:kt(t+e),top:kt(t-n),bottom:kt(t+n)}}function Kf(r,t,e,n){r[0]=e,r[1]=n,r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var Mw=new he({shape:{x:-1,y:-1,width:2,height:2}}),Lw=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,n){if(!(fe.node||!n.getDom())){var a=e.getComponent("tooltip"),i=this._renderMode=$g(a.get("renderMode"));this._tooltipContent=i==="richText"?new Iw(n):new Aw(n,{appendTo:a.get("appendToBody",!0)?"body":a.get("appendTo",!0)})}},t.prototype.render=function(e,n,a){if(!(fe.node||!a.getDom())){this.group.removeAll(),this._tooltipModel=e,this._ecModel=n,this._api=a;var i=this._tooltipContent;i.update(e),i.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&e.get("transitionDuration")?Ch(this,"_updatePosition",50,"fixRate"):No(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel,n=e.get("triggerOn");Gd("itemTooltip",this._api,oe(function(a,i,o){n!=="none"&&(n.indexOf(a)>=0?this._tryShow(i,o):a==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,n=this._ecModel,a=this._api,i=e.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!a.isDisposed()&&o.manuallyShowTip(e,n,a,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,n,a,i){if(!(i.from===this.uid||fe.node||!a.getDom())){var o=qf(i,a);this._ticket="";var s=i.dataByCoordSys,l=Ew(i,n,a);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&i.x!=null&&i.y!=null){var f=Mw;f.x=i.x,f.y=i.y,f.update(),Z(f).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:f},o)}else if(s)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:s,tooltipOption:i.tooltipOption},o);else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(e,n,a,i))return;var c=Wd(i,n),h=c.point[0],v=c.point[1];h!=null&&v!=null&&this._tryShow({offsetX:h,offsetY:v,target:c.el,position:i.position,positionDefault:"bottom"},o)}else i.x!=null&&i.y!=null&&(a.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:a.getZr().findHover(i.x,i.y).target},o))}},t.prototype.manuallyHideTip=function(e,n,a,i){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(qf(i,a))},t.prototype._manuallyAxisShowTip=function(e,n,a,i){var o=i.seriesIndex,s=i.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var f=u.getData(),c=nn([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(c.get("trigger")==="axis")return a.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:i.position}),!0}}},t.prototype._tryShow=function(e,n){var a=e.target,i=this._tooltipModel;if(i){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(a){var s=Z(a);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;un(a,function(f){if(Z(f).dataIndex!=null)return l=f,!0;if(Z(f).tooltipConfig!=null)return u=f,!0},!0),l?this._showSeriesItemTooltip(e,l,n):u?this._showComponentItemTooltip(e,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},t.prototype._showOrMove=function(e,n){var a=e.get("showDelay");n=oe(n,this),clearTimeout(this._showTimout),a>0?this._showTimout=setTimeout(n,a):n()},t.prototype._showAxisTooltip=function(e,n){var a=this._ecModel,i=this._tooltipModel,o=[n.offsetX,n.offsetY],s=nn([n.tooltipOption],i),l=this._renderMode,u=[],f=In("section",{blocks:[],noHeader:!0}),c=[],h=new Ii;w(e,function(y){w(y.dataByAxis,function(_){var S=a.getComponent(_.axisDim+"Axis",_.axisIndex),b=_.value;if(!(!S||b==null)){var x=zd(b,S.axis,a,_.seriesDataIndices,_.valueLabelOpt),C=In("section",{header:x,noHeader:!Bn(x),sortBlocks:!0,blocks:[]});f.blocks.push(C),w(_.seriesDataIndices,function(T){var D=a.getSeriesByIndex(T.seriesIndex),A=T.dataIndexInside,I=D.getDataParams(A);if(!(I.dataIndex<0)){I.axisDim=_.axisDim,I.axisIndex=_.axisIndex,I.axisType=_.axisType,I.axisId=_.axisId,I.axisValue=Js(S.axis,{value:b}),I.axisValueLabel=x,I.marker=h.makeTooltipMarker("item",nr(I.color),l);var M=pu(D.formatTooltip(A,!0,null)),L=M.frag;if(L){var P=nn([D],i).get("valueFormatter");C.blocks.push(P?B({valueFormatter:P},L):L)}M.text&&c.push(M.text),u.push(I)}})}})}),f.blocks.reverse(),c.reverse();var v=n.position,d=s.get("order"),p=xu(f,h,l,d,a.get("useUTC"),s.get("textStyle"));p&&c.unshift(p);var g=l==="richText"?`
|
||
|
||
`:"<br/>",m=c.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,m,u,Math.random()+"",o[0],o[1],v,null,h)})},t.prototype._showSeriesItemTooltip=function(e,n,a){var i=this._ecModel,o=Z(n),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,c=o.dataType,h=u.getData(c),v=this._renderMode,d=e.positionDefault,p=nn([h.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),g=p.get("trigger");if(!(g!=null&&g!=="item")){var m=u.getDataParams(f,c),y=new Ii;m.marker=y.makeTooltipMarker("item",nr(m.color),v);var _=pu(u.formatTooltip(f,!1,c)),S=p.get("order"),b=p.get("valueFormatter"),x=_.frag,C=x?xu(b?B({valueFormatter:b},x):x,y,v,S,i.get("useUTC"),p.get("textStyle")):_.text,T="item_"+u.name+"_"+f;this._showOrMove(p,function(){this._showTooltipContent(p,C,m,T,e.offsetX,e.offsetY,e.position,e.target,y)}),a({type:"showTip",dataIndexInside:f,dataIndex:h.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,n,a){var i=Z(n),o=i.tooltipConfig,s=o.option||{};if(G(s)){var l=s;s={content:l,formatter:l}}var u=[s],f=this._ecModel.getComponent(i.componentMainType,i.componentIndex);f&&u.push(f),u.push({formatter:s.content});var c=e.positionDefault,h=nn(u,this._tooltipModel,c?{position:c}:null),v=h.get("content"),d=Math.random()+"",p=new Ii;this._showOrMove(h,function(){var g=$(h.get("formatterParams")||{});this._showTooltipContent(h,v,g,d,e.offsetX,e.offsetY,e.position,n,p)}),a({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,n,a,i,o,s,l,u,f){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var c=this._tooltipContent;c.setEnterable(e.get("enterable"));var h=e.get("formatter");l=l||e.get("position");var v=n,d=this._getNearestPoint([o,s],a,e.get("trigger"),e.get("borderColor")),p=d.color;if(h)if(G(h)){var g=e.ecModel.get("useUTC"),m=N(a)?a[0]:a,y=m&&m.axisType&&m.axisType.indexOf("time")>=0;v=h,y&&(v=ja(m.axisValue,v,g)),v=Yv(v,a,!0)}else if(X(h)){var _=oe(function(S,b){S===this._ticket&&(c.setContent(b,f,e,p,l),this._updatePosition(e,l,o,s,c,a,u))},this);this._ticket=i,v=h(a,i,_)}else v=h;c.setContent(v,f,e,p,l),c.show(e,p),this._updatePosition(e,l,o,s,c,a,u)}},t.prototype._getNearestPoint=function(e,n,a,i){if(a==="axis"||N(n))return{color:i||(this._renderMode==="html"?"#fff":"none")};if(!N(n))return{color:i||n.color||n.borderColor}},t.prototype._updatePosition=function(e,n,a,i,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();n=n||e.get("position");var c=o.getSize(),h=e.get("align"),v=e.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),X(n)&&(n=n([a,i],s,o.el,d,{viewSize:[u,f],contentSize:c.slice()})),N(n))a=te(n[0],u),i=te(n[1],f);else if(Y(n)){var p=n;p.width=c[0],p.height=c[1];var g=Gt(p,{width:u,height:f});a=g.x,i=g.y,h=null,v=null}else if(G(n)&&l){var m=kw(n,d,c,e.get("borderWidth"));a=m[0],i=m[1]}else{var m=Pw(a,i,o,u,f,h?null:20,v?null:20);a=m[0],i=m[1]}if(h&&(a-=jf(h)?c[0]/2:h==="right"?c[0]:0),v&&(i-=jf(v)?c[1]/2:v==="bottom"?c[1]:0),up(e)){var m=Rw(a,i,o,u,f);a=m[0],i=m[1]}o.moveTo(a,i)},t.prototype._updateContentNotChangedOnAxis=function(e,n){var a=this._lastDataByCoordSys,i=this._cbParamsList,o=!!a&&a.length===e.length;return o&&w(a,function(s,l){var u=s.dataByAxis||[],f=e[l]||{},c=f.dataByAxis||[];o=o&&u.length===c.length,o&&w(u,function(h,v){var d=c[v]||{},p=h.seriesDataIndices||[],g=d.seriesDataIndices||[];o=o&&h.value===d.value&&h.axisType===d.axisType&&h.axisId===d.axisId&&p.length===g.length,o&&w(p,function(m,y){var _=g[y];o=o&&m.seriesIndex===_.seriesIndex&&m.dataIndex===_.dataIndex}),i&&w(h.seriesDataIndices,function(m){var y=m.seriesIndex,_=n[y],S=i[y];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=n,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,n){fe.node||!n.getDom()||(No(this,"_updatePosition"),this._tooltipContent.dispose(),jo("itemTooltip",n))},t.type="tooltip",t}(Ne);function nn(r,t,e){var n=t.ecModel,a;e?(a=new ce(e,n,n),a=new ce(t.option,a,n)):a=t;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof ce&&(o=o.get("tooltip",!0)),G(o)&&(o={formatter:o}),o&&(a=new ce(o,a,n)))}return a}function qf(r,t){return r.dispatchAction||oe(t.dispatchAction,t)}function Pw(r,t,e,n,a,i,o){var s=e.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>n?r-=l+i:r+=i),o!=null&&(t+u+o>a?t-=u+o:t+=o),[r,t]}function Rw(r,t,e,n,a){var i=e.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,n)-o,t=Math.min(t+s,a)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function kw(r,t,e,n){var a=e[0],i=e[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=t.width,f=t.height;switch(r){case"inside":s=t.x+u/2-a/2,l=t.y+f/2-i/2;break;case"top":s=t.x+u/2-a/2,l=t.y-i-o;break;case"bottom":s=t.x+u/2-a/2,l=t.y+f+o;break;case"left":s=t.x-a-o,l=t.y+f/2-i/2;break;case"right":s=t.x+u+o,l=t.y+f/2-i/2}return[s,l]}function jf(r){return r==="center"||r==="middle"}function Ew(r,t,e){var n=ms(r).queryOptionMap,a=n.keys()[0];if(!(!a||a==="series")){var i=Fn(t,a,n.get(a),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(o){var s=e.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=Z(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:a,componentIndex:o.componentIndex,el:l}}}}function Z1(r){St(Hd),r.registerComponentModel(mw),r.registerComponentView(Lw),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},yt),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},yt)}var Ow=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.type="title",t.defaultOption={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:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},t}(ee),Nw=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,a){if(this.group.removeAll(),!!e.get("show")){var i=this.group,o=e.getModel("textStyle"),s=e.getModel("subtextStyle"),l=e.get("textAlign"),u=ie(e.get("textBaseline"),e.get("textVerticalAlign")),f=new Ce({style:Ft(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),c=f.getBoundingRect(),h=e.get("subtext"),v=new Ce({style:Ft(s,{text:h,fill:s.getTextColor(),y:c.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=e.get("link"),p=e.get("sublink"),g=e.get("triggerEvent",!0);f.silent=!d&&!g,v.silent=!p&&!g,d&&f.on("click",function(){ql(d,"_"+e.get("target"))}),p&&v.on("click",function(){ql(p,"_"+e.get("subtarget"))}),Z(f).eventData=Z(v).eventData=g?{componentType:"title",componentIndex:e.componentIndex}:null,i.add(f),h&&i.add(v);var m=i.getBoundingRect(),y=e.getBoxLayoutParams();y.width=m.width,y.height=m.height;var _=Gt(y,{width:a.getWidth(),height:a.getHeight()},e.get("padding"));l||(l=e.get("left")||e.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=e.get("top")||e.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),i.x=_.x,i.y=_.y,i.markRedraw();var S={align:l,verticalAlign:u};f.setStyle(S),v.setStyle(S),m=i.getBoundingRect();var b=_.margin,x=e.getItemStyle(["color","opacity"]);x.fill=e.get("backgroundColor");var C=new he({shape:{x:m.x-b[3],y:m.y-b[0],width:m.width+b[1]+b[3],height:m.height+b[0]+b[2],r:e.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});i.add(C)}},t.type="title",t}(Ne);function $1(r){r.registerComponentModel(Ow),r.registerComponentView(Nw)}function hi(r,t){var e=r.mapDimensionsAll("defaultedLabel"),n=e.length;if(n===1){var a=Pr(r,t,e[0]);return a!=null?a+"":null}else if(n){for(var i=[],o=0;o<e.length;o++)i.push(Pr(r,t,e[o]));return i.join(" ")}}function hp(r,t){var e=r.mapDimensionsAll("defaultedLabel");if(!N(t))return t+"";for(var n=[],a=0;a<e.length;a++){var i=r.getDimensionIndex(e[a]);i>=0&&n.push(t[i])}return n.join(" ")}var vl=function(r){V(t,r);function t(e,n,a,i){var o=r.call(this)||this;return o.updateData(e,n,a,i),o}return t.prototype._createSymbol=function(e,n,a,i,o){this.removeAll();var s=Wt(e,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),s.drift=Bw,this._symbolType=e,this.add(s)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Ar(this.childAt(0))},t.prototype.downplay=function(){Ir(this.childAt(0))},t.prototype.setZ=function(e,n){var a=this.childAt(0);a.zlevel=e,a.z=n},t.prototype.setDraggable=function(e,n){var a=this.childAt(0);a.draggable=e,a.cursor=!n&&e?"move":a.cursor},t.prototype.updateData=function(e,n,a,i){this.silent=!1;var o=e.getItemVisual(n,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,n),u=o!==this._symbolType,f=i&&i.disableAnimation;if(u){var c=e.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,e,n,l,c)}else{var h=this.childAt(0);h.silent=!1;var v={scaleX:l[0]/2,scaleY:l[1]/2};f?h.attr(v):me(h,v,s,n),Za(h)}if(this._updateCommon(e,n,l,a,i),u){var h=this.childAt(0);if(!f){var v={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,De(h,v,s,n)}}f&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,n,a,i,o){var s=this.childAt(0),l=e.hostModel,u,f,c,h,v,d,p,g,m;if(i&&(u=i.emphasisItemStyle,f=i.blurItemStyle,c=i.selectItemStyle,h=i.focus,v=i.blurScope,p=i.labelStatesModels,g=i.hoverScale,m=i.cursorStyle,d=i.emphasisDisabled),!i||e.hasItemOption){var y=i&&i.itemModel?i.itemModel:e.getItemModel(n),_=y.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),c=y.getModel(["select","itemStyle"]).getItemStyle(),f=y.getModel(["blur","itemStyle"]).getItemStyle(),h=_.get("focus"),v=_.get("blurScope"),d=_.get("disabled"),p=Br(y),g=_.getShallow("scale"),m=y.getShallow("cursor")}var S=e.getItemVisual(n,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var b=Hs(e.getItemVisual(n,"symbolOffset"),a);b&&(s.x=b[0],s.y=b[1]),m&&s.attr("cursor",m);var x=e.getItemVisual(n,"style"),C=x.fill;if(s instanceof Or){var T=s.style;s.useStyle(B({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},x))}else s.__isEmptyBrush?s.useStyle(B({},x)):s.useStyle(x),s.style.decal=null,s.setColor(C,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var D=e.getItemVisual(n,"liftZ"),A=this._z2;D!=null?A==null&&(this._z2=s.z2,s.z2+=D):A!=null&&(s.z2=A,this._z2=null);var I=o&&o.useNameLabel;Nr(s,p,{labelFetcher:l,labelDataIndex:n,defaultText:M,inheritColor:C,defaultOpacity:x.opacity});function M(R){return I?e.getName(R):hi(e,R)}this._sizeX=a[0]/2,this._sizeY=a[1]/2;var L=s.ensureState("emphasis");L.style=u,s.ensureState("select").style=c,s.ensureState("blur").style=f;var P=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;L.scaleX=this._sizeX*P,L.scaleY=this._sizeY*P,this.setSymbolScale(1),Mr(this,h,v,d)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,n,a){var i=this.childAt(0),o=Z(this).dataIndex,s=a&&a.animation;if(this.silent=i.silent=!0,a&&a.fadeLabel){var l=i.getTextContent();l&&wn(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();wn(i,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,n){return s_(e.getItemVisual(n,"symbolSize"))},t}(ge);function Bw(r,t){this.parent.drift(r,t)}function Qi(r,t,e,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n.isIgnore&&n.isIgnore(e))&&!(n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&r.getItemVisual(e,"symbol")!=="none"}function Qf(r){return r!=null&&!Y(r)&&(r={isIgnore:r}),r||{}}function Jf(r){var t=r.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:Br(t),cursorStyle:t.get("cursor")}}var dp=function(){function r(t){this.group=new ge,this._SymbolCtor=t||vl}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=Qf(e);var n=this.group,a=t.hostModel,i=this._data,o=this._SymbolCtor,s=e.disableAnimation,l=Jf(t),u={disableAnimation:s},f=e.getSymbolPoint||function(c){return t.getItemLayout(c)};i||n.removeAll(),t.diff(i).add(function(c){var h=f(c);if(Qi(t,h,c,e)){var v=new o(t,c,l,u);v.setPosition(h),t.setItemGraphicEl(c,v),n.add(v)}}).update(function(c,h){var v=i.getItemGraphicEl(h),d=f(c);if(!Qi(t,d,c,e)){n.remove(v);return}var p=t.getItemVisual(c,"symbol")||"circle",g=v&&v.getSymbolType&&v.getSymbolType();if(!v||g&&g!==p)n.remove(v),v=new o(t,c,l,u),v.setPosition(d);else{v.updateData(t,c,l,u);var m={x:d[0],y:d[1]};s?v.attr(m):me(v,m,a)}n.add(v),t.setItemGraphicEl(c,v)}).remove(function(c){var h=i.getItemGraphicEl(c);h&&h.fadeOut(function(){n.remove(h)},a)}).execute(),this._getSymbolPoint=f,this._data=t},r.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(n,a){var i=t._getSymbolPoint(a);n.setPosition(i),n.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=Jf(t),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,n){this._progressiveEls=[],n=Qf(n);function a(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i<t.end;i++){var o=e.getItemLayout(i);if(Qi(e,o,i,n)){var s=new this._SymbolCtor(e,i,this._seriesScope);s.traverse(a),s.setPosition(o),this.group.add(s),e.setItemGraphicEl(i,s),this._progressiveEls.push(s)}}},r.prototype.eachRendered=function(t){Gn(this._progressiveEls||this.group,t)},r.prototype.remove=function(t){var e=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(a){a.fadeOut(function(){e.remove(a)},n.hostModel)}):e.removeAll()},r}();function hl(r,t){return r.type===t}var Vw=function(r,t){if(t==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},os=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.prototype.init=function(e,n,a){this.mergeDefaultAndTheme(e,a),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(e,n){r.prototype.mergeOption.call(this,e,n),this._updateSelector(e)},t.prototype._updateSelector=function(e){var n=e.selector,a=this.ecModel;n===!0&&(n=e.selector=["all","inverse"]),N(n)&&w(n,function(i,o){G(i)&&(i={type:i}),n[o]=K(i,Vw(a,i.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var n=!1,a=0;a<e.length;a++){var i=e[a].get("name");if(this.isSelected(i)){this.select(i),n=!0;break}}!n&&this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var n=[],a=[];e.eachRawSeries(function(l){var u=l.name;a.push(u);var f;if(l.legendVisualProvider){var c=l.legendVisualProvider,h=c.getAllNames();e.isSeriesFiltered(l)||(a=a.concat(h)),h.length?n=n.concat(h):f=!0}else f=!0;f&&gs(l)&&n.push(l.name)}),this._availableNames=a;var i=this.get("data")||n,o=U(),s=F(i,function(l){return(G(l)||le(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new ce(l,this,this.ecModel))},this);this._data=be(s,function(l){return!!l})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var n=this.option.selected,a=this.get("selectedMode");if(a==="single"){var i=this._data;w(i,function(o){n[o.get("name")]=!1})}n[e]=!0},t.prototype.unSelect=function(e){this.get("selectedMode")!=="single"&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var n=this.option.selected;n.hasOwnProperty(e)||(n[e]=!0),this[n[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,n=this.option.selected;w(e,function(a){n[a.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,n=this.option.selected;w(e,function(a){var i=a.get("name",!0);n.hasOwnProperty(i)||(n[i]=!0),n[i]=!n[i]})},t.prototype.isSelected=function(e){var n=this.option.selected;return!(n.hasOwnProperty(e)&&!n[e])&&se(this._availableNames,e)>=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={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,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},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}},t}(ee),gr=J,ss=w,ca=ge,pp=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!1,e}return t.prototype.init=function(){this.group.add(this._contentGroup=new ca),this.group.add(this._selectorGroup=new ca),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,n,a){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!e.get("show",!0)){var o=e.get("align"),s=e.get("orient");(!o||o==="auto")&&(o=e.get("left")==="right"&&s==="vertical"?"right":"left");var l=e.get("selector",!0),u=e.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,e,n,a,l,s,u);var f=e.getBoxLayoutParams(),c={width:a.getWidth(),height:a.getHeight()},h=e.get("padding"),v=Gt(f,c,h),d=this.layoutInner(e,o,v,i,l,u),p=Gt(re({width:d.width,height:d.height},f),c,h);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=ip(d,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,n,a,i,o,s,l){var u=this.getContentGroup(),f=U(),c=n.get("selectedMode"),h=[];a.eachRawSeries(function(v){!v.get("legendHoverLink")&&h.push(v.id)}),ss(n.getData(),function(v,d){var p=v.get("name");if(!this.newlineDisabled&&(p===""||p===`
|
||
`)){var g=new ca;g.newline=!0,u.add(g);return}var m=a.getSeriesByName(p)[0];if(!f.get(p))if(m){var y=m.getData(),_=y.getVisual("legendLineStyle")||{},S=y.getVisual("legendIcon"),b=y.getVisual("style"),x=this._createItem(m,p,d,v,n,e,_,b,S,c,i);x.on("click",gr(ec,p,null,i,h)).on("mouseover",gr(ls,m.name,null,i,h)).on("mouseout",gr(us,m.name,null,i,h)),a.ssr&&x.eachChild(function(C){var T=Z(C);T.seriesIndex=m.seriesIndex,T.dataIndex=d,T.ssrType="legend"}),f.set(p,!0)}else a.eachRawSeries(function(C){if(!f.get(p)&&C.legendVisualProvider){var T=C.legendVisualProvider;if(!T.containName(p))return;var D=T.indexOfName(p),A=T.getItemVisual(D,"style"),I=T.getItemVisual(D,"legendIcon"),M=dg(A.fill);M&&M[3]===0&&(M[3]=.2,A=B(B({},A),{fill:pg(M,"rgba")}));var L=this._createItem(C,p,d,v,n,e,{},A,I,c,i);L.on("click",gr(ec,null,p,i,h)).on("mouseover",gr(ls,null,p,i,h)).on("mouseout",gr(us,null,p,i,h)),a.ssr&&L.eachChild(function(P){var R=Z(P);R.seriesIndex=C.seriesIndex,R.dataIndex=d,R.ssrType="legend"}),f.set(p,!0)}},this)},this),o&&this._createSelector(o,n,i,s,l)},t.prototype._createSelector=function(e,n,a,i,o){var s=this.getSelectorGroup();ss(e,function(u){var f=u.type,c=new Ce({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){a.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(c);var h=n.getModel("selectorLabel"),v=n.getModel(["emphasis","selectorLabel"]);Nr(c,{normal:h,emphasis:v},{defaultText:u.title}),Co(c)})},t.prototype._createItem=function(e,n,a,i,o,s,l,u,f,c,h){var v=e.visualDrawType,d=o.get("itemWidth"),p=o.get("itemHeight"),g=o.isSelected(n),m=i.get("symbolRotate"),y=i.get("symbolKeepAspect"),_=i.get("icon");f=_||f||"roundRect";var S=zw(f,i,l,u,v,g,h),b=new ca,x=i.getModel("textStyle");if(X(e.getLegendIcon)&&(!_||_==="inherit"))b.add(e.getLegendIcon({itemWidth:d,itemHeight:p,icon:f,iconRotate:m,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:y}));else{var C=_==="inherit"&&e.getData().getVisual("symbol")?m==="inherit"?e.getData().getVisual("symbolRotate"):m:0;b.add(Fw({itemWidth:d,itemHeight:p,icon:f,iconRotate:C,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:y}))}var T=s==="left"?d+5:-5,D=s,A=o.get("formatter"),I=n;G(A)&&A?I=A.replace("{name}",n??""):X(A)&&(I=A(n));var M=g?x.getTextColor():i.get("inactiveColor");b.add(new Ce({style:Ft(x,{text:I,x:T,y:p/2,fill:M,align:D,verticalAlign:"middle"},{inheritColor:M})}));var L=new he({shape:b.getBoundingRect(),style:{fill:"transparent"}}),P=i.getModel("tooltip");return P.get("show")&&Ka({el:L,componentModel:o,itemName:n,itemTooltipOption:P.option}),b.add(L),b.eachChild(function(R){R.silent=!0}),L.silent=!c,this.getContentGroup().add(b),Co(b),b.__legendDataIndex=a,b},t.prototype.layoutInner=function(e,n,a,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Cr(e.get("orient"),l,e.get("itemGap"),a.width,a.height);var f=l.getBoundingRect(),c=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){Cr("horizontal",u,e.get("selectorItemGap",!0));var h=u.getBoundingRect(),v=[-h.x,-h.y],d=e.get("selectorButtonGap",!0),p=e.getOrient().index,g=p===0?"width":"height",m=p===0?"height":"width",y=p===0?"y":"x";s==="end"?v[p]+=f[g]+d:c[p]+=h[g]+d,v[1-p]+=f[m]/2-h[m]/2,u.x=v[0],u.y=v[1],l.x=c[0],l.y=c[1];var _={x:0,y:0};return _[g]=f[g]+d+h[g],_[m]=Math.max(f[m],h[m]),_[y]=Math.min(0,h[y]+v[1-p]),_}else return l.x=c[0],l.y=c[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(Ne);function zw(r,t,e,n,a,i,o){function s(g,m){g.lineWidth==="auto"&&(g.lineWidth=m.lineWidth>0?2:0),ss(g,function(y,_){g[_]==="inherit"&&(g[_]=m[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",c=l.getShallow("decal");u.decal=!c||c==="inherit"?n.decal:zo(c,o),u.fill==="inherit"&&(u.fill=n[a]),u.stroke==="inherit"&&(u.stroke=n[f]),u.opacity==="inherit"&&(u.opacity=(a==="fill"?n:e).opacity),s(u,n);var h=t.getModel("lineStyle"),v=h.getLineStyle();if(s(v,e),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),v.stroke==="auto"&&(v.stroke=n.fill),!i){var d=t.get("inactiveBorderWidth"),p=u[f];u.lineWidth=d==="auto"?n.lineWidth>0&&p?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),v.stroke=h.get("inactiveColor"),v.lineWidth=h.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function Fw(r){var t=r.icon||"roundRect",e=Wt(t,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return e.setStyle(r.itemStyle),e.rotation=(r.iconRotate||0)*Math.PI/180,e.setOrigin([r.itemWidth/2,r.itemHeight/2]),t.indexOf("empty")>-1&&(e.style.stroke=e.style.fill,e.style.fill="#fff",e.style.lineWidth=2),e}function ec(r,t,e,n){us(r,t,e,n),e.dispatchAction({type:"legendToggleSelect",name:r??t}),ls(r,t,e,n)}function gp(r){for(var t=r.getZr().storage.getDisplayList(),e,n=0,a=t.length;n<a&&!(e=t[n].states.emphasis);)n++;return e&&e.hoverLayer}function ls(r,t,e,n){gp(e)||e.dispatchAction({type:"highlight",seriesName:r,name:t,excludeSeriesId:n})}function us(r,t,e,n){gp(e)||e.dispatchAction({type:"downplay",seriesName:r,name:t,excludeSeriesId:n})}function Gw(r){var t=r.findComponents({mainType:"legend"});t&&t.length&&r.filterSeries(function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0})}function an(r,t,e){var n={},a=r==="toggleSelected",i;return e.eachComponent("legend",function(o){a&&i!=null?o[i?"select":"unSelect"](t.name):r==="allSelect"||r==="inverseSelect"?o[r]():(o[r](t.name),i=o.isSelected(t.name));var s=o.getData();w(s,function(l){var u=l.get("name");if(!(u===`
|
||
`||u==="")){var f=o.isSelected(u);n.hasOwnProperty(u)?n[u]=n[u]&&f:n[u]=f}})}),r==="allSelect"||r==="inverseSelect"?{selected:n}:{name:t.name,selected:n}}function Ww(r){r.registerAction("legendToggleSelect","legendselectchanged",J(an,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",J(an,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",J(an,"inverseSelect")),r.registerAction("legendSelect","legendselected",J(an,"select")),r.registerAction("legendUnSelect","legendunselected",J(an,"unSelect"))}function mp(r){r.registerComponentModel(os),r.registerComponentView(pp),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,Gw),r.registerSubTypeDefaulter("legend",function(){return"plain"}),Ww(r)}var Hw=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(e,n,a){var i=ni(e);r.prototype.init.call(this,e,n,a),tc(this,e,i)},t.prototype.mergeOption=function(e,n){r.prototype.mergeOption.call(this,e,n),tc(this,this.option,e)},t.type="legend.scroll",t.defaultOption=Is(os.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}),t}(os);function tc(r,t,e){var n=r.getOrient(),a=[1,1];a[n.index]=0,Lr(t,e,{type:"box",ignoreSize:!!a})}var rc=ge,Ji=["width","height"],eo=["x","y"],Uw=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!0,e._currentIndex=0,e}return t.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new rc),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new rc)},t.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(e,n,a,i,o,s,l){var u=this;r.prototype.renderInner.call(this,e,n,a,i,o,s,l);var f=this._controllerGroup,c=n.get("pageIconSize",!0),h=N(c)?c:[c,c];d("pagePrev",0);var v=n.getModel("pageTextStyle");f.add(new Ce({name:"pageText",style:{text:"xx/xx",fill:v.getTextColor(),font:v.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),d("pageNext",1);function d(p,g){var m=p+"DataIndex",y=$a(n.get("pageIcons",!0)[n.getOrient().name][g],{onclick:oe(u._pageGo,u,m,n,i)},{x:-h[0]/2,y:-h[1]/2,width:h[0],height:h[1]});y.name=p,f.add(y)}},t.prototype.layoutInner=function(e,n,a,i,o,s){var l=this.getSelectorGroup(),u=e.getOrient().index,f=Ji[u],c=eo[u],h=Ji[1-u],v=eo[1-u];o&&Cr("horizontal",l,e.get("selectorItemGap",!0));var d=e.get("selectorButtonGap",!0),p=l.getBoundingRect(),g=[-p.x,-p.y],m=$(a);o&&(m[f]=a[f]-p[f]-d);var y=this._layoutContentAndController(e,i,m,u,f,h,v,c);if(o){if(s==="end")g[u]+=y[f]+d;else{var _=p[f]+d;g[u]-=_,y[c]-=_}y[f]+=p[f]+d,g[1-u]+=y[v]+y[h]/2-p[h]/2,y[h]=Math.max(y[h],p[h]),y[v]=Math.min(y[v],p[v]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return y},t.prototype._layoutContentAndController=function(e,n,a,i,o,s,l,u){var f=this.getContentGroup(),c=this._containerGroup,h=this._controllerGroup;Cr(e.get("orient"),f,e.get("itemGap"),i?a.width:null,i?null:a.height),Cr("horizontal",h,e.get("pageButtonItemGap",!0));var v=f.getBoundingRect(),d=h.getBoundingRect(),p=this._showController=v[o]>a[o],g=[-v.x,-v.y];n||(g[i]=f[u]);var m=[0,0],y=[-d.x,-d.y],_=ie(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(p){var S=e.get("pageButtonPosition",!0);S==="end"?y[i]+=a[o]-d[o]:m[i]+=d[o]+_}y[1-i]+=v[s]/2-d[s]/2,f.setPosition(g),c.setPosition(m),h.setPosition(y);var b={x:0,y:0};if(b[o]=p?a[o]:v[o],b[s]=Math.max(v[s],d[s]),b[l]=Math.min(0,d[l]+y[1-i]),c.__rectSize=a[o],p){var x={x:0,y:0};x[o]=Math.max(a[o]-d[o]-_,0),x[s]=b[s],c.setClipPath(new he({shape:x})),c.__rectSize=x[o]}else h.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var C=this._getPageInfo(e);return C.pageIndex!=null&&me(f,{x:C.contentPosition[0],y:C.contentPosition[1]},p?e:null),this._updatePageInfoView(e,C),b},t.prototype._pageGo=function(e,n,a){var i=this._getPageInfo(n)[e];i!=null&&a.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:n.id})},t.prototype._updatePageInfoView=function(e,n){var a=this._controllerGroup;w(["pagePrev","pageNext"],function(f){var c=f+"DataIndex",h=n[c]!=null,v=a.childOfName(f);v&&(v.setStyle("fill",h?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),v.cursor=h?"pointer":"default")});var i=a.childOfName("pageText"),o=e.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;i&&o&&i.setStyle("text",G(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var n=e.get("scrollDataIndex",!0),a=this.getContentGroup(),i=this._containerGroup.__rectSize,o=e.getOrient().index,s=Ji[o],l=eo[o],u=this._findTargetItemIndex(n),f=a.children(),c=f[u],h=f.length,v=h?1:0,d={contentPosition:[a.x,a.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return d;var p=S(c);d.contentPosition[o]=-p.s;for(var g=u+1,m=p,y=p,_=null;g<=h;++g)_=S(f[g]),(!_&&y.e>m.s+i||_&&!b(_,m.s))&&(y.i>m.i?m=y:m=_,m&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=m.i),++d.pageCount)),y=_;for(var g=u-1,m=p,y=p,_=null;g>=-1;--g)_=S(f[g]),(!_||!b(y,_.s))&&m.i<y.i&&(y=m,d.pagePrevDataIndex==null&&(d.pagePrevDataIndex=m.i),++d.pageCount,++d.pageIndex),m=_;return d;function S(x){if(x){var C=x.getBoundingRect(),T=C[l]+x[l];return{s:T,e:T+C[s],i:x.__legendDataIndex}}}function b(x,C){return x.e>=C&&x.s<=C+i}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var n,a=this.getContentGroup(),i;return a.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===e&&(n=s)}),n??i},t.type="legend.scroll",t}(pp);function Yw(r){r.registerAction("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;n!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(a){a.setScrollDataIndex(n)})})}function Xw(r){St(mp),r.registerComponentModel(Hw),r.registerComponentView(Uw),Yw(r)}function K1(r){St(mp),St(Xw)}var Zw={label:{enabled:!0},decal:{show:!1}},nc=ue(),$w={};function Kw(r,t){var e=r.getModel("aria");if(!e.get("enabled"))return;var n=$(Zw);K(n.label,r.getLocaleModel().get("aria"),!1),K(e.option,n,!1),a(),i();function a(){var u=e.getModel("decal"),f=u.get("show");if(f){var c=U();r.eachSeries(function(h){if(!h.isColorBySeries()){var v=c.get(h.type);v||(v={},c.set(h.type,v)),nc(h).scope=v}}),r.eachRawSeries(function(h){if(r.isSeriesFiltered(h))return;if(X(h.enableAriaDecal)){h.enableAriaDecal();return}var v=h.getData();if(h.isColorBySeries()){var y=Ql(h.ecModel,h.name,$w,r.getSeriesCount()),_=v.getVisual("decal");v.setVisual("decal",S(_,y))}else{var d=h.getRawData(),p={},g=nc(h).scope;v.each(function(b){var x=v.getRawIndex(b);p[x]=b});var m=d.count();d.each(function(b){var x=p[b],C=d.getName(b)||b+"",T=Ql(h.ecModel,C,g,m),D=v.getItemVisual(x,"decal");v.setItemVisual(x,"decal",S(D,T))})}function S(b,x){var C=b?B(B({},x),b):x;return C.dirty=!0,C}})}}function i(){var u=r.getLocaleModel().get("aria"),f=e.getModel("label");if(f.option=re(f.option,u),!!f.get("enabled")){var c=t.getZr().dom;if(f.get("description")){c.setAttribute("aria-label",f.get("description"));return}var h=r.getSeriesCount(),v=f.get(["data","maxCount"])||10,d=f.get(["series","maxCount"])||10,p=Math.min(h,d),g;if(!(h<1)){var m=s();if(m){var y=f.get(["general","withTitle"]);g=o(y,{title:m})}else g=f.get(["general","withoutTitle"]);var _=[],S=h>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);g+=o(S,{seriesCount:h}),r.eachSeries(function(T,D){if(D<p){var A=void 0,I=T.get("name"),M=I?"withName":"withoutName";A=h>1?f.get(["series","multiple",M]):f.get(["series","single",M]),A=o(A,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var L=T.getData();if(L.count()>v){var P=f.get(["data","partialData"]);A+=o(P,{displayCnt:v})}else A+=f.get(["data","allData"]);for(var R=f.get(["data","separator","middle"]),O=f.get(["data","separator","end"]),W=[],k=0;k<L.count();k++)if(k<v){var E=L.getName(k),z=L.getValues(k),H=f.get(["data",E?"withName":"withoutName"]);W.push(o(H,{name:E,value:z.join(R)}))}A+=W.join(R)+O,_.push(A)}});var b=f.getModel(["series","multiple","separator"]),x=b.get("middle"),C=b.get("end");g+=_.join(x)+C,c.setAttribute("aria-label",g)}}}function o(u,f){if(!G(u))return u;var c=u;return w(f,function(h,v){c=c.replace(new RegExp("\\{\\s*"+v+"\\s*\\}","g"),h)}),c}function s(){var u=r.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){var f=r.getLocaleModel().get(["series","typeNames"]);return f[u]||f.chart}}function qw(r){if(!(!r||!r.aria)){var t=r.aria;t.show!=null&&(t.enabled=t.show),t.label=t.label||{},w(["description","general","series","data"],function(e){t[e]!=null&&(t.label[e]=t[e])})}}function q1(r){r.registerPreprocessor(qw),r.registerVisual(r.PRIORITY.VISUAL.ARIA,Kw)}var ac={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},jw=function(){function r(t){var e=this._condVal=G(t)?new RegExp(t):gg(t)?t:null;if(e==null){var n="";Q(n)}}return r.prototype.evaluate=function(t){var e=typeof t;return G(e)?this._condVal.test(t):le(e)?this._condVal.test(t+""):!1},r}(),Qw=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),Jw=function(){function r(){}return r.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(!t[e].evaluate())return!1;return!0},r}(),eC=function(){function r(){}return r.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(t[e].evaluate())return!0;return!1},r}(),tC=function(){function r(){}return r.prototype.evaluate=function(){return!this.child.evaluate()},r}(),rC=function(){function r(){}return r.prototype.evaluate=function(){for(var t=!!this.valueParser,e=this.getValue,n=e(this.valueGetterParam),a=t?this.valueParser(n):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(t?a:n))return!1;return!0},r}();function dl(r,t){if(r===!0||r===!1){var e=new Qw;return e.value=r,e}var n="";return yp(r)||Q(n),r.and?ic("and",r,t):r.or?ic("or",r,t):r.not?nC(r,t):aC(r,t)}function ic(r,t,e){var n=t[r],a="";N(n)||Q(a),n.length||Q(a);var i=r==="and"?new Jw:new eC;return i.children=F(n,function(o){return dl(o,e)}),i.children.length||Q(a),i}function nC(r,t){var e=r.not,n="";yp(e)||Q(n);var a=new tC;return a.child=dl(e,t),a.child||Q(n),a}function aC(r,t){for(var e="",n=t.prepareGetValue(r),a=[],i=ze(r),o=r.parser,s=o?fh(o):null,l=0;l<i.length;l++){var u=i[l];if(!(u==="parser"||t.valueGetterAttrMap.get(u))){var f=mt(ac,u)?ac[u]:u,c=r[u],h=s?s(c):c,v=Qy(f,h)||f==="reg"&&new jw(h);v||Q(e),a.push(v)}}a.length||Q(e);var d=new rC;return d.valueGetterParam=n,d.valueParser=s,d.getValue=t.getValue,d.subCondList=a,d}function yp(r){return Y(r)&&!On(r)}var iC=function(){function r(t,e){this._cond=dl(t,e)}return r.prototype.evaluate=function(){return this._cond.evaluate()},r}();function oC(r,t){return new iC(r,t)}var sC={type:"echarts:filter",transform:function(r){for(var t=r.upstream,e,n=oC(r.config,{valueGetterAttrMap:U({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;mt(s,"dimension")||Q(l);var f=t.getDimensionInfo(u);return f||Q(l),{dimIdx:f.index}},getValue:function(s){return t.retrieveValueFromItem(e,s.dimIdx)}}),a=[],i=0,o=t.count();i<o;i++)e=t.getRawDataItem(i),n.evaluate()&&a.push(e);return{data:a}}},lC={type:"echarts:sort",transform:function(r){var t=r.upstream,e=r.config,n="",a=de(e);a.length||Q(n);var i=[];w(a,function(f){var c=f.dimension,h=f.order,v=f.parser,d=f.incomparable;if(c==null&&Q(n),h!=="asc"&&h!=="desc"&&Q(n),d&&d!=="min"&&d!=="max"){var p="";Q(p)}if(h!=="asc"&&h!=="desc"){var g="";Q(g)}var m=t.getDimensionInfo(c);m||Q(n);var y=v?fh(v):null;v&&!y&&Q(n),i.push({dimIdx:m.index,parser:y,comparator:new vh(h,d)})});var o=t.sourceFormat;o!==Ee&&o!==$e&&Q(n);for(var s=[],l=0,u=t.count();l<u;l++)s.push(t.getRawDataItem(l));return s.sort(function(f,c){for(var h=0;h<i.length;h++){var v=i[h],d=t.retrieveValueFromItem(f,v.dimIdx),p=t.retrieveValueFromItem(c,v.dimIdx);v.parser&&(d=v.parser(d),p=v.parser(p));var g=v.comparator.evaluate(d,p);if(g!==0)return g}return 0}),{data:s}}};function j1(r){r.registerTransform(sC),r.registerTransform(lC)}var uC=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataset",e}return t.prototype.init=function(e,n,a){r.prototype.init.call(this,e,n,a),this._sourceManager=new gh(this),_u(this)},t.prototype.mergeOption=function(e,n){r.prototype.mergeOption.call(this,e,n),_u(this)},t.prototype.optionUpdated=function(){this._sourceManager.dirty()},t.prototype.getSourceManager=function(){return this._sourceManager},t.type="dataset",t.defaultOption={seriesLayoutBy:st},t}(ee),fC=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataset",e}return t.type="dataset",t}(Ne);function Q1(r){r.registerComponentModel(uC),r.registerComponentView(fC)}var cC=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e){return si(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var n=new ge,a=Wt("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);n.add(a),a.setStyle(e.lineStyle);var i=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=i==="none"?"circle":i,l=e.itemHeight*.8,u=Wt(s,(e.itemWidth-l)/2,(e.itemHeight-l)/2,l,l,e.itemStyle.fill);n.add(u),u.setStyle(e.itemStyle);var f=e.iconRotate==="inherit"?o:e.iconRotate||0;return u.rotation=f*Math.PI/180,u.setOrigin([e.itemWidth/2,e.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),n},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},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,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(Ve);function _p(r,t,e){var n=r.getBaseAxis(),a=r.getOtherAxis(n),i=vC(a,e),o=n.dim,s=a.dim,l=t.mapDimension(s),u=t.mapDimension(o),f=s==="x"||s==="radius"?1:0,c=F(r.dimensions,function(d){return t.mapDimension(d)}),h=!1,v=t.getCalculationInfo("stackResultDimension");return Rr(t,c[0])&&(h=!0,c[0]=v),Rr(t,c[1])&&(h=!0,c[1]=v),{dataDimsForPoint:c,valueStart:i,valueAxisDim:s,baseAxisDim:o,stacked:!!h,valueDim:l,baseDim:u,baseDataOffset:f,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function vC(r,t){var e=0,n=r.scale.getExtent();return t==="start"?e=n[0]:t==="end"?e=n[1]:le(t)&&!isNaN(t)?e=t:n[0]>0?e=n[0]:n[1]<0&&(e=n[1]),e}function Sp(r,t,e,n){var a=NaN;r.stacked&&(a=e.get(e.getCalculationInfo("stackedOverDimension"),n)),isNaN(a)&&(a=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=e.get(r.baseDim,n),o[1-i]=a,t.dataToPoint(o)}function hC(r,t){var e=[];return t.diff(r).add(function(n){e.push({cmd:"+",idx:n})}).update(function(n,a){e.push({cmd:"=",idx:a,idx1:n})}).remove(function(n){e.push({cmd:"-",idx:n})}).execute(),e}function dC(r,t,e,n,a,i,o,s){for(var l=hC(r,t),u=[],f=[],c=[],h=[],v=[],d=[],p=[],g=_p(a,t,o),m=r.getLayout("points")||[],y=t.getLayout("points")||[],_=0;_<l.length;_++){var S=l[_],b=!0,x=void 0,C=void 0;switch(S.cmd){case"=":x=S.idx*2,C=S.idx1*2;var T=m[x],D=m[x+1],A=y[C],I=y[C+1];(isNaN(T)||isNaN(D))&&(T=A,D=I),u.push(T,D),f.push(A,I),c.push(e[x],e[x+1]),h.push(n[C],n[C+1]),p.push(t.getRawIndex(S.idx1));break;case"+":var M=S.idx,L=g.dataDimsForPoint,P=a.dataToPoint([t.get(L[0],M),t.get(L[1],M)]);C=M*2,u.push(P[0],P[1]),f.push(y[C],y[C+1]);var R=Sp(g,a,t,M);c.push(R[0],R[1]),h.push(n[C],n[C+1]),p.push(t.getRawIndex(M));break;case"-":b=!1}b&&(v.push(S),d.push(d.length))}d.sort(function(xe,ye){return p[xe]-p[ye]});for(var O=u.length,W=at(O),k=at(O),E=at(O),z=at(O),H=[],_=0;_<d.length;_++){var q=d[_],j=_*2,ne=q*2;W[j]=u[ne],W[j+1]=u[ne+1],k[j]=f[ne],k[j+1]=f[ne+1],E[j]=c[ne],E[j+1]=c[ne+1],z[j]=h[ne],z[j+1]=h[ne+1],H[_]=v[q]}return{current:W,next:k,stackedOnCurrent:E,stackedOnNext:z,status:H}}var Lt=Math.min,Pt=Math.max;function Jt(r,t){return isNaN(r)||isNaN(t)}function fs(r,t,e,n,a,i,o,s,l){for(var u,f,c,h,v,d,p=e,g=0;g<n;g++){var m=t[p*2],y=t[p*2+1];if(p>=a||p<0)break;if(Jt(m,y)){if(l){p+=i;continue}break}if(p===e)r[i>0?"moveTo":"lineTo"](m,y),c=m,h=y;else{var _=m-u,S=y-f;if(_*_+S*S<.5){p+=i;continue}if(o>0){for(var b=p+i,x=t[b*2],C=t[b*2+1];x===m&&C===y&&g<n;)g++,b+=i,p+=i,x=t[b*2],C=t[b*2+1],m=t[p*2],y=t[p*2+1],_=m-u,S=y-f;var T=g+1;if(l)for(;Jt(x,C)&&T<n;)T++,b+=i,x=t[b*2],C=t[b*2+1];var D=.5,A=0,I=0,M=void 0,L=void 0;if(T>=n||Jt(x,C))v=m,d=y;else{A=x-u,I=C-f;var P=m-u,R=x-m,O=y-f,W=C-y,k=void 0,E=void 0;if(s==="x"){k=Math.abs(P),E=Math.abs(R);var z=A>0?1:-1;v=m-z*k*o,d=y,M=m+z*E*o,L=y}else if(s==="y"){k=Math.abs(O),E=Math.abs(W);var H=I>0?1:-1;v=m,d=y-H*k*o,M=m,L=y+H*E*o}else k=Math.sqrt(P*P+O*O),E=Math.sqrt(R*R+W*W),D=E/(E+k),v=m-A*o*(1-D),d=y-I*o*(1-D),M=m+A*o*D,L=y+I*o*D,M=Lt(M,Pt(x,m)),L=Lt(L,Pt(C,y)),M=Pt(M,Lt(x,m)),L=Pt(L,Lt(C,y)),A=M-m,I=L-y,v=m-A*k/E,d=y-I*k/E,v=Lt(v,Pt(u,m)),d=Lt(d,Pt(f,y)),v=Pt(v,Lt(u,m)),d=Pt(d,Lt(f,y)),A=m-v,I=y-d,M=m+A*E/k,L=y+I*E/k}r.bezierCurveTo(c,h,v,d,m,y),c=M,h=L}else r.lineTo(m,y)}u=m,f=y,p+=i}return g}var xp=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),pC=function(r){V(t,r);function t(e){var n=r.call(this,e)||this;return n.type="ec-polyline",n}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new xp},t.prototype.buildPath=function(e,n){var a=n.points,i=0,o=a.length/2;if(n.connectNulls){for(;o>0&&Jt(a[o*2-2],a[o*2-1]);o--);for(;i<o&&Jt(a[i*2],a[i*2+1]);i++);}for(;i<o;)i+=fs(e,a,i,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},t.prototype.getPointOn=function(e,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var a=this.path,i=a.data,o=Kc.CMD,s,l,u=n==="x",f=[],c=0;c<i.length;){var h=i[c++],v=void 0,d=void 0,p=void 0,g=void 0,m=void 0,y=void 0,_=void 0;switch(h){case o.M:s=i[c++],l=i[c++];break;case o.L:if(v=i[c++],d=i[c++],_=u?(e-s)/(v-s):(e-l)/(d-l),_<=1&&_>=0){var S=u?(d-l)*_+l:(v-s)*_+s;return u?[e,S]:[S,e]}s=v,l=d;break;case o.C:v=i[c++],d=i[c++],p=i[c++],g=i[c++],m=i[c++],y=i[c++];var b=u?wl(s,v,p,m,e,f):wl(l,d,g,y,e,f);if(b>0)for(var x=0;x<b;x++){var C=f[x];if(C<=1&&C>=0){var S=u?Cl(l,d,g,y,C):Cl(s,v,p,m,C);return u?[e,S]:[S,e]}}s=m,l=y;break}}},t}(Se),gC=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t}(xp),mC=function(r){V(t,r);function t(e){var n=r.call(this,e)||this;return n.type="ec-polygon",n}return t.prototype.getDefaultShape=function(){return new gC},t.prototype.buildPath=function(e,n){var a=n.points,i=n.stackedOnPoints,o=0,s=a.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Jt(a[s*2-2],a[s*2-1]);s--);for(;o<s&&Jt(a[o*2],a[o*2+1]);o++);}for(;o<s;){var u=fs(e,a,o,s,s,1,n.smooth,l,n.connectNulls);fs(e,i,o+u-1,u,s,-1,n.stackedOnSmooth,l,n.connectNulls),o+=u+1,e.closePath()}},t}(Se);function bp(r,t,e,n,a){var i=r.getArea(),o=i.x,s=i.y,l=i.width,u=i.height,f=e.get(["lineStyle","width"])||2;o-=f/2,s-=f/2,l+=f,u+=f,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var c=new he({shape:{x:o,y:s,width:l,height:u}});if(t){var h=r.getBaseAxis(),v=h.isHorizontal(),d=h.inverse;v?(d&&(c.shape.x+=l),c.shape.width=0):(d||(c.shape.y+=u),c.shape.height=0);var p=X(a)?function(g){a(g,c)}:null;De(c,{shape:{width:l,height:u,x:o,y:s}},e,null,n,p)}return c}function wp(r,t,e){var n=r.getArea(),a=_e(n.r0,1),i=_e(n.r,1),o=new or({shape:{cx:_e(r.cx,1),cy:_e(r.cy,1),r0:a,r:i,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(t){var s=r.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=a,De(o,{shape:{endAngle:n.endAngle,r:i}},e)}return o}function pl(r,t,e,n,a){if(r){if(r.type==="polar")return wp(r,t,e);if(r.type==="cartesian2d")return bp(r,t,e,n,a)}else return null;return null}function oc(r,t){if(r.length===t.length){for(var e=0;e<r.length;e++)if(r[e]!==t[e])return;return!0}}function sc(r){for(var t=1/0,e=1/0,n=-1/0,a=-1/0,i=0;i<r.length;){var o=r[i++],s=r[i++];isNaN(o)||(t=Math.min(o,t),n=Math.max(o,n)),isNaN(s)||(e=Math.min(s,e),a=Math.max(s,a))}return[[t,e],[n,a]]}function lc(r,t){var e=sc(r),n=e[0],a=e[1],i=sc(t),o=i[0],s=i[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(a[0]-s[0]),Math.abs(a[1]-s[1]))}function uc(r){return le(r)?r:r?.5:0}function yC(r,t,e){if(!e.valueDim)return[];for(var n=t.count(),a=at(n*2),i=0;i<n;i++){var o=Sp(e,r,t,i);a[i*2]=o[0],a[i*2+1]=o[1]}return a}function Rt(r,t,e,n){var a=t.getBaseAxis(),i=a.dim==="x"||a.dim==="radius"?0:1,o=[],s=0,l=[],u=[],f=[],c=[];if(n){for(s=0;s<r.length;s+=2)!isNaN(r[s])&&!isNaN(r[s+1])&&c.push(r[s],r[s+1]);r=c}for(s=0;s<r.length-2;s+=2)switch(f[0]=r[s+2],f[1]=r[s+3],u[0]=r[s],u[1]=r[s+1],o.push(u[0],u[1]),e){case"end":l[i]=f[i],l[1-i]=u[1-i],o.push(l[0],l[1]);break;case"middle":var h=(u[i]+f[i])/2,v=[];l[i]=v[i]=h,l[1-i]=u[1-i],v[1-i]=f[1-i],o.push(l[0],l[1]),o.push(v[0],v[1]);break;default:l[i]=u[i],l[1-i]=f[1-i],o.push(l[0],l[1])}return o.push(r[s++],r[s++]),o}function _C(r,t){var e=[],n=r.length,a,i;function o(f,c,h){var v=f.coord,d=(h-v)/(c.coord-v),p=mg(d,[f.color,c.color]);return{coord:h,color:p}}for(var s=0;s<n;s++){var l=r[s],u=l.coord;if(u<0)a=l;else if(u>t){i?e.push(o(i,l,t)):a&&e.push(o(a,l,0),o(a,l,t));break}else a&&(e.push(o(a,l,0)),a=null),e.push(l),i=l}return e}function SC(r,t,e){var n=r.getVisual("visualMeta");if(!(!n||!n.length||!r.count())&&t.type==="cartesian2d"){for(var a,i,o=n.length-1;o>=0;o--){var s=r.getDimensionInfo(n[o].dimension);if(a=s&&s.coordDim,a==="x"||a==="y"){i=n[o];break}}if(i){var l=t.getAxis(a),u=F(i.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,c=i.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),c.reverse());var h=_C(u,a==="x"?e.getWidth():e.getHeight()),v=h.length;if(!v&&f)return u[0].coord<0?c[1]?c[1]:u[f-1].color:c[0]?c[0]:u[0].color;var d=10,p=h[0].coord-d,g=h[v-1].coord+d,m=g-p;if(m<.001)return"transparent";w(h,function(_){_.offset=(_.coord-p)/m}),h.push({offset:v?h[v-1].offset:.5,color:c[1]||"transparent"}),h.unshift({offset:v?h[0].offset:.5,color:c[0]||"transparent"});var y=new Zc(0,0,0,0,h,!0);return y[a]=p,y[a+"2"]=g,y}}}function xC(r,t,e){var n=r.get("showAllSymbol"),a=n==="auto";if(!(n&&!a)){var i=e.getAxesByScale("ordinal")[0];if(i&&!(a&&bC(i,t))){var o=t.mapDimension(i.dim),s={};return w(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function bC(r,t){var e=r.getExtent(),n=Math.abs(e[1]-e[0])/r.scale.count();isNaN(n)&&(n=0);for(var a=t.count(),i=Math.max(1,Math.round(a/5)),o=0;o<a;o+=i)if(vl.getSymbolSize(t,o)[r.isHorizontal()?1:0]*1.5>n)return!1;return!0}function wC(r,t){return isNaN(r)||isNaN(t)}function CC(r){for(var t=r.length/2;t>0&&wC(r[t*2-2],r[t*2-1]);t--);return t-1}function fc(r,t){return[r[t*2],r[t*2+1]]}function TC(r,t,e){for(var n=r.length/2,a=e==="x"?0:1,i,o,s=0,l=-1,u=0;u<n;u++)if(o=r[u*2+a],!(isNaN(o)||isNaN(r[u*2+1-a]))){if(u===0){i=o;continue}if(i<=t&&o>=t||i>=t&&o<=t){l=u;break}s=u,i=o}return{range:[s,l],t:(t-i)/(o-i)}}function Cp(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t<Xe.length;t++)if(r.get([Xe[t],"endLabel","show"]))return!0;return!1}function to(r,t,e,n){if(hl(t,"cartesian2d")){var a=n.getModel("endLabel"),i=a.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=Cp(n)?function(v,d){r._endLabelOnDuring(v,d,o,s,i,a,t)}:null,u=t.getBaseAxis().isHorizontal(),f=bp(t,e,n,function(){var v=r._endLabel;v&&e&&s.originalX!=null&&v.attr({x:s.originalX,y:s.originalY})},l);if(!n.get("clip",!0)){var c=f.shape,h=Math.max(c.width,c.height);u?(c.y-=h,c.height+=h*2):(c.x-=h,c.width+=h*2)}return l&&l(1,f),f}else return wp(t,e,n)}function DC(r,t){var e=t.getBaseAxis(),n=e.isHorizontal(),a=e.inverse,i=n?a?"right":"left":"center",o=n?"middle":a?"top":"bottom";return{normal:{align:r.get("align")||i,verticalAlign:r.get("verticalAlign")||o}}}var AC=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(){var e=new ge,n=new dp;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=e},t.prototype.render=function(e,n,a){var i=this,o=e.coordinateSystem,s=this.group,l=e.getData(),u=e.getModel("lineStyle"),f=e.getModel("areaStyle"),c=l.getLayout("points")||[],h=o.type==="polar",v=this._coordSys,d=this._symbolDraw,p=this._polyline,g=this._polygon,m=this._lineGroup,y=!n.ssr&&e.get("animation"),_=!f.isEmpty(),S=f.get("origin"),b=_p(o,l,S),x=_&&yC(o,l,b),C=e.get("showSymbol"),T=e.get("connectNulls"),D=C&&!h&&xC(e,l,o),A=this._data;A&&A.eachItemGraphicEl(function(ye,wt){ye.__temp&&(s.remove(ye),A.setItemGraphicEl(wt,null))}),C||d.remove(),s.add(m);var I=h?!1:e.get("step"),M;o&&o.getArea&&e.get("clip",!0)&&(M=o.getArea(),M.width!=null?(M.x-=.1,M.y-=.1,M.width+=.2,M.height+=.2):M.r0&&(M.r0-=.5,M.r+=.5)),this._clipShapeForSymbol=M;var L=SC(l,o,a)||l.getVisual("style")[l.getVisual("drawType")];if(!(p&&v.type===o.type&&I===this._step))C&&d.updateData(l,{isIgnore:D,clipShape:M,disableAnimation:!0,getSymbolPoint:function(ye){return[c[ye*2],c[ye*2+1]]}}),y&&this._initSymbolLabelAnimation(l,o,M),I&&(c=Rt(c,o,I,T),x&&(x=Rt(x,o,I,T))),p=this._newPolyline(c),_?g=this._newPolygon(c,x):g&&(m.remove(g),g=this._polygon=null),h||this._initOrUpdateEndLabel(e,o,nr(L)),m.setClipPath(to(this,o,!0,e));else{_&&!g?g=this._newPolygon(c,x):g&&!_&&(m.remove(g),g=this._polygon=null),h||this._initOrUpdateEndLabel(e,o,nr(L));var P=m.getClipPath();if(P){var R=to(this,o,!1,e);De(P,{shape:R.shape},e)}else m.setClipPath(to(this,o,!0,e));C&&d.updateData(l,{isIgnore:D,clipShape:M,disableAnimation:!0,getSymbolPoint:function(ye){return[c[ye*2],c[ye*2+1]]}}),(!oc(this._stackedOnPoints,x)||!oc(this._points,c))&&(y?this._doUpdateAnimation(l,x,o,a,I,S,T):(I&&(c=Rt(c,o,I,T),x&&(x=Rt(x,o,I,T))),p.setShape({points:c}),g&&g.setShape({points:c,stackedOnPoints:x})))}var O=e.getModel("emphasis"),W=O.get("focus"),k=O.get("blurScope"),E=O.get("disabled");if(p.useStyle(re(u.getLineStyle(),{fill:"none",stroke:L,lineJoin:"bevel"})),bn(p,e,"lineStyle"),p.style.lineWidth>0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var z=p.getState("emphasis").style;z.lineWidth=+p.style.lineWidth+1}Z(p).seriesIndex=e.seriesIndex,Mr(p,W,k,E);var H=uc(e.get("smooth")),q=e.get("smoothMonotone");if(p.setShape({smooth:H,smoothMonotone:q,connectNulls:T}),g){var j=l.getCalculationInfo("stackedOnSeries"),ne=0;g.useStyle(re(f.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),j&&(ne=uc(j.get("smooth"))),g.setShape({smooth:H,stackedOnSmooth:ne,smoothMonotone:q,connectNulls:T}),bn(g,e,"areaStyle"),Z(g).seriesIndex=e.seriesIndex,Mr(g,W,k,E)}var xe=function(ye){i._changePolyState(ye)};l.eachItemGraphicEl(function(ye){ye&&(ye.onHoverStateChange=xe)}),this._polyline.onHoverStateChange=xe,this._data=l,this._coordSys=o,this._stackedOnPoints=x,this._points=c,this._step=I,this._valueOrigin=S,e.get("triggerLineEvent")&&(this.packEventData(e,p),g&&this.packEventData(e,g))},t.prototype.packEventData=function(e,n){Z(n).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,n,a,i){var o=e.getData(),s=rr(o,i);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var f=l[s*2],c=l[s*2+1];if(isNaN(f)||isNaN(c)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,c))return;var h=e.get("zlevel")||0,v=e.get("z")||0;u=new vl(o,s),u.x=f,u.y=c,u.setZ(h,v);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=h,d.z=v,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else ke.prototype.highlight.call(this,e,n,a,i)},t.prototype.downplay=function(e,n,a,i){var o=e.getData(),s=rr(o,i);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else ke.prototype.downplay.call(this,e,n,a,i)},t.prototype._changePolyState=function(e){var n=this._polygon;Rl(this._polyline,e),n&&Rl(n,e)},t.prototype._newPolyline=function(e){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new pC({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},t.prototype._newPolygon=function(e,n){var a=this._polygon;return a&&this._lineGroup.remove(a),a=new mC({shape:{points:e,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(a),this._polygon=a,a},t.prototype._initSymbolLabelAnimation=function(e,n,a){var i,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(i=s.isHorizontal(),o=!1):n.type==="polar"&&(i=s.dim==="angle",o=!0);var u=e.hostModel,f=u.get("animationDuration");X(f)&&(f=f(null));var c=u.get("animationDelay")||0,h=X(c)?c(null):c;e.eachItemGraphicEl(function(v,d){var p=v;if(p){var g=[v.x,v.y],m=void 0,y=void 0,_=void 0;if(a)if(o){var S=a,b=n.pointToCoord(g);i?(m=S.startAngle,y=S.endAngle,_=-b[1]/180*Math.PI):(m=S.r0,y=S.r,_=b[0])}else{var x=a;i?(m=x.x,y=x.x+x.width,_=v.x):(m=x.y+x.height,y=x.y,_=v.y)}var C=y===m?0:(_-m)/(y-m);l&&(C=1-C);var T=X(c)?c(d):f*C+h,D=p.getSymbolPath(),A=D.getTextContent();p.attr({scaleX:0,scaleY:0}),p.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),A&&A.animateFrom({style:{opacity:0}},{duration:300,delay:T}),D.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,n,a){var i=e.getModel("endLabel");if(Cp(e)){var o=e.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Ce({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=CC(l);f>=0&&(Nr(s,Br(e,"endLabel"),{inheritColor:a,labelFetcher:e,labelDataIndex:f,defaultText:function(c,h,v){return v!=null?hp(o,v):hi(o,c)},enableTextSetter:!0},DC(i,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,n,a,i,o,s,l){var u=this._endLabel,f=this._polyline;if(u){e<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var c=a.getLayout("points"),h=a.hostModel,v=h.get("connectNulls"),d=s.get("precision"),p=s.get("distance")||0,g=l.getBaseAxis(),m=g.isHorizontal(),y=g.inverse,_=n.shape,S=y?m?_.x:_.y+_.height:m?_.x+_.width:_.y,b=(m?p:0)*(y?-1:1),x=(m?0:-p)*(y?-1:1),C=m?"x":"y",T=TC(c,S,C),D=T.range,A=D[1]-D[0],I=void 0;if(A>=1){if(A>1&&!v){var M=fc(c,D[0]);u.attr({x:M[0]+b,y:M[1]+x}),o&&(I=h.getRawValue(D[0]))}else{var M=f.getPointOn(S,C);M&&u.attr({x:M[0]+b,y:M[1]+x});var L=h.getRawValue(D[0]),P=h.getRawValue(D[1]);o&&(I=lv(a,d,L,P,T.t))}i.lastFrameIndex=D[0]}else{var R=e===1||i.lastFrameIndex>0?D[0]:0,M=fc(c,R);o&&(I=h.getRawValue(R)),u.attr({x:M[0]+b,y:M[1]+x})}if(o){var O=Vr(u);typeof O.setLabelText=="function"&&O.setLabelText(I)}}},t.prototype._doUpdateAnimation=function(e,n,a,i,o,s,l){var u=this._polyline,f=this._polygon,c=e.hostModel,h=dC(this._data,e,this._stackedOnPoints,n,this._coordSys,a,this._valueOrigin),v=h.current,d=h.stackedOnCurrent,p=h.next,g=h.stackedOnNext;if(o&&(v=Rt(h.current,a,o,l),d=Rt(h.stackedOnCurrent,a,o,l),p=Rt(h.next,a,o,l),g=Rt(h.stackedOnNext,a,o,l)),lc(v,p)>3e3||f&&lc(d,g)>3e3){u.stopAnimation(),u.setShape({points:p}),f&&(f.stopAnimation(),f.setShape({points:p,stackedOnPoints:g}));return}u.shape.__points=h.current,u.shape.points=v;var m={shape:{points:p}};h.current!==v&&(m.shape.__points=h.next),u.stopAnimation(),me(u,m,c),f&&(f.setShape({points:v,stackedOnPoints:d}),f.stopAnimation(),me(f,{shape:{stackedOnPoints:g}},c),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var y=[],_=h.status,S=0;S<_.length;S++){var b=_[S].cmd;if(b==="="){var x=e.getItemGraphicEl(_[S].idx1);x&&y.push({el:x,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var C=u.shape.__points,T=0;T<y.length;T++){var D=y[T].el,A=y[T].ptIdx*2;D.x=C[A],D.y=C[A+1],D.markRedraw()}})},t.prototype.remove=function(e){var n=this.group,a=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),a&&a.eachItemGraphicEl(function(i,o){i.__temp&&(n.remove(i),a.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t}(ke);function gl(r,t){return{seriesType:r,plan:Hn(),reset:function(e){var n=e.getData(),a=e.coordinateSystem,i=e.pipelineContext,o=t||i.large;if(a){var s=F(a.dimensions,function(v){return n.mapDimension(v)}).slice(0,2),l=s.length,u=n.getCalculationInfo("stackResultDimension");Rr(n,s[0])&&(s[0]=u),Rr(n,s[1])&&(s[1]=u);var f=n.getStore(),c=n.getDimensionIndex(s[0]),h=n.getDimensionIndex(s[1]);return l&&{progress:function(v,d){for(var p=v.end-v.start,g=o&&at(p*l),m=[],y=[],_=v.start,S=0;_<v.end;_++){var b=void 0;if(l===1){var x=f.get(c,_);b=a.dataToPoint(x,null,y)}else m[0]=f.get(c,_),m[1]=f.get(h,_),b=a.dataToPoint(m,null,y);o?(g[S++]=b[0],g[S++]=b[1]):d.setItemLayout(_,b.slice())}o&&d.setLayout("points",g)}}}}}}var IC={average:function(r){for(var t=0,e=0,n=0;n<r.length;n++)isNaN(r[n])||(t+=r[n],e++);return e===0?NaN:t/e},sum:function(r){for(var t=0,e=0;e<r.length;e++)t+=r[e]||0;return t},max:function(r){for(var t=-1/0,e=0;e<r.length;e++)r[e]>t&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e<r.length;e++)r[e]<t&&(t=r[e]);return isFinite(t)?t:NaN},minmax:function(r){for(var t=-1/0,e=-1/0,n=0;n<r.length;n++){var a=r[n],i=Math.abs(a);i>t&&(t=i,e=a)}return isFinite(e)?e:NaN},nearest:function(r){return r[0]}},MC=function(r){return Math.round(r.length/2)};function Tp(r){return{seriesType:r,reset:function(t,e,n){var a=t.getData(),i=t.get("sampling"),o=t.coordinateSystem,s=a.count();if(s>10&&o.type==="cartesian2d"&&i){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),c=n.getDevicePixelRatio(),h=Math.abs(f[1]-f[0])*(c||1),v=Math.round(s/h);if(isFinite(v)&&v>1){i==="lttb"&&t.setData(a.lttbDownSample(a.mapDimension(u.dim),1/v));var d=void 0;G(i)?d=IC[i]:X(i)&&(d=i),d&&t.setData(a.downSample(a.mapDimension(u.dim),1/v,d,MC))}}}}}function J1(r){r.registerChartView(AC),r.registerSeriesModel(cC),r.registerLayout(gl("line",!0)),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",n)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,Tp("line"))}var En=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,n){return si(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,n,a){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(e),s=i.dataToPoint(o);if(a)w(i.getAxes(),function(h,v){if(h.type==="category"&&n!=null){var d=h.getTicksCoords(),p=h.getTickModel().get("alignWithLabel"),g=o[v],m=n[v]==="x1"||n[v]==="y1";if(m&&!p&&(g+=1),d.length<2)return;if(d.length===2){s[v]=h.toGlobalCoord(h.getExtent()[m?1:0]);return}for(var y=void 0,_=void 0,S=1,b=0;b<d.length;b++){var x=d[b].coord,C=b===d.length-1?d[b-1].tickValue+S:d[b].tickValue;if(C===g){_=x;break}else if(C<g)y=x;else if(y!=null&&C>g){_=(x+y)/2;break}b===1&&(S=C-d[0].tickValue)}_==null&&(y?y&&(_=d[d.length-1].coord):_=d[0].coord),s[v]=h.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),c=i.getBaseAxis().isHorizontal()?0:1;s[c]+=u+f/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(Ve);Ve.registerClass(En);var LC=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(){return si(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>e&&(e=n),e},t.prototype.brushSelector=function(e,n,a){return a.rect(n.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=Is(En.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},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(En),PC=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),cc=function(r){V(t,r);function t(e){var n=r.call(this,e)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new PC},t.prototype.buildPath=function(e,n){var a=n.cx,i=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,f=n.startAngle,c=n.endAngle,h=n.clockwise,v=Math.PI*2,d=h?c-f<v:f-c<v;d||(f=c-(h?v:-v));var p=Math.cos(f),g=Math.sin(f),m=Math.cos(c),y=Math.sin(c);d?(e.moveTo(p*o+a,g*o+i),e.arc(p*u+a,g*u+i,l,-Math.PI+f,f,!h)):e.moveTo(p*s+a,g*s+i),e.arc(a,i,s,f,c,!h),e.arc(m*u+a,y*u+i,l,c-Math.PI*2,c-Math.PI,!h),o!==0&&e.arc(a,i,o,c,f,h)},t}(Se);function RC(r,t){t=t||{};var e=t.isRoundCap;return function(n,a,i){var o=a.position;if(!o||o instanceof Array)return mo(n,a,i);var s=r(o),l=a.distance!=null?a.distance:5,u=this.shape,f=u.cx,c=u.cy,h=u.r,v=u.r0,d=(h+v)/2,p=u.startAngle,g=u.endAngle,m=(p+g)/2,y=e?Math.abs(h-v)/2:0,_=Math.cos,S=Math.sin,b=f+h*_(p),x=c+h*S(p),C="left",T="top";switch(s){case"startArc":b=f+(v-l)*_(m),x=c+(v-l)*S(m),C="center",T="top";break;case"insideStartArc":b=f+(v+l)*_(m),x=c+(v+l)*S(m),C="center",T="bottom";break;case"startAngle":b=f+d*_(p)+va(p,l+y,!1),x=c+d*S(p)+ha(p,l+y,!1),C="right",T="middle";break;case"insideStartAngle":b=f+d*_(p)+va(p,-l+y,!1),x=c+d*S(p)+ha(p,-l+y,!1),C="left",T="middle";break;case"middle":b=f+d*_(m),x=c+d*S(m),C="center",T="middle";break;case"endArc":b=f+(h+l)*_(m),x=c+(h+l)*S(m),C="center",T="bottom";break;case"insideEndArc":b=f+(h-l)*_(m),x=c+(h-l)*S(m),C="center",T="top";break;case"endAngle":b=f+d*_(g)+va(g,l+y,!0),x=c+d*S(g)+ha(g,l+y,!0),C="left",T="middle";break;case"insideEndAngle":b=f+d*_(g)+va(g,-l+y,!0),x=c+d*S(g)+ha(g,-l+y,!0),C="right",T="middle";break;default:return mo(n,a,i)}return n=n||{},n.x=b,n.y=x,n.align=C,n.verticalAlign=T,n}}function kC(r,t,e,n){if(le(n)){r.setTextConfig({rotation:n});return}else if(N(t)){r.setTextConfig({rotation:0});return}var a=r.shape,i=a.clockwise?a.startAngle:a.endAngle,o=a.clockwise?a.endAngle:a.startAngle,s=(i+o)/2,l,u=e(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=i;break;case"endAngle":case"insideEndAngle":l=o;break;default:r.setTextConfig({rotation:0});return}var f=Math.PI*1.5-l;u==="middle"&&f>Math.PI/2&&f<Math.PI*1.5&&(f-=Math.PI),r.setTextConfig({rotation:f})}function va(r,t,e){return t*Math.sin(r)*(e?-1:1)}function ha(r,t,e){return t*Math.cos(r)*(e?1:-1)}function fn(r,t,e){var n=r.get("borderRadius");if(n==null)return e?{cornerRadius:0}:null;N(n)||(n=[n,n,n,n]);var a=Math.abs(t.r||0-t.r0||0);return{cornerRadius:F(n,function(i){return yo(i,a)})}}var ro=Math.max,no=Math.min;function EC(r,t){var e=r.getArea&&r.getArea();if(hl(r,"cartesian2d")){var n=r.getBaseAxis();if(n.type!=="category"||!n.onBand){var a=t.getLayout("bandWidth");n.isHorizontal()?(e.x-=a,e.width+=a*2):(e.y-=a,e.height+=a*2)}}return e}var OC=function(r){V(t,r);function t(){var e=r.call(this)||this;return e.type=t.type,e._isFirstFrame=!0,e}return t.prototype.render=function(e,n,a,i){this._model=e,this._removeOnRenderedListener(a),this._updateDrawMode(e);var o=e.get("coordinateSystem");(o==="cartesian2d"||o==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,n,a):this._renderNormal(e,n,a,i))},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,n){this._progressiveEls=[],this._incrementalRenderLarge(e,n)},t.prototype.eachRendered=function(e){Gn(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var n=e.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},t.prototype._renderNormal=function(e,n,a,i){var o=this.group,s=e.getData(),l=this._data,u=e.coordinateSystem,f=u.getBaseAxis(),c;u.type==="cartesian2d"?c=f.isHorizontal():u.type==="polar"&&(c=f.dim==="angle");var h=e.isAnimationEnabled()?e:null,v=NC(e,u);v&&this._enableRealtimeSort(v,s,a);var d=e.get("clip",!0)||v,p=EC(u,s);o.removeClipPath();var g=e.get("roundCap",!0),m=e.get("showBackground",!0),y=e.getModel("backgroundStyle"),_=y.get("borderRadius")||0,S=[],b=this._backgroundEls,x=i&&i.isInitSort,C=i&&i.type==="changeAxisOrder";function T(I){var M=da[u.type](s,I),L=HC(u,c,M);return L.useStyle(y.getItemStyle()),u.type==="cartesian2d"?L.setShape("r",_):L.setShape("cornerRadius",_),S[I]=L,L}s.diff(l).add(function(I){var M=s.getItemModel(I),L=da[u.type](s,I,M);if(m&&T(I),!(!s.hasValue(I)||!gc[u.type](L))){var P=!1;d&&(P=vc[u.type](p,L));var R=hc[u.type](e,s,I,L,c,h,f.model,!1,g);v&&(R.forceLabelAnimation=!0),mc(R,s,I,M,L,e,c,u.type==="polar"),x?R.attr({shape:L}):v?dc(v,h,R,L,I,c,!1,!1):De(R,{shape:L},e,I),s.setItemGraphicEl(I,R),o.add(R),R.ignore=P}}).update(function(I,M){var L=s.getItemModel(I),P=da[u.type](s,I,L);if(m){var R=void 0;b.length===0?R=T(M):(R=b[M],R.useStyle(y.getItemStyle()),u.type==="cartesian2d"?R.setShape("r",_):R.setShape("cornerRadius",_),S[I]=R);var O=da[u.type](s,I),W=Ap(c,O,u);me(R,{shape:W},h,I)}var k=l.getItemGraphicEl(M);if(!s.hasValue(I)||!gc[u.type](P)){o.remove(k);return}var E=!1;if(d&&(E=vc[u.type](p,P),E&&o.remove(k)),k?Za(k):k=hc[u.type](e,s,I,P,c,h,f.model,!!k,g),v&&(k.forceLabelAnimation=!0),C){var z=k.getTextContent();if(z){var H=Vr(z);H.prevValue!=null&&(H.prevValue=H.value)}}else mc(k,s,I,L,P,e,c,u.type==="polar");x?k.attr({shape:P}):v?dc(v,h,k,P,I,c,!0,C):me(k,{shape:P},e,I,null),s.setItemGraphicEl(I,k),k.ignore=E,o.add(k)}).remove(function(I){var M=l.getItemGraphicEl(I);M&&La(M,e,I)}).execute();var D=this._backgroundGroup||(this._backgroundGroup=new ge);D.removeAll();for(var A=0;A<S.length;++A)D.add(S[A]);o.add(D),this._backgroundEls=S,this._data=s},t.prototype._renderLarge=function(e,n,a){this._clear(),_c(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,n){this._removeBackground(),_c(n,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var n=e.get("clip",!0)&&pl(e.coordinateSystem,!1,e),a=this.group;n?a.setClipPath(n):a.removeClipPath()},t.prototype._enableRealtimeSort=function(e,n,a){var i=this;if(n.count()){var o=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,e,a),this._isFirstFrame=!1;else{var s=function(l){var u=n.getItemGraphicEl(l),f=u&&u.shape;return f&&Math.abs(o.isHorizontal()?f.height:f.width)||0};this._onRendered=function(){i._updateSortWithinSameData(n,s,o,a)},a.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,n,a){var i=[];return e.each(e.mapDimension(n.dim),function(o,s){var l=a(s);l=l??NaN,i.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),i.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:F(i,function(o){return o.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,n,a){for(var i=a.scale,o=e.mapDimension(a.dim),s=Number.MAX_VALUE,l=0,u=i.getOrdinalMeta().categories.length;l<u;++l){var f=e.rawIndexOf(o,i.getRawOrdinalNumber(l)),c=f<0?Number.MIN_VALUE:n(e.indexOfRawIndex(f));if(c>s)return!0;s=c}return!1},t.prototype._isOrderDifferentInView=function(e,n){for(var a=n.scale,i=a.getExtent(),o=Math.max(0,i[0]),s=Math.min(i[1],a.getOrdinalMeta().categories.length-1);o<=s;++o)if(e.ordinalNumbers[o]!==a.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,n,a,i){if(this._isOrderChangedWithinSameData(e,n,a)){var o=this._dataSort(e,a,n);this._isOrderDifferentInView(o,a)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",axisId:a.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,n,a){var i=n.baseAxis,o=this._dataSort(e,i,function(s){return e.get(e.mapDimension(n.otherAxis.dim),s)});a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},t.prototype.remove=function(e,n){this._clear(this._model),this._removeOnRenderedListener(n)},t.prototype.dispose=function(e,n){this._removeOnRenderedListener(n)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var n=this.group,a=this._data;e&&e.isAnimationEnabled()&&a&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],a.eachItemGraphicEl(function(i){La(i,e,Z(i).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(ke),vc={cartesian2d:function(r,t){var e=t.width<0?-1:1,n=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var a=r.x+r.width,i=r.y+r.height,o=ro(t.x,r.x),s=no(t.x+t.width,a),l=ro(t.y,r.y),u=no(t.y+t.height,i),f=s<o,c=u<l;return t.x=f&&o>a?s:o,t.y=c&&l>i?u:l,t.width=f?0:s-o,t.height=c?0:u-l,e<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),f||c},polar:function(r,t){var e=t.r0<=t.r?1:-1;if(e<0){var n=t.r;t.r=t.r0,t.r0=n}var a=no(t.r,r.r),i=ro(t.r0,r.r0);t.r=a,t.r0=i;var o=a-i<0;if(e<0){var n=t.r;t.r=t.r0,t.r0=n}return o}},hc={cartesian2d:function(r,t,e,n,a,i,o,s,l){var u=new he({shape:B({},n),z2:1});if(u.__dataIndex=e,u.name="item",i){var f=u.shape,c=a?"height":"width";f[c]=0}return u},polar:function(r,t,e,n,a,i,o,s,l){var u=!a&&l?cc:or,f=new u({shape:n,z2:1});f.name="item";var c=Dp(a);if(f.calculateTextPosition=RC(c,{isRoundCap:u===cc}),i){var h=f.shape,v=a?"r":"endAngle",d={};h[v]=a?n.r0:n.startAngle,d[v]=n[v],(s?me:De)(f,{shape:d},i)}return f}};function NC(r,t){var e=r.get("realtimeSort",!0),n=t.getBaseAxis();if(e&&n.type==="category"&&t.type==="cartesian2d")return{baseAxis:n,otherAxis:t.getOtherAxis(n)}}function dc(r,t,e,n,a,i,o,s){var l,u;i?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?me:De)(e,{shape:l},t,a,null);var f=t?r.baseAxis.model:null;(o?me:De)(e,{shape:u},f,a)}function pc(r,t){for(var e=0;e<t.length;e++)if(!isFinite(r[t[e]]))return!0;return!1}var BC=["x","y","width","height"],VC=["cx","cy","r","startAngle","endAngle"],gc={cartesian2d:function(r){return!pc(r,BC)},polar:function(r){return!pc(r,VC)}},da={cartesian2d:function(r,t,e){var n=r.getItemLayout(t),a=e?FC(e,n):0,i=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+i*a/2,y:n.y+o*a/2,width:n.width-i*a,height:n.height-o*a}},polar:function(r,t,e){var n=r.getItemLayout(t);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function zC(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function Dp(r){return function(t){var e=t?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+e;default:return n}}}(r)}function mc(r,t,e,n,a,i,o,s){var l=t.getItemVisual(e,"style");if(s){if(!i.get("roundCap")){var f=r.shape,c=fn(n.getModel("itemStyle"),f,!0);B(f,c),r.setShape(f)}}else{var u=n.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var h=n.getShallow("cursor");h&&r.attr("cursor",h);var v=s?o?a.r>=a.r0?"endArc":"startArc":a.endAngle>=a.startAngle?"endAngle":"startAngle":o?a.height>=0?"bottom":"top":a.width>=0?"right":"left",d=Br(n);Nr(r,d,{labelFetcher:i,labelDataIndex:e,defaultText:hi(i.getData(),e),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var p=r.getTextContent();if(s&&p){var g=n.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,kC(r,g==="outside"?v:g,Dp(o),n.get(["label","rotate"]))}Fm(p,d,i.getRawValue(e),function(y){return hp(t,y)});var m=n.getModel(["emphasis"]);Mr(r,m.get("focus"),m.get("blurScope"),m.get("disabled")),bn(r,n),zC(a)&&(r.style.fill="none",r.style.stroke="none",w(r.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function FC(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var n=r.get(["itemStyle","borderWidth"])||0,a=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),i=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,a,i)}var GC=function(){function r(){}return r}(),yc=function(r){V(t,r);function t(e){var n=r.call(this,e)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new GC},t.prototype.buildPath=function(e,n){for(var a=n.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f<a.length;f+=3)l[i]=u,l[o]=a[f+2],s[i]=a[f+i],s[o]=a[f+o],e.rect(s[0],s[1],l[0],l[1])},t}(Se);function _c(r,t,e,n){var a=r.getData(),i=a.getLayout("valueAxisHorizontal")?1:0,o=a.getLayout("largeDataIndices"),s=a.getLayout("size"),l=r.getModel("backgroundStyle"),u=a.getLayout("largeBackgroundPoints");if(u){var f=new yc({shape:{points:u},incremental:!!n,silent:!0,z2:0});f.baseDimIdx=i,f.largeDataIndices=o,f.barWidth=s,f.useStyle(l.getItemStyle()),t.add(f),e&&e.push(f)}var c=new yc({shape:{points:a.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});c.baseDimIdx=i,c.largeDataIndices=o,c.barWidth=s,t.add(c),c.useStyle(a.getVisual("style")),Z(c).seriesIndex=r.seriesIndex,r.get("silent")||(c.on("mousedown",Sc),c.on("mousemove",Sc)),e&&e.push(c)}var Sc=Ws(function(r){var t=this,e=WC(t,r.offsetX,r.offsetY);Z(t).dataIndex=e>=0?e:null},30,!1);function WC(r,t,e){for(var n=r.baseDimIdx,a=1-n,i=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,f=0,c=i.length/3;f<c;f++){var h=f*3;if(l[n]=u,l[a]=i[h+2],s[n]=i[h+n],s[a]=i[h+a],l[a]<0&&(s[a]+=l[a],l[a]=-l[a]),t>=s[0]&&t<=s[0]+l[0]&&e>=s[1]&&e<=s[1]+l[1])return o[f]}return-1}function Ap(r,t,e){if(hl(e,"cartesian2d")){var n=t,a=e.getArea();return{x:r?n.x:a.x,y:r?a.y:n.y,width:r?n.width:a.width,height:r?a.height:n.height}}else{var a=e.getArea(),i=t;return{cx:a.cx,cy:a.cy,r0:r?a.r0:i.r0,r:r?a.r:i.r,startAngle:r?i.startAngle:0,endAngle:r?i.endAngle:Math.PI*2}}}function HC(r,t,e){var n=r.type==="polar"?or:he;return new n({shape:Ap(t,e,r),silent:!0,z2:0})}function eT(r){r.registerChartView(OC),r.registerSeriesModel(LC),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,J(ld,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,ud("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,Tp("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var n=t.componentType||"series";e.eachComponent({mainType:n,query:t},function(a){t.sortInfo&&a.axis.setCategorySortInfo(t.sortInfo)})})}var xc=Math.PI*2,pa=Math.PI/180;function Ip(r,t){return Gt(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function Mp(r,t){var e=Ip(r,t),n=r.get("center"),a=r.get("radius");N(a)||(a=[0,a]);var i=te(e.width,t.getWidth()),o=te(e.height,t.getHeight()),s=Math.min(i,o),l=te(a[0],s/2),u=te(a[1],s/2),f,c,h=r.coordinateSystem;if(h){var v=h.dataToPoint(n);f=v[0]||0,c=v[1]||0}else N(n)||(n=[n,n]),f=te(n[0],i)+e.x,c=te(n[1],o)+e.y;return{cx:f,cy:c,r0:l,r:u}}function UC(r,t,e){t.eachSeriesByType(r,function(n){var a=n.getData(),i=a.mapDimension("value"),o=Ip(n,e),s=Mp(n,e),l=s.cx,u=s.cy,f=s.r,c=s.r0,h=-n.get("startAngle")*pa,v=n.get("endAngle"),d=n.get("padAngle")*pa;v=v==="auto"?h-xc:-v*pa;var p=n.get("minAngle")*pa,g=p+d,m=0;a.each(i,function(O){!isNaN(O)&&m++});var y=a.getSum(i),_=Math.PI/(y||m)*2,S=n.get("clockwise"),b=n.get("roseType"),x=n.get("stillShowZeroSum"),C=a.getDataExtent(i);C[0]=0;var T=S?1:-1,D=[h,v],A=T*d/2;yg(D,!S),h=D[0],v=D[1];var I=Math.abs(v-h),M=I,L=0,P=h;if(a.setLayout({viewRect:o,r:f}),a.each(i,function(O,W){var k;if(isNaN(O)){a.setItemLayout(W,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:S,cx:l,cy:u,r0:c,r:b?NaN:f});return}b!=="area"?k=y===0&&x?_:O*_:k=I/m,k<g?(k=g,M-=g):L+=O;var E=P+T*k,z=0,H=0;d>k?(z=P+T*k/2,H=z):(z=P+A,H=E-A),a.setItemLayout(W,{angle:k,startAngle:z,endAngle:H,clockwise:S,cx:l,cy:u,r0:c,r:b?Ot(O,C,[c,f]):f}),P=E}),M<xc&&m)if(M<=.001){var R=I/m;a.each(i,function(O,W){if(!isNaN(O)){var k=a.getItemLayout(W);k.angle=R;var E=0,z=0;R<d?(E=h+T*(W+1/2)*R,z=E):(E=h+T*W*R+A,z=h+T*(W+1)*R-A),k.startAngle=E,k.endAngle=z}})}else _=M/L,P=h,a.each(i,function(O,W){if(!isNaN(O)){var k=a.getItemLayout(W),E=k.angle===g?g:O*_,z=0,H=0;E<d?(z=P+T*E/2,H=z):(z=P+A,H=P+T*E-A),k.startAngle=z,k.endAngle=H,P+=T*E}})})}function YC(r){return{seriesType:r,reset:function(t,e){var n=e.findComponents({mainType:"legend"});if(!(!n||!n.length)){var a=t.getData();a.filterSelf(function(i){for(var o=a.getName(i),s=0;s<n.length;s++)if(!n[s].isSelected(o))return!1;return!0})}}}}var XC=Math.PI/180;function bc(r,t,e,n,a,i,o,s,l,u){if(r.length<2)return;function f(p){for(var g=p.rB,m=g*g,y=0;y<p.list.length;y++){var _=p.list[y],S=Math.abs(_.label.y-e),b=n+_.len,x=b*b,C=Math.sqrt((1-Math.abs(S*S/m))*x),T=t+(C+_.len2)*a,D=T-_.label.x,A=_.targetTextWidth-D*a;Lp(_,A,!0),_.label.x=T}}function c(p){for(var g={list:[],maxY:0},m={list:[],maxY:0},y=0;y<p.length;y++)if(p[y].labelAlignTo==="none"){var _=p[y],S=_.label.y>e?m:g,b=Math.abs(_.label.y-e);if(b>=S.maxY){var x=_.label.x-t-_.len2*a,C=n+_.len,T=Math.abs(x)<C?Math.sqrt(b*b/(1-x*x/C/C)):C;S.rB=T,S.maxY=b}S.list.push(_)}f(g),f(m)}for(var h=r.length,v=0;v<h;v++)if(r[v].position==="outer"&&r[v].labelAlignTo==="labelLine"){var d=r[v].label.x-u;r[v].linePoints[1][0]+=d,r[v].label.x=u}Ld(r,l,l+o)&&c(r)}function ZC(r,t,e,n,a,i,o,s){for(var l=[],u=[],f=Number.MAX_VALUE,c=-Number.MAX_VALUE,h=0;h<r.length;h++){var v=r[h].label;ao(r[h])||(v.x<t?(f=Math.min(f,v.x),l.push(r[h])):(c=Math.max(c,v.x),u.push(r[h])))}for(var h=0;h<r.length;h++){var d=r[h];if(!ao(d)&&d.linePoints){if(d.labelStyleWidth!=null)continue;var v=d.label,p=d.linePoints,g=void 0;d.labelAlignTo==="edge"?v.x<t?g=p[2][0]-d.labelDistance-o-d.edgeDistance:g=o+a-d.edgeDistance-p[2][0]-d.labelDistance:d.labelAlignTo==="labelLine"?v.x<t?g=f-o-d.bleedMargin:g=o+a-c-d.bleedMargin:v.x<t?g=v.x-o-d.bleedMargin:g=o+a-v.x-d.bleedMargin,d.targetTextWidth=g,Lp(d,g)}}bc(u,t,e,n,1,a,i,o,s,c),bc(l,t,e,n,-1,a,i,o,s,f);for(var h=0;h<r.length;h++){var d=r[h];if(!ao(d)&&d.linePoints){var v=d.label,p=d.linePoints,m=d.labelAlignTo==="edge",y=v.style.padding,_=y?y[1]+y[3]:0,S=v.style.backgroundColor?0:_,b=d.rect.width+S,x=p[1][0]-p[2][0];m?v.x<t?p[2][0]=o+d.edgeDistance+b+d.labelDistance:p[2][0]=o+a-d.edgeDistance-b-d.labelDistance:(v.x<t?p[2][0]=v.x+d.labelDistance:p[2][0]=v.x-d.labelDistance,p[1][0]=p[2][0]+x),p[1][1]=p[2][1]=v.y}}}function Lp(r,t,e){if(e===void 0&&(e=!1),r.labelStyleWidth==null){var n=r.label,a=n.style,i=r.rect,o=a.backgroundColor,s=a.padding,l=s?s[1]+s[3]:0,u=a.overflow,f=i.width+(o?0:l);if(t<f||e){var c=i.height;if(u&&u.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",t-l);var h=n.getBoundingRect();n.setStyle("width",Math.ceil(h.width)),n.setStyle("backgroundColor",o)}else{var v=t-l,d=t<f?v:e?v>r.unconstrainedWidth?null:v:null;n.setStyle("width",d)}var p=n.getBoundingRect();i.width=p.width;var g=(n.style.margin||0)+2.1;i.height=p.height+g,i.y-=(i.height-c)/2}}}function ao(r){return r.position==="center"}function $C(r){var t=r.getData(),e=[],n,a,i=!1,o=(r.get("minShowLabelAngle")||0)*XC,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,f=s.x,c=s.y,h=s.height;function v(x){x.ignore=!0}function d(x){if(!x.ignore)return!0;for(var C in x.states)if(x.states[C].ignore===!1)return!0;return!1}t.each(function(x){var C=t.getItemGraphicEl(x),T=C.shape,D=C.getTextContent(),A=C.getTextGuideLine(),I=t.getItemModel(x),M=I.getModel("label"),L=M.get("position")||I.get(["emphasis","label","position"]),P=M.get("distanceToLabelLine"),R=M.get("alignTo"),O=te(M.get("edgeDistance"),u),W=M.get("bleedMargin"),k=I.getModel("labelLine"),E=k.get("length");E=te(E,u);var z=k.get("length2");if(z=te(z,u),Math.abs(T.endAngle-T.startAngle)<o){w(D.states,v),D.ignore=!0,A&&(w(A.states,v),A.ignore=!0);return}if(d(D)){var H=(T.startAngle+T.endAngle)/2,q=Math.cos(H),j=Math.sin(H),ne,xe,ye,wt;n=T.cx,a=T.cy;var Ct=L==="inside"||L==="inner";if(L==="center")ne=T.cx,xe=T.cy,wt="center";else{var Gr=(Ct?(T.r+T.r0)/2*q:T.r*q)+n,Wr=(Ct?(T.r+T.r0)/2*j:T.r*j)+a;if(ne=Gr+q*3,xe=Wr+j*3,!Ct){var Yn=Gr+q*(E+l-T.r),Xn=Wr+j*(E+l-T.r),Zn=Yn+(q<0?-1:1)*z,Ht=Xn;R==="edge"?ne=q<0?f+O:f+u-O:ne=Zn+(q<0?-P:P),xe=Ht,ye=[[Gr,Wr],[Yn,Xn],[Zn,Ht]]}wt=Ct?"center":R==="edge"?q>0?"right":"left":q>0?"left":"right"}var Tt=Math.PI,vt=0,Hr=M.get("rotate");if(le(Hr))vt=Hr*(Tt/180);else if(L==="center")vt=0;else if(Hr==="radial"||Hr===!0){var Wp=q<0?-H+Tt:-H;vt=Wp}else if(Hr==="tangential"&&L!=="outside"&&L!=="outer"){var lr=Math.atan2(q,j);lr<0&&(lr=Tt*2+lr);var Hp=j>0;Hp&&(lr=Tt+lr),vt=lr-Tt}if(i=!!vt,D.x=ne,D.y=xe,D.rotation=vt,D.setStyle({verticalAlign:"middle"}),Ct){D.setStyle({align:wt});var di=D.states.select;di&&(di.x+=D.x,di.y+=D.y)}else{var Ur=D.getBoundingRect().clone();Ur.applyTransform(D.getComputedTransform());var yl=(D.style.margin||0)+2.1;Ur.y-=yl/2,Ur.height+=yl,e.push({label:D,labelLine:A,position:L,len:E,len2:z,minTurnAngle:k.get("minTurnAngle"),maxSurfaceAngle:k.get("maxSurfaceAngle"),surfaceNormal:new we(q,j),linePoints:ye,textAlign:wt,labelDistance:P,labelAlignTo:R,edgeDistance:O,bleedMargin:W,rect:Ur,unconstrainedWidth:Ur.width,labelStyleWidth:D.style.width})}C.setTextConfig({inside:Ct})}}),!i&&r.get("avoidLabelOverlap")&&ZC(e,n,a,l,u,h,f,c);for(var p=0;p<e.length;p++){var g=e[p],m=g.label,y=g.labelLine,_=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:g.textAlign}),_&&(w(m.states,v),m.ignore=!0);var S=m.states.select;S&&(S.x+=m.x,S.y+=m.y)}if(y){var b=g.linePoints;_||!b?(w(y.states,v),y.ignore=!0):(Td(b,g.minTurnAngle),jS(b,g.surfaceNormal,g.maxSurfaceAngle),y.setShape({points:b}),m.__hostTarget.textGuideLineConfig={anchor:new we(b[0][0],b[0][1])})}}}var KC=function(r){V(t,r);function t(e,n,a){var i=r.call(this)||this;i.z2=2;var o=new Ce;return i.setTextContent(o),i.updateData(e,n,a,!0),i}return t.prototype.updateData=function(e,n,a,i){var o=this,s=e.hostModel,l=e.getItemModel(n),u=l.getModel("emphasis"),f=e.getItemLayout(n),c=B(fn(l.getModel("itemStyle"),f,!0),f);if(isNaN(c.startAngle)){o.setShape(c);return}if(i){o.setShape(c);var h=s.getShallow("animationType");s.ecModel.ssr?(De(o,{scaleX:0,scaleY:0},s,{dataIndex:n,isFrom:!0}),o.originX=c.cx,o.originY=c.cy):h==="scale"?(o.shape.r=f.r0,De(o,{shape:{r:f.r}},s,n)):a!=null?(o.setShape({startAngle:a,endAngle:a}),De(o,{shape:{startAngle:f.startAngle,endAngle:f.endAngle}},s,n)):(o.shape.endAngle=f.startAngle,me(o,{shape:{endAngle:f.endAngle}},s,n))}else Za(o),me(o,{shape:c},s,n);o.useStyle(e.getItemVisual(n,"style")),bn(o,l);var v=(f.startAngle+f.endAngle)/2,d=s.get("selectedOffset"),p=Math.cos(v)*d,g=Math.sin(v)*d,m=l.getShallow("cursor");m&&o.attr("cursor",m),this._updateLabel(s,e,n),o.ensureState("emphasis").shape=B({r:f.r+(u.get("scale")&&u.get("scaleSize")||0)},fn(u.getModel("itemStyle"),f)),B(o.ensureState("select"),{x:p,y:g,shape:fn(l.getModel(["select","itemStyle"]),f)}),B(o.ensureState("blur"),{shape:fn(l.getModel(["blur","itemStyle"]),f)});var y=o.getTextGuideLine(),_=o.getTextContent();y&&B(y.ensureState("select"),{x:p,y:g}),B(_.ensureState("select"),{x:p,y:g}),Mr(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e,n,a){var i=this,o=n.getItemModel(a),s=o.getModel("labelLine"),l=n.getItemVisual(a,"style"),u=l&&l.fill,f=l&&l.opacity;Nr(i,Br(o),{labelFetcher:n.hostModel,labelDataIndex:a,inheritColor:u,defaultOpacity:f,defaultText:e.getFormattedLabel(a,"normal")||n.getName(a)});var c=i.getTextContent();i.setTextConfig({position:null,rotation:null}),c.attr({z2:10});var h=e.get(["label","position"]);if(h!=="outside"&&h!=="outer")i.removeTextGuideLine();else{var v=this.getTextGuideLine();v||(v=new Nn,this.setTextGuideLine(v)),Dd(this,Ad(o),{stroke:u,opacity:_g(s.get(["lineStyle","opacity"]),f,1)})}},t}(or),qC=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.ignoreLabelLineUpdate=!0,e}return t.prototype.render=function(e,n,a,i){var o=e.getData(),s=this._data,l=this.group,u;if(!s&&o.count()>0){for(var f=o.getItemLayout(0),c=1;isNaN(f&&f.startAngle)&&c<o.count();++c)f=o.getItemLayout(c);f&&(u=f.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),o.count()===0&&e.get("showEmptyCircle")){var h=new or({shape:Mp(e,a)});h.useStyle(e.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=h,l.add(h)}o.diff(s).add(function(v){var d=new KC(o,v,u);o.setItemGraphicEl(v,d),l.add(d)}).update(function(v,d){var p=s.getItemGraphicEl(d);p.updateData(o,v,u),p.off("click"),l.add(p),o.setItemGraphicEl(v,p)}).remove(function(v){var d=s.getItemGraphicEl(v);La(d,e,v)}).execute(),$C(e),e.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},t.prototype.dispose=function(){},t.prototype.containPoint=function(e,n){var a=n.getData(),i=a.getItemLayout(0);if(i){var o=e[0]-i.cx,s=e[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},t.type="pie",t}(ke);function Pp(r,t,e){t=N(t)&&{coordDimensions:t}||B({encodeDefine:r.getEncode()},t);var n=r.getSource(),a=nd(n,t).dimensions,i=new rd(a,r);return i.initData(n,e),i}var jC=function(){function r(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return r.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},r.prototype.containName=function(t){var e=this._getRawData();return e.indexOfName(t)>=0},r.prototype.indexOfName=function(t){var e=this._getDataWithEncodedVisual();return e.indexOfName(t)},r.prototype.getItemVisual=function(t,e){var n=this._getDataWithEncodedVisual();return n.getItemVisual(t,e)},r}(),QC=ue(),JC=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new jC(oe(this.getData,this),oe(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return Pp(this,{coordDimensions:["value"],encodeDefaulter:J(dy,this)})},t.prototype.getDataParams=function(e){var n=this.getData(),a=QC(n),i=a.seats;if(!i){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),i=a.seats=Lg(o,n.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,e);return s.percent=i[e]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(e){xo(e,"labelLine",["show"]);var n=e.labelLine,a=e.emphasis.labelLine;n.show=n.show&&e.label.show,a.show=a.show&&e.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t}(Ve);function e1(r){return{seriesType:r,reset:function(t,e){var n=t.getData();n.filterSelf(function(a){var i=n.mapDimension("value"),o=n.get(i,a);return!(le(o)&&!isNaN(o)&&o<0)})}}}function tT(r){r.registerChartView(qC),r.registerSeriesModel(JC),j0("pie",r.registerAction),r.registerLayout(J(UC,"pie")),r.registerProcessor(YC("pie")),r.registerProcessor(e1("pie"))}var t1=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e,n){return si(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return e??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(e,n,a){return a.point(n.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},t}(Ve),Rp=4,r1=function(){function r(){}return r}(),n1=function(r){V(t,r);function t(e){var n=r.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new r1},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,n){var a=n.points,i=n.size,o=this.symbolProxy,s=o.shape,l=e.getContext?e.getContext():e,u=l&&i[0]<Rp,f=this.softClipShape,c;if(u){this._ctx=l;return}for(this._ctx=null,c=this._off;c<a.length;){var h=a[c++],v=a[c++];isNaN(h)||isNaN(v)||f&&!f.contain(h,v)||(s.x=h-i[0]/2,s.y=v-i[1]/2,s.width=i[0],s.height=i[1],o.buildPath(e,s,!0))}this.incremental&&(this._off=c,this.notClear=!0)},t.prototype.afterBrush=function(){var e=this.shape,n=e.points,a=e.size,i=this._ctx,o=this.softClipShape,s;if(i){for(s=this._off;s<n.length;){var l=n[s++],u=n[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||i.fillRect(l-a[0]/2,u-a[1]/2,a[0],a[1])}this.incremental&&(this._off=s,this.notClear=!0)}},t.prototype.findDataIndex=function(e,n){for(var a=this.shape,i=a.points,o=a.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=i.length/2-1;u>=0;u--){var f=u*2,c=i[f]-s/2,h=i[f+1]-l/2;if(e>=c&&n>=h&&e<=c+s&&n<=h+l)return u}return-1},t.prototype.contain=function(e,n){var a=this.transformCoordToLocal(e,n),i=this.getBoundingRect();if(e=a[0],n=a[1],i.contain(e,n)){var o=this.hoverDataIdx=this.findDataIndex(e,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var n=this.shape,a=n.points,i=n.size,o=i[0],s=i[1],l=1/0,u=1/0,f=-1/0,c=-1/0,h=0;h<a.length;){var v=a[h++],d=a[h++];l=Math.min(v,l),f=Math.max(v,f),u=Math.min(d,u),c=Math.max(d,c)}e=this._rect=new Ye(l-o/2,u-s/2,f-l+o,c-u+s)}return e},t}(Se),a1=function(){function r(){this.group=new ge}return r.prototype.updateData=function(t,e){this._clear();var n=this._create();n.setShape({points:t.getLayout("points")}),this._setCommon(n,t,e)},r.prototype.updateLayout=function(t){var e=t.getLayout("points");this.group.eachChild(function(n){if(n.startIndex!=null){var a=(n.endIndex-n.startIndex)*2,i=n.startIndex*4*2;e=new Float32Array(e.buffer,i,a)}n.setShape("points",e),n.reset()})},r.prototype.incrementalPrepareUpdate=function(t){this._clear()},r.prototype.incrementalUpdate=function(t,e,n){var a=this._newAdded[0],i=e.getLayout("points"),o=a&&a.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+i.length);l.set(o),l.set(i,s),a.endIndex=t.end,a.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=t.start,u.endIndex=t.end,u.incremental=!0,u.setShape({points:i}),this._setCommon(u,e,n)}},r.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},r.prototype._create=function(){var t=new n1({cursor:"default"});return t.ignoreCoarsePointer=!0,this.group.add(t),this._newAdded.push(t),t},r.prototype._setCommon=function(t,e,n){var a=e.hostModel;n=n||{};var i=e.getVisual("symbolSize");t.setShape("size",i instanceof Array?i:[i,i]),t.softClipShape=n.clipShape||null,t.symbolProxy=Wt(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<Rp;t.useStyle(a.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=e.getVisual("style"),l=s&&s.fill;l&&t.setColor(l);var u=Z(t);u.seriesIndex=a.seriesIndex,t.on("mousemove",function(f){u.dataIndex=null;var c=t.hoverDataIdx;c>=0&&(u.dataIndex=c+(t.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}(),i1=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,a){var i=e.getData(),o=this._updateSymbolDraw(i,e);o.updateData(i,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,n,a){var i=e.getData(),o=this._updateSymbolDraw(i,e);o.incrementalPrepareUpdate(i),this._finished=!1},t.prototype.incrementalRender=function(e,n,a){this._symbolDraw.incrementalUpdate(e,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=e.end===n.getData().count()},t.prototype.updateTransform=function(e,n,a){var i=e.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=gl("").reset(e,n,a);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get("clip",!0)){var n=e.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,n){var a=this._symbolDraw,i=n.pipelineContext,o=i.large;return(!a||o!==this._isLargeDraw)&&(a&&a.remove(),a=this._symbolDraw=o?new a1:new dp,this._isLargeDraw=o,this.group.removeAll()),this.group.add(a.group),a},t.prototype.remove=function(e,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(ke);function rT(r){St(Bd),r.registerSeriesModel(t1),r.registerChartView(i1),r.registerLayout(gl("scatter"))}var o1=function(){function r(){}return r.prototype.getInitialData=function(t,e){var n,a=e.getComponent("xAxis",this.get("xAxisIndex")),i=e.getComponent("yAxis",this.get("yAxisIndex")),o=a.get("type"),s=i.get("type"),l;o==="category"?(t.layout="horizontal",n=a.getOrdinalMeta(),l=!0):s==="category"?(t.layout="vertical",n=i.getOrdinalMeta(),l=!0):t.layout=t.layout||"horizontal";var u=["x","y"],f=t.layout==="horizontal"?0:1,c=this._baseAxisDim=u[f],h=u[1-f],v=[a,i],d=v[f].get("type"),p=v[1-f].get("type"),g=t.data;if(g&&l){var m=[];w(g,function(S,b){var x;N(S)?(x=S.slice(),S.unshift(b)):N(S.value)?(x=B({},S),x.value=x.value.slice(),S.value.unshift(b)):x=S,m.push(x)}),t.data=m}var y=this.defaultValueDimensions,_=[{name:c,type:Ho(d),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:h,type:Ho(p),dimsDef:y.slice()}];return Pp(this,{coordDimensions:_,dimensionsCount:y.length+1,encodeDefaulter:J(qv,_,this)})},r.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},r}(),s1=["color","borderColor"],l1=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,a){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,n,a){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,n,a,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,n):this._incrementalRenderNormal(e,n)},t.prototype.eachRendered=function(e){Gn(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var n=e.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},t.prototype._renderNormal=function(e){var n=e.getData(),a=this._data,i=this.group,o=n.getLayout("isSimpleBox"),s=e.get("clip",!0),l=e.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),n.diff(a).add(function(f){if(n.hasValue(f)){var c=n.getItemLayout(f);if(s&&wc(u,c))return;var h=io(c,f,!0);De(h,{shape:{points:c.ends}},e,f),oo(h,n,f,o),i.add(h),n.setItemGraphicEl(f,h)}}).update(function(f,c){var h=a.getItemGraphicEl(c);if(!n.hasValue(f)){i.remove(h);return}var v=n.getItemLayout(f);if(s&&wc(u,v)){i.remove(h);return}h?(me(h,{shape:{points:v.ends}},e,f),Za(h)):h=io(v),oo(h,n,f,o),i.add(h),n.setItemGraphicEl(f,h)}).remove(function(f){var c=a.getItemGraphicEl(f);c&&i.remove(c)}).execute(),this._data=n},t.prototype._renderLarge=function(e){this._clear(),Cc(e,this.group);var n=e.get("clip",!0)?pl(e.coordinateSystem,!1,e):null;n?this.group.setClipPath(n):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(e,n){for(var a=n.getData(),i=a.getLayout("isSimpleBox"),o;(o=e.next())!=null;){var s=a.getItemLayout(o),l=io(s);oo(l,a,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},t.prototype._incrementalRenderLarge=function(e,n){Cc(n,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t}(ke),u1=function(){function r(){}return r}(),f1=function(r){V(t,r);function t(e){var n=r.call(this,e)||this;return n.type="normalCandlestickBox",n}return t.prototype.getDefaultShape=function(){return new u1},t.prototype.buildPath=function(e,n){var a=n.points;this.__simpleBox?(e.moveTo(a[4][0],a[4][1]),e.lineTo(a[6][0],a[6][1])):(e.moveTo(a[0][0],a[0][1]),e.lineTo(a[1][0],a[1][1]),e.lineTo(a[2][0],a[2][1]),e.lineTo(a[3][0],a[3][1]),e.closePath(),e.moveTo(a[4][0],a[4][1]),e.lineTo(a[5][0],a[5][1]),e.moveTo(a[6][0],a[6][1]),e.lineTo(a[7][0],a[7][1]))},t}(Se);function io(r,t,e){var n=r.ends;return new f1({shape:{points:e?c1(n,r):n},z2:100})}function wc(r,t){for(var e=!0,n=0;n<t.ends.length;n++)if(r.contain(t.ends[n][0],t.ends[n][1])){e=!1;break}return e}function oo(r,t,e,n){var a=t.getItemModel(e);r.useStyle(t.getItemVisual(e,"style")),r.style.strokeNoScale=!0,r.__simpleBox=n,bn(r,a)}function c1(r,t){return F(r,function(e){return e=e.slice(),e[1]=t.initBaseline,e})}var v1=function(){function r(){}return r}(),so=function(r){V(t,r);function t(e){var n=r.call(this,e)||this;return n.type="largeCandlestickBox",n}return t.prototype.getDefaultShape=function(){return new v1},t.prototype.buildPath=function(e,n){for(var a=n.points,i=0;i<a.length;)if(this.__sign===a[i++]){var o=a[i++];e.moveTo(o,a[i++]),e.lineTo(o,a[i++])}else i+=3},t}(Se);function Cc(r,t,e,n){var a=r.getData(),i=a.getLayout("largePoints"),o=new so({shape:{points:i},__sign:1,ignoreCoarsePointer:!0});t.add(o);var s=new so({shape:{points:i},__sign:-1,ignoreCoarsePointer:!0});t.add(s);var l=new so({shape:{points:i},__sign:0,ignoreCoarsePointer:!0});t.add(l),lo(1,o,r),lo(-1,s,r),lo(0,l,r),n&&(o.incremental=!0,s.incremental=!0),e&&e.push(o,s)}function lo(r,t,e,n){var a=e.get(["itemStyle",r>0?"borderColor":"borderColor0"])||e.get(["itemStyle",r>0?"color":"color0"]);r===0&&(a=e.get(["itemStyle","borderColorDoji"]));var i=e.getModel("itemStyle").getItemStyle(s1);t.useStyle(i),t.style.fill=null,t.style.stroke=a}var kp=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],e}return t.prototype.getShadowDim=function(){return"open"},t.prototype.brushSelector=function(e,n,a){var i=n.getItemLayout(e);return i&&a.rect(i.brushRect)},t.type="series.candlestick",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},t}(Ve);xt(kp,o1,!0);function h1(r){!r||!N(r.series)||w(r.series,function(t){Y(t)&&t.type==="k"&&(t.type="candlestick")})}var d1=["itemStyle","borderColor"],p1=["itemStyle","borderColor0"],g1=["itemStyle","borderColorDoji"],m1=["itemStyle","color"],y1=["itemStyle","color0"],_1={seriesType:"candlestick",plan:Hn(),performRawSeries:!0,reset:function(r,t){function e(i,o){return o.get(i>0?m1:y1)}function n(i,o){return o.get(i===0?g1:i>0?d1:p1)}if(!t.isSeriesFiltered(r)){var a=r.pipelineContext.large;return!a&&{progress:function(i,o){for(var s;(s=i.next())!=null;){var l=o.getItemModel(s),u=o.getItemLayout(s).sign,f=l.getItemStyle();f.fill=e(u,l),f.stroke=n(u,l)||f.fill;var c=o.ensureUniqueItemVisual(s,"style");B(c,f)}}}}}},S1={seriesType:"candlestick",plan:Hn(),reset:function(r){var t=r.coordinateSystem,e=r.getData(),n=x1(r,e),a=0,i=1,o=["x","y"],s=e.getDimensionIndex(e.mapDimension(o[a])),l=F(e.mapDimensionsAll(o[i]),e.getDimensionIndex,e),u=l[0],f=l[1],c=l[2],h=l[3];if(e.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?d:v};function v(p,g){for(var m,y=g.getStore();(m=p.next())!=null;){var _=y.get(s,m),S=y.get(u,m),b=y.get(f,m),x=y.get(c,m),C=y.get(h,m),T=Math.min(S,b),D=Math.max(S,b),A=W(T,_),I=W(D,_),M=W(x,_),L=W(C,_),P=[];k(P,I,0),k(P,A,1),P.push(z(L),z(I),z(M),z(A));var R=g.getItemModel(m),O=!!R.get(["itemStyle","borderColorDoji"]);g.setItemLayout(m,{sign:Tc(y,m,S,b,f,O),initBaseline:S>b?I[i]:A[i],ends:P,brushRect:E(x,C,_)})}function W(H,q){var j=[];return j[a]=q,j[i]=H,isNaN(q)||isNaN(H)?[NaN,NaN]:t.dataToPoint(j)}function k(H,q,j){var ne=q.slice(),xe=q.slice();ne[a]=ya(ne[a]+n/2,1,!1),xe[a]=ya(xe[a]-n/2,1,!0),j?H.push(ne,xe):H.push(xe,ne)}function E(H,q,j){var ne=W(H,j),xe=W(q,j);return ne[a]-=n/2,xe[a]-=n/2,{x:ne[0],y:ne[1],width:n,height:xe[1]-ne[1]}}function z(H){return H[a]=ya(H[a],1),H}}function d(p,g){for(var m=at(p.count*4),y=0,_,S=[],b=[],x,C=g.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(x=p.next())!=null;){var D=C.get(s,x),A=C.get(u,x),I=C.get(f,x),M=C.get(c,x),L=C.get(h,x);if(isNaN(D)||isNaN(M)||isNaN(L)){m[y++]=NaN,y+=3;continue}m[y++]=Tc(C,x,A,I,f,T),S[a]=D,S[i]=M,_=t.dataToPoint(S,null,b),m[y++]=_?_[0]:NaN,m[y++]=_?_[1]:NaN,S[i]=L,_=t.dataToPoint(S,null,b),m[y++]=_?_[1]:NaN}g.setLayout("largePoints",m)}}};function Tc(r,t,e,n,a,i){var o;return e>n?o=-1:e<n?o=1:o=i?0:t>0?r.get(a,t-1)<=n?1:-1:1,o}function x1(r,t){var e=r.getBaseAxis(),n,a=e.type==="category"?e.getBandWidth():(n=e.getExtent(),Math.abs(n[1]-n[0])/t.count()),i=te(ie(r.get("barMaxWidth"),a),a),o=te(ie(r.get("barMinWidth"),1),a),s=r.get("barWidth");return s!=null?te(s,a):Math.max(Math.min(a/2,i),o)}function nT(r){r.registerChartView(l1),r.registerSeriesModel(kp),r.registerPreprocessor(h1),r.registerVisual(_1),r.registerLayout(S1)}var b1=["itemStyle","borderWidth"],Dc=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],uo=new Ga,w1=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,a){var i=this.group,o=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis(),f=u.isHorizontal(),c=l.master.getRect(),h={ecSize:{width:a.getWidth(),height:a.getHeight()},seriesModel:e,coordSys:l,coordSysExtent:[[c.x,c.x+c.width],[c.y,c.y+c.height]],isHorizontal:f,valueDim:Dc[+f],categoryDim:Dc[1-+f]};o.diff(s).add(function(d){if(o.hasValue(d)){var p=Ic(o,d),g=Ac(o,d,p,h),m=Mc(o,h,g);o.setItemGraphicEl(d,m),i.add(m),Pc(m,h,g)}}).update(function(d,p){var g=s.getItemGraphicEl(p);if(!o.hasValue(d)){i.remove(g);return}var m=Ic(o,d),y=Ac(o,d,m,h),_=zp(o,y);g&&_!==g.__pictorialShapeStr&&(i.remove(g),o.setItemGraphicEl(d,null),g=null),g?L1(g,h,y):g=Mc(o,h,y,!0),o.setItemGraphicEl(d,g),g.__pictorialSymbolMeta=y,i.add(g),Pc(g,h,y)}).remove(function(d){var p=s.getItemGraphicEl(d);p&&Lc(s,d,p.__pictorialSymbolMeta.animationModel,p)}).execute();var v=e.get("clip",!0)?pl(e.coordinateSystem,!1,e):null;return v?i.setClipPath(v):i.removeClipPath(),this._data=o,this.group},t.prototype.remove=function(e,n){var a=this.group,i=this._data;e.get("animation")?i&&i.eachItemGraphicEl(function(o){Lc(i,Z(o).dataIndex,e,o)}):a.removeAll()},t.type="pictorialBar",t}(ke);function Ac(r,t,e,n){var a=r.getItemLayout(t),i=e.get("symbolRepeat"),o=e.get("symbolClip"),s=e.get("symbolPosition")||"start",l=e.get("symbolRotate"),u=(l||0)*Math.PI/180||0,f=e.get("symbolPatternSize")||2,c=e.isAnimationEnabled(),h={dataIndex:t,layout:a,itemModel:e,symbolType:r.getItemVisual(t,"symbol")||"circle",style:r.getItemVisual(t,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:e.get("symbolRepeatDirection"),symbolPatternSize:f,rotation:u,animationModel:c?e:null,hoverScale:c&&e.get(["emphasis","scale"]),z2:e.getShallow("z",!0)||0};C1(e,i,a,n,h),T1(r,t,a,i,o,h.boundingLength,h.pxSign,f,n,h),D1(e,h.symbolScale,u,n,h);var v=h.symbolSize,d=Hs(e.get("symbolOffset"),v);return A1(e,v,a,i,o,d,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,n,h),h}function C1(r,t,e,n,a){var i=n.valueDim,o=r.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(e[i.wh]<=0),f;if(N(o)){var c=[fo(s,o[0])-l,fo(s,o[1])-l];c[1]<c[0]&&c.reverse(),f=c[u]}else o!=null?f=fo(s,o)-l:t?f=n.coordSysExtent[i.index][u]-l:f=e[i.wh];a.boundingLength=f,t&&(a.repeatCutLength=e[i.wh]),a.pxSign=f>0?1:-1}function fo(r,t){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(t)))}function T1(r,t,e,n,a,i,o,s,l,u){var f=l.valueDim,c=l.categoryDim,h=Math.abs(e[c.wh]),v=r.getItemVisual(t,"symbolSize"),d;N(v)?d=v.slice():v==null?d=["100%","100%"]:d=[v,v],d[c.index]=te(d[c.index],h),d[f.index]=te(d[f.index],n?h:Math.abs(i)),u.symbolSize=d;var p=u.symbolScale=[d[0]/s,d[1]/s];p[f.index]*=(l.isHorizontal?-1:1)*o}function D1(r,t,e,n,a){var i=r.get(b1)||0;i&&(uo.attr({scaleX:t[0],scaleY:t[1],rotation:e}),uo.updateTransform(),i/=uo.getLineScale(),i*=t[n.valueDim.index]),a.valueLineWidth=i||0}function A1(r,t,e,n,a,i,o,s,l,u,f,c){var h=f.categoryDim,v=f.valueDim,d=c.pxSign,p=Math.max(t[v.index]+s,0),g=p;if(n){var m=Math.abs(l),y=Dr(r.get("symbolMargin"),"15%")+"",_=!1;y.lastIndexOf("!")===y.length-1&&(_=!0,y=y.slice(0,y.length-1));var S=te(y,t[v.index]),b=Math.max(p+S*2,0),x=_?0:S*2,C=tv(n),T=C?n:Rc((m+x)/b),D=m-T*p;S=D/2/(_?T:Math.max(T-1,1)),b=p+S*2,x=_?0:S*2,!C&&n!=="fixed"&&(T=u?Rc((Math.abs(u)+x)/b):0),g=T*b-x,c.repeatTimes=T,c.symbolMargin=S}var A=d*(g/2),I=c.pathPosition=[];I[h.index]=e[h.wh]/2,I[v.index]=o==="start"?A:o==="end"?l-A:l/2,i&&(I[0]+=i[0],I[1]+=i[1]);var M=c.bundlePosition=[];M[h.index]=e[h.xy],M[v.index]=e[v.xy];var L=c.barRectShape=B({},e);L[v.wh]=d*Math.max(Math.abs(e[v.wh]),Math.abs(I[v.index]+A)),L[h.wh]=e[h.wh];var P=c.clipShape={};P[h.xy]=-e[h.xy],P[h.wh]=f.ecSize[h.wh],P[v.xy]=0,P[v.wh]=e[v.wh]}function Ep(r){var t=r.symbolPatternSize,e=Wt(r.symbolType,-t/2,-t/2,t,t);return e.attr({culling:!0}),e.type!=="image"&&e.setStyle({strokeNoScale:!0}),e}function Op(r,t,e,n){var a=r.__pictorialBundle,i=e.symbolSize,o=e.valueLineWidth,s=e.pathPosition,l=t.valueDim,u=e.repeatTimes||0,f=0,c=i[t.valueDim.index]+o+e.symbolMargin*2;for(ml(r,function(p){p.__pictorialAnimationIndex=f,p.__pictorialRepeatTimes=u,f<u?Tr(p,null,d(f),e,n):Tr(p,null,{scaleX:0,scaleY:0},e,n,function(){a.remove(p)}),f++});f<u;f++){var h=Ep(e);h.__pictorialAnimationIndex=f,h.__pictorialRepeatTimes=u,a.add(h);var v=d(f);Tr(h,{x:v.x,y:v.y,scaleX:0,scaleY:0},{scaleX:v.scaleX,scaleY:v.scaleY,rotation:v.rotation},e,n)}function d(p){var g=s.slice(),m=e.pxSign,y=p;return(e.symbolRepeatDirection==="start"?m>0:m<0)&&(y=u-1-p),g[l.index]=c*(y-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation}}}function Np(r,t,e,n){var a=r.__pictorialBundle,i=r.__pictorialMainPath;i?Tr(i,null,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation},e,n):(i=r.__pictorialMainPath=Ep(e),a.add(i),Tr(i,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:0,scaleY:0,rotation:e.rotation},{scaleX:e.symbolScale[0],scaleY:e.symbolScale[1]},e,n))}function Bp(r,t,e){var n=B({},t.barRectShape),a=r.__pictorialBarRect;a?Tr(a,null,{shape:n},t,e):(a=r.__pictorialBarRect=new he({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),a.disableMorphing=!0,r.add(a))}function Vp(r,t,e,n){if(e.symbolClip){var a=r.__pictorialClipPath,i=B({},e.clipShape),o=t.valueDim,s=e.animationModel,l=e.dataIndex;if(a)me(a,{shape:i},s,l);else{i[o.wh]=0,a=new he({shape:i}),r.__pictorialBundle.setClipPath(a),r.__pictorialClipPath=a;var u={};u[o.wh]=e.clipShape[o.wh],As[n?"updateProps":"initProps"](a,{shape:u},s,l)}}}function Ic(r,t){var e=r.getItemModel(t);return e.getAnimationDelayParams=I1,e.isAnimationEnabled=M1,e}function I1(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function M1(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Mc(r,t,e,n){var a=new ge,i=new ge;return a.add(i),a.__pictorialBundle=i,i.x=e.bundlePosition[0],i.y=e.bundlePosition[1],e.symbolRepeat?Op(a,t,e):Np(a,t,e),Bp(a,e,n),Vp(a,t,e,n),a.__pictorialShapeStr=zp(r,e),a.__pictorialSymbolMeta=e,a}function L1(r,t,e){var n=e.animationModel,a=e.dataIndex,i=r.__pictorialBundle;me(i,{x:e.bundlePosition[0],y:e.bundlePosition[1]},n,a),e.symbolRepeat?Op(r,t,e,!0):Np(r,t,e,!0),Bp(r,e,!0),Vp(r,t,e,!0)}function Lc(r,t,e,n){var a=n.__pictorialBarRect;a&&a.removeTextContent();var i=[];ml(n,function(o){i.push(o)}),n.__pictorialMainPath&&i.push(n.__pictorialMainPath),n.__pictorialClipPath&&(e=null),w(i,function(o){wn(o,{scaleX:0,scaleY:0},e,t,function(){n.parent&&n.parent.remove(n)})}),r.setItemGraphicEl(t,null)}function zp(r,t){return[r.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function ml(r,t,e){w(r.__pictorialBundle.children(),function(n){n!==r.__pictorialBarRect&&t.call(e,n)})}function Tr(r,t,e,n,a,i){t&&r.attr(t),n.symbolClip&&!a?e&&r.attr(e):e&&As[a?"updateProps":"initProps"](r,e,n.animationModel,n.dataIndex,i)}function Pc(r,t,e){var n=e.dataIndex,a=e.itemModel,i=a.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),s=a.getModel(["blur","itemStyle"]).getItemStyle(),l=a.getModel(["select","itemStyle"]).getItemStyle(),u=a.getShallow("cursor"),f=i.get("focus"),c=i.get("blurScope"),h=i.get("scale");ml(r,function(p){if(p instanceof Or){var g=p.style;p.useStyle(B({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},e.style))}else p.useStyle(e.style);var m=p.ensureState("emphasis");m.style=o,h&&(m.scaleX=p.scaleX*1.1,m.scaleY=p.scaleY*1.1),p.ensureState("blur").style=s,p.ensureState("select").style=l,u&&(p.cursor=u),p.z2=e.z2});var v=t.valueDim.posDesc[+(e.boundingLength>0)],d=r.__pictorialBarRect;d.ignoreClip=!0,Nr(d,Br(a),{labelFetcher:t.seriesModel,labelDataIndex:n,defaultText:hi(t.seriesModel.getData(),n),inheritColor:e.style.fill,defaultOpacity:e.style.opacity,defaultOutsidePosition:v}),Mr(r,f,c,i.get("disabled"))}function Rc(r){var t=Math.round(r);return Math.abs(r-t)<1e-4?t:Math.ceil(r)}var P1=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e.defaultSymbol="roundRect",e}return t.prototype.getInitialData=function(e){return e.stack=null,r.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=Is(En.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%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),t}(En);function aT(r){r.registerChartView(w1),r.registerSeriesModel(P1),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,J(ld,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,ud("pictorialBar"))}function kc(r){return N(r[0])}function Ec(r,t){for(var e=[],n=r.length,a=0;a<n;a++)e.push({one:r[a],many:[]});for(var a=0;a<t.length;a++){var i=t[a].length,o=void 0;for(o=0;o<i;o++)e[o%n].many.push(t[a][o])}for(var s=0,a=n-1;a>=0;a--)if(!e[a].many.length){var l=e[s].many;if(l.length<=1)if(s)s=0;else return e;var i=l.length,u=Math.ceil(i/2);e[a].many=l.slice(u,i),e[s].many=l.slice(0,u),s++}return e}var R1={clone:function(r){for(var t=[],e=1-Math.pow(1-r.path.style.opacity,1/r.count),n=0;n<r.count;n++){var a=Cg(r.path);a.setStyle("opacity",e),t.push(a)}return t},split:null};function co(r,t,e,n,a,i){if(!r.length||!t.length)return;var o=Xa("update",n,a);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,f;kc(r)&&(u=r,f=t),kc(t)&&(u=t,f=r);function c(m,y,_,S,b){var x=m.many,C=m.one;if(x.length===1&&!b){var T=y?x[0]:C,D=y?C:x[0];if(Sg(T))c({many:[T],one:D},!0,_,S,!0);else{var A=s?re({delay:s(_,S)},l):l;xg(T,D,A),i(T,D,T,D,A)}}else for(var I=re({dividePath:R1[e],individualDelay:s&&function(W,k,E,z){return s(W+_,S)}},l),M=y?bg(x,C,I):wg(C,x,I),L=M.fromIndividuals,P=M.toIndividuals,R=L.length,O=0;O<R;O++){var A=s?re({delay:s(O,R)},l):l;i(L[O],P[O],y?x[O]:m.one,y?m.one:x[O],A)}}for(var h=u?u===r:r.length>t.length,v=u?Ec(f,u):Ec(h?t:r,[h?r:t]),d=0,p=0;p<v.length;p++)d+=v[p].many.length;for(var g=0,p=0;p<v.length;p++)c(v[p],h,g,d),g+=v[p].many.length}function qt(r){if(!r)return[];if(N(r)){for(var t=[],e=0;e<r.length;e++)t.push(qt(r[e]));return t}var n=[];return r.traverse(function(a){a instanceof Se&&!a.disableMorphing&&!a.invisible&&!a.ignore&&n.push(a)}),n}var Fp=1e4,k1=0,Oc=1,Nc=2,E1=ue();function O1(r,t){for(var e=r.dimensions,n=0;n<e.length;n++){var a=r.getDimensionInfo(e[n]);if(a&&a.otherDims[t]===0)return e[n]}}function N1(r,t,e){var n=r.getDimensionInfo(e),a=n&&n.ordinalMeta;if(n){var i=r.get(n.name,t);return a&&a.categories[i]||i+""}}function Bc(r,t,e,n){var a=n?"itemChildGroupId":"itemGroupId",i=O1(r,a);if(i){var o=N1(r,t,i);return o}var s=r.getRawDataItem(t),l=n?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!n)return e||r.getId(t)}function Vc(r){var t=[];return w(r,function(e){var n=e.data,a=e.dataGroupId;if(!(n.count()>Fp))for(var i=n.getIndices(),o=0;o<i.length;o++)t.push({data:n,groupId:Bc(n,o,a,!1),childGroupId:Bc(n,o,a,!0),divide:e.divide,dataIndex:o})}),t}function vo(r,t,e){r.traverse(function(n){n instanceof Se&&De(n,{style:{opacity:0}},t,{dataIndex:e,isFrom:!0})})}function ho(r){if(r.parent){var t=r.getComputedTransform();r.setLocalTransform(t),r.parent.remove(r)}}function mr(r){r.stopAnimation(),r.isGroup&&r.traverse(function(t){t.stopAnimation()})}function B1(r,t,e){var n=Xa("update",e,t);n&&r.traverse(function(a){if(a instanceof Tg){var i=Am(a);i&&a.animateFrom({style:i},n)}})}function V1(r,t){var e=r.length;if(e!==t.length)return!1;for(var n=0;n<e;n++){var a=r[n],i=t[n];if(a.data.getId(a.dataIndex)!==i.data.getId(i.dataIndex))return!1}return!0}function Gp(r,t,e){var n=Vc(r),a=Vc(t);function i(_,S,b,x,C){(b||_)&&S.animateFrom({style:b&&b!==_?B(B({},b.style),_.style):_.style},C)}var o=!1,s=k1,l=U(),u=U();n.forEach(function(_){_.groupId&&l.set(_.groupId,!0),_.childGroupId&&u.set(_.childGroupId,!0)});for(var f=0;f<a.length;f++){var c=a[f].groupId;if(u.get(c)){s=Oc;break}var h=a[f].childGroupId;if(h&&l.get(h)){s=Nc;break}}function v(_,S){return function(b){var x=b.data,C=b.dataIndex;return S?x.getId(C):_?s===Oc?b.childGroupId:b.groupId:s===Nc?b.childGroupId:b.groupId}}var d=V1(n,a),p={};if(!d)for(var f=0;f<a.length;f++){var g=a[f],m=g.data.getItemGraphicEl(g.dataIndex);m&&(p[m.id]=!0)}function y(_,S){var b=n[S],x=a[_],C=x.data.hostModel,T=b.data.getItemGraphicEl(b.dataIndex),D=x.data.getItemGraphicEl(x.dataIndex);if(T===D){D&&B1(D,x.dataIndex,C);return}T&&p[T.id]||D&&(mr(D),T?(mr(T),ho(T),o=!0,co(qt(T),qt(D),x.divide,C,_,i)):vo(D,C,_))}new Ln(n,a,v(!0,d),v(!1,d),null,"multiple").update(y).updateManyToOne(function(_,S){var b=a[_],x=b.data,C=x.hostModel,T=x.getItemGraphicEl(b.dataIndex),D=be(F(S,function(A){return n[A].data.getItemGraphicEl(n[A].dataIndex)}),function(A){return A&&A!==T&&!p[A.id]});T&&(mr(T),D.length?(w(D,function(A){mr(A),ho(A)}),o=!0,co(qt(D),qt(T),b.divide,C,_,i)):vo(T,C,b.dataIndex))}).updateOneToMany(function(_,S){var b=n[S],x=b.data.getItemGraphicEl(b.dataIndex);if(!(x&&p[x.id])){var C=be(F(_,function(D){return a[D].data.getItemGraphicEl(a[D].dataIndex)}),function(D){return D&&D!==x}),T=a[_[0]].data.hostModel;C.length&&(w(C,function(D){return mr(D)}),x?(mr(x),ho(x),o=!0,co(qt(x),qt(C),b.divide,T,_[0],i)):w(C,function(D){return vo(D,T,_[0])}))}}).updateManyToMany(function(_,S){new Ln(S,_,function(b){return n[b].data.getId(n[b].dataIndex)},function(b){return a[b].data.getId(a[b].dataIndex)}).update(function(b,x){y(_[b],S[x])}).execute()}).execute(),o&&w(t,function(_){var S=_.data,b=S.hostModel,x=b&&e.getViewOfSeriesModel(b),C=Xa("update",b,0);x&&b.isAnimationEnabled()&&C&&C.duration>0&&x.group.traverse(function(T){T instanceof Se&&!T.animators.length&&T.animateFrom({style:{opacity:0}},C)})})}function zc(r){var t=r.getModel("universalTransition").get("seriesKey");return t||r.id}function Fc(r){return N(r)?r.sort().join(","):r}function Et(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function z1(r,t){var e=U(),n=U(),a=U();return w(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=zc(i),f=Fc(u);n.set(f,{dataGroupId:s,data:l}),N(u)&&w(u,function(c){a.set(c,{key:f,dataGroupId:s,data:l})})}),w(t.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=zc(i),u=Fc(l),f=n.get(u);if(f)e.set(u,{oldSeries:[{dataGroupId:f.dataGroupId,divide:Et(f.data),data:f.data}],newSeries:[{dataGroupId:o,divide:Et(s),data:s}]});else if(N(l)){var c=[];w(l,function(d){var p=n.get(d);p.data&&c.push({dataGroupId:p.dataGroupId,divide:Et(p.data),data:p.data})}),c.length&&e.set(u,{oldSeries:c,newSeries:[{dataGroupId:o,data:s,divide:Et(s)}]})}else{var h=a.get(l);if(h){var v=e.get(h.key);v||(v={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:Et(h.data)}],newSeries:[]},e.set(h.key,v)),v.newSeries.push({dataGroupId:o,data:s,divide:Et(s)})}}}}),e}function Gc(r,t){for(var e=0;e<r.length;e++){var n=t.seriesIndex!=null&&t.seriesIndex===r[e].seriesIndex||t.seriesId!=null&&t.seriesId===r[e].id;if(n)return e}}function F1(r,t,e,n){var a=[],i=[];w(de(r.from),function(o){var s=Gc(t.oldSeries,o);s>=0&&a.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:Et(t.oldData[s]),groupIdDim:o.dimension})}),w(de(r.to),function(o){var s=Gc(e.updatedSeries,o);if(s>=0){var l=e.updatedSeries[s].getData();i.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:Et(l),groupIdDim:o.dimension})}}),a.length>0&&i.length>0&&Gp(a,i,n)}function iT(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,n){w(de(n.seriesTransition),function(a){w(de(a.to),function(i){for(var o=n.updatedSeries,s=0;s<o.length;s++)(i.seriesIndex!=null&&i.seriesIndex===o[s].seriesIndex||i.seriesId!=null&&i.seriesId===o[s].id)&&(o[s][ba]=!0)})})}),r.registerUpdateLifecycle("series:transition",function(t,e,n){var a=E1(e);if(a.oldSeries&&n.updatedSeries&&n.optionChanged){var i=n.seriesTransition;if(i)w(de(i),function(v){F1(v,a,n,e)});else{var o=z1(a,n);w(o.keys(),function(v){var d=o.get(v);Gp(d.oldSeries,d.newSeries,e)})}w(n.updatedSeries,function(v){v[ba]&&(v[ba]=!1)})}for(var s=t.getSeries(),l=a.oldSeries=[],u=a.oldDataGroupIds=[],f=a.oldData=[],c=0;c<s.length;c++){var h=s[c].getData();h.count()<Fp&&(l.push(s[c]),u.push(s[c].get("dataGroupId")),f.push(h))}})}function oT(r){r.registerPainter("canvas",Dg)}export{$1 as a,Z1 as b,Y1 as c,Q1 as d,j1 as e,K1 as f,X1 as g,q1 as h,H1 as i,eT as j,J1 as k,tT as l,nT as m,rT as n,aT as o,U1 as p,iT as q,Zh as r,oT as s,St as u};
|